Another patch for rework-11


To ng-spice@ieee.ing.uniroma1.it
From Manfred Metzger <ManfredMetzger@gmx.de>
Date Tue, 30 May 2000 22:02:04 +0200
Delivered-To mailing list ng-spice@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice@ieee.ing.uniroma1.it
Sender root

Hi!

The commands .ac, .disto, . nodeset, .noise, .ic, .pz and .dc
do not get parsed correctly. You get messages like this:

Error on line 6 : .ac dec 10 1 10k
        no such parameter on this device

        parameter value out of range or the wrong type

        parameter value out of range or the wrong type

The following patch for src/circuit/inp2dot.c corrects this.
I don't like this patch very much, but at least it works (I hope).

Regards,

Manni

----------------------------------------------
--- inp2dot.c.orig Sun May 28 09:46:57 2000
+++ inp2dot.c Tue May 30 21:33:43 2000
@@ -39,6 +39,7 @@
  LITERR("nodeset unknown to simulator. \n");
  return (0);
     }
+    INPgetTok(&line, &name, 1); /* [mme] skip .nodeset */
     for (;;) {
  int length;

@@ -101,6 +102,7 @@
     }
     IFC(newAnalysis, (ckt, which, "Noise Analysis", &foo, task));
     INPgetTok(&line, &name, 1);
+    INPgetTok(&line, &name, 1); /* [mme] skip .noise */

     /* Make sure the ".noise" command is followed by V(xxxx).  If it
        is, extract 'xxxx'.  If not, report an error. */
@@ -228,6 +230,7 @@
  LITERR("Small signal distortion analysis unsupported.\n");
  return (0);
     }
+    INPgetTok(&line, &steptype, 1); /* [mme] skip .disto */
     IFC(newAnalysis, (ckt, which, "Distortion Analysis", &foo, task));
     INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */
     ptemp.iValue = 1;
@@ -273,6 +276,7 @@
  LITERR("ic unknown to simulator. \n");
  return (0);
     }
+    INPgetTok(&line, &node1, 1); /* [mme] skip .ic */
     for (;;) {  /* loop until we run out of data */
  int length;
  char *name;  /* the resistor's name */
@@ -324,6 +328,7 @@
  LITERR("AC small signal analysis unsupported.\n");
  return (0);
     }
+    INPgetTok(&line, &steptype, 1); /* [mme] skip .ac */
     IFC(newAnalysis, (ckt, which, "AC Analysis", &foo, task))
  INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */
     ptemp.iValue = 1;
@@ -363,6 +368,7 @@
  LITERR("Pole-zero analysis unsupported.\n");
  return (0);
     }
+    INPgetTok(&line, &steptype, 1); /* [mme] skip .pz */
     IFC(newAnalysis, (ckt, which, "Pole-Zero Analysis", &foo, task))
  parm = INPgetValue(ckt, &line, IF_NODE, tab);
     GCA(INPapName, (ckt, which, foo, "nodei", parm))
@@ -411,6 +417,7 @@
     }
     IFC(newAnalysis, (ckt, which, "DC transfer characteristic", &foo, task));
     INPgetTok(&line, &name, 1);
+    INPgetTok(&line, &name, 1); /* [mme] skip .dc */
     INPinsert(&name, tab);
     ptemp.uValue = name;
     GCA(INPapName, (ckt, which, foo, "name1", &ptemp));



Partial thread listing: