changeset 38519:200c049178cc

(toplevel) [STDC_HEADERS]: Include float.h. (MAX_10_EXP): New macro. (Fformat): Use it.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 23 Jul 2001 09:38:43 +0000
parents 883da5f3dbac
children fc69b74fa9ad
files src/editfns.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Mon Jul 23 09:26:46 2001 +0000
+++ b/src/editfns.c	Mon Jul 23 09:38:43 2001 +0000
@@ -43,6 +43,13 @@
 
 #include "systime.h"
 
+#ifdef STDC_HEADERS
+#include <float.h>
+#define MAX_10_EXP	DBL_MAX_10_EXP
+#else
+#define MAX_10_EXP	310
+#endif
+
 #define min(a, b) ((a) < (b) ? (a) : (b))
 #define max(a, b) ((a) > (b) ? (a) : (b))
 
@@ -3270,7 +3277,7 @@
 	    /* Note that we're using sprintf to print floats,
 	       so we have to take into account what that function
 	       prints.  */
-	    thissize = 200 + precision;
+	    thissize = MAX_10_EXP + 100 + precision;
 	  }
 	else
 	  {