From 48c87d6400583d4cddb66eb52d668b9ec88600d7 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 9 Dec 2005 01:54:36 +0000 Subject: [PATCH] hexbin-term wip --- scripts/hexterm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/hexterm b/scripts/hexterm index 848312e..249da3d 100755 --- a/scripts/hexterm +++ b/scripts/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