diff options
author | Mark H Weaver <mhw@netris.org> | 2019-04-16 23:13:06 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2019-06-18 02:05:20 -0400 |
commit | cc73c2ab5deda6257564c675613122da3ee85a7c (patch) | |
tree | 3a5f7dc8e14bcf3c232210e3913bc40560e64a01 /doc | |
parent | a23ee74fab7f192a8b3da76554d27944821754f8 (diff) |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ref/api-io.texi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index 24890a12e..270a97075 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -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 |