From: Henry M. Wu Date: Tue, 26 May 1992 23:16:17 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: 20090517-FFI~9348 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3fe6cd017c21d87883a7f921eea1b13f784bb349;p=mit-scheme.git *** empty log message *** --- diff --git a/v7/src/runtime/infutl.scm b/v7/src/runtime/infutl.scm index 650065eee..1236a7d2a 100644 --- a/v7/src/runtime/infutl.scm +++ b/v7/src/runtime/infutl.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/infutl.scm,v 1.33 1992/05/26 23:07:52 mhwu Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/infutl.scm,v 1.34 1992/05/26 23:16:17 mhwu Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -517,12 +517,15 @@ MIT in each case. |# (or (input-port/operation/read-char input-port) (error "Port doesn't support read-char" input-port)))) (lambda (port buffer start end) - (let loop ((i start) (char (port/read-char port))) - (if (eof-object? char) + (let loop ((i start)) + (if (fix:>= i end) (fix:- i start) - (begin - (string-set! buffer i char) - (loop (fix:1+ i) (port/read-char port)))))))))) + (let ((char (port/read-char port))) + (if (eof-object? char) + (fix:- i start) + (begin + (string-set! buffer i char) + (loop (fix:1+ i)))))))))))) (port/read-substring input-port buffer start end))) (define (find-alternate-file-type base-pathname exts/receivers) diff --git a/v7/src/runtime/output.scm b/v7/src/runtime/output.scm index 8e492d9bd..68f65f755 100644 --- a/v7/src/runtime/output.scm +++ b/v7/src/runtime/output.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/output.scm,v 14.13 1992/05/26 23:08:56 mhwu Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/output.scm,v 14.14 1992/05/26 23:12:19 mhwu Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -88,7 +88,7 @@ MIT in each case. |# (fluid-let ((*current-output-port* port)) (thunk))) (define ((make-call-with-output-file open) output-specifier receiver) - (let ((port (open-output-file output-specifier))) + (let ((port (open output-specifier))) (let ((value (receiver port))) (close-port port) value)))