bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in ftoastr example


From: Ben Pfaff
Subject: bug in ftoastr example
Date: Sun, 19 Dec 2010 18:34:33 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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,

Ben.
-- 
Ben Pfaff 
http://benpfaff.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]