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

Diff of /src/code/stream.lisp

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

revision 1.74 by rtoy, Wed Apr 14 17:06:35 2004 UTC revision 1.75 by rtoy, Thu Apr 15 01:34:20 2004 UTC
# Line 213  Line 213 
213      ;; simple-stream      ;; simple-stream
214      (stream::%input-stream-p stream)      (stream::%input-stream-p stream)
215      ;; lisp-stream      ;; lisp-stream
216      (and (not (eq (lisp-stream-in stream) #'closed-flame))      (let ((stream (if (synonym-stream-p stream)
217           (or (not (eq (lisp-stream-in stream) #'ill-in))                        (symbol-value (synonym-stream-symbol stream))
218               (not (eq (lisp-stream-bin stream) #'ill-bin))                        stream)))
219               (not (eq (lisp-stream-n-bin stream) #'ill-n-bin))))))        (and (not (eq (lisp-stream-in stream) #'closed-flame))
220               (or (not (eq (lisp-stream-in stream) #'ill-in))
221                   (not (eq (lisp-stream-bin stream) #'ill-bin))
222                   (not (eq (lisp-stream-n-bin stream) #'ill-n-bin)))))))
223    
224  (defun output-stream-p (stream)  (defun output-stream-p (stream)
225    "Returns non-nil if the given Stream can perform output operations."    "Returns non-nil if the given Stream can perform output operations."
# Line 227  Line 230 
230      ;; simple-stream      ;; simple-stream
231      (stream::%output-stream-p stream)      (stream::%output-stream-p stream)
232      ;; lisp-stream      ;; lisp-stream
233      (and (not (eq (lisp-stream-in stream) #'closed-flame))      (let ((stream (if (synonym-stream-p stream)
234           (or (not (eq (lisp-stream-out stream) #'ill-out))                        (symbol-value (synonym-stream-symbol stream))
235               (not (eq (lisp-stream-bout stream) #'ill-bout))))))                        stream)))
236          (and (not (eq (lisp-stream-in stream) #'closed-flame))
237               (or (not (eq (lisp-stream-out stream) #'ill-out))
238                   (not (eq (lisp-stream-bout stream) #'ill-bout)))))))
239    
240  (defun open-stream-p (stream)  (defun open-stream-p (stream)
241    "Return true if Stream is not closed."    "Return true if Stream is not closed."
# Line 1458  output to Output-stream" Line 1464  output to Output-stream"
1464             (type index start)             (type index start)
1465             (type (or index null) end))             (type (or index null) end))
1466    (internal-make-string-input-stream (coerce string 'simple-string)    (internal-make-string-input-stream (coerce string 'simple-string)
1467                                       start end))                                       start (or end (length string))))
1468    
1469  ;;;; String Output Streams:  ;;;; String Output Streams:
1470    
# Line 1534  output to Output-stream" Line 1540  output to Output-stream"
1540                  (fixnum index count))                  (fixnum index count))
1541         (if (char= (schar string index) #\newline)         (if (char= (schar string index) #\newline)
1542             (return count))))             (return count))))
1543      (:element-type 'base-char)))      (:element-type 'base-char)
1544        (:close
1545         (set-closed-flame stream))))
1546    
1547  (defun get-output-stream-string (stream)  (defun get-output-stream-string (stream)
1548    "Returns a string of all the characters sent to a stream made by    "Returns a string of all the characters sent to a stream made by

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75

  ViewVC Help
Powered by ViewVC 1.1.5