summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS29
1 files changed, 28 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 49b1b80fe..bc449f706 100644
--- a/NEWS
+++ b/NEWS
@@ -217,6 +217,33 @@ Guile.
Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
+** New function: read-string!/partial str [port_or_fdes [start [end]]]
+
+ Read characters from an fport or file descriptor into a string
+ STR. This procedure is scsh-compatible and can efficiently read
+ large strings. It will:
+
+ * attempt to fill the entire string, unless the START and/or
+ END arguments are supplied. i.e., START defaults to 0 and
+ END defaults to `(string-length str)'
+
+ * use the current input port if PORT_OR_FDES is not supplied.
+
+ * read any characters that are currently available, without
+ waiting for the rest (short reads are possible).
+
+ * wait for as long as it needs to for the first character to
+ become available, unless the port is in non-blocking mode
+
+ * return `#f' if end-of-file is encountered before reading any
+ characters, otherwise return the number of characters read.
+
+ * return 0 if the port is in non-blocking mode and no characters
+ are immediately available.
+
+ * return 0 if the request is for 0 bytes, with no end-of-file
+ check
+
** New function: port? X
Returns a boolean indicating whether X is a port. Equivalent to
@@ -233,7 +260,7 @@ A simple wrapper for the `dup2' system call. Copies the file
descriptor OLDFD to descriptor number NEWFD, replacing the
previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
Unlike for dup->fdes or primitive-move->fdes, no attempt is made
-to move away ports which are using NEWFD\n". The return value is
+to move away ports which are using NEWFD. The return value is
unspecified.
** New function: close-fdes fd