[openfirmware] r1366 - forth/lib

svn at openfirmware.info svn at openfirmware.info
Fri Sep 18 03:13:17 CEST 2009


Author: wmb
Date: 2009-09-18 03:13:17 +0200 (Fri, 18 Sep 2009)
New Revision: 1366

Modified:
   forth/lib/printf.fth
Log:
printf - added %u formatting specifier.




Modified: forth/lib/printf.fth
===================================================================
--- forth/lib/printf.fth	2009-09-18 01:11:56 UTC (rev 1365)
+++ forth/lib/printf.fth	2009-09-18 01:13:17 UTC (rev 1366)
@@ -25,10 +25,11 @@
 : replace%  ( ... tail$ -- ... tail$' )  \ Handle % escapes
    1/string              ( ... tail$ char )
    case
-      [char] d  of   push-decimal rot <# u#s u#> +spbuf  pop-base  endof
-      [char] x  of   push-hex     rot <# u#s u#> +spbuf  pop-base  endof
+      [char] u  of   push-decimal rot (u.) +spbuf  pop-base  endof
+      [char] d  of   push-decimal rot (.)  +spbuf  pop-base  endof
+      [char] x  of   push-hex     rot (u.) +spbuf  pop-base  endof
       [char] s  of   2swap +spbuf  endof
-      [char] o  of   push-octal   rot <# u#s u#> +spbuf  pop-base  endof
+      [char] o  of   push-octal   rot (u.) +spbuf  pop-base  endof
       -1        of   endof
       ( default )  dup +spchar
    endcase




More information about the openfirmware mailing list