DEVdestroy(), cleanup memory maintenance
move the cleanup business over to DEVmodDelete() and DEVdelete() and invoke them to do the job.
This commit is contained in:
parent
f25b7e2f08
commit
daca48a117
|
|
@ -54,10 +54,10 @@ $(module)destroy(GENmodel **inModel)
|
|||
$(module)instance *inst = $(module)instances(mod);
|
||||
while (inst) {
|
||||
$(module)instance *next_inst = $(module)nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
$(module)delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
$(module)mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,19 @@ Author: 1987 Kanwar Jit Singh
|
|||
#include "asrcdefs.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
#include "ngspice/inpdefs.h"
|
||||
|
||||
|
||||
int
|
||||
ASRCdelete(GENinstance *inst)
|
||||
{
|
||||
ASRCinstance *here = (ASRCinstance *) inst;
|
||||
|
||||
INPfreeTree(here->ASRCtree);
|
||||
FREE(here->ASRCacValues);
|
||||
FREE(here->ASRCposPtr);
|
||||
FREE(here->ASRCvars);
|
||||
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Author: 1987 Kanwar Jit Singh
|
|||
#include "ngspice/ngspice.h"
|
||||
#include "asrcdefs.h"
|
||||
#include "ngspice/suffix.h"
|
||||
#include "ngspice/inpdefs.h"
|
||||
|
||||
|
||||
void
|
||||
|
|
@ -19,14 +18,10 @@ ASRCdestroy(GENmodel **inModel)
|
|||
ASRCinstance *inst = ASRCinstances(mod);
|
||||
while (inst) {
|
||||
ASRCinstance *next_inst = ASRCnextInstance(inst);
|
||||
INPfreeTree(inst->ASRCtree);
|
||||
FREE(inst->ASRCacValues);
|
||||
FREE(inst->ASRCposPtr);
|
||||
FREE(inst->ASRCvars);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
ASRCdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
ASRCmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
BJTdelete(GENinstance *inst)
|
||||
{
|
||||
BJTinstance *here = (BJTinstance*) inst;
|
||||
FREE(here->BJTsens);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,11 +23,10 @@ BJTdestroy(GENmodel **inModel)
|
|||
BJTinstance *inst = BJTinstances(mod);
|
||||
while (inst) {
|
||||
BJTinstance *next_inst = BJTnextInstance(inst);
|
||||
FREE(inst->BJTsens);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BJTdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BJTmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ B1destroy(GENmodel **inModel)
|
|||
B1instance *inst = B1instances(mod);
|
||||
while (inst) {
|
||||
B1instance *next_inst = B1nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
B1delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
B1mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ B2destroy(GENmodel **inModel)
|
|||
B2instance *inst = B2instances(mod);
|
||||
while (inst) {
|
||||
B2instance *next_inst = B2nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
B2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
B2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,28 +22,13 @@ BSIM3destroy(GENmodel **inModel)
|
|||
BSIM3model *next_mod = BSIM3nextModel(mod);
|
||||
BSIM3instance *inst = BSIM3instances(mod);
|
||||
|
||||
/** added to get rid of link list pSizeDependParamKnot **/
|
||||
struct bsim3SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim3SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
/** end of extra code **/
|
||||
|
||||
while (inst) {
|
||||
BSIM3instance *next_inst = BSIM3nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM3delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3InstanceArray);
|
||||
#endif
|
||||
|
||||
/* mod->BSIM3modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM3version);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM3mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,22 @@
|
|||
int
|
||||
BSIM3mDelete(GENmodel *model)
|
||||
{
|
||||
BSIM3model *mod = (BSIM3model *) model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim3SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim3SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
/* mod->BSIM3modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM3version);
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ B3SOIDDdestroy(GENmodel **inModel)
|
|||
B3SOIDDinstance *inst = B3SOIDDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIDDinstance *next_inst = B3SOIDDnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
B3SOIDDdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
B3SOIDDmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ B3SOIFDdestroy(GENmodel **inModel)
|
|||
B3SOIFDinstance *inst = B3SOIFDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIFDinstance *next_inst = B3SOIFDnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
B3SOIFDdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
B3SOIFDmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ B3SOIPDdestroy(GENmodel **inModel)
|
|||
B3SOIPDinstance *inst = B3SOIPDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIPDinstance *next_inst = B3SOIPDnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
B3SOIPDdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
B3SOIPDmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ BSIM3v0destroy(GENmodel **inModel)
|
|||
BSIM3v0instance *inst = BSIM3v0instances(mod);
|
||||
while (inst) {
|
||||
BSIM3v0instance *next_inst = BSIM3v0nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM3v0delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM3v0mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ BSIM3v1destroy(GENmodel **inModel)
|
|||
BSIM3v1instance *inst = BSIM3v1instances(mod);
|
||||
while (inst) {
|
||||
BSIM3v1instance *next_inst = BSIM3v1nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM3v1delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM3v1mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,26 +22,13 @@ BSIM3v32destroy (GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM3v32model *next_mod = BSIM3v32nextModel(mod);
|
||||
BSIM3v32instance *inst = BSIM3v32instances(mod);
|
||||
/** added to get rid of link list pSizeDependParamKnot **/
|
||||
struct bsim3v32SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim3v32SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM3v32instance *next_inst = BSIM3v32nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM3v32delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3v32InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM3v32version);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM3v32mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@
|
|||
int
|
||||
BSIM3v32mDelete(GENmodel *model)
|
||||
{
|
||||
BSIM3v32model *mod = (BSIM3v32model*) model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3v32InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim3v32SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim3v32SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(mod->BSIM3v32version);
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,26 +71,12 @@ BSIM4destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4model *next_mod = BSIM4nextModel(mod);
|
||||
BSIM4instance *inst = BSIM4instances(mod);
|
||||
/** added to get rid of link list pSizeDependParamKnot **/
|
||||
struct bsim4SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4instance *next_inst = BSIM4nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM4delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM4version);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM4mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,21 @@
|
|||
int
|
||||
BSIM4mDelete(GENmodel *model)
|
||||
{
|
||||
BSIM4model *mod = (BSIM4model*) model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(mod->BSIM4version);
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,26 +21,12 @@ BSIM4v5destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4v5model *next_mod = BSIM4v5nextModel(mod);
|
||||
BSIM4v5instance *inst = BSIM4v5instances(mod);
|
||||
/** added to get rid of link list pSizeDependParamKnot **/
|
||||
struct bsim4v5SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4v5SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4v5instance *next_inst = BSIM4v5nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM4v5delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v5InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM4v5version);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM4v5mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,22 @@
|
|||
int
|
||||
BSIM4v5mDelete(GENmodel *model)
|
||||
{
|
||||
BSIM4v5model *mod = (BSIM4v5model*) model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* FIXME free just once for all models */
|
||||
FREE(mod->BSIM4v5InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4v5SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4v5SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(mod->BSIM4v5version);
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,26 +23,12 @@ BSIM4v6destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4v6model *next_mod = BSIM4v6nextModel(mod);
|
||||
BSIM4v6instance *inst = BSIM4v6instances(mod);
|
||||
/** added to get rid of link list pSizeDependParamKnot **/
|
||||
struct bsim4v6SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4v6SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4v6instance *next_inst = BSIM4v6nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM4v6delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v6InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM4v6version);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM4v6mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,22 @@
|
|||
int
|
||||
BSIM4v6mDelete(GENmodel *model)
|
||||
{
|
||||
BSIM4v6model *mod = (BSIM4v6model*) model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* free just once for all models */
|
||||
FREE(mod->BSIM4v6InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4v6SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4v6SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(mod->BSIM4v6version);
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,27 +23,12 @@ BSIM4v7destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4v7model *next_mod = BSIM4v7nextModel(mod);
|
||||
BSIM4v7instance *inst = BSIM4v7instances(mod);
|
||||
/** added to get rid of link list pSizeDependParamKnot **/
|
||||
struct bsim4SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
/** end of extra code **/
|
||||
while (inst) {
|
||||
BSIM4v7instance *next_inst = BSIM4v7nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
BSIM4v7delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v7InstanceArray);
|
||||
#endif
|
||||
|
||||
/* mod->BSIM4v7modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM4v7version);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
BSIM4v7mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,22 @@
|
|||
int
|
||||
BSIM4v7mDelete(GENmodel *model)
|
||||
{
|
||||
BSIM4v7model *mod = (BSIM4v7model*) model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
/* FIXME free just once for all models */
|
||||
FREE(mod->BSIM4v7InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(mod->BSIM4v7version);
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,15 +29,10 @@ B4SOIdestroy(GENmodel **inModel)
|
|||
B4SOIinstance *inst = B4SOIinstances(mod);
|
||||
while (inst) {
|
||||
B4SOIinstance *next_inst = B4SOInextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
B4SOIdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->B4SOIInstanceArray);
|
||||
#endif
|
||||
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
B4SOImDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@
|
|||
int
|
||||
B4SOImDelete(GENmodel *model)
|
||||
{
|
||||
#ifdef USE_OMP
|
||||
B4SOImodel *mod = (B4SOImodel*) model;
|
||||
FREE(mod->B4SOIInstanceArray);
|
||||
#endif
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ CAPdestroy(GENmodel **inModel)
|
|||
CAPinstance *inst = CAPinstances(mod);
|
||||
while (inst) {
|
||||
CAPinstance *next_inst = CAPnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
CAPdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
CAPmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ CCCSdestroy(GENmodel **inModel)
|
|||
CCCSinstance *inst = CCCSinstances(mod);
|
||||
while (inst) {
|
||||
CCCSinstance *next_inst = CCCSnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
CCCSdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
CCCSmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ CCVSdestroy(GENmodel **inModel)
|
|||
CCVSinstance *inst = CCVSinstances(mod);
|
||||
while (inst) {
|
||||
CCVSinstance *next_inst = CCVSnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
CCVSdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
CCVSmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ CPLdestroy(GENmodel **inModel)
|
|||
CPLinstance *inst = CPLinstances(mod);
|
||||
while (inst) {
|
||||
CPLinstance *next_inst = CPLnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
CPLdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
CPLmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ CSWdestroy(GENmodel **inModel)
|
|||
CSWinstance *inst = CSWinstances(mod);
|
||||
while (inst) {
|
||||
CSWinstance *next_inst = CSWnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
CSWdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
CSWmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ DIOdestroy(GENmodel **inModel)
|
|||
DIOinstance *inst = DIOinstances(mod);
|
||||
while (inst) {
|
||||
DIOinstance *next_inst = DIOnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
DIOdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
DIOmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ HFETAdestroy(GENmodel **inModel)
|
|||
HFETAinstance *inst = HFETAinstances(mod);
|
||||
while (inst) {
|
||||
HFETAinstance *next_inst = HFETAnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
HFETAdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
HFETAmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ HFET2destroy(GENmodel **inModel)
|
|||
HFET2instance *inst = HFET2instances(mod);
|
||||
while (inst) {
|
||||
HFET2instance *next_inst = HFET2nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
HFET2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
HFET2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,15 +69,10 @@ HSM2destroy(GENmodel **inModel)
|
|||
HSM2instance *inst = HSM2instances(mod);
|
||||
while (inst) {
|
||||
HSM2instance *next_inst = HSM2nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
HSM2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->HSM2InstanceArray);
|
||||
#endif
|
||||
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
HSM2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ to others."
|
|||
int
|
||||
HSM2mDelete(GENmodel *model)
|
||||
{
|
||||
#ifdef USE_OMP
|
||||
HSM2model *mod = (HSM2model*) model;
|
||||
FREE(mod->HSM2InstanceArray);
|
||||
#endif
|
||||
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ HSMHVdestroy(GENmodel **inModel)
|
|||
HSMHVinstance *inst = HSMHVinstances(mod);
|
||||
while (inst) {
|
||||
HSMHVinstance *next_inst = HSMHVnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
HSMHVdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
HSMHVmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ HSMHV2destroy(GENmodel **inModel)
|
|||
HSMHV2instance *inst = HSMHV2instances(mod);
|
||||
while (inst) {
|
||||
HSMHV2instance *next_inst = HSMHV2nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
HSMHV2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
HSMHV2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ INDdestroy(GENmodel **inModel)
|
|||
INDinstance *inst = INDinstances(mod);
|
||||
while (inst) {
|
||||
INDinstance *next_inst = INDnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
INDdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
INDmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ MUTdestroy(GENmodel **inModel)
|
|||
MUTinstance *inst = MUTinstances(mod);
|
||||
while (inst) {
|
||||
MUTinstance *next_inst = MUTnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MUTdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MUTmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
ISRCdelete(GENinstance *inst)
|
||||
{
|
||||
ISRCinstance *here = (ISRCinstance *) inst;
|
||||
FREE(here->ISRCcoeffs);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@ ISRCdestroy(GENmodel **inModel)
|
|||
ISRCinstance *inst = ISRCinstances(mod);
|
||||
while (inst) {
|
||||
ISRCinstance *next_inst = ISRCnextInstance(inst);
|
||||
FREE(inst->ISRCcoeffs);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
ISRCdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
ISRCmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ JFETdestroy(GENmodel **inModel)
|
|||
JFETinstance *inst = JFETinstances(mod);
|
||||
while (inst) {
|
||||
JFETinstance *next_inst = JFETnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
JFETdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
JFETmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ JFET2destroy(GENmodel **inModel)
|
|||
JFET2instance *inst = JFET2instances(mod);
|
||||
while (inst) {
|
||||
JFET2instance *next_inst = JFET2nextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
JFET2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
JFET2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ LTRAdestroy(GENmodel **inModel)
|
|||
LTRAinstance *inst = LTRAinstances(mod);
|
||||
while (inst) {
|
||||
LTRAinstance *next_inst = LTRAnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
LTRAdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
LTRAmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ MESdestroy(GENmodel **inModel)
|
|||
MESinstance *inst = MESinstances(mod);
|
||||
while (inst) {
|
||||
MESinstance *next_inst = MESnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MESdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MESmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ MESAdestroy(GENmodel **inModel)
|
|||
MESAinstance *inst = MESAinstances(mod);
|
||||
while (inst) {
|
||||
MESAinstance *next_inst = MESAnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MESAdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MESAmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS1delete(GENinstance *inst)
|
||||
{
|
||||
MOS1instance *here = (MOS1instance *) inst;
|
||||
FREE(here->MOS1sens);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@ MOS1destroy(GENmodel **inModel)
|
|||
MOS1instance *inst = MOS1instances(mod);
|
||||
while (inst) {
|
||||
MOS1instance *next_inst = MOS1nextInstance(inst);
|
||||
FREE(inst->MOS1sens);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MOS1delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MOS1mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS2delete(GENinstance *inst)
|
||||
{
|
||||
MOS2instance *here = (MOS2instance *) inst;
|
||||
FREE(here->MOS2sens);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@ MOS2destroy(GENmodel **inModel)
|
|||
MOS2instance *inst = MOS2instances(mod);
|
||||
while (inst) {
|
||||
MOS2instance *next_inst = MOS2nextInstance(inst);
|
||||
FREE(inst->MOS2sens);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MOS2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MOS2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS3delete(GENinstance *inst)
|
||||
{
|
||||
MOS3instance *here = (MOS3instance *) inst;
|
||||
FREE(here->MOS3sens);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@ MOS3destroy(GENmodel **inModel)
|
|||
MOS3instance *inst = MOS3instances(mod);
|
||||
while (inst) {
|
||||
MOS3instance *next_inst = MOS3nextInstance(inst);
|
||||
FREE(inst->MOS3sens);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MOS3delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MOS3mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS6delete(GENinstance *inst)
|
||||
{
|
||||
MOS6instance *here = (MOS6instance *) inst;
|
||||
FREE(here->MOS6sens);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@ MOS6destroy(GENmodel **inModel)
|
|||
MOS6instance *inst = MOS6instances(mod);
|
||||
while (inst) {
|
||||
MOS6instance *next_inst = MOS6nextInstance(inst);
|
||||
FREE(inst->MOS6sens);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MOS6delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MOS6mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ Modified: Alan Gillespie
|
|||
int
|
||||
MOS9delete(GENinstance *inst)
|
||||
{
|
||||
MOS9instance *here = (MOS9instance *) inst;
|
||||
FREE(here->MOS9sens);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,10 @@ MOS9destroy(GENmodel **inModel)
|
|||
MOS9instance *inst = MOS9instances(mod);
|
||||
while (inst) {
|
||||
MOS9instance *next_inst = MOS9nextInstance(inst);
|
||||
FREE(inst->MOS9sens);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
MOS9delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
MOS9mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "nbjtdefs.h"
|
||||
#include "../../../ciderlib/oned/onedext.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -17,6 +18,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NBJTdelete(GENinstance *inst)
|
||||
{
|
||||
NBJTinstance *here = (NBJTinstance *) inst;
|
||||
ONEdestroy(here->NBJTpDevice);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "nbjtdefs.h"
|
||||
#include "../../../ciderlib/oned/onedext.h"
|
||||
#include "ngspice/cidersupt.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -25,11 +24,10 @@ NBJTdestroy(GENmodel **inModel)
|
|||
NBJTinstance *inst = NBJTinstances(mod);
|
||||
while (inst) {
|
||||
NBJTinstance *next_inst = NBJTnextInstance(inst);
|
||||
ONEdestroy(inst->NBJTpDevice);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
NBJTdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
NBJTmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "nbjt2def.h"
|
||||
#include "../../../ciderlib/twod/twoddefs.h"
|
||||
#include "../../../ciderlib/twod/twodext.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -17,6 +19,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NBJT2delete(GENinstance *inst)
|
||||
{
|
||||
NBJT2instance *here = (NBJT2instance *) inst;
|
||||
TWOdestroy(here->NBJT2pDevice);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "nbjt2def.h"
|
||||
#include "../../../ciderlib/twod/twoddefs.h"
|
||||
#include "../../../ciderlib/twod/twodext.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
|
|
@ -25,11 +23,10 @@ NBJT2destroy(GENmodel **inModel)
|
|||
NBJT2instance *inst = NBJT2instances(mod);
|
||||
while (inst) {
|
||||
NBJT2instance *next_inst = NBJT2nextInstance(inst);
|
||||
TWOdestroy(inst->NBJT2pDevice);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
NBJT2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
NBJT2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,10 @@ NDEVdestroy(GENmodel **inModel)
|
|||
NDEVinstance *inst = NDEVinstances(mod);
|
||||
while (inst) {
|
||||
NDEVinstance *next_inst = NDEVnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
NDEVdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
close(mod->sock);
|
||||
printf("Disconnect to remote NDEV server %s:%d\n", mod->host, mod->port);
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
NDEVmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NDEVmDelete(GENmodel *model)
|
||||
{
|
||||
NG_IGNORE(model);
|
||||
|
||||
NDEVmodel *mod = (NDEVmodel *) model;
|
||||
close(mod->sock);
|
||||
printf("Disconnect to remote NDEV server %s:%d\n", mod->host, mod->port);
|
||||
GENmodelFree(model);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "numddefs.h"
|
||||
#include "../../../ciderlib/oned/onedext.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -12,6 +13,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NUMDdelete(GENinstance *inst)
|
||||
{
|
||||
NUMDinstance *here = (NUMDinstance *) inst;
|
||||
ONEdestroy(here->NUMDpDevice);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "numddefs.h"
|
||||
#include "../../../ciderlib/oned/onedext.h"
|
||||
#include "ngspice/cidersupt.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -25,11 +24,10 @@ NUMDdestroy(GENmodel **inModel)
|
|||
NUMDinstance *inst = NUMDinstances(mod);
|
||||
while (inst) {
|
||||
NUMDinstance *next_inst = NUMDnextInstance(inst);
|
||||
ONEdestroy(inst->NUMDpDevice);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
NUMDdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
NUMDmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "numd2def.h"
|
||||
#include "../../../ciderlib/twod/twoddefs.h"
|
||||
#include "../../../ciderlib/twod/twodext.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -12,6 +14,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NUMD2delete(GENinstance *inst)
|
||||
{
|
||||
NUMD2instance *here = (NUMD2instance *) inst;
|
||||
TWOdestroy(here->NUMD2pDevice);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "numd2def.h"
|
||||
#include "../../../ciderlib/twod/twoddefs.h"
|
||||
#include "../../../ciderlib/twod/twodext.h"
|
||||
#include "ngspice/cidersupt.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -26,11 +24,10 @@ NUMD2destroy(GENmodel **inModel)
|
|||
NUMD2instance *inst = NUMD2instances(mod);
|
||||
while (inst) {
|
||||
NUMD2instance *next_inst = NUMD2nextInstance(inst);
|
||||
TWOdestroy(inst->NUMD2pDevice);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
NUMD2delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
NUMD2mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "numosdef.h"
|
||||
#include "../../../ciderlib/twod/twoddefs.h"
|
||||
#include "../../../ciderlib/twod/twodext.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
|
@ -17,6 +19,8 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NUMOSdelete(GENinstance *inst)
|
||||
{
|
||||
NUMOSinstance *here = (NUMOSinstance *) inst;
|
||||
TWOdestroy(here->NUMOSpDevice);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "numosdef.h"
|
||||
#include "../../../ciderlib/twod/twoddefs.h"
|
||||
#include "../../../ciderlib/twod/twodext.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
|
|
@ -25,11 +23,10 @@ NUMOSdestroy(GENmodel **inModel)
|
|||
NUMOSinstance *inst = NUMOSinstances(mod);
|
||||
while (inst) {
|
||||
NUMOSinstance *next_inst = NUMOSnextInstance(inst);
|
||||
TWOdestroy(inst->NUMOSpDevice);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
NUMOSdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
NUMOSmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ RESdestroy(GENmodel **inModel)
|
|||
RESinstance *inst = RESinstances(mod);
|
||||
while (inst) {
|
||||
RESinstance *next_inst = RESnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
RESdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
RESmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ Acknowledgements : Rupert Howes and Pete Mole.
|
|||
int
|
||||
SOI3delete(GENinstance *inst)
|
||||
{
|
||||
/* FREE(inst->SOI3sens); */
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,10 @@ SOI3destroy(GENmodel **inModel)
|
|||
SOI3instance *inst = SOI3instances(mod);
|
||||
while (inst) {
|
||||
SOI3instance *next_inst = SOI3nextInstance(inst);
|
||||
/* FREE(inst->SOI3sens); */
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
SOI3delete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
SOI3mDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ SWdestroy(GENmodel **inModel)
|
|||
SWinstance *inst = SWinstances(mod);
|
||||
while (inst) {
|
||||
SWinstance *next_inst = SWnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
SWdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
SWmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ TRAdestroy(GENmodel **inModel)
|
|||
TRAinstance *inst = TRAinstances(mod);
|
||||
while (inst) {
|
||||
TRAinstance *next_inst = TRAnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
TRAdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
TRAmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ TXLdestroy(GENmodel **inModel)
|
|||
TXLinstance *inst = TXLinstances(mod);
|
||||
while (inst) {
|
||||
TXLinstance *next_inst = TXLnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
TXLdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
TXLmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ URCdestroy(GENmodel **inModel)
|
|||
URCinstance *inst = URCinstances(mod);
|
||||
while (inst) {
|
||||
URCinstance *next_inst = URCnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
URCdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
URCmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH
|
|||
int
|
||||
VBICdelete(GENinstance *inst)
|
||||
{
|
||||
VBICinstance *here = (VBICinstance *) inst;
|
||||
FREE(here->VBICsens);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,11 +25,10 @@ VBICdestroy(GENmodel **inModel)
|
|||
VBICinstance *inst = VBICinstances(mod);
|
||||
while (inst) {
|
||||
VBICinstance *next_inst = VBICnextInstance(inst);
|
||||
FREE(inst->VBICsens);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
VBICdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
VBICmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ VCCSdestroy(GENmodel **inModel)
|
|||
VCCSinstance *inst = VCCSinstances(mod);
|
||||
while (inst) {
|
||||
VCCSinstance *next_inst = VCCSnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
VCCSdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
VCCSmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ VCVSdestroy(GENmodel **inModel)
|
|||
VCVSinstance *inst = VCVSinstances(mod);
|
||||
while (inst) {
|
||||
VCVSinstance *next_inst = VCVSnextInstance(inst);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
VCVSdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
VCVSmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
VSRCdelete(GENinstance *inst)
|
||||
{
|
||||
VSRCinstance *here = (VSRCinstance *) inst;
|
||||
FREE(here->VSRCcoeffs);
|
||||
GENinstanceFree(inst);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,10 @@ VSRCdestroy(GENmodel **inModel)
|
|||
VSRCinstance *inst = VSRCinstances(mod);
|
||||
while (inst) {
|
||||
VSRCinstance *next_inst = VSRCnextInstance(inst);
|
||||
FREE(inst->VSRCcoeffs);
|
||||
GENinstanceFree(GENinstanceOf(inst));
|
||||
VSRCdelete(GENinstanceOf(inst));
|
||||
inst = next_inst;
|
||||
}
|
||||
GENmodelFree(GENmodelOf(mod));
|
||||
VSRCmDelete(GENmodelOf(mod));
|
||||
mod = next_mod;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue