Re: bug in ftoastr example

2010-12-20 Thread Paul Eggert
On 12/20/2010 09:13 PM, Ben Pfaff wrote: > After I wrote my previous email, I realized that > DBL_ABUFSIZE_BOUND in the example was a typo for > DBL_BUFSIZE_BOUND, too. Thanks again, I pushed this: diff --git a/ChangeLog b/ChangeLog index 55e680e..58c2782 100644 --- a/ChangeLog +++ b/ChangeLog @@

Re: bug in ftoastr example

2010-12-20 Thread Ben Pfaff
Paul Eggert writes: > 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: Thank you. After I wrote my previous

Re: bug in ftoastr example

2010-12-19 Thread Paul Eggert
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 ---

bug in ftoastr example

2010-12-19 Thread Ben Pfaff
The example in lib/ftoastr.h is: int r = dtoastr (buf, sizeof buf, "%*.*g", 0, 0.1); but the prototype for dtoastr() is: int dtoastr (char *buf, size_t bufsize, int flags, int width, double x); So "%.*g" in the example is wrong: it needs to get replaced by a "flags" argument. Thanks