diff --git a/src/xschem.tcl b/src/xschem.tcl index 0de626e5..accac065 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -2120,6 +2120,18 @@ proc is_xschem_file {f} { return $ret } + +proc hash_string {s} { + set hash 5381 + set len [string length $s] + for {set i 0} { $i < $len} { incr i} { + set c [string index $s $i] + set ascii [scan $c %c] + set hash [expr {($hash + ($hash << 5) + $ascii)%4294967296} ] + } + return $hash +} + ## Recent component toolbar namespace eval c_toolbar { # Create a variable inside the namespace @@ -2341,18 +2353,6 @@ proc load_file_dialog_up {dir} { } -proc hash_string {s} { - set hash 5381 - set len [string length $s] - for {set i 0} { $i < $len} { incr i} { - set c [string index $s $i] - set ascii [scan $c %c] - set hash [expr {($hash + ($hash << 5) + $ascii)%4294967296} ] - } - return $hash -} - - proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}} {loadfile {1}} {confirm_overwrt {1}} {initialf {}}} { global myload_index1 myload_files2 myload_files1 myload_retval myload_dir1 pathlist OS