devices/**/XXXmdel.c, cleanup whitespace
This commit is contained in:
parent
bee207ccd9
commit
3095330565
|
|
@ -12,8 +12,8 @@ Author: 1987 Kanwar Jit Singh
|
|||
int
|
||||
ASRCmDelete(GENmodel **modList, IFuid modname, GENmodel *killModel)
|
||||
{
|
||||
ASRCmodel **model = (ASRCmodel**) modList;
|
||||
ASRCmodel *modfast = (ASRCmodel*) killModel;
|
||||
ASRCmodel **model = (ASRCmodel **) modList;
|
||||
ASRCmodel *modfast = (ASRCmodel *) killModel;
|
||||
ASRCinstance *here;
|
||||
ASRCinstance *prev = NULL;
|
||||
ASRCmodel **oldmod;
|
||||
|
|
@ -25,7 +25,7 @@ ASRCmDelete(GENmodel **modList, IFuid modname, GENmodel *killModel)
|
|||
oldmod = model;
|
||||
}
|
||||
|
||||
return(E_NOMOD);
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
|
||||
|
|
@ -41,5 +41,5 @@ ASRCmDelete(GENmodel **modList, IFuid modname, GENmodel *killModel)
|
|||
if (prev)
|
||||
FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This routine deletes a BJT model from the circuit and frees
|
||||
|
|
@ -20,22 +18,22 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
BJTmDelete(GENmodel **inModels, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BJTmodel **model = (BJTmodel**)inModels;
|
||||
BJTmodel *modfast = (BJTmodel*)kill;
|
||||
|
||||
BJTmodel **model = (BJTmodel **) inModels;
|
||||
BJTmodel *modfast = (BJTmodel *) kill;
|
||||
BJTmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->BJTnextModel)) {
|
||||
if( (*model)->BJTmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->BJTnextModel)) {
|
||||
if ((*model)->BJTmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
if( (*model)->BJTinstances ) return(E_NOTEMPTY);
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->BJTinstances) return E_NOTEMPTY;
|
||||
*oldmod = (*model)->BJTnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Hong J. Park, Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "bsim1def.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Hong J. Park, Thomas L. Quarles
|
|||
int
|
||||
B1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B1model **model = (B1model**)inModel;
|
||||
B1model *modfast = (B1model*)kill;
|
||||
B1model **model = (B1model **) inModel;
|
||||
B1model *modfast = (B1model *) kill;
|
||||
B1instance *here;
|
||||
B1instance *prev = NULL;
|
||||
B1model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->B1nextModel)) {
|
||||
if( (*model)->B1modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->B1nextModel)) {
|
||||
if ((*model)->B1modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B1nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->B1instances ; here ; here = here->B1nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->B1instances; here; here = here->B1nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Hong J. Park, Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "bsim2def.h"
|
||||
|
|
@ -14,28 +12,28 @@ Author: 1985 Hong J. Park, Thomas L. Quarles
|
|||
int
|
||||
B2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B2model **model = (B2model**)inModel;
|
||||
B2model *modfast = (B2model*)kill;
|
||||
B2model **model = (B2model **) inModel;
|
||||
B2model *modfast = (B2model *) kill;
|
||||
B2instance *here;
|
||||
B2instance *prev = NULL;
|
||||
B2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->B2nextModel)) {
|
||||
if( (*model)->B2modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->B2nextModel)) {
|
||||
if ((*model)->B2modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B2nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->B2instances ; here ; here = here->B2nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->B2instances; here; here = here->B2nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
/**********
|
||||
* Copyright 2004 Regents of the University of California. All rights reserved.
|
||||
* File: b3mdel.c of BSIM3v3.3.0
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
**********/
|
||||
|
|
@ -13,37 +13,36 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
BSIM3model **model = (BSIM3model**)inModel;
|
||||
BSIM3model *modfast = (BSIM3model*)kill;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance *prev = NULL;
|
||||
BSIM3model **oldmod;
|
||||
BSIM3model **model = (BSIM3model **) inModel;
|
||||
BSIM3model *modfast = (BSIM3model *) kill;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance *prev = NULL;
|
||||
BSIM3model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM3nextModel)) {
|
||||
if ((*model)->BSIM3modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3nextModel)) {
|
||||
if ((*model)->BSIM3modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3instances; here; here = here->BSIM3nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Modified by Paolo Nenzi 2002
|
|||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
|
|
@ -16,34 +16,33 @@ Modified by Paolo Nenzi 2002
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
B3SOIDDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIDDmodel **model = (B3SOIDDmodel**)inModel;
|
||||
B3SOIDDmodel *modfast = (B3SOIDDmodel*)kill;
|
||||
B3SOIDDinstance *here;
|
||||
B3SOIDDinstance *prev = NULL;
|
||||
B3SOIDDmodel **oldmod;
|
||||
B3SOIDDmodel **model = (B3SOIDDmodel **) inModel;
|
||||
B3SOIDDmodel *modfast = (B3SOIDDmodel *) kill;
|
||||
B3SOIDDinstance *here;
|
||||
B3SOIDDinstance *prev = NULL;
|
||||
B3SOIDDmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->B3SOIDDnextModel)) {
|
||||
if ((*model)->B3SOIDDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B3SOIDDnextModel)) {
|
||||
if ((*model)->B3SOIDDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B3SOIDDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ File: b3soifdmdel.c 98/5/01
|
|||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
|
|
@ -15,34 +15,33 @@ File: b3soifdmdel.c 98/5/01
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
B3SOIFDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIFDmodel **model = (B3SOIFDmodel**)inModel;
|
||||
B3SOIFDmodel *modfast = (B3SOIFDmodel*)kill;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDinstance *prev = NULL;
|
||||
B3SOIFDmodel **oldmod;
|
||||
B3SOIFDmodel **model = (B3SOIFDmodel **) inModel;
|
||||
B3SOIFDmodel *modfast = (B3SOIFDmodel *) kill;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDinstance *prev = NULL;
|
||||
B3SOIFDmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->B3SOIFDnextModel)) {
|
||||
if ((*model)->B3SOIFDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B3SOIFDnextModel)) {
|
||||
if ((*model)->B3SOIFDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B3SOIFDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Modified by Paolo Nenzi 2002
|
|||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.2.3 02/3/5 Pin Su
|
||||
* Revision 2.2.3 02/3/5 Pin Su
|
||||
* BSIMPD2.2.3 release
|
||||
*/
|
||||
|
||||
|
|
@ -15,34 +15,33 @@ Modified by Paolo Nenzi 2002
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
B3SOIPDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIPDmodel **model = (B3SOIPDmodel**)inModel;
|
||||
B3SOIPDmodel *modfast = (B3SOIPDmodel*)kill;
|
||||
B3SOIPDinstance *here;
|
||||
B3SOIPDinstance *prev = NULL;
|
||||
B3SOIPDmodel **oldmod;
|
||||
B3SOIPDmodel **model = (B3SOIPDmodel **) inModel;
|
||||
B3SOIPDmodel *modfast = (B3SOIPDmodel *) kill;
|
||||
B3SOIPDinstance *here;
|
||||
B3SOIPDinstance *prev = NULL;
|
||||
B3SOIPDmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->B3SOIPDnextModel)) {
|
||||
if ((*model)->B3SOIPDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B3SOIPDnextModel)) {
|
||||
if ((*model)->B3SOIPDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B3SOIPDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,34 +9,33 @@ File: b3v0mdel.c
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3v0mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM3v0model **model = (BSIM3v0model**)inModel;
|
||||
BSIM3v0model *modfast = (BSIM3v0model*)kill;
|
||||
BSIM3v0instance *here;
|
||||
BSIM3v0instance *prev = NULL;
|
||||
BSIM3v0model **oldmod;
|
||||
BSIM3v0model **model = (BSIM3v0model **) inModel;
|
||||
BSIM3v0model *modfast = (BSIM3v0model *) kill;
|
||||
BSIM3v0instance *here;
|
||||
BSIM3v0instance *prev = NULL;
|
||||
BSIM3v0model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM3v0nextModel)) {
|
||||
if ((*model)->BSIM3v0modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3v0nextModel)) {
|
||||
if ((*model)->BSIM3v0modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3v0nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3v0instances; here; here = here->BSIM3v0nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/**********
|
||||
* Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
* File: b3v1mdel.c
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.1, Released by yuhua 96/12/08
|
||||
*/
|
||||
|
||||
|
|
@ -15,34 +15,33 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3v1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM3v1model **model = (BSIM3v1model**)inModel;
|
||||
BSIM3v1model *modfast = (BSIM3v1model*)kill;
|
||||
BSIM3v1instance *here;
|
||||
BSIM3v1instance *prev = NULL;
|
||||
BSIM3v1model **oldmod;
|
||||
BSIM3v1model **model = (BSIM3v1model **) inModel;
|
||||
BSIM3v1model *modfast = (BSIM3v1model *) kill;
|
||||
BSIM3v1instance *here;
|
||||
BSIM3v1instance *prev = NULL;
|
||||
BSIM3v1model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM3v1nextModel)) {
|
||||
if ((*model)->BSIM3v1modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3v1nextModel)) {
|
||||
if ((*model)->BSIM3v1modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3v1nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3v1instances; here; here = here->BSIM3v1nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,33 +14,33 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3v32mDelete (GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM3v32mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM3v32model **model = (BSIM3v32model**)inModel;
|
||||
BSIM3v32model *modfast = (BSIM3v32model*)kill;
|
||||
BSIM3v32instance *here;
|
||||
BSIM3v32instance *prev = NULL;
|
||||
BSIM3v32model **oldmod;
|
||||
BSIM3v32model **model = (BSIM3v32model **) inModel;
|
||||
BSIM3v32model *modfast = (BSIM3v32model *) kill;
|
||||
BSIM3v32instance *here;
|
||||
BSIM3v32instance *prev = NULL;
|
||||
BSIM3v32model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM3v32nextModel)) {
|
||||
if ((*model)->BSIM3v32modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3v32nextModel)) {
|
||||
if ((*model)->BSIM3v32modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3v32nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -63,34 +63,36 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM4mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
BSIM4model **model = (BSIM4model**)inModel;
|
||||
BSIM4model *modfast = (BSIM4model*)kill;
|
||||
BSIM4instance *here;
|
||||
BSIM4instance *prev = NULL;
|
||||
BSIM4model **oldmod;
|
||||
BSIM4model **model = (BSIM4model **) inModel;
|
||||
BSIM4model *modfast = (BSIM4model *) kill;
|
||||
BSIM4instance *here;
|
||||
BSIM4instance *prev = NULL;
|
||||
BSIM4model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM4nextModel)) {
|
||||
if ((*model)->BSIM4modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4nextModel)) {
|
||||
if ((*model)->BSIM4modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4instances; here; here = here->BSIM4nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,34 +13,36 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM4v5mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
BSIM4v5model **model = (BSIM4v5model**)inModel;
|
||||
BSIM4v5model *modfast = (BSIM4v5model*)kill;
|
||||
BSIM4v5instance *here;
|
||||
BSIM4v5instance *prev = NULL;
|
||||
BSIM4v5model **oldmod;
|
||||
BSIM4v5model **model = (BSIM4v5model **) inModel;
|
||||
BSIM4v5model *modfast = (BSIM4v5model *) kill;
|
||||
BSIM4v5instance *here;
|
||||
BSIM4v5instance *prev = NULL;
|
||||
BSIM4v5model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM4v5nextModel)) {
|
||||
if ((*model)->BSIM4v5modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4v5nextModel)) {
|
||||
if ((*model)->BSIM4v5modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4v5nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,34 +15,36 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM4v6mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
BSIM4v6model **model = (BSIM4v6model**)inModel;
|
||||
BSIM4v6model *modfast = (BSIM4v6model*)kill;
|
||||
BSIM4v6instance *here;
|
||||
BSIM4v6instance *prev = NULL;
|
||||
BSIM4v6model **oldmod;
|
||||
BSIM4v6model **model = (BSIM4v6model **) inModel;
|
||||
BSIM4v6model *modfast = (BSIM4v6model *) kill;
|
||||
BSIM4v6instance *here;
|
||||
BSIM4v6instance *prev = NULL;
|
||||
BSIM4v6model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM4v6nextModel)) {
|
||||
if ((*model)->BSIM4v6modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4v6nextModel)) {
|
||||
if ((*model)->BSIM4v6modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4v6nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4v6instances; here; here = here->BSIM4v6nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,34 +15,36 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM4v7mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
BSIM4v7model **model = (BSIM4v7model**)inModel;
|
||||
BSIM4v7model *modfast = (BSIM4v7model*)kill;
|
||||
BSIM4v7instance *here;
|
||||
BSIM4v7instance *prev = NULL;
|
||||
BSIM4v7model **oldmod;
|
||||
BSIM4v7model **model = (BSIM4v7model **) inModel;
|
||||
BSIM4v7model *modfast = (BSIM4v7model *) kill;
|
||||
BSIM4v7instance *here;
|
||||
BSIM4v7instance *prev = NULL;
|
||||
BSIM4v7model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM4v7nextModel)) {
|
||||
if ((*model)->BSIM4v7modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4v7nextModel)) {
|
||||
if ((*model)->BSIM4v7modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4v7nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4v7instances; here; here = here->BSIM4v7nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,40 +15,40 @@
|
|||
**********/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
|
||||
#include "b4soidef.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
B4SOImDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
B4SOImodel **model = (B4SOImodel**)inModel;
|
||||
B4SOImodel *modfast = (B4SOImodel*)kill;
|
||||
B4SOIinstance *here;
|
||||
B4SOIinstance *prev = NULL;
|
||||
B4SOImodel **oldmod;
|
||||
B4SOImodel **model = (B4SOImodel **) inModel;
|
||||
B4SOImodel *modfast = (B4SOImodel *) kill;
|
||||
B4SOIinstance *here;
|
||||
B4SOIinstance *prev = NULL;
|
||||
B4SOImodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->B4SOInextModel)) {
|
||||
if ((*model)->B4SOImodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B4SOInextModel)) {
|
||||
if ((*model)->B4SOImodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B4SOInextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B4SOIinstances; here; here = here->B4SOInextInstance) {
|
||||
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Thomas L. Quarles
|
||||
Modified: Spetember 2003 Paolo Nenzi
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "capdefs.h"
|
||||
|
|
@ -15,29 +13,28 @@ Modified: Spetember 2003 Paolo Nenzi
|
|||
int
|
||||
CAPmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
|
||||
CAPmodel *modfast = (CAPmodel*)kill;
|
||||
CAPmodel **model = (CAPmodel**)inModel;
|
||||
CAPmodel *modfast = (CAPmodel *) kill;
|
||||
CAPmodel **model = (CAPmodel **) inModel;
|
||||
CAPinstance *here;
|
||||
CAPinstance *prev = NULL;
|
||||
CAPmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->CAPnextModel)) {
|
||||
if( (*model)->CAPmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->CAPnextModel)) {
|
||||
if ((*model)->CAPmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CAPnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->CAPinstances ; here ; here = here->CAPnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->CAPinstances; here; here = here->CAPnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "cccsdefs.h"
|
||||
|
|
@ -14,28 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
CCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
|
||||
CCCSmodel **model = (CCCSmodel**)inModel;
|
||||
CCCSmodel *modfast = (CCCSmodel*)kill;
|
||||
CCCSmodel **model = (CCCSmodel **) inModel;
|
||||
CCCSmodel *modfast = (CCCSmodel *) kill;
|
||||
CCCSinstance *here;
|
||||
CCCSinstance *prev = NULL;
|
||||
CCCSmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->CCCSnextModel)) {
|
||||
if( (*model)->CCCSmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->CCCSnextModel)) {
|
||||
if ((*model)->CCCSmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CCCSnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->CCCSinstances ; here ; here = here->CCCSnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->CCCSinstances; here; here = here->CCCSnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ccvsdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
CCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CCVSmodel **model = (CCVSmodel**)inModel;
|
||||
CCVSmodel *modfast = (CCVSmodel*)kill;
|
||||
CCVSmodel **model = (CCVSmodel **) inModel;
|
||||
CCVSmodel *modfast = (CCVSmodel *) kill;
|
||||
CCVSinstance *here;
|
||||
CCVSinstance *prev = NULL;
|
||||
CCVSmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->CCVSnextModel)) {
|
||||
if( (*model)->CCVSmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->CCVSnextModel)) {
|
||||
if ((*model)->CCVSmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CCVSnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->CCVSinstances ; here ; here = here->CCVSnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->CCVSinstances; here; here = here->CCVSnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,28 +14,28 @@ Author: 1992 Charles Hough
|
|||
int
|
||||
CPLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CPLmodel **model = (CPLmodel **)inModel;
|
||||
CPLmodel *modfast = (CPLmodel *)kill;
|
||||
CPLmodel **model = (CPLmodel **) inModel;
|
||||
CPLmodel *modfast = (CPLmodel *) kill;
|
||||
CPLinstance *here;
|
||||
CPLinstance *prev = NULL;
|
||||
CPLmodel **oldmod;
|
||||
oldmod = model;
|
||||
|
||||
for( ; *model ; model = &((*model)->CPLnextModel)) {
|
||||
if( (*model)->CPLmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->CPLnextModel)) {
|
||||
if ((*model)->CPLmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CPLnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->CPLinstances ; here ; here = here->CPLnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->CPLinstances; here; here = here->CPLnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Gordon Jacobs
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "cswdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Gordon Jacobs
|
|||
int
|
||||
CSWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CSWmodel **model = (CSWmodel**)inModel;
|
||||
CSWmodel *modfast = (CSWmodel*)kill;
|
||||
CSWmodel **model = (CSWmodel **) inModel;
|
||||
CSWmodel *modfast = (CSWmodel *) kill;
|
||||
CSWinstance *here;
|
||||
CSWinstance *prev = NULL;
|
||||
CSWmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->CSWnextModel)) {
|
||||
if( (*model)->CSWmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->CSWnextModel)) {
|
||||
if ((*model)->CSWmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CSWnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->CSWinstances ; here ; here = here->CSWnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->CSWinstances; here; here = here->CSWnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "diodefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
DIOmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
DIOmodel **model = (DIOmodel**)inModel;
|
||||
DIOmodel *modfast = (DIOmodel*)kill;
|
||||
DIOmodel **model = (DIOmodel **) inModel;
|
||||
DIOmodel *modfast = (DIOmodel *) kill;
|
||||
DIOinstance *here;
|
||||
DIOinstance *prev = NULL;
|
||||
DIOmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->DIOnextModel)) {
|
||||
if( (*model)->DIOmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->DIOnextModel)) {
|
||||
if ((*model)->DIOmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->DIOnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->DIOinstances ; here ; here = here->DIOnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->DIOinstances; here; here = here->DIOnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 S. Hwang
|
||||
**********/
|
||||
|
||||
/*
|
||||
Imported into hfeta model: Paolo Nenzi 2001
|
||||
*/
|
||||
Imported into hfeta model: Paolo Nenzi 2001
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "hfetdefs.h"
|
||||
|
|
@ -15,27 +16,28 @@ Imported into hfeta model: Paolo Nenzi 2001
|
|||
int
|
||||
HFETAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
HFETAmodel **model = (HFETAmodel**)inModel;
|
||||
HFETAmodel *modfast = (HFETAmodel*)kill;
|
||||
HFETAmodel **model = (HFETAmodel **) inModel;
|
||||
HFETAmodel *modfast = (HFETAmodel *) kill;
|
||||
HFETAinstance *here;
|
||||
HFETAinstance *prev = NULL;
|
||||
HFETAmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->HFETAnextModel)) {
|
||||
if( (*model)->HFETAmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->HFETAnextModel)) {
|
||||
if ((*model)->HFETAmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HFETAnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->HFETAinstances ; here ; here = here->HFETAnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->HFETAinstances; here; here = here->HFETAnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 S. Hwang
|
||||
**********/
|
||||
|
||||
/*
|
||||
Imported into hfet2 model: Paolo Nenzi 2001
|
||||
*/
|
||||
Imported into hfet2 model: Paolo Nenzi 2001
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "hfet2defs.h"
|
||||
|
|
@ -15,27 +16,28 @@ Imported into hfet2 model: Paolo Nenzi 2001
|
|||
int
|
||||
HFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
HFET2model **model = (HFET2model**)inModel;
|
||||
HFET2model *modfast = (HFET2model*)kill;
|
||||
HFET2model **model = (HFET2model **) inModel;
|
||||
HFET2model *modfast = (HFET2model *) kill;
|
||||
HFET2instance *here;
|
||||
HFET2instance *prev = NULL;
|
||||
HFET2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->HFET2nextModel)) {
|
||||
if( (*model)->HFET2modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->HFET2nextModel)) {
|
||||
if ((*model)->HFET2modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HFET2nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->HFET2instances ; here ; here = here->HFET2nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->HFET2instances; here; here = here->HFET2nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
MODEL NAME : HiSIM
|
||||
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
|
||||
|
||||
|
||||
FILE : hsm2mdel.c
|
||||
|
||||
Date : 2014.6.5
|
||||
|
||||
released by
|
||||
released by
|
||||
Hiroshima University &
|
||||
Semiconductor Technology Academic Research Center (STARC)
|
||||
***********************************************************************/
|
||||
|
|
@ -31,8 +31,8 @@ support. Hiroshima University or STARC and its employees are not liable
|
|||
for the condition or performance of the software.
|
||||
|
||||
Hiroshima University and STARC own the copyright and grant users a perpetual,
|
||||
irrevocable, worldwide, non-exclusive, royalty-free license with respect
|
||||
to the software as set forth below.
|
||||
irrevocable, worldwide, non-exclusive, royalty-free license with respect
|
||||
to the software as set forth below.
|
||||
|
||||
Hiroshima University and STARC hereby disclaim all implied warranties.
|
||||
|
||||
|
|
@ -59,34 +59,35 @@ to others."
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
int HSM2mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
HSM2model **model = (HSM2model**)inModel;
|
||||
HSM2model *modfast = (HSM2model*)kill;
|
||||
HSM2instance *here;
|
||||
HSM2instance *prev = NULL;
|
||||
HSM2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for ( ;*model ;model = &((*model)->HSM2nextModel) ) {
|
||||
if ( (*model)->HSM2modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
int HSM2mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
HSM2model **model = (HSM2model **) inModel;
|
||||
HSM2model *modfast = (HSM2model *) kill;
|
||||
HSM2instance *here;
|
||||
HSM2instance *prev = NULL;
|
||||
HSM2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
for (; *model; model = &((*model)->HSM2nextModel)) {
|
||||
if ((*model)->HSM2modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HSM2nextModel; /* cut deleted device out of list */
|
||||
for ( here = (*model)->HSM2instances ;
|
||||
here ;here = here->HSM2nextInstance ) {
|
||||
*oldmod = (*model)->HSM2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HSM2instances;
|
||||
here; here = here->HSM2nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
HiSIM (Hiroshima University STARC IGFET Model)
|
||||
Copyright (C) 2012 Hiroshima University & STARC
|
||||
|
||||
MODEL NAME : HiSIM_HV
|
||||
MODEL NAME : HiSIM_HV
|
||||
( VERSION : 1 SUBVERSION : 2 REVISION : 4 )
|
||||
Model Parameter VERSION : 1.23
|
||||
FILE : hsmhvmdel.c
|
||||
|
||||
DATE : 2013.04.30
|
||||
|
||||
released by
|
||||
released by
|
||||
Hiroshima University &
|
||||
Semiconductor Technology Academic Research Center (STARC)
|
||||
***********************************************************************/
|
||||
|
|
@ -20,34 +20,35 @@
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
int HSMHVmDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
HSMHVmodel **model = (HSMHVmodel**)inModel;
|
||||
HSMHVmodel *modfast = (HSMHVmodel*)kill;
|
||||
HSMHVinstance *here;
|
||||
HSMHVinstance *prev = NULL;
|
||||
HSMHVmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for ( ;*model ;model = &((*model)->HSMHVnextModel) ) {
|
||||
if ( (*model)->HSMHVmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
int HSMHVmDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
HSMHVmodel **model = (HSMHVmodel **) inModel;
|
||||
HSMHVmodel *modfast = (HSMHVmodel *) kill;
|
||||
HSMHVinstance *here;
|
||||
HSMHVinstance *prev = NULL;
|
||||
HSMHVmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
for (; *model; model = &((*model)->HSMHVnextModel)) {
|
||||
if ((*model)->HSMHVmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HSMHVnextModel; /* cut deleted device out of list */
|
||||
for ( here = (*model)->HSMHVinstances ;
|
||||
here ;here = here->HSMHVnextInstance ) {
|
||||
*oldmod = (*model)->HSMHVnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HSMHVinstances;
|
||||
here; here = here->HSMHVnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
HiSIM (Hiroshima University STARC IGFET Model)
|
||||
Copyright (C) 2014 Hiroshima University & STARC
|
||||
|
||||
MODEL NAME : HiSIM_HV
|
||||
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
|
||||
MODEL NAME : HiSIM_HV
|
||||
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
|
||||
Model Parameter 'VERSION' : 2.20
|
||||
FILE : hsmhvmdel.c
|
||||
|
||||
DATE : 2014.6.11
|
||||
|
||||
released by
|
||||
released by
|
||||
Hiroshima University &
|
||||
Semiconductor Technology Academic Research Center (STARC)
|
||||
***********************************************************************/
|
||||
|
|
@ -31,8 +31,8 @@ support. Hiroshima University or STARC and its employees are not liable
|
|||
for the condition or performance of the software.
|
||||
|
||||
Hiroshima University and STARC own the copyright and grant users a perpetual,
|
||||
irrevocable, worldwide, non-exclusive, royalty-free license with respect
|
||||
to the software as set forth below.
|
||||
irrevocable, worldwide, non-exclusive, royalty-free license with respect
|
||||
to the software as set forth below.
|
||||
|
||||
Hiroshima University and STARC hereby disclaims all implied warranties.
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ to others."
|
|||
Toshimasa Asahara, President, Hiroshima University
|
||||
Mitiko Miura-Mattausch, Professor, Hiroshima University
|
||||
Katsuhiro Shimohigashi, President&CEO, STARC
|
||||
June 2008 (revised October 2011)
|
||||
June 2008 (revised October 2011)
|
||||
*************************************************************************/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
|
|
@ -62,34 +62,35 @@ June 2008 (revised October 2011)
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
int HSMHV2mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
HSMHV2model **model = (HSMHV2model**)inModel;
|
||||
HSMHV2model *modfast = (HSMHV2model*)kill;
|
||||
HSMHV2instance *here;
|
||||
HSMHV2instance *prev = NULL;
|
||||
HSMHV2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for ( ;*model ;model = &((*model)->HSMHV2nextModel) ) {
|
||||
if ( (*model)->HSMHV2modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
int HSMHV2mDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
HSMHV2model **model = (HSMHV2model **) inModel;
|
||||
HSMHV2model *modfast = (HSMHV2model *) kill;
|
||||
HSMHV2instance *here;
|
||||
HSMHV2instance *prev = NULL;
|
||||
HSMHV2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
for (; *model; model = &((*model)->HSMHV2nextModel)) {
|
||||
if ((*model)->HSMHV2modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HSMHV2nextModel; /* cut deleted device out of list */
|
||||
for ( here = (*model)->HSMHV2instances ;
|
||||
here ;here = here->HSMHV2nextInstance ) {
|
||||
*oldmod = (*model)->HSMHV2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HSMHV2instances;
|
||||
here; here = here->HSMHV2nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "inddefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
INDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
INDmodel **model = (INDmodel**)inModel;
|
||||
INDmodel *modfast = (INDmodel*)kill;
|
||||
INDmodel **model = (INDmodel **) inModel;
|
||||
INDmodel *modfast = (INDmodel *) kill;
|
||||
INDinstance *here;
|
||||
INDinstance *prev = NULL;
|
||||
INDmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->INDnextModel)) {
|
||||
if( (*model)->INDmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->INDnextModel)) {
|
||||
if ((*model)->INDmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->INDnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->INDinstances ; here ; here = here->INDnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->INDinstances; here; here = here->INDnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "inddefs.h"
|
||||
|
|
@ -15,28 +13,29 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MUTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MUTmodel **model = (MUTmodel**)inModel;
|
||||
MUTmodel *modfast = (MUTmodel*)kill;
|
||||
MUTmodel **model = (MUTmodel **) inModel;
|
||||
MUTmodel *modfast = (MUTmodel *) kill;
|
||||
MUTinstance *here;
|
||||
MUTinstance *prev = NULL;
|
||||
MUTmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MUTnextModel)) {
|
||||
if( (*model)->MUTmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->MUTnextModel)) {
|
||||
if ((*model)->MUTmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MUTnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MUTinstances ; here ; here = here->MUTnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->MUTinstances; here; here = here->MUTnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif /* MUTUAL */
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "isrcdefs.h"
|
||||
|
|
@ -19,22 +17,23 @@ ISRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *fast)
|
|||
ISRCinstance *here;
|
||||
ISRCinstance *prev = NULL;
|
||||
ISRCmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->ISRCnextModel)) {
|
||||
if( (*model)->ISRCmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->ISRCnextModel)) {
|
||||
if ((*model)->ISRCmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->ISRCnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->ISRCinstances ; here ; here = here->ISRCnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->ISRCinstances; here; here = here->ISRCnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "jfetdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
JFETmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
JFETmodel **model = (JFETmodel**)inModel;
|
||||
JFETmodel *modfast = (JFETmodel*)kill;
|
||||
JFETmodel **model = (JFETmodel **) inModel;
|
||||
JFETmodel *modfast = (JFETmodel *) kill;
|
||||
JFETinstance *here;
|
||||
JFETinstance *prev = NULL;
|
||||
JFETmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->JFETnextModel)) {
|
||||
if( (*model)->JFETmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->JFETnextModel)) {
|
||||
if ((*model)->JFETmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->JFETnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->JFETinstances ; here ; here = here->JFETnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->JFETinstances; here; here = here->JFETnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ Author: 1985 Thomas L. Quarles
|
|||
Modified to jfet2 for PS model definition ( Anthony E. Parker )
|
||||
Copyright 1994 Macquarie University, Sydney Australia.
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "jfet2defs.h"
|
||||
|
|
@ -18,27 +16,28 @@ Modified to jfet2 for PS model definition ( Anthony E. Parker )
|
|||
int
|
||||
JFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
JFET2model **model = (JFET2model**)inModel;
|
||||
JFET2model *modfast = (JFET2model*)kill;
|
||||
JFET2model **model = (JFET2model **) inModel;
|
||||
JFET2model *modfast = (JFET2model *) kill;
|
||||
JFET2instance *here;
|
||||
JFET2instance *prev = NULL;
|
||||
JFET2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->JFET2nextModel)) {
|
||||
if( (*model)->JFET2modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->JFET2nextModel)) {
|
||||
if ((*model)->JFET2modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->JFET2nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->JFET2instances ; here ; here = here->JFET2nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->JFET2instances; here; here = here->JFET2nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,33 +8,35 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
LTRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
LTRAmodel **model = (LTRAmodel **) inModel;
|
||||
LTRAmodel *modfast = (LTRAmodel *) kill;
|
||||
LTRAinstance *here;
|
||||
LTRAinstance *prev = NULL;
|
||||
LTRAmodel **oldmod;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->LTRAnextModel)) {
|
||||
if ((*model)->LTRAmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
LTRAmodel **model = (LTRAmodel **) inModel;
|
||||
LTRAmodel *modfast = (LTRAmodel *) kill;
|
||||
LTRAinstance *here;
|
||||
LTRAinstance *prev = NULL;
|
||||
LTRAmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
}
|
||||
return (E_NOMOD);
|
||||
for (; *model; model = &((*model)->LTRAnextModel)) {
|
||||
if ((*model)->LTRAmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->LTRAnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->LTRAinstances; here; here = here->LTRAnextInstance) {
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->LTRAnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->LTRAinstances; here; here = here->LTRAnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
FREE(*model);
|
||||
return (OK);
|
||||
|
||||
FREE(prev);
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 S. Hwang
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mesdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 S. Hwang
|
|||
int
|
||||
MESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MESmodel **model = (MESmodel**)inModel;
|
||||
MESmodel *modfast = (MESmodel*)kill;
|
||||
MESmodel **model = (MESmodel **) inModel;
|
||||
MESmodel *modfast = (MESmodel *) kill;
|
||||
MESinstance *here;
|
||||
MESinstance *prev = NULL;
|
||||
MESmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MESnextModel)) {
|
||||
if( (*model)->MESmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->MESnextModel)) {
|
||||
if ((*model)->MESmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MESnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MESinstances ; here ; here = here->MESnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->MESinstances; here; here = here->MESnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 S. Hwang
|
||||
**********/
|
||||
|
||||
/*
|
||||
Imported into mesa model: 2001 Paolo Nenzi
|
||||
*/
|
||||
Imported into mesa model: 2001 Paolo Nenzi
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mesadefs.h"
|
||||
|
|
@ -15,27 +16,28 @@ Author: 1985 S. Hwang
|
|||
int
|
||||
MESAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MESAmodel **model = (MESAmodel**)inModel;
|
||||
MESAmodel *modfast = (MESAmodel*)kill;
|
||||
MESAmodel **model = (MESAmodel **) inModel;
|
||||
MESAmodel *modfast = (MESAmodel *) kill;
|
||||
MESAinstance *here;
|
||||
MESAinstance *prev = NULL;
|
||||
MESAmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MESAnextModel)) {
|
||||
if( (*model)->MESAmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->MESAnextModel)) {
|
||||
if ((*model)->MESAmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MESAnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MESAinstances ; here ; here = here->MESAnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->MESAinstances; here; here = here->MESAnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mos1defs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS1model **model = (MOS1model **)inModel;
|
||||
MOS1model *modfast = (MOS1model *)kill;
|
||||
MOS1model **model = (MOS1model **) inModel;
|
||||
MOS1model *modfast = (MOS1model *) kill;
|
||||
MOS1instance *here;
|
||||
MOS1instance *prev = NULL;
|
||||
MOS1model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MOS1nextModel)) {
|
||||
if( (*model)->MOS1modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->MOS1nextModel)) {
|
||||
if ((*model)->MOS1modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS1nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MOS1instances ; here ; here = here->MOS1nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->MOS1instances; here; here = here->MOS1nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mos2defs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS2model **model = (MOS2model **)inModel;
|
||||
MOS2model *modfast = (MOS2model *)kill;
|
||||
MOS2model **model = (MOS2model **) inModel;
|
||||
MOS2model *modfast = (MOS2model *) kill;
|
||||
MOS2instance *here;
|
||||
MOS2instance *prev = NULL;
|
||||
MOS2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MOS2nextModel)) {
|
||||
if( (*model)->MOS2modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->MOS2nextModel)) {
|
||||
if ((*model)->MOS2modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS2nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MOS2instances ; here ; here = here->MOS2nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->MOS2instances; here; here = here->MOS2nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mos3defs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS3model **model = (MOS3model **)inModel;
|
||||
MOS3model *modfast = (MOS3model *)kill;
|
||||
MOS3model **model = (MOS3model **) inModel;
|
||||
MOS3model *modfast = (MOS3model *) kill;
|
||||
MOS3instance *here;
|
||||
MOS3instance *prev = NULL;
|
||||
MOS3model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MOS3nextModel)) {
|
||||
if( (*model)->MOS3modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->MOS3nextModel)) {
|
||||
if ((*model)->MOS3modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS3nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MOS3instances ; here ; here = here->MOS3nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->MOS3instances; here; here = here->MOS3nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Thomas L. Quarles
|
||||
Modified: Alan Gillespie
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mos9defs.h"
|
||||
|
|
@ -15,27 +13,28 @@ Modified: Alan Gillespie
|
|||
int
|
||||
MOS9mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS9model **model = (MOS9model **)inModel;
|
||||
MOS9model *modfast = (MOS9model *)kill;
|
||||
MOS9model **model = (MOS9model **) inModel;
|
||||
MOS9model *modfast = (MOS9model *) kill;
|
||||
MOS9instance *here;
|
||||
MOS9instance *prev = NULL;
|
||||
MOS9model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MOS9nextModel)) {
|
||||
if( (*model)->MOS9modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->MOS9nextModel)) {
|
||||
if ((*model)->MOS9modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS9nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MOS9instances ; here ; here = here->MOS9nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->MOS9instances; here; here = here->MOS9nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**********
|
||||
Copyright 1992 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
**********/
|
||||
|
||||
/*
|
||||
|
|
@ -13,27 +13,28 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
NBJTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NBJTmodel **model = (NBJTmodel **) inModel;
|
||||
NBJTmodel *modfast = (NBJTmodel *) kill;
|
||||
NBJTmodel **oldmod;
|
||||
|
||||
NBJTmodel **model = (NBJTmodel **) inModel;
|
||||
NBJTmodel *modfast = (NBJTmodel *) kill;
|
||||
NBJTmodel **oldmod;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NBJTnextModel)) {
|
||||
if ((*model)->NBJTmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return (E_NOMOD);
|
||||
for (; *model; model = &((*model)->NBJTnextModel)) {
|
||||
if ((*model)->NBJTmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
delgot:
|
||||
if ((*model)->NBJTinstances)
|
||||
return (E_NOTEMPTY);
|
||||
*oldmod = (*model)->NBJTnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return (OK);
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->NBJTinstances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->NBJTnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**********
|
||||
Copyright 1992 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
**********/
|
||||
|
||||
/*
|
||||
|
|
@ -13,27 +13,28 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
NBJT2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NBJT2model **model = (NBJT2model **) inModel;
|
||||
NBJT2model *modfast = (NBJT2model *) kill;
|
||||
NBJT2model **oldmod;
|
||||
|
||||
NBJT2model **model = (NBJT2model **) inModel;
|
||||
NBJT2model *modfast = (NBJT2model *) kill;
|
||||
NBJT2model **oldmod;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NBJT2nextModel)) {
|
||||
if ((*model)->NBJT2modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return (E_NOMOD);
|
||||
for (; *model; model = &((*model)->NBJT2nextModel)) {
|
||||
if ((*model)->NBJT2modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
delgot:
|
||||
if ((*model)->NBJT2instances)
|
||||
return (E_NOTEMPTY);
|
||||
*oldmod = (*model)->NBJT2nextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return (OK);
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->NBJT2instances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->NBJT2nextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**********
|
||||
Copyright 1992 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
**********/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
|
|
@ -8,16 +8,16 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
NDEVmDelete(
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill )
|
||||
GENmodel **inModel,
|
||||
IFuid modname,
|
||||
GENmodel *kill)
|
||||
{
|
||||
NG_IGNORE(inModel);
|
||||
NG_IGNORE(modname);
|
||||
NG_IGNORE(kill);
|
||||
NG_IGNORE(inModel);
|
||||
NG_IGNORE(modname);
|
||||
NG_IGNORE(kill);
|
||||
|
||||
|
||||
return (OK);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**********
|
||||
Copyright 1992 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
**********/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
|
|
@ -8,33 +8,35 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
NUMDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NUMDmodel **model = (NUMDmodel **) inModel;
|
||||
NUMDmodel *modfast = (NUMDmodel *) kill;
|
||||
NUMDinstance *inst;
|
||||
NUMDinstance *prev = NULL;
|
||||
NUMDmodel **oldmod;
|
||||
|
||||
NUMDmodel **model = (NUMDmodel **) inModel;
|
||||
NUMDmodel *modfast = (NUMDmodel *) kill;
|
||||
NUMDinstance *inst;
|
||||
NUMDinstance *prev = NULL;
|
||||
NUMDmodel **oldmod;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NUMDnextModel)) {
|
||||
if ((*model)->NUMDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return (E_NOMOD);
|
||||
for (; *model; model = &((*model)->NUMDnextModel)) {
|
||||
if ((*model)->NUMDmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->NUMDnextModel; /* cut deleted device out of list */
|
||||
for (inst = (*model)->NUMDinstances; inst; inst = inst->NUMDnextInstance) {
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->NUMDnextModel; /* cut deleted device out of list */
|
||||
for (inst = (*model)->NUMDinstances; inst; inst = inst->NUMDnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = inst;
|
||||
}
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = inst;
|
||||
}
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
FREE(*model);
|
||||
return (OK);
|
||||
FREE(prev);
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**********
|
||||
Copyright 1992 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
**********/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
|
|
@ -8,33 +8,35 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
NUMD2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NUMD2model **model = (NUMD2model **) inModel;
|
||||
NUMD2model *modfast = (NUMD2model *) kill;
|
||||
NUMD2instance *inst;
|
||||
NUMD2instance *prev = NULL;
|
||||
NUMD2model **oldmod;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NUMD2nextModel)) {
|
||||
if ((*model)->NUMD2modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
NUMD2model **model = (NUMD2model **) inModel;
|
||||
NUMD2model *modfast = (NUMD2model *) kill;
|
||||
NUMD2instance *inst;
|
||||
NUMD2instance *prev = NULL;
|
||||
NUMD2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
}
|
||||
return (E_NOMOD);
|
||||
for (; *model; model = &((*model)->NUMD2nextModel)) {
|
||||
if ((*model)->NUMD2modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->NUMD2nextModel; /* cut deleted device out of list */
|
||||
for (inst = (*model)->NUMD2instances; inst; inst = inst->NUMD2nextInstance) {
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->NUMD2nextModel; /* cut deleted device out of list */
|
||||
for (inst = (*model)->NUMD2instances; inst; inst = inst->NUMD2nextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = inst;
|
||||
}
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = inst;
|
||||
}
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
FREE(*model);
|
||||
return (OK);
|
||||
|
||||
FREE(prev);
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/**********
|
||||
Copyright 1991 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
||||
**********/
|
||||
|
||||
/*
|
||||
|
|
@ -13,27 +13,28 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
NUMOSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NUMOSmodel **model = (NUMOSmodel **) inModel;
|
||||
NUMOSmodel *modfast = (NUMOSmodel *) kill;
|
||||
NUMOSmodel **oldmod;
|
||||
|
||||
NUMOSmodel **model = (NUMOSmodel **) inModel;
|
||||
NUMOSmodel *modfast = (NUMOSmodel *) kill;
|
||||
NUMOSmodel **oldmod;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NUMOSnextModel)) {
|
||||
if ((*model)->NUMOSmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return (E_NOMOD);
|
||||
for (; *model; model = &((*model)->NUMOSnextModel)) {
|
||||
if ((*model)->NUMOSmodName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
||||
delgot:
|
||||
if ((*model)->NUMOSinstances)
|
||||
return (E_NOTEMPTY);
|
||||
*oldmod = (*model)->NUMOSnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return (OK);
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->NUMOSinstances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->NUMOSnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,27 +12,28 @@ Modified: Apr 2000 - Paolo Nenzi
|
|||
int
|
||||
RESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
RESmodel **model = (RESmodel **)inModel;
|
||||
RESmodel *modfast = (RESmodel *)kill;
|
||||
RESmodel **model = (RESmodel **) inModel;
|
||||
RESmodel *modfast = (RESmodel *) kill;
|
||||
RESinstance *here;
|
||||
RESinstance *prev = NULL;
|
||||
RESmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->RESnextModel)) {
|
||||
if( (*model)->RESmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->RESnextModel)) {
|
||||
if ((*model)->RESmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->RESnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->RESinstances ; here ; here = here->RESnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->RESinstances; here; here = here->RESnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards
|
|||
Acknowledgements : Rupert Howes and Pete Mole.
|
||||
**********/
|
||||
|
||||
/**********
|
||||
Modified by Paolo Nenzi 2002
|
||||
ngspice integration
|
||||
/**********
|
||||
Modified by Paolo Nenzi 2002
|
||||
ngspice integration
|
||||
**********/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
|
|
@ -29,27 +29,28 @@ ngspice integration
|
|||
int
|
||||
SOI3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
SOI3model **model = (SOI3model **)inModel;
|
||||
SOI3model *modfast = (SOI3model *)kill;
|
||||
SOI3model **model = (SOI3model **) inModel;
|
||||
SOI3model *modfast = (SOI3model *) kill;
|
||||
SOI3instance *here;
|
||||
SOI3instance *prev = NULL;
|
||||
SOI3model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->SOI3nextModel)) {
|
||||
if( (*model)->SOI3modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->SOI3nextModel)) {
|
||||
if ((*model)->SOI3modName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->SOI3nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->SOI3instances ; here ; here = here->SOI3nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->SOI3instances; here; here = here->SOI3nextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Gordon Jacobs
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "swdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Gordon Jacobs
|
|||
int
|
||||
SWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
SWmodel **model = (SWmodel **)inModel;
|
||||
SWmodel *modfast = (SWmodel *)kill;
|
||||
SWmodel **model = (SWmodel **) inModel;
|
||||
SWmodel *modfast = (SWmodel *) kill;
|
||||
SWinstance *here;
|
||||
SWinstance *prev = NULL;
|
||||
SWmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->SWnextModel)) {
|
||||
if( (*model)->SWmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->SWnextModel)) {
|
||||
if ((*model)->SWmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->SWnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->SWinstances ; here ; here = here->SWnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->SWinstances; here; here = here->SWnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "tradefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
TRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
TRAmodel **model = (TRAmodel **)inModel;
|
||||
TRAmodel *modfast = (TRAmodel *)kill;
|
||||
TRAmodel **model = (TRAmodel **) inModel;
|
||||
TRAmodel *modfast = (TRAmodel *) kill;
|
||||
TRAinstance *here;
|
||||
TRAinstance *prev = NULL;
|
||||
TRAmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->TRAnextModel)) {
|
||||
if( (*model)->TRAmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->TRAnextModel)) {
|
||||
if ((*model)->TRAmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->TRAnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->TRAinstances ; here ; here = here->TRAnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->TRAinstances; here; here = here->TRAnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ reserved.
|
|||
Author: 1992 Charles Hough
|
||||
**********/
|
||||
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "txldefs.h"
|
||||
#include "ngspice/sperror.h"
|
||||
|
|
@ -14,28 +13,28 @@ Author: 1992 Charles Hough
|
|||
int
|
||||
TXLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
TXLmodel **model = (TXLmodel **)inModel;
|
||||
TXLmodel *modfast = (TXLmodel *)kill;
|
||||
TXLmodel **model = (TXLmodel **) inModel;
|
||||
TXLmodel *modfast = (TXLmodel *) kill;
|
||||
TXLinstance *here;
|
||||
TXLinstance *prev = NULL;
|
||||
TXLmodel **oldmod;
|
||||
oldmod = model;
|
||||
|
||||
for( ; *model ; model = &((*model)->TXLnextModel)) {
|
||||
if( (*model)->TXLmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->TXLnextModel)) {
|
||||
if ((*model)->TXLmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->TXLnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->TXLinstances ; here ; here = here->TXLnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->TXLinstances; here; here = here->TXLnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1987 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "urcdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1987 Thomas L. Quarles
|
|||
int
|
||||
URCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
URCmodel **model = (URCmodel**)inModel;
|
||||
URCmodel *modfast = (URCmodel *)kill;
|
||||
URCmodel **model = (URCmodel **) inModel;
|
||||
URCmodel *modfast = (URCmodel *) kill;
|
||||
URCinstance *here;
|
||||
URCinstance *prev = NULL;
|
||||
URCmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->URCnextModel)) {
|
||||
if( (*model)->URCmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->URCnextModel)) {
|
||||
if ((*model)->URCmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->URCnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->URCinstances ; here ; here = here->URCnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->URCinstances; here; here = here->URCnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH
|
|||
int
|
||||
VBICmDelete(GENmodel **inModels, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
VBICmodel **model = (VBICmodel**)inModels;
|
||||
VBICmodel *modfast = (VBICmodel*)kill;
|
||||
|
||||
VBICmodel **model = (VBICmodel **) inModels;
|
||||
VBICmodel *modfast = (VBICmodel *) kill;
|
||||
VBICmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->VBICnextModel)) {
|
||||
if( (*model)->VBICmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->VBICnextModel)) {
|
||||
if ((*model)->VBICmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
if( (*model)->VBICinstances ) return(E_NOTEMPTY);
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->VBICinstances) return E_NOTEMPTY;
|
||||
*oldmod = (*model)->VBICnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "vccsdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
VCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
VCCSmodel **model = (VCCSmodel **)inModel;
|
||||
VCCSmodel *modfast = (VCCSmodel *)kill;
|
||||
VCCSmodel **model = (VCCSmodel **) inModel;
|
||||
VCCSmodel *modfast = (VCCSmodel *) kill;
|
||||
VCCSinstance *here;
|
||||
VCCSinstance *prev = NULL;
|
||||
VCCSmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->VCCSnextModel)) {
|
||||
if( (*model)->VCCSmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->VCCSnextModel)) {
|
||||
if ((*model)->VCCSmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->VCCSnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->VCCSinstances ; here ; here = here->VCCSnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->VCCSinstances; here; here = here->VCCSnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "vcvsdefs.h"
|
||||
|
|
@ -14,27 +12,28 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
VCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
VCVSmodel **model = (VCVSmodel**)inModel;
|
||||
VCVSmodel *modfast = (VCVSmodel *)kill;
|
||||
VCVSmodel **model = (VCVSmodel **) inModel;
|
||||
VCVSmodel *modfast = (VCVSmodel *) kill;
|
||||
VCVSinstance *here;
|
||||
VCVSinstance *prev = NULL;
|
||||
VCVSmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->VCVSnextModel)) {
|
||||
if( (*model)->VCVSmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->VCVSnextModel)) {
|
||||
if ((*model)->VCVSmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->VCVSnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->VCVSinstances ; here ; here = here->VCVSnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->VCVSinstances; here; here = here->VCVSnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "vsrcdefs.h"
|
||||
|
|
@ -19,22 +17,23 @@ VSRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *fast)
|
|||
VSRCinstance *here;
|
||||
VSRCinstance *prev = NULL;
|
||||
VSRCmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->VSRCnextModel)) {
|
||||
if( (*model)->VSRCmodName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
for (; *model; model = &((*model)->VSRCnextModel)) {
|
||||
if ((*model)->VSRCmodName == modname ||
|
||||
(modfast && *model == modfast)) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->VSRCnextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->VSRCinstances ; here ; here = here->VSRCnextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
for (here = (*model)->VSRCinstances; here; here = here->VSRCnextInstance) {
|
||||
if (prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
if (prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue