From 09de7e4ede72b8eaa1c42e8d08e338bfe9945f2c Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 30 Jun 2013 23:45:16 +0000 Subject: Tidy detection of terminal in CLisp. --- src/interp/vmlisp.lisp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/interp/vmlisp.lisp') diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index 8528cb17..68735213 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -294,14 +294,14 @@ ; 9.13 Streams -#+KCL -(defun |ioTerminal?| (stream) - (and (streamp stream) (output-stream-p stream) - (eq (system:fp-output-stream stream) - (system:fp-output-stream *terminal-io*)))) - -#-KCL (defun |ioTerminal?| (stream) + #+:gcl (and (streamp stream) (output-stream-p stream) + (eq (system:fp-output-stream stream) + (system:fp-output-stream *terminal-io*))) + #+:clisp (or (eq stream *terminal-io*) + (and (typep stream 'synonym-stream) + (|ioTerminal?| (symbol-value (synonym-stream-symbol stream))))) + #-(or :clisp :gcl) (cond ((not (streamp stream)) nil) ((not (typep stream 'synonym-stream)) @@ -1421,10 +1421,6 @@ ((PROGN (NEXTSTRMLINE STRM) (STRMBLANKLINE STRM)) STRM) ((STRMSKIPTOBLANK STRM)))) -(DEFUN CURINPUTLINE () (CURSTRMLINE |$InputStream|)) - -(DEFUN NEXTINPUTLINE () (NEXTSTRMLINE |$InputStream|)) - ; 22.3 Output Functions ; 22.3.1 Output to Character Streams -- cgit v1.2.3