0.8.13.43:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 9 Aug 2004 20:07:27 +0000 (20:07 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 9 Aug 2004 20:07:27 +0000 (20:07 +0000)
Fix for two ansi-tests bugs
... "~,,,',f" doesn't treat the last comma specially;
... negative minpad is treated as zero.

NEWS
src/code/late-format.lisp
src/code/target-format.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 0afb90d..1a89b99 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -35,8 +35,13 @@ changes in sbcl-0.8.14 relative to sbcl-0.8.13:
     applying the more sophisticated binary GCD.  (thanks to Juho
     Snellman)
   * fixed some bugs revealed by Paul Dietz' test suite:
-    ** format variable parameters ("~V<char>") are defaulted properly
+    ** FORMAT variable parameters ("~V<char>") are defaulted properly
        if the corresponding argument is NIL.
+    ** FORMAT directives accepting a minpad parameter treat negative
+       values as 0.
+    ** literal commas as character parameters to FORMAT directives are
+       parsed correctly.
+
 
 changes in sbcl-0.8.13 relative to sbcl-0.8.12:
   * new feature: SB-PACKAGE-LOCKS. See the "Package Locks" section of
index 7d4095e..5a509cd 100644 (file)
                            :offset posn)
                     (setf atsignp t)))
                (t
-                (when (char= (schar string (1- posn)) #\,)
+                (when (and (char= (schar string (1- posn)) #\,)
+                           (or (< posn 2)
+                               (char/= (schar string (- posn 2)) #\')))
                   (check-ordering)
                   (push (cons (1- posn) nil) params))
                 (return))))
index 5e959fd..e3c4475 100644 (file)
   ;; we're supposed to soldier on bravely, and so we have to deal with
   ;; the unsupplied-MINCOL-and-COLINC case without blowing up.
   (when (and mincol colinc)
-    (do ((chars (+ (length string) minpad) (+ chars colinc)))
+    (do ((chars (+ (length string) (max minpad 0)) (+ chars colinc)))
        ((>= chars mincol))
       (dotimes (i colinc)
        (write-char padchar stream))))
index 065bba6..5a21c5d 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.13.42"
+"0.8.13.43"