1 ;;;; stubs for the Gray streams implementation for SBCL
3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; This software is in the public domain and is provided with absolutely no
7 ;;;; warranty. See the COPYING and CREDITS files for more information.
11 ;;; The intent here is that when Gray streams support isn't installed
12 ;;; yet, and someone tries to do a stream operation on something
13 ;;; which isn't an ordinary CL:STREAM, and the code tries to fall
14 ;;; through to the Gray stream operation, we signal a type error,
15 ;;; instead of an undefined function error.
17 ;;; Real Gray stream functions will overwrite these stubs. FIXME: When
18 ;;; and if Gray stream functions become a stable part of the system,
19 ;;; we should just delete all this.
20 (defun %gray-stream-stub (oughtta-be-stream &rest rest)
21 (declare (ignore rest))
22 (error 'simple-type-error
23 :datum oughtta-be-stream
24 :expected-type 'stream
25 :format-control "~@<not a ~S: ~2I~_~S~:>"
26 :format-arguments (list 'stream oughtta-be-stream)))
29 '(stream-advance-to-column
30 stream-clear-input stream-clear-output
31 stream-finish-output stream-force-output
35 stream-listen stream-peek-char
37 stream-read-char stream-read-char-no-hang
42 stream-write-byte stream-write-char
44 (setf (fdefinition funname) #'%gray-stream-stub))