aboutsummaryrefslogtreecommitdiff
path: root/tclcompat.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-05-31 20:28:57 +1000
committerSteve Bennett <steveb@workware.net.au>2011-06-10 14:00:34 +1000
commitc46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18 (patch)
treecec487099b56288a73528ae30ec5855cefefdc91 /tclcompat.tcl
parentf2524e6687ac64d1e1a6bbaa9d07c30236b61df1 (diff)
downloadjimtcl-c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18.zip
jimtcl-c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18.tar.gz
jimtcl-c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18.tar.bz2
Add aio support for buffering
And fconfigure for Tcl compatibility Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tclcompat.tcl')
-rw-r--r--tclcompat.tcl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tclcompat.tcl b/tclcompat.tcl
index 8559edc..d7266e1 100644
--- a/tclcompat.tcl
+++ b/tclcompat.tcl
@@ -35,6 +35,22 @@ if {[info commands stdout] ne ""} {
}
tailcall $chan read {*}${-nonewline}
}
+
+ proc fconfigure {f args} {
+ foreach {n v} $args {
+ switch -glob -- $n {
+ -bl* {
+ $f ndelay $v
+ }
+ -bu* {
+ $f buffering $v
+ }
+ default {
+ return -code error "fconfigure: unknown option $n"
+ }
+ }
+ }
+ }
}
# case var ?in? pattern action ?pattern action ...?