nupa_substitute(), drop unused argument `err'

This commit is contained in:
rlar 2016-05-15 20:01:31 +02:00
parent e212566176
commit aa5d48da3b
3 changed files with 7 additions and 7 deletions

View File

@ -65,7 +65,7 @@ int donedico(dico_t *);
void dico_free_entry(entry_t *);
bool defsubckt(dico_t *, struct card *, nupa_type categ);
int findsubckt(dico_t *, char *s);
bool nupa_substitute(dico_t *, char *s, char *r, bool err);
bool nupa_substitute(dico_t *, char *s, char *r);
bool nupa_assignment(dico_t *, char *s, char mode);
bool nupa_subcktcall(dico_t *, char *s, char *x, char *inst_name);
void nupa_subcktexit(dico_t *);

View File

@ -819,10 +819,10 @@ nupa_eval(struct card *card)
#endif
if (c == 'P') { /* evaluate parameters */
// err = nupa_substitute(dico, dico->dynrefptr[linenum], s, 0);
// err = nupa_substitute(dico, dico->dynrefptr[linenum], s);
nupa_assignment(dicoS, dicoS->dynrefptr[linenum], 'N');
} else if (c == 'B') { /* substitute braces line */
err = nupa_substitute(dicoS, dicoS->dynrefptr[linenum], s, 0);
err = nupa_substitute(dicoS, dicoS->dynrefptr[linenum], s);
} else if (c == 'X') {
/* compute args of subcircuit, if required */
char *inst_name = copy_substring(s, skip_non_ws(s));

View File

@ -1187,15 +1187,17 @@ insertnumber(dico_t *dico, int i, char *s, SPICE_DSTRINGPTR ustr_p)
bool
nupa_substitute(dico_t *dico, char *s, char *r, bool err)
nupa_substitute(dico_t *dico, char *s, char *r)
/* s: pointer to original source line.
r: pointer to result line, already heavily modified wrt s
anywhere we find a 10-char numstring in r, substitute it.
bug: wont flag overflow!
*/
{
int i, k, ls, level, nnest, ir;
int i, k, ls, level, nnest, ir = 0;
char c, d;
bool err = 0;
SPICE_DSTRING qstr; /* temp result dynamic string */
SPICE_DSTRING tstr; /* temp dynamic string */
@ -1203,8 +1205,6 @@ nupa_substitute(dico_t *dico, char *s, char *r, bool err)
spice_dstring_init(&tstr);
i = 0;
ls = (int) strlen(s);
err = 0;
ir = 0;
while ((i < ls) && !err) {
i++;