nupa_substitute(), drop unused argument `err'
This commit is contained in:
parent
e212566176
commit
aa5d48da3b
|
|
@ -65,7 +65,7 @@ int donedico(dico_t *);
|
||||||
void dico_free_entry(entry_t *);
|
void dico_free_entry(entry_t *);
|
||||||
bool defsubckt(dico_t *, struct card *, nupa_type categ);
|
bool defsubckt(dico_t *, struct card *, nupa_type categ);
|
||||||
int findsubckt(dico_t *, char *s);
|
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_assignment(dico_t *, char *s, char mode);
|
||||||
bool nupa_subcktcall(dico_t *, char *s, char *x, char *inst_name);
|
bool nupa_subcktcall(dico_t *, char *s, char *x, char *inst_name);
|
||||||
void nupa_subcktexit(dico_t *);
|
void nupa_subcktexit(dico_t *);
|
||||||
|
|
|
||||||
|
|
@ -819,10 +819,10 @@ nupa_eval(struct card *card)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (c == 'P') { /* evaluate parameters */
|
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');
|
nupa_assignment(dicoS, dicoS->dynrefptr[linenum], 'N');
|
||||||
} else if (c == 'B') { /* substitute braces line */
|
} 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') {
|
} else if (c == 'X') {
|
||||||
/* compute args of subcircuit, if required */
|
/* compute args of subcircuit, if required */
|
||||||
char *inst_name = copy_substring(s, skip_non_ws(s));
|
char *inst_name = copy_substring(s, skip_non_ws(s));
|
||||||
|
|
|
||||||
|
|
@ -1187,15 +1187,17 @@ insertnumber(dico_t *dico, int i, char *s, SPICE_DSTRINGPTR ustr_p)
|
||||||
|
|
||||||
|
|
||||||
bool
|
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.
|
/* s: pointer to original source line.
|
||||||
r: pointer to result line, already heavily modified wrt s
|
r: pointer to result line, already heavily modified wrt s
|
||||||
anywhere we find a 10-char numstring in r, substitute it.
|
anywhere we find a 10-char numstring in r, substitute it.
|
||||||
bug: wont flag overflow!
|
bug: wont flag overflow!
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int i, k, ls, level, nnest, ir;
|
int i, k, ls, level, nnest, ir = 0;
|
||||||
char c, d;
|
char c, d;
|
||||||
|
bool err = 0;
|
||||||
|
|
||||||
SPICE_DSTRING qstr; /* temp result dynamic string */
|
SPICE_DSTRING qstr; /* temp result dynamic string */
|
||||||
SPICE_DSTRING tstr; /* temp 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);
|
spice_dstring_init(&tstr);
|
||||||
i = 0;
|
i = 0;
|
||||||
ls = (int) strlen(s);
|
ls = (int) strlen(s);
|
||||||
err = 0;
|
|
||||||
ir = 0;
|
|
||||||
|
|
||||||
while ((i < ls) && !err) {
|
while ((i < ls) && !err) {
|
||||||
i++;
|
i++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue