diff --git a/src/spicelib/parser/ChangeLog b/src/spicelib/parser/ChangeLog index 28ded0967..a95f19d47 100644 --- a/src/spicelib/parser/ChangeLog +++ b/src/spicelib/parser/ChangeLog @@ -1,6 +1,14 @@ +2000-09-09 Arno W. Peters + + * inp2dot.c: Removed unused static functions dot_ic and + dot_nodeset. + + * inppas2.c: Added back parsing for dotlines. + 2000-09-02 Paolo Nenzi - * 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 diff --git a/src/spicelib/parser/inp2dot.c b/src/spicelib/parser/inp2dot.c index d27b0663f..dfab5c2e7 100644 --- a/src/spicelib/parser/inp2dot.c +++ b/src/spicelib/parser/inp2dot.c @@ -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) diff --git a/src/spicelib/parser/inppas2.c b/src/spicelib/parser/inppas2.c index 278883153..7830da5a0 100644 --- a/src/spicelib/parser/inppas2.c +++ b/src/spicelib/parser/inppas2.c @@ -171,6 +171,11 @@ void INPpas2(void *ckt, card * data, INPtables * tab, void *task) INP2B(ckt, tab, current); break; + case '.': /* . Many possibilities */ + if (INP2dot(ckt,tab,current,task,gnode)) + return; + break; + case 0: break;