comparison src/editfns.c @ 38519:200c049178cc

(toplevel) [STDC_HEADERS]: Include float.h. (MAX_10_EXP): New macro. (Fformat): Use it.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 23 Jul 2001 09:38:43 +0000
parents 0b34b024286d
children a4def4204419
comparison
equal deleted inserted replaced
38518:883da5f3dbac 38519:200c049178cc
40 #include "coding.h" 40 #include "coding.h"
41 #include "frame.h" 41 #include "frame.h"
42 #include "window.h" 42 #include "window.h"
43 43
44 #include "systime.h" 44 #include "systime.h"
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
45 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
49 #ifndef NULL 56 #ifndef NULL
3268 args[n] = Ftruncate (args[n], Qnil); 3275 args[n] = Ftruncate (args[n], Qnil);
3269 3276
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 {
3277 /* Anything but a string, convert to a string using princ. */ 3284 /* Anything but a string, convert to a string using princ. */
3278 register Lisp_Object tem; 3285 register Lisp_Object tem;