devices/**/XXXmdel.c, cleanup model loop

This commit is contained in:
rlar 2018-01-04 23:20:38 +01:00
parent 07fa2411ea
commit ae45e5cac9
55 changed files with 488 additions and 488 deletions

View File

@ -10,31 +10,31 @@ Author: 1987 Kanwar Jit Singh
int
ASRCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
ASRCmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
*prev = model->GENnextModel;
for (here = (*model)->GENinstances; here;) {
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(((ASRCinstance*)here)->ASRCacValues);
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -16,23 +16,23 @@ Author: 1985 Thomas L. Quarles
int
BJTmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BJTmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
if ((*model)->GENinstances)
if (model->GENinstances)
return E_NOTEMPTY;
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
FREE(*model);
*prev = model->GENnextModel;
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Hong J. Park, Thomas L. Quarles
int
B1mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
B1mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Hong J. Park, Thomas L. Quarles
int
B2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
B2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -15,27 +15,27 @@
int
BSIM3mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM3mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -18,27 +18,27 @@ Modified by Paolo Nenzi 2002
int
B3SOIDDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
B3SOIDDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -17,27 +17,27 @@ File: b3soifdmdel.c 98/5/01
int
B3SOIFDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
B3SOIFDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -17,27 +17,27 @@ Modified by Paolo Nenzi 2002
int
B3SOIPDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
B3SOIPDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -11,27 +11,27 @@ File: b3v0mdel.c
int
BSIM3v0mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM3v0mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -17,27 +17,27 @@
int
BSIM3v1mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM3v1mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -16,27 +16,27 @@
int
BSIM3v32mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM3v32mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -65,27 +65,27 @@
int
BSIM4mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM4mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -15,27 +15,27 @@
int
BSIM4v5mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM4v5mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -17,27 +17,27 @@
int
BSIM4v6mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM4v6mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -17,27 +17,27 @@
int
BSIM4v7mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
BSIM4v7mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -21,27 +21,27 @@
int
B4SOImDelete(GENmodel **model, IFuid modname, GENmodel *kill)
B4SOImDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -11,27 +11,27 @@ Modified: Spetember 2003 Paolo Nenzi
int
CAPmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
CAPmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
CCCSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
CCCSmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
CCVSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
CCVSmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -12,27 +12,27 @@ Author: 1992 Charles Hough
int
CPLmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
CPLmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Gordon Jacobs
int
CSWmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
CSWmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
DIOmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
DIOmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -14,27 +14,27 @@ Author: 1985 S. Hwang
int
HFETAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
HFETAmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -14,27 +14,27 @@ Author: 1985 S. Hwang
int
HFET2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
HFET2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -61,27 +61,27 @@ to others."
int
HSM2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
HSM2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -22,27 +22,27 @@
int
HSMHVmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
HSMHVmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -64,27 +64,27 @@ June 2008 (revised October 2011)
int
HSMHV2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
HSMHV2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
INDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
INDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -11,28 +11,28 @@ Author: 1985 Thomas L. Quarles
#ifdef MUTUAL
int
MUTmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
MUTmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}
#endif /* MUTUAL */

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
ISRCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
ISRCmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
JFETmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
JFETmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -14,27 +14,27 @@ Modified to jfet2 for PS model definition ( Anthony E. Parker )
int
JFET2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
JFET2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1990 Jaijeet S. Roychowdhury
int
LTRAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
LTRAmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 S. Hwang
int
MESmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
MESmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -14,27 +14,27 @@ Author: 1985 S. Hwang
int
MESAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
MESAmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
MOS1mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
MOS1mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
MOS2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
MOS2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
MOS3mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
MOS3mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -11,27 +11,27 @@ Modified: Alan Gillespie
int
MOS9mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
MOS9mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -15,23 +15,23 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
int
NBJTmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
NBJTmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
if ((*model)->GENinstances)
if (model->GENinstances)
return E_NOTEMPTY;
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
FREE(*model);
*prev = model->GENnextModel;
FREE(model);
return OK;
}

View File

@ -15,23 +15,23 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
int
NBJT2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
NBJT2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
if ((*model)->GENinstances)
if (model->GENinstances)
return E_NOTEMPTY;
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
FREE(*model);
*prev = model->GENnextModel;
FREE(model);
return OK;
}

View File

@ -10,9 +10,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
int
NDEVmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
NDEVmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
NG_IGNORE(model);
NG_IGNORE(models);
NG_IGNORE(modname);
NG_IGNORE(kill);

View File

@ -10,27 +10,27 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
int
NUMDmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
NUMDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
int
NUMD2mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
NUMD2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -15,23 +15,23 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
int
NUMOSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
NUMOSmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
if ((*model)->GENinstances)
if (model->GENinstances)
return E_NOTEMPTY;
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
FREE(*model);
*prev = model->GENnextModel;
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Modified: Apr 2000 - Paolo Nenzi
int
RESmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
RESmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -27,27 +27,27 @@ Acknowledgements : Rupert Howes and Pete Mole.
int
SOI3mDelete(GENmodel **model, IFuid modname, GENmodel *kill)
SOI3mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Gordon Jacobs
int
SWmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
SWmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
TRAmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
TRAmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -11,27 +11,27 @@ Author: 1992 Charles Hough
int
TXLmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
TXLmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1987 Thomas L. Quarles
int
URCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
URCmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -18,23 +18,23 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH
int
VBICmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
VBICmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
if ((*model)->GENinstances)
if (model->GENinstances)
return E_NOTEMPTY;
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
FREE(*model);
*prev = model->GENnextModel;
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
VCCSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
VCCSmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
VCVSmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
VCVSmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}

View File

@ -10,27 +10,27 @@ Author: 1985 Thomas L. Quarles
int
VSRCmDelete(GENmodel **model, IFuid modname, GENmodel *kill)
VSRCmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
{
GENinstance *here;
GENmodel **oldmod;
GENmodel **prev = models;
GENmodel *model = *prev;
oldmod = model;
for (; *model; model = &((*model)->GENnextModel)) {
if ((*model)->GENmodName == modname || (kill && *model == kill))
for (; model; model = model->GENnextModel) {
if (model->GENmodName == modname || (kill && model == kill))
goto delgot;
oldmod = model;
prev = &(model->GENnextModel);
}
return E_NOMOD;
delgot:
*oldmod = (*model)->GENnextModel; /* cut deleted device out of list */
for (here = (*model)->GENinstances; here;) {
*prev = model->GENnextModel;
for (here = model->GENinstances; here;) {
GENinstance *next_instance = here->GENnextInstance;
FREE(here);
here = next_instance;
}
FREE(*model);
FREE(model);
return OK;
}