Added support for custom binary input ports.
commitf9d2d62539b6c6a562dcde9536b13f57c97aabea
authorLudovic Court`es <ludovic.courtes@laas.fr>
Thu, 22 Feb 2007 13:49:16 +0000 (22 13:49 +0000)
committerLudovic Court`es <ludovic.courtes@laas.fr>
Thu, 22 Feb 2007 13:49:16 +0000 (22 13:49 +0000)
tree1b8696755b26950b0a32ba7ce0f8a6c5c6723e6c
parent893635579d68594d543326f64fd52e88c96aeb34
Added support for custom binary input ports.

* modules/r6rs/i/o/ports.scm: Export `make-custom-binary-input-port'.

* src/ports.c (bip_fill_input): Don't increment C_PORT->READ_POS in the
  `else' branch.
  (custom_binary_input_port_type): New.
  (CBIP_BUFFER_SIZE, SCM_R6RS_CBIP_*): New macros.
  (make_cbip, cbip_mark, cbip_fill_input, cbip_seek, cbip_close,
  scm_r6rs_make_custom_binary_input_port,
  initialize_custom_binary_input_ports): New functions.
  (scm_init_r6rs_ports): Invoke `initialize_custom_binary_input_ports ()'.

* src/ports.h: Updated accordingly.

* tests/io-ports.test: Moved "7.2.7 Input Ports" to the bottom.
  (7.2.7 Input Ports)[make-custom-binary-input-port]: New test.

git-archimport-id: lcourtes@laas.fr--2006-libre/guile-r6rs-libs--devo--0--patch-23
ChangeLog
modules/r6rs/i/o/ports.scm
src/ports.c
src/ports.h
tests/io-ports.test