Jspice3
pzprse.c File Reference
#include "spice.h"
#include "ftedefs.h"
#include "inpdefs.h"
#include "inpmacs.h"
#include "misc.h"
Include dependency graph for pzprse.c:

Go to the source code of this file.

Functions

int PZparse (GENERIC *ckt, INPtables *tab, int which, GENERIC *currentp, char **line, GENERIC *task, GENERIC *gnode)
 

Function Documentation

int PZparse ( GENERIC ckt,
INPtables tab,
int  which,
GENERIC currentp,
char **  line,
GENERIC task,
GENERIC gnode 
)

Definition at line 17 of file pzprse.c.

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 }
IFvalue * INPgetValue()
if(TDesc==NULL)
Definition: cd.c:1326
Definition: inpdefs.h:62
Definition: fteinp.h:14
void txfree()
void strtolower()
#define GCA(func, args)
Definition: inpmacs.h:27
#define IFC(func, args)
Definition: inpmacs.h:19
Definition: cddefs.h:177
int INPapName()
return(True)
#define IF_NODE
Definition: ifsim.h:110
char GENERIC
Definition: ifsim.h:27
int INPgetTok()