From e9cd87b82a1f798b379fbdae146c8dde11a3657e Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 23 Jan 2001 19:49:09 +0000 Subject: [PATCH] 2001-01-23 Jeff Johnston * libc/stdio/vfprintf.c (_VFPRINTF_R): Modification to fix that suppressed . for %.0f, 0.1. Check now looks if there are padding zeroes (expt) in addition to any digits (ndig) to print. --- newlib/ChangeLog | 7 +++++++ newlib/libc/stdio/vfprintf.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a308372a5..90437bac5 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2001-01-23 Jeff Johnston + + * libc/stdio/vfprintf.c (_VFPRINTF_R): Modification to fix + that suppressed . for %.0f, 0.1. Check now looks if there + are padding zeroes (expt) in addition to any digits (ndig) to + print. + 2001-01-18 Jeff Johnston * libc/sys/arc/Makefile.am: New file. diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 34ec68972..ab8202fc0 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -853,7 +853,7 @@ number: if ((dprec = prec) >= 0) } } else if (expt <= 0) { PRINT("0", 1); - if(ndig) { + if(expt || ndig) { PRINT(decimal_point, 1); PAD(-expt, zeroes); PRINT(cp, ndig);