[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in ftoastr example
From: |
Paul Eggert |
Subject: |
Re: bug in ftoastr example |
Date: |
Sun, 19 Dec 2010 23:08:04 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
On 12/19/2010 06:34 PM, Ben Pfaff wrote:
> So "%.*g" in the example is wrong: it needs to get replaced by a
> "flags" argument.
Thanks for catching that; the comment was referring to an earlier
(draft) version. I pushed this:
diff --git a/ChangeLog b/ChangeLog
index 308b450..9796a9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-19 Paul Eggert <address@hidden>
+
+ ftoastr: fix comment
+ * lib/ftoastr.h: Fix typo in comment. Noted by Ben Pfaff in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00130.html>.
+
2010-12-19 Bruno Haible <address@hidden>
isnan: Ensure it is a macro.
diff --git a/lib/ftoastr.h b/lib/ftoastr.h
index fd7a802..edae494 100644
--- a/lib/ftoastr.h
+++ b/lib/ftoastr.h
@@ -40,7 +40,7 @@
Example:
char buf[DBL_ABUFSIZE_BOUND];
- int r = dtoastr (buf, sizeof buf, "%*.*g", 0, 0.1);
+ int r = dtoastr (buf, sizeof buf, FTOASTR_UPPER_E, 0, 0.1);
In the C locale, this sets R to 3 and stores "0.1" into BUF. */
--
1.7.2