From 8e6f770afa79adabff395c8b1c736ff08f5c9b3d Mon Sep 17 00:00:00 2001 From: Alex Coffin Date: Mon, 13 Jan 2020 05:29:20 -0800 Subject: [PATCH 1/2] Fixed typo --- doc/html/macro.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/html/macro.html b/doc/html/macro.html index ea790a3d..e12e96e0 100644 --- a/doc/html/macro.html +++ b/doc/html/macro.html @@ -68,7 +68,7 @@ Define or print a macro called char Buttons are treated just like keys for the purpose of defining macros. While the official names for buttons - in keysymdef.h are "XK_Pointer_Button_1", + in keysymdef.h are "XK_Pointer_Button1", etc., the macro command accepts the abbreviated forms Button1, and so forth.

From afe38c55c816373413fa5171375cbed8c28d6729 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 13 Jan 2020 12:58:04 -0500 Subject: [PATCH 2/2] Resolved some issues with working with ext2spice using abstract views. Because the abstract view does not necessarily represent actual connectivity, rely on the port indexes in the .ext file to determine the number of ports and port order. Do not use SpiceNodeName() to look up the node name, or unique ports that are deemed shorted will go missing. Also: Modified the read-in of .ext files so that use names may contain backslashes. Only backslashes that end a line will be handled differently. --- ext2spice/ext2spice.c | 23 +++++++++++++++++++---- extflat/EFread.c | 14 +++++++++----- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index 65eb7326..b51215ce 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -1501,9 +1501,7 @@ subcktVisit(use, hierName, is_top) { nodeName = nodeList[portidx]; - if (nodeName == NULL) - TxError("No port connection on port %d; need to resolve.\n", portidx); - else + if (nodeName != NULL) { if (tchars > 80) { @@ -1513,6 +1511,12 @@ subcktVisit(use, hierName, is_top) tchars += spcdevOutNode(hierName, nodeName->efnn_hier, "subcircuit", esSpiceF); } + else + { + // As port indexes do not have to be contiguous, this does not + // necessarily indicate an error condition. No need to report? + // TxError("No port connection on port %d; need to resolve.\n", portidx); + } } freeMagic(nodeList); @@ -1717,6 +1721,7 @@ topVisit(def, doStub) HashStartSearch(&hs); while (he = HashNext(&def->def_nodes, &hs)) { + char stmp[MAX_STR_SIZE]; int portidx; EFNodeName *unnumbered; @@ -1737,7 +1742,17 @@ topVisit(def, doStub) fprintf(esSpiceF, "\n+"); tchars = 1; } - pname = nodeSpiceName(snode->efnode_name->efnn_hier, NULL); + // If view is abstract, rely on the given port name, not + // the node. Otherwise, artifacts of the abstract view + // may cause nodes to be merged and the names lost. + + if (def->def_flags & DEF_ABSTRACT) + { + EFHNSprintf(stmp, nodeName->efnn_hier); + pname = stmp; + } + else + pname = nodeSpiceName(snode->efnode_name->efnn_hier, NULL); fprintf(esSpiceF, " %s", pname); tchars += strlen(pname) + 1; break; diff --git a/extflat/EFread.c b/extflat/EFread.c index 5cc53d43..96158edb 100644 --- a/extflat/EFread.c +++ b/extflat/EFread.c @@ -728,11 +728,15 @@ start: } } - if (*get == '\\') /* Process quoted characters literally */ - { - get++; - if (*get == '\0') break; - } + /* Process backslash characters literally unless they */ + /* are followed by the end-of-line. */ + + if (*get == '\\') + if (*(get + 1) == '\0') + { + get++; + break; + } /* Copy into token receiving area */ *put++ = *get++;