From 24a22f139805539c77e579e7d2b714623834b256 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 26 Jul 2014 20:17:42 +0200 Subject: [PATCH] subckt.c, treat "0" and "null" like any other global node --- src/frontend/subckt.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index a1064441a..420065f56 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -140,6 +140,12 @@ collect_global_nodes(struct line *c) { num_global_nodes = 0; + global_nodes[num_global_nodes++] = copy("0"); + +#ifdef XSPICE + global_nodes[num_global_nodes++] = copy("null"); +#endif + for (; c; c = c->li_next) if (ciprefix(".global", c->li_line)) { char *s = c->li_line; @@ -1438,21 +1444,11 @@ gettrans(const char *name, const char *name_end) if (!name_end) name_end = strchr(name, '\0'); -#ifdef XSPICE - /* gtri - wbk - 2/27/91 - don't translate the reserved word 'null' */ - if (eq_substr(name, name_end, "null")) - return ("null"); - /* gtri - end */ -#endif - /* Added by H.Tanaka to translate global nodes */ for (i = 0; i