[armedbear-cvs] r11422 - branches/open-external-format/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Dec 6 12:16:02 UTC 2008


Author: ehuelsmann
Date: Sat Dec  6 12:16:01 2008
New Revision: 11422

Log:
Fix CLEAR-INPUT tests.

* Stream.java:Stream::_clearInput(): Check for end-of-stream (-1) return value in
     _readChar().


* Stream.java:Stream::reader: make protected so that it becomes available to subclasses.

Modified:
   branches/open-external-format/src/org/armedbear/lisp/Stream.java

Modified: branches/open-external-format/src/org/armedbear/lisp/Stream.java
==============================================================================
--- branches/open-external-format/src/org/armedbear/lisp/Stream.java	(original)
+++ branches/open-external-format/src/org/armedbear/lisp/Stream.java	Sat Dec  6 12:16:01 2008
@@ -65,9 +65,9 @@
 
   private boolean interactive;
   private boolean open = true;
-
+  
   // Character input.
-  private PushbackReader reader;
+  protected PushbackReader reader;
   protected int offset;
   protected int lineNumber;
 
@@ -2068,8 +2068,9 @@
   {
     if (reader != null)
       {
-        while (_charReady())
-          _readChar();
+        int c = 0;
+        while (_charReady() && (c >= 0))
+          c = _readChar();
       }
     else if (in != null)
       {




More information about the armedbear-cvs mailing list