From c433534f4cbb722e26c2ab3dc54caa9f6e009215 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 25 Mar 2020 12:01:06 -0400 Subject: [PATCH] Modified GDS read to assign the same port index to incoming port labels with the same text. --- calma/CalmaRdpt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index f0edac74..403192f6 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -979,13 +979,19 @@ calmaElementText() /* No port information can be encoded in the GDS file, so */ /* assume defaults, and assume that the port order is the */ - /* order in which labels arrive in the GDS stream. */ + /* order in which labels arrive in the GDS stream. If */ + /* ports have the same text, then give them the same index. */ i = -1; for (sl = cifReadCellDef->cd_labels; sl != NULL; sl = sl->lab_next) { idx = sl->lab_flags & PORT_NUM_MASK; if (idx > i) i = idx; + if (!strcmp(sl->lab_text, textbody)) + { + i = (sl->lab_flags & PORT_NUM_MASK) - 1; + break; + } } i++; lab->lab_flags |= (PORT_NUM_MASK & i);