Paul Eggert wrote: > * lib/ftoastr.h, lib/ftoastr.c, lib/dtoastr.c, lib/ldtoastr.c: > * modules/ftoastr: New files. > --- > ChangeLog | 6 ++ > lib/dtoastr.c | 2 + > lib/ftoastr.c | 89 ++++++++++++++++++++++++++++++++++ > lib/ftoastr.h | 144 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++ > lib/ldtoastr.c | 2 + > modules/ftoastr | 25 ++++++++++ > 6 files changed, 268 insertions(+), 0 deletions(-) > create mode 100644 lib/dtoastr.c > create mode 100644 lib/ftoastr.c > create mode 100644 lib/ftoastr.h > create mode 100644 lib/ldtoastr.c > create mode 100644 modules/ftoastr > > diff --git a/ChangeLog b/ChangeLog > index 0e6240c..ea0610a 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,9 @@ > +2010-11-17 Paul Eggert <egg...@cs.ucla.edu> > + > + ftoastr: new module, for lossless conversion of floats to short strings > + * lib/ftoastr.h, lib/ftoastr.c, lib/dtoastr.c, lib/ldtoastr.c: > + * modules/ftoastr: New files.
Nice! Before I'd looked through the code I started thinking this might be useful in avoiding snprintf's unhealthy need to malloc. Then I saw that it uses snprintf. Oh well ;-)