by checking 'to' instead of 'from'.
# the next line restats using tclsh \
exec tclsh "$0" "$@"
#
# the next line restats using tclsh \
exec tclsh "$0" "$@"
#
-# $Id: charconv.tcl,v 1.5 2004-03-17 11:00:04 adam Exp $
+# $Id: charconv.tcl,v 1.6 2004-03-20 07:16:25 adam Exp $
proc usage {} {
puts {charconv.tcl: [-p prefix] [-s split] [-o ofile] file ... }
proc usage {} {
puts {charconv.tcl: [-p prefix] [-s split] [-o ofile] file ... }
else
{
struct yaz_iconv_trie_flat *flat = t->flat;
else
{
struct yaz_iconv_trie_flat *flat = t->flat;
{
size_t len = strlen(flat->from);
if (len <= inbytesleft)
{
size_t len = strlen(flat->from);
if (len <= inbytesleft)
puts -nonewline $f "\", 0x[lindex $m 1]"
puts $f "\},"
}
puts -nonewline $f "\", 0x[lindex $m 1]"
puts $f "\},"
}
puts $f "\};"
puts $f "struct yaz_iconv_trie $trie(prefix)page${this} = \{"
puts $f " $trie(prefix)page${this}_flat, 0"
puts $f "\};"
puts $f "struct yaz_iconv_trie $trie(prefix)page${this} = \{"
puts $f " $trie(prefix)page${this}_flat, 0"