Changeset 4904
- Timestamp:
- Jul 24, 2006, 1:43:19 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-sysio.lisp (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-sysio.lisp
r4900 r4904 277 277 278 278 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 279 (defclass f ile-stream (fd-stream)279 (defclass fundamental-file-stream (fd-stream file-stream) 280 280 ((filename :initform nil :initarg :filename :accessor file-stream-filename) 281 281 (actual-filename :initform nil :initarg :actual-filename) … … 284 284 285 285 286 (defmethod stream-filename ((s f ile-stream))286 (defmethod stream-filename ((s fundamental-file-stream)) 287 287 (file-stream-filename s)) 288 288 … … 290 290 (slot-value s 'actual-filename)) 291 291 292 (defmethod (setf stream-filename) (new (s f ile-stream))292 (defmethod (setf stream-filename) (new (s fundamental-file-stream)) 293 293 (setf (file-stream-filename s) new)) 294 294 295 (defmethod (setf stream-actual-filename) (new (s f ile-stream))295 (defmethod (setf stream-actual-filename) (new (s fundamental-file-stream)) 296 296 (setf (slot-value s 'actual-filename) new)) 297 297 298 (defmethod print-object ((s f ile-stream) out)298 (defmethod print-object ((s fundamental-file-stream) out) 299 299 (print-unreadable-object (s out :type t :identity t) 300 300 (let* ((file-ioblock (stream-ioblock s nil))) … … 304 304 (format out ":closed"))))) 305 305 306 (defmethod stream-create-ioblock ((stream f ile-stream) &rest args &key)306 (defmethod stream-create-ioblock ((stream fundamental-file-stream) &rest args &key) 307 307 (declare (dynamic-extent args)) 308 308 (apply #'make-file-ioblock :stream stream args)) 309 309 310 (defclass f ile-input-stream (file-stream fd-input-stream)311 ()) 312 313 (defclass f ile-output-stream (file-stream fd-output-stream)314 ()) 315 316 (defclass f ile-io-stream (file-stream fd-io-stream)317 ()) 318 319 (defclass f ile-character-input-stream (file-input-stream310 (defclass fundamental-file-input-stream (fundamental-file-stream fd-input-stream) 311 ()) 312 313 (defclass fundamental-file-output-stream (fundamental-file-stream fd-output-stream) 314 ()) 315 316 (defclass fundamental-file-io-stream (fundamental-file-stream fd-io-stream) 317 ()) 318 319 (defclass fundamental-file-character-input-stream (fundamental-file-input-stream 320 320 fd-character-input-stream) 321 321 ()) 322 322 323 (defclass f ile-character-output-stream (file-output-stream324 fd-character-output-stream)325 ()) 326 327 (defclass f ile-character-io-stream (file-io-stream323 (defclass fundamental-file-character-output-stream (fundamental-file-output-stream 324 fd-character-output-stream) 325 ()) 326 327 (defclass fundamental-file-character-io-stream (fundamental-file-io-stream 328 328 fd-character-io-stream) 329 329 ()) 330 330 331 (defclass f ile-binary-input-stream (file-input-stream332 fd-binary-input-stream)333 ()) 334 335 (defclass f ile-binary-output-stream (file-output-stream336 fd-binary-output-stream)337 ()) 338 339 (defclass f ile-binary-io-stream (file-io-stream fd-binary-io-stream)331 (defclass fundamental-file-binary-input-stream (fundamental-file-input-stream 332 fd-binary-input-stream) 333 ()) 334 335 (defclass fundamental-file-binary-output-stream (fundamental-file-output-stream 336 fd-binary-output-stream) 337 ()) 338 339 (defclass fundamental-file-binary-io-stream (fundamental-file-io-stream fd-binary-io-stream) 340 340 ()) 341 341 … … 345 345 ;;; like that.) 346 346 347 (defmethod stream-clear-input ((f f ile-input-stream))347 (defmethod stream-clear-input ((f fundamental-file-input-stream)) 348 348 (with-stream-ioblock-input (file-ioblock f :speedy t) 349 349 (call-next-method) … … 351 351 nil)) 352 352 353 (defmethod stream-clear-input ((f f ile-io-stream))353 (defmethod stream-clear-input ((f fundamental-file-io-stream)) 354 354 (with-stream-ioblock-input (file-ioblock f :speedy t) 355 355 (stream-force-output f) … … 358 358 nil)) 359 359 360 (defmethod stream-clear-output ((f f ile-output-stream))360 (defmethod stream-clear-output ((f fundamental-file-output-stream)) 361 361 (with-stream-ioblock-output (file-ioblock f :speedy t) 362 362 (call-next-method) … … 437 437 (file-ioblock-seek file-ioblock newoctetpos))) 438 438 439 (defmethod stream-position ((stream f ile-input-stream) &optional newpos)439 (defmethod stream-position ((stream fundamental-file-input-stream) &optional newpos) 440 440 (with-stream-ioblock-input (file-ioblock stream :speedy t) 441 441 (%ioblock-input-file-position file-ioblock newpos))) … … 443 443 444 444 445 (defmethod stream-position ((stream f ile-output-stream) &optional newpos)445 (defmethod stream-position ((stream fundamental-file-output-stream) &optional newpos) 446 446 (with-stream-ioblock-output (file-ioblock stream :speedy t) 447 447 (%ioblock-output-file-position file-ioblock newpos))) … … 449 449 450 450 451 (defmethod stream-position ((stream f ile-io-stream) &optional newpos)451 (defmethod stream-position ((stream fundamental-file-io-stream) &optional newpos) 452 452 (with-stream-ioblock-input (file-ioblock stream :speedy t) 453 453 (%ioblock-io-file-position file-ioblock newpos))) … … 455 455 456 456 457 (defmethod stream-length ((stream f ile-input-stream) &optional newlen)457 (defmethod stream-length ((stream fundamental-file-input-stream) &optional newlen) 458 458 (with-stream-ioblock-input (file-ioblock stream :speedy t) 459 459 (%ioblock-input-file-length file-ioblock newlen))) … … 461 461 462 462 463 (defmethod stream-length ((s f ile-output-stream) &optional newlen)463 (defmethod stream-length ((s fundamental-file-output-stream) &optional newlen) 464 464 (with-stream-ioblock-output (file-ioblock s :speedy t) 465 465 (%ioblock-output-file-length file-ioblock newlen))) 466 466 467 (defmethod stream-length ((s f ile-io-stream) &optional newlen)467 (defmethod stream-length ((s fundamental-file-io-stream) &optional newlen) 468 468 (with-stream-ioblock-input (file-ioblock s :speedy t) 469 469 (%ioblock-output-file-length file-ioblock newlen))) 470 470 471 (defmethod close ((s f ile-stream) &key abort)471 (defmethod close ((s fundamental-file-stream) &key abort) 472 472 (when (open-stream-p s) 473 473 (let* ((ioblock (stream-ioblock s t)) … … 487 487 (if char-p 488 488 (if (and in-p out-p) 489 'f ile-character-io-stream489 'fundamental-file-character-io-stream 490 490 (if in-p 491 'f ile-character-input-stream491 'fundamental-file-character-input-stream 492 492 (if out-p 493 'f ile-character-output-stream494 'f ile-stream)))493 'fundamental-file-character-output-stream 494 'fundamental-file-stream))) 495 495 (if (and in-p out-p) 496 'f ile-binary-io-stream496 'fundamental-file-binary-io-stream 497 497 (if in-p 498 'f ile-binary-input-stream498 'fundamental-file-binary-input-stream 499 499 (if out-p 500 'f ile-binary-output-stream501 'f ile-stream)))))500 'fundamental-file-binary-output-stream 501 'fundamental-file-stream))))) 502 502 503 503 (defun make-file-stream (filename … … 634 634 fstream)))))))) 635 635 636 (defmethod stream-external-format ((s f ile-stream))636 (defmethod stream-external-format ((s fundamental-file-stream)) 637 637 (file-stream-external-format s)) 638 638
Note:
See TracChangeset
for help on using the changeset viewer.
