aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorGerd Moellmann2000-02-17 09:45:46 +0000
committerGerd Moellmann2000-02-17 09:45:46 +0000
commitcc94f3b24e447e04da3e899af8909cb77d648ef0 (patch)
tree9dc9189ad96dec0e5237e9fd36a6baf505c9eb7d /src/lread.c
parent10689a01d99ab2f3382bb7ef3912961ec08f8bb9 (diff)
downloademacs-cc94f3b24e447e04da3e899af8909cb77d648ef0.tar.gz
emacs-cc94f3b24e447e04da3e899af8909cb77d648ef0.zip
Remove `LISP_FLOAT_TYPE' and `standalone'.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/lread.c b/src/lread.c
index efc2b3149b2..8b2564c3792 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -31,15 +31,12 @@ Boston, MA 02111-1307, USA. */
31#include <errno.h> 31#include <errno.h>
32#include "lisp.h" 32#include "lisp.h"
33#include "intervals.h" 33#include "intervals.h"
34
35#ifndef standalone
36#include "buffer.h" 34#include "buffer.h"
37#include "charset.h" 35#include "charset.h"
38#include <epaths.h> 36#include <epaths.h>
39#include "commands.h" 37#include "commands.h"
40#include "keyboard.h" 38#include "keyboard.h"
41#include "termhooks.h" 39#include "termhooks.h"
42#endif
43 40
44#ifdef lint 41#ifdef lint
45#include <sys/inode.h> 42#include <sys/inode.h>
@@ -60,9 +57,7 @@ Boston, MA 02111-1307, USA. */
60#define X_OK 01 57#define X_OK 01
61#endif 58#endif
62 59
63#ifdef LISP_FLOAT_TYPE
64#include <math.h> 60#include <math.h>
65#endif /* LISP_FLOAT_TYPE */
66 61
67#ifdef HAVE_SETLOCALE 62#ifdef HAVE_SETLOCALE
68#include <locale.h> 63#include <locale.h>
@@ -408,9 +403,6 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
408 input_method) 403 input_method)
409 int no_switch_frame, ascii_required, error_nonascii, input_method; 404 int no_switch_frame, ascii_required, error_nonascii, input_method;
410{ 405{
411#ifdef standalone
412 return make_number (getchar ());
413#else
414 register Lisp_Object val, delayed_switch_frame; 406 register Lisp_Object val, delayed_switch_frame;
415 407
416 delayed_switch_frame = Qnil; 408 delayed_switch_frame = Qnil;
@@ -471,7 +463,6 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
471 unread_switch_frame = delayed_switch_frame; 463 unread_switch_frame = delayed_switch_frame;
472 464
473 return val; 465 return val;
474#endif
475} 466}
476 467
477DEFUN ("read-char", Fread_char, Sread_char, 0, 2, 0, 468DEFUN ("read-char", Fread_char, Sread_char, 0, 2, 0,
@@ -1130,8 +1121,6 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag, unibyte, read
1130 unbind_to (count, Qnil); 1121 unbind_to (count, Qnil);
1131} 1122}
1132 1123
1133#ifndef standalone
1134
1135DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "", 1124DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "",
1136 "Execute the current buffer as Lisp code.\n\ 1125 "Execute the current buffer as Lisp code.\n\
1137Programs can pass two arguments, BUFFER and PRINTFLAG.\n\ 1126Programs can pass two arguments, BUFFER and PRINTFLAG.\n\
@@ -1246,7 +1235,6 @@ This function does not move point.")
1246 return unbind_to (count, Qnil); 1235 return unbind_to (count, Qnil);
1247} 1236}
1248 1237
1249#endif /* standalone */
1250 1238
1251DEFUN ("read", Fread, Sread, 0, 1, 0, 1239DEFUN ("read", Fread, Sread, 0, 1, 0,
1252 "Read one Lisp expression as text from STREAM, return as Lisp object.\n\ 1240 "Read one Lisp expression as text from STREAM, return as Lisp object.\n\
@@ -1272,10 +1260,8 @@ STREAM or the value of `standard-input' may be:\n\
1272 new_backquote_flag = 0; 1260 new_backquote_flag = 0;
1273 read_objects = Qnil; 1261 read_objects = Qnil;
1274 1262
1275#ifndef standalone
1276 if (EQ (stream, Qread_char)) 1263 if (EQ (stream, Qread_char))
1277 return Fread_minibuffer (build_string ("Lisp expression: "), Qnil); 1264 return Fread_minibuffer (build_string ("Lisp expression: "), Qnil);
1278#endif
1279 1265
1280 if (STRINGP (stream)) 1266 if (STRINGP (stream))
1281 return Fcar (Fread_from_string (stream, Qnil, Qnil)); 1267 return Fcar (Fread_from_string (stream, Qnil, Qnil));
@@ -2004,7 +1990,6 @@ read1 (readcharfun, pch, first_in_list)
2004 1990
2005 case '.': 1991 case '.':
2006 { 1992 {
2007#ifdef LISP_FLOAT_TYPE
2008 /* If a period is followed by a number, then we should read it 1993 /* If a period is followed by a number, then we should read it
2009 as a floating point number. Otherwise, it denotes a dotted 1994 as a floating point number. Otherwise, it denotes a dotted
2010 pair. */ 1995 pair. */
@@ -2012,7 +1997,6 @@ read1 (readcharfun, pch, first_in_list)
2012 UNREAD (next_char); 1997 UNREAD (next_char);
2013 1998
2014 if (! (next_char >= '0' && next_char <= '9')) 1999 if (! (next_char >= '0' && next_char <= '9'))
2015#endif
2016 { 2000 {
2017 *pch = c; 2001 *pch = c;
2018 return Qnil; 2002 return Qnil;
@@ -2035,11 +2019,6 @@ read1 (readcharfun, pch, first_in_list)
2035 while (c > 040 2019 while (c > 040
2036 && !(c == '\"' || c == '\'' || c == ';' || c == '?' 2020 && !(c == '\"' || c == '\'' || c == ';' || c == '?'
2037 || c == '(' || c == ')' 2021 || c == '(' || c == ')'
2038#ifndef LISP_FLOAT_TYPE
2039 /* If we have floating-point support, then we need
2040 to allow <digits><dot><digits>. */
2041 || c =='.'
2042#endif /* not LISP_FLOAT_TYPE */
2043 || c == '[' || c == ']' || c == '#' 2022 || c == '[' || c == ']' || c == '#'
2044 )) 2023 ))
2045 { 2024 {
@@ -2086,17 +2065,13 @@ read1 (readcharfun, pch, first_in_list)
2086 if (p1 != p) 2065 if (p1 != p)
2087 { 2066 {
2088 while (p1 != p && (c = *p1) >= '0' && c <= '9') p1++; 2067 while (p1 != p && (c = *p1) >= '0' && c <= '9') p1++;
2089#ifdef LISP_FLOAT_TYPE
2090 /* Integers can have trailing decimal points. */ 2068 /* Integers can have trailing decimal points. */
2091 if (p1 > read_buffer && p1 < p && *p1 == '.') p1++; 2069 if (p1 > read_buffer && p1 < p && *p1 == '.') p1++;
2092#endif
2093 if (p1 == p) 2070 if (p1 == p)
2094 /* It is an integer. */ 2071 /* It is an integer. */
2095 { 2072 {
2096#ifdef LISP_FLOAT_TYPE
2097 if (p1[-1] == '.') 2073 if (p1[-1] == '.')
2098 p1[-1] = '\0'; 2074 p1[-1] = '\0';
2099#endif
2100 if (sizeof (int) == sizeof (EMACS_INT)) 2075 if (sizeof (int) == sizeof (EMACS_INT))
2101 XSETINT (val, atoi (read_buffer)); 2076 XSETINT (val, atoi (read_buffer));
2102 else if (sizeof (long) == sizeof (EMACS_INT)) 2077 else if (sizeof (long) == sizeof (EMACS_INT))
@@ -2106,7 +2081,6 @@ read1 (readcharfun, pch, first_in_list)
2106 return val; 2081 return val;
2107 } 2082 }
2108 } 2083 }
2109#ifdef LISP_FLOAT_TYPE
2110 if (isfloat_string (read_buffer)) 2084 if (isfloat_string (read_buffer))
2111 { 2085 {
2112 /* Compute NaN and infinities using 0.0 in a variable, 2086 /* Compute NaN and infinities using 0.0 in a variable,
@@ -2139,7 +2113,6 @@ read1 (readcharfun, pch, first_in_list)
2139 2113
2140 return make_float (negative ? - value : value); 2114 return make_float (negative ? - value : value);
2141 } 2115 }
2142#endif
2143 } 2116 }
2144 2117
2145 if (uninterned_symbol) 2118 if (uninterned_symbol)
@@ -2271,8 +2244,6 @@ substitute_in_interval (interval, arg)
2271} 2244}
2272 2245
2273 2246
2274#ifdef LISP_FLOAT_TYPE
2275
2276#define LEAD_INT 1 2247#define LEAD_INT 1
2277#define DOT_CHAR 2 2248#define DOT_CHAR 2
2278#define TRAIL_INT 4 2249#define TRAIL_INT 4
@@ -2342,7 +2313,7 @@ isfloat_string (cp)
2342 || state == (LEAD_INT|DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT) 2313 || state == (LEAD_INT|DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT)
2343 || state == (DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT))); 2314 || state == (DOT_CHAR|TRAIL_INT|E_CHAR|EXP_INT)));
2344} 2315}
2345#endif /* LISP_FLOAT_TYPE */ 2316
2346 2317
2347static Lisp_Object 2318static Lisp_Object
2348read_vector (readcharfun, bytecodeflag) 2319read_vector (readcharfun, bytecodeflag)
@@ -3022,8 +2993,6 @@ defvar_lisp (namestring, address)
3022 staticpro (address); 2993 staticpro (address);
3023} 2994}
3024 2995
3025#ifndef standalone
3026
3027/* Similar but define a variable whose value is the Lisp Object stored in 2996/* Similar but define a variable whose value is the Lisp Object stored in
3028 the current buffer. address is the address of the slot in the buffer 2997 the current buffer. address is the address of the slot in the buffer
3029 that is current now. */ 2998 that is current now. */
@@ -3054,7 +3023,6 @@ defvar_per_buffer (namestring, address, type, doc)
3054 abort (); 3023 abort ();
3055} 3024}
3056 3025
3057#endif /* standalone */
3058 3026
3059/* Similar but define a variable whose value is the Lisp Object stored 3027/* Similar but define a variable whose value is the Lisp Object stored
3060 at a particular offset in the current kboard object. */ 3028 at a particular offset in the current kboard object. */