Jspice3
srcdest.c File Reference
#include "spice.h"
#include <stdio.h>
#include "srcdefs.h"
#include "util.h"
Include dependency graph for srcdest.c:

Go to the source code of this file.

Functions

void SRCdestroy (GENmodel **inModel)
 

Function Documentation

void SRCdestroy ( GENmodel **  inModel)

Definition at line 16 of file srcdest.c.

19 {
20  SRCmodel **model = (SRCmodel **)inModel;
21  SRCinstance *here, *next;
22  SRCmodel *mod, *nextmod;
23 
24  for (mod = *model; mod; mod = nextmod) {
25  nextmod = mod->SRCnextModel;
26  for (here = mod->SRCinstances; here; here = next) {
27  next = here->SRCnextInstance;
28  FREE(here->SRCvalues);
29  FREE(here->SRCderivs);
30  FREE(here->SRCeqns);
31  FREE(here->SRCacValues);
32  FREE(here->SRCposptr);
33  if (here->SRCtree)
34  (*here->SRCtree->IFfree)(here->SRCtree);
35  FREE(here);
36  }
37  FREE(mod);
38  }
39  *model = NULL;
40 }
struct sSRCinstance * SRCnextInstance
Definition: srcdefs.h:26
double * SRCvalues
Definition: srcdefs.h:109
int * SRCeqns
Definition: srcdefs.h:118
#define FREE(ptr)
Definition: spdefs.h:436
#define NULL
Definition: spdefs.h:121
SRCinstance * SRCinstances
Definition: srcdefs.h:205
double ** SRCposptr
Definition: srcdefs.h:53
static char model[32]
Definition: subckt.c:76
double * SRCacValues
Definition: srcdefs.h:106
double * SRCderivs
Definition: srcdefs.h:115
IFparseTree * SRCtree
Definition: srcdefs.h:103
struct sSRCmodel * SRCnextModel
Definition: srcdefs.h:202