re-sync cairo-wideint.c with upstream cairo's version (also fixes the recent compiler warning, but in a different way)

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2007-06-14 13:09:56 +01:00
1 parent 238625364c
commit ea7963f2bb
1 file changed
+4 -2
+4 -2
View File
@@ -658,7 +658,7 @@ _cairo_int128_divrem (cairo_int128_t num, cairo_int128_t den)
* Compute a 32 bit quotient and 64 bit remainder of a 96 bit unsigned
* dividend and 64 bit divisor. If the quotient doesn't fit into 32
* bits then the returned remainder is equal to the divisor, and the
* qoutient is the largest representable 64 bit integer. It is an
* quotient is the largest representable 64 bit integer. It is an
* error to call this function with the high 32 bits of @num being
* non-zero. */
cairo_uquorem64_t
@@ -776,7 +776,7 @@ _cairo_int_96by64_32x64_divrem (cairo_int128_t num, cairo_int64_t den)
{
int num_neg = _cairo_int128_negative (num);
int den_neg = _cairo_int64_negative (den);
cairo_int64_t nonneg_den = den;
cairo_uint64_t nonneg_den;
cairo_uquorem64_t uqr;
cairo_quorem64_t qr;
@@ -784,6 +784,8 @@ _cairo_int_96by64_32x64_divrem (cairo_int128_t num, cairo_int64_t den)
num = _cairo_int128_negate (num);
if (den_neg)
nonneg_den = _cairo_int64_negate (den);
else
nonneg_den = den;
uqr = _cairo_uint_96by64_32x64_divrem (num, nonneg_den);
if (_cairo_uint64_eq (uqr.rem, _cairo_int64_to_uint64 (nonneg_den))) {