introduce GENinstanceFree(), GENmodelFree()
This commit is contained in:
parent
f2a92f0347
commit
c59983c5fc
|
|
@ -898,7 +898,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val)
|
|||
INPgetMod(ckt, mods->GENmodName, &inpmod, ft_curckt->ci_symtab);
|
||||
if (curMod != nghash_delete(ckt->MODnameHash, curMod->GENmodName))
|
||||
fprintf(stderr, "ERROR, ouch nasal daemons ...\n");
|
||||
FREE(mods);
|
||||
GENmodelFree(mods);
|
||||
|
||||
inpmod->INPmodfast = NULL;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -48,4 +48,12 @@ struct GENmodel { /* model structure for a resistor */
|
|||
IFuid GENmodName; /* pointer to character string naming this model */
|
||||
};
|
||||
|
||||
|
||||
void GENinstanceFree(GENinstance *);
|
||||
void GENmodelFree(GENmodel *);
|
||||
|
||||
#define GENmodelOf(p) &((p)->gen)
|
||||
#define GENinstanceOf(p) &((p)->gen)
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ CKTdltMod(CKTcircuit *ckt, GENmodel *m)
|
|||
fprintf(stderr, "ERROR, ouch nasal daemons ...\n");
|
||||
error = SPfrontEnd->IFdelUid (ckt, h->GENname,
|
||||
UID_INSTANCE);
|
||||
tfree(h);
|
||||
GENinstanceFree(h);
|
||||
}
|
||||
if (m != nghash_delete(ckt->MODnameHash, m->GENmodName))
|
||||
fprintf(stderr, "ERROR, ouch nasal daemons ...\n");
|
||||
error = SPfrontEnd->IFdelUid (ckt, m->GENmodName, UID_MODEL);
|
||||
tfree(m);
|
||||
GENmodelFree(m);
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,3 +42,17 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name)
|
|||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GENinstanceFree(GENinstance *inst)
|
||||
{
|
||||
txfree(inst);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GENmodelFree(GENmodel *model)
|
||||
{
|
||||
txfree(model);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ $(module)delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ $(module)destroy(GENmodel **inModel)
|
|||
$(module)instance *inst = $(module)instances(mod);
|
||||
while (inst) {
|
||||
$(module)instance *next_inst = $(module)nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ $(module)mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
</admst:template>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ ASRCdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ ASRCdestroy(GENmodel **inModel)
|
|||
FREE(inst->ASRCacValues);
|
||||
FREE(inst->ASRCposPtr);
|
||||
FREE(inst->ASRCvars);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ ASRCmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(((ASRCinstance*)here)->ASRCacValues);
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ BJTdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ BJTdestroy(GENmodel **inModel)
|
|||
while (inst) {
|
||||
BJTinstance *next_inst = BJTnextInstance(inst);
|
||||
FREE(inst->BJTsens);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,6 @@ BJTmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
if (model->GENinstances)
|
||||
return E_NOTEMPTY;
|
||||
*prev = model->GENnextModel;
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ B1delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ B1destroy(GENmodel **inModel)
|
|||
B1instance *inst = B1instances(mod);
|
||||
while (inst) {
|
||||
B1instance *next_inst = B1nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ B1mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ B2delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ B2destroy(GENmodel **inModel)
|
|||
B2instance *inst = B2instances(mod);
|
||||
while (inst) {
|
||||
B2instance *next_inst = B2nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ B2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ BSIM3delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ BSIM3destroy(GENmodel **inModel)
|
|||
|
||||
while (inst) {
|
||||
BSIM3instance *next_inst = BSIM3nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
/* mod->BSIM3modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM3version);
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ BSIM3mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ B3SOIDDdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ B3SOIDDdestroy(GENmodel **inModel)
|
|||
B3SOIDDinstance *inst = B3SOIDDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIDDinstance *next_inst = B3SOIDDnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ B3SOIDDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ B3SOIFDdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ B3SOIFDdestroy(GENmodel **inModel)
|
|||
B3SOIFDinstance *inst = B3SOIFDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIFDinstance *next_inst = B3SOIFDnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ B3SOIFDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ B3SOIPDdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ B3SOIPDdestroy(GENmodel **inModel)
|
|||
B3SOIPDinstance *inst = B3SOIPDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIPDinstance *next_inst = B3SOIPDnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ B3SOIPDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ BSIM3v0delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ BSIM3v0destroy(GENmodel **inModel)
|
|||
BSIM3v0instance *inst = BSIM3v0instances(mod);
|
||||
while (inst) {
|
||||
BSIM3v0instance *next_inst = BSIM3v0nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ BSIM3v0mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ BSIM3v1delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ BSIM3v1destroy(GENmodel **inModel)
|
|||
BSIM3v1instance *inst = BSIM3v1instances(mod);
|
||||
while (inst) {
|
||||
BSIM3v1instance *next_inst = BSIM3v1nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ BSIM3v1mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ BSIM3v32delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ BSIM3v32destroy (GENmodel **inModel)
|
|||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM3v32instance *next_inst = BSIM3v32nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod->BSIM3v32version);
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ BSIM3v32mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ BSIM4delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ BSIM4destroy(GENmodel **inModel)
|
|||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4instance *next_inst = BSIM4nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod->BSIM4version);
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,9 +83,9 @@ BSIM4mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ BSIM4v5delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ BSIM4v5destroy(GENmodel **inModel)
|
|||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4v5instance *next_inst = BSIM4v5nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod->BSIM4v5version);
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ BSIM4v5mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ BSIM4v6delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ BSIM4v6destroy(GENmodel **inModel)
|
|||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4v6instance *next_inst = BSIM4v6nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod->BSIM4v6version);
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ BSIM4v6mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ BSIM4v7delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ BSIM4v7destroy(GENmodel **inModel)
|
|||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4v7instance *next_inst = BSIM4v7nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
/* mod->BSIM4v7modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM4v7version);
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ BSIM4v7mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ B4SOIdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ B4SOIdestroy(GENmodel **inModel)
|
|||
B4SOIinstance *inst = B4SOIinstances(mod);
|
||||
while (inst) {
|
||||
B4SOIinstance *next_inst = B4SOInextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ B4SOImDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ CAPdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ CAPdestroy(GENmodel **inModel)
|
|||
CAPinstance *inst = CAPinstances(mod);
|
||||
while (inst) {
|
||||
CAPinstance *next_inst = CAPnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ CAPmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ CCCSdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ CCCSdestroy(GENmodel **inModel)
|
|||
CCCSinstance *inst = CCCSinstances(mod);
|
||||
while (inst) {
|
||||
CCCSinstance *next_inst = CCCSnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ CCCSmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ CCVSdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ CCVSdestroy(GENmodel **inModel)
|
|||
CCVSinstance *inst = CCVSinstances(mod);
|
||||
while (inst) {
|
||||
CCVSinstance *next_inst = CCVSnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ CCVSmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ CPLdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ CPLdestroy(GENmodel **inModel)
|
|||
CPLinstance *inst = CPLinstances(mod);
|
||||
while (inst) {
|
||||
CPLinstance *next_inst = CPLnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ CPLmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ CSWdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ CSWdestroy(GENmodel **inModel)
|
|||
CSWinstance *inst = CSWinstances(mod);
|
||||
while (inst) {
|
||||
CSWinstance *next_inst = CSWnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ CSWmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ DIOdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ DIOdestroy(GENmodel **inModel)
|
|||
DIOinstance *inst = DIOinstances(mod);
|
||||
while (inst) {
|
||||
DIOinstance *next_inst = DIOnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ DIOmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ HFETAdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ HFETAdestroy(GENmodel **inModel)
|
|||
HFETAinstance *inst = HFETAinstances(mod);
|
||||
while (inst) {
|
||||
HFETAinstance *next_inst = HFETAnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ HFETAmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ HFET2delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ HFET2destroy(GENmodel **inModel)
|
|||
HFET2instance *inst = HFET2instances(mod);
|
||||
while (inst) {
|
||||
HFET2instance *next_inst = HFET2nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ HFET2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ HSM2delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -74,10 +74,10 @@ HSM2destroy(GENmodel **inModel)
|
|||
HSM2instance *inst = HSM2instances(mod);
|
||||
while (inst) {
|
||||
HSM2instance *next_inst = HSM2nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ HSM2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ HSMHVdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ HSMHVdestroy(GENmodel **inModel)
|
|||
HSMHVinstance *inst = HSMHVinstances(mod);
|
||||
while (inst) {
|
||||
HSMHVinstance *next_inst = HSMHVnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ HSMHVmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ HSMHV2delete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ HSMHV2destroy(GENmodel **inModel)
|
|||
HSMHV2instance *inst = HSMHV2instances(mod);
|
||||
while (inst) {
|
||||
HSMHV2instance *next_inst = HSMHV2nextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,9 +82,9 @@ HSMHV2mDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ INDdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ INDdestroy(GENmodel **inModel)
|
|||
INDinstance *inst = INDinstances(mod);
|
||||
while (inst) {
|
||||
INDinstance *next_inst = INDnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ INDmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ MUTdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ MUTdestroy(GENmodel **inModel)
|
|||
MUTinstance *inst = MUTinstances(mod);
|
||||
while (inst) {
|
||||
MUTinstance *next_inst = MUTnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ MUTmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
#endif /* MUTUAL */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ ISRCdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ ISRCdestroy(GENmodel **inModel)
|
|||
while (inst) {
|
||||
ISRCinstance *next_inst = ISRCnextInstance(inst);
|
||||
FREE(inst->ISRCcoeffs);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ ISRCmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ JFETdelete(GENmodel *model, IFuid name, GENinstance **kill)
|
|||
for (; here; here = *prev) {
|
||||
if (here->GENname == name || (kill && here == *kill)) {
|
||||
*prev = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
return OK;
|
||||
}
|
||||
prev = &(here->GENnextInstance);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ JFETdestroy(GENmodel **inModel)
|
|||
JFETinstance *inst = JFETinstances(mod);
|
||||
while (inst) {
|
||||
JFETinstance *next_inst = JFETnextInstance(inst);
|
||||
FREE(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
FREE(mod);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ JFETmDelete(GENmodel **models, IFuid modname, GENmodel *kill)
|
|||
*prev = model->GENnextModel;
|
||||
for (here = model->GENinstances; here;) {
|
||||
GENinstance *next_instance = here->GENnextInstance;
|
||||
FREE(here);
|
||||
GENinstanceFree(here);
|
||||
here = next_instance;
|
||||
}
|
||||
FREE(model);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue