aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2009-07-27 16:51:23 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 10:11:01 +1000
commit2d93bc0652eab1ad2c1b88b7100856adcf3881ad (patch)
treecf7706c8db7f054c3d40c26ff0ed1aecc1fc4845
parent329b82266ff8480724920df39b04fe8459e71cab (diff)
downloadjimtcl-2d93bc0652eab1ad2c1b88b7100856adcf3881ad.zip
jimtcl-2d93bc0652eab1ad2c1b88b7100856adcf3881ad.tar.gz
jimtcl-2d93bc0652eab1ad2c1b88b7100856adcf3881ad.tar.bz2
Add stdio read command
-rw-r--r--stdio.tcl5
1 files changed, 4 insertions, 1 deletions
diff --git a/stdio.tcl b/stdio.tcl
index a6e9f97..1a6cc47 100644
--- a/stdio.tcl
+++ b/stdio.tcl
@@ -16,7 +16,6 @@ set stdio::stderr [aio.open standard error]
set stdio::std_channel_map [list stdin ${stdio::stdin} stdout ${stdio::stdout} stderr ${stdio::stderr}]
proc stdio::std_channel {channel} {
- global _stdmap
return [string map ${::stdio::std_channel_map} $channel]
}
@@ -62,6 +61,10 @@ proc flush {channel} {
[stdio::std_channel $channel] flush
}
+proc read {channel args} {
+ [stdio::std_channel $channel] read {expand}$args
+}
+
proc seek {channel args} {
[stdio::std_channel $channel] seek {expand}$args
}