chiark / gitweb /
readable can pass through extra args
authorian <ian>
Sat, 7 Jun 2008 23:08:37 +0000 (23:08 +0000)
committerian <ian>
Sat, 7 Jun 2008 23:08:37 +0000 (23:08 +0000)
hostside/lib.tcl

index 33c14ac4760db4683d5daf34306e668eaf28656b..8d5a19988096cc7a1a954d12281662ce78043608 100644 (file)
@@ -24,9 +24,9 @@ proc setting {varname defvalue regexp} {
     set re $regexp
 }
 
-proc readable {whatfor conn} {
-    while {[gets $conn l]>=0} { $whatfor-inputline $conn $l }
-    if {[eof $conn]} { $whatfor-eof $conn }
+proc readable {whatfor conn args} {
+    while {[gets $conn l]>=0} { eval [list $whatfor-inputline $conn $l] $args }
+    if {[eof $conn]} { eval [list $whatfor-eof $conn] $args }
 }
 
 proc parse-argv {formalargs} {