* inp2dot.c: Removed unused static functions dot_ic and

dot_nodeset.

	* inppas2.c: Added back parsing for dotlines.
This commit is contained in:
arno 2000-09-09 12:04:51 +00:00
parent 2680129539
commit 187600fe61
3 changed files with 15 additions and 98 deletions

View File

@ -1,6 +1,14 @@
2000-09-09 Arno W. Peters <A.W.Peters@ieee.org>
* inp2dot.c: Removed unused static functions dot_ic and
dot_nodeset.
* inppas2.c: Added back parsing for dotlines.
2000-09-02 Paolo Nenzi <p.nenzi@ieee.org>
* Patched with code sent by Alan Gillespie. See more on top
level ChangeLog.
* Patched with code sent by Alan Gillespie. See more on top level
ChangeLog.
2000-07-07 Arno W. Peters <A.W.Peters@ieee.org>

View File

@ -12,54 +12,6 @@ Modified: 2000 AlansFixes
#include "fteext.h"
#include "inp.h"
static int
dot_nodeset(char *line, void *ckt, INPtables *tab, card *current,
void *task, void *gnode)
{
int which; /* which analysis we are performing */
int error; /* error code temporary */
char *name; /* the resistor's name */
void *node1; /* the first node's node pointer */
IFvalue ptemp; /* a value structure to package resistance into */
IFparm *prm; /* pointer to parameter to search through array */
/* .nodeset */
which = -1;
for (prm = ft_sim->nodeParms;
prm < ft_sim->nodeParms + ft_sim->numNodeParms; prm++) {
if (strcmp(prm->keyword, "nodeset") == 0) {
which = prm->id;
break;
}
}
if (which == -1) {
LITERR("nodeset unknown to simulator. \n");
return (0);
}
for (;;) {
int length;
/* loop until we run out of data */
INPgetTok(&line, &name, 1);
/* check to see if in the form V(xxx) and grab the xxx */
if (*name == (char) NULL)
break; /* end of line */
length = strlen(name);
if ((*name == 'V' || *(name) == 'v') && (length == 1)) {
/* looks like V - must be V(xx) - get xx now */
INPgetTok(&line, &name, 1);
INPtermInsert(ckt, &name, tab, &node1);
ptemp.rValue = INPevaluate(&line, &error, 1);
IFC(setNodeParm, (ckt, node1, which, &ptemp, (IFvalue *) NULL));
continue;
}
LITERR(" Error: .nodeset syntax error.\n");
break;
}
return (0);
}
static int
dot_noise(char *line, void *ckt, INPtables *tab, card *current,
@ -235,54 +187,6 @@ dot_disto(char *line, void *ckt, INPtables *tab, card *current,
}
static int
dot_ic(char *line, void *ckt, INPtables *tab, card *current,
void *task, void *gnode, void *foo)
{
int which; /* which analysis we are performing */
int error; /* error code temporary */
IFvalue ptemp; /* a value structure to package resistance into */
IFparm *prm; /* pointer to parameter to search through array */
void *node1; /* the first node's node pointer */
/* .ic */
which = -1;
for (prm = ft_sim->nodeParms;
prm < ft_sim->nodeParms + ft_sim->numNodeParms; prm++) {
if (strcmp(prm->keyword, "ic") == 0) {
which = prm->id;
break;
}
}
if (which == -1) {
LITERR("ic unknown to simulator. \n");
return (0);
}
for (;;) {
/* loop until we run out of data */
int length;
char *name; /* the resistor's name */
INPgetTok(&line, &name, 1);
/* check to see if in the form V(xxx) and grab the xxx */
if (*name == 0)
break; /* end of line */
length = strlen(name);
if ((*name == 'V' || *(name) == 'v') && (length == 1)) {
/* looks like V - must be V(xx) - get xx now */
INPgetTok(&line, &name, 1);
INPtermInsert(ckt, &name, tab, &node1);
ptemp.rValue = INPevaluate(&line, &error, 1);
IFC(setNodeParm, (ckt, node1, which, &ptemp, (IFvalue *) NULL));
continue;
}
LITERR(" Error: .ic syntax error.\n");
break;
}
return 0;
}
static int
dot_ac(char *line, void *ckt, INPtables *tab, card *current,
void *task, void *gnode, void *foo)

View File

@ -171,6 +171,11 @@ void INPpas2(void *ckt, card * data, INPtables * tab, void *task)
INP2B(ckt, tab, current);
break;
case '.': /* .<something> Many possibilities */
if (INP2dot(ckt,tab,current,task,gnode))
return;
break;
case 0:
break;