changeset 8825:5e5f6d06fb5b

(FLOAT_TO_INT, FLOAT_TO_INT2): Use EMACS_INT.
author Richard M. Stallman <rms@gnu.org>
date Sat, 17 Sep 1994 00:31:05 +0000
parents 589f82d1bb32
children 9f5965fe4f6b
files src/floatfns.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/floatfns.c	Sat Sep 17 00:30:07 1994 +0000
+++ b/src/floatfns.c	Sat Sep 17 00:31:05 1994 +0000
@@ -180,17 +180,19 @@
 #define FLOAT_TO_INT(x, i, name, num)					\
   do									\
     {									\
-      if ((x) >= (1 << (VALBITS-1)) || (x) <= - (1 << (VALBITS-1)) - 1)	\
+      if ((x) >= (((EMACS_INT) 1) << (VALBITS-1)) ||			\
+	  (x) <= - (((EMACS_INT) 1) << (VALBITS-1)) - 1)		\
 	range_error (name, num);					\
-      XSET (i, Lisp_Int,  (int)(x));					\
+      XSET (i, Lisp_Int,  (EMACS_INT)(x));				\
     }									\
   while (0)
 #define FLOAT_TO_INT2(x, i, name, num1, num2)				\
   do									\
     {									\
-      if ((x) >= (1 << (VALBITS-1)) || (x) <= - (1 << (VALBITS-1)) - 1)	\
+      if ((x) >= (((EMACS_INT) 1) << (VALBITS-1)) ||			\
+	  (x) <= - (((EMACS_INT) 1) << (VALBITS-1)) - 1)		\
 	range_error2 (name, num1, num2);				\
-      XSET (i, Lisp_Int,  (int)(x));					\
+      XSET (i, Lisp_Int,  (EMACS_INT)(x));				\
     }									\
   while (0)