numparam, entry_type, #3/5, drop unused 'NUPA_POINTER'
'NUPA_POINTER' is nowhere assigned to storage thus 'nupa_type' variables can never have this value
This commit is contained in:
parent
09d92ba692
commit
b7b6d9ace3
|
|
@ -23,7 +23,6 @@ struct nupa_type;
|
||||||
|
|
||||||
extern const struct nupa_type S_nupa_real;
|
extern const struct nupa_type S_nupa_real;
|
||||||
extern const struct nupa_type S_nupa_string;
|
extern const struct nupa_type S_nupa_string;
|
||||||
extern const struct nupa_type S_nupa_pointer;
|
|
||||||
extern const struct nupa_type S_nupa_subckt;
|
extern const struct nupa_type S_nupa_subckt;
|
||||||
extern const struct nupa_type S_nupa_space;
|
extern const struct nupa_type S_nupa_space;
|
||||||
extern const struct nupa_type S_nupa_unknown;
|
extern const struct nupa_type S_nupa_unknown;
|
||||||
|
|
@ -31,7 +30,6 @@ extern const struct nupa_type S_nupa_model;
|
||||||
|
|
||||||
#define NUPA_REAL (&S_nupa_real)
|
#define NUPA_REAL (&S_nupa_real)
|
||||||
#define NUPA_STRING (&S_nupa_string)
|
#define NUPA_STRING (&S_nupa_string)
|
||||||
#define NUPA_POINTER (&S_nupa_pointer)
|
|
||||||
#define NUPA_SUBCKT (&S_nupa_subckt)
|
#define NUPA_SUBCKT (&S_nupa_subckt)
|
||||||
#define NUPA_SPACE (&S_nupa_space)
|
#define NUPA_SPACE (&S_nupa_space)
|
||||||
#define NUPA_UNKNOWN (&S_nupa_unknown)
|
#define NUPA_UNKNOWN (&S_nupa_unknown)
|
||||||
|
|
@ -47,7 +45,6 @@ typedef struct entry_s {
|
||||||
double vl; /* float value if defined */
|
double vl; /* float value if defined */
|
||||||
int ivl; /* int value or string buffer index */
|
int ivl; /* int value or string buffer index */
|
||||||
char *sbbase; /* string buffer base address if any */
|
char *sbbase; /* string buffer base address if any */
|
||||||
struct entry_s *pointer; /* pointer chain */
|
|
||||||
} entry_t;
|
} entry_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -407,9 +407,6 @@ fetchnumentry(dico_t *dico, char *s, bool *perr)
|
||||||
{
|
{
|
||||||
entry_t *entry = entrynb(dico, s);
|
entry_t *entry = entrynb(dico, s);
|
||||||
|
|
||||||
while (entry && (entry->tp == NUPA_POINTER))
|
|
||||||
entry = entry->pointer;
|
|
||||||
|
|
||||||
if (entry && (entry->tp == NUPA_REAL))
|
if (entry && (entry->tp == NUPA_REAL))
|
||||||
return entry->vl;
|
return entry->vl;
|
||||||
|
|
||||||
|
|
@ -496,9 +493,6 @@ nupa_define(dico_t *dico,
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return message(dico, " Symbol table overflow\n");
|
return message(dico, " Symbol table overflow\n");
|
||||||
|
|
||||||
if (entry->tp == NUPA_POINTER)
|
|
||||||
entry = entry->pointer; /* pointer indirection */
|
|
||||||
|
|
||||||
if (entry)
|
if (entry)
|
||||||
c = entry->tp;
|
c = entry->tp;
|
||||||
else
|
else
|
||||||
|
|
@ -1129,9 +1123,6 @@ evaluate(dico_t *dico, SPICE_DSTRINGPTR qstr_p, char *t, unsigned char mode)
|
||||||
entry = entrynb(dico, t);
|
entry = entrynb(dico, t);
|
||||||
nolookup = !entry;
|
nolookup = !entry;
|
||||||
|
|
||||||
while (entry && (entry->tp == NUPA_POINTER))
|
|
||||||
entry = entry->pointer; /* follow pointer chain */
|
|
||||||
|
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return message(dico,
|
return message(dico,
|
||||||
"\"%s\" not evaluated.%s\n", t,
|
"\"%s\" not evaluated.%s\n", t,
|
||||||
|
|
@ -1787,7 +1778,6 @@ struct nupa_type { /* used as a type-checked enum */
|
||||||
|
|
||||||
const struct nupa_type S_nupa_real = { "NUPA_REAL" };
|
const struct nupa_type S_nupa_real = { "NUPA_REAL" };
|
||||||
const struct nupa_type S_nupa_string = { "NUPA_STRING" };
|
const struct nupa_type S_nupa_string = { "NUPA_STRING" };
|
||||||
const struct nupa_type S_nupa_pointer = { "NUPA_POINTER" };
|
|
||||||
const struct nupa_type S_nupa_subckt = { "NUPA_SUBCKT" };
|
const struct nupa_type S_nupa_subckt = { "NUPA_SUBCKT" };
|
||||||
const struct nupa_type S_nupa_unknown = { "NUPA_UNKNOWN" };
|
const struct nupa_type S_nupa_unknown = { "NUPA_UNKNOWN" };
|
||||||
const struct nupa_type S_nupa_model = { "NUPA_MODEL" };
|
const struct nupa_type S_nupa_model = { "NUPA_MODEL" };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue