From 5bea21e81ed516440e34e480f2c33ca41aa8c597 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:36 -0800 Subject: Import Upstream version 3a4 --- printf.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'printf.scm') 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) -- cgit v1.2.3