set csrh 20
proc init_widgets {} {
+ # idempotent
global csrh gotsh
+
+ if {[winfo exists .d]} return
frame .d
set cur_0 $unk_l
set cur_1 [expr {$unk_r+1}]
set last_ht {}
+
+ recursor
}
update idletasks
puts "$how $what"
eval update_database/$how $what
+ exec kill -STOP [pid]
+ fileevent stdin readable required
}
-# bind . <Key-space> {}
+#---------- main progrm ----------
proc test_main {} {
global glyphsdone unk_l unk_r unk_context
startup_cursor
}
+proc required {} {
+ global glyphsdone unk_l unk_r unk_context
+
+ if {[gets stdin l]<0} {
+ if {[eof stdin]} { fconfigure stdin -blocking yes; exit 0 }
+ return
+ }
+ init_widgets
+ manyset [lrange $l 0 3] unk_l unk_r unk_context
+ set glyphsdone [lrange $l 3 end]
+ puts "SHOW-THING GOT $l"
+
+ fileevent stdin readable {}
+
+ read_xpm stdin
+ draw_glyphsdone
+ startup_cursor
+}
+
read_database
-init_widgets
-test_main
-recursor
+fconfigure stdin -blocking no
+fileevent stdin readable required