# HG changeset patch # User Gerd Moellmann # Date 995881123 0 # Node ID 200c049178cc00951353d8f0d77ea46bda1e4147 # Parent 883da5f3dbacb8ffba5b56d7012f709891ef2238 (toplevel) [STDC_HEADERS]: Include float.h. (MAX_10_EXP): New macro. (Fformat): Use it. diff -r 883da5f3dbac -r 200c049178cc src/editfns.c --- 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 +#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 {