try more upper/lower case combinations in get_raw_index() function, removed some debugging messages
This commit is contained in:
parent
6baeb53a51
commit
3ef32a1eef
30
src/save.c
30
src/save.c
|
|
@ -518,21 +518,39 @@ int read_rawfile(const char *f)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* given a node XXyy try XXyy , xxyy, XXYY, v(XXyy), v(xxyy), V(XXYY) */
|
||||||
int get_raw_index(const char *node)
|
int get_raw_index(const char *node)
|
||||||
{
|
{
|
||||||
char vnode[300];
|
char vnode[512];
|
||||||
char lnode[300];
|
char lnode[512];
|
||||||
|
char unode[512];
|
||||||
Int_hashentry *entry;
|
Int_hashentry *entry;
|
||||||
dbg(1, "get_raw_index(): node=%s, node=%s\n", node, node);
|
dbg(1, "get_raw_index(): node=%s, node=%s\n", node, node);
|
||||||
if(xctx->graph_values) {
|
if(xctx->graph_values) {
|
||||||
entry = int_hash_lookup(xctx->graph_raw_table, node, 0, XLOOKUP);
|
entry = int_hash_lookup(xctx->graph_raw_table, node, 0, XLOOKUP);
|
||||||
if(!entry) {
|
if(!entry) {
|
||||||
my_snprintf(vnode, S(vnode), "v(%s)", node);
|
my_strncpy(lnode, node, S(lnode));
|
||||||
entry = int_hash_lookup(xctx->graph_raw_table, vnode, 0, XLOOKUP);
|
strtolower(lnode);
|
||||||
|
entry = int_hash_lookup(xctx->graph_raw_table, lnode, 0, XLOOKUP);
|
||||||
if(!entry) {
|
if(!entry) {
|
||||||
my_strncpy(lnode, vnode, S(lnode));
|
my_strncpy(unode, node, S(lnode));
|
||||||
strtolower(lnode);
|
strtoupper(lnode);
|
||||||
entry = int_hash_lookup(xctx->graph_raw_table, lnode, 0, XLOOKUP);
|
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;
|
if(entry) return entry->value;
|
||||||
|
|
|
||||||
|
|
@ -3092,7 +3092,7 @@ proc tclpropeval2 {s} {
|
||||||
global debug_var env path
|
global debug_var env path
|
||||||
|
|
||||||
set netlist_type [xschem get netlist_type]
|
set netlist_type [xschem get netlist_type]
|
||||||
puts "tclpropeval2: s=|$s|"
|
# puts "tclpropeval2: s=|$s|"
|
||||||
if {$debug_var <=-1} {puts "tclpropeval2: $s"}
|
if {$debug_var <=-1} {puts "tclpropeval2: $s"}
|
||||||
set path [string range [xschem get sch_path] 1 end]
|
set path [string range [xschem get sch_path] 1 end]
|
||||||
if { $netlist_type eq {spice} } {
|
if { $netlist_type eq {spice} } {
|
||||||
|
|
@ -3106,13 +3106,13 @@ proc tclpropeval2 {s} {
|
||||||
if { $debug_var<=-1 } { puts "---> path=$path" }
|
if { $debug_var<=-1 } { puts "---> path=$path" }
|
||||||
regsub {^tcleval\(} $s {} s
|
regsub {^tcleval\(} $s {} s
|
||||||
regsub {\)([ \n\t]*)$} $s {\1} s
|
regsub {\)([ \n\t]*)$} $s {\1} s
|
||||||
puts "tclpropeval2: s=|$s|"
|
# puts "tclpropeval2: s=|$s|"
|
||||||
puts "tclpropeval2: subst $s=|[subst $s]|"
|
# puts "tclpropeval2: subst $s=|[subst $s]|"
|
||||||
if { [catch {uplevel #0 "subst \{$s\}"} res] } {
|
if { [catch {uplevel #0 "subst \{$s\}"} res] } {
|
||||||
if { $debug_var<=-1 } { puts "tclpropeval2 warning: $res"}
|
if { $debug_var<=-1 } { puts "tclpropeval2 warning: $res"}
|
||||||
set res ?\n
|
set res ?\n
|
||||||
}
|
}
|
||||||
puts "tclpropeval2: res=|$res|"
|
# puts "tclpropeval2: res=|$res|"
|
||||||
return $res
|
return $res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue