X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fgray-streams.lisp;h=a293e9d28b933c5a77a58285576cbfa3d8404ed7;hb=d604a358d8e5eb5587989e0a4f1d31dbe6ac5ffe;hp=2b0cc85d3e4aa9bff25871903757ca5cc239721b;hpb=61dc1d5c0b4988f7e957be876a9abf9f31d51e0a;p=sbcl.git diff --git a/src/pcl/gray-streams.lisp b/src/pcl/gray-streams.lisp index 2b0cc85..a293e9d 100644 --- a/src/pcl/gray-streams.lisp +++ b/src/pcl/gray-streams.lisp @@ -113,6 +113,25 @@ (error 'type-error :datum non-stream :expected-type 'stream))) (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))) + +(let () (fmakunbound 'output-stream-p) (defgeneric output-stream-p (stream)