diff --git a/VERSION b/VERSION index 7eb9f00a..074b807c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.189 +8.3.190 diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index aa0ecc29..0f1a96b2 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -1704,7 +1704,8 @@ topVisit(def, doStub) HashSearch hs; HashEntry *he, *hep; HashTable portNameTable; - int portorder, portmax, tchars; + int portorder, portmax, tchars, implicit; + bool explicit; DevParam *plist, *pptr; char *instname; char *subcktname; @@ -1731,6 +1732,7 @@ topVisit(def, doStub) HashStartSearch(&hs); portmax = -1; + implicit = 0; while (he = HashNext(&def->def_nodes, &hs)) { @@ -1738,11 +1740,14 @@ topVisit(def, doStub) if (sname == NULL) continue; snode = sname->efnn_node; if ((!snode) || (!(snode->efnode_flags & EF_PORT))) continue; + explicit = FALSE; for (nodeName = sname; nodeName != NULL; nodeName = nodeName->efnn_next) { portorder = nodeName->efnn_port; if (portorder > portmax) portmax = portorder; + if (portorder != -1) explicit = TRUE; } + if (explicit == FALSE) implicit++; } if (portmax < 0) @@ -1791,7 +1796,7 @@ topVisit(def, doStub) /* They will be printed in numerical order. */ portorder = 0; - while (portorder <= portmax) + while (portorder <= portmax + implicit) { HashStartSearch(&hs); while (he = HashNext(&def->def_nodes, &hs)) @@ -1860,7 +1865,11 @@ topVisit(def, doStub) // and "ext2spice blackbox on" is in effect. if (esDoBlackBox == FALSE || !(def->def_flags & DEF_ABSTRACT)) + { unnumbered->efnn_port = ++portmax; + implicit--; + portorder--; /* Will loop again */ + } } } portorder++;