(format:out-num-padded): Print "+" on 0 under @ modifier.
authorKevin Ryde <user42@zip.com.au>
Wed, 1 Sep 2004 23:17:11 +0000 (23:17 +0000)
committerKevin Ryde <user42@zip.com.au>
Wed, 1 Sep 2004 23:17:11 +0000 (23:17 +0000)
ice-9/format.scm

index 98e2216..63d83af 100644 (file)
                        (commawidth (format:par pars l 3 3 "commawidth")))
                    (if mincol
                        (let ((numlen numstr-len)) ; calc. the output len of number
-                         (if (and (memq modifier '(at colon-at)) (> number 0))
+                         (if (and (memq modifier '(at colon-at)) (>= number 0))
                              (set! numlen (+ numlen 1)))
                          (if (memq modifier '(colon colon-at))
                              (set! numlen (+ (quotient (- numstr-len 
                          (if (> mincol numlen)
                              (format:out-fill (- mincol numlen) padchar))))
                    (if (and (memq modifier '(at colon-at))
-                            (> number 0))
+                            (>= number 0))
                        (format:out-char #\+))
                    (if (memq modifier '(colon colon-at)) ; insert comma character
                        (let ((start (remainder numstr-len commawidth))