diff options
author | Christopher James Lahey <clahey@ximian.com> | 2002-04-27 05:01:54 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2002-04-27 05:01:54 +0800 |
commit | de04a23ab78c1dbdf6dff57a462d55b77b527cfe (patch) | |
tree | 1d7c89b68cc5c34ab36a4752de8201ca2f62351e /e-util/e-util.h | |
parent | 68cb7c9340ccfac138652a0152be72bab7c211c7 (diff) | |
download | gsoc2013-evolution-de04a23ab78c1dbdf6dff57a462d55b77b527cfe.tar.gz gsoc2013-evolution-de04a23ab78c1dbdf6dff57a462d55b77b527cfe.tar.zst gsoc2013-evolution-de04a23ab78c1dbdf6dff57a462d55b77b527cfe.zip |
Use DBL_DIG to compute how much buffer space to use here.
2002-04-26 Christopher James Lahey <clahey@ximian.com>
* gal/util/e-util.h (E_ASCII_DTOSTR_BUF_SIZE): Use DBL_DIG to
compute how much buffer space to use here.
* gal/util/e-xml-utils.c (e_xml_set_double_prop_by_name): Use
DBL_DIG here to decide how many digits to print.
svn path=/trunk/; revision=16604
Diffstat (limited to 'e-util/e-util.h')
-rw-r--r-- | e-util/e-util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/e-util/e-util.h b/e-util/e-util.h index 65a8d0d618..3df619a522 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -26,6 +26,7 @@ #include <sys/types.h> #include <gtk/gtktypeutils.h> +#include <limits.h> #ifdef __cplusplus extern "C" { @@ -188,7 +189,7 @@ gdouble e_flexible_strtod (cons /* 29 bytes should enough for all possible values that * g_ascii_dtostr can produce with the %.17g format. * Then add 10 for good measure */ -#define E_ASCII_DTOSTR_BUF_SIZE (29 + 10) +#define E_ASCII_DTOSTR_BUF_SIZE (DBL_DIG + 12 + 10) gchar *e_ascii_dtostr (gchar *buffer, gint buf_len, const gchar *format, |