diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:36 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:36 -0800 |
commit | 5bea21e81ed516440e34e480f2c33ca41aa8c597 (patch) | |
tree | 653ace1b8fe0a9916d861d35ff8f611b46c80d37 /printf.scm | |
parent | 237c6e380aebdcbc70bd1c9ecf7d3f6effca2752 (diff) | |
download | slib-upstream/3a4.tar.gz slib-upstream/3a4.zip |
Import Upstream version 3a4upstream/3a4
Diffstat (limited to 'printf.scm')
-rw-r--r-- | printf.scm | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -408,7 +408,7 @@ ((case fc ((#\-) (set! left-adjust #t) #f) ((#\+) (set! signed #t) #f) - ((#\ ) (set! blank #t) #f) + ((#\space) (set! blank #t) #f) ((#\#) (set! alternate-form #t) #f) ((#\0) (set! leading-0s #t) #f) (else #t))) @@ -454,18 +454,18 @@ ((<= width (string-length s)) s) (left-adjust (list - s (make-string (- width (string-length s)) #\ ))) + s (make-string (- width (string-length s)) #\space))) (else (list (make-string (- width (string-length s)) - (if leading-0s #\0 #\ )) + (if leading-0s #\0 #\space)) s)))) (loop (cdr args))))) ;; SLIB extension ((#\a #\A) ;#\a #\A are pretty-print - (require 'generic-write) (let ((os "") (pr precision)) + (require 'generic-write) (generic-write (car args) (not alternate-form) #f (cond ((and left-adjust (negative? pr)) @@ -502,15 +502,15 @@ (positive? sl))))) (cond ((and left-adjust (negative? precision)) (cond - ((> width pr) (out (make-string (- width pr) #\ ))))) + ((> width pr) (out (make-string (- width pr) #\space))))) (left-adjust (cond ((> width (- precision pr)) - (out (make-string (- width (- precision pr)) #\ ))))) + (out (make-string (- width (- precision pr)) #\space))))) ((not os)) ((<= width (string-length os)) (out os)) (else (and (out (make-string - (- width (string-length os)) #\ )) + (- width (string-length os)) #\space)) (out os))))) (loop (cdr args))) ((#\d #\D #\i #\I #\u #\U) |