From: Ian Jackson Date: Wed, 3 Jun 2009 22:48:27 +0000 (+0100) Subject: merge changes made accidentally to wrong copy X-Git-Tag: 1.9.2~192 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=24222363faec9b4e3d7074af2df5f39933613c7f merge changes made accidentally to wrong copy --- 24222363faec9b4e3d7074af2df5f39933613c7f diff --cc pctb/show-thing.tcl index c1e8cb9,9a5b1d2..f2055f4 --- a/pctb/show-thing.tcl +++ b/pctb/show-thing.tcl @@@ -11,24 -30,26 +19,26 @@@ set mul set inter 1 set rhsmost_max -1 -set f [open text.xpm] -set o {} -set y -3 -while 1 { - if {[gets $f l] < 0} { error "huh? "} - if {![regexp {^"(.*)",$} $l dummy l]} { - append o "$l\n" - if {[regexp {^\}\;$} $l]} break - continue - } - if {$y==-3} { - manyset $l cols rows colours cpp - #assert {$colours==2} - #assert {$cpp==1} - set mulcols [expr {$cols*$mul+$inter}] - set mulrows [expr {$rows*$mul+$inter}] - append o "\"$mulcols $mulrows 9 1\",\n" - for {set x 0} {$x<$cols} {incr x} { set wordmap($x) 0 } - } elseif {$y==-2} { # first pixel - append o \ +proc read_xpm {f} { + set o {} + set y -3 - while {[gets $f l] >= 0} { ++ while 1 { ++ if {[gets $f l] < 0} { error "huh? "} + if {![regexp {^"(.*)",$} $l dummy l]} { + append o "$l\n" ++ if {[regexp {^\}\;$} $l]} break + continue + } + if {$y==-3} { + manyset $l cols rows colours cpp + #assert {$colours==2} + #assert {$cpp==1} + set mulcols [expr {$cols*$mul+$inter}] + set mulrows [expr {$rows*$mul+$inter}] + append o "\"$mulcols $mulrows 9 1\",\n" + for {set x 0} {$x<$cols} {incr x} { set wordmap($x) 0 } + } elseif {$y==-2} { # first pixel + append o \ "\"+ c #111\", \"a c #800\", \"A c #fcc\",