numparm, un-pascal-ify, ws() wln()
This commit is contained in:
parent
18352e827d
commit
70c97e12bb
|
|
@ -1,3 +1,10 @@
|
||||||
|
2011-02-19 Robert Larice
|
||||||
|
* src/frontend/numparam/mystring.c ,
|
||||||
|
* src/frontend/numparam/nupatest.c ,
|
||||||
|
* src/frontend/numparam/spicenum.c ,
|
||||||
|
* src/frontend/numparam/xpressn.c :
|
||||||
|
numparm, un-pascal-ify, ws() wln()
|
||||||
|
|
||||||
2011-02-19 Robert Larice
|
2011-02-19 Robert Larice
|
||||||
* src/frontend/numparam/xpressn.c :
|
* src/frontend/numparam/xpressn.c :
|
||||||
numparm, cleanup, (())
|
numparm, cleanup, (())
|
||||||
|
|
|
||||||
|
|
@ -674,7 +674,7 @@ new (size_t sz)
|
||||||
void *p = tmalloc (sz);
|
void *p = tmalloc (sz);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{ /* fatal error */
|
{ /* fatal error */
|
||||||
ws (" new() failure. Program halted.\n");
|
printf (" new() failure. Program halted.\n");
|
||||||
controlled_exit(EXIT_FAILURE);
|
controlled_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ and substitute node/device name arguments.
|
||||||
dn= runscript(dico, subpfx, idef+1, istop, maxnest-1);
|
dn= runscript(dico, subpfx, idef+1, istop, maxnest-1);
|
||||||
nline= nline+dn;
|
nline= nline+dn;
|
||||||
} else { /* FIXME: error message here! */
|
} else { /* FIXME: error message here! */
|
||||||
ws("cannot find subckt "); ws(buf2[i]); wln();
|
printf("cannot find subckt %s\n", buf2[i]);
|
||||||
}
|
}
|
||||||
} else if ( (c != '?') && NotZ(buf2[i][0]) ) {
|
} else if ( (c != '?') && NotZ(buf2[i][0]) ) {
|
||||||
/* keep any other valid non-empty line, and its prefix pointer */
|
/* keep any other valid non-empty line, and its prefix pointer */
|
||||||
|
|
@ -342,7 +342,7 @@ void getnodelist(char * form, char * act, char * s, tdico *dic, int k)
|
||||||
if ( idef>0 ) {
|
if ( idef>0 ) {
|
||||||
scopy(t, buf2[idef]);
|
scopy(t, buf2[idef]);
|
||||||
} else {
|
} else {
|
||||||
ws("Subckt call error: "); ws(s); wln();
|
printf("Subckt call error: %s\n", s);
|
||||||
}
|
}
|
||||||
j=0; ls= length(t);
|
j=0; ls= length(t);
|
||||||
j= getnextword(t,u,j);
|
j= getnextword(t,u,j);
|
||||||
|
|
@ -383,7 +383,7 @@ void nupa_test(char * fname, char mode)
|
||||||
}
|
}
|
||||||
fclose(tf);
|
fclose(tf);
|
||||||
} else {
|
} else {
|
||||||
ws("Cannot find "); ws(fname); wln();
|
printf("Cannot find %s\n", fname);
|
||||||
}
|
}
|
||||||
/* continuation lines are glued at this stage, so they can be ignored
|
/* continuation lines are glued at this stage, so they can be ignored
|
||||||
in all the subsequent manipulations.
|
in all the subsequent manipulations.
|
||||||
|
|
@ -417,8 +417,8 @@ void nupa_test(char * fname, char mode)
|
||||||
if ( dic->category[k] == 'X' ) {
|
if ( dic->category[k] == 'X' ) {
|
||||||
if ( parstack< (10-1) ) { Inc(parstack) ;}
|
if ( parstack< (10-1) ) { Inc(parstack) ;}
|
||||||
getnodelist(formals[parstack], actuals[parstack], s, dic,k);
|
getnodelist(formals[parstack], actuals[parstack], s, dic,k);
|
||||||
/*dbg: ws("Form: "); ws(formals[parstack] ); wln(); */
|
/*dbg: printf("Form: %s\n", formals[parstack]); */
|
||||||
/*dbg: ws("Actu: "); ws(actuals[parstack]); wln(); */;
|
/*dbg: printf("Actu: %s\n", actuals[parstack]); */;
|
||||||
} else if ( dic->category[k]=='U' ) { /* return from subckt */
|
} else if ( dic->category[k]=='U' ) { /* return from subckt */
|
||||||
if ( parstack>0 ) { Dec(parstack) ;}
|
if ( parstack>0 ) { Dec(parstack) ;}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -526,8 +526,8 @@ nupa_done (void)
|
||||||
sadd (&rep, " Errors=");
|
sadd (&rep, " Errors=");
|
||||||
nadd (&rep, nerrors);
|
nadd (&rep, nerrors);
|
||||||
cadd (&rep, '\n');
|
cadd (&rep, '\n');
|
||||||
ws ( spice_dstring_value(&rep) ) ;
|
printf ( "%s", spice_dstring_value(&rep) ) ;
|
||||||
ws ("Numparam expansion errors: Run Spice anyway? y/n ? \n");
|
printf ("Numparam expansion errors: Run Spice anyway? y/n ?\n");
|
||||||
spice_dstring_reinit(&rep) ;
|
spice_dstring_reinit(&rep) ;
|
||||||
rs (&rep);
|
rs (&rep);
|
||||||
reply = spice_dstring_value(&rep) ;
|
reply = spice_dstring_value(&rep) ;
|
||||||
|
|
@ -903,12 +903,8 @@ nupa_eval (char *s, int linenum, int orig_linenum)
|
||||||
evalcountS++;
|
evalcountS++;
|
||||||
#ifdef TRACE_NUMPARAMS
|
#ifdef TRACE_NUMPARAMS
|
||||||
fprintf (stderr, "** SJB - leaving nupa_eval(): %s %d\n", s, err);
|
fprintf (stderr, "** SJB - leaving nupa_eval(): %s %d\n", s, err);
|
||||||
ws ("** SJB - --> ");
|
printf ("** SJB - --> %s\n", s);
|
||||||
ws (s);
|
printf ("** SJB - leaving nupa_eval()\n\n");
|
||||||
wln ();
|
|
||||||
ws ("** SJB - leaving nupa_eval()");
|
|
||||||
wln ();
|
|
||||||
wln ();
|
|
||||||
#endif /* TRACE_NUMPARAMS */
|
#endif /* TRACE_NUMPARAMS */
|
||||||
if (err)
|
if (err)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,7 @@ fetchnumentry (tdico * dico, char *t, bool *perr)
|
||||||
entry *entry_p ; /* hash table entry */
|
entry *entry_p ; /* hash table entry */
|
||||||
|
|
||||||
entry_p = entrynb (dico, t); /* no keyword */
|
entry_p = entrynb (dico, t); /* no keyword */
|
||||||
/*dbg -- if ( k<=0 ) { ws("Dico num lookup fails. ") ;} */
|
/*dbg -- if ( k<=0 ) { printf("Dico num lookup fails.") ;} */
|
||||||
|
|
||||||
while ( entry_p && (entry_p->tp == 'P') )
|
while ( entry_p && (entry_p->tp == 'P') )
|
||||||
entry_p = entry_p->pointer ;
|
entry_p = entry_p->pointer ;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue