numparm, un-pascal-ify, ws() wln()

This commit is contained in:
rlar 2011-02-19 15:08:20 +00:00
parent 18352e827d
commit 70c97e12bb
5 changed files with 18 additions and 15 deletions

View File

@ -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
* src/frontend/numparam/xpressn.c :
numparm, cleanup, (())

View File

@ -674,7 +674,7 @@ new (size_t sz)
void *p = tmalloc (sz);
if (p == NULL)
{ /* fatal error */
ws (" new() failure. Program halted.\n");
printf (" new() failure. Program halted.\n");
controlled_exit(EXIT_FAILURE);
}
return p;

View File

@ -100,7 +100,7 @@ and substitute node/device name arguments.
dn= runscript(dico, subpfx, idef+1, istop, maxnest-1);
nline= nline+dn;
} 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]) ) {
/* 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 ) {
scopy(t, buf2[idef]);
} else {
ws("Subckt call error: "); ws(s); wln();
printf("Subckt call error: %s\n", s);
}
j=0; ls= length(t);
j= getnextword(t,u,j);
@ -383,7 +383,7 @@ void nupa_test(char * fname, char mode)
}
fclose(tf);
} 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
in all the subsequent manipulations.
@ -417,8 +417,8 @@ void nupa_test(char * fname, char mode)
if ( dic->category[k] == 'X' ) {
if ( parstack< (10-1) ) { Inc(parstack) ;}
getnodelist(formals[parstack], actuals[parstack], s, dic,k);
/*dbg: ws("Form: "); ws(formals[parstack] ); wln(); */
/*dbg: ws("Actu: "); ws(actuals[parstack]); wln(); */;
/*dbg: printf("Form: %s\n", formals[parstack]); */
/*dbg: printf("Actu: %s\n", actuals[parstack]); */;
} else if ( dic->category[k]=='U' ) { /* return from subckt */
if ( parstack>0 ) { Dec(parstack) ;}
}

View File

@ -526,8 +526,8 @@ nupa_done (void)
sadd (&rep, " Errors=");
nadd (&rep, nerrors);
cadd (&rep, '\n');
ws ( spice_dstring_value(&rep) ) ;
ws ("Numparam expansion errors: Run Spice anyway? y/n ? \n");
printf ( "%s", spice_dstring_value(&rep) ) ;
printf ("Numparam expansion errors: Run Spice anyway? y/n ?\n");
spice_dstring_reinit(&rep) ;
rs (&rep);
reply = spice_dstring_value(&rep) ;
@ -903,12 +903,8 @@ nupa_eval (char *s, int linenum, int orig_linenum)
evalcountS++;
#ifdef TRACE_NUMPARAMS
fprintf (stderr, "** SJB - leaving nupa_eval(): %s %d\n", s, err);
ws ("** SJB - --> ");
ws (s);
wln ();
ws ("** SJB - leaving nupa_eval()");
wln ();
wln ();
printf ("** SJB - --> %s\n", s);
printf ("** SJB - leaving nupa_eval()\n\n");
#endif /* TRACE_NUMPARAMS */
if (err)
return 0;

View File

@ -390,7 +390,7 @@ fetchnumentry (tdico * dico, char *t, bool *perr)
entry *entry_p ; /* hash table entry */
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') )
entry_p = entry_p->pointer ;