diff options
author | Andy Wingo <wingo@pobox.com> | 2016-08-04 22:29:51 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-08-04 22:29:51 +0200 |
commit | 1a1c3bbe597f3682066266ce44bf9bbed2481ad2 (patch) | |
tree | 511c9e1db62a5f90bd1cf1e955f57bdabf261e44 /doc/ref/api-io.texi | |
parent | 8da33d972a795e0bb1c0e3ed5735d9bf42756950 (diff) | |
download | guile-1a1c3bbe597f3682066266ce44bf9bbed2481ad2.tar.gz |
Implement R6RS custom binary input/output ports
* NEWS: Add new feature.
* doc/ref/r6rs.texi (rnrs io ports):
* doc/ref/api-io.texi (Custom Ports): Document new procedure.
* libguile/r6rs-ports.h:
* libguile/r6rs-ports.c (make_custom_binary_input_output_port)
(scm_make_custom_binary_input_output_port)
(custom_binary_input_output_port_random_access_p)
(initialize_custom_binary_input_output_ports)
(scm_init_r6rs_ports): Implement custom binary input/output ports.
* module/rnrs/io/ports.scm (rnrs):
* module/ice-9/binary-ports.scm (ice-9): Export
make-custom-binary-input/output-port.
Diffstat (limited to 'doc/ref/api-io.texi')
-rw-r--r-- | doc/ref/api-io.texi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index 23620538a..76c8db806 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -1299,6 +1299,18 @@ though an end-of-file was sent to the byte sink. The other arguments are as for @code{make-custom-binary-input-port}. @end deffn +@cindex custom binary input/output ports +@deffn {Scheme Procedure} make-custom-binary-input/output-port id read! write! get-position set-position! close +Return a new custom binary input/output port named @var{id} (a string). +The various arguments are the same as for The other arguments are as for +@code{make-custom-binary-input-port} and +@code{make-custom-binary-output-port}. If buffering is enabled on the +port, as is the case by default, input will be buffered in both +directions; @xref{Buffering}. If the @var{set-position!} function is +provided and not @code{#f}, then the port will also be marked as +random-access, causing the buffer to be flushed between reads and +writes. +@end deffn @node Soft Ports @subsubsection Soft Ports |