Make sure binary ports pass `binary-port?' regardless of the locale.
authorLudovic Courtès <ludo@gnu.org>
Fri, 22 Apr 2011 21:55:37 +0000 (23:55 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 22 Apr 2011 21:58:00 +0000 (23:58 +0200)
commit96128014bfaabe9e123c4f4928ce4c20427eaa53
treeef27223b8abacbc5ab801b3029f91813fb575e87
parent969bb92e9b13068abadb22eb7ab13c7f6616d266
Make sure binary ports pass `binary-port?' regardless of the locale.

* libguile/r6rs-ports.c (make_bip, make_cbip, make_bop, make_cbop):
  Set `c_port->encoding' to NULL.

* test-suite/tests/r6rs-ports.test ("7.2.7 Input
  Ports")["bytevector-input-port is binary"]: New test.
  ("7.2.7 Input Ports")["make-custom-binary-input-port"]: Make sure PORT
  passes `binary-port?' and `input-port?'.
  ("8.2.10 Output ports")["bytevector-output-port is binary"]: New test.
  ["make-custom-binary-output"]: Rename to...
  ["make-custom-binary-output-port"]: ... this.

* test-suite/tests/ports.test ("string ports")["read-char, wrong
  encoding, error", "read-char, wrong encoding, escape", "read-char,
  wrong encoding, substitute", "peek-char, wrong encoding, error"]: Use
  `set-port-encoding!' instead of `%default-port-encoding' to set the
  encoding of bytevector input ports.

* test-suite/tests/rdelim.test ("read-line")["decoding error", "decoding
  error, substitute"]: Likewise.

* doc/ref/api-io.texi (R6RS Port Manipulation): Document `binary-port?'
  and `textual-port?'.

* doc/ref/r6rs.texi (R6RS Incompatibilities): Mention the soft
  distinction between textual and binary ports.
doc/ref/api-io.texi
doc/ref/r6rs.texi
libguile/r6rs-ports.c
test-suite/tests/ports.test
test-suite/tests/r6rs-ports.test
test-suite/tests/rdelim.test