From 083c0c10e9a090a00e266575d81d487e11d2cb98 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 8 Mar 2022 13:55:07 -0500 Subject: [PATCH] Modified the routine that flattens labels so that it does not prepend the name of the cell use if the cell use is a top level window. It was accidentally discovered that using "select top cell ; select flat" will do this (creating label text with spaces in the process, which is illegal syntax for netlists). --- VERSION | 2 +- database/DBcellsrch.c | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index b7f22adf..e0366289 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.275 +8.3.276 diff --git a/database/DBcellsrch.c b/database/DBcellsrch.c index d08aaecc..8ea9ee60 100644 --- a/database/DBcellsrch.c +++ b/database/DBcellsrch.c @@ -694,17 +694,21 @@ dbCellLabelSrFunc(scx, fp) if (!DBCellRead(def, (char *) NULL, TRUE, dereference, NULL)) return 0; } - if (fp->tf_tpath != (TerminalPath *) NULL) + /* Do not add a path name of a top level window */ + if (strncmp(scx->scx_use->cu_id, "Topmost ", 8)) { - TerminalPath *tp = fp->tf_tpath; - - tnext = tp->tp_next; - tp->tp_next = DBPrintUseId(scx, tp->tp_next, tp->tp_last-tp->tp_next, - FALSE); - if (tp->tp_next < tp->tp_last) + if (fp->tf_tpath != (TerminalPath *) NULL) { - *(tp->tp_next++) = '/'; - *(tp->tp_next) = '\0'; + TerminalPath *tp = fp->tf_tpath; + + tnext = tp->tp_next; + tp->tp_next = DBPrintUseId(scx, tp->tp_next, tp->tp_last-tp->tp_next, + FALSE); + if (tp->tp_next < tp->tp_last) + { + *(tp->tp_next++) = '/'; + *(tp->tp_next) = '\0'; + } } }