# HG changeset patch # User james # Date 1083597554 0 # Node ID 471242c8495487f04d872436c7ccaa44ee322226 # Parent ab71063baf27ed5bdf55f29b283b474f840a4585 [xemacs-hg @ 2004-05-03 15:19:10 by james] Number-related warning cleanups. diff -r ab71063baf27 -r 471242c84954 src/ChangeLog --- a/src/ChangeLog Mon May 03 15:08:51 2004 +0000 +++ b/src/ChangeLog Mon May 03 15:19:14 2004 +0000 @@ -1,3 +1,10 @@ +2004-05-03 Jerry James + + * floatfns.c (Fexpt): Don't shadow the global symbol exp. + * number.c: Remove unused testing function string_to_bignum and + extraneous semicolon; thanks to Vin. + * number.h: Add make_floating prototype. + 2004-04-20 Malcolm Purvis * console-gtk-impl.h: Include X11.h. diff -r ab71063baf27 -r 471242c84954 src/floatfns.c --- a/src/floatfns.c Mon May 03 15:08:51 2004 +0000 +++ b/src/floatfns.c Mon May 03 15:19:14 2004 +0000 @@ -491,16 +491,16 @@ #if defined(HAVE_BIGFLOAT) && defined(bigfloat_pow) if (BIGFLOATP (number1) && INTEGERP (number2)) { - unsigned long exp; + unsigned long exponent; #ifdef HAVE_BIGNUM if (BIGNUMP (number2)) - exp = bignum_to_ulong (XBIGNUM_DATA (number2)); + exponent = bignum_to_ulong (XBIGNUM_DATA (number2)); else #endif - exp = XUINT (number2); + exponent = XUINT (number2); bigfloat_set_prec (scratch_bigfloat, XBIGFLOAT_GET_PREC (number1)); - bigfloat_pow (scratch_bigfloat, XBIGFLOAT_DATA (number1), exp); + bigfloat_pow (scratch_bigfloat, XBIGFLOAT_DATA (number1), exponent); return make_bigfloat_bf (scratch_bigfloat); } #endif diff -r ab71063baf27 -r 471242c84954 src/number.c --- a/src/number.c Mon May 03 15:08:51 2004 +0000 +++ b/src/number.c Mon May 03 15:19:14 2004 +0000 @@ -81,25 +81,6 @@ bignum_print, bignum_finalize, bignum_equal, bignum_hash, bignum_description, Lisp_Bignum); -Lisp_Object -string_to_bignum (const Ibyte *str, Bytecount len, int base) -{ - Lisp_Object b = make_bignum (0L); - /* GMP bignum_set_string has no effect with initial + sign */ - if (*str == '+') - str++; - /* GMP bignum_set_string has no effect when fed an empty string */ - if (*str == '\0') - return make_int (0); - return (bignum_set_string (XBIGNUM_DATA (b), (const char *) str, base) < 0) - ? Fsignal (Qinvalid_read_syntax, - list3 (build_msg_string - ("Invalid integer constant in reader"), - make_string (str, len), - make_int (10))) - : b; -} - #else /* !HAVE_BIGNUM */ Lisp_Object Qbignump; @@ -165,7 +146,6 @@ VOID_TO_LISP (header)); ratio_fini (((Lisp_Ratio *)header)->data); } -; static int ratio_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) diff -r ab71063baf27 -r 471242c84954 src/number.h --- a/src/number.h Mon May 03 15:08:51 2004 +0000 +++ b/src/number.h Mon May 03 15:19:14 2004 +0000 @@ -288,6 +288,7 @@ x = wrong_type_argument (Qfloating, x); \ } while (0) +extern Lisp_Object make_floating (double); EXFUN (Ffloatp, 1);