From a57256a34bdad44f7cc176674f5cd3c1fa7e54a2 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 9 Dec 2005 01:54:36 +0000 Subject: [PATCH] hexbin-term wip --- iwjpictest/hexterm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 -- 2.30.2