Changeset 5620


Ignore:
Timestamp:
01/31/04 13:43:55 (17 years ago)
Author:
piso
Message:

listen(), _charReady()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/FileStream.java

    r5601 r5620  
    33 *
    44 * Copyright (C) 2004 Peter Graves
    5  * $Id: FileStream.java,v 1.5 2004-01-29 14:36:01 piso Exp $
     5 * $Id: FileStream.java,v 1.6 2004-01-31 13:43:55 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    9494    }
    9595
     96    public LispObject listen() throws ConditionThrowable
     97    {
     98        try {
     99            return raf.getFilePointer() < raf.length() ? T : NIL;
     100        }
     101        catch (IOException e) {
     102            signal(new StreamError(e));
     103            // Not reached.
     104            return NIL;
     105        }
     106    }
     107
    96108    // Returns -1 at end of file.
    97109    protected int _readChar() throws ConditionThrowable
     
    121133    protected boolean _charReady() throws ConditionThrowable
    122134    {
    123         try {
    124             return raf.getFilePointer() < raf.length();
    125         }
    126         catch (IOException e) {
    127             signal(new StreamError(e));
    128             // Not reached.
    129             return false;
    130         }
     135        return true;
    131136    }
    132137
Note: See TracChangeset for help on using the changeset viewer.