diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-05-31 20:28:57 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-06-10 14:00:34 +1000 |
commit | c46fde880b6d3f9eef24e8dd1ab7bc3f6a8a0f18 (patch) | |
tree | cec487099b56288a73528ae30ec5855cefefdc91 /tclcompat.tcl | |
parent | f2524e6687ac64d1e1a6bbaa9d07c30236b61df1 (diff) | |
download | jimtcl-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.tcl | 16 |
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 ...? |