DEVdestroy(), move code over to DEVmodDelete() and DEVdelete()
This patch itself is not valid until all invokers of DEVdestroy() (currently this is CKTdestroy() exclusively) are rewritten to invoke DEVmodDelete() and DEVdelete()
This commit is contained in:
parent
3cd81295a8
commit
b29ad51a6c
|
|
@ -6,6 +6,7 @@ Author: 1987 Kanwar Jit Singh
|
|||
#include "ngspice/ngspice.h"
|
||||
#include "asrcdefs.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/inpdefs.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
|
|
@ -14,6 +15,9 @@ ASRCdelete(GENinstance *gen_inst)
|
|||
{
|
||||
ASRCinstance *inst = (ASRCinstance *) gen_inst;
|
||||
|
||||
INPfreeTree(inst->ASRCtree);
|
||||
FREE(inst->ASRCacValues);
|
||||
FREE(inst->ASRCposPtr);
|
||||
FREE(inst->ASRCvars);
|
||||
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,10 +18,6 @@ ASRCdestroy(GENmodel **inModel)
|
|||
ASRCinstance *inst = mod->ASRCinstances;
|
||||
while (inst) {
|
||||
ASRCinstance *next_inst = inst->ASRCnextInstance;
|
||||
INPfreeTree(inst->ASRCtree);
|
||||
FREE(inst->ASRCacValues);
|
||||
FREE(inst->ASRCposPtr);
|
||||
FREE(inst->ASRCvars);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
BJTdelete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
BJTinstance *inst = (BJTinstance *) gen_inst;
|
||||
FREE(inst->BJTsens);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ BJTdestroy(GENmodel **inModel)
|
|||
BJTinstance *inst = mod->BJTinstances;
|
||||
while (inst) {
|
||||
BJTinstance *next_inst = inst->BJTnextInstance;
|
||||
FREE(inst->BJTsens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,27 +22,12 @@ BSIM3destroy(GENmodel **inModel)
|
|||
BSIM3model *next_mod = mod->BSIM3nextModel;
|
||||
BSIM3instance *inst = mod->BSIM3instances;
|
||||
|
||||
/** 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 = inst->BSIM3nextInstance;
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3InstanceArray);
|
||||
#endif
|
||||
|
||||
/* mod->BSIM3modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM3version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,21 @@
|
|||
int
|
||||
BSIM3mDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
BSIM3model *model = (BSIM3model*) gen_model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(model->BSIM3InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim3SizeDependParam *p = model->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim3SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
/* model->BSIM3modName to be freed in INPtabEnd() */
|
||||
FREE(model->BSIM3version);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,25 +22,12 @@ BSIM3v32destroy (GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM3v32model *next_mod = mod->BSIM3v32nextModel;
|
||||
BSIM3v32instance *inst = mod->BSIM3v32instances;
|
||||
/** 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 = inst->BSIM3v32nextInstance;
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM3v32InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM3v32version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,20 @@
|
|||
int
|
||||
BSIM3v32mDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
BSIM3v32model *model = (BSIM3v32model *) gen_model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(model->BSIM3v32InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim3v32SizeDependParam *p = model->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim3v32SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(model->BSIM3v32version);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,25 +71,12 @@ BSIM4destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4model *next_mod = mod->BSIM4nextModel;
|
||||
BSIM4instance *inst = mod->BSIM4instances;
|
||||
/** 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 = inst->BSIM4nextInstance;
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM4version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,20 @@
|
|||
int
|
||||
BSIM4mDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
BSIM4model *model = (BSIM4model *) gen_model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(model->BSIM4InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4SizeDependParam *p = model->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(model->BSIM4version);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,25 +21,12 @@ BSIM4v5destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4v5model *next_mod = mod->BSIM4v5nextModel;
|
||||
BSIM4v5instance *inst = mod->BSIM4v5instances;
|
||||
/** 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 = inst->BSIM4v5nextInstance;
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v5InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM4v5version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,20 @@
|
|||
int
|
||||
BSIM4v5mDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
BSIM4v5model *model = (BSIM4v5model*) gen_model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(model->BSIM4v5InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4v5SizeDependParam *p = model->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4v5SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(model->BSIM4v5version);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,25 +23,12 @@ BSIM4v6destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4v6model *next_mod = mod->BSIM4v6nextModel;
|
||||
BSIM4v6instance *inst = mod->BSIM4v6instances;
|
||||
/** 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 = inst->BSIM4v6nextInstance;
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v6InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod->BSIM4v6version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,20 @@
|
|||
int
|
||||
BSIM4v6mDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
BSIM4v6model *model = (BSIM4v6model *) gen_model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(model->BSIM4v6InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4v6SizeDependParam *p = model->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4v6SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
FREE(model->BSIM4v6version);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,26 +23,12 @@ BSIM4v7destroy(GENmodel **inModel)
|
|||
while (mod) {
|
||||
BSIM4v7model *next_mod = mod->BSIM4v7nextModel;
|
||||
BSIM4v7instance *inst = mod->BSIM4v7instances;
|
||||
/** 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 = inst->BSIM4v7nextInstance;
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->BSIM4v7InstanceArray);
|
||||
#endif
|
||||
|
||||
/* mod->BSIM4v7modName to be freed in INPtabEnd() */
|
||||
FREE(mod->BSIM4v7version);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,21 @@
|
|||
int
|
||||
BSIM4v7mDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
BSIM4v7model *model = (BSIM4v7model *) gen_model;
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(model->BSIM4v7InstanceArray);
|
||||
#endif
|
||||
|
||||
struct bsim4SizeDependParam *p = model->pSizeDependParamKnot;
|
||||
while (p) {
|
||||
struct bsim4SizeDependParam *next_p = p->pNext;
|
||||
FREE(p);
|
||||
p = next_p;
|
||||
}
|
||||
|
||||
/* model->BSIM4v7modName to be freed in INPtabEnd() */
|
||||
FREE(model->BSIM4v7version);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,6 @@ B4SOIdestroy(GENmodel **inModel)
|
|||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->B4SOIInstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,5 +24,11 @@ int
|
|||
B4SOImDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
|
||||
#ifdef USE_OMP
|
||||
B4SOImodel *model = (B4SOImodel *) gen_model;
|
||||
FREE(model->B4SOIInstanceArray);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,10 +73,6 @@ HSM2destroy(GENmodel **inModel)
|
|||
inst = next_inst;
|
||||
}
|
||||
|
||||
#ifdef USE_OMP
|
||||
FREE(mod->HSM2InstanceArray);
|
||||
#endif
|
||||
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,5 +64,11 @@ int
|
|||
HSM2mDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
|
||||
#ifdef USE_OMP
|
||||
HSM2model *model = (HSM2model *) gen_model;
|
||||
FREE(model->HSM2InstanceArray);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
ISRCdelete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
ISRCinstance *inst = (ISRCinstance *) gen_inst;
|
||||
|
||||
FREE(inst->ISRCcoeffs);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ ISRCdestroy(GENmodel **inModel)
|
|||
ISRCinstance *inst = mod->ISRCinstances;
|
||||
while (inst) {
|
||||
ISRCinstance *next_inst = inst->ISRCnextInstance;
|
||||
FREE(inst->ISRCcoeffs);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS1delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
MOS1instance *inst = (MOS1instance *) gen_inst;
|
||||
FREE(inst->MOS1sens);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ MOS1destroy(GENmodel **inModel)
|
|||
MOS1instance *inst = mod->MOS1instances;
|
||||
while (inst) {
|
||||
MOS1instance *next_inst = inst->MOS1nextInstance;
|
||||
FREE(inst->MOS1sens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS2delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
MOS2instance *inst = (MOS2instance *) gen_inst;
|
||||
FREE(inst->MOS2sens);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ MOS2destroy(GENmodel **inModel)
|
|||
MOS2instance *inst = mod->MOS2instances;
|
||||
while (inst) {
|
||||
MOS2instance *next_inst = inst->MOS2nextInstance;
|
||||
FREE(inst->MOS2sens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS3delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
MOS3instance *inst = (MOS3instance *) gen_inst;
|
||||
FREE(inst->MOS3sens);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ MOS3destroy(GENmodel **inModel)
|
|||
MOS3instance *inst = mod->MOS3instances;
|
||||
while (inst) {
|
||||
MOS3instance *next_inst = inst->MOS3nextInstance;
|
||||
FREE(inst->MOS3sens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
MOS6delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
MOS6instance *inst = (MOS6instance *) gen_inst;
|
||||
FREE(inst->MOS6sens);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ MOS6destroy(GENmodel **inModel)
|
|||
MOS6instance *inst = mod->MOS6instances;
|
||||
while (inst) {
|
||||
MOS6instance *next_inst = inst->MOS6nextInstance;
|
||||
FREE(inst->MOS6sens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ Modified: Alan Gillespie
|
|||
int
|
||||
MOS9delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
MOS9instance *inst = (MOS9instance *) gen_inst;
|
||||
FREE(inst->MOS9sens);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ MOS9destroy(GENmodel **inModel)
|
|||
MOS9instance *inst = mod->MOS9instances;
|
||||
while (inst) {
|
||||
MOS9instance *next_inst = inst->MOS9nextInstance;
|
||||
FREE(inst->MOS9sens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NBJTdelete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
NBJTinstance *inst = (NBJTinstance *) gen_inst;
|
||||
|
||||
ONEdestroy(inst->NBJTpDevice);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +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,7 +23,6 @@ NBJTdestroy(GENmodel **inModel)
|
|||
NBJTinstance *inst = mod->NBJTinstances;
|
||||
while (inst) {
|
||||
NBJTinstance *next_inst = inst->NBJTnextInstance;
|
||||
ONEdestroy(inst->NBJTpDevice);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NBJT2delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
NBJT2instance *inst = (NBJT2instance *) gen_inst;
|
||||
|
||||
TWOdestroy(inst->NBJT2pDevice);
|
||||
|
||||
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,7 +23,6 @@ NBJT2destroy(GENmodel **inModel)
|
|||
NBJT2instance *inst = mod->NBJT2instances;
|
||||
while (inst) {
|
||||
NBJT2instance *next_inst = inst->NBJT2nextInstance;
|
||||
TWOdestroy(inst->NBJT2pDevice);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ NDEVdestroy(GENmodel **inModel)
|
|||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
close(mod->sock);
|
||||
printf("Disconnect to remote NDEV server %s:%d\n", mod->host, mod->port);
|
||||
FREE(mod);
|
||||
mod = next_mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NDEVmDelete(GENmodel *gen_model)
|
||||
{
|
||||
NG_IGNORE(gen_model);
|
||||
NDEVmodel *model = (NDEVmodel *) gen_model;
|
||||
|
||||
close(model->sock);
|
||||
printf("Disconnect to remote NDEV server %s:%d\n", model->host, model->port);
|
||||
|
||||
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,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NUMDdelete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
NUMDinstance *inst = (NUMDinstance *) gen_inst;
|
||||
|
||||
ONEdestroy(inst->NUMDpDevice);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +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,7 +23,6 @@ NUMDdestroy(GENmodel **inModel)
|
|||
NUMDinstance *inst = mod->NUMDinstances;
|
||||
while (inst) {
|
||||
NUMDinstance *next_inst = inst->NUMDnextInstance;
|
||||
ONEdestroy(inst->NUMDpDevice);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NUMD2delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
NUMD2instance *inst = (NUMD2instance *) gen_inst;
|
||||
|
||||
TWOdestroy(inst->NUMD2pDevice);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +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,7 +23,6 @@ NUMD2destroy(GENmodel **inModel)
|
|||
NUMD2instance *inst = mod->NUMD2instances;
|
||||
while (inst) {
|
||||
NUMD2instance *next_inst = inst->NUMD2nextInstance;
|
||||
TWOdestroy(inst->NUMD2pDevice);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,9 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group
|
|||
int
|
||||
NUMOSdelete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
NUMOSinstance *inst = (NUMOSinstance *) gen_inst;
|
||||
|
||||
TWOdestroy(inst->NUMOSpDevice);
|
||||
|
||||
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,7 +23,6 @@ NUMOSdestroy(GENmodel **inModel)
|
|||
NUMOSinstance *inst = mod->NUMOSinstances;
|
||||
while (inst) {
|
||||
NUMOSinstance *next_inst = inst->NUMOSnextInstance;
|
||||
TWOdestroy(inst->NUMOSpDevice);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,5 +30,10 @@ int
|
|||
SOI3delete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
#if 0
|
||||
/* fixme, why not ? */
|
||||
SOI3instance *inst = (SOI3instance *) gen_inst;
|
||||
FREE(inst->SOI3sens);
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ SOI3destroy(GENmodel **inModel)
|
|||
SOI3instance *inst = mod->SOI3instances;
|
||||
while (inst) {
|
||||
SOI3instance *next_inst = inst->SOI3nextInstance;
|
||||
/* FREE(inst->SOI3sens); */
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH
|
|||
int
|
||||
VBICdelete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
VBICinstance *inst = (VBICinstance *) gen_inst;
|
||||
FREE(inst->VBICsens);
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ VBICdestroy(GENmodel **inModel)
|
|||
VBICinstance *inst = mod->VBICinstances;
|
||||
while (inst) {
|
||||
VBICinstance *next_inst = inst->VBICnextInstance;
|
||||
FREE(inst->VBICsens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ Author: 1985 Thomas L. Quarles
|
|||
int
|
||||
VSRCdelete(GENinstance *gen_inst)
|
||||
{
|
||||
NG_IGNORE(gen_inst);
|
||||
VSRCinstance *inst = (VSRCinstance *) gen_inst;
|
||||
|
||||
FREE(inst->VSRCcoeffs);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ VSRCdestroy(GENmodel **inModel)
|
|||
VSRCinstance *inst = mod->VSRCinstances;
|
||||
while (inst) {
|
||||
VSRCinstance *next_inst = inst->VSRCnextInstance;
|
||||
FREE(inst->VSRCcoeffs);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue