/[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.40 by dtc, Tue Mar 25 17:07:31 1997 UTC revision 1.41 by dtc, Sat Dec 27 12:33:07 1997 UTC
# Line 476  Line 476 
476               (setf (fd-stream-ibuf-tail stream) tail))))               (setf (fd-stream-ibuf-tail stream) tail))))
477      (setf (fd-stream-listen stream) nil)      (setf (fd-stream-listen stream) nil)
478      (multiple-value-bind      (multiple-value-bind
479          (count errno)            (count errno)
480          (unix:unix-select (1+ fd) (the (unsigned-byte 32) (ash 1 fd)) 0 0 0)          (alien:with-alien ((read-fds (alien:struct unix:fd-set)))
481              (unix:fd-zero read-fds)
482              (unix:fd-set fd read-fds)
483              (unix:unix-fast-select (1+ fd) (alien:addr read-fds) nil nil 0 0))
484        (case count        (case count
485          (1)          (1)
486          (0          (0
# Line 919  non-server method is also significantly Line 922  non-server method is also significantly
922                     (fd-stream-ibuf-tail stream)))                     (fd-stream-ibuf-tail stream)))
923           (fd-stream-listen stream)           (fd-stream-listen stream)
924           (setf (fd-stream-listen stream)           (setf (fd-stream-listen stream)
925                 (eql (unix:unix-select (1+ (fd-stream-fd stream))                 (eql (alien:with-alien ((read-fds (alien:struct unix:fd-set)))
926                                        (the (unsigned-byte 32)                        (unix:fd-zero read-fds)
927                                             (ash 1 (fd-stream-fd stream)))                        (unix:fd-set (fd-stream-fd stream) read-fds)
928                                        0                        (unix:unix-fast-select (1+ (fd-stream-fd stream))
929                                        0                                               (alien:addr read-fds) nil nil
930                                        0)                                               0 0))
931                      1))))                      1))))
932      (:unread      (:unread
933       (setf (fd-stream-unread stream) arg1)       (setf (fd-stream-unread stream) arg1)
# Line 989  non-server method is also significantly Line 992  non-server method is also significantly
992       (setf (fd-stream-ibuf-tail stream) 0)       (setf (fd-stream-ibuf-tail stream) 0)
993       (catch 'eof-input-catcher       (catch 'eof-input-catcher
994         (loop         (loop
995          (let ((count (unix:unix-select (1+ (fd-stream-fd stream))          (let ((count (alien:with-alien ((read-fds (alien:struct unix:fd-set)))
996                                         (the (unsigned-byte 32)                         (unix:fd-zero read-fds)
997                                              (ash 1 (fd-stream-fd stream)))                         (unix:fd-set (fd-stream-fd stream) read-fds)
998                                         0 0 0)))                         (unix:unix-fast-select (1+ (fd-stream-fd stream))
999                                                  (alien:addr read-fds) nil nil
1000                                                  0 0))))
1001            (cond ((eql count 1)            (cond ((eql count 1)
1002                   (do-input stream)                   (do-input stream)
1003                   (setf (fd-stream-ibuf-head stream) 0)                   (setf (fd-stream-ibuf-head stream) 0)

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.5