From 1e2c36ea40dc1ca6ae3de7844f329c2290ccad3a Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 25 Aug 2003 14:29:40 +0000 Subject: [PATCH] * src/bignum.c: Fixed some signed/unsigned comparisons. git-svn-id: svn://svn.zoy.org/elk/trunk@37 55e467fa-43c5-0310-a8a2-de718669efc6 --- src/bignum.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bignum.c b/src/bignum.c index 8ec11d9..f53015c 100644 --- a/src/bignum.c +++ b/src/bignum.c @@ -88,9 +88,9 @@ Object Reduce_Bignum (Object x) { } static void Bignum_Mult_In_Place (register struct S_Bignum *x, int n) { - register int i = x->usize; + register unsigned int i = x->usize; register gran_t *p = x->data; - register int j; + register unsigned int j; register unsigned int k = 0; for (j = 0; j < i; ++j) { @@ -107,9 +107,9 @@ static void Bignum_Mult_In_Place (register struct S_Bignum *x, int n) { } static void Bignum_Add_In_Place (register struct S_Bignum *x, int n) { - register int i = x->usize; + register unsigned int i = x->usize; register gran_t *p = x->data; - register int j = 0; + register unsigned int j = 0; register unsigned int k = n; if (i == 0) goto extend; @@ -230,7 +230,7 @@ Object Bignum_To_String (Object x, int radix) { while (big->usize) { register unsigned int bigdig = Bignum_Div_In_Place (big, div); - register int i; + register unsigned int i; for (i = 0; i < ndig; i++) { *--p = '0' + bigdig % radix; if (*p > '9') @@ -443,8 +443,8 @@ Object Bignum_Abs (Object x) { } int Bignum_Mantissa_Cmp (register struct S_Bignum *x, - register struct S_Bignum *y) { - register int i = x->usize; + register struct S_Bignum *y) { + register unsigned int i = x->usize; if (i < y->usize) return -1; else if (i > y->usize)