Mercurial > hg > xemacs-beta
diff src/number.c @ 4886:1e9078742fa7
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 26 Jan 2010 15:16:31 +0000 |
parents | f730384b8ddf 6772ce4d982b |
children | d1d4ce10c7b4 db2db229ee82 |
line wrap: on
line diff
--- a/src/number.c Tue Jan 26 02:22:10 2010 +0000 +++ b/src/number.c Tue Jan 26 15:16:31 2010 +0000 @@ -32,7 +32,7 @@ Lisp_Object Qrationalp, Qfloatingp, Qrealp; Lisp_Object Vdefault_float_precision; -Fixnum Vmost_negative_fixnum, Vmost_positive_fixnum; + static Lisp_Object Qunsupported_type; static Lisp_Object Vbigfloat_max_prec; static int number_initialized; @@ -139,38 +139,6 @@ } -/********************************* Integers *********************************/ -DEFUN ("integerp", Fintegerp, 1, 1, 0, /* -Return t if OBJECT is an integer, nil otherwise. -*/ - (object)) -{ - return INTEGERP (object) ? Qt : Qnil; -} - -DEFUN ("evenp", Fevenp, 1, 1, 0, /* -Return t if INTEGER is even, nil otherwise. -*/ - (integer)) -{ - CONCHECK_INTEGER (integer); - return (BIGNUMP (integer) - ? bignum_evenp (XBIGNUM_DATA (integer)) - : XTYPE (integer) == Lisp_Type_Int_Even) ? Qt : Qnil; -} - -DEFUN ("oddp", Foddp, 1, 1, 0, /* -Return t if INTEGER is odd, nil otherwise. -*/ - (integer)) -{ - CONCHECK_INTEGER (integer); - return (BIGNUMP (integer) - ? bignum_oddp (XBIGNUM_DATA (integer)) - : XTYPE (integer) == Lisp_Type_Int_Odd) ? Qt : Qnil; -} - - /********************************** Ratios **********************************/ #ifdef HAVE_RATIO static void @@ -270,7 +238,7 @@ return Fcanonicalize_number (make_bignum_bg (XRATIO_DENOMINATOR (rational))); } -#endif +#else return make_int (1); } @@ -810,9 +778,6 @@ /* Functions */ DEFSUBR (Fbignump); - DEFSUBR (Fintegerp); - DEFSUBR (Fevenp); - DEFSUBR (Foddp); DEFSUBR (Fratiop); DEFSUBR (Frationalp); DEFSUBR (Fnumerator); @@ -855,16 +820,6 @@ Vbigfloat_max_prec = make_int (0); #endif /* HAVE_BIGFLOAT */ - DEFVAR_CONST_INT ("most-negative-fixnum", &Vmost_negative_fixnum /* -The fixnum closest in value to negative infinity. -*/); - Vmost_negative_fixnum = EMACS_INT_MIN; - - DEFVAR_CONST_INT ("most-positive-fixnum", &Vmost_positive_fixnum /* -The fixnum closest in value to positive infinity. -*/); - Vmost_positive_fixnum = EMACS_INT_MAX; - Fprovide (intern ("number-types")); #ifdef HAVE_BIGNUM Fprovide (intern ("bignum"));