X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Fshow-thing.tcl;fp=pctb%2Fshow-thing.tcl;h=be07d2d50fa3f0b5c063430a26826df94238ca87;hb=909b1d69c7cafc7b50d932a0c1f790c9f91cb430;hp=c0182238557b3dd5e64c5c020d5e8d4d4756393a;hpb=9a9ad06e5adcb90a5781fbe55882158609c218ba;p=ypp-sc-tools.web-live.git diff --git a/pctb/show-thing.tcl b/pctb/show-thing.tcl index c018223..be07d2d 100755 --- a/pctb/show-thing.tcl +++ b/pctb/show-thing.tcl @@ -401,6 +401,7 @@ proc update_database/DELETE {l r ctx} { proc RETURN_RESULT {how what} { + global mainkind place forget .d.csr.csr pack forget .d.csr.csr.e helptext {{{ Processing }}} @@ -408,13 +409,12 @@ proc RETURN_RESULT {how what} { update idletasks puts stderr "$how $what" eval update_database/$how $what - exec kill -STOP [pid] - fileevent stdin readable required + done/$mainkind } #---------- main progrm ---------- -proc test_main {} { +proc main/test {} { global glyphsdone unk_l unk_r unk_context set glyphsdone { @@ -433,6 +433,8 @@ proc test_main {} { draw_glyphsdone startup_cursor } +proc done/test {} { +} proc required {} { global glyphsdone unk_l unk_r unk_context @@ -453,6 +455,20 @@ proc required {} { 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 { set mainkind automatic } + default { error "huh $argv ?" } +} + read_database -fconfigure stdin -blocking no -fileevent stdin readable required +main/$mainkind