/[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.83.6.4.2.2 by rtoy, Tue May 12 16:31:49 2009 UTC revision 1.83.6.4.2.3 by rtoy, Mon May 25 20:08:28 2009 UTC
# Line 2287  POSITION: an INTEGER greater than or equ Line 2287  POSITION: an INTEGER greater than or equ
2287                                          ; to support simple-stream                                          ; to support simple-stream
2288                                          ; semantics for read-vector                                          ; semantics for read-vector
2289      character      character
2290        bit
2291        (unsigned-byte 2)
2292        (unsigned-byte 4)
2293      (unsigned-byte 8)      (unsigned-byte 8)
2294      (unsigned-byte 16)      (unsigned-byte 16)
2295      (unsigned-byte 32)      (unsigned-byte 32)
# Line 2305  POSITION: an INTEGER greater than or equ Line 2308  POSITION: an INTEGER greater than or equ
2308    ;; quite constrain the array element type.    ;; quite constrain the array element type.
2309    ;; (declare (type (simple-array (or unsigned-byte signed-byte) (*)) s))    ;; (declare (type (simple-array (or unsigned-byte signed-byte) (*)) s))
2310    ;; (declare (type (simple-array * (*)) s))    ;; (declare (type (simple-array * (*)) s))
2311    (declare (type (or (simple-array (unsigned-byte 8) (*))    (declare (type (or (simple-array bit (*))
2312                         (simple-array (unsigned-byte 2) (*))
2313                         (simple-array (unsigned-byte 4) (*))
2314                         (simple-array (unsigned-byte 8) (*))
2315                       (simple-array (signed-byte 8) (*))                       (simple-array (signed-byte 8) (*))
2316                       (simple-array (unsigned-byte 16) (*))                       (simple-array (unsigned-byte 16) (*))
2317                       (simple-array (signed-byte 16) (*))                       (simple-array (signed-byte 16) (*))
# Line 2384  POSITION: an INTEGER greater than or equ Line 2390  POSITION: an INTEGER greater than or equ
2390               ;; operation on a binary stream.               ;; operation on a binary stream.
2391               (with-array-data ((data s) (offset-start start) (offset-end end))               (with-array-data ((data s) (offset-start start) (offset-end end))
2392                 (etypecase data                 (etypecase data
2393                     ((simple-array bit (*))
2394                      (read-n-x8-bytes stream data
2395                                       (ceiling offset-start 8)
2396                                       (ceiling offset-end 8)
2397                                       8))
2398    
2399                     ((simple-array (unsigned-byte 2) (*))
2400                      (read-n-x8-bytes stream data
2401                                       (ceiling offset-start 4)
2402                                       (ceiling offset-end 4)
2403                                       8))
2404    
2405                     ((simple-array (unsigned-byte 4) (*))
2406                      (read-n-x8-bytes stream data
2407                                       (ceiling offset-start 2)
2408                                       (ceiling offset-end 2)
2409                                       8))
2410    
2411                   ((simple-array (unsigned-byte 8) (*))                   ((simple-array (unsigned-byte 8) (*))
2412                    (read-n-x8-bytes stream data offset-start offset-end 8))                    (read-n-x8-bytes stream data offset-start offset-end 8))
2413    
# Line 2596  SEQ:   a proper SEQUENCE Line 2620  SEQ:   a proper SEQUENCE
2620    ;; quite constrain the array element type.    ;; quite constrain the array element type.
2621    ;; (declare (type (simple-array (or unsigned-byte signed-byte) (*)) s))    ;; (declare (type (simple-array (or unsigned-byte signed-byte) (*)) s))
2622    ;; (declare (type (simple-array * (*)) s))    ;; (declare (type (simple-array * (*)) s))
2623    (declare (type (or (simple-array (unsigned-byte 8) (*))    (declare (type (or (simple-array bit (*))
2624                         (simple-array (unsigned-byte 2) (*))
2625                         (simple-array (unsigned-byte 4) (*))
2626                         (simple-array (unsigned-byte 8) (*))
2627                       (simple-array (signed-byte 8) (*))                       (simple-array (signed-byte 8) (*))
2628                       (simple-array (unsigned-byte 16) (*))                       (simple-array (unsigned-byte 16) (*))
2629                       (simple-array (signed-byte 16) (*))                       (simple-array (signed-byte 16) (*))
# Line 2622  SEQ:   a proper SEQUENCE Line 2649  SEQ:   a proper SEQUENCE
2649                               (start start)                               (start start)
2650                               (end   end))                               (end   end))
2651               (etypecase data               (etypecase data
2652                   ((simple-array bit (*))
2653                    (write-n-x8-bytes stream data
2654                                      (ceiling start 8) (ceiling end 8) 8))
2655    
2656                   ((simple-array (unsigned-byte 2) (*))
2657                    (write-n-x8-bytes stream data
2658                                      (ceiling start 4) (ceiling end 4) 8))
2659    
2660                   ((simple-array (unsigned-byte 4) (*))
2661                    (write-n-x8-bytes stream data
2662                                      (ceiling start 2) (ceiling end 2) 8))
2663    
2664                 ((simple-array (unsigned-byte 8) (*))                 ((simple-array (unsigned-byte 8) (*))
2665                  (write-n-x8-bytes stream data start end 8))                  (write-n-x8-bytes stream data start end 8))
2666    

Legend:
Removed from v.1.83.6.4.2.2  
changed lines
  Added in v.1.83.6.4.2.3

  ViewVC Help
Powered by ViewVC 1.1.5