From 6281e42a95efea272a12ac7dce0214af4f8c0e73 Mon Sep 17 00:00:00 2001 From: Stephen Trier Date: Wed, 7 Dec 2011 21:45:19 -0500 Subject: [PATCH] Fix bug losing first two characters of EDIF net names. The internal representation of net names has two characters preceding the actual name, which are used to signal status in the netlist window. Traditional netlist import prepends two spaces to the names, but EDIF import was not doing so, causing the first two characters of the net name to be lost. Fixed by prepending the two spaces when reading EDIF netlists. --- src/edif.y | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/edif.y b/src/edif.y index cb31d9a..520ba7b 100644 --- a/src/edif.y +++ b/src/edif.y @@ -110,7 +110,11 @@ LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr); pair_list_free(nodes); return; } - menu->Name = strdup (name->str1); + /* save the net name, prefixed with two spaces for status indicators */ + menu->Name = malloc(3 + strlen(name->str1)); + menu->Name[0] = ' '; + menu->Name[1] = ' '; + strcpy(menu->Name + 2, name->str1); free(name->str1); /* if renamed str2 also exists and must be freed */ if ( name->str2 ) free(name->str2); -- 1.7.3.4