Towards 2.1.40.
[yaz-moved-to-github.git] / src / charconv.tcl
index b43f12b..b509a8d 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
-# the next line restats using tclsh \
-exec tclsh "$0" "$@"
+# the next line restarts using tclsh \
+if [ -f /usr/local/bin/tclsh8.4 ]; then exec tclsh8.4 "$0" "$@"; else exec tclsh "$0" "$@"; fi
 #
-# $Id: charconv.tcl,v 1.13 2006-04-20 20:50:51 adam Exp $
+# $Id: charconv.tcl,v 1.17 2006-08-30 20:40:18 adam Exp $
 
 proc usage {} {
     puts {charconv.tcl: [-p prefix] [-s split] [-o ofile] file ... }
@@ -165,9 +165,11 @@ proc ins_trie_r {from to combining codename this} {
             }
             ins_trie_r $rest $to $combining $codename $trie($this,ptr,$ch)
         } else {
-            set trie($this,to,$ch) $to
-            set trie($this,combining,$ch) $combining
-            set trie($this,codename,$ch) $codename
+           if {![info exist trie($this,to,$ch)]} {
+                set trie($this,to,$ch) $to
+                set trie($this,combining,$ch) $combining
+                set trie($this,codename,$ch) $codename
+           }
         }
     }
 }