Eliminate loop in INPUT-BUFFER/READ-SUBSTRING. When line-translation
authorChris Hanson <org/chris-hanson/cph>
Wed, 15 May 1996 18:47:19 +0000 (18:47 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 15 May 1996 18:47:19 +0000 (18:47 +0000)
was in effect, this loop caused this procedure to read input until the
buffer was filled.  However, the procedure is supposed to return as
soon as some input is available.

v7/src/runtime/io.scm

index 31a36d3e70d8c68ab92b597a9b75c794c3a42dac..216f4e4c81bf3f04a5caaae413b33e1dd7552e7b 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: io.scm,v 14.46 1996/04/24 03:48:36 cph Exp $
+$Id: io.scm,v 14.47 1996/05/15 18:47:19 cph Exp $
 
 Copyright (c) 1988-96 Massachusetts Institute of Technology
 
@@ -1056,9 +1056,7 @@ MIT in each case. |#
                   (begin
                     (substring-move-left! bstring bstart bend string index)
                     (set-input-buffer/start-index! buffer bend)
-                    (if (channel-open? (input-buffer/channel buffer))
-                        (read-directly (fix:+ index available))
-                        (fix:+ index available))))))
+                    (fix:+ index available)))))
            ((or (fix:= (input-buffer/real-end buffer) 0)
                 (channel-closed? (input-buffer/channel buffer)))
             index)