set csrh 20
set ctxh 20
-proc debug {m} {
- puts stderr "SHOW-THING $m"
-}
-
proc init_widgets {} {
# idempotent
global csrh gotsh ctxh
debug "GOT $l"
fileevent stdin readable {}
+ fconfigure stdin -blocking yes
read_xpm stdin
resize_widgets
}
proc done/automatic {} {
exec sh -c {printf \\0 >&4}
- fileevent stdin readable required
+ main/automatic
}
-switch -exact -- $argv {
- {} { set mainkind test }
- {--automatic 1} { set mainkind automatic }
- {--automatic*} { error "incompatible versions - install problem" }
- default { error "huh $argv ?" }
+proc debug {m} { }
+
+set mainkind test
+foreach arg $argv {
+ switch -exact -- $arg {
+ {--debug} { proc debug {m} { puts stderr "SHOW-THING $m" } }
+ {--noop-arg} { }
+ {--automatic-1} { set mainkind automatic }
+ {--automatic*} { error "incompatible versions - install problem" }
+ default { error "huh $argv ?" }
+ }
}
main/$mainkind