X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fgray-streams.lisp;h=7498eea0417a1923ed5deb02277f508d92f01396;hb=57b330cc8334015f9953d7fb82a30afc82d2a471;hp=873bf384f8db3b844b85d64c9c28fc74e657d669;hpb=3a5eefac8a65dfd36729031f0a9b9dd8c022b7f2;p=sbcl.git diff --git a/src/pcl/gray-streams.lisp b/src/pcl/gray-streams.lisp index 873bf38..7498eea 100644 --- a/src/pcl/gray-streams.lisp +++ b/src/pcl/gray-streams.lisp @@ -229,10 +229,10 @@ (loop (let ((ch (stream-read-char stream))) (cond ((eq ch :eof) - (return (values (shrink-vector res index) t))) + (return (values (%shrink-vector res index) t))) (t (when (char= ch #\newline) - (return (values (shrink-vector res index) nil))) + (return (values (%shrink-vector res index) nil))) (when (= index len) (setq len (* len 2)) (let ((new (make-string len))) @@ -255,6 +255,7 @@ (error 'type-error :datum non-stream :expected-type 'stream)) (defgeneric stream-read-sequence (stream seq &optional start end) + #+sb-doc (:documentation "This is like CL:READ-SEQUENCE, but for Gray streams.")) @@ -465,6 +466,7 @@ T))) (defgeneric stream-write-sequence (stream seq &optional start end) + #+sb-doc (:documentation "This is like CL:WRITE-SEQUENCE, but for Gray streams.")) @@ -542,6 +544,18 @@ (basic-io-type-stream-write-sequence stream seq start end #'stream-write-byte)) +(defgeneric stream-file-position (stream &optional position-spec) + #+sb-doc + (:documentation + "Used by FILE-POSITION. Returns or changes the current position within STREAM.")) + +(defmethod stream-file-position ((stream ansi-stream) &optional position-spec) + (ansi-stream-file-position stream position-spec)) + +(defmethod stream-file-position ((stream t) &optional position-spec) + (declare (ignore stream position-spec)) + nil) + ;;; This is not in the Gray stream proposal, so it is left here ;;; as example code.