From: ian Date: Fri, 9 Dec 2005 01:54:36 +0000 (+0000) Subject: hexbin-term wip X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=a57256a34bdad44f7cc176674f5cd3c1fa7e54a2;p=trains.git hexbin-term wip --- diff --git a/iwjpictest/hexterm b/iwjpictest/hexterm index 848312e..249da3d 100755 --- a/iwjpictest/hexterm +++ b/iwjpictest/hexterm @@ -7,6 +7,16 @@ set port [lindex $argv 0] set port_stty [exec stty -F $port -g] set term_stty [exec stty -g] +proc onreadp {} { + global p + while 1 { + set c [read $p 1] + +} + +proc onreadk {} { +} + set e [catch { exec stty min 0 time 0 -istrip -ocrnl -onlcr -onocr -opost \ -ctlecho -echo -echoe -echok -echonl -iexten -isig @@ -17,7 +27,9 @@ set e [catch { set p [open $port {RDWR|NONBLOCK} 0] fconfigure $p -blocking false -buffering none fconfigure stdin -blocking false -buffering none - fconfigure stdin -blocking false -buffering none + + fileevent stdin readable onreadk + fileevent $p readable onreadp }] fconfigure stdin -blocking true