re-sync cairo-wideint.c with upstream cairo's version (also fixes the recent compiler warning, but in a different way)
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 14 Jun 2007 13:09:56 +0100
changeset 769b4c78b6bdbd1
parent 768 28b9c546ea52
child 770 6441e0706902
re-sync cairo-wideint.c with upstream cairo's version (also fixes the recent compiler warning, but in a different way)
src/simulator/cairo-wideint.c
     1.1 --- a/src/simulator/cairo-wideint.c	Thu Jun 14 12:55:24 2007 +0100
     1.2 +++ b/src/simulator/cairo-wideint.c	Thu Jun 14 13:09:56 2007 +0100
     1.3 @@ -658,7 +658,7 @@
     1.4   * Compute a 32 bit quotient and 64 bit remainder of a 96 bit unsigned
     1.5   * dividend and 64 bit divisor.  If the quotient doesn't fit into 32
     1.6   * bits then the returned remainder is equal to the divisor, and the
     1.7 - * qoutient is the largest representable 64 bit integer.  It is an
     1.8 + * quotient is the largest representable 64 bit integer.  It is an
     1.9   * error to call this function with the high 32 bits of @num being
    1.10   * non-zero. */
    1.11  cairo_uquorem64_t
    1.12 @@ -776,7 +776,7 @@
    1.13  {
    1.14      int			num_neg = _cairo_int128_negative (num);
    1.15      int			den_neg = _cairo_int64_negative (den);
    1.16 -    cairo_int64_t	nonneg_den = den;
    1.17 +    cairo_uint64_t	nonneg_den;
    1.18      cairo_uquorem64_t	uqr;
    1.19      cairo_quorem64_t	qr;
    1.20  
    1.21 @@ -784,6 +784,8 @@
    1.22  	num = _cairo_int128_negate (num);
    1.23      if (den_neg)
    1.24  	nonneg_den = _cairo_int64_negate (den);
    1.25 +    else
    1.26 +	nonneg_den = den;
    1.27  
    1.28      uqr = _cairo_uint_96by64_32x64_divrem (num, nonneg_den);
    1.29      if (_cairo_uint64_eq (uqr.rem, _cairo_int64_to_uint64 (nonneg_den))) {