Changeset 5575


Ignore:
Timestamp:
Dec 3, 2006, 4:09:16 AM (18 years ago)
Author:
Gary Byers
Message:

Tweak stream hierarchy a little, to avoid some NO-NEXT-METHODs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-streams.lisp

    r5520 r5575  
    34053405;;; array and that the 'start' and 'end' arguments are sane.
    34063406
    3407 (defmethod stream-write-vector ((stream fundamental-character-output-stream)
     3407(defmethod stream-write-vector ((stream character-output-stream)
    34083408                                vector start end)
    34093409  (declare (fixnum start end))
     
    34113411       ((= i end))
    34123412    (declare (fixnum i))
    3413     (stream-write-char stream (uvref vector i))))
    3414 
    3415 (defmethod stream-write-vector ((stream fundamental-binary-output-stream)
     3413    (write-char (uvref vector i) stream)))
     3414
     3415(defmethod stream-write-vector ((stream binary-output-stream)
    34163416                                vector start end)
    34173417  (declare (fixnum start end))
     
    34193419       ((= i end))
    34203420    (declare (fixnum i))
    3421     (stream-write-byte stream (uvref vector i))))
    3422 
    3423 (defmethod stream-read-vector ((stream fundamental-character-input-stream)
     3421    (write-byte (uvref vector i) stream)))
     3422
     3423(defmethod stream-read-vector ((stream character-input-stream)
    34243424                               vector start end)
    34253425  (generic-character-read-vector stream vector start end))
    34263426
    34273427
    3428 (defmethod stream-read-vector ((stream fundamental-binary-input-stream)
     3428(defmethod stream-read-vector ((stream binary-input-stream)
    34293429                               vector start end)
    34303430  (declare (fixnum start end))
     
    34323432       ((= i end) end)
    34333433    (declare (fixnum i))
    3434     (let* ((b (stream-read-byte stream)))
     3434    (let* ((b (read-byte stream)))
    34353435      (if (eq b :eof)
    34363436        (return i)
     
    35733573    (stream-write-char stream (pop list))))
    35743574
    3575 (defmethod stream-read-list ((stream fundamental-character-input-stream)
     3575(defmethod stream-read-list ((stream character-input-stream)
    35763576                             list count)
    35773577  (generic-character-read-list stream list count))
    35783578
    3579 (defmethod stream-read-list ((stream basic-character-input-stream)
    3580                              list count)
    3581   (generic-character-read-list stream list count))
    35823579
    35833580(defmethod stream-write-list ((stream fundamental-binary-output-stream)
     
    35993596        (write-byte element stream)))))
    36003597
    3601 (defmethod stream-read-list ((stream fundamental-binary-input-stream)
    3602                              list count)
    3603   (declare (fixnum count))
    3604   (do* ((tail list (cdr tail))
    3605         (i 0 (1+ i)))
    3606        ((= i count) count)
    3607     (declare (fixnum i))
    3608     (let* ((b (stream-read-byte stream)))
    3609       (if (eq b :eof)
    3610         (return i)
    3611         (rplaca tail b)))))
    3612 
    3613 (defmethod stream-read-list ((stream basic-binary-input-stream)
     3598(defmethod stream-read-list ((stream binary-input-stream)
    36143599                             list count)
    36153600  (declare (fixnum count))
     
    36233608        (rplaca tail b)))))
    36243609
    3625 (defmethod stream-read-vector ((stream basic-character-input-stream)
    3626                                vector start end)
    3627   (generic-character-read-vector stream vector start end))
    3628 
    3629 (defmethod stream-read-vector ((stream basic-binary-input-stream)
     3610
     3611
     3612
     3613
     3614(defmethod stream-read-vector ((stream binary-input-stream)
    36303615                               vector start end)
    36313616  (declare (fixnum start end))
     
    36333618       ((= i end) end)
    36343619    (declare (fixnum i))
    3635     (let* ((b (stream-read-byte stream)))
     3620    (let* ((b (read-byte stream)))
    36363621      (if (eq b :eof)
    36373622        (return i)
     
    36813666  (declare (fixnum start end))
    36823667  (if (not (typep vector 'simple-base-string))
    3683     (call-next-method)
     3668    (generic-character-read-vector stream vector start end)
    36843669    (let* ((ioblock (basic-stream-ioblock stream)))
    36853670      (with-ioblock-input-locked (ioblock)
Note: See TracChangeset for help on using the changeset viewer.