Changeset 9869 for trunk/source/level-1/l1-sysio.lisp
- Timestamp:
- Jul 1, 2008, 9:22:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-sysio.lisp
r9048 r9869 509 509 (defun input-file-ioblock-advance (stream file-ioblock read-p) 510 510 (let* ((newpos (+ (file-ioblock-octet-pos file-ioblock) 511 (io-buffer-count (file-ioblock-inbuf file-ioblock)))) 512 (curpos (ioblock-octets-to-elements 513 file-ioblock 514 (file-octet-filepos file-ioblock)))) 515 (unless (eql newpos curpos) 516 (error "Expected newpos to be ~d, fd is at ~d" newpos curpos)) 511 (io-buffer-count (file-ioblock-inbuf file-ioblock))))) 517 512 (setf (file-ioblock-octet-pos file-ioblock) newpos) 518 513 (fd-stream-advance stream file-ioblock read-p))) … … 536 531 537 532 (defun output-file-force-output (stream file-ioblock count finish-p) 538 ;; Check to see if we're where we think we should be. 539 (let* ((curpos (file-ioblock-octet-pos file-ioblock))) 540 (unless (eql curpos (file-octet-filepos file-ioblock)) 541 (error "Expected newpos to be ~d, fd is at ~d" 542 curpos (file-octet-filepos file-ioblock))) 543 (let* ((n (fd-stream-force-output stream file-ioblock count finish-p))) 544 (incf (file-ioblock-octet-pos file-ioblock) (or n 0)) 545 n))) 533 (let* ((n (fd-stream-force-output stream file-ioblock count finish-p))) 534 (incf (file-ioblock-octet-pos file-ioblock) (or n 0)) 535 n)) 546 536 547 537 ;;; Can't be sure where the underlying fd is positioned, so seek first.
Note: See TracChangeset
for help on using the changeset viewer.