Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
cc94f3b2
Commit
cc94f3b2
authored
Feb 17, 2000
by
Gerd Moellmann
Browse files
Remove `LISP_FLOAT_TYPE' and `standalone'.
parent
10689a01
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
9 additions
and
218 deletions
+9
-218
src/Makefile.in
src/Makefile.in
+0
-8
src/alloc.c
src/alloc.c
+0
-23
src/bytecode.c
src/bytecode.c
+4
-12
src/config.in
src/config.in
+0
-4
src/data.c
src/data.c
+2
-57
src/dispnew.c
src/dispnew.c
+0
-10
src/ecrt0.c
src/ecrt0.c
+0
-2
src/editfns.c
src/editfns.c
+0
-4
src/emacs.c
src/emacs.c
+0
-2
src/floatfns.c
src/floatfns.c
+0
-18
src/fns.c
src/fns.c
+0
-2
src/lisp.h
src/lisp.h
+1
-34
src/lread.c
src/lread.c
+1
-33
src/print.c
src/print.c
+1
-9
No files found.
src/Makefile.in
View file @
cc94f3b2
...
...
@@ -127,11 +127,7 @@ CC = C_COMPILER
#endif
#ifndef LIB_MATH
# ifdef LISP_FLOAT_TYPE
# define LIB_MATH -lm
# else /* ! defined (LISP_FLOAT_TYPE) */
# define LIB_MATH
# endif /* ! defined (LISP_FLOAT_TYPE) */
#endif /* LIB_MATH */
/* Some s/SYSTEM.h files define this to request special switches in ld. */
...
...
@@ -628,11 +624,7 @@ otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj)
#define FACE_SUPPORT
#endif
#ifdef LISP_FLOAT_TYPE
#define FLOAT_SUPPORT ${lispsource}float-sup.elc
#else
#define FLOAT_SUPPORT
#endif
#ifdef HAVE_MOUSE
#define MOUSE_SUPPORT ${lispsource}mouse.elc \
...
...
src/alloc.c
View file @
cc94f3b2
...
...
@@ -151,9 +151,7 @@ int undo_strong_limit;
int
total_conses
,
total_markers
,
total_symbols
,
total_vector_size
;
int
total_free_conses
,
total_free_markers
,
total_free_symbols
;
#ifdef LISP_FLOAT_TYPE
int
total_free_floats
,
total_floats
;
#endif
/* LISP_FLOAT_TYPE */
/* Points to memory space allocated as "spare", to be freed if we run
out of memory. */
...
...
@@ -1345,8 +1343,6 @@ make_uninit_multibyte_string (nchars, nbytes)
Float Allocation
***********************************************************************/
#ifdef LISP_FLOAT_TYPE
/* We store float cells inside of float_blocks, allocating a new
float_block with malloc whenever necessary. Float cells reclaimed
by GC are put on a free list to be reallocated before allocating
...
...
@@ -1431,8 +1427,6 @@ make_float (float_value)
return
val
;
}
#endif
/* LISP_FLOAT_TYPE */
/***********************************************************************
...
...
@@ -2031,7 +2025,6 @@ pure_cons (car, cdr)
return
new
;
}
#ifdef LISP_FLOAT_TYPE
Lisp_Object
make_pure_float
(
num
)
...
...
@@ -2069,8 +2062,6 @@ make_pure_float (num)
return
new
;
}
#endif
/* LISP_FLOAT_TYPE */
Lisp_Object
make_pure_vector
(
len
)
EMACS_INT
len
;
...
...
@@ -2103,10 +2094,8 @@ Does not copy symbols. Copies strings without text properties.")
if
(
CONSP
(
obj
))
return
pure_cons
(
XCAR
(
obj
),
XCDR
(
obj
));
#ifdef LISP_FLOAT_TYPE
else
if
(
FLOATP
(
obj
))
return
make_pure_float
(
XFLOAT_DATA
(
obj
));
#endif
/* LISP_FLOAT_TYPE */
else
if
(
STRINGP
(
obj
))
return
make_pure_string
(
XSTRING
(
obj
)
->
data
,
XSTRING
(
obj
)
->
size
,
STRING_BYTES
(
XSTRING
(
obj
)),
...
...
@@ -2417,12 +2406,8 @@ Garbage collection happens automatically if you cons more than\n\
make_number
(
total_free_markers
));
total
[
3
]
=
Fcons
(
make_number
(
total_string_size
),
make_number
(
total_vector_size
));
#ifdef LISP_FLOAT_TYPE
total
[
4
]
=
Fcons
(
make_number
(
total_floats
),
make_number
(
total_free_floats
));
#else
total
[
4
]
=
Fcons
(
make_number
(
0
),
make_number
(
0
));
#endif
total
[
5
]
=
Fcons
(
make_number
(
total_intervals
),
make_number
(
total_free_intervals
));
total
[
6
]
=
Fcons
(
make_number
(
total_strings
),
...
...
@@ -2885,11 +2870,9 @@ mark_object (argptr)
goto
loop
;
}
#ifdef LISP_FLOAT_TYPE
case
Lisp_Float
:
XMARK
(
XFLOAT
(
obj
)
->
type
);
break
;
#endif
/* LISP_FLOAT_TYPE */
case
Lisp_Int
:
break
;
...
...
@@ -3057,11 +3040,9 @@ survives_gc_p (obj)
survives_p
=
XMARKBIT
(
XCAR
(
obj
));
break
;
#ifdef LISP_FLOAT_TYPE
case
Lisp_Float
:
survives_p
=
XMARKBIT
(
XFLOAT
(
obj
)
->
type
);
break
;
#endif
/* LISP_FLOAT_TYPE */
default:
abort
();
...
...
@@ -3130,7 +3111,6 @@ gc_sweep ()
total_free_conses
=
num_free
;
}
#ifdef LISP_FLOAT_TYPE
/* Put all unmarked floats on free list */
{
register
struct
float_block
*
fblk
;
...
...
@@ -3177,7 +3157,6 @@ gc_sweep ()
total_floats
=
num_used
;
total_free_floats
=
num_free
;
}
#endif
/* LISP_FLOAT_TYPE */
/* Put all unmarked intervals on free list */
{
...
...
@@ -3499,9 +3478,7 @@ init_alloc_once ()
init_cons
();
init_symbol
();
init_marker
();
#ifdef LISP_FLOAT_TYPE
init_float
();
#endif
/* LISP_FLOAT_TYPE */
INIT_INTERVALS
;
#ifdef REL_ALLOC
...
...
src/bytecode.c
View file @
cc94f3b2
...
...
@@ -434,11 +434,9 @@ If the third argument is incorrect, Emacs may crash.")
{
#ifdef BYTE_CODE_SAFE
if
(
top
>
stacke
)
error
(
"Byte code stack overflow (byte compiler bug), pc %d, depth %d"
,
stack
.
pc
-
stack
.
byte_string_start
,
stacke
-
top
);
abort
();
else
if
(
top
<
stack
.
bottom
-
1
)
error
(
"Byte code stack underflow (byte compiler bug), pc %d"
,
stack
.
pc
-
stack
.
byte_string_start
);
abort
();
#endif
#ifdef BYTE_CODE_METER
...
...
@@ -1042,7 +1040,6 @@ If the third argument is incorrect, Emacs may crash.")
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
v1
,
0
);
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
v2
,
0
);
AFTER_POTENTIAL_GC
();
#ifdef LISP_FLOAT_TYPE
if
(
FLOATP
(
v1
)
||
FLOATP
(
v2
))
{
double
f1
,
f2
;
...
...
@@ -1052,7 +1049,6 @@ If the third argument is incorrect, Emacs may crash.")
TOP
=
(
f1
==
f2
?
Qt
:
Qnil
);
}
else
#endif
TOP
=
(
XINT
(
v1
)
==
XINT
(
v2
)
?
Qt
:
Qnil
);
break
;
}
...
...
@@ -1532,15 +1528,11 @@ If the third argument is incorrect, Emacs may crash.")
#ifdef BYTE_CODE_SAFE
if
(
op
<
Bconstant
)
{
BEFORE_POTENTIAL_GC
();
error
(
"unknown bytecode %d (byte compiler bug)"
,
op
);
AFTER_POTENTIAL_GC
();
abort
();
}
if
((
op
-=
Bconstant
)
>=
const_length
)
{
BEFORE_POTENTIAL_GC
();
error
(
"no constant number %d (byte compiler bug)"
,
op
);
AFTER_POTENTIAL_GC
();
abort
();
}
PUSH
(
vectorp
[
op
]);
#else
...
...
src/config.in
View file @
cc94f3b2
...
...
@@ -28,10 +28,6 @@ Boston, MA 02111-1307, USA. */
/* These are all defined in the top-level Makefile by configure.
They're here only for reference. */
/* Define LISP_FLOAT_TYPE if you want emacs to support floating-point
numbers. */
#undef LISP_FLOAT_TYPE
/* Define GNU_MALLOC if you want to use the GNU memory allocator. */
#undef GNU_MALLOC
...
...
src/data.c
View file @
cc94f3b2
...
...
@@ -25,17 +25,11 @@ Boston, MA 02111-1307, USA. */
#include "lisp.h"
#include "puresize.h"
#include "charset.h"
#ifndef standalone
#include "buffer.h"
#include "keyboard.h"
#include "frame.h"
#endif
#include "syssignal.h"
#ifdef LISP_FLOAT_TYPE
#ifdef STDC_HEADERS
#include <float.h>
#endif
...
...
@@ -61,7 +55,6 @@ Boston, MA 02111-1307, USA. */
#endif
#include <math.h>
#endif
/* LISP_FLOAT_TYPE */
#if !defined (atof)
extern
double
atof
();
...
...
@@ -93,10 +86,8 @@ Lisp_Object Qad_advice_info, Qad_activate_internal;
Lisp_Object
Qrange_error
,
Qdomain_error
,
Qsingularity_error
;
Lisp_Object
Qoverflow_error
,
Qunderflow_error
;
#ifdef LISP_FLOAT_TYPE
Lisp_Object
Qfloatp
;
Lisp_Object
Qnumberp
,
Qnumber_or_marker_p
;
#endif
static
Lisp_Object
Qinteger
,
Qsymbol
,
Qstring
,
Qcons
,
Qmarker
,
Qoverlay
;
static
Lisp_Object
Qfloat
,
Qwindow_configuration
,
Qwindow
;
...
...
@@ -252,10 +243,8 @@ for example, (type-of 1) returns `integer'.")
return
Qhash_table
;
return
Qvector
;
#ifdef LISP_FLOAT_TYPE
case
Lisp_Float
:
return
Qfloat
;
#endif
default:
abort
();
...
...
@@ -506,7 +495,6 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p,
return
Qnil
;
}
#ifdef LISP_FLOAT_TYPE
DEFUN
(
"floatp"
,
Ffloatp
,
Sfloatp
,
1
,
1
,
0
,
"Return t if OBJECT is a floating point number."
)
(
object
)
...
...
@@ -516,7 +504,7 @@ DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,
return
Qt
;
return
Qnil
;
}
#endif
/* LISP_FLOAT_TYPE */
/* Extract and set components of lists */
...
...
@@ -1939,7 +1927,6 @@ arithcompare (num1, num2, comparison)
double
f1
,
f2
;
int
floatp
=
0
;
#ifdef LISP_FLOAT_TYPE
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
num1
,
0
);
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
num2
,
0
);
...
...
@@ -1949,10 +1936,6 @@ arithcompare (num1, num2, comparison)
f1
=
(
FLOATP
(
num1
))
?
XFLOAT_DATA
(
num1
)
:
XINT
(
num1
);
f2
=
(
FLOATP
(
num2
))
?
XFLOAT_DATA
(
num2
)
:
XINT
(
num2
);
}
#else
CHECK_NUMBER_COERCE_MARKER
(
num1
,
0
);
CHECK_NUMBER_COERCE_MARKER
(
num2
,
0
);
#endif
/* LISP_FLOAT_TYPE */
switch
(
comparison
)
{
...
...
@@ -2045,7 +2028,6 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, "Return t if NUMBER is zero.")
(
number
)
register
Lisp_Object
number
;
{
#ifdef LISP_FLOAT_TYPE
CHECK_NUMBER_OR_FLOAT
(
number
,
0
);
if
(
FLOATP
(
number
))
...
...
@@ -2054,9 +2036,6 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, "Return t if NUMBER is zero.")
return
Qt
;
return
Qnil
;
}
#else
CHECK_NUMBER
(
number
,
0
);
#endif
/* LISP_FLOAT_TYPE */
if
(
!
XINT
(
number
))
return
Qt
;
...
...
@@ -2101,9 +2080,6 @@ NUMBER may be an integer or a floating point number.")
{
char
buffer
[
VALBITS
];
#ifndef LISP_FLOAT_TYPE
CHECK_NUMBER
(
number
,
0
);
#else
CHECK_NUMBER_OR_FLOAT
(
number
,
0
);
if
(
FLOATP
(
number
))
...
...
@@ -2113,7 +2089,6 @@ NUMBER may be an integer or a floating point number.")
float_to_string
(
pigbuf
,
XFLOAT_DATA
(
number
));
return
build_string
(
pigbuf
);
}
#endif
/* LISP_FLOAT_TYPE */
if
(
sizeof
(
int
)
==
sizeof
(
EMACS_INT
))
sprintf
(
buffer
,
"%d"
,
XINT
(
number
));
...
...
@@ -2187,10 +2162,8 @@ If the base used is not 10, floating point is not recognized.")
else
if
(
*
p
==
'+'
)
p
++
;
#ifdef LISP_FLOAT_TYPE
if
(
isfloat_string
(
p
)
&&
b
==
10
)
return
make_float
(
negative
*
atof
(
p
));
#endif
/* LISP_FLOAT_TYPE */
while
(
1
)
{
...
...
@@ -2237,15 +2210,11 @@ arith_driver (code, nargs, args)
for
(
argnum
=
0
;
argnum
<
nargs
;
argnum
++
)
{
val
=
args
[
argnum
];
/* using args[argnum] as argument to CHECK_NUMBER_... */
#ifdef LISP_FLOAT_TYPE
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
val
,
argnum
);
if
(
FLOATP
(
val
))
/* time to do serious math */
return
(
float_arith_driver
((
double
)
accum
,
argnum
,
code
,
nargs
,
args
));
#else
CHECK_NUMBER_COERCE_MARKER
(
val
,
argnum
);
#endif
/* LISP_FLOAT_TYPE */
args
[
argnum
]
=
val
;
/* runs into a compiler bug. */
next
=
XINT
(
args
[
argnum
]);
switch
(
SWITCH_ENUM_CAST
(
code
))
...
...
@@ -2279,8 +2248,6 @@ arith_driver (code, nargs, args)
#undef isnan
#define isnan(x) ((x) != (x))
#ifdef LISP_FLOAT_TYPE
Lisp_Object
float_arith_driver
(
accum
,
argnum
,
code
,
nargs
,
args
)
double
accum
;
...
...
@@ -2344,7 +2311,7 @@ float_arith_driver (accum, argnum, code, nargs, args)
return
make_float
(
accum
);
}
#endif
/* LISP_FLOAT_TYPE */
DEFUN
(
"+"
,
Fplus
,
Splus
,
0
,
MANY
,
0
,
"Return sum of any number of arguments, which are numbers or markers."
)
...
...
@@ -2436,18 +2403,12 @@ Both X and Y must be numbers or markers.")
Lisp_Object
val
;
EMACS_INT
i1
,
i2
;
#ifdef LISP_FLOAT_TYPE
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
x
,
0
);
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
y
,
1
);
if
(
FLOATP
(
x
)
||
FLOATP
(
y
))
return
fmod_float
(
x
,
y
);
#else
/* not LISP_FLOAT_TYPE */
CHECK_NUMBER_COERCE_MARKER
(
x
,
0
);
CHECK_NUMBER_COERCE_MARKER
(
y
,
1
);
#endif
/* not LISP_FLOAT_TYPE */
i1
=
XINT
(
x
);
i2
=
XINT
(
y
);
...
...
@@ -2566,14 +2527,10 @@ Markers are converted to integers.")
(
number
)
register
Lisp_Object
number
;
{
#ifdef LISP_FLOAT_TYPE
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
number
,
0
);
if
(
FLOATP
(
number
))
return
(
make_float
(
1
.
0
+
XFLOAT_DATA
(
number
)));
#else
CHECK_NUMBER_COERCE_MARKER
(
number
,
0
);
#endif
/* LISP_FLOAT_TYPE */
XSETINT
(
number
,
XINT
(
number
)
+
1
);
return
number
;
...
...
@@ -2585,14 +2542,10 @@ Markers are converted to integers.")
(
number
)
register
Lisp_Object
number
;
{
#ifdef LISP_FLOAT_TYPE
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER
(
number
,
0
);
if
(
FLOATP
(
number
))
return
(
make_float
(
-
1
.
0
+
XFLOAT_DATA
(
number
)));
#else
CHECK_NUMBER_COERCE_MARKER
(
number
,
0
);
#endif
/* LISP_FLOAT_TYPE */
XSETINT
(
number
,
XINT
(
number
)
-
1
);
return
number
;
...
...
@@ -2660,11 +2613,9 @@ syms_of_data ()
Qboundp
=
intern
(
"boundp"
);
Qfboundp
=
intern
(
"fboundp"
);
#ifdef LISP_FLOAT_TYPE
Qfloatp
=
intern
(
"floatp"
);
Qnumberp
=
intern
(
"numberp"
);
Qnumber_or_marker_p
=
intern
(
"number-or-marker-p"
);
#endif
/* LISP_FLOAT_TYPE */
Qchar_table_p
=
intern
(
"char-table-p"
);
Qvector_or_char_table_p
=
intern
(
"vector-or-char-table-p"
);
...
...
@@ -2770,7 +2721,6 @@ syms_of_data ()
Fput
(
Qtext_read_only
,
Qerror_message
,
build_string
(
"Text is read-only"
));
#ifdef LISP_FLOAT_TYPE
Qrange_error
=
intern
(
"range-error"
);
Qdomain_error
=
intern
(
"domain-error"
);
Qsingularity_error
=
intern
(
"singularity-error"
);
...
...
@@ -2807,7 +2757,6 @@ syms_of_data ()
staticpro
(
&
Qsingularity_error
);
staticpro
(
&
Qoverflow_error
);
staticpro
(
&
Qunderflow_error
);
#endif
/* LISP_FLOAT_TYPE */
staticpro
(
&
Qnil
);
staticpro
(
&
Qt
);
...
...
@@ -2855,11 +2804,9 @@ syms_of_data ()
staticpro
(
&
Qmarkerp
);
staticpro
(
&
Qbuffer_or_string_p
);
staticpro
(
&
Qinteger_or_marker_p
);
#ifdef LISP_FLOAT_TYPE
staticpro
(
&
Qfloatp
);
staticpro
(
&
Qnumberp
);
staticpro
(
&
Qnumber_or_marker_p
);
#endif
/* LISP_FLOAT_TYPE */
staticpro
(
&
Qchar_table_p
);
staticpro
(
&
Qvector_or_char_table_p
);
...
...
@@ -2924,9 +2871,7 @@ A keyword symbol is a symbol whose name starts with a colon (`:').");
defsubr
(
&
Sinteger_or_marker_p
);
defsubr
(
&
Snumberp
);
defsubr
(
&
Snumber_or_marker_p
);
#ifdef LISP_FLOAT_TYPE
defsubr
(
&
Sfloatp
);
#endif
/* LISP_FLOAT_TYPE */
defsubr
(
&
Snatnump
);
defsubr
(
&
Ssymbolp
);
defsubr
(
&
Skeywordp
);
...
...
src/dispnew.c
View file @
cc94f3b2
...
...
@@ -5509,16 +5509,11 @@ Emacs was built without floating point support.\n\
CHECK_NUMBER
(
milliseconds
,
1
);
usec
=
XINT
(
milliseconds
)
*
1000
;
#ifdef LISP_FLOAT_TYPE
{
double
duration
=
extract_float
(
seconds
);
sec
=
(
int
)
duration
;
usec
+=
(
duration
-
sec
)
*
1000000
;
}
#else
CHECK_NUMBER
(
seconds
,
0
);
sec
=
XINT
(
seconds
);
#endif
#ifndef EMACS_HAS_USECS
if
(
sec
==
0
&&
usec
!=
0
)
...
...
@@ -5641,16 +5636,11 @@ Value is t if waited the full time with no input arriving.")
CHECK_NUMBER
(
milliseconds
,
1
);
usec
=
XINT
(
milliseconds
)
*
1000
;
#ifdef LISP_FLOAT_TYPE
{
double
duration
=
extract_float
(
seconds
);
sec
=
(
int
)
duration
;
usec
+=
(
duration
-
sec
)
*
1000000
;
}
#else
CHECK_NUMBER
(
seconds
,
0
);
sec
=
XINT
(
seconds
);
#endif
#ifndef EMACS_HAS_USECS
if
(
usec
!=
0
&&
sec
==
0
)
...
...
src/ecrt0.c
View file @
cc94f3b2
...
...
@@ -347,9 +347,7 @@ static foo () {
_start
()
{
#ifdef sun
#ifdef LISP_FLOAT_TYPE
finitfp_
();
#endif
#endif
/* On 68000, _start pushes a6 onto stack */
start1
();
...
...
src/editfns.c
View file @
cc94f3b2
...
...
@@ -2963,7 +2963,6 @@ Use %% to put a single % into the output.")
/* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */
else
if
(
INTEGERP
(
args
[
n
])
&&
*
format
!=
's'
)
{
#ifdef LISP_FLOAT_TYPE
/* The following loop assumes the Lisp type indicates
the proper way to pass the argument.
So make sure we have a flonum if the argument should
...
...
@@ -2971,7 +2970,6 @@ Use %% to put a single % into the output.")
if
(
*
format
==
'e'
||
*
format
==
'f'
||
*
format
==
'g'
)
args
[
n
]
=
Ffloat
(
args
[
n
]);
else
#endif
if
(
*
format
!=
'd'
&&
*
format
!=
'o'
&&
*
format
!=
'x'
&&
*
format
!=
'i'
&&
*
format
!=
'X'
&&
*
format
!=
'c'
)
error
(
"Invalid format operation %%%c"
,
*
format
);
...
...
@@ -2990,14 +2988,12 @@ Use %% to put a single % into the output.")
thissize
=
STRING_BYTES
(
XSTRING
(
args
[
n
]));
}
}
#ifdef LISP_FLOAT_TYPE
else
if
(
FLOATP
(
args
[
n
])
&&
*
format
!=
's'
)
{
if
(
!
(
*
format
==
'e'
||
*
format
==
'f'
||
*
format
==
'g'
))
args
[
n
]
=
Ftruncate
(
args
[
n
],
Qnil
);
thissize
=
200
;
}
#endif
else
{
/* Anything but a string, convert to a string using princ. */
...
...
src/emacs.c
View file @
cc94f3b2
...
...
@@ -1404,9 +1404,7 @@ main (argc, argv, envp)
init_xdisp
();
init_macros
();
init_editfns
();
#ifdef LISP_FLOAT_TYPE
init_floatfns
();
#endif
#ifdef VMS
init_vmsfns
();
#endif
/* VMS */
...
...
src/floatfns.c
View file @
cc94f3b2
...
...
@@ -49,8 +49,6 @@ Boston, MA 02111-1307, USA. */
#include "lisp.h"
#include "syssignal.h"
#ifdef LISP_FLOAT_TYPE
#if STDC_HEADERS
#include <float.h>
#endif
...
...
@@ -717,8 +715,6 @@ This is the same as the exponent of a float.")
return
val
;
}
#endif
/* LISP_FLOAT_TYPE */
/* the rounding functions */
...
...
@@ -737,7 +733,6 @@ rounding_driver (arg, divisor, double_round, int_round2, name)
CHECK_NUMBER_OR_FLOAT
(
divisor
,
1
);
#ifdef LISP_FLOAT_TYPE
if
(
FLOATP
(
arg
)
||
FLOATP
(
divisor
))
{
double
f1
,
f2
;
...
...
@@ -751,7 +746,6 @@ rounding_driver (arg, divisor, double_round, int_round2, name)
FLOAT_TO_INT2
(
f1
,
arg
,
name
,
arg
,
divisor
);
return
arg
;
}
#endif
i1
=
XINT
(
arg
);
i2
=
XINT
(
divisor
);
...
...
@@ -763,7 +757,6 @@ rounding_driver (arg, divisor, double_round, int_round2, name)
return
arg
;
}
#ifdef LISP_FLOAT_TYPE
if
(
FLOATP
(
arg
))
{
double
d
;
...
...
@@ -771,7 +764,6 @@ rounding_driver (arg, divisor, double_round, int_round2, name)
IN_FLOAT
(
d
=
(
*
double_round
)
(
XFLOAT_DATA
(
arg
)),
name
,
arg
);
FLOAT_TO_INT
(
d
,
arg
,
name
,
arg
);
}
#endif
return
arg
;
}
...
...
@@ -881,7 +873,6 @@ With optional DIVISOR, truncate ARG/DIVISOR.")
"truncate"
);
}
#ifdef LISP_FLOAT_TYPE
Lisp_Object
fmod_float
(
x
,
y
)
...
...
@@ -1018,17 +1009,9 @@ init_floatfns ()
in_float
=
0
;
}
#else
/* not LISP_FLOAT_TYPE */
init_floatfns
()
{}
#endif
/* not LISP_FLOAT_TYPE */
void
syms_of_floatfns
()
{
#ifdef LISP_FLOAT_TYPE
defsubr
(
&
Sacos
);
defsubr
(
&
Sasin
);
defsubr
(
&
Satan
);
...
...
@@ -1066,7 +1049,6 @@ syms_of_floatfns ()
defsubr
(
&
Sabs
);
defsubr
(
&
Sfloat
);
defsubr
(
&
Slogb
);
#endif
/* LISP_FLOAT_TYPE */
defsubr
(
&
Sceiling
);
defsubr
(
&
Sfloor
);
defsubr
(
&
Sround
);
...
...
src/fns.c
View file @
cc94f3b2
...
...
@@ -1852,10 +1852,8 @@ internal_equal (o1, o2, depth)
switch
(
XTYPE
(
o1
))
{
#ifdef LISP_FLOAT_TYPE
case
Lisp_Float
:
return
(
extract_float
(
o1
)
==
extract_float
(
o2
));
#endif
case
Lisp_Cons
:
if
(
!
internal_equal
(
XCAR
(
o1
),
XCAR
(
o2
),
depth
+
1
))
...
...
src/lisp.h
View file @
cc94f3b2
...
...
@@ -75,9 +75,7 @@ enum Lisp_Type
/* Cons. XCONS (object) points to a struct Lisp_Cons. */
Lisp_Cons
,
#ifdef LISP_FLOAT_TYPE
Lisp_Float
,
#endif
/* LISP_FLOAT_TYPE */
/* This is not a type code. It is for range checking. */
Lisp_Type_Limit
...
...
@@ -1027,8 +1025,7 @@ union Lisp_Misc
struct
Lisp_Kboard_Objfwd
u_kboard_objfwd
;
};
#ifdef LISP_FLOAT_TYPE
/* Optional Lisp floating point type */
/* Lisp floating point type */
struct
Lisp_Float
{
Lisp_Object
type
;
/* essentially used for mark-bit
...
...
@@ -1045,7 +1042,6 @@ struct Lisp_Float
#else
#define XFLOAT_DATA(f) (XFLOAT (f)->data)
#endif
#endif
/* LISP_FLOAT_TYPE */