/[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.32 by ram, Thu Jan 6 19:50:20 1994 UTC revision 1.33 by ram, Sat Jan 8 18:42:47 1994 UTC
# Line 743  non-server method is also significantly Line 743  non-server method is also significantly
743                  (unless count                  (unless count
744                    (error "Error reading ~S: ~A" stream                    (error "Error reading ~S: ~A" stream
745                           (unix:get-unix-error-msg err)))                           (unix:get-unix-error-msg err)))
746                  (when (zerop count)                  (if eof-error-p
747                    (return (eof-or-lose stream eof-error-p                      (when (zerop count)
748                                         (- requested now-needed))))                        (error 'end-of-file :stream stream))
749                        (return (- requested now-needed)))
750                  (decf now-needed count)                  (decf now-needed count)
751                  (when (zerop now-needed) (return requested))                  (when (zerop now-needed) (return requested))
752                  (incf offset count)))))                  (incf offset count)))))
# Line 762  non-server method is also significantly Line 763  non-server method is also significantly
763                (unless count                (unless count
764                  (error "Error reading ~S: ~A" stream                  (error "Error reading ~S: ~A" stream
765                         (unix:get-unix-error-msg err)))                         (unix:get-unix-error-msg err)))
766                (when (zerop count)                (when (and eof-error-p (zerop count))
767                  (return (eof-or-lose stream eof-error-p                  (error 'end-of-file :stream stream))
768                                       (- requested now-needed))))  
769                (let* ((copy (min now-needed count))                (let* ((copy (min now-needed count))
770                       (copy-bits (* copy vm:byte-bits))                       (copy-bits (* copy vm:byte-bits))
771                       (buffer-start-bits                       (buffer-start-bits
# Line 781  non-server method is also significantly Line 782  non-server method is also significantly
782                                             copy-bits))                                             copy-bits))
783    
784                  (decf now-needed copy)                  (decf now-needed copy)
785                  (when (zerop now-needed)                  (when (or (zerop now-needed) (not eof-error-p))
786                    (setf (fd-stream-ibuf-head stream) copy)                    (setf (fd-stream-ibuf-head stream) copy)
787                    (setf (fd-stream-ibuf-tail stream) count)                    (setf (fd-stream-ibuf-tail stream) count)
788                    (return requested))                    (return (- requested now-needed)))
789                  (incf offset copy)))))))))))                  (incf offset copy)))))))))))
790    
791    

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.5