guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 01/01: Fix R6RS call-with-{input, output}-file to open t


From: Mark H. Weaver
Subject: [Guile-commits] 01/01: Fix R6RS call-with-{input, output}-file to open textual ports.
Date: Thu, 2 Aug 2018 10:15:40 -0400 (EDT)

mhw pushed a commit to branch stable-2.2
in repository guile.

commit 4c91de3e45e7c98d5b7c484509fe5c59bd70f9fd
Author: Mark H Weaver <address@hidden>
Date:   Thu Aug 2 10:05:17 2018 -0400

    Fix R6RS call-with-{input,output}-file to open textual ports.
    
    Fixes <https://bugs.gnu.org/32329>.
    Reported and diagnosed by Göran Weinholt <address@hidden>.
    
    * 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.
---
 module/rnrs/io/simple.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/module/rnrs/io/simple.scm b/module/rnrs/io/simple.scm
index 5eb396f..0d778a9 100644
--- a/module/rnrs/io/simple.scm
+++ b/module/rnrs/io/simple.scm
@@ -1,6 +1,6 @@
 ;;; simple.scm --- The R6RS simple I/O library
 
-;;      Copyright (C) 2010, 2011, 2014 Free Software Foundation, Inc.
+;;      Copyright (C) 2010, 2011, 2014, 2018 Free Software Foundation, Inc.
 ;;
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
@@ -118,10 +118,10 @@
   (define display (@@ (rnrs io ports) display))
 
   (define (call-with-input-file filename proc)
-    (call-with-port (open-file-input-port filename) proc))
+    (call-with-port (open-input-file filename) proc))
 
   (define (call-with-output-file filename proc)
-    (call-with-port (open-file-output-port filename) proc))
+    (call-with-port (open-output-file filename) proc))
 
   (define (with-input-from-file filename thunk)
     (call-with-input-file filename



reply via email to

[Prev in Thread] Current Thread [Next in Thread]