1 21 22 package org.armedbear.lisp; 23 24 public final class read_char_no_hang extends Primitive 27 { 28 private read_char_no_hang() 29 { 30 super("read-char-no-hang", 31 "&optional input-stream eof-error-p eof-value recursive-p"); 32 } 33 34 public LispObject execute(LispObject[] args) throws ConditionThrowable 35 { 36 int length = args.length; 37 if (length > 4) 38 signal(new WrongNumberOfArgumentsException(this)); 39 Stream stream = 40 length > 0 ? inSynonymOf(args[0]) : getStandardInput(); 41 boolean eofError = length > 1 ? (args[1] != NIL) : true; 42 LispObject eofValue = length > 2 ? args[2] : NIL; 43 boolean recursive = length > 3 ? (args[3] != NIL) : false; 44 return stream.readCharNoHang(eofError, eofValue); 45 } 46 47 private static final Primitive READ_CHAR_NO_HANG = new read_char_no_hang(); 48 } 49 | Popular Tags |