Changeset 5360
- Timestamp:
- Oct 17, 2006, 1:01:19 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-streams.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-streams.lisp
r5357 r5360 44 44 (defmethod stream-direction ((s stream)) 45 45 ) 46 47 (defmethod stream-domain ((s stream)) 48 t) 49 46 50 47 51 (defmethod stream-direction ((s input-stream)) … … 3126 3130 (>= n min) 3127 3131 (case (case unit-size 3128 (16 (logior (ash (aref buf 0) 8) 3129 (aref buf 1))) 3130 (32 (logior (ash (aref buf 0) 24) 3131 (ash (aref buf 1) 16) 3132 (ash (aref buf 2) 8) 3133 (aref buf 3)))) 3132 (16 (%native-u8-ref-u16 buf 0)) 3133 (32 (%native-u8-ref-u32 buf 0))) 3134 3134 (#.byte-order-mark-char-code 3135 3135 (setf (io-buffer-idx inbuf) min) … … 3457 3457 (defclass file-stream (stream) 3458 3458 ()) 3459 3460 (defmethod stream-domain ((s file-stream)) 3461 :file) 3462 3459 3463 3460 3464 … … 4947 4951 4948 4952 (defun unread-data-available-p (fd) 4953 #+freebsd-target 4954 (fd-input-available-p fd 0) 4955 #-freebsd-target 4949 4956 (rlet ((arg (* :char) (%null-ptr))) 4950 4957 (when (zerop (syscall syscalls::ioctl fd #$FIONREAD arg)) … … 5481 5488 (stream-line-column stream))) 5482 5489 5490 (defun (setf %ioblock-external-format) (ef ioblock) 5491 (let* ((encoding (get-character-encoding (external-format-character-encoding ef))) 5492 (line-termination (external-format-line-termination ef))) 5493 (when (eq encoding (get-character-encoding nil)) 5494 (setq encoding nil)) 5495 (when (ioblock-inbuf ioblock) 5496 (setup-ioblock-input ioblock t (ioblock-element-type ioblock) (ioblock-sharing ioblock) encoding line-termination)) 5497 (when (ioblock-outbuf ioblock) 5498 (setup-ioblock-output ioblock t (ioblock-element-type ioblock) (ioblock-sharing ioblock) encoding line-termination)) 5499 ef)) 5483 5500 5484 5501 (defmethod stream-external-format ((s basic-character-stream)) 5485 5502 (%ioblock-external-format (stream-ioblock s t))) 5486 5503 5504 (defmethod (setf stream-external-format) (new (s basic-character-stream)) 5505 (setf (%ioblock-external-format (stream-ioblock s t)) 5506 (normalize-external-format (stream-domain s) new))) 5507 5487 5508 (defmethod stream-external-format ((s buffered-stream-mixin)) 5488 5509 (%ioblock-external-format (stream-ioblock s t)))
Note:
See TracChangeset
for help on using the changeset viewer.
