/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
- Copyright (C) 1988, 1993, 1994, 1999, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+Copyright (C) 1988, 1993-1994, 1999, 2001-2011
+ Free Software Foundation, Inc.
Author: Wolfgang Rupprecht
(according to ack.texi)
static Lisp_Object float_error_arg, float_error_arg2;
-static 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.
/* Extract a Lisp number as a `double', or signal an error. */
double
-extract_float (num)
- Lisp_Object num;
+extract_float (Lisp_Object num)
{
CHECK_NUMBER_OR_FLOAT (num);
rounding_driver (Lisp_Object arg, Lisp_Object divisor,
double (*double_round) (double),
EMACS_INT (*int_round2) (EMACS_INT, EMACS_INT),
- char *name)
+ const char *name)
{
CHECK_NUMBER_OR_FLOAT (arg);
#ifdef HAVE_MATHERR
int
-matherr (x)
- struct exception *x;
+matherr (struct exception *x)
{
Lisp_Object args;
+ const char *name = x->name;
+
if (! in_float)
/* Not called from emacs-lisp float routines; do the default thing. */
return 0;
if (!strcmp (x->name, "pow"))
- x->name = "expt";
+ name = "expt";
args
- = Fcons (build_string (x->name),
+ = Fcons (build_string (name),
Fcons (make_float (x->arg1),
- ((!strcmp (x->name, "log") || !strcmp (x->name, "pow"))
+ ((!strcmp (name, "log") || !strcmp (name, "pow"))
? Fcons (make_float (x->arg2), Qnil)
: Qnil)));
switch (x->type)
#endif /* HAVE_MATHERR */
void
-init_floatfns ()
+init_floatfns (void)
{
#ifdef FLOAT_CATCH_SIGILL
signal (SIGILL, float_error);
}
void
-syms_of_floatfns ()
+syms_of_floatfns (void)
{
defsubr (&Sacos);
defsubr (&Sasin);
defsubr (&Struncate);
}
-/* arch-tag: be05bf9d-049e-4e31-91b9-e6153d483ae7
- (do not change this comment) */