mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
(format:out-num-padded): Print "+" on 0 under @ modifier.
This commit is contained in:
parent
a8cb8832af
commit
260ffd6118
1 changed files with 2 additions and 2 deletions
|
@ -1017,7 +1017,7 @@
|
||||||
(commawidth (format:par pars l 3 3 "commawidth")))
|
(commawidth (format:par pars l 3 3 "commawidth")))
|
||||||
(if mincol
|
(if mincol
|
||||||
(let ((numlen numstr-len)) ; calc. the output len of number
|
(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)))
|
(set! numlen (+ numlen 1)))
|
||||||
(if (memq modifier '(colon colon-at))
|
(if (memq modifier '(colon colon-at))
|
||||||
(set! numlen (+ (quotient (- numstr-len
|
(set! numlen (+ (quotient (- numstr-len
|
||||||
|
@ -1027,7 +1027,7 @@
|
||||||
(if (> mincol numlen)
|
(if (> mincol numlen)
|
||||||
(format:out-fill (- mincol numlen) padchar))))
|
(format:out-fill (- mincol numlen) padchar))))
|
||||||
(if (and (memq modifier '(at colon-at))
|
(if (and (memq modifier '(at colon-at))
|
||||||
(> number 0))
|
(>= number 0))
|
||||||
(format:out-char #\+))
|
(format:out-char #\+))
|
||||||
(if (memq modifier '(colon colon-at)) ; insert comma character
|
(if (memq modifier '(colon colon-at)) ; insert comma character
|
||||||
(let ((start (remainder numstr-len commawidth))
|
(let ((start (remainder numstr-len commawidth))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue