projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
320a36b
)
Fix bug in ttyio that causes premature exit on pipe/file input.
author
Chris Hanson
<org/chris-hanson/cph>
Sat, 4 Feb 2017 21:39:29 +0000
(13:39 -0800)
committer
Chris Hanson
<org/chris-hanson/cph>
Sat, 4 Feb 2017 21:39:29 +0000
(13:39 -0800)
src/runtime/ttyio.scm
patch
|
blob
|
history
diff --git
a/src/runtime/ttyio.scm
b/src/runtime/ttyio.scm
index bbc8f299e09cc57ee8c0c2f1062defc9908f9655..9a6356fb524c09e1456944ee5f91da2d64ef56c9 100644
(file)
--- a/
src/runtime/ttyio.scm
+++ b/
src/runtime/ttyio.scm
@@
-120,11
+120,12
@@
USA.
(define (operation/read-finish port)
(let loop ()
(if (char-ready? port)
- (let ((char (
read
-char port)))
+ (let ((char (
generic-io/peek
-char port)))
(if (not (eof-object? char))
(if (char-whitespace? char)
- (loop)
- (unread-char char port))))))
+ (begin
+ (generic-io/read-char port)
+ (loop)))))))
(output-port/discretionary-flush port))
(define (operation/discretionary-write-char char port)