From: Chris Hanson Date: Wed, 15 May 1996 19:10:52 +0000 (+0000) Subject: Fix bug: GROUP-INSERT-FILE! was depending on the fact that X-Git-Tag: 20090517-FFI~5508 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=33d8801feb7e1895de21eeab3016556cbe790e96;p=mit-scheme.git Fix bug: GROUP-INSERT-FILE! was depending on the fact that INPUT-BUFFER/READ-SUBSTRING did not return until the argument buffer was full -- which is no longer true. --- diff --git a/v7/src/edwin/fileio.scm b/v7/src/edwin/fileio.scm index 9f0cb4914..1feaa669c 100644 --- a/v7/src/edwin/fileio.scm +++ b/v7/src/edwin/fileio.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: fileio.scm,v 1.137 1996/05/11 08:37:57 cph Exp $ +;;; $Id: fileio.scm,v 1.138 1996/05/15 19:10:52 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-96 Massachusetts Institute of Technology ;;; @@ -199,7 +199,16 @@ of the predicates is satisfied, the file is written in the usual way." (let ((text (group-text group)) (end (fix:+ index length))) (if buffer - (input-buffer/read-substring buffer text index end) + (fix:- (let loop ((index index)) + (if (fix:< index end) + (let ((n + (input-buffer/read-substring + buffer text index end))) + (if (fix:= n 0) + index + (loop (fix:+ index n)))) + index)) + index) (channel-read-block channel text index end))))) (if (fix:> n 0) (without-interrupts