Changeset 4914
- Timestamp:
- Jul 27, 2006, 11:49:15 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lib/streams.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/streams.lisp
r4908 r4914 45 45 46 46 (defun read-char (&optional input-stream (eof-error-p t) eof-value recursive-p) 47 (declare (ignore recursive-p)) 47 (declare (ignore recursive-p) 48 (optimize (speed 3) (space 0))) 48 49 (setq input-stream (designated-input-stream input-stream)) 49 ( check-eof50 (if (typep input-stream 'basic-stream)51 (let* ((ioblock (basic-stream.state input-stream)))52 (if ioblock50 (if (typep input-stream 'basic-stream) 51 (let* ((ioblock (basic-stream.state input-stream))) 52 (if ioblock 53 (check-eof 53 54 (funcall (ioblock-read-char-function ioblock) ioblock) 54 (error "~s is closed" input-stream))) 55 (stream-read-char input-stream)) 56 input-stream 57 eof-error-p 58 eof-value)) 55 input-stream eof-error-p eof-value) 56 (stream-is-closed input-stream))) 57 (check-eof (stream-read-char input-stream) 58 input-stream 59 eof-error-p 60 eof-value))) 59 61 60 62 (defun unread-char (char &optional input-stream) … … 88 90 89 91 (defun read-byte (stream &optional (eof-error-p t) eof-value) 90 (check-eof 91 (stream-read-byte stream) 92 stream 93 eof-error-p 94 eof-value)) 92 (if (typep stream 'basic-stream) 93 (let* ((ioblock (basic-stream.state stream))) 94 (if ioblock 95 (check-eof (funcall (ioblock-read-byte-function ioblock) ioblock) 96 stream 97 eof-error-p 98 eof-value) 99 (stream-is-closed ioblock))) 100 (check-eof 101 (stream-read-byte stream) 102 stream 103 eof-error-p 104 eof-value))) 95 105 96 106 ;;;;;;;;;;;; OUTPUT STREAMS
Note:
See TracChangeset
for help on using the changeset viewer.
