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

Go to the source code of this file.

Functions

int ACparse (GENERIC *ckt, INPtables *tab, int which, GENERIC *currentp, char **line, GENERIC *task, GENERIC *gnode)
 
int ParseAC (GENERIC *ckt, char **line, card *current, int which, GENERIC *aptr, INPtables *tab)
 

Function Documentation

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

Definition at line 17 of file acprse.c.

30 {
31  GENERIC *foo; /* pointer to analysis */
32  int error; /* error code temporary */
33  char *token; /* a token from the line */
34  card *current = (card *)currentp;
35 
36  IFC(newAnalysis,(ckt,which,"acan",&foo,task))
37  GCA(ParseAC,(ckt,line,current,which,foo,tab))
38  if (**line) {
39  INPgetTok(line, &token, 1);
40  strtolower(token);
41  if (!strcmp(token,"dc")) {
42  txfree(token);
43  GCA(ParseDC,(ckt,line,current,which,foo,tab,1))
44  if (**line)
45  GCA(ParseDC,(ckt,line,current,which,foo,tab,2))
46  }
47  else {
48  LITERR("Syntax error: 'dc' expected.")
49  }
50  }
51 
52  return (0);
53 }
int ParseAC(GENERIC *ckt, char **line, card *current, int which, GENERIC *aptr, INPtables *tab)
Definition: acprse.c:57
if(TDesc==NULL)
Definition: cd.c:1326
Definition: inpdefs.h:62
#define LITERR(text)
Definition: inpmacs.h:35
Definition: fteinp.h:14
void txfree()
void strtolower()
#define GCA(func, args)
Definition: inpmacs.h:27
#define IFC(func, args)
Definition: inpmacs.h:19
int ParseDC()
char GENERIC
Definition: ifsim.h:27
int INPgetTok()
int ParseAC ( GENERIC ckt,
char **  line,
card current,
int  which,
GENERIC aptr,
INPtables tab 
)

Definition at line 57 of file acprse.c.

65 {
66  char *steptype; /* ac analysis, type of stepping function */
67  IFvalue ptemp; /* a value structure to package stuff into */
68  IFvalue *parm; /* a pointer to a value struct for function returns */
69  int error; /* error code temporary */
70 
71  INPgetTok(line,&steptype,1); /* get DEC, OCT, or LIN */
72  strtolower(steptype);
73  ptemp.iValue = 1;
74  GCA(INPapName,(ckt,which,aptr,steptype,&ptemp))
75  txfree(steptype);
76 
77  parm = INPgetValue(ckt,line,IF_INTEGER,tab); /* number of points */
78  GCA(INPapName,(ckt,which,aptr,"numsteps",parm))
79 
80  parm = INPgetValue(ckt,line,IF_REAL,tab); /* fstart */
81  GCA(INPapName,(ckt,which,aptr,"start",parm))
82 
83  parm = INPgetValue(ckt,line,IF_REAL,tab); /* fstop */
84  GCA(INPapName,(ckt,which,aptr,"stop",parm))
85 
86  return (0);
87 }
IFvalue * INPgetValue()
int iValue
Definition: ifsim.h:232
Definition: fteinp.h:14
static char start[32]
Definition: subckt.c:76
void txfree()
void strtolower()
#define GCA(func, args)
Definition: inpmacs.h:27
#define IF_INTEGER
Definition: ifsim.h:107
#define IF_REAL
Definition: ifsim.h:108
int INPapName()
return(True)
int INPgetTok()