diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-11-18 21:30:29 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-11-18 21:31:05 -0800 |
commit | 925bf02167741d4c0e398e0f5907bbcecb4b4de5 (patch) | |
tree | f427d2bc6530122efac24cbaba3d7d0ad2e848de /lib/ftoastr.h | |
parent | 32a4812677fe70153e37bc19925aab9bac6a283d (diff) | |
download | gnulib-925bf02167741d4c0e398e0f5907bbcecb4b4de5.tar.gz |
ftoastr: depend on snprintf, improve comments
* lib/ftoastr.c: Also mention Loitsch's draft.
* lib/ftoastr.h: Require WIDTH to be nonnegative. This isn't
needed in the current implementation, but it might simplify
speeding up the code later.
* modules/ftoastr: Depend on snprintf; this improves portability.
Suggested by Bruno Haible in the same email.
Diffstat (limited to 'lib/ftoastr.h')
-rw-r--r-- | lib/ftoastr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ftoastr.h b/lib/ftoastr.h index 4c4f890cd2..fd7a802dbe 100644 --- a/lib/ftoastr.h +++ b/lib/ftoastr.h @@ -26,8 +26,8 @@ /* Store into BUF (of size BUFSIZE) an accurate minimal-precision string representation of a floating point number. FLAGS affect the formatting of the number. Pad the output string with spaces as - necessary to width WIDTH bytes, in the style of printf. X is the - floating-point number to be converted. + necessary to width WIDTH bytes, in the style of printf. WIDTH must + be nonnegative. X is the floating-point number to be converted. Return the number of bytes stored into BUF, not counting the terminating null. However, do not overrun BUF: if BUF is too |