Jspice3
Main Page
Data Structures
Files
File List
Globals
b2del.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 "
sperror.h
"
12
#include "
util.h
"
13
14
15
int
16
B2delete
(inModel,name,inInst)
17
GENmodel
*inModel;
18
IFuid
name;
19
GENinstance
**inInst;
20
21
{
22
23
B2instance
**fast = (
B2instance
**)inInst;
24
B2model
*
model
= (
B2model
*)inModel;
25
B2instance
**prev =
NULL
;
26
B2instance
*here;
27
28
for
( ;
model
; model = model->
B2nextModel
) {
29
prev = &(model->
B2instances
);
30
for
(here = *prev; here ; here = *prev) {
31
if
(here->
B2name
== name || (fast && here==*fast) ) {
32
*prev= here->
B2nextInstance
;
33
FREE
(here);
34
return
(
OK
);
35
}
36
prev = &(here->
B2nextInstance
);
37
}
38
}
39
return
(
E_NODEV
);
40
}
sBSIM2model::B2instances
B2instance * B2instances
Definition:
bsim2def.h:226
sBSIM2instance::B2nextInstance
struct sBSIM2instance * B2nextInstance
Definition:
bsim2def.h:19
sBSIM2instance
Definition:
bsim2def.h:17
E_NODEV
#define E_NODEV
Definition:
iferrmsg.h:22
FREE
#define FREE(ptr)
Definition:
spdefs.h:436
OK
#define OK
Definition:
iferrmsg.h:17
IFuid
GENERIC * IFuid
Definition:
ifsim.h:72
sperror.h
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
B2delete
int B2delete(GENmodel *inModel, IFuid name, GENinstance **inInst)
Definition:
b2del.c:16
bsim2def.h
sGENinstance
Definition:
gendefs.h:24
sBSIM2instance::B2name
IFuid B2name
Definition:
bsim2def.h:21
src
lib
dev
bsim2
b2del.c
Generated by
1.8.11