6
# returns a name which is guaranteed to be unique (when compared to other
7
# names unique returns) with $name as its prefix. Basically
8
# it appends 1-N to the end of the string. This is good up to
9
# the max int value at which point it will wrap around and potentially
20
# Result is a unique string
37
switch [catch {set num [set unique_a($name)]}] {
40
set unique_a($name) $num
43
1 { ; # no match new name
45
set unique_a($name) $num
50
return -code error "unknown error in unique"