aboutsummaryrefslogtreecommitdiff
path: root/jim_tcl.txt
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-11-15 11:24:31 +1000
committerSteve Bennett <steveb@workware.net.au>2010-11-24 09:40:45 +1000
commit96466972c70a61becc8c332d0b991038ab7028f1 (patch)
tree9dcead1ec018bb47361ac9a1781af499ab9c804f /jim_tcl.txt
parent373b721510fd2d0754a41cc70a3b7cfd02e929bd (diff)
downloadjimtcl-96466972c70a61becc8c332d0b991038ab7028f1.zip
jimtcl-96466972c70a61becc8c332d0b991038ab7028f1.tar.gz
jimtcl-96466972c70a61becc8c332d0b991038ab7028f1.tar.bz2
Remove the bio extension and add 'copyto' to aio.
The bio extension is a hangover from TinyTcl. Since Jim supports binary strings, there isn't much need for it except for 'bio copy'. So move this to aio as 'copyto' and implement 'file copy' in terms of it. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim_tcl.txt')
-rw-r--r--jim_tcl.txt29
1 files changed, 6 insertions, 23 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt
index 443f96b..0834a57 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -63,6 +63,7 @@ Since v0.63:
1. $::platform_tcl() settings are now automatically determined
2. Add aio '$handle filename'
3. Add 'info channels'
+4. The 'bio' extension is gone. Now 'aio' supports 'copyto'.
Since v0.62:
@@ -4131,29 +4132,6 @@ OPTIONAL-EXTENSIONS
The following extensions may or may not be available depending upon
what options were selected when Jim Tcl was built.
-bio
-~~~
-The bio command provides a way to read and write binary files
-from within Tcl. Note that since Jim supports binary strings, the
-main use of this command is 'bio copy' to easily copy between file
-descriptors.
-
-+*bio read ?-hex?* 'fd var numbytes'+::
- Read bytes from a file descriptor. By default the data is not encoded.
- Using *-hex* encodes the data as ascii hex instead. Returns
- the number of bytes actually read.
-
-+*bio write ?-hex?* 'fd buf'+::
- Write a string to a file descriptor. If *-hex* is specified, the
- string is expected to be in ascii hexx format. Returns the number
- of bytes actually written.
-
-+*bio copy* 'fromfd tofd ?numbytes?'+::
- Copy binary data from the file descriptor *fromfd* to the
- file descriptor *tofd*. If *numbytes* is specified, at most that many
- bytes will be copied. Otherwise copying continues until the end
- of the input file. Returns the number of bytes actually copied.
-
posix: os.fork, os.wait, os.gethostname, os.getids, os.uptime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*os.fork*+::
@@ -4202,6 +4180,11 @@ aio
+$handle *puts ?-nonewline?* 'str'+::
Write the string, with newline unless -nonewline
++$handle *copyto* 'tofd ?size?'+::
+ Copy bytes to the file descriptor *tofd*. If *size* is specified, at most
+ that many bytes will be copied. Otherwise copying continues until the end
+ of the input file. Returns the number of bytes actually copied.
+
+$handle *flush*+::
Flush the stream