summaryrefslogtreecommitdiffstats
path: root/printf.scm
diff options
context:
space:
mode:
Diffstat (limited to 'printf.scm')
-rw-r--r--printf.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/printf.scm b/printf.scm
index 28bca59..a85471f 100644
--- a/printf.scm
+++ b/printf.scm
@@ -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)