numparam, entry_type, #5/5, rewrite to get rid of 'NUPA_SPACE'

use fact: 'entry' !== NULL
This commit is contained in:
rlar 2017-10-25 22:08:53 +02:00
parent c761c74a22
commit 49e03cdcb2
2 changed files with 1 additions and 7 deletions

View File

@ -24,14 +24,12 @@ struct nupa_type;
extern const struct nupa_type S_nupa_real;
extern const struct nupa_type S_nupa_string;
extern const struct nupa_type S_nupa_subckt;
extern const struct nupa_type S_nupa_space;
extern const struct nupa_type S_nupa_unknown;
extern const struct nupa_type S_nupa_model;
#define NUPA_REAL (&S_nupa_real)
#define NUPA_STRING (&S_nupa_string)
#define NUPA_SUBCKT (&S_nupa_subckt)
#define NUPA_SPACE (&S_nupa_space)
#define NUPA_UNKNOWN (&S_nupa_unknown)
#define NUPA_MODEL (&S_nupa_model)

View File

@ -493,10 +493,7 @@ nupa_define(dico_t *dico,
if (!entry)
return message(dico, " Symbol table overflow\n");
if (entry)
c = entry->tp;
else
c = NUPA_SPACE;
c = entry->tp;
if ((c == NUPA_REAL) || (c == NUPA_STRING) || (c == NUPA_UNKNOWN)) {
@ -1779,4 +1776,3 @@ const struct nupa_type S_nupa_string = { "NUPA_STRING" };
const struct nupa_type S_nupa_subckt = { "NUPA_SUBCKT" };
const struct nupa_type S_nupa_unknown = { "NUPA_UNKNOWN" };
const struct nupa_type S_nupa_model = { "NUPA_MODEL" };
const struct nupa_type S_nupa_space = { "NUPA_SPACE" };