/[cmucl]/src/code/stream.lisp
ViewVC logotype

Diff of /src/code/stream.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ram, Tue Feb 6 17:27:02 1990 UTC revision 1.2 by ram, Thu Feb 22 12:40:57 1990 UTC
# Line 14  Line 14 
14  ;;; file (VAXIO, SPIO, or VMIO) contains functions used by this file for  ;;; file (VAXIO, SPIO, or VMIO) contains functions used by this file for
15  ;;; a specific machine.  ;;; a specific machine.
16  ;;;  ;;;
17  (in-package 'lisp)  (in-package "LISP")
18    
19  (export '(make-broadcast-stream make-synonym-stream  (export '(make-broadcast-stream make-synonym-stream
20            make-broadcast-stream make-concatenated-stream make-two-way-stream            make-broadcast-stream make-concatenated-stream make-two-way-stream
# Line 278  Line 278 
278    "Clears any buffered input associated with the Stream."    "Clears any buffered input associated with the Stream."
279    (let ((stream (in-synonym-of stream)))    (let ((stream (in-synonym-of stream)))
280      (setf (stream-in-index stream) in-buffer-length)      (setf (stream-in-index stream) in-buffer-length)
281      (funcall (stream-misc stream) stream :clear-input)))      (funcall (stream-misc stream) stream :clear-input)
282        nil))
283    
284  (defun read-byte (stream &optional (eof-errorp t) eof-value)  (defun read-byte (stream &optional (eof-errorp t) eof-value)
285    "Returns the next byte of the Stream."    "Returns the next byte of the Stream."
# Line 301  Line 302 
302           (num-buffered (- in-buffer-length index)))           (num-buffered (- in-buffer-length index)))
303      (declare (fixnum index num-buffered))      (declare (fixnum index num-buffered))
304      (cond      (cond
305       ((not buffer)       ((not in-buffer)
306        (with-in-stream stream stream-n-bin buffer start numbytes eof-errorp))        (with-in-stream stream stream-n-bin buffer start numbytes eof-errorp))
307       ((not (eql (%primitive get-vector-access-code in-buffer) 3))       ((not (eql (%primitive get-vector-access-code in-buffer) 3))
308        (error "N-Bin only works on 8-bit-like streams."))        (error "N-Bin only works on 8-bit-like streams."))
# Line 762  Line 763 
763    
764  (defun string-in-misc (stream operation &optional arg1 arg2)  (defun string-in-misc (stream operation &optional arg1 arg2)
765    (case operation    (case operation
766        (:file-position
767         (if (null arg1)
768           (string-input-stream-current stream)))
769      (:read-line      (:read-line
770       (let ((string (string-input-stream-string stream))       (let ((string (string-input-stream-string stream))
771             (current (string-input-stream-current stream))             (current (string-input-stream-current stream))
# Line 849  Line 853 
853  (defun string-out-misc (stream operation &optional arg1 arg2)  (defun string-out-misc (stream operation &optional arg1 arg2)
854    (declare (ignore arg1 arg2))    (declare (ignore arg1 arg2))
855    (case operation    (case operation
856        (:file-position
857         (if (null arg1)
858           (string-output-stream-index stream)))
859      (:charpos      (:charpos
860       (do ((index (1- (the fixnum (string-output-stream-index stream)))       (do ((index (1- (the fixnum (string-output-stream-index stream)))
861                   (1- index))                   (1- index))

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.5