r2064 - glibc-package/branches/glibc-2.5/debian/patches/any
Author: aurel32
Date: 2007-04-14 16:23:59 +0000 (Sat, 14 Apr 2007)
New Revision: 2064
Modified:
glibc-package/branches/glibc-2.5/debian/patches/any/cvs-printf_fp-c.diff
Log:
Merge the two patches of any/cvs-printf_fp-c.diff
Modified: glibc-package/branches/glibc-2.5/debian/patches/any/cvs-printf_fp-c.diff
===================================================================
--- glibc-package/branches/glibc-2.5/debian/patches/any/cvs-printf_fp-c.diff 2007-04-14 16:08:56 UTC (rev 2063)
+++ glibc-package/branches/glibc-2.5/debian/patches/any/cvs-printf_fp-c.diff 2007-04-14 16:23:59 UTC (rev 2064)
@@ -1,3 +1,8 @@
+2007-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ * stdio-common/printf_fp.c (___printf_fp): Fix exponent -4
+ special case handling when wcp == wstartp + 1.
+
2007-02-21 Ulrich Drepper <drepper@redhat.com>
[BZ #4070]
@@ -100,7 +105,7 @@
{
--wcp;
--fracdig_no;
-@@ -1060,26 +1076,41 @@
+@@ -1060,26 +1076,46 @@
/* Write the exponent if it is needed. */
if (type != 'f')
{
@@ -120,12 +125,17 @@
+ /* This is another special case. The exponent of the number is
+ really smaller than -4, which requires the 'e'/'E' format.
+ But after rounding the number has an exponent of -4. */
-+ assert (wcp >= wstartp + 2);
++ assert (wcp >= wstartp + 1);
+ assert (wstartp[0] == L'1');
+ __wmemcpy (wstartp, L"0.0001", 6);
+ wstartp[1] = decimalwc;
-+ wmemset (wstartp + 6, L'0', wcp - (wstartp + 2));
-+ wcp += 4;
++ if (wcp >= wstartp + 2)
++ {
++ wmemset (wstartp + 6, L'0', wcp - (wstartp + 2));
++ wcp += 4;
++ }
++ else
++ wcp += 5;
+ }
else
- do
@@ -161,7 +171,7 @@
}
/* Compute number of characters which must be filled with the padding
-@@ -1120,15 +1151,14 @@
+@@ -1120,15 +1156,14 @@
else
thousands_sep_len = strlen (thousands_sep);
@@ -179,7 +189,7 @@
return -1;
}
}
-@@ -1162,7 +1192,7 @@
+@@ -1162,7 +1197,7 @@
PRINT (tmpptr, wstartp, wide ? wcp - wstartp : cp - tmpptr);
/* Free the memory if necessary. */
Reply to: