diff options
author | Andy Wingo <wingo@pobox.com> | 2010-12-06 15:19:40 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-12-06 15:19:40 +0100 |
commit | e7fb779fb0599d81f60350c036a37454a7beb6fe (patch) | |
tree | 22abbeebb1f06f621dd4e918f4e957255282404e | |
parent | 9eed1010e7cdc39c7c0ac18a34414f3653da7a5a (diff) | |
download | guile-e7fb779fb0599d81f60350c036a37454a7beb6fe.tar.gz |
update read-delimited! docs
* doc/ref/api-io.texi (Line/Delimited): Update the read-delimited!
docs.
-rw-r--r-- | doc/ref/api-io.texi | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index e2b1b5164..47dc8fc3d 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -534,14 +534,17 @@ from the value returned by @code{(current-input-port)}. @c begin (scm-doc-string "rdelim.scm" "read-delimited!") @deffn {Scheme Procedure} read-delimited! delims buf [port] [handle-delim] [start] [end] -Read text into the supplied string @var{buf} and return the number of -characters added to @var{buf} (subject to @var{handle-delim}, which takes -the same values specified for @code{read-line}. If @var{buf} is filled, -@code{#f} is returned for both the number of characters read and the -delimiter. Also terminates if one of the characters in the string -@var{delims} is found -or end-of-file is reached. Read from @var{port} if supplied, otherwise -from the value returned by @code{(current-input-port)}. +Read text into the supplied string @var{buf}. + +If a delimiter was found, return the number of characters written, +except if @var{handle-delim} is @code{split}, in which case the return +value is a pair, as noted above. + +As a special case, if @var{port} was already at end-of-stream, the EOF +object is returned. Also, if no characters were written because the +buffer was full, @code{#f} is returned. + +It's something of a wacky interface, to be honest. @end deffn @deffn {Scheme Procedure} write-line obj [port] |