summaryrefslogtreecommitdiff
path: root/libguile/deprecated.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-01-16 23:43:31 +0100
committerLudovic Courtès <ludo@gnu.org>2014-01-18 22:52:07 +0100
commit8ca97482b01cf1a6aa538cc5a2d1f71fb60f080c (patch)
tree71969fad76834a569c1b477b4069f7b72924fbd1 /libguile/deprecated.h
parent122f24cc8a3637ed42d7792ad1ff8ec0c49c58df (diff)
downloadguile-8ca97482b01cf1a6aa538cc5a2d1f71fb60f080c.tar.gz
Custom binary input ports support 'setvbuf'.
* libguile/r6rs-ports.c (CBIP_BUFFER_SIZE): Adjust comment. Set to 8KiB. (SCM_SET_CBIP_BYTEVECTOR): New macro. (cbip_setvbuf): New function. (make_cbip): Set PORT's 'setvbuf' internal field. (cbip_fill_input): Check whether PORT is buffered. When unbuffered, check whether BV can hold C_REQUESTED bytes, and allocate a new bytevector if not; copy the data back from BV to c_port->read_pos. Remove 'again' label, and don't loop there. * test-suite/tests/r6rs-ports.test ("7.2.7 Input Ports")["custom binary input port unbuffered & 'port-position'", "custom binary input port unbuffered & 'read!' calls", "custom binary input port, unbuffered then buffered", "custom binary input port, buffered then unbuffered"]: New tests. * doc/ref/api-io.texi (R6RS Binary Input): Document the buffering of custom binary input ports, and link to 'setvbuf'.
Diffstat (limited to 'libguile/deprecated.h')
0 files changed, 0 insertions, 0 deletions