| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes <https://bugs.gnu.org/62290>.
Based on the implementation in ports.c. I don't understand what this
code is really doing, but the suspendable ports implementation differs
from the similar C code for a couple of inequalities.
* module/ice-9/suspendable-ports.scm (decode-utf8, bad-utf8-len): Flip a
couple of inequalities.
* test-suite/tests/ports.test ("string ports"): Add additional invalid
UTF-8 test case.
* NEWS: Update.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
|
|
|
| |
* module/ice-9/suspendable-ports.scm (get-bytevector-some!): Fix
incorrect arguments to bytevector-copy!
|
|
|
|
|
|
|
|
| |
This reverts commit 0f983e3db0c43ad7c89f57ea84f792ede373ba0c.
After discussing with Mike we are going to punt the read-line changes
for now. Open the port in O_TEXT mode if you want to chomp the CR in
CFLF sequences.
|
|
|
|
|
|
|
|
|
| |
* libguile/rdelim.c (scm_read_line): handle CRLF, LS and PS
* module/ice-9/suspendable-ports.scm (read-line): handle CRLF, LS, and PS
* module/web/http.scm (read-header-line): take advantage of CRLF in read-line
(read-header): don't need to test for \return
* test-suite/tests/rdelim.test: new tests for read-line CRLF, LS and PS
* doc/ref/api-io.texi: update doc for read-line
|
|
|
|
|
|
| |
* module/ice-9/suspendable-ports.scm (get-bytevector-n!): New procedure.
(get-bytevector-n): Rewrite in terms of 'get-bytevector-n!'.
(port-bindings): Add 'get-bytevector-n!'.
|
|
|
|
|
|
| |
* module/ice-9/suspendable-ports.scm (get-bytevector-some)
(get-bytevector-some!): New procedures.
(port-bindings): Add them.
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/ref/posix.texi (Network Sockets and Communication): Add
documentation.
* libguile/socket.c (scm_accept4): New function, replaces accept
implementation.
(scm_accept): Call scm_accept4.
(scm_init_socket): Define SOCK_CLOEXEC and SOCK_NONBLOCK.
* libguile/socket.h: Add private scm_accept4 decl.
* module/ice-9/suspendable-ports.scm (accept): Update.
|
|
|
|
|
|
| |
* module/ice-9/suspendable-ports.scm: Prevent TOCTTOU bugs by
additionally returning the buffer and offset when we compute an
amount-buffered.
|
|
|
|
| |
* module/ice-9/sports.scm (accept, connect): New Scheme functions.
|
|
|
|
|
|
|
|
| |
* libguile/ports.c (scm_port_encode_char): New function.
* module/ice-9/ports.scm (port-encode-char): Export port-encode-char to
the internals module.
* module/ice-9/sports.scm (put-char): New function.
(port-bindings): Add put-char and put-string.
|
|
* module/ice-9/suspendable-ports.scm: Rename from ice-9/sports.scm, and
adapt module names. Remove exports that are not related to the
suspendable ports facility; we want people to continue using the port
operations from their original locations. Add put-string to the
replacement list.
* module/Makefile.am: Adapt to rename.
* test-suite/tests/suspendable-ports.test: Rename from sports.test.
* test-suite/Makefile.am: Adapt to rename.
* module/ice-9/textual-ports.scm (unget-char, unget-string): New
functions.
* doc/ref/api-io.texi (Textual I/O, Simple Output): Flesh out
documentation.
(Line/Delimited): Undocument write-line, read-string, and
read-string!. This is handled by (ice-9 textual-ports).
(Bytevector Ports): Fix duplicated section.
(String Ports): Move the note about encodings down to the end.
(Custom Ports): Add explanatory text. Remove mention of C functions;
they should use the C port interface.
(Venerable Port Interfaces): Add text, and make documentation refer to
recommended interfaces.
(Using Ports from C): Add documentation.
(Non-Blocking I/O): Document more fully and adapt to suspendable-ports
name change.
|