diff --git a/src/save.c b/src/save.c index fbe8be69..98053230 100644 --- a/src/save.c +++ b/src/save.c @@ -518,21 +518,39 @@ int read_rawfile(const char *f) return 0; } + +/* given a node XXyy try XXyy , xxyy, XXYY, v(XXyy), v(xxyy), V(XXYY) */ int get_raw_index(const char *node) { - char vnode[300]; - char lnode[300]; + char vnode[512]; + char lnode[512]; + char unode[512]; Int_hashentry *entry; dbg(1, "get_raw_index(): node=%s, node=%s\n", node, node); if(xctx->graph_values) { entry = int_hash_lookup(xctx->graph_raw_table, node, 0, XLOOKUP); if(!entry) { - my_snprintf(vnode, S(vnode), "v(%s)", node); - entry = int_hash_lookup(xctx->graph_raw_table, vnode, 0, XLOOKUP); + my_strncpy(lnode, node, S(lnode)); + strtolower(lnode); + entry = int_hash_lookup(xctx->graph_raw_table, lnode, 0, XLOOKUP); if(!entry) { - my_strncpy(lnode, vnode, S(lnode)); - strtolower(lnode); + my_strncpy(unode, node, S(lnode)); + strtoupper(lnode); entry = int_hash_lookup(xctx->graph_raw_table, lnode, 0, XLOOKUP); + if(!entry) { + my_snprintf(vnode, S(vnode), "v(%s)", node); + entry = int_hash_lookup(xctx->graph_raw_table, vnode, 0, XLOOKUP); + if(!entry) { + my_strncpy(lnode, vnode, S(lnode)); + strtolower(lnode); + entry = int_hash_lookup(xctx->graph_raw_table, lnode, 0, XLOOKUP); + if(!entry) { + my_strncpy(unode, vnode, S(lnode)); + strtoupper(lnode); + entry = int_hash_lookup(xctx->graph_raw_table, lnode, 0, XLOOKUP); + } + } + } } } if(entry) return entry->value; diff --git a/src/xschem.tcl b/src/xschem.tcl index 4f3e46a5..65cea7f6 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -3092,7 +3092,7 @@ proc tclpropeval2 {s} { global debug_var env path set netlist_type [xschem get netlist_type] - puts "tclpropeval2: s=|$s|" + # puts "tclpropeval2: s=|$s|" if {$debug_var <=-1} {puts "tclpropeval2: $s"} set path [string range [xschem get sch_path] 1 end] if { $netlist_type eq {spice} } { @@ -3106,13 +3106,13 @@ proc tclpropeval2 {s} { if { $debug_var<=-1 } { puts "---> path=$path" } regsub {^tcleval\(} $s {} s regsub {\)([ \n\t]*)$} $s {\1} s - puts "tclpropeval2: s=|$s|" - puts "tclpropeval2: subst $s=|[subst $s]|" + # puts "tclpropeval2: s=|$s|" + # puts "tclpropeval2: subst $s=|[subst $s]|" if { [catch {uplevel #0 "subst \{$s\}"} res] } { if { $debug_var<=-1 } { puts "tclpropeval2 warning: $res"} set res ?\n } - puts "tclpropeval2: res=|$res|" + # puts "tclpropeval2: res=|$res|" return $res }