From: Chris Hanson Date: Fri, 26 Mar 1999 01:53:08 +0000 (+0000) Subject: Fix thinko. X-Git-Tag: 20090517-FFI~4573 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ad39c62005cfb3d30e83b5d84ebca5cc6209eb86;p=mit-scheme.git Fix thinko. --- diff --git a/v7/src/runtime/fileio.scm b/v7/src/runtime/fileio.scm index 4286cde9b..1738c4a8a 100644 --- a/v7/src/runtime/fileio.scm +++ b/v7/src/runtime/fileio.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: fileio.scm,v 1.17 1999/02/24 21:36:17 cph Exp $ +$Id: fileio.scm,v 1.18 1999/03/26 01:53:08 cph Exp $ Copyright (c) 1991-1999 Massachusetts Institute of Technology @@ -226,13 +226,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (if remaining (let ((result (make-string remaining))) (let ((n (fill-buffer result))) - (if (< n remaining) + (if (fix:< n remaining) (substring result 0 n) result))) - (apply string-append - (let loop () - (let ((string (make-string input-buffer-size))) - (let ((n (fill-buffer string))) - (cond ((zero? n) '()) - ((< n remaining) (list (substring string 0 n))) - (else (cons string (loop)))))))))))) \ No newline at end of file + (let loop ((strings '())) + (let ((string (make-string input-buffer-size))) + (let ((n (fill-buffer string))) + (if (fix:< n input-buffer-size) + (apply string-append + (reverse! (cons (substring string 0 n) strings))) + (loop (cons string strings)))))))))) \ No newline at end of file