aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c88
1 files changed, 29 insertions, 59 deletions
diff --git a/src/data.c b/src/data.c
index d44176d9b01..156c900933f 100644
--- a/src/data.c
+++ b/src/data.c
@@ -50,7 +50,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
50#include <math.h> 50#include <math.h>
51 51
52#if !defined (atof) 52#if !defined (atof)
53extern double atof (); 53extern double atof (const char *);
54#endif /* !atof */ 54#endif /* !atof */
55 55
56Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; 56Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound;
@@ -97,16 +97,14 @@ Lisp_Object Vmost_positive_fixnum, Vmost_negative_fixnum;
97 97
98 98
99void 99void
100circular_list_error (list) 100circular_list_error (Lisp_Object list)
101 Lisp_Object list;
102{ 101{
103 xsignal (Qcircular_list, list); 102 xsignal (Qcircular_list, list);
104} 103}
105 104
106 105
107Lisp_Object 106Lisp_Object
108wrong_type_argument (predicate, value) 107wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)
109 register Lisp_Object predicate, value;
110{ 108{
111 /* If VALUE is not even a valid Lisp object, we'd want to abort here 109 /* If VALUE is not even a valid Lisp object, we'd want to abort here
112 where we can get a backtrace showing where it came from. We used 110 where we can get a backtrace showing where it came from. We used
@@ -119,21 +117,19 @@ wrong_type_argument (predicate, value)
119} 117}
120 118
121void 119void
122pure_write_error () 120pure_write_error (void)
123{ 121{
124 error ("Attempt to modify read-only object"); 122 error ("Attempt to modify read-only object");
125} 123}
126 124
127void 125void
128args_out_of_range (a1, a2) 126args_out_of_range (Lisp_Object a1, Lisp_Object a2)
129 Lisp_Object a1, a2;
130{ 127{
131 xsignal2 (Qargs_out_of_range, a1, a2); 128 xsignal2 (Qargs_out_of_range, a1, a2);
132} 129}
133 130
134void 131void
135args_out_of_range_3 (a1, a2, a3) 132args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
136 Lisp_Object a1, a2, a3;
137{ 133{
138 xsignal3 (Qargs_out_of_range, a1, a2, a3); 134 xsignal3 (Qargs_out_of_range, a1, a2, a3);
139} 135}
@@ -146,8 +142,7 @@ int sign_extend_temp;
146/* On a few machines, XINT can only be done by calling this. */ 142/* On a few machines, XINT can only be done by calling this. */
147 143
148int 144int
149sign_extend_lisp_int (num) 145sign_extend_lisp_int (EMACS_INT num)
150 EMACS_INT num;
151{ 146{
152 if (num & (((EMACS_INT) 1) << (VALBITS - 1))) 147 if (num & (((EMACS_INT) 1) << (VALBITS - 1)))
153 return num | (((EMACS_INT) (-1)) << VALBITS); 148 return num | (((EMACS_INT) (-1)) << VALBITS);
@@ -840,8 +835,7 @@ Value, if non-nil, is a list \(interactive SPEC). */)
840 indirections contains a loop. */ 835 indirections contains a loop. */
841 836
842struct Lisp_Symbol * 837struct Lisp_Symbol *
843indirect_variable (symbol) 838indirect_variable (struct Lisp_Symbol *symbol)
844 struct Lisp_Symbol *symbol;
845{ 839{
846 struct Lisp_Symbol *tortoise, *hare; 840 struct Lisp_Symbol *tortoise, *hare;
847 841
@@ -892,8 +886,7 @@ variable chain of symbols. */)
892 ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) 886 ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv))
893 887
894Lisp_Object 888Lisp_Object
895do_symval_forwarding (valcontents) 889do_symval_forwarding (register union Lisp_Fwd *valcontents)
896 register union Lisp_Fwd *valcontents;
897{ 890{
898 register Lisp_Object val; 891 register Lisp_Object val;
899 switch (XFWDTYPE (valcontents)) 892 switch (XFWDTYPE (valcontents))
@@ -947,11 +940,11 @@ do_symval_forwarding (valcontents)
947 } while (0) 940 } while (0)
948 941
949static void 942static void
950store_symval_forwarding (/* symbol, */ valcontents, newval, buf) 943store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf)
951 /* struct Lisp_Symbol *symbol; */ 944 /* struct Lisp_Symbol *symbol; */
952 union Lisp_Fwd *valcontents; 945
953 register Lisp_Object newval; 946
954 struct buffer *buf; 947
955{ 948{
956 switch (XFWDTYPE (valcontents)) 949 switch (XFWDTYPE (valcontents))
957 { 950 {
@@ -1032,8 +1025,7 @@ store_symval_forwarding (/* symbol, */ valcontents, newval, buf)
1032 This makes it safe to alter the status of other bindings. */ 1025 This makes it safe to alter the status of other bindings. */
1033 1026
1034void 1027void
1035swap_in_global_binding (symbol) 1028swap_in_global_binding (struct Lisp_Symbol *symbol)
1036 struct Lisp_Symbol *symbol;
1037{ 1029{
1038 struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol); 1030 struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol);
1039 1031
@@ -1059,9 +1051,7 @@ swap_in_global_binding (symbol)
1059 This could be another forwarding pointer. */ 1051 This could be another forwarding pointer. */
1060 1052
1061static void 1053static void
1062swap_in_symval_forwarding (symbol, blv) 1054swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_Value *blv)
1063 struct Lisp_Symbol *symbol;
1064 struct Lisp_Buffer_Local_Value *blv;
1065{ 1055{
1066 register Lisp_Object tem1; 1056 register Lisp_Object tem1;
1067 1057
@@ -1111,8 +1101,7 @@ swap_in_symval_forwarding (symbol, blv)
1111 within this function. Great care is required for this. */ 1101 within this function. Great care is required for this. */
1112 1102
1113Lisp_Object 1103Lisp_Object
1114find_symbol_value (symbol) 1104find_symbol_value (Lisp_Object symbol)
1115 Lisp_Object symbol;
1116{ 1105{
1117 struct Lisp_Symbol *sym; 1106 struct Lisp_Symbol *sym;
1118 1107
@@ -1183,8 +1172,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol)
1183} 1172}
1184 1173
1185static int 1174static int
1186let_shadows_global_binding_p (symbol) 1175let_shadows_global_binding_p (Lisp_Object symbol)
1187 Lisp_Object symbol;
1188{ 1176{
1189 struct specbinding *p; 1177 struct specbinding *p;
1190 1178
@@ -1204,9 +1192,7 @@ let_shadows_global_binding_p (symbol)
1204 If BINDFLAG is nonzero, we don't do that. */ 1192 If BINDFLAG is nonzero, we don't do that. */
1205 1193
1206void 1194void
1207set_internal (symbol, newval, where, bindflag) 1195set_internal (register Lisp_Object symbol, register Lisp_Object newval, register Lisp_Object where, int bindflag)
1208 register Lisp_Object symbol, newval, where;
1209 int bindflag;
1210{ 1196{
1211 int voide = EQ (newval, Qunbound); 1197 int voide = EQ (newval, Qunbound);
1212 struct Lisp_Symbol *sym; 1198 struct Lisp_Symbol *sym;
@@ -1357,8 +1343,7 @@ set_internal (symbol, newval, where, bindflag)
1357 Return Qunbound if it is void. */ 1343 Return Qunbound if it is void. */
1358 1344
1359Lisp_Object 1345Lisp_Object
1360default_value (symbol) 1346default_value (Lisp_Object symbol)
1361 Lisp_Object symbol;
1362{ 1347{
1363 struct Lisp_Symbol *sym; 1348 struct Lisp_Symbol *sym;
1364 1349
@@ -2109,8 +2094,7 @@ selected frame's terminal device). */)
2109 This is like Findirect_function, except that it doesn't signal an 2094 This is like Findirect_function, except that it doesn't signal an
2110 error if the chain ends up unbound. */ 2095 error if the chain ends up unbound. */
2111Lisp_Object 2096Lisp_Object
2112indirect_function (object) 2097indirect_function (register Lisp_Object object)
2113 register Lisp_Object object;
2114{ 2098{
2115 Lisp_Object tortoise, hare; 2099 Lisp_Object tortoise, hare;
2116 2100
@@ -2326,9 +2310,7 @@ bool-vector. IDX starts at 0. */)
2326enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; 2310enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal };
2327 2311
2328Lisp_Object 2312Lisp_Object
2329arithcompare (num1, num2, comparison) 2313arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison)
2330 Lisp_Object num1, num2;
2331 enum comparison comparison;
2332{ 2314{
2333 double f1 = 0, f2 = 0; 2315 double f1 = 0, f2 = 0;
2334 int floatp = 0; 2316 int floatp = 0;
@@ -2454,8 +2436,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0,
2454 when the value fits in one. */ 2436 when the value fits in one. */
2455 2437
2456Lisp_Object 2438Lisp_Object
2457long_to_cons (i) 2439long_to_cons (long unsigned int i)
2458 unsigned long i;
2459{ 2440{
2460 unsigned long top = i >> 16; 2441 unsigned long top = i >> 16;
2461 unsigned int bot = i & 0xFFFF; 2442 unsigned int bot = i & 0xFFFF;
@@ -2467,8 +2448,7 @@ long_to_cons (i)
2467} 2448}
2468 2449
2469unsigned long 2450unsigned long
2470cons_to_long (c) 2451cons_to_long (Lisp_Object c)
2471 Lisp_Object c;
2472{ 2452{
2473 Lisp_Object top, bot; 2453 Lisp_Object top, bot;
2474 if (INTEGERP (c)) 2454 if (INTEGERP (c))
@@ -2509,8 +2489,7 @@ NUMBER may be an integer or a floating point number. */)
2509} 2489}
2510 2490
2511INLINE static int 2491INLINE static int
2512digit_to_number (character, base) 2492digit_to_number (int character, int base)
2513 int character, base;
2514{ 2493{
2515 int digit; 2494 int digit;
2516 2495
@@ -2610,10 +2589,7 @@ static Lisp_Object float_arith_driver (double, int, enum arithop,
2610extern Lisp_Object fmod_float (); 2589extern Lisp_Object fmod_float ();
2611 2590
2612Lisp_Object 2591Lisp_Object
2613arith_driver (code, nargs, args) 2592arith_driver (enum arithop code, int nargs, register Lisp_Object *args)
2614 enum arithop code;
2615 int nargs;
2616 register Lisp_Object *args;
2617{ 2593{
2618 register Lisp_Object val; 2594 register Lisp_Object val;
2619 register int argnum; 2595 register int argnum;
@@ -2698,12 +2674,7 @@ arith_driver (code, nargs, args)
2698#define isnan(x) ((x) != (x)) 2674#define isnan(x) ((x) != (x))
2699 2675
2700static Lisp_Object 2676static Lisp_Object
2701float_arith_driver (accum, argnum, code, nargs, args) 2677float_arith_driver (double accum, register int argnum, enum arithop code, int nargs, register Lisp_Object *args)
2702 double accum;
2703 register int argnum;
2704 enum arithop code;
2705 int nargs;
2706 register Lisp_Object *args;
2707{ 2678{
2708 register Lisp_Object val; 2679 register Lisp_Object val;
2709 double next; 2680 double next;
@@ -3038,7 +3009,7 @@ lowercase l) for small endian machines. */)
3038 3009
3039 3010
3040void 3011void
3041syms_of_data () 3012syms_of_data (void)
3042{ 3013{
3043 Lisp_Object error_tail, arith_tail; 3014 Lisp_Object error_tail, arith_tail;
3044 3015
@@ -3467,8 +3438,7 @@ syms_of_data ()
3467} 3438}
3468 3439
3469SIGTYPE 3440SIGTYPE
3470arith_error (signo) 3441arith_error (int signo)
3471 int signo;
3472{ 3442{
3473 sigsetmask (SIGEMPTYMASK); 3443 sigsetmask (SIGEMPTYMASK);
3474 3444
@@ -3477,7 +3447,7 @@ arith_error (signo)
3477} 3447}
3478 3448
3479void 3449void
3480init_data () 3450init_data (void)
3481{ 3451{
3482 /* Don't do this if just dumping out. 3452 /* Don't do this if just dumping out.
3483 We don't want to call `signal' in this case 3453 We don't want to call `signal' in this case