[Python-checkins] r75638 - sandbox/trunk/decimal/decimal_in_c/deccoeff.c

mark.dickinson python-checkins at python.org
Fri Oct 23 21:24:38 CEST 2009


Author: mark.dickinson
Date: Fri Oct 23 21:24:38 2009
New Revision: 75638

Log:
Use consistent brace style for functions

Modified:
   sandbox/trunk/decimal/decimal_in_c/deccoeff.c

Modified: sandbox/trunk/decimal/decimal_in_c/deccoeff.c
==============================================================================
--- sandbox/trunk/decimal/decimal_in_c/deccoeff.c	(original)
+++ sandbox/trunk/decimal/decimal_in_c/deccoeff.c	Fri Oct 23 21:24:38 2009
@@ -140,7 +140,8 @@
    the low part of the result in *low, and return the high part. */
 
 static limb_t
-limb_fmaa(limb_t *low, limb_t a, limb_t b, limb_t c, limb_t d) {
+limb_fmaa(limb_t *low, limb_t a, limb_t b, limb_t c, limb_t d)
+{
     double_limb_t hilo;
     hilo = (double_limb_t)a * b + c + d;
     *low = (limb_t)(hilo%LIMB_BASE);
@@ -151,7 +152,8 @@
    remainder in *rem.  Requires high < c (and hence also c != 0). */
 
 static limb_t
-limb_div(limb_t *rem, limb_t high, limb_t low, limb_t c) {
+limb_div(limb_t *rem, limb_t high, limb_t low, limb_t c)
+{
     double_limb_t hilo;
     if (high >= c)
         limb_error("limb_div: invalid division");
@@ -196,14 +198,16 @@
 /* get a hash value from a limb */
 
 static long
-limb_hash(limb_t x) {
+limb_hash(limb_t x)
+{
     return (long)(x % LONG_MAX);
 }
 
 /* smallest nonnegative i such that x < 10**i; undefined if x == 0 */
 
 static Py_ssize_t
-limb_len(limb_t x) {
+limb_len(limb_t x)
+{
     Py_ssize_t i;
     if (x == 0)
         limb_error("limb_len: zero argument");
@@ -236,7 +240,8 @@
 /* *res = a << n + b, b < 10**n.  Returns part shifted out. */
 
 static limb_t
-limb_lshift(limb_t *res, limb_t a, Py_ssize_t n, limb_t b) {
+limb_lshift(limb_t *res, limb_t a, Py_ssize_t n, limb_t b)
+{
     if (!(0 <= n && n <= LIMB_DIGITS))
         limb_error("limb_lshift: invalid shift index");
     if (b != limb_mask(b, n))
@@ -252,7 +257,8 @@
 /* *res = (a + b*LIMB_BASE) >> n, b < 10**n.  Returns part shifted out. */
 
 static limb_t
-limb_rshift(limb_t *res, limb_t a, Py_ssize_t n, limb_t b) {
+limb_rshift(limb_t *res, limb_t a, Py_ssize_t n, limb_t b)
+{
     limb_t rem;
     if (!(0 <= n && n <= LIMB_DIGITS))
         limb_error("limb_rshift: invalid shift index");
@@ -1247,7 +1253,8 @@
    ValueError if the array is invalid. */
 
 static deccoeff *
-_deccoeff_from_unicode_and_size(Py_UNICODE *s, Py_ssize_t s_len) {
+_deccoeff_from_unicode_and_size(Py_UNICODE *s, Py_ssize_t s_len)
+{
     Py_ssize_t z_size;
     deccoeff *z;
     int invalid;
@@ -1316,7 +1323,8 @@
    n is nonnegative, and that (q-1)*(p+1) <= PY_SSIZE_T_MAX. */
 
 static Py_ssize_t
-scale_Py_ssize_t(Py_ssize_t n, int p, int q) {
+scale_Py_ssize_t(Py_ssize_t n, int p, int q)
+{
     Py_ssize_t hi, low;
     assert (n >= 0);
     hi = n/q;
@@ -1555,7 +1563,8 @@
    ZeroDivisionError on division by zero. */
 
 static deccoeff *
-_deccoeff_division(deccoeff **r, deccoeff *a, deccoeff *b) {
+_deccoeff_division(deccoeff **r, deccoeff *a, deccoeff *b)
+{
     deccoeff *w, *rem, *quot;
     Py_ssize_t a_size, b_size;
     a_size = Py_SIZE(a);
@@ -1607,7 +1616,8 @@
 /* remainder: raises ZeroDivisionError if b is zero */
 
 static deccoeff *
-_deccoeff_remainder(deccoeff *a, deccoeff *b) {
+_deccoeff_remainder(deccoeff *a, deccoeff *b)
+{
     deccoeff *quot, *rem;
     quot = _deccoeff_division(&rem, a, b);
     if (rem == NULL)
@@ -1639,7 +1649,8 @@
 /* divmod: raises ZeroDivisionError if b is zero */
 
 static PyObject *
-_deccoeff_divmod(deccoeff *a, deccoeff *b) {
+_deccoeff_divmod(deccoeff *a, deccoeff *b)
+{
     deccoeff *quot, *rem;
 
     quot = _deccoeff_division(&rem, a, b);
@@ -1818,7 +1829,8 @@
 */
 
 static PyObject *
-deccoeff_lshift(PyObject *v, PyObject *b) {
+deccoeff_lshift(PyObject *v, PyObject *b)
+{
     Py_ssize_t n, a_size;
     deccoeff *z, *a;
 
@@ -1857,7 +1869,8 @@
    Raises ValueError if second operand is negative. */
 
 static PyObject *
-deccoeff_rshift(PyObject *v, PyObject *b) {
+deccoeff_rshift(PyObject *v, PyObject *b)
+{
     Py_ssize_t n, a_size, shift;
     deccoeff *z, *a;
 
@@ -1972,7 +1985,8 @@
 /* floor division:  raise ZeroDivisionError if b is 0 */
 
 static deccoeff *
-_deccoeff_floor_divide(deccoeff *a, deccoeff *b) {
+_deccoeff_floor_divide(deccoeff *a, deccoeff *b)
+{
     deccoeff *quot, *rem;
     quot = _deccoeff_division(&rem, a, b);
     if (quot == NULL)


More information about the Python-checkins mailing list