Build Fix -- compatibility issue with newer autoconf
[sxemacs] / src / ent / ent-gmp.c
index 7efcedd..78052fb 100644 (file)
@@ -28,7 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 #include "lisp.h"
 #include "sysproc.h"    /* For qxe_getpid */
 
-#include "ent-gmp.h"
+#include "ent.h"
 
 static mpf_t float_print_min, float_print_max;
 gmp_randstate_t random_state;
@@ -49,7 +49,7 @@ static ase_nullary_operation_f Qent_mpf_zero, Qent_mpf_one;
 \f
 /************************* Big Rational Integers ****************************/
 static void
-bigz_print (Lisp_Object obj, Lisp_Object printcharfun, int UNUSED(escapeflag))
+bigz_print (Lisp_Object obj, Lisp_Object printcharfun, int SXE_UNUSED(escapeflag))
 {
        Bufbyte *bstr;
 
@@ -60,19 +60,19 @@ bigz_print (Lisp_Object obj, Lisp_Object printcharfun, int UNUSED(escapeflag))
 }
 
 static int
-bigz_equal (Lisp_Object obj1, Lisp_Object obj2, int UNUSED(depth))
+bigz_equal (Lisp_Object obj1, Lisp_Object obj2, int SXE_UNUSED(depth))
 {
        return bigz_eql(XBIGZ_DATA(obj1), XBIGZ_DATA(obj2));
 }
 
 static unsigned long
-bigz_hash (Lisp_Object obj, int UNUSED(depth))
+bigz_hash (Lisp_Object obj, int SXE_UNUSED(depth))
 {
        return (unsigned long)bigz_hashcode(XBIGZ_DATA(obj));
 }
 
 static const struct lrecord_description bigz_description[] = {
-        { XD_OPAQUE_DATA_PTR, offsetof(Lisp_Bigz, data) },
+       { XD_OPAQUE_DATA_PTR, offsetof(Lisp_Bigz, data) },
        { XD_END }
 };
 
@@ -84,7 +84,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION("bigz", bigz,
 \f
 /************************** Rational Integer Fractions **********************/
 static void
-bigq_print (Lisp_Object obj, Lisp_Object printcharfun, int UNUSED(escapeflag))
+bigq_print (Lisp_Object obj, Lisp_Object printcharfun, int SXE_UNUSED(escapeflag))
 {
        Bufbyte *rstr;
 
@@ -96,20 +96,20 @@ bigq_print (Lisp_Object obj, Lisp_Object printcharfun, int UNUSED(escapeflag))
 }
 
 static int
-bigq_equal (Lisp_Object obj1, Lisp_Object obj2, int UNUSED(depth))
+bigq_equal (Lisp_Object obj1, Lisp_Object obj2, int SXE_UNUSED(depth))
 {
        return bigq_eql(XBIGQ_DATA(obj1), XBIGQ_DATA(obj2));
 }
 
 static unsigned long
-bigq_hash (Lisp_Object obj, int UNUSED(depth))
+bigq_hash (Lisp_Object obj, int SXE_UNUSED(depth))
 {
        return bigq_hashcode(XBIGQ_DATA(obj));
 }
 
 static const struct lrecord_description bigq_description[] = {
        { XD_OPAQUE_DATA_PTR, offsetof (Lisp_Bigq, data) },
-       { XD_END }
+       { XD_END }
 };
 
 DEFINE_BASIC_LRECORD_IMPLEMENTATION("bigq", bigq,
@@ -120,7 +120,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION("bigq", bigq,
 \f
 /********************************** Bigfs ***********************************/
 static void
-bigf_print(Lisp_Object obj, Lisp_Object printcharfun, int UNUSED(escapeflag))
+bigf_print(Lisp_Object obj, Lisp_Object printcharfun, int SXE_UNUSED(escapeflag))
 {
        Bufbyte *fstr = bigf_to_string(XBIGF_DATA(obj), 10);
        write_c_string((char*)fstr, printcharfun);
@@ -130,13 +130,13 @@ bigf_print(Lisp_Object obj, Lisp_Object printcharfun, int UNUSED(escapeflag))
 }
 
 static int
-bigf_equal(Lisp_Object obj1, Lisp_Object obj2, int UNUSED(depth))
+bigf_equal(Lisp_Object obj1, Lisp_Object obj2, int SXE_UNUSED(depth))
 {
        return bigf_eq(XBIGF_DATA(obj1), XBIGF_DATA(obj2));
 }
 
 static unsigned long
-bigf_hash(Lisp_Object obj, int UNUSED(depth))
+bigf_hash(Lisp_Object obj, int SXE_UNUSED(depth))
 {
        return bigf_hashcode(XBIGF_DATA(obj));
 }
@@ -226,19 +226,6 @@ bigf_to_string(mpf_t f, int base)
                str[expt] = '\0';
                len = expt + 1;
        }
-#if 0
-       /* never want this here */
-       /* Computerized scientific notation */
-       /* We need room for a radix point, format identifier, and exponent */
-       const int space = (expt < 0)
-               ? (int)(log(-expt) / log(base)) + 3
-               : (int)(log(expt) / log(base)) + 2;
-       xrealloc_array(str, Bufbyte, len + space);
-       memmove(&str[neg + 2], &str[neg + 1], len - neg);
-       str[len + 1] = 'l';
-       sprintf ((char *)&str[len + 2], "%ld", expt);
-}
-#endif
        return str;
 }
 
@@ -252,7 +239,7 @@ read_bigz_string(const char *cp, int base)
        bigz bz;
 
        bigz_init(bz);
-               
+
        /* MPZ bigz_set_string has no effect
         * with initial + sign */
        if (*cp == '+') {
@@ -281,9 +268,9 @@ Lisp_Object read_bigq_string(char *cp)
           - If p has a '+' sign after the '/' (e.g., 300/+400), it sets the
           numerator from the string, but *leaves the denominator unchanged*.
           - If p has trailing nonnumeric characters, it sets the numerator from
-           the string, but leaves the denominator unchanged.
+          the string, but leaves the denominator unchanged.
           - If p has more than one '/', (e.g., 1/2/3), then it sets the
-           numerator from the string, but leaves the denominator unchanged.
+          numerator from the string, but leaves the denominator unchanged.
 
           Therefore, move p past any leading '+' signs, temporarily drop a null
           after the numeric characters we are trying to convert, and then put
@@ -838,27 +825,27 @@ ent_ne_float_bigzq(Lisp_Object l, Lisp_Object r)
 
 \f
 static Lisp_Object
-_ent_lift_INT_T_BIGZ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_INT_T_BIGZ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        return make_bigz(ent_int(number));
 }
 
 static Lisp_Object
-_ent_lift_BIGZ_T_INT_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_BIGZ_T_INT_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        return make_int(bigz_to_long(XBIGZ_DATA(number)));
 }
 
 #ifdef HAVE_FPFLOAT
 static Lisp_Object
-_ent_lift_FLOAT_T_BIGZ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_FLOAT_T_BIGZ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        bigz_set_fpfloat(ent_scratch_bigz, XFLOAT_DATA(number));
        return make_bigz_bz(ent_scratch_bigz);
 }
 
 static Lisp_Object
-_ent_lift_BIGZ_T_FLOAT_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_BIGZ_T_FLOAT_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        /* can result in an indef object */
        return make_float(bigz_to_fpfloat(XBIGZ_DATA(number)));
@@ -1397,13 +1384,13 @@ ent_ne_bigz_bigq(Lisp_Object l, Lisp_Object r)
 
 \f
 static inline Lisp_Object
-_ent_lift_INT_T_BIGQ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_INT_T_BIGQ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        return make_bigq(ent_int(number), 1UL);
 }
 
 static inline Lisp_Object
-_ent_lift_BIGQ_T_INT_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_BIGQ_T_INT_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        bigz_div(ent_scratch_bigz,
                 XBIGQ_NUMERATOR(number),
@@ -1412,14 +1399,14 @@ _ent_lift_BIGQ_T_INT_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
 }
 
 static inline Lisp_Object
-_ent_lift_BIGZ_T_BIGQ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_BIGZ_T_BIGQ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        bigz_set_long(ent_scratch_bigz, 1L);
        return make_bigq_bz(XBIGZ_DATA(number), ent_scratch_bigz);
 }
 
 static inline Lisp_Object
-_ent_lift_BIGQ_T_BIGZ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_BIGQ_T_BIGZ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        bigz_div(ent_scratch_bigz,
                 XBIGQ_NUMERATOR(number),
@@ -1429,14 +1416,14 @@ _ent_lift_BIGQ_T_BIGZ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
 
 #ifdef HAVE_FPFLOAT
 static inline Lisp_Object
-_ent_lift_FLOAT_T_BIGQ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_FLOAT_T_BIGQ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        bigq_set_fpfloat(ent_scratch_bigq, XFLOAT_DATA(number));
        return make_bigq_bq(ent_scratch_bigq);
 }
 
 static inline Lisp_Object
-_ent_lift_BIGQ_T_FLOAT_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+_ent_lift_BIGQ_T_FLOAT_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        /* can result in an indef object */
        return make_float(bigq_to_fpfloat(XBIGQ_DATA(number)));
@@ -2153,7 +2140,7 @@ ent_lift_INT_T_BIGF_T(Lisp_Object number, ent_lift_args_t la)
 }
 
 static Lisp_Object
-ent_lift_BIGF_T_INT_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+ent_lift_BIGF_T_INT_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        return make_int(bigf_to_long(XBIGF_DATA(number)));
 }
@@ -2169,7 +2156,7 @@ ent_lift_BIGZ_T_BIGF_T(Lisp_Object number, ent_lift_args_t la)
 }
 
 static Lisp_Object
-ent_lift_BIGF_T_BIGZ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+ent_lift_BIGF_T_BIGZ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        bigz_set_bigf(ent_scratch_bigz, XBIGF_DATA(number));
        return make_bigz_bz(ent_scratch_bigz);
@@ -2186,7 +2173,7 @@ ent_lift_BIGQ_T_BIGF_T(Lisp_Object number, ent_lift_args_t la)
 }
 
 static Lisp_Object
-ent_lift_BIGF_T_BIGQ_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+ent_lift_BIGF_T_BIGQ_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        bigq_set_bigf(ent_scratch_bigq, XBIGF_DATA(number));
        return make_bigq_bq(ent_scratch_bigq);
@@ -2204,7 +2191,7 @@ ent_lift_FLOAT_T_BIGF_T(Lisp_Object number, ent_lift_args_t la)
 }
 
 static Lisp_Object
-ent_lift_BIGF_T_FLOAT_T(Lisp_Object number, ent_lift_args_t UNUSED(la))
+ent_lift_BIGF_T_FLOAT_T(Lisp_Object number, ent_lift_args_t SXE_UNUSED(la))
 {
        /* can result in an indef object */
        return make_float(bigf_to_fpfloat(XBIGF_DATA(number)));