]> git.eshelyaron.com Git - emacs.git/commitdiff
(toplevel) [STDC_HEADERS]: Include float.h.
authorGerd Moellmann <gerd@gnu.org>
Mon, 23 Jul 2001 09:38:43 +0000 (09:38 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 23 Jul 2001 09:38:43 +0000 (09:38 +0000)
(MAX_10_EXP): New macro.
(Fformat): Use it.

src/editfns.c

index 7efa75383ce9facad07db15d4bb740fdbd444cd9..2cf10923b37fafbf5cdf465eef91f0ac6cbefc64 100644 (file)
@@ -43,6 +43,13 @@ Boston, MA 02111-1307, USA.  */
 
 #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 @@ Use %% to put a single % into the output.")
            /* 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
          {