Changeset 5582
- Timestamp:
- Dec 4, 2006, 8:21:12 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-streams.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-streams.lisp
r5580 r5582 77 77 (defmethod stream-element-type ((x t)) 78 78 (report-bad-arg x 'stream)) 79 80 (defmethod stream-position ((s stream) &optional newpos) 81 (declare (ignore newpos))) 79 82 80 83 ;;; For input streams: … … 4391 4394 4392 4395 4396 (defmethod stream-position ((s string-input-stream) &optional newpos) 4397 (let* ((ioblock (basic-stream-ioblock s)) 4398 (start (string-input-stream-ioblock-start ioblock)) 4399 (idx (string-input-stream-ioblock-index ioblock)) 4400 (end (string-input-stream-ioblock-end ioblock))) 4401 (declare (fixnum end idx start)) 4402 (if newpos 4403 (let* ((limit (- end start))) 4404 (declare (fixnum limit)) 4405 (if (and (typep newpos 'fixnum) 4406 (>= (the fixnum newpos) 0) 4407 (< (the fixnum newpos) limit)) 4408 (progn 4409 (setf (string-input-stream-ioblock-index ioblock) 4410 (the fixnum (+ start (the fixnum newpos)))) 4411 newpos) 4412 (report-bad-arg newpos `(integer 0 (,limit))))) 4413 (the fixnum (- idx start))))) 4414 4415 4393 4416 4394 4417 (defun string-input-stream-ioblock-read-char (ioblock)
Note:
See TracChangeset
for help on using the changeset viewer.
