Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

3 changed files:

Changes:

  • src/code/stream.lisp
    ... ... @@ -1928,7 +1928,10 @@ output to Output-stream"
    1928 1928
     	 (let ((found (position #\newline string :test #'char=
    
    1929 1929
     				:end end :from-end t)))
    
    1930 1930
     	   (if found
    
    1931
    -	       (- end (the fixnum found))
    
    1931
    +	       ;; END points to where the next character goes, not the
    
    1932
    +	       ;; last character.  FOUND is where the newline is.
    
    1933
    +	       ;; Subtract 1 to adjust for the difference.
    
    1934
    +	       (- end (the fixnum found) 1)
    
    1932 1935
     	       current)))))
    
    1933 1936
          (:element-type 'base-char)))
    
    1934 1937
     
    

  • src/general-info/release-21e.md
    ... ... @@ -48,6 +48,7 @@ public domain.
    48 48
         * ~~#108~~ Update ASDF
    
    49 49
         * ~~#112~~ CLX can't connect to X server via inet sockets
    
    50 50
         * ~~#113~~ REQUIRE on contribs can pull in the wrong things vai ASDF.
    
    51
    +    * ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
    
    51 52
       * Other changes:
    
    52 53
       * Improvements to the PCL implementation of CLOS:
    
    53 54
       * Changes to building procedure:
    

  • tests/issues.lisp
    ... ... @@ -556,3 +556,17 @@
    556 556
       (assert-equalp
    
    557 557
        3.0380154777955097d205
    
    558 558
        (expt 1.7976931348623157d308 0.6666)))
    
    559
    +
    
    560
    +(define-test issue.121
    
    561
    +    (:tag :issues)
    
    562
    +  ;; Output should only have one newline character in it.  Previously,
    
    563
    +  ;; we printed two.
    
    564
    +  (assert-equalp
    
    565
    +   (concatenate 'string "xxx" (string #\Newline))
    
    566
    +   (let ((a (make-array 0 :element-type 'character :fill-pointer 0
    
    567
    +                              :adjustable t)))
    
    568
    +           (with-output-to-string (s a)
    
    569
    +             (format s "xxx")
    
    570
    +             (terpri s)
    
    571
    +             (fresh-line s))
    
    572
    +           a)))