repl.scm next-char needed to read EOF from port
authorAndy Wingo <wingo@pobox.com>
Sun, 3 Oct 2010 21:08:27 +0000 (23:08 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 3 Oct 2010 21:08:27 +0000 (23:08 +0200)
* module/system/repl/repl.scm (next-char): Actually read off the EOF if
  we got one. Interesting, this.

module/system/repl/repl.scm

index efe29ac..e416d1d 100644 (file)
 (define (next-char wait)
   (if (or wait (char-ready?))
       (let ((ch (peek-char)))
-       (cond ((eof-object? ch) ch)
+       (cond ((eof-object? ch) (read-char) ch)
              ((char-whitespace? ch) (read-char) (next-char wait))
              (else ch)))
       #f))