Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2000-08-16 22:30:40 +0400
committerJeff Johnston <jjohnstn@redhat.com>2000-08-16 22:30:40 +0400
commit5bacbf109f58efba1901137f251e79f9e0e1407a (patch)
treea9948129db0951043b1fef2dd9ee22346daff3a6 /newlib
parente3c9eeaf79e37f8653eab2b6184c143da8e4303e (diff)
2000-08-16 Eric Fifer <efifer@sanwaint.com>
* libc/stdio/vfprintf.c (_vfprintf_r): suppress . with "%.0f", 0.1
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/stdio/vfprintf.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 3b71567c0..fbdfd7444 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2000-08-16 Eric Fifer <efifer@sanwaint.com>
+
+ * libc/stdio/vfprintf.c (_vfprintf_r): suppress . with "%.0f", 0.1
+
2000-08-09 Nick Clifton <nickc@cygnus.com>
* libc/sys/arm/setjmp.S: Recode to clean up function prologues and
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index a96ce0c7d..117f7eb80 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -805,9 +805,11 @@ number: if ((dprec = prec) >= 0)
}
} else if (expt <= 0) {
PRINT("0", 1);
- PRINT(decimal_point, 1);
- PAD(-expt, zeroes);
- PRINT(cp, ndig);
+ if(ndig) {
+ PRINT(decimal_point, 1);
+ PAD(-expt, zeroes);
+ PRINT(cp, ndig);
+ }
} else if (expt >= ndig) {
PRINT(cp, ndig);
PAD(expt - ndig, zeroes);