X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fcharconv.tcl;h=b509a8de57f7e08691dc22b5e386e7b8b512bece;hb=ad5ad9a7ef375193c0f526b6321c9ee5bd8ce8b1;hp=125cd10c7605c99ad10d3252848c3d6806e09841;hpb=3f623df63496cd285de7cfb47b1bf902ac114fbd;p=yaz-moved-to-github.git diff --git a/src/charconv.tcl b/src/charconv.tcl index 125cd10..b509a8d 100755 --- a/src/charconv.tcl +++ b/src/charconv.tcl @@ -1,8 +1,8 @@ #!/bin/sh -# the next line restats using tclsh \ -if [ -f /usr/local/bin/tclsh8.4 ]; then exec tclsh8.4 "$0" "$@"; echo exec tclsh "$0" "$@"; fi +# 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.14 2006-05-22 15:16:59 mike 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 + } } } }