[Gmp-commit] /var/hg/gmp-proj/mini-gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Thu Jan 12 09:08:30 CET 2012


details:   /var/hg/gmp-proj/mini-gmp/rev/9c34660c92c0
changeset: 67:9c34660c92c0
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jan 12 08:37:50 2012 +0100
description:
Whitespace cleanup.

details:   /var/hg/gmp-proj/mini-gmp/rev/c3896920ac38
changeset: 68:c3896920ac38
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Jan 12 09:08:27 2012 +0100
description:
Trivial merge.

diffstat:

 mini-gmp.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r e6a42a9149a0 -r c3896920ac38 mini-gmp.c
--- a/mini-gmp.c	Thu Jan 12 08:27:28 2012 +0100
+++ b/mini-gmp.c	Thu Jan 12 09:08:27 2012 +0100
@@ -1,7 +1,7 @@
 /* mini-gmp, a minimalistic implementation of a GNU GMP subset.
 
    Contributed to the GNU project by Niels Möller
-   
+
 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
 Software Foundation, Inc.
@@ -1261,7 +1261,7 @@
 }
 
 /* The utility of this function is a bit limited, since many functions
-   assings the result variable using mpz_swap. */ 
+   assings the result variable using mpz_swap. */
 void
 mpz_init2 (mpz_t r, mp_bitcnt_t bits)
 {
@@ -1272,7 +1272,7 @@
 
   r->_mp_alloc = rn;
   r->_mp_size = 0;
-  r->_mp_d = gmp_xalloc_limbs (1);  
+  r->_mp_d = gmp_xalloc_limbs (rn);
 }
 
 void
@@ -1514,7 +1514,7 @@
 int
 mpz_cmp_d (const mpz_t x, double d)
 {
-  mp_size_t xn = x->_mp_size;  
+  mp_size_t xn = x->_mp_size;
   int sign;
   double B, Bi;
   mp_size_t i;
@@ -1555,9 +1555,9 @@
   for (i = xn; i-- > 0; i++)
     {
       mp_limb_t f, xl;
-      
+
       f = (mp_limb_t) d;
-      xl = x->_mp_d[i]; 
+      xl = x->_mp_d[i];
       if (xl > f)
 	return sign;
       else if (xl < f)
@@ -3257,7 +3257,7 @@
       w = (w >> 8) + (w & 0x00ff);
       c += w;
     }
-  return c; 
+  return c;
 }
 
 mp_bitcnt_t
@@ -3267,7 +3267,7 @@
   mp_bitcnt_t c;
 
   un = u->_mp_size;
-  
+
   if (un < 0)
     return ~(mp_bitcnt_t) 0;
 


More information about the gmp-commit mailing list