Changeset 5051


Ignore:
Timestamp:
Aug 28, 2006, 3:57:55 AM (18 years ago)
Author:
Gary Byers
Message:

More missing BASIC-STREAM methods (STREAM-LINE-COLUMN, STREAM-LISTEN,
STREAM-EOFP.)

File:
1 edited

Legend:

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

    r5024 r5051  
    587587                limit (io-buffer-count buf)))
    588588        (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
    589         (schar (io-buffer-buffer buf) idx)))))
     589        (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx))))))
    590590
    591591(defun %private-ioblock-tyi (ioblock)
     
    605605              limit (io-buffer-count buf)))
    606606      (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
    607       (schar (io-buffer-buffer buf) idx))))
     607      (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx)))))
    608608
    609609(defun %locked-ioblock-tyi (ioblock)
     
    624624                limit (io-buffer-count buf)))
    625625        (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
    626         (schar (io-buffer-buffer buf) idx)))))
     626        (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx))))))
    627627
    628628(declaim (inline %ioblock-tyy-no-hang))
     
    643643              limit (io-buffer-count buf)))
    644644      (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
    645       (schar (io-buffer-buffer buf) idx))))
     645      (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx)))))
    646646
    647647
     
    657657          (setq idx (io-buffer-idx buf)
    658658                limit (io-buffer-count buf)))
    659         (let ((byte (uvref (io-buffer-buffer buf) idx)))
    660           (if (characterp byte) byte (%code-char byte))))))
     659        (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx)))))
    661660
    662661(defun %ioblock-clear-input (ioblock)   
     
    737736         (buffer (io-buffer-buffer out)))
    738737    (declare (fixnum written bufsize col)
    739              (simple-string buffer)
     738             (type (simple-array (unsigned-byte 8) (*)) buffer)
    740739             (optimize (speed 3) (safety 0)))
    741740    (do* ((pos start-octet (+ pos written))
     
    23672366    (%ioblock-eofp ioblock)))
    23682367
     2368(defmethod stream-eofp ((stream basic-input-stream))
     2369  (let* ((ioblock (basic-stream-ioblock stream)))
     2370    (with-ioblock-input-locked (ioblock)
     2371      (%ioblock-eofp ioblock))))
     2372
    23692373(defmethod stream-listen ((stream buffered-input-stream-mixin))
    23702374  (with-stream-ioblock-input (ioblock stream :speedy t)
    23712375    (%ioblock-listen ioblock)))
     2376
     2377(defmethod stream-listen ((stream basic-input-stream))
     2378  (let* ((ioblock (basic-stream-ioblock stream)))
     2379    (with-ioblock-input-locked (ioblock)
     2380      (%ioblock-listen ioblock))))
    23722381
    23732382(defun flush-ioblock (ioblock finish-p)
     
    24092418  (let* ((ioblock (stream-ioblock stream nil)))
    24102419    (and ioblock (ioblock-charpos ioblock))))
     2420
     2421(defmethod stream-line-column ((stream basic-character-output-stream))
     2422  (let* ((ioblock (basic-stream.state stream)))
     2423    (and ioblock (ioblock-charpos ioblock))))
     2424
     2425
    24112426
    24122427(defmethod stream-set-column ((stream buffered-character-output-stream-mixin)
Note: See TracChangeset for help on using the changeset viewer.