Jspice3
Main Page
Data Structures
Files
File List
Globals
pzprse.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
1993 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include "
ftedefs.h
"
10
#include "
inpdefs.h
"
11
#include "
inpmacs.h
"
12
#include "
misc.h
"
13
14
15
/* ARGSUSED */
16
int
17
PZparse
(ckt,
tab
,which,currentp,
line
,task,gnode)
18
19
/* .pz nodeI nodeG nodeJ nodeK {V I} {POL ZER PZ} */
20
GENERIC
*ckt;
21
INPtables
*
tab
;
22
int
which;
23
GENERIC
*currentp;
24
char
**
line
;
25
GENERIC
*task;
26
GENERIC
*gnode;
27
{
28
char
*steptype;
/* type of stepping function */
29
GENERIC
*foo;
/* pointer to analysis */
30
IFvalue
ptemp;
/* a value structure to package stuff into */
31
IFvalue
*parm;
/* a pointer to a value struct for function returns */
32
int
error;
/* error code temporary */
33
card
*current = (
card
*)currentp;
34
35
IFC
(newAnalysis,(ckt,which,
"pole-zero analysis"
,&foo, task))
36
37
parm =
INPgetValue
(ckt,line,
IF_NODE
,tab);
38
GCA
(
INPapName
,(ckt,which,foo,
"nodei"
,parm))
39
40
parm =
INPgetValue
(ckt,line,
IF_NODE
,tab);
41
GCA
(
INPapName
,(ckt,which,foo,
"nodeg"
,parm))
42
43
parm =
INPgetValue
(ckt,line,
IF_NODE
,tab);
44
GCA
(
INPapName
,(ckt,which,foo,
"nodej"
,parm))
45
46
parm =
INPgetValue
(ckt,line,
IF_NODE
,tab);
47
GCA
(
INPapName
,(ckt,which,foo,
"nodek"
,parm))
48
49
INPgetTok
(line,&steptype,1);
/* get V or I */
50
steptype[1] =
'\0'
;
51
strtolower
(steptype);
52
if
(*steptype ==
'c'
)
/* recognize "cur" */
53
*steptype =
'i'
;
54
ptemp.
iValue
= 1;
55
GCA
(
INPapName
,(ckt,which,foo,steptype,&ptemp))
56
txfree
(steptype);
57
58
INPgetTok
(line,&steptype,1);
/* get POL, ZER, or PZ */
59
steptype[3] =
'\0'
;
/* "pole", "zero" OK */
60
strtolower
(steptype);
61
ptemp.
iValue
= 1;
62
GCA
(
INPapName
,(ckt,which,foo,steptype,&ptemp))
63
txfree
(steptype);
64
65
return
(0);
66
}
misc.h
INPgetValue
IFvalue * INPgetValue()
card
Definition:
inpdefs.h:62
tab
Definition:
subckt.c:51
uIFvalue::iValue
int iValue
Definition:
ifsim.h:232
line
Definition:
fteinp.h:14
txfree
void txfree()
inpdefs.h
strtolower
void strtolower()
GCA
#define GCA(func, args)
Definition:
inpmacs.h:27
IFC
#define IFC(func, args)
Definition:
inpmacs.h:19
PZparse
int PZparse(GENERIC *ckt, INPtables *tab, int which, GENERIC *currentp, char **line, GENERIC *task, GENERIC *gnode)
Definition:
pzprse.c:17
spice.h
INPapName
int INPapName()
ftedefs.h
inpmacs.h
uIFvalue
Definition:
ifsim.h:231
IF_NODE
#define IF_NODE
Definition:
ifsim.h:110
sINPtables
Definition:
inpdefs.h:30
GENERIC
char GENERIC
Definition:
ifsim.h:27
INPgetTok
int INPgetTok()
src
lib
analysis
pzprse.c
Generated by
1.8.11