[Gmp-commit] /home/hgfiles/gmp: Whitespace cleanup.

mercurial at gmplib.org mercurial at gmplib.org
Mon Nov 22 22:26:08 CET 2010


details:   /home/hgfiles/gmp/rev/3de121797ffd
changeset: 13693:3de121797ffd
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Nov 22 22:26:05 2010 +0100
description:
Whitespace cleanup.

diffstat:

 gen-jacobitab.c             |    2 +-
 gen-trialdivtab.c           |    2 +-
 mpf/get_str.c               |    4 +-
 mpf/set_str.c               |   14 +-
 mpn/generic/bdiv_qr.c       |    2 +-
 mpn/generic/perfsqr.c       |    6 +-
 mpn/generic/toom_eval_pm2.c |    2 +-
 mpq/get_str.c               |   14 +-
 mpq/inp_str.c               |   10 +-
 mpz/and.c                   |    8 +-
 mpz/aorsmul.c               |   32 ++--
 mpz/aorsmul_i.c             |  106 +++++++-------
 mpz/bin_ui.c                |   12 +-
 mpz/bin_uiui.c              |   22 +-
 mpz/cfdiv_q_2exp.c          |    2 +-
 mpz/cfdiv_r_2exp.c          |   56 ++++----
 mpz/clrbit.c                |   24 +-
 mpz/cmp_d.c                 |    4 +-
 mpz/cong.c                  |   82 ++++++------
 mpz/cong_2exp.c             |   74 +++++-----
 mpz/cong_ui.c               |   16 +-
 mpz/divegcd.c               |   36 ++--
 mpz/divis_ui.c              |    4 +-
 mpz/export.c                |   84 ++++++------
 mpz/fib_ui.c                |   26 +-
 mpz/get_str.c               |    6 +-
 mpz/hamdist.c               |  146 ++++++++++----------
 mpz/import.c                |   80 +++++-----
 mpz/inp_raw.c               |  110 ++++++++--------
 mpz/ior.c                   |    4 +-
 mpz/kronsz.c                |   70 +++++-----
 mpz/kronuz.c                |   76 +++++-----
 mpz/kronzs.c                |    4 +-
 mpz/kronzu.c                |    6 +-
 mpz/lucnum_ui.c             |  132 +++++++++---------
 mpz/millerrabin.c           |    2 +-
 mpz/mul.c                   |   10 +-
 mpz/n_pow_ui.c              |  294 ++++++++++++++++++++++----------------------
 mpz/out_raw.c               |  108 ++++++++--------
 mpz/out_str.c               |    4 +-
 mpz/powm_ui.c               |    2 +-
 mpz/pprime_p.c              |    2 +-
 mpz/remove.c                |    2 +-
 mpz/scan0.c                 |   70 +++++-----
 mpz/scan1.c                 |   98 +++++++-------
 mpz/set_d.c                 |    4 +-
 mpz/setbit.c                |   28 ++--
 mpz/sqrt.c                  |    2 +-
 mpz/sqrtrem.c               |    2 +-
 mpz/tstbit.c                |   16 +-
 mpz/xor.c                   |    4 +-
 nextprime.c                 |    2 +-
 tune/speed.h                |    6 +-
 53 files changed, 967 insertions(+), 967 deletions(-)

diffs (truncated from 3045 to 300 lines):

diff -r e0b02c0e4e33 -r 3de121797ffd gen-jacobitab.c
--- a/gen-jacobitab.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/gen-jacobitab.c	Mon Nov 22 22:26:05 2010 +0100
@@ -17,7 +17,7 @@
 License for more details.
 
 You should have received a copy of the GNU Lesser General Public License
-along with the GNU MP Library.	If not, see http://www.gnu.org/licenses/.  */
+along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
 /* Generate the lookup table needed for fast left-to-right computation
    of the Jacobi symbol. */
diff -r e0b02c0e4e33 -r 3de121797ffd gen-trialdivtab.c
--- a/gen-trialdivtab.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/gen-trialdivtab.c	Mon Nov 22 22:26:05 2010 +0100
@@ -17,7 +17,7 @@
 License for more details.
 
 You should have received a copy of the GNU Lesser General Public License
-along with the GNU MP Library.	If not, see http://www.gnu.org/licenses/.  */
+along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
 /*
   Generate tables for fast, division-free trial division for GMP.
diff -r e0b02c0e4e33 -r 3de121797ffd mpf/get_str.c
--- a/mpf/get_str.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpf/get_str.c	Mon Nov 22 22:26:05 2010 +0100
@@ -144,9 +144,9 @@
     {
       base = -base;
       if (base <= 1)
-        base = 10;
+	base = 10;
       else if (base > 36)
-        return NULL;
+	return NULL;
       num_to_text = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     }
 
diff -r e0b02c0e4e33 -r 3de121797ffd mpf/set_str.c
--- a/mpf/set_str.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpf/set_str.c	Mon Nov 22 22:26:05 2010 +0100
@@ -163,8 +163,8 @@
     {
       /* not a digit, must be a decimal point */
       for (i = 0; i < pointlen; i++)
-        if (str[i] != point[i])
-          return -1;
+	if (str[i] != point[i])
+	  return -1;
       if (digit_value[(unsigned char) str[pointlen]] >= (base == 0 ? 10 : base))
 	return -1;
     }
@@ -195,10 +195,10 @@
 	{
 	  int dig;
 
-          for (j = 0; j < pointlen; j++)
-            if (str[j] != point[j])
-              goto not_point;
-          if (1)
+	  for (j = 0; j < pointlen; j++)
+	    if (str[j] != point[j])
+	      goto not_point;
+	  if (1)
 	    {
 	      if (dotpos != 0)
 		{
@@ -212,7 +212,7 @@
 	    }
 	  else
 	    {
-            not_point:
+	    not_point:
 	      dig = digit_value[c];
 	      if (dig >= base)
 		{
diff -r e0b02c0e4e33 -r 3de121797ffd mpn/generic/bdiv_qr.c
--- a/mpn/generic/bdiv_qr.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpn/generic/bdiv_qr.c	Mon Nov 22 22:26:05 2010 +0100
@@ -29,7 +29,7 @@
 
 
 /* Computes Q = N / D mod B^n,
-	    R = N - QD.	 */
+	    R = N - QD.  */
 
 mp_limb_t
 mpn_bdiv_qr (mp_ptr qp, mp_ptr rp,
diff -r e0b02c0e4e33 -r 3de121797ffd mpn/generic/perfsqr.c
--- a/mpn/generic/perfsqr.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpn/generic/perfsqr.c	Mon Nov 22 22:26:05 2010 +0100
@@ -102,8 +102,8 @@
 /* FIXME: The %= here isn't good, and might destroy any savings from keeping
    the PERFSQR_MOD_IDX stuff within a limb (rather than needing umul_ppmm).
    Maybe a new sort of mpn_preinv_mod_1 could accept an unnormalized divisor
-   and a shift count, like mpn_preinv_divrem_1.	 But mod_34lsub1 is our
-   normal case, so lets not worry too much about mod_1.	 */
+   and a shift count, like mpn_preinv_divrem_1.  But mod_34lsub1 is our
+   normal case, so lets not worry too much about mod_1.  */
 #define PERFSQR_MOD_PP(r, up, usize)					\
   do {									\
     if (BELOW_THRESHOLD (usize, PREINV_MOD_1_TO_MOD_1_THRESHOLD))	\
@@ -145,7 +145,7 @@
   } while (0)
 
 /* The expression "(int) idx - GMP_LIMB_BITS < 0" lets the compiler use the
-   sign bit from "idx-GMP_LIMB_BITS", which might help avoid a branch.	*/
+   sign bit from "idx-GMP_LIMB_BITS", which might help avoid a branch.  */
 #define PERFSQR_MOD_2(r, d, inv, mhi, mlo)			\
   do {								\
     mp_limb_t  m;						\
diff -r e0b02c0e4e33 -r 3de121797ffd mpn/generic/toom_eval_pm2.c
--- a/mpn/generic/toom_eval_pm2.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpn/generic/toom_eval_pm2.c	Mon Nov 22 22:26:05 2010 +0100
@@ -43,7 +43,7 @@
 } while (0)
 #else
 /* The following is not a general substitute for addlsh2.
-   It is correct if d == b, but it is not if d == a.	*/
+   It is correct if d == b, but it is not if d == a.  */
 #define DO_addlsh2(d, a, b, n, cy)	\
 do {					\
   (cy) <<= 2;				\
diff -r e0b02c0e4e33 -r 3de121797ffd mpq/get_str.c
--- a/mpq/get_str.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpq/get_str.c	Mon Nov 22 22:26:05 2010 +0100
@@ -34,12 +34,12 @@
   if (str == NULL)
     {
       /* This is an overestimate since we don't bother checking how much of
-         the high limbs of num and den are used.  +2 for rounding up the
-         chars per bit of num and den.  +3 for sign, slash and '\0'.  */
+	 the high limbs of num and den are used.  +2 for rounding up the
+	 chars per bit of num and den.  +3 for sign, slash and '\0'.  */
       str_alloc = ((size_t) ((ABS (q->_mp_num._mp_size) + q->_mp_den._mp_size)
-                             * GMP_LIMB_BITS
-                             * mp_bases[ABS(base)].chars_per_bit_exactly))
-                   + 5;
+			     * GMP_LIMB_BITS
+			     * mp_bases[ABS(base)].chars_per_bit_exactly))
+		   + 5;
       str = (char *) (*__gmp_allocate_func) (str_alloc);
     }
 
@@ -55,8 +55,8 @@
   ASSERT (len == strlen(str));
   ASSERT (str_alloc == 0 || len+1 <= str_alloc);
   ASSERT (len+1 <=  /* size recommended to applications */
-          mpz_sizeinbase (mpq_numref(q), ABS(base)) +
-          mpz_sizeinbase (mpq_denref(q), ABS(base)) + 3);
+	  mpz_sizeinbase (mpq_numref(q), ABS(base)) +
+	  mpz_sizeinbase (mpq_denref(q), ABS(base)) + 3);
 
   if (str_alloc != 0)
     __GMP_REALLOCATE_FUNC_MAYBE_TYPE (str, str_alloc, len+1, char);
diff -r e0b02c0e4e33 -r 3de121797ffd mpq/inp_str.c
--- a/mpq/inp_str.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpq/inp_str.c	Mon Nov 22 22:26:05 2010 +0100
@@ -49,11 +49,11 @@
 
       nread = mpz_inp_str_nowhite (mpq_denref(q), fp, base, c, nread);
       if (nread == 0)
-        {
-          q->_mp_num._mp_size = 0;
-          q->_mp_den._mp_size = 1;
-          q->_mp_den._mp_d[0] = 1;
-        }
+	{
+	  q->_mp_num._mp_size = 0;
+	  q->_mp_den._mp_size = 1;
+	  q->_mp_den._mp_d[0] = 1;
+	}
     }
   else
     {
diff -r e0b02c0e4e33 -r 3de121797ffd mpz/and.c
--- a/mpz/and.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpz/and.c	Mon Nov 22 22:26:05 2010 +0100
@@ -62,8 +62,8 @@
 	    }
 
 	  SIZ(res) = res_size;
-          if (LIKELY (res_size != 0))
-            mpn_and_n (res_ptr, op1_ptr, op2_ptr, res_size);
+	  if (LIKELY (res_size != 0))
+	    mpn_and_n (res_ptr, op1_ptr, op2_ptr, res_size);
 	  return;
 	}
       else /* op2_size < 0 */
@@ -143,8 +143,8 @@
 	{
 	  /* We should compute -OP1 & OP2.  Swap OP1 and OP2 and fall
 	     through to the code that handles OP1 & -OP2.  */
-          MPZ_SRCPTR_SWAP (op1, op2);
-          MPN_SRCPTR_SWAP (op1_ptr,op1_size, op2_ptr,op2_size);
+	  MPZ_SRCPTR_SWAP (op1, op2);
+	  MPN_SRCPTR_SWAP (op1_ptr,op1_size, op2_ptr,op2_size);
 	}
 
     }
diff -r e0b02c0e4e33 -r 3de121797ffd mpz/aorsmul.c
--- a/mpz/aorsmul.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpz/aorsmul.c	Mon Nov 22 22:26:05 2010 +0100
@@ -82,7 +82,7 @@
   if (wsize_signed == 0)
     {
       /* Nothing to add to, just set w=x*y.  No w==x or w==y overlap here,
-         since we know x,y!=0 but w==0.  */
+	 since we know x,y!=0 but w==0.  */
       high = mpn_mul (wp, PTR(x),xsize, PTR(y),ysize);
       tsize -= (high == 0);
       SIZ(w) = (sub >= 0 ? tsize : -tsize);
@@ -101,14 +101,14 @@
       mp_size_t usize = wsize;
 
       if (usize < tsize)
-        {
-          up    = tp;
-          usize = tsize;
-          tp    = wp;
-          tsize = wsize;
+	{
+	  up	= tp;
+	  usize = tsize;
+	  tp	= wp;
+	  tsize = wsize;
 
-          wsize = usize;
-        }
+	  wsize = usize;
+	}
 
       c = mpn_add (wp, up,usize, tp,tsize);
       wp[wsize] = c;
@@ -120,15 +120,15 @@
       mp_size_t usize = wsize;
 
       if (mpn_cmp_twosizes_lt (up,usize, tp,tsize))
-        {
-          up    = tp;
-          usize = tsize;
-          tp    = wp;
-          tsize = wsize;
+	{
+	  up	= tp;
+	  usize = tsize;
+	  tp	= wp;
+	  tsize = wsize;
 
-          wsize = usize;
-          wsize_signed = -wsize_signed;
-        }
+	  wsize = usize;
+	  wsize_signed = -wsize_signed;
+	}
 
       ASSERT_NOCARRY (mpn_sub (wp, up,usize, tp,tsize));
       wsize = usize;
diff -r e0b02c0e4e33 -r 3de121797ffd mpz/aorsmul_i.c
--- a/mpz/aorsmul_i.c	Mon Nov 22 22:03:28 2010 +0100
+++ b/mpz/aorsmul_i.c	Mon Nov 22 22:26:05 2010 +0100
@@ -104,25 +104,25 @@
       dsize = xsize - wsize;
 #if HAVE_NATIVE_mpn_mul_1c
       if (dsize > 0)
-        cy = mpn_mul_1c (wp, xp, dsize, y, cy);
+	cy = mpn_mul_1c (wp, xp, dsize, y, cy);
       else if (dsize < 0)
-        {
-          dsize = -dsize;
-          cy = mpn_add_1 (wp, wp, dsize, cy);
-        }
+	{
+	  dsize = -dsize;
+	  cy = mpn_add_1 (wp, wp, dsize, cy);
+	}
 #else
       if (dsize != 0)
-        {
-          mp_limb_t  cy2;
-          if (dsize > 0)
-            cy2 = mpn_mul_1 (wp, xp, dsize, y);
-          else
-            {
-              dsize = -dsize;
-              cy2 = 0;
-            }
-          cy = cy2 + mpn_add_1 (wp, wp, dsize, cy);
-        }
+	{
+	  mp_limb_t  cy2;
+	  if (dsize > 0)
+	    cy2 = mpn_mul_1 (wp, xp, dsize, y);
+	  else
+	    {
+	      dsize = -dsize;
+	      cy2 = 0;
+	    }
+	  cy = cy2 + mpn_add_1 (wp, wp, dsize, cy);


More information about the gmp-commit mailing list