From: Christophe Rhodes Date: Wed, 20 Dec 2006 15:47:50 +0000 (+0000) Subject: 1.0.0.35: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=16b425bf18dff8a43b70776f45f3d59741535356;p=sbcl.git 1.0.0.35: Patch from Richard M Kreuter improving the Gray streams documentation. ... minor typo fixes from patch on sbcl-devel 2006-12-19. --- diff --git a/doc/manual/streams.texinfo b/doc/manual/streams.texinfo index b3a5af9..ddb0003 100644 --- a/doc/manual/streams.texinfo +++ b/doc/manual/streams.texinfo @@ -46,30 +46,128 @@ fast path through @code{read-char}. @node Gray Streams @section Gray Streams + +The Gray Streams interface is a widely supported extension that +provides for definition of CLOS-extensible stream classes. Gray +stream classes are implemented by adding methods to generic functions +analogous to Common Lisp's standard I/O functions. Instances of Gray +stream classes may be used with any I/O operation where a non-Gray +stream can, provided that all required methods have been implemented +suitably. + +@menu +* Gray Streams classes:: +* Methods common to all streams:: +* Input stream methods:: +* Output stream methods:: +* Binary stream methods:: +* Character input stream methods:: +* Character output stream methods:: +* Gray Streams examples:: +@end menu + +@node Gray Streams classes +@subsection Gray Streams classes + +The defined Gray Stream classes are these: + @include class-sb-gray-fundamental-stream.texinfo -@include fun-sb-gray-stream-advance-to-column.texinfo +@include class-sb-gray-fundamental-input-stream.texinfo + +@noindent +The function input-stream-p will return true of any generalized +instance of fundamental-input-stream. + +@include class-sb-gray-fundamental-output-stream.texinfo + +@noindent +The function output-stream-p will return true of any generalized +instance of fundamental-output-stream. + +@include class-sb-gray-fundamental-binary-stream.texinfo + +@noindent +Note that instantiable subclasses of fundamental-binary-stream should +provide (or inherit) an applicable method for the generic function +stream-element-type. + +@include class-sb-gray-fundamental-character-stream.texinfo +@include class-sb-gray-fundamental-binary-input-stream.texinfo +@include class-sb-gray-fundamental-binary-output-stream.texinfo +@include class-sb-gray-fundamental-character-input-stream.texinfo +@include class-sb-gray-fundamental-character-output-stream.texinfo + +@node Methods common to all streams +@subsection Methods common to all streams + +These generic functions can be specialized on any generalized instance +of fundamental-stream. + +@include fun-common-lisp-stream-element-type.texinfo +@include fun-common-lisp-close.texinfo + + + + +@node Input stream methods +@subsection Input stream methods + +These generic functions may be specialized on any generalized instance +of fundamental-input-stream. + @include fun-sb-gray-stream-clear-input.texinfo +@include fun-sb-gray-stream-read-sequence.texinfo + +@node Character input stream methods +@subsection Character input stream methods + +These generic functions are used to implement subclasses of +fundamental-input-stream: + +@include fun-sb-gray-stream-peek-char.texinfo +@include fun-sb-gray-stream-read-char-no-hang.texinfo +@include fun-sb-gray-stream-read-char.texinfo +@include fun-sb-gray-stream-read-line.texinfo +@include fun-sb-gray-stream-listen.texinfo +@include fun-sb-gray-stream-unread-char.texinfo + +@node Output stream methods +@subsection Output stream methods + +These generic functions are used to implement subclasses of +fundamental-output-stream: + @include fun-sb-gray-stream-clear-output.texinfo @include fun-sb-gray-stream-finish-output.texinfo @include fun-sb-gray-stream-force-output.texinfo +@include fun-sb-gray-stream-write-sequence.texinfo + +@node Binary stream methods +@subsection Binary stream methods + +The following generic functions are available for subclasses of +fundamental-binary-stream: + +@include fun-sb-gray-stream-read-byte.texinfo +@include fun-sb-gray-stream-write-byte.texinfo + +@node Character output stream methods +@subsection Character output stream methods + +These generic functions are used to implement subclasses of +fundamental-character-output-stream: + +@include fun-sb-gray-stream-advance-to-column.texinfo @include fun-sb-gray-stream-fresh-line.texinfo @include fun-sb-gray-stream-line-column.texinfo @include fun-sb-gray-stream-line-length.texinfo -@include fun-sb-gray-stream-listen.texinfo -@include fun-sb-gray-stream-peek-char.texinfo -@include fun-sb-gray-stream-read-byte.texinfo -@include fun-sb-gray-stream-read-char-no-hang.texinfo -@include fun-sb-gray-stream-read-char.texinfo -@include fun-sb-gray-stream-read-line.texinfo -@include fun-sb-gray-stream-read-sequence.texinfo @include fun-sb-gray-stream-start-line-p.texinfo @include fun-sb-gray-stream-terpri.texinfo -@include fun-sb-gray-stream-unread-char.texinfo -@include fun-sb-gray-stream-write-byte.texinfo @include fun-sb-gray-stream-write-char.texinfo -@include fun-sb-gray-stream-write-sequence.texinfo @include fun-sb-gray-stream-write-string.texinfo +@include gray-streams-examples.texinfo + @node Simple Streams @comment node-name, next, previous, up @section Simple Streams diff --git a/src/pcl/gray-streams-class.lisp b/src/pcl/gray-streams-class.lisp index 4721893..c0051a1 100644 --- a/src/pcl/gray-streams-class.lisp +++ b/src/pcl/gray-streams-class.lisp @@ -16,28 +16,44 @@ ((open-p :initform t :accessor stream-open-p)) #+sb-doc - (:documentation "the base class for all CLOS streams"))) + (:documentation "the base class for all Gray streams"))) ;;; Define the stream classes. -(defclass fundamental-input-stream (fundamental-stream) nil) +(defclass fundamental-input-stream (fundamental-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray input streams")) -(defclass fundamental-output-stream (fundamental-stream) nil) +(defclass fundamental-output-stream (fundamental-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray output streams")) -(defclass fundamental-character-stream (fundamental-stream) nil) +(defclass fundamental-character-stream (fundamental-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray streams whose element-type is a subtype of character")) -(defclass fundamental-binary-stream (fundamental-stream) nil) +(defclass fundamental-binary-stream (fundamental-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray streams whose element-type is a subtype of unsigned-byte or signed-byte")) (defclass fundamental-character-input-stream - (fundamental-input-stream fundamental-character-stream) nil) + (fundamental-input-stream fundamental-character-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray input streams whose element-type is a subtype of character")) (defclass fundamental-character-output-stream - (fundamental-output-stream fundamental-character-stream) nil) + (fundamental-output-stream fundamental-character-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray output streams whose element-type is a subtype of character")) (defclass fundamental-binary-input-stream - (fundamental-input-stream fundamental-binary-stream) nil) + (fundamental-input-stream fundamental-binary-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray input streams whose element-type is a subtype of unsigned-byte or signed-byte")) (defclass fundamental-binary-output-stream - (fundamental-output-stream fundamental-binary-stream) nil) + (fundamental-output-stream fundamental-binary-stream) nil + #+sb-doc + (:documentation "a superclass of all Gray output streams whose element-type is a subtype of unsigned-byte or signed-byte")) ;;; This is not in the Gray stream proposal, so it is left here ;;; as example code. diff --git a/version.lisp-expr b/version.lisp-expr index 8f23159..34e5cf6 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.0.34" +"1.0.0.35"