0.9.2.47:
[sbcl.git] / src / pcl / gray-streams.lisp
index 2b0cc85..a293e9d 100644 (file)
     (error 'type-error :datum non-stream :expected-type 'stream)))
 \f
 (let ()
+  (fmakunbound 'interactive-stream-p)
+
+  (defgeneric interactive-stream-p (stream)
+    #+sb-doc
+    (:documentation "Is STREAM an interactive stream?"))
+  
+  (defmethod interactive-stream-p ((stream ansi-stream))
+    (funcall (ansi-stream-misc stream) stream :interactive-p))
+
+  (defmethod interactive-stream-p ((stream fundamental-stream))
+    nil)
+
+  (defmethod interactive-stream-p ((stream stream))
+    (bug-or-error stream 'interactive-stream-p))
+  
+  (defmethod interactive-stream-p ((non-stream t))
+    (error 'type-error :datum non-stream :expected-type 'stream)))
+\f
+(let ()
   (fmakunbound 'output-stream-p)
 
   (defgeneric output-stream-p (stream)