From: Christophe Rhodes Date: Mon, 9 Aug 2004 20:07:27 +0000 (+0000) Subject: 0.8.13.43: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=2f5aeff1d09f7a5a8a354ce71a9844bbbe0dffdd;p=sbcl.git 0.8.13.43: Fix for two ansi-tests bugs ... "~,,,',f" doesn't treat the last comma specially; ... negative minpad is treated as zero. --- diff --git a/NEWS b/NEWS index 0afb90d..1a89b99 100644 --- 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") are defaulted properly + ** FORMAT variable parameters ("~V") 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 diff --git a/src/code/late-format.lisp b/src/code/late-format.lisp index 7d4095e..5a509cd 100644 --- a/src/code/late-format.lisp +++ b/src/code/late-format.lisp @@ -140,7 +140,9 @@ :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)))) diff --git a/src/code/target-format.lisp b/src/code/target-format.lisp index 5e959fd..e3c4475 100644 --- a/src/code/target-format.lisp +++ b/src/code/target-format.lisp @@ -172,7 +172,7 @@ ;; 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)))) diff --git a/version.lisp-expr b/version.lisp-expr index 065bba6..5a21c5d 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"