numparam/xpressn.c, drop `getidtype()'

This commit is contained in:
rlar 2016-04-29 17:51:50 +02:00
parent 34040a592d
commit 00c3d2f79e
3 changed files with 5 additions and 16 deletions

View File

@ -75,6 +75,6 @@ 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 *);
dico_t *nupa_fetchinstance(void);
nupa_type getidtype(dico_t *, char *s);
entry_t *entrynb(dico_t *dico, char *s);
entry_t *attrib(dico_t *, NGHASHPTR htable, char *t, char op);
void del_attrib(void *);

View File

@ -215,6 +215,7 @@ findsubname(dico_t *dico, SPICE_DSTRINGPTR dstr_p)
found = (k >= 0) && alfanum(s[k + 1]); /* suppose an identifier */
if (found) {
entry_t *entry;
/* check for known subckt name */
spice_dstring_reinit(&name);
j = k + 1;
@ -222,7 +223,8 @@ findsubname(dico_t *dico, SPICE_DSTRINGPTR dstr_p)
cadd(&name, upcase(s[j]));
j++;
}
found = (getidtype(dico, spice_dstring_value(&name)) == NUPA_SUBCKT);
entry = entrynb(dico, spice_dstring_value(&name));
found = entry && (entry->tp == NUPA_SUBCKT);
}
}

View File

@ -367,7 +367,7 @@ donedico(dico_t *dico)
* look thru the stack of local symbols and then look at the global
* symbols in that order.
* ----------------------------------------------------------------- */
static entry_t *
entry_t *
entrynb(dico_t *dico, char *s)
{
int depth; /* stack depth */
@ -388,19 +388,6 @@ entrynb(dico_t *dico, char *s)
}
nupa_type
getidtype(dico_t *dico, char *s)
/* test if identifier s is known. Answer its type, or '?' if not in table */
{
entry_t *entry = entrynb(dico, s);
if (entry)
return entry->tp;
return NUPA_UNKNOWN;
}
static double
fetchnumentry(dico_t *dico, char *s, bool *perr)
{