From: ian Date: Sat, 7 Jun 2008 23:08:37 +0000 (+0000) Subject: readable can pass through extra args X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=482953fcf0e7600bfe90f51298a694888a4d571e;p=trains.git readable can pass through extra args --- diff --git a/hostside/lib.tcl b/hostside/lib.tcl index 33c14ac..8d5a199 100644 --- a/hostside/lib.tcl +++ b/hostside/lib.tcl @@ -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} {