[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103279: Fix use of dtoastr from gnul
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103279: Fix use of dtoastr from gnulib. |
Date: |
Mon, 14 Feb 2011 17:25:29 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103279
author: Michael Welsh Duggan <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2011-02-14 17:25:29 -0500
message:
Fix use of dtoastr from gnulib.
* src/print.c (float_to_string): Ensure that a decimal point is
printed if using dtoastr (Bug#8033).
modified:
src/ChangeLog
src/print.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-02-14 17:58:13 +0000
+++ b/src/ChangeLog 2011-02-14 22:25:29 +0000
@@ -1,3 +1,8 @@
+2011-02-14 Michael Welsh Duggan <address@hidden>
+
+ * print.c (float_to_string): Ensure that a decimal point is
+ printed if using dtoastr (Bug#8033).
+
2011-02-14 Eli Zaretskii <address@hidden>
* msdos.c (IT_frame_up_to_date):
=== modified file 'src/print.c'
--- a/src/print.c 2011-02-14 15:39:19 +0000
+++ b/src/print.c 2011-02-14 22:25:29 +0000
@@ -1062,7 +1062,10 @@
{
/* Generate the fewest number of digits that represent the
floating point value without losing information. */
- dtoastr (buf, FLOAT_TO_STRING_BUFSIZE, 0, 0, data);
+ dtoastr (buf, FLOAT_TO_STRING_BUFSIZE - 2, 0, 0, data);
+ /* The decimal point must be printed, or the byte compiler can
+ get confused (Bug#8033). */
+ width = 1;
}
else /* oink oink */
{
@@ -1117,8 +1120,7 @@
cp[1] = '0';
cp[2] = 0;
}
-
- if (*cp == 0)
+ else if (*cp == 0)
{
*cp++ = '.';
*cp++ = '0';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103279: Fix use of dtoastr from gnulib.,
Chong Yidong <=