improved numparam error message
This commit is contained in:
parent
df4428b239
commit
f1a4f27d21
|
|
@ -343,7 +343,7 @@ do_measure(
|
|||
if ( just_chk_meas != TRUE ) fprintf( stdout, "%-20s=", resname );
|
||||
|
||||
if ( just_chk_meas != TRUE ) {
|
||||
ok = nupa_eval( meas_card->li_line, meas_card->li_linenum );
|
||||
ok = nupa_eval( meas_card->li_line, meas_card->li_linenum, meas_card->li_linenum_orig );
|
||||
|
||||
if ( ok ) {
|
||||
str_ptr = strstr( meas_card->li_line, meastype );
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#define NUPAEVALDONE 3
|
||||
|
||||
extern char * nupa_copy(char *s, int linenum);
|
||||
extern int nupa_eval(char *s, int linenum);
|
||||
extern int nupa_eval(char *s, int linenum, int orig_linenum);
|
||||
extern int nupa_signal(int sig, char *info);
|
||||
extern void nupa_scan(char * s, int linenum, int is_subckt);
|
||||
extern void nupa_list_params();
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ typedef struct _ttdico {
|
|||
/* the input scanner data structure */
|
||||
str80 srcfile; /* last piece of source file name */
|
||||
int srcline;
|
||||
int oldline;
|
||||
int errcount;
|
||||
// entry dat[Maxdico+1];
|
||||
entry* dyndat;
|
||||
|
|
|
|||
|
|
@ -680,7 +680,7 @@ nupa_copy (char *s, int linenum)
|
|||
}
|
||||
|
||||
int
|
||||
nupa_eval (char *s, int linenum)
|
||||
nupa_eval (char *s, int linenum, int orig_linenum)
|
||||
/* s points to a partially transformed line.
|
||||
compute variables if linenum points to a & or .param line.
|
||||
if ( the original is an X line, compute actual params.;
|
||||
|
|
@ -695,14 +695,17 @@ nupa_eval (char *s, int linenum)
|
|||
unsigned char err = 1;
|
||||
|
||||
dico->srcline = linenum;
|
||||
dico->oldline = orig_linenum;
|
||||
c = dico->dyncategory[linenum];
|
||||
#ifdef TRACE_NUMPARAMS
|
||||
fprintf (stderr, "** SJB - in nupa_eval()\n");
|
||||
fprintf (stderr, "** SJB - processing line %3d: %s\n", linenum, s);
|
||||
fprintf (stderr, "** SJB - category '%c'\n", c);
|
||||
#endif /* TRACE_NUMPARAMS */
|
||||
if (c == 'P') /* evaluate parameters */
|
||||
if (c == 'P') { /* evaluate parameters */
|
||||
// err = nupa_substitute (dico, dico->dynrefptr[linenum], s, 0);
|
||||
nupa_assignment (dico, dico->dynrefptr[linenum], 'N');
|
||||
}
|
||||
else if (c == 'B') /* substitute braces line */
|
||||
err = nupa_substitute (dico, dico->dynrefptr[linenum], s, 0);
|
||||
else if (c == 'X')
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ initkeys (void)
|
|||
"and or not div mod if else end while macro funct defined"
|
||||
" include for to downto is var");
|
||||
scopy_up (fmath,
|
||||
"sqr sqrt sin cos exp ln arctan abs pow pwr max min int log sinh cosh tanh ternary_fcn agauss");
|
||||
"sqr sqrt sin cos exp ln arctan abs pow pwr max min int log sinh cosh tanh ternary_fcn v agauss");
|
||||
}
|
||||
|
||||
static double
|
||||
|
|
@ -140,8 +140,11 @@ message (tdico * dic, char *s)
|
|||
}
|
||||
if (dic->srcline >= 0)
|
||||
{
|
||||
sadd (t, "Original line no.: ");
|
||||
nadd (t, dic->oldline);
|
||||
sadd (t, ", new internal line no.: ");
|
||||
nadd (t, dic->srcline);
|
||||
sadd (t, ": ");
|
||||
sadd (t, ":\n");
|
||||
}
|
||||
sadd (t, s);
|
||||
cadd (t, '\n');
|
||||
|
|
|
|||
|
|
@ -348,10 +348,9 @@ inp_subcktexpand(struct line *deck)
|
|||
/* 'param' .meas statements can have dependencies on measurement values */
|
||||
/* need to skip evaluating here and evaluate after other .meas statements */
|
||||
if ( ciprefix( ".meas", c->li_line ) ) {
|
||||
if ( !strstr( c->li_line, "param" ) ) nupa_eval( c->li_line, c->li_linenum);
|
||||
if ( !strstr( c->li_line, "param" ) ) nupa_eval( c->li_line, c->li_linenum, c->li_linenum_orig);
|
||||
} else {
|
||||
/*ok = ok && nupa_eval( c->li_line, c->li_linenum);*/
|
||||
nupa_eval( c->li_line, c->li_linenum);
|
||||
nupa_eval( c->li_line, c->li_linenum, c->li_linenum_orig);
|
||||
}
|
||||
c= c->li_next;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue