aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-07-23 09:38:43 +0000
committerGerd Moellmann2001-07-23 09:38:43 +0000
commitea229bec478445d9198579f450704afe0a9658c5 (patch)
tree8af3f1934f32c9e1667ec05ff6f8b3833cf95d2b /src
parent70ad9fc448839de78b0aa2691e236ecf619cb06f (diff)
downloademacs-ea229bec478445d9198579f450704afe0a9658c5.tar.gz
emacs-ea229bec478445d9198579f450704afe0a9658c5.zip
(toplevel) [STDC_HEADERS]: Include float.h.
(MAX_10_EXP): New macro. (Fformat): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c9
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. */
43 43
44#include "systime.h" 44#include "systime.h"
45 45
46#ifdef STDC_HEADERS
47#include <float.h>
48#define MAX_10_EXP DBL_MAX_10_EXP
49#else
50#define MAX_10_EXP 310
51#endif
52
46#define min(a, b) ((a) < (b) ? (a) : (b)) 53#define min(a, b) ((a) < (b) ? (a) : (b))
47#define max(a, b) ((a) > (b) ? (a) : (b)) 54#define max(a, b) ((a) > (b) ? (a) : (b))
48 55
@@ -3270,7 +3277,7 @@ Use %% to put a single % into the output.")
3270 /* Note that we're using sprintf to print floats, 3277 /* Note that we're using sprintf to print floats,
3271 so we have to take into account what that function 3278 so we have to take into account what that function
3272 prints. */ 3279 prints. */
3273 thissize = 200 + precision; 3280 thissize = MAX_10_EXP + 100 + precision;
3274 } 3281 }
3275 else 3282 else
3276 { 3283 {