Jspice3
Main Page
Data Structures
Files
File List
Globals
gendest.c
Go to the documentation of this file.
1
/***************************************************************************
2
JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3
Copyright 1990 Regents of the University of California. All rights reserved.
4
Authors: 1985 Thomas L. Quarles
5
1993 Stephen R. Whiteley
6
****************************************************************************/
7
8
/*
9
* This routine deletes all typed models and instances from the circuit
10
* and frees the storage they were using.
11
*/
12
13
#include "
spice.h
"
14
#include <stdio.h>
15
#include "
gendefs.h
"
16
#include "
util.h
"
17
18
19
void
20
GENdestroy
(
model
)
21
22
GENmodel
**
model
;
23
{
24
25
GENinstance
*here, *next;
26
GENmodel
*mod, *nextmod;
27
28
for
(mod = *model; mod; mod = nextmod) {
29
nextmod = mod->
GENnextModel
;
30
for
(here = mod->
GENinstances
; here; here = next) {
31
next = here->
GENnextInstance
;
32
FREE
(here);
33
}
34
FREE
(mod);
35
}
36
*model =
NULL
;
37
}
sGENinstance::GENnextInstance
struct sGENinstance * GENnextInstance
Definition:
gendefs.h:26
sGENmodel::GENnextModel
struct sGENmodel * GENnextModel
Definition:
gendefs.h:41
FREE
#define FREE(ptr)
Definition:
spdefs.h:436
gendefs.h
NULL
#define NULL
Definition:
spdefs.h:121
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
model
static char model[32]
Definition:
subckt.c:76
GENdestroy
void GENdestroy(GENmodel **model)
Definition:
gendest.c:20
sGENmodel::GENinstances
GENinstance * GENinstances
Definition:
gendefs.h:43
sGENinstance
Definition:
gendefs.h:24
src
lib
dev
gendest.c
Generated by
1.8.11