/[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.11 by ram, Sat May 18 13:38:36 1991 UTC revision 1.12 by ram, Sat May 18 19:06:01 1991 UTC
# Line 37  Line 37 
37  ;;;; Buffer manipulation routines.  ;;;; Buffer manipulation routines.
38    
39  (defvar *available-buffers* ()  (defvar *available-buffers* ()
40    "List of available buffers. Each buffer is an dynamic alien.")    "List of available buffers.  Each buffer is an sap pointing to
41      bytes-per-buffer of memory.")
42    
43  (defconstant bytes-per-buffer (* 4 1024)  (defconstant bytes-per-buffer (* 4 1024)
44    "Number of bytes per buffer.")    "Number of bytes per buffer.")
45    
46  ;;; NEXT-AVAILABLE-BUFFER -- Internal.  ;;; NEXT-AVAILABLE-BUFFER -- Internal.
47  ;;;  ;;;
48  ;;; Returns the next available alien buffer, creating one if necessary.  ;;; Returns the next available buffer, creating one if necessary.
49  ;;;  ;;;
50  (proclaim '(inline next-available-buffer))  (proclaim '(inline next-available-buffer))
51  ;;;  ;;;
# Line 71  Line 72 
72    (fd -1 :type fixnum)        ; The file descriptor    (fd -1 :type fixnum)        ; The file descriptor
73    (buffering :full)           ; One of :none, :line, or :full    (buffering :full)           ; One of :none, :line, or :full
74    (char-pos nil)              ; Character position if known.    (char-pos nil)              ; Character position if known.
75    (listen nil)                ; T if we don't need to listen    (listen nil)                ; T if we don't need to listen.  :EOF if we hit
76                                  ; EOF.
77    ;; The input buffer.    ;; The input buffer.
78    (unread nil)    (unread nil)
79    (ibuf-sap nil)    (ibuf-sap nil)
# Line 452  Line 453 
453                        stream                        stream
454                        (mach:get-unix-error-msg errno))))                        (mach:get-unix-error-msg errno))))
455              ((zerop count)              ((zerop count)
456                 (setf (fd-stream-listen stream) :eof)
457               (throw 'eof-input-catcher nil))               (throw 'eof-input-catcher nil))
458              (t              (t
459               (incf (fd-stream-ibuf-tail stream) count))))))               (incf (fd-stream-ibuf-tail stream) count))))))

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.5