subckt.c, do not put model names into numparam hash table xpressn.c, re-enable error message to alert name redefinition
This commit is contained in:
parent
85fdadc683
commit
c5d4e3220d
|
|
@ -528,8 +528,17 @@ nupa_define(dico_t *dico,
|
||||||
Subcircuit expansion is o.k., we have to deal with this numparam
|
Subcircuit expansion is o.k., we have to deal with this numparam
|
||||||
behaviour later. (H. Vogt 090426)
|
behaviour later. (H. Vogt 090426)
|
||||||
*/
|
*/
|
||||||
if (0)
|
message(dico, "%s is already used,\n cannot be redefined\n", t);
|
||||||
message(dico, "%s: cannot redefine\n", t);
|
#if 0
|
||||||
|
if ((c == 'U') && (tpe == 'U'))
|
||||||
|
message(dico, "%s is already used as subcircuit name,\n cannot be used for another subcircuit\n", t);
|
||||||
|
else if ((c == 'U') && (tpe == 'O'))
|
||||||
|
message(dico, "%s is already used as subcircuit name,\n cannot be used for model\n", t);
|
||||||
|
else if ((c == 'O') && (tpe == 'U'))
|
||||||
|
message(dico, "%s is already used as model name,\n cannot be used for subcircuit\n", t);
|
||||||
|
else if ((c == 'O') && (tpe == 'O'))
|
||||||
|
message(dico, "%s is already used as model name,\n cannot be reused for another model\n", t);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -233,13 +233,10 @@ inp_subcktexpand(struct line *deck) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ok = nupa_signal(NUPADECKCOPY, NULL);
|
ok = nupa_signal(NUPADECKCOPY, NULL);
|
||||||
/* get the subckt/model names from the deck */
|
/* get the subckt names from the deck */
|
||||||
for (c = deck; c; c = c->li_next) { /* first Numparam pass */
|
for (c = deck; c; c = c->li_next) /* first Numparam pass */
|
||||||
if (ciprefix(".subckt", c->li_line))
|
if (ciprefix(".subckt", c->li_line))
|
||||||
nupa_scan(c->li_line, c->li_linenum, TRUE);
|
nupa_scan(c->li_line, c->li_linenum, TRUE);
|
||||||
if (ciprefix(".model", c->li_line))
|
|
||||||
nupa_scan(c->li_line, c->li_linenum, FALSE);
|
|
||||||
}
|
|
||||||
/* now copy instances */
|
/* now copy instances */
|
||||||
for (c = deck; c; c = c->li_next) /* first Numparam pass */
|
for (c = deck; c; c = c->li_next) /* first Numparam pass */
|
||||||
c->li_line = nupa_copy(c->li_line, c->li_linenum);
|
c->li_line = nupa_copy(c->li_line, c->li_linenum);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue