[Python-checkins] r87929 - in python/branches/py3k-cdecimal/Modules/cdecimal: basearith.c basearith.h bits.h cdecimal.c crt.c io.c mpdecimal.c transpose.c umodarith.h

stefan.krah python-checkins at python.org
Tue Jan 11 15:07:13 CET 2011


Author: stefan.krah
Date: Tue Jan 11 15:07:12 2011
New Revision: 87929

Log:
Whitespace only.



Modified:
   python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c
   python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h
   python/branches/py3k-cdecimal/Modules/cdecimal/bits.h
   python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c
   python/branches/py3k-cdecimal/Modules/cdecimal/crt.c
   python/branches/py3k-cdecimal/Modules/cdecimal/io.c
   python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c
   python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c
   python/branches/py3k-cdecimal/Modules/cdecimal/umodarith.h

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/basearith.c	Tue Jan 11 15:07:12 2011
@@ -468,7 +468,7 @@
 
 		_mpd_divmod_pow10(&hprev, &rest, src[q], r);
 		_mpd_divmod_pow10(&rnd, &rest, rest, r-1);
-	
+
 		if (rest == 0 && q > 0) {
 			rest = !_mpd_isallzero(src, q);
 		}

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/basearith.h	Tue Jan 11 15:07:12 2011
@@ -96,7 +96,7 @@
 	h += hi;
 	h -= MPD_RADIX;
 
-	*q = (h - t); 
+	*q = (h - t);
 	*r = l + (MPD_RADIX & h);
 }
 #else

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/bits.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/bits.h	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/bits.h	Tue Jan 11 15:07:12 2011
@@ -105,7 +105,7 @@
  * Caller has to make sure that a is not 0.
  */
 static inline int
-mpd_bsr(mpd_size_t a) 
+mpd_bsr(mpd_size_t a)
 {
 	mpd_size_t retval;
 
@@ -128,7 +128,7 @@
  * Caller has to make sure that a is not 0.
  */
 static inline int
-mpd_bsf(mpd_size_t a) 
+mpd_bsf(mpd_size_t a)
 {
 	mpd_size_t retval;
 
@@ -154,7 +154,7 @@
  * Caller has to make sure that a is not 0.
  */
 static inline int __cdecl
-mpd_bsr(mpd_size_t a) 
+mpd_bsr(mpd_size_t a)
 {
 	unsigned long retval;
 
@@ -172,7 +172,7 @@
  * Caller has to make sure that a is not 0.
  */
 static inline int __cdecl
-mpd_bsf(mpd_size_t a) 
+mpd_bsf(mpd_size_t a)
 {
 	unsigned long retval;
 

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/cdecimal.c	Tue Jan 11 15:07:12 2011
@@ -391,7 +391,7 @@
 	if (ctx->traps&status) {
 		PyObject *ex, *siglist;
 
- 		ex = flags_as_exception(ctx->traps&status);
+		ex = flags_as_exception(ctx->traps&status);
 		if (ex == NULL) {
 			return 1; /* GCOV_NOT_REACHED */
 		}
@@ -498,7 +498,7 @@
 	}
 	return PyDict_Type.tp_richcompare(a, b, op);
 }
- 
+
 static int
 signaldict_contains(PyObject *self, PyObject *key)
 {
@@ -2234,11 +2234,11 @@
 	}
 	k--;
 
-	if ((d1 = mpd_qnew()) == NULL) { 
+	if ((d1 = mpd_qnew()) == NULL) {
 		Py_DECREF(n_d); /* GCOV_UNLIKELY */
 		return NULL; /* GCOV_UNLIKELY */
 	}
-	if ((d2 = mpd_qnew()) == NULL) { 
+	if ((d2 = mpd_qnew()) == NULL) {
 		mpd_del(d1); /* GCOV_UNLIKELY */
 		Py_DECREF(n_d); /* GCOV_UNLIKELY */
 		return NULL; /* GCOV_UNLIKELY */
@@ -3539,7 +3539,7 @@
 	CONVERT_BINOP(base, exp, &a, &b, ctx);
 
 	if (mod != Py_None) {
- 		if (!convert_op(mod, &c, ctx)) {
+		if (!convert_op(mod, &c, ctx)) {
 			Py_DECREF(a);
 			Py_DECREF(b);
 			return (PyObject *) c;
@@ -3549,7 +3549,7 @@
 	if ((result = dec_alloc()) == NULL) {
 		return NULL; /* GCOV_UNLIKELY */
 	}
- 
+
 	if (c == NULL) {
 		mpd_qpow(result->dec, a->dec, b->dec, ctx, &status);
 	}

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/crt.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/crt.c	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/crt.c	Tue Jan 11 15:07:12 2011
@@ -177,7 +177,7 @@
 
 		_crt_mulP1P2_3(t, s);
 		_crt_add3(z, t);
-	 	_crt_add3(carry, z);
+		_crt_add3(carry, z);
 
 		x1[i] = _crt_div3(carry, carry, MPD_RADIX);
 	}

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/io.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/io.c	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/io.c	Tue Jan 11 15:07:12 2011
@@ -153,7 +153,7 @@
 				}
 			}
 			break;
-					
+
 		}
 	}
 
@@ -269,7 +269,7 @@
 			if (fracdigits > MPD_MAX_PREC) {
 				goto conversion_error;
 			}
- 			if (dec->exp < (MPD_SSIZE_MIN+1)+(mpd_ssize_t)fracdigits) {
+			if (dec->exp < (MPD_SSIZE_MIN+1)+(mpd_ssize_t)fracdigits) {
 				dec->exp = MPD_SSIZE_MIN+1;
 			}
 			else {
@@ -485,7 +485,7 @@
 		 *
 		 * dplace: Position of the decimal point relative to the first
 		 *         member of the coefficient.
-		 * 
+		 *
 		 * 0.00000_.____._____000000.
 		 *  ^      ^    ^           ^
 		 *  |      |    |           |
@@ -744,7 +744,7 @@
 
 	/* zero padding */
 	if (*cp == '0') {
-		/* zero padding implies alignment, which should not be 
+		/* zero padding implies alignment, which should not be
 		 * specified twice. */
 		if (have_align) {
 			return 0;
@@ -884,7 +884,7 @@
 static void
 _mpd_add_sep_dot(mpd_mbstr_t *dest,
                  const char *src, mpd_ssize_t n_src, /* integer part and length */
-                 const char *sign, const char *dot, const char *rest, 
+                 const char *sign, const char *dot, const char *rest,
                  mpd_spec_t *spec)
 {
 	mpd_ssize_t n_sep, n_sign, consume;
@@ -899,7 +899,7 @@
 
 	/* rest <= MPD_MAX_PREC */
 	_mbstr_copy_ascii(dest, rest, (mpd_ssize_t)strlen(rest));
-	
+
 	if (dot) {
 		_mbstr_copy_char(dest, dot, (mpd_ssize_t)strlen(dot));
 	}

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/mpdecimal.c	Tue Jan 11 15:07:12 2011
@@ -1364,7 +1364,7 @@
  * Check if the operand is NaN, copy to result and return 1 if this is
  * the case. Copying can fail since NaNs are allowed to have a payload that
  * does not fit in MPD_MINALLOC.
- */ 
+ */
 int
 mpd_qcheck_nan(mpd_t *result, const mpd_t *a, const mpd_context_t *ctx,
                uint32_t *status)
@@ -1383,7 +1383,7 @@
  * Check if either operand is NaN, copy to result and return 1 if this
  * is the case. Copying can fail since NaNs are allowed to have a payload
  * that does not fit in MPD_MINALLOC.
- */ 
+ */
 int
 mpd_qcheck_nans(mpd_t *result, const mpd_t *a, const mpd_t *b,
                 const mpd_context_t *ctx, uint32_t *status)
@@ -1412,7 +1412,7 @@
  * Check if one of the operands is NaN, copy to result and return 1 if this
  * is the case. Copying can fail since NaNs are allowed to have a payload
  * that does not fit in MPD_MINALLOC.
- */ 
+ */
 static int
 mpd_qcheck_3nans(mpd_t *result, const mpd_t *a, const mpd_t *b, const mpd_t *c,
                  const mpd_context_t *ctx, uint32_t *status)
@@ -1513,7 +1513,7 @@
 
 /*
  * Apply rounding to a decimal. Allow overflow of the precision.
- */ 
+ */
 static inline void
 _mpd_apply_round_excess(mpd_t *dec, mpd_uint_t rnd, const mpd_context_t *ctx,
                         uint32_t *status)
@@ -1631,7 +1631,7 @@
 		if (mpd_iszerocoeff(dec)) {
 			if (dec->exp < etiny) {
 				dec->exp = etiny;
-				mpd_zerocoeff(dec); 
+				mpd_zerocoeff(dec);
 				*status |= MPD_Clamped;
 			}
 			return;
@@ -1865,7 +1865,7 @@
  * Compare the data of big and small. This function does the equivalent
  * of first shifting small to the left and then comparing the data of
  * big and small, except that no allocation for the left shift is needed.
- */ 
+ */
 static int
 _mpd_basecmp(mpd_uint_t *big, mpd_uint_t *small, mpd_size_t n, mpd_size_t m,
              mpd_size_t shift)
@@ -2269,7 +2269,7 @@
  * Same as mpd_qshiftr(), but 'result' is a static array. It is the
  * caller's responsibility to make sure that the array is big enough.
  * The function cannot fail.
- */ 
+ */
 mpd_uint_t
 mpd_qsshiftr(mpd_t *result, const mpd_t *a, mpd_ssize_t n)
 {
@@ -3821,7 +3821,7 @@
  * ACM Transactions on Mathematical Software, Vol. 12, No. 2, June 1986.
  *
  * Main differences:
- * 
+ *
  *  - The number of iterations for the Horner scheme is calculated using the
  *    C log10() function.
  *
@@ -3854,7 +3854,7 @@
 	 *       this will also happen for t > 10 (32 bit) or (t > 19) (64 bit).
 	 */
 #if defined(CONFIG_64)
- 	#define MPD_EXP_MAX_T 19
+	#define MPD_EXP_MAX_T 19
 #elif defined(CONFIG_32)
 	#define MPD_EXP_MAX_T 10
 #endif
@@ -4362,7 +4362,7 @@
 	 *
 	 * 2) |log10(a)| >= adjexp(a), if adjexp(a) >= 0
 	 *    |log10(a)| > -adjexp(a)-1, if adjexp(a) < 0
-	 * 
+	 *
 	 * 3) |log(a)| > 2*|log10(a)|
 	 */
 	adjexp = mpd_adjexp(a);
@@ -5460,7 +5460,7 @@
 	*status |= (workctx.status&MPD_Errors);
 }
 
-/* 
+/*
  * The number closest to the first operand that is in the direction towards
  * the second operand.
  */
@@ -5530,7 +5530,7 @@
 		}
 	}
 
-	*status |= workstatus; 
+	*status |= workstatus;
 	mpd_set_sign(result, resultsign);
 }
 
@@ -5756,7 +5756,7 @@
  *
  *   Let (0 < x < 1 and y > 0) or (x > 1 and y < 0).                  (H3)
  *   Let ub_omega(exp_clamp) < lb_zeta(x) + lb_theta(y)               (H4)
- *                 
+ *
  *   Then:
  *     log10(abs(exp_clamp)) < log10(abs(log10(x))) + log10(abs(y)).   (4)
  *              log10(x) * y < exp_clamp                               (5)
@@ -5856,7 +5856,7 @@
 }
 */
 
-/* The power function for real exponents */ 
+/* The power function for real exponents */
 static void
 _mpd_qpow_real(mpd_t *result, const mpd_t *base, const mpd_t *exp,
                const mpd_context_t *ctx, uint32_t *status)
@@ -6113,7 +6113,7 @@
 		mpd_qrem(&tbase, &tbase, &tmod, &maxcontext, status);
 		mpd_qdivint(&texp, &texp, &two, &maxcontext, status);
 	}
-	if (mpd_isspecial(&texp) || mpd_isspecial(&tbase) || 
+	if (mpd_isspecial(&texp) || mpd_isspecial(&tbase) ||
             mpd_isspecial(&tmod) || mpd_isspecial(result)) {
 		/* MPD_Malloc_error */
 		goto mpd_errors;

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/transpose.c	Tue Jan 11 15:07:12 2011
@@ -128,7 +128,7 @@
 				next = mulmod_size_t(next, r, m);
 			        hp = matrix + next*cols/2;
 
-			} 
+			}
 
 			memcpy(hp+offset, writebuf, stride*(sizeof *writebuf));
 
@@ -228,7 +228,7 @@
 					to += size;
 				}
 			}
-	  	}
+		}
 	}
 
 }

Modified: python/branches/py3k-cdecimal/Modules/cdecimal/umodarith.h
==============================================================================
--- python/branches/py3k-cdecimal/Modules/cdecimal/umodarith.h	(original)
+++ python/branches/py3k-cdecimal/Modules/cdecimal/umodarith.h	Tue Jan 11 15:07:12 2011
@@ -79,7 +79,7 @@
 ext_submod(mpd_uint_t a, mpd_uint_t b, mpd_uint_t m)
 {
 	mpd_uint_t d;
- 
+
 	a = (a >= m) ? a - m : a;
 	b = (b >= m) ? b - m : b;
 
@@ -146,7 +146,7 @@
 
 		y <<= 32;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		/* second reduction */
 		x = y = hi;
@@ -157,7 +157,7 @@
 
 		y <<= 32;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		return (hi || lo >= m ? lo - m : lo);
 	}
@@ -172,7 +172,7 @@
 
 		y <<= 34;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		/* second reduction */
 		x = y = hi;
@@ -183,7 +183,7 @@
 
 		y <<= 34;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		/* third reduction */
 		x = y = hi;
@@ -194,7 +194,7 @@
 
 		y <<= 34;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		return (hi || lo >= m ? lo - m : lo);
 	}
@@ -209,7 +209,7 @@
 
 		y <<= 40;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		/* second reduction */
 		x = y = hi;
@@ -220,7 +220,7 @@
 
 		y <<= 40;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		/* third reduction */
 		x = y = hi;
@@ -231,7 +231,7 @@
 
 		y <<= 40;
 		lo = y + x;
- 		if (lo < y) hi++;
+		if (lo < y) hi++;
 
 		return (hi || lo >= m ? lo - m : lo);
 	}


More information about the Python-checkins mailing list