chiark / gitweb /
fix nybbleswap
authorIan Jackson <ian@liberator.(none)>
Wed, 3 Jun 2009 23:57:25 +0000 (00:57 +0100)
committerIan Jackson <ian@liberator.(none)>
Wed, 3 Jun 2009 23:57:25 +0000 (00:57 +0100)
pctb/show-thing.tcl

index 142ab42a712555be20539c2ddf014cd1c1d268cc..3d42218619359f68e864dc72c2923a880d415ff0 100755 (executable)
@@ -245,7 +245,7 @@ proc recursor/text {} {
     pack .d.csr.csr.e -side left
     focus .d.csr.csr.e
     bind_key Return {
     pack .d.csr.csr.e -side left
     focus .d.csr.csr.e
     bind_key Return {
-       binary scan [.d.csr.csr.e get] h* hex
+       binary scan [.d.csr.csr.e get] H* hex
        if {[string length $hex]} {
            RETURN_RESULT DEFINE "$cur_0 $cur_1 $hex"
        }
        if {[string length $hex]} {
            RETURN_RESULT DEFINE "$cur_0 $cur_1 $hex"
        }
@@ -348,7 +348,7 @@ proc write_database {} {
     set ol {}
     foreach bm [array names database] {
        set strh $database($bm)
     set ol {}
     foreach bm [array names database] {
        set strh $database($bm)
-       set strs [binary format h* $strh]
+       set strs [binary format H* $strh]
        set strdo [format "%d %s" [expr {[string length $strh]/2}] $strh]
        set o "[lindex $bm 0] $strdo\n"
        append o [format "%d\n" [expr {[llength $bm]-1}]]
        set strdo [format "%d %s" [expr {[string length $strh]/2}] $strh]
        set o "[lindex $bm 0] $strdo\n"
        append o [format "%d\n" [expr {[llength $bm]-1}]]