+proc done/test {} {
+}
+
+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 stderr "SHOW-THING GOT $l"
+
+ fileevent stdin readable {}
+
+ read_xpm stdin
+ draw_glyphsdone
+ startup_cursor
+}
+
+proc main/automatic {} {
+ fconfigure stdin -blocking no
+ fileevent stdin readable required
+}
+proc done/automatic {} {
+ exec sh -c {printf \\0 >&4}
+ fileevent stdin readable required
+}
+
+switch -exact -- $argv {
+ {} { set mainkind test }
+ {--automatic 1} { set mainkind automatic }
+ {--automatic*} { error "incompatible versions - install problem" }
+ default { error "huh $argv ?" }
+}