diff --git a/src/frontend/numparam/numparam.h b/src/frontend/numparam/numparam.h index 232846630..859176176 100644 --- a/src/frontend/numparam/numparam.h +++ b/src/frontend/numparam/numparam.h @@ -69,7 +69,7 @@ void initdico(dico_t *); 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, SPICE_DSTRINGPTR subname); +int findsubckt(dico_t *, char *s); bool nupa_substitute(dico_t *, char *s, char *r, bool err); bool nupa_assignment(dico_t *, char *s, char mode); bool nupa_subcktcall(dico_t *, char *s, char *x, bool err); diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 28bf3af9b..e3f82d361 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -814,10 +814,8 @@ nupa_eval(struct card *card) int idef; /* subckt definition line */ char c; - SPICE_DSTRING subname; /* dynamic string for subcircuit name */ bool err = 1; - spice_dstring_init(&subname); dicoS->srcline = linenum; dicoS->oldline = orig_linenum; @@ -841,7 +839,7 @@ nupa_eval(struct card *card) strtoupper(nupa_inst_name); - idef = findsubckt(dicoS, s, &subname); + idef = findsubckt(dicoS, s); if (idef > 0) nupa_subcktcall(dicoS, dicoS->dynrefptr[idef], dicoS->dynrefptr[linenum], 0); else diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index c5b6bd366..a4829b007 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -567,10 +567,9 @@ defsubckt(dico_t *dico, struct card *card, nupa_type categ) int -findsubckt(dico_t *dico, char *s, SPICE_DSTRINGPTR subname) +findsubckt(dico_t *dico, char *s) /* input: s is a subcircuit invocation line. - returns 0 if not found, else the stored definition line number value - and the name in string subname */ + returns 0 if not found, else the stored definition line number value */ { entry_t *entry; /* symbol table entry */ SPICE_DSTRING ustr; /* u= subckt name is last token in string s */ @@ -594,10 +593,8 @@ findsubckt(dico_t *dico, char *s, SPICE_DSTRINGPTR subname) if (entry && (entry->tp == NUPA_SUBCKT)) { line = entry->ivl; - scopyd(subname, &ustr); } else { line = 0; - spice_dstring_reinit(subname); message(dico, "Cannot find subcircuit.\n"); }