From de04a23ab78c1dbdf6dff57a462d55b77b527cfe Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 26 Apr 2002 21:01:54 +0000 Subject: Use DBL_DIG to compute how much buffer space to use here. 2002-04-26 Christopher James Lahey * 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 --- e-util/e-util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'e-util/e-util.h') 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 #include +#include #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, -- cgit v1.2.3