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 <egg...@cs.ucla.edu> + + 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 <br...@clisp.org> 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