Changeset 14211
- Timestamp:
- 10/21/12 18:18:20 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/peek_char.java
r13461 r14211 39 39 public final class peek_char extends Primitive 40 40 { 41 private static LispObject internalEOF = new LispObject(); 42 41 43 private peek_char() 42 44 { … … 69 71 else 70 72 in = stream; 71 final LispObject result = in.readChar(eofError, eofValue); 73 final LispObject result = in.readChar(eofError, internalEOF); 74 if (result == internalEOF) 75 return eofValue; 72 76 if (result instanceof LispCharacter) 73 77 in.unreadChar((LispCharacter)result); … … 80 84 Readtable rt = currentReadtable(); 81 85 while (true) { 82 LispObject result = stream.readChar(eofError, eofValue); 86 LispObject result = stream.readChar(eofError, internalEOF); 87 if (result == internalEOF) 88 return eofValue; 89 83 90 if (result instanceof LispCharacter) { 84 91 char c = ((LispCharacter)result).value; … … 97 104 char c = ((LispCharacter)peekType).value; 98 105 while (true) { 99 LispObject result = stream.readChar(eofError, eofValue); 106 LispObject result = stream.readChar(eofError, internalEOF); 107 if (result == internalEOF) 108 return eofValue; 109 100 110 if (result instanceof LispCharacter) { 101 111 if (((LispCharacter)result).value == c) {
Note: See TracChangeset
for help on using the changeset viewer.