projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(enum lrecord_type): Add `lrecord_type_uint16_byte_table' and
[chise/xemacs-chise.git-]
/
src
/
floatfns.c
diff --git
a/src/floatfns.c
b/src/floatfns.c
index
5dd8496
..
337c581
100644
(file)
--- a/
src/floatfns.c
+++ b/
src/floatfns.c
@@
-79,7
+79,7
@@
static int in_float;
/* If an argument is out of range for a mathematical function,
here is the actual argument value to use in the error message. */
static Lisp_Object float_error_arg, float_error_arg2;
/* If an argument is out of range for a mathematical function,
here is the actual argument value to use in the error message. */
static Lisp_Object float_error_arg, float_error_arg2;
-static CONST char *float_error_fn_name;
+static const char *float_error_fn_name;
/* Evaluate the floating point expression D, recording NUM
as the original argument for error messages.
/* Evaluate the floating point expression D, recording NUM
as the original argument for error messages.
@@
-126,7
+126,7
@@
static CONST char *float_error_fn_name;
/* Convert float to Lisp Integer if it fits, else signal a range
error using the given arguments. */
static Lisp_Object
/* Convert float to Lisp Integer if it fits, else signal a range
error using the given arguments. */
static Lisp_Object
-float_to_int (double x, CONST char *name, Lisp_Object num, Lisp_Object num2)
+float_to_int (double x, const char *name, Lisp_Object num, Lisp_Object num2)
{
if (x >= ((EMACS_INT) 1 << (VALBITS-1))
|| x <= - ((EMACS_INT) 1 << (VALBITS-1)) - (EMACS_INT) 1)
{
if (x >= ((EMACS_INT) 1 << (VALBITS-1))
|| x <= - ((EMACS_INT) 1 << (VALBITS-1)) - (EMACS_INT) 1)
@@
-190,7
+190,7
@@
static const struct lrecord_description float_description[] = {
DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float,
mark_float, print_float, 0, float_equal,
float_hash, float_description,
DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float,
mark_float, print_float, 0, float_equal,
float_hash, float_description,
- struct Lisp_Float);
+ Lisp_Float);
\f
/* Extract a Lisp number as a `double', or signal an error. */
\f
/* Extract a Lisp number as a `double', or signal an error. */
@@
-705,19
+705,19
@@
This is the same as the exponent of a float.
double f = extract_float (arg);
if (f == 0.0)
double f = extract_float (arg);
if (f == 0.0)
- return make_int (- (int)((((EMACS_UINT) 1) << (VALBITS - 1)))); /* most-negative-fixnum */
+ return make_int (- (EMACS_INT)(((EMACS_UINT) 1) << (VALBITS - 1))); /* most-negative-fixnum */
#ifdef HAVE_LOGB
{
Lisp_Object val;
#ifdef HAVE_LOGB
{
Lisp_Object val;
- IN_FLOAT (val = make_int ((int) logb (f)), "logb", arg);
- return (val);
+ IN_FLOAT (val = make_int ((EMACS_INT) logb (f)), "logb", arg);
+ return val;
}
#else
#ifdef HAVE_FREXP
{
int exqp;
IN_FLOAT (frexp (f, &exqp), "logb", arg);
}
#else
#ifdef HAVE_FREXP
{
int exqp;
IN_FLOAT (frexp (f, &exqp), "logb", arg);
- return (make_int (exqp - 1));
+ return make_int (exqp - 1);
}
#else
{
}
#else
{
@@
-741,7
+741,7
@@
This is the same as the exponent of a float.
f /= d;
val += i;
}
f /= d;
val += i;
}
- return (make_int (val));
+ return make_int (val);
}
#endif /* ! HAVE_FREXP */
#endif /* ! HAVE_LOGB */
}
#endif /* ! HAVE_FREXP */
#endif /* ! HAVE_LOGB */
@@
-988,6
+988,7
@@
init_floatfns_very_early (void)
void
syms_of_floatfns (void)
{
void
syms_of_floatfns (void)
{
+ INIT_LRECORD_IMPLEMENTATION (float);
/* Trig functions. */
/* Trig functions. */