#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. */
#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 \
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. */
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
return val;
}
-#endif /* LISP_FLOAT_TYPE */
-
\f
/***********************************************************************
return new;
}
-#ifdef LISP_FLOAT_TYPE
Lisp_Object
make_pure_float (num)
return new;
}
-#endif /* LISP_FLOAT_TYPE */
-
Lisp_Object
make_pure_vector (len)
EMACS_INT len;
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)),
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),
goto loop;
}
-#ifdef LISP_FLOAT_TYPE
case Lisp_Float:
XMARK (XFLOAT (obj)->type);
break;
-#endif /* LISP_FLOAT_TYPE */
case Lisp_Int:
break;
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 ();
total_free_conses = num_free;
}
-#ifdef LISP_FLOAT_TYPE
/* Put all unmarked floats on free list */
{
register struct float_block *fblk;
total_floats = num_used;
total_free_floats = num_free;
}
-#endif /* LISP_FLOAT_TYPE */
/* Put all unmarked intervals on free list */
{
init_cons ();
init_symbol ();
init_marker ();
-#ifdef LISP_FLOAT_TYPE
init_float ();
-#endif /* LISP_FLOAT_TYPE */
INIT_INTERVALS;
#ifdef REL_ALLOC
{
#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
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;
TOP = (f1 == f2 ? Qt : Qnil);
}
else
-#endif
TOP = (XINT (v1) == XINT (v2) ? Qt : Qnil);
break;
}
#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
/* 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
#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
#endif
#include <math.h>
-#endif /* LISP_FLOAT_TYPE */
#if !defined (atof)
extern double atof ();
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;
return Qhash_table;
return Qvector;
-#ifdef LISP_FLOAT_TYPE
case Lisp_Float:
return Qfloat;
-#endif
default:
abort ();
return Qnil;
}
-#ifdef LISP_FLOAT_TYPE
DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,
"Return t if OBJECT is a floating point number.")
(object)
return Qt;
return Qnil;
}
-#endif /* LISP_FLOAT_TYPE */
+
\f
/* Extract and set components of lists */
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);
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)
{
(number)
register Lisp_Object number;
{
-#ifdef LISP_FLOAT_TYPE
CHECK_NUMBER_OR_FLOAT (number, 0);
if (FLOATP (number))
return Qt;
return Qnil;
}
-#else
- CHECK_NUMBER (number, 0);
-#endif /* LISP_FLOAT_TYPE */
if (!XINT (number))
return Qt;
{
char buffer[VALBITS];
-#ifndef LISP_FLOAT_TYPE
- CHECK_NUMBER (number, 0);
-#else
CHECK_NUMBER_OR_FLOAT (number, 0);
if (FLOATP (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));
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)
{
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))
#undef isnan
#define isnan(x) ((x) != (x))
-#ifdef LISP_FLOAT_TYPE
-
Lisp_Object
float_arith_driver (accum, argnum, code, nargs, args)
double accum;
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.")
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);
(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;
(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;
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");
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");
staticpro (&Qsingularity_error);
staticpro (&Qoverflow_error);
staticpro (&Qunderflow_error);
-#endif /* LISP_FLOAT_TYPE */
staticpro (&Qnil);
staticpro (&Qt);
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);
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);
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)
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)
_start ()
{
#ifdef sun
-#ifdef LISP_FLOAT_TYPE
finitfp_();
-#endif
#endif
/* On 68000, _start pushes a6 onto stack */
start1 ();
/* 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
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);
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. */
init_xdisp ();
init_macros ();
init_editfns ();
-#ifdef LISP_FLOAT_TYPE
init_floatfns ();
-#endif
#ifdef VMS
init_vmsfns ();
#endif /* VMS */
#include "lisp.h"
#include "syssignal.h"
-#ifdef LISP_FLOAT_TYPE
-
#if STDC_HEADERS
#include <float.h>
#endif
return val;
}
-#endif /* LISP_FLOAT_TYPE */
-
/* the rounding functions */
CHECK_NUMBER_OR_FLOAT (divisor, 1);
-#ifdef LISP_FLOAT_TYPE
if (FLOATP (arg) || FLOATP (divisor))
{
double f1, f2;
FLOAT_TO_INT2 (f1, arg, name, arg, divisor);
return arg;
}
-#endif
i1 = XINT (arg);
i2 = XINT (divisor);
return arg;
}
-#ifdef LISP_FLOAT_TYPE
if (FLOATP (arg))
{
double d;
IN_FLOAT (d = (*double_round) (XFLOAT_DATA (arg)), name, arg);
FLOAT_TO_INT (d, arg, name, arg);
}
-#endif
return arg;
}
"truncate");
}
-#ifdef LISP_FLOAT_TYPE
Lisp_Object
fmod_float (x, y)
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);
defsubr (&Sabs);
defsubr (&Sfloat);
defsubr (&Slogb);
-#endif /* LISP_FLOAT_TYPE */
defsubr (&Sceiling);
defsubr (&Sfloor);
defsubr (&Sround);
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))
/* 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
struct Lisp_Kboard_Objfwd u_kboard_objfwd;
};
\f
-#ifdef LISP_FLOAT_TYPE
-/* Optional Lisp floating point type */
+/* Lisp floating point type */
struct Lisp_Float
{
Lisp_Object type; /* essentially used for mark-bit
#else
#define XFLOAT_DATA(f) (XFLOAT (f)->data)
#endif
-#endif /* LISP_FLOAT_TYPE */
/* A character, declared with the following typedef, is a member
of some character set associated with the current buffer. */
#define NILP(x) (XFASTINT (x) == XFASTINT (Qnil))
#define GC_NILP(x) GC_EQ (x, Qnil)
-#ifdef LISP_FLOAT_TYPE
#define NUMBERP(x) (INTEGERP (x) || FLOATP (x))
#define GC_NUMBERP(x) (GC_INTEGERP (x) || GC_FLOATP (x))
-#else
-#define NUMBERP(x) (INTEGERP (x))
-#define GC_NUMBERP(x) (GC_INTEGERP (x))
-#endif
#define NATNUMP(x) (INTEGERP (x) && XINT (x) >= 0)
#define GC_NATNUMP(x) (GC_INTEGERP (x) && XINT (x) >= 0)
#define CONSP(x) (XTYPE ((x)) == Lisp_Cons)
#define GC_CONSP(x) (XGCTYPE ((x)) == Lisp_Cons)
-#ifdef LISP_FLOAT_TYPE
#define FLOATP(x) (XTYPE ((x)) == Lisp_Float)
#define GC_FLOATP(x) (XGCTYPE ((x)) == Lisp_Float)
-#else
-#define FLOATP(x) (0)
-#define GC_FLOATP(x) (0)
-#endif
#define VECTORP(x) (VECTORLIKEP (x) && !(XVECTOR (x)->size & PSEUDOVECTOR_FLAG))
#define GC_VECTORP(x) (GC_VECTORLIKEP (x) && !(XVECTOR (x)->size & PSEUDOVECTOR_FLAG))
#define OVERLAYP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Overlay)
do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \
else if (!INTEGERP ((x))) x = wrong_type_argument (Qinteger_or_marker_p, (x)); } while (0)
-#ifdef LISP_FLOAT_TYPE
-
#define XFLOATINT(n) extract_float((n))
#define CHECK_FLOAT(x, i) \
else if (!INTEGERP (x) && !FLOATP (x)) \
x = wrong_type_argument (Qnumber_or_marker_p, (x)); } while (0)
-#else /* Not LISP_FLOAT_TYPE */
-
-#define CHECK_NUMBER_OR_FLOAT CHECK_NUMBER
-
-#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER CHECK_NUMBER_COERCE_MARKER
-
-#define XFLOATINT(n) XINT((n))
-#endif /* LISP_FLOAT_TYPE */
-
#define CHECK_OVERLAY(x, i) \
do { if (!OVERLAYP ((x))) x = wrong_type_argument (Qoverlayp, (x));} while (0)
extern Lisp_Object Qbuffer_or_string_p;
extern Lisp_Object Qcdr;
-#ifdef LISP_FLOAT_TYPE
extern Lisp_Object Qfloatp, Qinteger_or_floatp, Qinteger_or_float_or_marker_p;
-#endif /* LISP_FLOAT_TYPE */
extern Lisp_Object Qframep;
EXFUN (Fsubrp, 1);
EXFUN (Fchar_or_string_p, 1);
EXFUN (Finteger_or_marker_p, 1);
-#ifdef LISP_FLOAT_TYPE
EXFUN (Ffloatp, 1);
EXFUN (Finteger_or_floatp, 1);
EXFUN (Finteger_or_float_or_marker_p, 1);
-#endif /* LISP_FLOAT_TYPE */
EXFUN (Fcar, 1);
EXFUN (Fcar_safe, 1);
extern void syms_of_fns P_ ((void));
/* Defined in floatfns.c */
-#ifdef LISP_FLOAT_TYPE
extern double extract_float P_ ((Lisp_Object));
EXFUN (Ffloat, 1);
-#endif /* LISP_FLOAT_TYPE */
EXFUN (Ftruncate, 2);
extern void init_floatfns P_ ((void));
extern void syms_of_floatfns P_ ((void));
extern Lisp_Object Qchar_table_extra_slots;
extern struct Lisp_Vector *allocate_vectorlike P_ ((EMACS_INT));
extern int gc_in_progress;
-#ifdef LISP_FLOAT_TYPE
extern Lisp_Object make_float P_ ((double));
-#endif /* LISP_FLOAT_TYPE */
extern void display_malloc_warning P_ ((void));
extern int inhibit_garbage_collection P_ ((void));
extern void free_marker P_ ((Lisp_Object));
#include <errno.h>
#include "lisp.h"
#include "intervals.h"
-
-#ifndef standalone
#include "buffer.h"
#include "charset.h"
#include <epaths.h>
#include "commands.h"
#include "keyboard.h"
#include "termhooks.h"
-#endif
#ifdef lint
#include <sys/inode.h>
#define X_OK 01
#endif
-#ifdef LISP_FLOAT_TYPE
#include <math.h>
-#endif /* LISP_FLOAT_TYPE */
#ifdef HAVE_SETLOCALE
#include <locale.h>
input_method)
int no_switch_frame, ascii_required, error_nonascii, input_method;
{
-#ifdef standalone
- return make_number (getchar ());
-#else
register Lisp_Object val, delayed_switch_frame;
delayed_switch_frame = Qnil;
unread_switch_frame = delayed_switch_frame;
return val;
-#endif
}
DEFUN ("read-char", Fread_char, Sread_char, 0, 2, 0,
unbind_to (count, Qnil);
}
-#ifndef standalone
-
DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "",
"Execute the current buffer as Lisp code.\n\
Programs can pass two arguments, BUFFER and PRINTFLAG.\n\
return unbind_to (count, Qnil);
}
-#endif /* standalone */
\f
DEFUN ("read", Fread, Sread, 0, 1, 0,
"Read one Lisp expression as text from STREAM, return as Lisp object.\n\
new_backquote_flag = 0;
read_objects = Qnil;
-#ifndef standalone
if (EQ (stream, Qread_char))
return Fread_minibuffer (build_string ("Lisp expression: "), Qnil);
-#endif
if (STRINGP (stream))
return Fcar (Fread_from_string (stream, Qnil, Qnil));
case '.':
{
-#ifdef LISP_FLOAT_TYPE
/* If a period is followed by a number, then we should read it
as a floating point number. Otherwise, it denotes a dotted
pair. */
UNREAD (next_char);
if (! (next_char >= '0' && next_char <= '9'))
-#endif
{
*pch = c;
return Qnil;
while (c > 040
&& !(c == '\"' || c == '\'' || c == ';' || c == '?'
|| c == '(' || c == ')'
-#ifndef LISP_FLOAT_TYPE
- /* If we have floating-point support, then we need
- to allow <digits><dot><digits>. */
- || c =='.'
-#endif /* not LISP_FLOAT_TYPE */
|| c == '[' || c == ']' || c == '#'
))
{
if (p1 != p)
{
while (p1 != p && (c = *p1) >= '0' && c <= '9') p1++;
-#ifdef LISP_FLOAT_TYPE
/* Integers can have trailing decimal points. */
if (p1 > read_buffer && p1 < p && *p1 == '.') p1++;
-#endif
if (p1 == p)
/* It is an integer. */
{
-#ifdef LISP_FLOAT_TYPE
if (p1[-1] == '.')
p1[-1] = '\0';
-#endif
if (sizeof (int) == sizeof (EMACS_INT))
XSETINT (val, atoi (read_buffer));
else if (sizeof (long) == sizeof (EMACS_INT))
return val;
}
}
-#ifdef LISP_FLOAT_TYPE
if (isfloat_string (read_buffer))
{
/* Compute NaN and infinities using 0.0 in a variable,
return make_float (negative ? - value : value);
}
-#endif
}
if (uninterned_symbol)
}
\f
-#ifdef LISP_FLOAT_TYPE
-
#define LEAD_INT 1
#define DOT_CHAR 2
#define TRAIL_INT 4
|| state == (LEAD_INT|DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT)
|| state == (DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT)));
}
-#endif /* LISP_FLOAT_TYPE */
+
\f
static Lisp_Object
read_vector (readcharfun, bytecodeflag)
staticpro (address);
}
-#ifndef standalone
-
/* Similar but define a variable whose value is the Lisp Object stored in
the current buffer. address is the address of the slot in the buffer
that is current now. */
abort ();
}
-#endif /* standalone */
/* Similar but define a variable whose value is the Lisp Object stored
at a particular offset in the current kboard object. */
/* These are used to print like we read. */
extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction;
-#ifdef LISP_FLOAT_TYPE
Lisp_Object Vfloat_output_format, Qfloat_output_format;
/* Work around a problem that happens because math.h on hpux 7
#define DOUBLE_DIGITS_BOUND ((int) ceil (log10 (pow (FLT_RADIX, DBL_MANT_DIG))))
#endif
-#endif /* LISP_FLOAT_TYPE */
-
/* Avoid actual stack overflow in print. */
int print_depth;
UNGCPRO;
}
\f
-#ifdef LISP_FLOAT_TYPE
/*
* The buffer should be at least as large as the max string size of the
}
}
}
-#endif /* LISP_FLOAT_TYPE */
+
\f
static void
print (obj, printcharfun, escapeflag)
strout (buf, -1, -1, printcharfun, 0);
break;
-#ifdef LISP_FLOAT_TYPE
case Lisp_Float:
{
char pigbuf[350]; /* see comments in float_to_string */
strout (pigbuf, -1, -1, printcharfun, 0);
}
break;
-#endif
case Lisp_String:
if (!escapeflag)
Qstandard_output = intern ("standard-output");
staticpro (&Qstandard_output);
-#ifdef LISP_FLOAT_TYPE
DEFVAR_LISP ("float-output-format", &Vfloat_output_format,
"The format descriptor string used to print floats.\n\
This is a %-spec like those accepted by `printf' in C,\n\
Vfloat_output_format = Qnil;
Qfloat_output_format = intern ("float-output-format");
staticpro (&Qfloat_output_format);
-#endif /* LISP_FLOAT_TYPE */
DEFVAR_LISP ("print-length", &Vprint_length,
"Maximum length of list to print before abbreviating.\n\