Jspice3
Main Page
Data Structures
Files
File List
Globals
b2dest.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 Hong June Park, Thomas L. Quarles
5
1993 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
bsim2def.h
"
11
#include "
util.h
"
12
13
14
void
15
B2destroy
(inModel)
16
GENmodel
**inModel;
17
18
{
19
20
B2model
**
model
= (
B2model
**)inModel;
21
B2instance
*here;
22
B2instance
*prev =
NULL
;
23
B2model
*mod = *
model
;
24
B2model
*oldmod =
NULL
;
25
26
for
( ; mod ; mod = mod->
B2nextModel
) {
27
if
(oldmod)
FREE
(oldmod);
28
oldmod = mod;
29
prev = (
B2instance
*)
NULL
;
30
for
(here = mod->
B2instances
; here ; here = here->
B2nextInstance
) {
31
if
(prev)
FREE
(prev);
32
prev = here;
33
}
34
if
(prev)
FREE
(prev);
35
}
36
if
(oldmod)
FREE
(oldmod);
37
*model =
NULL
;
38
}
39
sBSIM2model::B2instances
B2instance * B2instances
Definition:
bsim2def.h:226
sBSIM2instance::B2nextInstance
struct sBSIM2instance * B2nextInstance
Definition:
bsim2def.h:19
sBSIM2instance
Definition:
bsim2def.h:17
B2destroy
void B2destroy(GENmodel **inModel)
Definition:
b2dest.c:15
FREE
#define FREE(ptr)
Definition:
spdefs.h:436
NULL
#define NULL
Definition:
spdefs.h:121
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
sBSIM2model
Definition:
bsim2def.h:222
model
static char model[32]
Definition:
subckt.c:76
sBSIM2model::B2nextModel
struct sBSIM2model * B2nextModel
Definition:
bsim2def.h:224
bsim2def.h
src
lib
dev
bsim2
b2dest.c
Generated by
1.8.11