Jspice3
Main Page
Data Structures
Files
File List
Globals
ltradest.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 "
ltradefs.h
"
16
#include "
util.h
"
17
18
19
void
20
LTRAdestroy
(
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
(((
LTRAinstance
*)here)->LTRAv1);
33
FREE
(((
LTRAinstance
*)here)->LTRAi1);
34
FREE
(((
LTRAinstance
*)here)->LTRAv2);
35
FREE
(((
LTRAinstance
*)here)->LTRAi2);
36
FREE
(here);
37
}
38
FREE
(((
LTRAmodel
*)mod)->LTRAh1dashCoeffs);
39
FREE
(((
LTRAmodel
*)mod)->LTRAh2Coeffs);
40
FREE
(((
LTRAmodel
*)mod)->LTRAh3dashCoeffs);
41
FREE
(mod);
42
}
43
*model =
NULL
;
44
}
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
sLTRAmodel
Definition:
ltradefs.h:79
NULL
#define NULL
Definition:
spdefs.h:121
LTRAdestroy
void LTRAdestroy(GENmodel **model)
Definition:
ltradest.c:20
sLTRAinstance
Definition:
ltradefs.h:19
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
model
static char model[32]
Definition:
subckt.c:76
sGENmodel::GENinstances
GENinstance * GENinstances
Definition:
gendefs.h:43
sGENinstance
Definition:
gendefs.h:24
ltradefs.h
src
lib
dev
ltra
ltradest.c
Generated by
1.8.11