devices/**/XXXmdel.c, use GENmodel and GENinstance
This commit is contained in:
parent
a0e8c91d89
commit
12dfa082ce
|
|
@ -10,17 +10,15 @@ Author: 1987 Kanwar Jit Singh
|
|||
|
||||
|
||||
int
|
||||
ASRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
ASRCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
ASRCmodel **model = (ASRCmodel **) inModel;
|
||||
ASRCmodel *modfast = (ASRCmodel *) kill;
|
||||
ASRCinstance *here;
|
||||
ASRCinstance *prev = NULL;
|
||||
ASRCmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->ASRCnextModel)) {
|
||||
if ((*model)->ASRCmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -29,10 +27,10 @@ ASRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
|
||||
delgot:
|
||||
|
||||
*oldmod = (*model)->ASRCnextModel; /* cut deleted device out of list */
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
|
||||
for (here = (*model)->ASRCinstances; here; here = here->ASRCnextInstance) {
|
||||
FREE(here->ASRCacValues);
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
FREE(((ASRCinstance*)here)->ASRCacValues);
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -16,15 +16,13 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
BJTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BJTmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BJTmodel **model = (BJTmodel **) inModel;
|
||||
BJTmodel *modfast = (BJTmodel *) kill;
|
||||
BJTmodel **oldmod;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BJTnextModel)) {
|
||||
if ((*model)->BJTmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -32,9 +30,9 @@ BJTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->BJTinstances)
|
||||
if ((*model)->GENinstances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->BJTnextModel; /* cut deleted device out of list */
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Hong J. Park, Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
B1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
B1mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B1model **model = (B1model **) inModel;
|
||||
B1model *modfast = (B1model *) kill;
|
||||
B1instance *here;
|
||||
B1instance *prev = NULL;
|
||||
B1model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B1nextModel)) {
|
||||
if ((*model)->B1modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ B1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B1nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B1instances; here; here = here->B1nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Hong J. Park, Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
B2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
B2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B2model **model = (B2model **) inModel;
|
||||
B2model *modfast = (B2model *) kill;
|
||||
B2instance *here;
|
||||
B2instance *prev = NULL;
|
||||
B2model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B2nextModel)) {
|
||||
if ((*model)->B2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ B2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B2instances; here; here = here->B2nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -15,17 +15,15 @@
|
|||
|
||||
|
||||
int
|
||||
BSIM3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM3mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM3model **model = (BSIM3model **) inModel;
|
||||
BSIM3model *modfast = (BSIM3model *) kill;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance *prev = NULL;
|
||||
BSIM3model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3nextModel)) {
|
||||
if ((*model)->BSIM3modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -33,8 +31,8 @@ BSIM3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3instances; here; here = here->BSIM3nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -18,17 +18,15 @@ Modified by Paolo Nenzi 2002
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
B3SOIDDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIDDmodel **model = (B3SOIDDmodel **) inModel;
|
||||
B3SOIDDmodel *modfast = (B3SOIDDmodel *) kill;
|
||||
B3SOIDDinstance *here;
|
||||
B3SOIDDinstance *prev = NULL;
|
||||
B3SOIDDmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B3SOIDDnextModel)) {
|
||||
if ((*model)->B3SOIDDmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -36,8 +34,8 @@ B3SOIDDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B3SOIDDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -17,17 +17,15 @@ File: b3soifdmdel.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
B3SOIFDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIFDmodel **model = (B3SOIFDmodel **) inModel;
|
||||
B3SOIFDmodel *modfast = (B3SOIFDmodel *) kill;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDinstance *prev = NULL;
|
||||
B3SOIFDmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B3SOIFDnextModel)) {
|
||||
if ((*model)->B3SOIFDmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -35,8 +33,8 @@ B3SOIFDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B3SOIFDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -17,17 +17,15 @@ Modified by Paolo Nenzi 2002
|
|||
|
||||
|
||||
int
|
||||
B3SOIPDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
B3SOIPDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIPDmodel **model = (B3SOIPDmodel **) inModel;
|
||||
B3SOIPDmodel *modfast = (B3SOIPDmodel *) kill;
|
||||
B3SOIPDinstance *here;
|
||||
B3SOIPDinstance *prev = NULL;
|
||||
B3SOIPDmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B3SOIPDnextModel)) {
|
||||
if ((*model)->B3SOIPDmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -35,8 +33,8 @@ B3SOIPDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B3SOIPDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -11,17 +11,15 @@ File: b3v0mdel.c
|
|||
|
||||
|
||||
int
|
||||
BSIM3v0mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM3v0mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM3v0model **model = (BSIM3v0model **) inModel;
|
||||
BSIM3v0model *modfast = (BSIM3v0model *) kill;
|
||||
BSIM3v0instance *here;
|
||||
BSIM3v0instance *prev = NULL;
|
||||
BSIM3v0model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3v0nextModel)) {
|
||||
if ((*model)->BSIM3v0modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -29,8 +27,8 @@ BSIM3v0mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3v0nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3v0instances; here; here = here->BSIM3v0nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -17,17 +17,15 @@
|
|||
|
||||
|
||||
int
|
||||
BSIM3v1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM3v1mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM3v1model **model = (BSIM3v1model **) inModel;
|
||||
BSIM3v1model *modfast = (BSIM3v1model *) kill;
|
||||
BSIM3v1instance *here;
|
||||
BSIM3v1instance *prev = NULL;
|
||||
BSIM3v1model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3v1nextModel)) {
|
||||
if ((*model)->BSIM3v1modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -35,8 +33,8 @@ BSIM3v1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3v1nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3v1instances; here; here = here->BSIM3v1nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -16,17 +16,15 @@
|
|||
|
||||
|
||||
int
|
||||
BSIM3v32mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM3v32mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM3v32model **model = (BSIM3v32model **) inModel;
|
||||
BSIM3v32model *modfast = (BSIM3v32model *) kill;
|
||||
BSIM3v32instance *here;
|
||||
BSIM3v32instance *prev = NULL;
|
||||
BSIM3v32model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3v32nextModel)) {
|
||||
if ((*model)->BSIM3v32modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -34,8 +32,8 @@ BSIM3v32mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3v32nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -65,17 +65,15 @@
|
|||
|
||||
|
||||
int
|
||||
BSIM4mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM4mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM4model **model = (BSIM4model **) inModel;
|
||||
BSIM4model *modfast = (BSIM4model *) kill;
|
||||
BSIM4instance *here;
|
||||
BSIM4instance *prev = NULL;
|
||||
BSIM4model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4nextModel)) {
|
||||
if ((*model)->BSIM4modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -83,8 +81,8 @@ BSIM4mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4instances; here; here = here->BSIM4nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -15,17 +15,15 @@
|
|||
|
||||
|
||||
int
|
||||
BSIM4v5mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM4v5mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM4v5model **model = (BSIM4v5model **) inModel;
|
||||
BSIM4v5model *modfast = (BSIM4v5model *) kill;
|
||||
BSIM4v5instance *here;
|
||||
BSIM4v5instance *prev = NULL;
|
||||
BSIM4v5model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4v5nextModel)) {
|
||||
if ((*model)->BSIM4v5modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -33,8 +31,8 @@ BSIM4v5mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4v5nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -17,17 +17,15 @@
|
|||
|
||||
|
||||
int
|
||||
BSIM4v6mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM4v6mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM4v6model **model = (BSIM4v6model **) inModel;
|
||||
BSIM4v6model *modfast = (BSIM4v6model *) kill;
|
||||
BSIM4v6instance *here;
|
||||
BSIM4v6instance *prev = NULL;
|
||||
BSIM4v6model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4v6nextModel)) {
|
||||
if ((*model)->BSIM4v6modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -35,8 +33,8 @@ BSIM4v6mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4v6nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4v6instances; here; here = here->BSIM4v6nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -17,17 +17,15 @@
|
|||
|
||||
|
||||
int
|
||||
BSIM4v7mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
BSIM4v7mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
BSIM4v7model **model = (BSIM4v7model **) inModel;
|
||||
BSIM4v7model *modfast = (BSIM4v7model *) kill;
|
||||
BSIM4v7instance *here;
|
||||
BSIM4v7instance *prev = NULL;
|
||||
BSIM4v7model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM4v7nextModel)) {
|
||||
if ((*model)->BSIM4v7modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -35,8 +33,8 @@ BSIM4v7mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM4v7nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM4v7instances; here; here = here->BSIM4v7nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -21,17 +21,15 @@
|
|||
|
||||
|
||||
int
|
||||
B4SOImDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
B4SOImDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B4SOImodel **model = (B4SOImodel **) inModel;
|
||||
B4SOImodel *modfast = (B4SOImodel *) kill;
|
||||
B4SOIinstance *here;
|
||||
B4SOIinstance *prev = NULL;
|
||||
B4SOImodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->B4SOInextModel)) {
|
||||
if ((*model)->B4SOImodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -39,8 +37,8 @@ B4SOImDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->B4SOInextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->B4SOIinstances; here; here = here->B4SOInextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -11,17 +11,15 @@ Modified: Spetember 2003 Paolo Nenzi
|
|||
|
||||
|
||||
int
|
||||
CAPmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
CAPmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CAPmodel *modfast = (CAPmodel *) kill;
|
||||
CAPmodel **model = (CAPmodel **) inModel;
|
||||
CAPinstance *here;
|
||||
CAPinstance *prev = NULL;
|
||||
CAPmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->CAPnextModel)) {
|
||||
if ((*model)->CAPmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -29,8 +27,8 @@ CAPmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CAPnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->CAPinstances; here; here = here->CAPnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
CCCSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CCCSmodel **model = (CCCSmodel **) inModel;
|
||||
CCCSmodel *modfast = (CCCSmodel *) kill;
|
||||
CCCSinstance *here;
|
||||
CCCSinstance *prev = NULL;
|
||||
CCCSmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->CCCSnextModel)) {
|
||||
if ((*model)->CCCSmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ CCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CCCSnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->CCCSinstances; here; here = here->CCCSnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
CCVSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CCVSmodel **model = (CCVSmodel **) inModel;
|
||||
CCVSmodel *modfast = (CCVSmodel *) kill;
|
||||
CCVSinstance *here;
|
||||
CCVSinstance *prev = NULL;
|
||||
CCVSmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->CCVSnextModel)) {
|
||||
if ((*model)->CCVSmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ CCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CCVSnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->CCVSinstances; here; here = here->CCVSnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -12,17 +12,15 @@ Author: 1992 Charles Hough
|
|||
|
||||
|
||||
int
|
||||
CPLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
CPLmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CPLmodel **model = (CPLmodel **) inModel;
|
||||
CPLmodel *modfast = (CPLmodel *) kill;
|
||||
CPLinstance *here;
|
||||
CPLinstance *prev = NULL;
|
||||
CPLmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->CPLnextModel)) {
|
||||
if ((*model)->CPLmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -30,8 +28,8 @@ CPLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CPLnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->CPLinstances; here; here = here->CPLnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Gordon Jacobs
|
|||
|
||||
|
||||
int
|
||||
CSWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
CSWmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
CSWmodel **model = (CSWmodel **) inModel;
|
||||
CSWmodel *modfast = (CSWmodel *) kill;
|
||||
CSWinstance *here;
|
||||
CSWinstance *prev = NULL;
|
||||
CSWmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->CSWnextModel)) {
|
||||
if ((*model)->CSWmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ CSWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->CSWnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->CSWinstances; here; here = here->CSWnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
DIOmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
DIOmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
DIOmodel **model = (DIOmodel **) inModel;
|
||||
DIOmodel *modfast = (DIOmodel *) kill;
|
||||
DIOinstance *here;
|
||||
DIOinstance *prev = NULL;
|
||||
DIOmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->DIOnextModel)) {
|
||||
if ((*model)->DIOmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ DIOmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->DIOnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->DIOinstances; here; here = here->DIOnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -14,17 +14,15 @@ Author: 1985 S. Hwang
|
|||
|
||||
|
||||
int
|
||||
HFETAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
HFETAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
HFETAmodel **model = (HFETAmodel **) inModel;
|
||||
HFETAmodel *modfast = (HFETAmodel *) kill;
|
||||
HFETAinstance *here;
|
||||
HFETAinstance *prev = NULL;
|
||||
HFETAmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->HFETAnextModel)) {
|
||||
if ((*model)->HFETAmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -32,8 +30,8 @@ HFETAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HFETAnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HFETAinstances; here; here = here->HFETAnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -14,17 +14,15 @@ Author: 1985 S. Hwang
|
|||
|
||||
|
||||
int
|
||||
HFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
HFET2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
HFET2model **model = (HFET2model **) inModel;
|
||||
HFET2model *modfast = (HFET2model *) kill;
|
||||
HFET2instance *here;
|
||||
HFET2instance *prev = NULL;
|
||||
HFET2model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->HFET2nextModel)) {
|
||||
if ((*model)->HFET2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -32,8 +30,8 @@ HFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HFET2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HFET2instances; here; here = here->HFET2nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -61,17 +61,15 @@ to others."
|
|||
|
||||
|
||||
int
|
||||
HSM2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
HSM2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
HSM2model **model = (HSM2model **) inModel;
|
||||
HSM2model *modfast = (HSM2model *) kill;
|
||||
HSM2instance *here;
|
||||
HSM2instance *prev = NULL;
|
||||
HSM2model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->HSM2nextModel)) {
|
||||
if ((*model)->HSM2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -79,8 +77,8 @@ HSM2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HSM2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HSM2instances; here; here = here->HSM2nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -22,17 +22,15 @@
|
|||
|
||||
|
||||
int
|
||||
HSMHVmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
HSMHVmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
HSMHVmodel **model = (HSMHVmodel **) inModel;
|
||||
HSMHVmodel *modfast = (HSMHVmodel *) kill;
|
||||
HSMHVinstance *here;
|
||||
HSMHVinstance *prev = NULL;
|
||||
HSMHVmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->HSMHVnextModel)) {
|
||||
if ((*model)->HSMHVmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -40,8 +38,8 @@ HSMHVmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HSMHVnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HSMHVinstances; here; here = here->HSMHVnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -64,17 +64,15 @@ June 2008 (revised October 2011)
|
|||
|
||||
|
||||
int
|
||||
HSMHV2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
HSMHV2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
HSMHV2model **model = (HSMHV2model **) inModel;
|
||||
HSMHV2model *modfast = (HSMHV2model *) kill;
|
||||
HSMHV2instance *here;
|
||||
HSMHV2instance *prev = NULL;
|
||||
HSMHV2model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->HSMHV2nextModel)) {
|
||||
if ((*model)->HSMHV2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -82,8 +80,8 @@ HSMHV2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->HSMHV2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->HSMHV2instances; here; here = here->HSMHV2nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
INDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
INDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
INDmodel **model = (INDmodel **) inModel;
|
||||
INDmodel *modfast = (INDmodel *) kill;
|
||||
INDinstance *here;
|
||||
INDinstance *prev = NULL;
|
||||
INDmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->INDnextModel)) {
|
||||
if ((*model)->INDmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ INDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->INDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->INDinstances; here; here = here->INDnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -11,17 +11,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
#ifdef MUTUAL
|
||||
int
|
||||
MUTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
MUTmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MUTmodel **model = (MUTmodel **) inModel;
|
||||
MUTmodel *modfast = (MUTmodel *) kill;
|
||||
MUTinstance *here;
|
||||
MUTinstance *prev = NULL;
|
||||
MUTmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->MUTnextModel)) {
|
||||
if ((*model)->MUTmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -29,8 +27,8 @@ MUTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MUTnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->MUTinstances; here; here = here->MUTnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
ISRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
ISRCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
ISRCmodel **model = (ISRCmodel **) inModel;
|
||||
ISRCmodel *modfast = (ISRCmodel *) kill;
|
||||
ISRCinstance *here;
|
||||
ISRCinstance *prev = NULL;
|
||||
ISRCmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->ISRCnextModel)) {
|
||||
if ((*model)->ISRCmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ ISRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->ISRCnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->ISRCinstances; here; here = here->ISRCnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
JFETmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
JFETmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
JFETmodel **model = (JFETmodel **) inModel;
|
||||
JFETmodel *modfast = (JFETmodel *) kill;
|
||||
JFETinstance *here;
|
||||
JFETinstance *prev = NULL;
|
||||
JFETmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->JFETnextModel)) {
|
||||
if ((*model)->JFETmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ JFETmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->JFETnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->JFETinstances; here; here = here->JFETnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -14,17 +14,15 @@ Modified to jfet2 for PS model definition ( Anthony E. Parker )
|
|||
|
||||
|
||||
int
|
||||
JFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
JFET2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
JFET2model **model = (JFET2model **) inModel;
|
||||
JFET2model *modfast = (JFET2model *) kill;
|
||||
JFET2instance *here;
|
||||
JFET2instance *prev = NULL;
|
||||
JFET2model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->JFET2nextModel)) {
|
||||
if ((*model)->JFET2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -32,8 +30,8 @@ JFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->JFET2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->JFET2instances; here; here = here->JFET2nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
|
||||
|
||||
int
|
||||
LTRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
LTRAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
LTRAmodel **model = (LTRAmodel **) inModel;
|
||||
LTRAmodel *modfast = (LTRAmodel *) kill;
|
||||
LTRAinstance *here;
|
||||
LTRAinstance *prev = NULL;
|
||||
LTRAmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->LTRAnextModel)) {
|
||||
if ((*model)->LTRAmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ LTRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->LTRAnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->LTRAinstances; here; here = here->LTRAnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 S. Hwang
|
|||
|
||||
|
||||
int
|
||||
MESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
MESmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MESmodel **model = (MESmodel **) inModel;
|
||||
MESmodel *modfast = (MESmodel *) kill;
|
||||
MESinstance *here;
|
||||
MESinstance *prev = NULL;
|
||||
MESmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->MESnextModel)) {
|
||||
if ((*model)->MESmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ MESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MESnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->MESinstances; here; here = here->MESnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -14,17 +14,15 @@ Author: 1985 S. Hwang
|
|||
|
||||
|
||||
int
|
||||
MESAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
MESAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MESAmodel **model = (MESAmodel **) inModel;
|
||||
MESAmodel *modfast = (MESAmodel *) kill;
|
||||
MESAinstance *here;
|
||||
MESAinstance *prev = NULL;
|
||||
MESAmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->MESAnextModel)) {
|
||||
if ((*model)->MESAmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -32,8 +30,8 @@ MESAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MESAnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->MESAinstances; here; here = here->MESAnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
MOS1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
MOS1mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS1model **model = (MOS1model **) inModel;
|
||||
MOS1model *modfast = (MOS1model *) kill;
|
||||
MOS1instance *here;
|
||||
MOS1instance *prev = NULL;
|
||||
MOS1model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->MOS1nextModel)) {
|
||||
if ((*model)->MOS1modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ MOS1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS1nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->MOS1instances; here; here = here->MOS1nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
MOS2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
MOS2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS2model **model = (MOS2model **) inModel;
|
||||
MOS2model *modfast = (MOS2model *) kill;
|
||||
MOS2instance *here;
|
||||
MOS2instance *prev = NULL;
|
||||
MOS2model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->MOS2nextModel)) {
|
||||
if ((*model)->MOS2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ MOS2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->MOS2instances; here; here = here->MOS2nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
MOS3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
MOS3mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS3model **model = (MOS3model **) inModel;
|
||||
MOS3model *modfast = (MOS3model *) kill;
|
||||
MOS3instance *here;
|
||||
MOS3instance *prev = NULL;
|
||||
MOS3model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->MOS3nextModel)) {
|
||||
if ((*model)->MOS3modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ MOS3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS3nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->MOS3instances; here; here = here->MOS3nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -11,17 +11,15 @@ Modified: Alan Gillespie
|
|||
|
||||
|
||||
int
|
||||
MOS9mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
MOS9mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS9model **model = (MOS9model **) inModel;
|
||||
MOS9model *modfast = (MOS9model *) kill;
|
||||
MOS9instance *here;
|
||||
MOS9instance *prev = NULL;
|
||||
MOS9model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->MOS9nextModel)) {
|
||||
if ((*model)->MOS9modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -29,8 +27,8 @@ MOS9mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS9nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->MOS9instances; here; here = here->MOS9nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -15,15 +15,13 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
|
||||
int
|
||||
NBJTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
NBJTmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NBJTmodel **model = (NBJTmodel **) inModel;
|
||||
NBJTmodel *modfast = (NBJTmodel *) kill;
|
||||
NBJTmodel **oldmod;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NBJTnextModel)) {
|
||||
if ((*model)->NBJTmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -31,9 +29,9 @@ NBJTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->NBJTinstances)
|
||||
if ((*model)->GENinstances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->NBJTnextModel; /* cut deleted device out of list */
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,15 +15,13 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
|
||||
int
|
||||
NBJT2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
NBJT2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NBJT2model **model = (NBJT2model **) inModel;
|
||||
NBJT2model *modfast = (NBJT2model *) kill;
|
||||
NBJT2model **oldmod;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NBJT2nextModel)) {
|
||||
if ((*model)->NBJT2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -31,9 +29,9 @@ NBJT2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->NBJT2instances)
|
||||
if ((*model)->GENinstances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->NBJT2nextModel; /* cut deleted device out of list */
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
|
||||
int
|
||||
NDEVmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
NDEVmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NG_IGNORE(inModel);
|
||||
NG_IGNORE(model);
|
||||
NG_IGNORE(modname);
|
||||
NG_IGNORE(kill);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
|
||||
int
|
||||
NUMDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
NUMDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NUMDmodel **model = (NUMDmodel **) inModel;
|
||||
NUMDmodel *modfast = (NUMDmodel *) kill;
|
||||
NUMDinstance *here;
|
||||
NUMDinstance *prev = NULL;
|
||||
NUMDmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NUMDnextModel)) {
|
||||
if ((*model)->NUMDmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ NUMDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->NUMDnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->NUMDinstances; here; here = here->NUMDnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
|
||||
int
|
||||
NUMD2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
NUMD2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NUMD2model **model = (NUMD2model **) inModel;
|
||||
NUMD2model *modfast = (NUMD2model *) kill;
|
||||
NUMD2instance *here;
|
||||
NUMD2instance *prev = NULL;
|
||||
NUMD2model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NUMD2nextModel)) {
|
||||
if ((*model)->NUMD2modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ NUMD2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->NUMD2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->NUMD2instances; here; here = here->NUMD2nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -15,15 +15,13 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
|
||||
int
|
||||
NUMOSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
NUMOSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
NUMOSmodel **model = (NUMOSmodel **) inModel;
|
||||
NUMOSmodel *modfast = (NUMOSmodel *) kill;
|
||||
NUMOSmodel **oldmod;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->NUMOSnextModel)) {
|
||||
if ((*model)->NUMOSmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -31,9 +29,9 @@ NUMOSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->NUMOSinstances)
|
||||
if ((*model)->GENinstances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->NUMOSnextModel; /* cut deleted device out of list */
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Modified: Apr 2000 - Paolo Nenzi
|
|||
|
||||
|
||||
int
|
||||
RESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
RESmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
RESmodel **model = (RESmodel **) inModel;
|
||||
RESmodel *modfast = (RESmodel *) kill;
|
||||
RESinstance *here;
|
||||
RESinstance *prev = NULL;
|
||||
RESmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->RESnextModel)) {
|
||||
if ((*model)->RESmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ RESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->RESnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->RESinstances; here; here = here->RESnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -27,17 +27,15 @@ Acknowledgements : Rupert Howes and Pete Mole.
|
|||
|
||||
|
||||
int
|
||||
SOI3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
SOI3mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
SOI3model **model = (SOI3model **) inModel;
|
||||
SOI3model *modfast = (SOI3model *) kill;
|
||||
SOI3instance *here;
|
||||
SOI3instance *prev = NULL;
|
||||
SOI3model **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->SOI3nextModel)) {
|
||||
if ((*model)->SOI3modName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -45,8 +43,8 @@ SOI3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->SOI3nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->SOI3instances; here; here = here->SOI3nextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Gordon Jacobs
|
|||
|
||||
|
||||
int
|
||||
SWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
SWmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
SWmodel **model = (SWmodel **) inModel;
|
||||
SWmodel *modfast = (SWmodel *) kill;
|
||||
SWinstance *here;
|
||||
SWinstance *prev = NULL;
|
||||
SWmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->SWnextModel)) {
|
||||
if ((*model)->SWmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ SWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->SWnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->SWinstances; here; here = here->SWnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
TRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
TRAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
TRAmodel **model = (TRAmodel **) inModel;
|
||||
TRAmodel *modfast = (TRAmodel *) kill;
|
||||
TRAinstance *here;
|
||||
TRAinstance *prev = NULL;
|
||||
TRAmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->TRAnextModel)) {
|
||||
if ((*model)->TRAmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ TRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->TRAnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->TRAinstances; here; here = here->TRAnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -11,17 +11,15 @@ Author: 1992 Charles Hough
|
|||
|
||||
|
||||
int
|
||||
TXLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
TXLmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
TXLmodel **model = (TXLmodel **) inModel;
|
||||
TXLmodel *modfast = (TXLmodel *) kill;
|
||||
TXLinstance *here;
|
||||
TXLinstance *prev = NULL;
|
||||
TXLmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->TXLnextModel)) {
|
||||
if ((*model)->TXLmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -29,8 +27,8 @@ TXLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->TXLnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->TXLinstances; here; here = here->TXLnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1987 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
URCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
URCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
URCmodel **model = (URCmodel **) inModel;
|
||||
URCmodel *modfast = (URCmodel *) kill;
|
||||
URCinstance *here;
|
||||
URCinstance *prev = NULL;
|
||||
URCmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->URCnextModel)) {
|
||||
if ((*model)->URCmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ URCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->URCnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->URCinstances; here; here = here->URCnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -18,15 +18,13 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH
|
|||
|
||||
|
||||
int
|
||||
VBICmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
VBICmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
VBICmodel **model = (VBICmodel **) inModel;
|
||||
VBICmodel *modfast = (VBICmodel *) kill;
|
||||
VBICmodel **oldmod;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->VBICnextModel)) {
|
||||
if ((*model)->VBICmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -34,9 +32,9 @@ VBICmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
if ((*model)->VBICinstances)
|
||||
if ((*model)->GENinstances)
|
||||
return E_NOTEMPTY;
|
||||
*oldmod = (*model)->VBICnextModel; /* cut deleted device out of list */
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
FREE(*model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
VCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
VCCSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
VCCSmodel **model = (VCCSmodel **) inModel;
|
||||
VCCSmodel *modfast = (VCCSmodel *) kill;
|
||||
VCCSinstance *here;
|
||||
VCCSinstance *prev = NULL;
|
||||
VCCSmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->VCCSnextModel)) {
|
||||
if ((*model)->VCCSmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ VCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->VCCSnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->VCCSinstances; here; here = here->VCCSnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
VCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
VCVSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
VCVSmodel **model = (VCVSmodel **) inModel;
|
||||
VCVSmodel *modfast = (VCVSmodel *) kill;
|
||||
VCVSinstance *here;
|
||||
VCVSinstance *prev = NULL;
|
||||
VCVSmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->VCVSnextModel)) {
|
||||
if ((*model)->VCVSmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ VCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->VCVSnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->VCVSinstances; here; here = here->VCVSnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,15 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
VSRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
VSRCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
VSRCmodel **model = (VSRCmodel **) inModel;
|
||||
VSRCmodel *modfast = (VSRCmodel *) kill;
|
||||
VSRCinstance *here;
|
||||
VSRCinstance *prev = NULL;
|
||||
VSRCmodel **oldmod;
|
||||
GENinstance *here;
|
||||
GENinstance *prev = NULL;
|
||||
GENmodel **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->VSRCnextModel)) {
|
||||
if ((*model)->VSRCmodName == modname || (modfast && *model == modfast))
|
||||
for (; *model; model = &((*model)->GENnextModel)) {
|
||||
if ((*model)->GENmodName == modname || (kill && *model == kill))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
|
|
@ -28,8 +26,8 @@ VSRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
|||
return E_NOMOD;
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->VSRCnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->VSRCinstances; here; here = here->VSRCnextInstance) {
|
||||
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->GENinstances; here; here = here->GENnextInstance) {
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
Loading…
Reference in New Issue