/[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.53 by toy, Mon Oct 7 14:31:05 2002 UTC revision 1.54 by toy, Mon Oct 7 17:49:46 2002 UTC
# Line 1753  POSITION: an INTEGER greater than or equ Line 1753  POSITION: an INTEGER greater than or equ
1753    (declare (type (or null (integer 0 *)) end))    (declare (type (or null (integer 0 *)) end))
1754    (declare (values (integer 0 *)))    (declare (values (integer 0 *)))
1755    
1756      (when (not (cl::lisp-stream-p stream))
1757         (return-from read-sequence (stream-read-sequence seq stream start end)))
1758    
1759    (let ((end (or end (length seq))))    (let ((end (or end (length seq))))
1760      (declare (type (integer 0 *) start end))      (declare (type (integer 0 *) start end))
1761    
# Line 2060  SEQ:   a proper SEQUENCE Line 2063  SEQ:   a proper SEQUENCE
2063    (declare (type (integer 0 *) start))  ; a list does not have a limit    (declare (type (integer 0 *) start))  ; a list does not have a limit
2064    (declare (type (or null (integer 0 *)) end))    (declare (type (or null (integer 0 *)) end))
2065    (declare (values (or list vector)))    (declare (values (or list vector)))
2066    
2067      (when (not (cl::lisp-stream-p stream))
2068        (return-from write-sequence (stream-write-sequence seq stream start end)))
2069    
2070    (let ((end (or end (length seq))))    (let ((end (or end (length seq))))
2071      (declare (type (integer 0 *) start end))      (declare (type (integer 0 *) start end))
2072    
# Line 2201  SEQ:   a proper SEQUENCE Line 2208  SEQ:   a proper SEQUENCE
2208    ;; (declare (type (simple-array (or unsigned-byte signed-byte) (*)) s))    ;; (declare (type (simple-array (or unsigned-byte signed-byte) (*)) s))
2209    ;; (declare (type (simple-array * (*)) s))    ;; (declare (type (simple-array * (*)) s))
2210    (declare (type (or (simple-array (unsigned-byte 8) (*))    (declare (type (or (simple-array (unsigned-byte 8) (*))
2211                       #+:signed-array (simple-array (signed-byte 8) (*))                       (simple-array (signed-byte 8) (*))
2212                       (simple-array (unsigned-byte 16) (*))                       (simple-array (unsigned-byte 16) (*))
2213                       #+:signed-array (simple-array (signed-byte 16) (*))                       (simple-array (signed-byte 16) (*))
2214                       (simple-array (unsigned-byte 32) (*))                       (simple-array (unsigned-byte 32) (*))
2215                       #+:signed-array (simple-array (signed-byte 32) (*))                       (simple-array (signed-byte 32) (*))
2216                       (simple-array (unsigned-byte *) (*))                       (simple-array (unsigned-byte *) (*))
2217                       (simple-array (signed-byte *) (*))                       (simple-array (signed-byte *) (*)))
                      )  
2218                      seq))                      seq))
2219    (when (not (subtypep (stream-element-type stream) 'integer))    (when (not (subtypep (stream-element-type stream) 'integer))
2220      (error 'type-error      (error 'type-error
# Line 2217  SEQ:   a proper SEQUENCE Line 2223  SEQ:   a proper SEQUENCE
2223             :format-control "Trying to output binary data to a text stream."))             :format-control "Trying to output binary data to a text stream."))
2224    (cond ((system:fd-stream-p stream)    (cond ((system:fd-stream-p stream)
2225           (flet ((write-n-x8-bytes (stream data start end byte-size)           (flet ((write-n-x8-bytes (stream data start end byte-size)
2226                    (let* ((x8-mult (truncate byte-size 8))                    (let ((x8-mult (truncate byte-size 8)))
2227                           (numbytes (* (- end start) x8-mult))                      (system:output-raw-bytes stream data
2228                           )                                               (* x8-mult start)
2229                      (system:output-raw-bytes stream data start numbytes)))                                               (* x8-mult end)))))
                 )  
2230             (with-array-data ((data seq)             (with-array-data ((data seq)
2231                               (start start)                               (start start)
2232                               (end   end))                               (end   end))

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.5