diff src/editfns.c @ 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 0b34b024286d
children a4def4204419
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
 	  {