Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

5 changed files:

Changes:

  • src/code/exports.lisp
    ... ... @@ -1620,6 +1620,7 @@
    1620 1620
     	   "STREAM-ADVANCE-TO-COLUMN" "STREAM-CLEAR-INPUT" 
    
    1621 1621
     	   "STREAM-CLEAR-OUTPUT"
    
    1622 1622
     	   "STREAM-FILE-POSITION"
    
    1623
    +	   "STREAM-FILE-LENGTH"
    
    1623 1624
     	   "STREAM-FINISH-OUTPUT" "STREAM-FORCE-OUTPUT"
    
    1624 1625
     	   "STREAM-FRESH-LINE" "STREAM-LINE-COLUMN" "STREAM-LINE-LENGTH"
    
    1625 1626
     	   "STREAM-LISTEN" "STREAM-PEEK-CHAR" "STREAM-READ-BYTE"
    

  • src/code/stream.lisp
    ... ... @@ -397,7 +397,9 @@
    397 397
         ;; simple-stream
    
    398 398
         (stream::%file-length stream)
    
    399 399
         ;; lisp-stream
    
    400
    -    (funcall (lisp-stream-misc stream) stream :file-length)))
    
    400
    +    (funcall (lisp-stream-misc stream) stream :file-length)
    
    401
    +    ;; fundamental-stream
    
    402
    +    (stream-file-length stream)))
    
    401 403
     
    
    402 404
     
    
    403 405
     ;;; Input functions:
    

  • src/general-info/release-21f.md
    ... ... @@ -20,6 +20,8 @@ public domain.
    20 20
     ## New in this release:
    
    21 21
       * Known issues:
    
    22 22
       * Feature enhancements:
    
    23
    +    * Add support for Gray streams implementation of file-length via
    
    24
    +      `ext:stream-file-length` generic function.
    
    23 25
       * Changes:
    
    24 26
       * ANSI compliance fixes:
    
    25 27
       * Bug fixes:
    

  • src/pcl/gray-compat.lisp
    ... ... @@ -39,6 +39,9 @@
    39 39
           (file-position stream position)
    
    40 40
           (file-position stream)))
    
    41 41
     
    
    42
    +(define-gray-stream-method ext:stream-file-length ((stream simple-stream))
    
    43
    +  (file-length stream))
    
    44
    +
    
    42 45
     (define-gray-stream-method ext:stream-clear-output ((stream simple-stream))
    
    43 46
       (clear-output stream))
    
    44 47
     
    

  • src/pcl/gray-streams.lisp
    ... ... @@ -376,6 +376,13 @@
    376 376
     (defmethod (setf stream-file-position) (position (stream character-output-stream))
    
    377 377
       (file-position (character-output-stream-lisp-stream stream) position))
    
    378 378
     
    
    379
    +(defgeneric stream-file-length (stream)
    
    380
    +  (:documentation
    
    381
    +   _N"Implements FILE-LENGTH for the stream."))
    
    382
    +
    
    383
    +(defmethod stream-file-length (stream)
    
    384
    +  (error 'type-error :datum stream :expected-type 'file-stream))
    
    385
    +
    
    379 386
     
    
    380 387
     ;;; Binary streams.
    
    381 388
     ;;;