diff --git a/src/spicelib/devices/asrc/asrcmdel.c b/src/spicelib/devices/asrc/asrcmdel.c index 280c69c54..b3c947798 100644 --- a/src/spicelib/devices/asrc/asrcmdel.c +++ b/src/spicelib/devices/asrc/asrcmdel.c @@ -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; diff --git a/src/spicelib/devices/bjt/bjtmdel.c b/src/spicelib/devices/bjt/bjtmdel.c index 6e7f86abb..58e5b1f84 100644 --- a/src/spicelib/devices/bjt/bjtmdel.c +++ b/src/spicelib/devices/bjt/bjtmdel.c @@ -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; } diff --git a/src/spicelib/devices/bsim1/b1mdel.c b/src/spicelib/devices/bsim1/b1mdel.c index 7670ab6a1..dd702a7ae 100644 --- a/src/spicelib/devices/bsim1/b1mdel.c +++ b/src/spicelib/devices/bsim1/b1mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim2/b2mdel.c b/src/spicelib/devices/bsim2/b2mdel.c index c085fabad..dc7fd3ab0 100644 --- a/src/spicelib/devices/bsim2/b2mdel.c +++ b/src/spicelib/devices/bsim2/b2mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim3/b3mdel.c b/src/spicelib/devices/bsim3/b3mdel.c index 37a4d56f0..e07950825 100644 --- a/src/spicelib/devices/bsim3/b3mdel.c +++ b/src/spicelib/devices/bsim3/b3mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim3soi_dd/b3soiddmdel.c b/src/spicelib/devices/bsim3soi_dd/b3soiddmdel.c index 02e08bcdf..88dcbeaa0 100644 --- a/src/spicelib/devices/bsim3soi_dd/b3soiddmdel.c +++ b/src/spicelib/devices/bsim3soi_dd/b3soiddmdel.c @@ -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; diff --git a/src/spicelib/devices/bsim3soi_fd/b3soifdmdel.c b/src/spicelib/devices/bsim3soi_fd/b3soifdmdel.c index b13fb8686..8a0813c5e 100644 --- a/src/spicelib/devices/bsim3soi_fd/b3soifdmdel.c +++ b/src/spicelib/devices/bsim3soi_fd/b3soifdmdel.c @@ -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; diff --git a/src/spicelib/devices/bsim3soi_pd/b3soipdmdel.c b/src/spicelib/devices/bsim3soi_pd/b3soipdmdel.c index 68e4de0b1..df1e74ec7 100644 --- a/src/spicelib/devices/bsim3soi_pd/b3soipdmdel.c +++ b/src/spicelib/devices/bsim3soi_pd/b3soipdmdel.c @@ -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; diff --git a/src/spicelib/devices/bsim3v0/b3v0mdel.c b/src/spicelib/devices/bsim3v0/b3v0mdel.c index 297391447..f400a8ef7 100644 --- a/src/spicelib/devices/bsim3v0/b3v0mdel.c +++ b/src/spicelib/devices/bsim3v0/b3v0mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim3v1/b3v1mdel.c b/src/spicelib/devices/bsim3v1/b3v1mdel.c index 9b1d9dbff..6faf2bc9b 100644 --- a/src/spicelib/devices/bsim3v1/b3v1mdel.c +++ b/src/spicelib/devices/bsim3v1/b3v1mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim3v32/b3v32mdel.c b/src/spicelib/devices/bsim3v32/b3v32mdel.c index c4222705e..6aeb40903 100644 --- a/src/spicelib/devices/bsim3v32/b3v32mdel.c +++ b/src/spicelib/devices/bsim3v32/b3v32mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim4/b4mdel.c b/src/spicelib/devices/bsim4/b4mdel.c index 0f3b54d92..8ece1c5d1 100644 --- a/src/spicelib/devices/bsim4/b4mdel.c +++ b/src/spicelib/devices/bsim4/b4mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim4v5/b4v5mdel.c b/src/spicelib/devices/bsim4v5/b4v5mdel.c index e10231b4b..8a4166c8e 100644 --- a/src/spicelib/devices/bsim4v5/b4v5mdel.c +++ b/src/spicelib/devices/bsim4v5/b4v5mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim4v6/b4v6mdel.c b/src/spicelib/devices/bsim4v6/b4v6mdel.c index afa655153..e5652e31e 100644 --- a/src/spicelib/devices/bsim4v6/b4v6mdel.c +++ b/src/spicelib/devices/bsim4v6/b4v6mdel.c @@ -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; diff --git a/src/spicelib/devices/bsim4v7/b4v7mdel.c b/src/spicelib/devices/bsim4v7/b4v7mdel.c index 0cbdb4510..6b5bfb950 100644 --- a/src/spicelib/devices/bsim4v7/b4v7mdel.c +++ b/src/spicelib/devices/bsim4v7/b4v7mdel.c @@ -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; diff --git a/src/spicelib/devices/bsimsoi/b4soimdel.c b/src/spicelib/devices/bsimsoi/b4soimdel.c index 0e74aee81..69e7ebea7 100644 --- a/src/spicelib/devices/bsimsoi/b4soimdel.c +++ b/src/spicelib/devices/bsimsoi/b4soimdel.c @@ -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; diff --git a/src/spicelib/devices/cap/capmdel.c b/src/spicelib/devices/cap/capmdel.c index 57969bb61..719f91a9e 100644 --- a/src/spicelib/devices/cap/capmdel.c +++ b/src/spicelib/devices/cap/capmdel.c @@ -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; diff --git a/src/spicelib/devices/cccs/cccsmdel.c b/src/spicelib/devices/cccs/cccsmdel.c index f93c775c9..fe60b23ea 100644 --- a/src/spicelib/devices/cccs/cccsmdel.c +++ b/src/spicelib/devices/cccs/cccsmdel.c @@ -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; diff --git a/src/spicelib/devices/ccvs/ccvsmdel.c b/src/spicelib/devices/ccvs/ccvsmdel.c index d655f8144..05de77b46 100644 --- a/src/spicelib/devices/ccvs/ccvsmdel.c +++ b/src/spicelib/devices/ccvs/ccvsmdel.c @@ -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; diff --git a/src/spicelib/devices/cpl/cplmdel.c b/src/spicelib/devices/cpl/cplmdel.c index c50a6ef53..3a372e901 100644 --- a/src/spicelib/devices/cpl/cplmdel.c +++ b/src/spicelib/devices/cpl/cplmdel.c @@ -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; diff --git a/src/spicelib/devices/csw/cswmdel.c b/src/spicelib/devices/csw/cswmdel.c index 62e782bda..6b948bfb2 100644 --- a/src/spicelib/devices/csw/cswmdel.c +++ b/src/spicelib/devices/csw/cswmdel.c @@ -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; diff --git a/src/spicelib/devices/dio/diomdel.c b/src/spicelib/devices/dio/diomdel.c index 46961c4c2..eadefbc5e 100644 --- a/src/spicelib/devices/dio/diomdel.c +++ b/src/spicelib/devices/dio/diomdel.c @@ -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; diff --git a/src/spicelib/devices/hfet1/hfetmdel.c b/src/spicelib/devices/hfet1/hfetmdel.c index cab07f070..aab2f7842 100644 --- a/src/spicelib/devices/hfet1/hfetmdel.c +++ b/src/spicelib/devices/hfet1/hfetmdel.c @@ -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; diff --git a/src/spicelib/devices/hfet2/hfet2mdel.c b/src/spicelib/devices/hfet2/hfet2mdel.c index e878fa924..bec8cf033 100644 --- a/src/spicelib/devices/hfet2/hfet2mdel.c +++ b/src/spicelib/devices/hfet2/hfet2mdel.c @@ -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; diff --git a/src/spicelib/devices/hisim2/hsm2mdel.c b/src/spicelib/devices/hisim2/hsm2mdel.c index 9cf0e1565..34b54f538 100644 --- a/src/spicelib/devices/hisim2/hsm2mdel.c +++ b/src/spicelib/devices/hisim2/hsm2mdel.c @@ -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; diff --git a/src/spicelib/devices/hisimhv1/hsmhvmdel.c b/src/spicelib/devices/hisimhv1/hsmhvmdel.c index 6364e3093..f94910cd3 100644 --- a/src/spicelib/devices/hisimhv1/hsmhvmdel.c +++ b/src/spicelib/devices/hisimhv1/hsmhvmdel.c @@ -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; diff --git a/src/spicelib/devices/hisimhv2/hsmhv2mdel.c b/src/spicelib/devices/hisimhv2/hsmhv2mdel.c index 5e9907c4c..4256ed07b 100644 --- a/src/spicelib/devices/hisimhv2/hsmhv2mdel.c +++ b/src/spicelib/devices/hisimhv2/hsmhv2mdel.c @@ -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; diff --git a/src/spicelib/devices/ind/indmdel.c b/src/spicelib/devices/ind/indmdel.c index b66b03852..bec3c3418 100644 --- a/src/spicelib/devices/ind/indmdel.c +++ b/src/spicelib/devices/ind/indmdel.c @@ -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; diff --git a/src/spicelib/devices/ind/mutmdel.c b/src/spicelib/devices/ind/mutmdel.c index 72f2853a1..dd383cc27 100644 --- a/src/spicelib/devices/ind/mutmdel.c +++ b/src/spicelib/devices/ind/mutmdel.c @@ -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; diff --git a/src/spicelib/devices/isrc/isrcmdel.c b/src/spicelib/devices/isrc/isrcmdel.c index 9aced1dea..aaa4ca293 100644 --- a/src/spicelib/devices/isrc/isrcmdel.c +++ b/src/spicelib/devices/isrc/isrcmdel.c @@ -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; diff --git a/src/spicelib/devices/jfet/jfetmdel.c b/src/spicelib/devices/jfet/jfetmdel.c index f5efa05fb..5f92256ec 100644 --- a/src/spicelib/devices/jfet/jfetmdel.c +++ b/src/spicelib/devices/jfet/jfetmdel.c @@ -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; diff --git a/src/spicelib/devices/jfet2/jfet2mdel.c b/src/spicelib/devices/jfet2/jfet2mdel.c index e23deb1b7..e3d546699 100644 --- a/src/spicelib/devices/jfet2/jfet2mdel.c +++ b/src/spicelib/devices/jfet2/jfet2mdel.c @@ -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; diff --git a/src/spicelib/devices/ltra/ltramdel.c b/src/spicelib/devices/ltra/ltramdel.c index 1075765a0..0fe5bac7b 100644 --- a/src/spicelib/devices/ltra/ltramdel.c +++ b/src/spicelib/devices/ltra/ltramdel.c @@ -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; diff --git a/src/spicelib/devices/mes/mesmdel.c b/src/spicelib/devices/mes/mesmdel.c index 4af104e86..c225ce7c8 100644 --- a/src/spicelib/devices/mes/mesmdel.c +++ b/src/spicelib/devices/mes/mesmdel.c @@ -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; diff --git a/src/spicelib/devices/mesa/mesamdel.c b/src/spicelib/devices/mesa/mesamdel.c index 92ab3be82..e9db68df4 100644 --- a/src/spicelib/devices/mesa/mesamdel.c +++ b/src/spicelib/devices/mesa/mesamdel.c @@ -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; diff --git a/src/spicelib/devices/mos1/mos1mdel.c b/src/spicelib/devices/mos1/mos1mdel.c index b125356a1..be90fe7bc 100644 --- a/src/spicelib/devices/mos1/mos1mdel.c +++ b/src/spicelib/devices/mos1/mos1mdel.c @@ -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; diff --git a/src/spicelib/devices/mos2/mos2mdel.c b/src/spicelib/devices/mos2/mos2mdel.c index 3c10020da..232bf3841 100644 --- a/src/spicelib/devices/mos2/mos2mdel.c +++ b/src/spicelib/devices/mos2/mos2mdel.c @@ -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; diff --git a/src/spicelib/devices/mos3/mos3mdel.c b/src/spicelib/devices/mos3/mos3mdel.c index 0cc194e56..94dcc26c5 100644 --- a/src/spicelib/devices/mos3/mos3mdel.c +++ b/src/spicelib/devices/mos3/mos3mdel.c @@ -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; diff --git a/src/spicelib/devices/mos9/mos9mdel.c b/src/spicelib/devices/mos9/mos9mdel.c index be1aa4703..cb9cd07df 100644 --- a/src/spicelib/devices/mos9/mos9mdel.c +++ b/src/spicelib/devices/mos9/mos9mdel.c @@ -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; diff --git a/src/spicelib/devices/nbjt/nbjtmdel.c b/src/spicelib/devices/nbjt/nbjtmdel.c index 4ac5c8b42..2ee620847 100644 --- a/src/spicelib/devices/nbjt/nbjtmdel.c +++ b/src/spicelib/devices/nbjt/nbjtmdel.c @@ -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; } diff --git a/src/spicelib/devices/nbjt2/nbt2mdel.c b/src/spicelib/devices/nbjt2/nbt2mdel.c index 2c4a92853..105984a6c 100644 --- a/src/spicelib/devices/nbjt2/nbt2mdel.c +++ b/src/spicelib/devices/nbjt2/nbt2mdel.c @@ -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; } diff --git a/src/spicelib/devices/ndev/ndevmdel.c b/src/spicelib/devices/ndev/ndevmdel.c index 8fc7ba412..062f9f2ad 100644 --- a/src/spicelib/devices/ndev/ndevmdel.c +++ b/src/spicelib/devices/ndev/ndevmdel.c @@ -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); diff --git a/src/spicelib/devices/numd/numdmdel.c b/src/spicelib/devices/numd/numdmdel.c index 8a82ce6ac..e206b98ab 100644 --- a/src/spicelib/devices/numd/numdmdel.c +++ b/src/spicelib/devices/numd/numdmdel.c @@ -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; diff --git a/src/spicelib/devices/numd2/nud2mdel.c b/src/spicelib/devices/numd2/nud2mdel.c index b2428b45f..4386cf9e3 100644 --- a/src/spicelib/devices/numd2/nud2mdel.c +++ b/src/spicelib/devices/numd2/nud2mdel.c @@ -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; diff --git a/src/spicelib/devices/numos/nummmdel.c b/src/spicelib/devices/numos/nummmdel.c index 0c5177abb..69dc99d55 100644 --- a/src/spicelib/devices/numos/nummmdel.c +++ b/src/spicelib/devices/numos/nummmdel.c @@ -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; } diff --git a/src/spicelib/devices/res/resmdel.c b/src/spicelib/devices/res/resmdel.c index 02fbbb4eb..aa8874fa9 100644 --- a/src/spicelib/devices/res/resmdel.c +++ b/src/spicelib/devices/res/resmdel.c @@ -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; diff --git a/src/spicelib/devices/soi3/soi3mdel.c b/src/spicelib/devices/soi3/soi3mdel.c index 51dd40513..93737e0f5 100644 --- a/src/spicelib/devices/soi3/soi3mdel.c +++ b/src/spicelib/devices/soi3/soi3mdel.c @@ -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; diff --git a/src/spicelib/devices/sw/swmdel.c b/src/spicelib/devices/sw/swmdel.c index 9da4ea132..eadd84ff8 100644 --- a/src/spicelib/devices/sw/swmdel.c +++ b/src/spicelib/devices/sw/swmdel.c @@ -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; diff --git a/src/spicelib/devices/tra/tramdel.c b/src/spicelib/devices/tra/tramdel.c index c50e93591..542ae4efd 100644 --- a/src/spicelib/devices/tra/tramdel.c +++ b/src/spicelib/devices/tra/tramdel.c @@ -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; diff --git a/src/spicelib/devices/txl/txlmdel.c b/src/spicelib/devices/txl/txlmdel.c index 799c3c24e..a36c3426b 100644 --- a/src/spicelib/devices/txl/txlmdel.c +++ b/src/spicelib/devices/txl/txlmdel.c @@ -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; diff --git a/src/spicelib/devices/urc/urcmdel.c b/src/spicelib/devices/urc/urcmdel.c index 5dd245eba..5a99d9c33 100644 --- a/src/spicelib/devices/urc/urcmdel.c +++ b/src/spicelib/devices/urc/urcmdel.c @@ -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; diff --git a/src/spicelib/devices/vbic/vbicmdel.c b/src/spicelib/devices/vbic/vbicmdel.c index b85f39a4b..9ef4d439e 100644 --- a/src/spicelib/devices/vbic/vbicmdel.c +++ b/src/spicelib/devices/vbic/vbicmdel.c @@ -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; } diff --git a/src/spicelib/devices/vccs/vccsmdel.c b/src/spicelib/devices/vccs/vccsmdel.c index cafc3ba3e..a2020610d 100644 --- a/src/spicelib/devices/vccs/vccsmdel.c +++ b/src/spicelib/devices/vccs/vccsmdel.c @@ -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; diff --git a/src/spicelib/devices/vcvs/vcvsmdel.c b/src/spicelib/devices/vcvs/vcvsmdel.c index 803c4aa69..a87b009d3 100644 --- a/src/spicelib/devices/vcvs/vcvsmdel.c +++ b/src/spicelib/devices/vcvs/vcvsmdel.c @@ -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; diff --git a/src/spicelib/devices/vsrc/vsrcmdel.c b/src/spicelib/devices/vsrc/vsrcmdel.c index 9232e968c..fabe7d470 100644 --- a/src/spicelib/devices/vsrc/vsrcmdel.c +++ b/src/spicelib/devices/vsrc/vsrcmdel.c @@ -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;