Fixes <https://bugs.gnu.org/32329>.
Reported and diagnosed by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/io/simple.scm (call-with-input-file)
(call-with-output-file): Use 'open-{input,output}-file' to open the port
in textual mode. Previously 'open-file-{input,output}-port' was used,
which opened the port in binary mode.
Fixes <http://bugs.gnu.org/17044>.
Reported and diagnosed by Xin Wang <dram.wang@gmail.com>.
* module/rnrs/io/simple.scm (open-input-file, open-output-file): Pass
missing buffer-mode argument to open-file-{input,output}-port.
Previously, (native-transcoder) was incorrectly passed as the
buffer-mode argument, so no transcoder was provided, thus creating a
binary port.
* module/rnrs/io/ports.scm (display): Implement as an
exception-converting wrapper around Guile's core display.
* module/rnrs/io/simple.scm: Don't export Guile's corresponding core
procedures, but use `(rnrs io ports)' instead. This way, we get the
conditions required by R6RS raised.
* doc/ref/r6rs.texi (rnrs io simple): Mention that these procedures are
supposed to raise R6RS conditions.
* module/rnrs/io/ports.scm: (file-options, buffer-mode, eol-style)
(error-handling-mode, make-transcoder, native-transcoder)
(latin-1-codec, utf-8-codec, utf-16-codec)
(call-with-bytevector-output-port, open-file-input-port)
(open-file-output-port, make-custom-textual-output-port)
(flush-output-port, put-char, put-datum, put-string, get-char)
(get-datum, get-line, get-string-all, lookahead-char)
(standard-input-port, standard-output-port, standard-error-port):
Define all of these.
(call-with-port): Don't use `dynamic-wind', as it is against its
specification in R6RS 8.2.6.
* module/rnrs.scm: Export procedures added.
* module/rnrs/io/simple.scm (call-with-input-file)
(call-with-output-file): Define these in terms of R6RS procedures to
get correct exception behavior.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Move the I/O condition types from `(rnrs conditions)', where they were
not exported, to `(rnrs files)', where they are.
* module/rnrs/conditions.scm: Remove definition of I/O condition types.
* module/rnrs/files.scm: Replace references to I/O condition types
inside `(rnrs conditions)' with the actual definitions.
* module/rnrs/io/simple.scm: Don't `@@'-reference the I/O condition types, just
imported them from `(rnrs files)'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* module/ice-9/boot-9.scm (find-versioned-module): Remove. Still had
some bugs (e.g. for "." in the path and in finding compiled files),
did too much computation and statting, and we don't really want to
promote versioning. Nor do we want to hard-code a particular encoding
of versions in the file-system. Perhaps the real way to do this is to
be extensible somehow.
(try-module-autoload): Just dispatch to primitive-load-path in all cases.
* module/rnrs
* module/rnrs.scm:
* module/rnrs/arithmetic/bitwise.scm:
* module/rnrs/arithmetic/fixnums.scm:
* module/rnrs/arithmetic/flonums.scm:
* module/rnrs/base.scm:
* module/rnrs/conditions.scm:
* module/rnrs/control.scm:
* module/rnrs/enums.scm:
* module/rnrs/eval.scm:
* module/rnrs/exceptions.scm:
* module/rnrs/files.scm:
* module/rnrs/hashtables.scm:
* module/rnrs/io/simple.scm:
* module/rnrs/lists.scm:
* module/rnrs/mutable-pairs.scm:
* module/rnrs/mutable-strings.scm:
* module/rnrs/programs.scm:
* module/rnrs/r5rs.scm:
* module/rnrs/records/inspection.scm:
* module/rnrs/records/procedural.scm:
* module/rnrs/records/syntactic.scm:
* module/rnrs/sorting.scm:
* module/rnrs/syntax-case.scm:
* module/rnrs/unicode.scm: Move these files, eliding the "6/" infix, so
that they are in the normal (unversioned) module path.
2010-06-16 22:20:28 +02:00
Renamed from module/rnrs/io/6/simple.scm (Browse further)