From ea229bec478445d9198579f450704afe0a9658c5 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 23 Jul 2001 09:38:43 +0000 Subject: [PATCH] (toplevel) [STDC_HEADERS]: Include float.h. (MAX_10_EXP): New macro. (Fformat): Use it. --- src/editfns.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/editfns.c b/src/editfns.c index 7efa75383ce..2cf10923b37 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -43,6 +43,13 @@ Boston, MA 02111-1307, USA. */ #include "systime.h" +#ifdef STDC_HEADERS +#include +#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 { -- 2.39.5