diff src/number-mp.c @ 5936:574f0cded429 cygwin

try to replace all nnnL or nnnUL constants with EMACS_[U]INT
author Henry Thompson <ht@markup.co.uk>
date Sun, 13 Dec 2015 13:22:58 +0000
parents a2912073be85
children
line wrap: on
line diff
--- a/src/number-mp.c	Sat Dec 12 21:49:31 2015 +0000
+++ b/src/number-mp.c	Sun Dec 13 13:22:58 2015 +0000
@@ -144,7 +144,7 @@
 bignum_to_long (bignum b)
 {
   short rem, sign;
-  unsigned long retval = 0L;
+  unsigned long retval = E0;
   REGISTER unsigned int i;
   MINT *quo;
 
@@ -157,7 +157,7 @@
 bignum_to_ulong (bignum b)
 {
   short rem, sign;
-  unsigned long retval = 0UL;
+  unsigned long retval = UE0;
   REGISTER unsigned int i;
   MINT *quo;
 
@@ -183,7 +183,7 @@
 bignum_to_ullong (bignum b)
 {
   short rem, sign;
-  unsigned long long retval = 0UL;
+  unsigned long long retval = UE0;
   REGISTER unsigned int i;
   MINT *quo;
 
@@ -290,7 +290,7 @@
 {
   char hex[SIZEOF_LONG * 2U + 2U];
   MINT *temp;
-  int neg = l < 0L;
+  int neg = l < E0;
 
   snprintf (hex, SIZEOF_LONG * 2U + 2U, "%lx",
 	    neg ? (unsigned long) -l : (unsigned long) l);
@@ -353,7 +353,7 @@
   MP_MOVE (bignum_zero, b);
   if (negative)
     d = -d;
-  for (i = 0UL; d > 0.0; d /= 256, i++)
+  for (i = UE0; d > 0.0; d /= 256, i++)
     {
       MINT *temp = MP_ITOM ((short) fmod (d, 256.0));
       MP_MULT (multiplier, temp, temp);
@@ -433,7 +433,7 @@
 bignum_pow (bignum result, bignum n, unsigned long pow)
 {
   MP_MOVE (bignum_one, result);
-  for ( ; pow > 0UL; pow--)
+  for ( ; pow > UE0; pow--)
     MP_MULT (result, n, result);
 }
 
@@ -464,7 +464,7 @@
 									\
   MP_MOVE (bignum_zero, result);					\
 									\
-  for (i = 0UL; MP_MCMP (bignum_zero, n1) < 0 &&			\
+  for (i = UE0; MP_MCMP (bignum_zero, n1) < 0 &&			\
 	 MP_MCMP (bignum_zero, n2) < 0; i++)				\
     {									\
       short byte1, byte2;						\
@@ -515,7 +515,7 @@
 
   MP_MOVE (bignum_zero, result);
 
-  for (i = 0UL; MP_MCMP (bignum_zero, n) < 0; i++)
+  for (i = UE0; MP_MCMP (bignum_zero, n) < 0; i++)
     {
       short byte;
       MINT *temp;