1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

(format:out-num-padded): Print "+" on 0 under @ modifier.

This commit is contained in:
Kevin Ryde 2004-09-01 23:49:41 +00:00
parent f9d8f9730f
commit ff1e26b92e

View file

@ -973,7 +973,7 @@
(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
@ -983,7 +983,7 @@
(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))