Jspice3
Main Page
Data Structures
Files
File List
Globals
indfbr.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: 1987 Thomas L. Quarles
5
1992 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
inddefs.h
"
11
#include "
util.h
"
12
#include "
sperror.h
"
13
#include "
cktext.h
"
14
15
16
int
17
INDfindBr
(ckt,inModel,name)
18
19
CKTcircuit
*ckt;
20
GENmodel
*inModel;
21
IFuid
name;
22
{
23
INDmodel
*
model
= (
INDmodel
*)inModel;
24
INDinstance
*here;
25
int
error;
26
CKTnode
*tmp;
27
28
for
( ; model !=
NULL
; model = model->
INDnextModel
) {
29
for
(here = model->
INDinstances
; here !=
NULL
;
30
here = here->
INDnextInstance
) {
31
if
(here->
INDname
== name) {
32
if
(here->
INDbrEq
== 0) {
33
error =
CKTmkCur
(ckt,&tmp,here->
INDname
,
"branch"
);
34
if
(error)
return
(error);
35
here->
INDbrEq
= tmp->
number
;
36
}
37
return
(here->
INDbrEq
);
38
}
39
}
40
}
41
return
(0);
42
}
43
sINDmodel::INDnextModel
struct sINDmodel * INDnextModel
Definition:
inddefs.h:96
INDfindBr
int INDfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name)
Definition:
indfbr.c:17
sINDinstance::INDnextInstance
struct sINDinstance * INDnextInstance
Definition:
inddefs.h:27
CKTcircuit
Definition:
cktdefs.h:62
sCKTnode
Definition:
cktdefs.h:30
inddefs.h
IFuid
GENERIC * IFuid
Definition:
ifsim.h:72
sperror.h
sINDinstance
Definition:
inddefs.h:21
NULL
#define NULL
Definition:
spdefs.h:121
sINDmodel::INDinstances
INDinstance * INDinstances
Definition:
inddefs.h:99
sCKTnode::number
int number
Definition:
cktdefs.h:39
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
CKTmkCur
int CKTmkCur()
model
static char model[32]
Definition:
subckt.c:76
cktext.h
sINDinstance::INDname
IFuid INDname
Definition:
inddefs.h:30
sINDmodel
Definition:
inddefs.h:90
sINDinstance::INDbrEq
int INDbrEq
Definition:
inddefs.h:42
src
lib
dev
ind
indfbr.c
Generated by
1.8.11