fix wrong positioning of hash_string
This commit is contained in:
parent
fd72e72dba
commit
3f11b5fdf6
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue