diff --git a/src/circuit/ChangeLog b/src/circuit/ChangeLog
index e4c7f2912..04b359876 100644
--- a/src/circuit/ChangeLog
+++ b/src/circuit/ChangeLog
@@ -1,8 +1,10 @@
-2000-05-21 Paolo Nenzi
-
- * inp2r.c: Modified ac parameter parsing code to conform to
- spice parameter parsing format
+2000-05-22 Paolo Nenzi
+ * inp2dot.c: Applied Widlok patch.
+ * inpdoopt.c: Applied Widolok patch:commented the entire function,
+ seems obsolete.
+ * inpptree.c, ptfuncs.c: Applied Widlok patch. Now there is a
+ new step function called u2.
2000-04-04 Paolo Nenzi
* inpfindl.c: Modified the file for BSIM4 and future extensions to
diff --git a/src/circuit/inp2dot.c b/src/circuit/inp2dot.c
index 722b172f8..45e946c7b 100644
--- a/src/circuit/inp2dot.c
+++ b/src/circuit/inp2dot.c
@@ -448,14 +448,18 @@ char *word; /* something to stick a word of input into */
/* not allowed to pay attention to additional input - return */
return(1);
/*NOTREACHED*/
+/* MW. .options is handled before - this is not needed
} else if ( (strcmp(token,".options")==0) ||
(strcmp(token,".option")==0) ||
(strcmp(token,".opt")==0) ){
- /* .option - specify program options - rather complicated */
- /* use a subroutine to handle all of them to keep this */
- /* subroutine managable */
+ * .option - specify program options - rather complicated /
+ * use a subroutine to handle all of them to keep this /
+ * subroutine managable /
INPdoOpts(ckt,ft_curckt->ci_curOpt,current,tab);
return(0);
+INPdoOpts is never called (I hope) */
+
+
} else if (strcmp(token, ".sens") == 0) {
which = -1; /* Bug fix from Glao Dezai */
for(i=0;inumAnalyses;i++) {
diff --git a/src/circuit/inpdoopt.c b/src/circuit/inpdoopt.c
index baa937ee4..9058994e3 100644
--- a/src/circuit/inpdoopt.c
+++ b/src/circuit/inpdoopt.c
@@ -16,6 +16,7 @@ Author: 1985 Thomas L. Quarles
#include "fteext.h"
#include "inp.h"
+/* MW. this is never called - look at inp2dot.c
void
INPdoOpts(void *ckt, void *anal, card *optCard, INPtables *tab)
{
@@ -44,7 +45,7 @@ INPdoOpts(void *ckt, void *anal, card *optCard, INPtables *tab)
return;
}
line = optCard->line;
- INPgetTok(&line,&token,1); /* throw away '.option' */
+ INPgetTok(&line,&token,1); * throw away '.option' *
while (*line) {
INPgetTok(&line,&token,1);
for(i=0;inumParms;i++) {
@@ -80,3 +81,4 @@ INPdoOpts(void *ckt, void *anal, card *optCard, INPtables *tab)
}
}
}
+*/
diff --git a/src/circuit/inpptree.c b/src/circuit/inpptree.c
index a438bf188..83b8e014f 100644
--- a/src/circuit/inpptree.c
+++ b/src/circuit/inpptree.c
@@ -77,7 +77,9 @@ static struct func {
{ "tanh", PTF_TANH, PTtanh } ,
{ "u", PTF_USTEP, PTustep } ,
{ "uramp", PTF_URAMP, PTuramp } ,
- { "-", PTF_UMINUS, PTuminus }
+ { "-", PTF_UMINUS, PTuminus },
+ /* MW. cif function added */
+ { "u2", PTF_USTEP2, PTustep2}
} ;
#define NUM_FUNCS (sizeof (funcs) / sizeof (struct func))
@@ -329,6 +331,11 @@ PTdifferentiate(INPparseNode *p, int varnum)
arg1 = mkf(PTF_USTEP, p->left);
break;
+/* MW. PTF_CIF for new cif function */
+ case PTF_USTEP2:
+ arg1 = mkcon((double) 0.0);
+ break;
+
case PTF_UMINUS: /* - 1 ; like a constant (was 0 !) */
arg1 = mkcon((double) - 1.0);
break;
@@ -896,6 +903,10 @@ PTlexer(char **line)
char *sbuf, *s;
sbuf = *line;
+#ifdef notdef
+ printf("entering lexer, sbuf = '%s', lastoken = %d, lasttype = %d\n",
+ sbuf, lasttoken, lasttype);
+#endif
while ((*sbuf == ' ') || (*sbuf == '\t') || (*sbuf == '='))
sbuf++;
@@ -987,7 +998,7 @@ PTlexer(char **line)
return (&el);
}
-#if 0
+#ifdef notdef
/* Debugging stuff. */