diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-07-23 09:38:43 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-07-23 09:38:43 +0000 |
commit | ea229bec478445d9198579f450704afe0a9658c5 (patch) | |
tree | 8af3f1934f32c9e1667ec05ff6f8b3833cf95d2b /src/editfns.c | |
parent | 70ad9fc448839de78b0aa2691e236ecf619cb06f (diff) | |
download | emacs-ea229bec478445d9198579f450704afe0a9658c5.tar.gz |
(toplevel) [STDC_HEADERS]: Include float.h.
(MAX_10_EXP): New macro.
(Fformat): Use it.
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 <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 { |