/[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.5 by wlott, Fri Aug 24 18:10:52 1990 UTC revision 1.6 by wlott, Thu Sep 6 19:40:38 1990 UTC
# Line 239  Line 239 
239    
240  (def-output-routines ("OUTPUT-CHAR-~A-BUFFERED"  (def-output-routines ("OUTPUT-CHAR-~A-BUFFERED"
241                        1                        1
242                        (:none base-character)                        (:none character)
243                        (:line base-character)                        (:line character)
244                        (:full base-character))                        (:full character))
245    (if (eq (char-code byte)    (if (eq (char-code byte)
246            (char-code #\Newline))            (char-code #\Newline))
247        (setf (fd-stream-char-pos stream) 0)        (setf (fd-stream-char-pos stream) 0)
# Line 514  Line 514 
514             (nconc *input-routines*             (nconc *input-routines*
515                    (list (list ',type ',name ',size))))))                    (list (list ',type ',name ',size))))))
516    
517  ;;; INPUT-BASE-CHARACTER -- internal  ;;; INPUT-CHARACTER -- internal
518  ;;;  ;;;
519  ;;;   Routine to use in stream-in slot for reading string chars.  ;;;   Routine to use in stream-in slot for reading string chars.
520  ;;;  ;;;
521  (def-input-routine input-base-character  (def-input-routine input-character
522                     (base-character 1 sap head)                     (character 1 sap head)
523    (code-char (sap-ref-8 sap head)))    (code-char (sap-ref-8 sap head)))
524    
525  ;;; INPUT-UNSIGNED-8BIT-BYTE -- internal  ;;; INPUT-UNSIGNED-8BIT-BYTE -- internal
# Line 846  Line 846 
846         (push (fd-stream-ibuf-sap stream) *available-buffers*)         (push (fd-stream-ibuf-sap stream) *available-buffers*)
847         (setf (fd-stream-ibuf-sap stream) nil))         (setf (fd-stream-ibuf-sap stream) nil))
848       (lisp::set-closed-flame stream))       (lisp::set-closed-flame stream))
849      (:clear-input)      (:clear-input
850         (setf (fd-stream-ibuf-head stream) 0)
851         (setf (fd-stream-ibuf-tail stream) 0)
852         (loop
853           (multiple-value-bind
854               (count errno)
855               (mach:unix-select (1+ fd) (ash 1 fd) 0 0 0)
856             (cond ((eql count 1)
857                    (do-input stream)
858                    (setf (fd-stream-ibuf-head stream) 0)
859                    (setf (fd-stream-ibuf-tail stream) 0))
860                   (t
861                    (return))))))
862      (:force-output      (:force-output
863       (flush-output-buffer stream))       (flush-output-buffer stream))
864      (:finish-output      (:finish-output

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.5