mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Add get-bytevector-some!.
* libguile/r6rs-ports.c (scm_get_bytevector_some_x): New procedure. * libguile/r6rs-ports.h (scm_get_bytevector_some_x): Add prototype. (scm_unget_bytevector): Move prototype next to 'scm_get_bytevector_some_x'. * module/ice-9/binary-ports.scm: Export 'get-bytevector-some!'. * doc/ref/api-io.texi (Binary I/O): Document it.
This commit is contained in:
parent
a23ee74fab
commit
cc73c2ab5d
4 changed files with 58 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
@c -*-texinfo-*-
|
||||
@c This is part of the GNU Guile Reference Manual.
|
||||
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007, 2009,
|
||||
@c 2010, 2011, 2013, 2016 Free Software Foundation, Inc.
|
||||
@c 2010, 2011, 2013, 2016, 2019 Free Software Foundation, Inc.
|
||||
@c See the file guile.texi for copying conditions.
|
||||
|
||||
@node Input and Output
|
||||
|
@ -194,6 +194,14 @@ new bytevector containing some of the available bytes (at least one),
|
|||
and update the port position to point just past these bytes.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} get-bytevector-some! port bv start count
|
||||
@deffnx {C Function} scm_get_bytevector_some_x (port, bv, start, count)
|
||||
Read up to @var{count} bytes from @var{port}, blocking as necessary
|
||||
until at least one byte is available or an end-of-file is reached.
|
||||
Store them in @var{bv} starting at index @var{start}. Return the number
|
||||
of bytes actually read, or an end-of-file object.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} get-bytevector-all port
|
||||
@deffnx {C Function} scm_get_bytevector_all (port)
|
||||
Read from @var{port}, blocking as necessary, until the end-of-file is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue