From: Chris Hanson Date: Thu, 15 Mar 2001 21:12:55 +0000 (+0000) Subject: Implement CALL-WITH-APPEND-FILE and CALL-WITH-BINARY-APPEND-FILE. X-Git-Tag: 20090517-FFI~2904 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=994cb2190fc4b1a5bbacfd6121e9f409caa9b7a7;p=mit-scheme.git Implement CALL-WITH-APPEND-FILE and CALL-WITH-BINARY-APPEND-FILE. --- diff --git a/v7/src/runtime/fileio.scm b/v7/src/runtime/fileio.scm index 1738c4a8a..46d75e060 100644 --- a/v7/src/runtime/fileio.scm +++ b/v7/src/runtime/fileio.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: fileio.scm,v 1.18 1999/03/26 01:53:08 cph Exp $ +$Id: fileio.scm,v 1.19 2001/03/15 21:12:47 cph Exp $ -Copyright (c) 1991-1999 Massachusetts Institute of Technology +Copyright (c) 1991-2001 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; File I/O Ports @@ -166,6 +167,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define call-with-binary-output-file (make-call-with-file open-binary-output-file)) +(define call-with-append-file + (make-call-with-file (lambda (filename) (open-output-file filename #t)))) + +(define call-with-binary-append-file + (make-call-with-file + (lambda (filename) (open-binary-output-file filename #t)))) + (define ((make-with-input-from-file call) input-specifier thunk) (call input-specifier (lambda (port) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 26bbd540a..ede46d541 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.361 2001/03/08 19:26:59 cph Exp $ +$Id: runtime.pkg,v 14.362 2001/03/15 21:12:55 cph Exp $ Copyright (c) 1988-2001 Massachusetts Institute of Technology @@ -16,7 +16,8 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. |# ;;;; Runtime System Packaging @@ -862,8 +863,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (files "fileio") (parent ()) (export () + call-with-binary-append-file call-with-binary-input-file call-with-binary-output-file + call-with-append-file call-with-input-file call-with-output-file open-binary-i/o-file