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

Diff of /src/code/fd-stream.lisp

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

revision 1.71 by emarsden, Tue Aug 5 11:00:49 2003 UTC revision 1.72 by gerd, Tue Aug 19 09:26:57 2003 UTC
# Line 726  Line 726 
726           (available (- tail head))           (available (- tail head))
727           (copy (min requested available)))           (copy (min requested available)))
728      (declare (type index offset head tail available copy))      (declare (type index offset head tail available copy))
729        ;;
730        ;; If something has been unread, put that at buffer + start,
731        ;; and read the rest to start + 1.
732        (when (fd-stream-unread stream)
733          (etypecase buffer
734            (system-area-pointer
735             (assert (= 1 (fd-stream-element-size stream)))
736             (setf (sap-ref-8 buffer start) (char-code (read-char stream))))
737            (vector
738             (setf (aref buffer start) (read-char stream))))
739          (return-from fd-stream-read-n-bytes
740            (1+ (fd-stream-read-n-bytes stream buffer (1+ start) (1- requested)
741                                        eof-error-p))))
742        ;;
743      (unless (zerop copy)      (unless (zerop copy)
744        (if (typep buffer 'system-area-pointer)        (if (typep buffer 'system-area-pointer)
745            (system-area-copy sap (* head vm:byte-bits)            (system-area-copy sap (* head vm:byte-bits)

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.72

  ViewVC Help
Powered by ViewVC 1.1.5