diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 400 |
1 files changed, 129 insertions, 271 deletions
diff --git a/src/data.c b/src/data.c index 93cc57e9f2c..630d341a20e 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) |
| 53 | extern double atof (); | 53 | extern double atof (const char *); |
| 54 | #endif /* !atof */ | 54 | #endif /* !atof */ |
| 55 | 55 | ||
| 56 | Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; | 56 | Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; |
| @@ -82,7 +82,8 @@ Lisp_Object Qnumberp, Qnumber_or_marker_p; | |||
| 82 | 82 | ||
| 83 | Lisp_Object Qinteger; | 83 | Lisp_Object Qinteger; |
| 84 | static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; | 84 | static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; |
| 85 | static Lisp_Object Qfloat, Qwindow_configuration, Qwindow; | 85 | Lisp_Object Qwindow; |
| 86 | static Lisp_Object Qfloat, Qwindow_configuration; | ||
| 86 | Lisp_Object Qprocess; | 87 | Lisp_Object Qprocess; |
| 87 | static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; | 88 | static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; |
| 88 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; | 89 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; |
| @@ -97,16 +98,14 @@ Lisp_Object Vmost_positive_fixnum, Vmost_negative_fixnum; | |||
| 97 | 98 | ||
| 98 | 99 | ||
| 99 | void | 100 | void |
| 100 | circular_list_error (list) | 101 | circular_list_error (Lisp_Object list) |
| 101 | Lisp_Object list; | ||
| 102 | { | 102 | { |
| 103 | xsignal (Qcircular_list, list); | 103 | xsignal (Qcircular_list, list); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | 106 | ||
| 107 | Lisp_Object | 107 | Lisp_Object |
| 108 | wrong_type_argument (predicate, value) | 108 | wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) |
| 109 | register Lisp_Object predicate, value; | ||
| 110 | { | 109 | { |
| 111 | /* If VALUE is not even a valid Lisp object, we'd want to abort here | 110 | /* 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 | 111 | where we can get a backtrace showing where it came from. We used |
| @@ -119,21 +118,19 @@ wrong_type_argument (predicate, value) | |||
| 119 | } | 118 | } |
| 120 | 119 | ||
| 121 | void | 120 | void |
| 122 | pure_write_error () | 121 | pure_write_error (void) |
| 123 | { | 122 | { |
| 124 | error ("Attempt to modify read-only object"); | 123 | error ("Attempt to modify read-only object"); |
| 125 | } | 124 | } |
| 126 | 125 | ||
| 127 | void | 126 | void |
| 128 | args_out_of_range (a1, a2) | 127 | args_out_of_range (Lisp_Object a1, Lisp_Object a2) |
| 129 | Lisp_Object a1, a2; | ||
| 130 | { | 128 | { |
| 131 | xsignal2 (Qargs_out_of_range, a1, a2); | 129 | xsignal2 (Qargs_out_of_range, a1, a2); |
| 132 | } | 130 | } |
| 133 | 131 | ||
| 134 | void | 132 | void |
| 135 | args_out_of_range_3 (a1, a2, a3) | 133 | args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3) |
| 136 | Lisp_Object a1, a2, a3; | ||
| 137 | { | 134 | { |
| 138 | xsignal3 (Qargs_out_of_range, a1, a2, a3); | 135 | xsignal3 (Qargs_out_of_range, a1, a2, a3); |
| 139 | } | 136 | } |
| @@ -146,8 +143,7 @@ int sign_extend_temp; | |||
| 146 | /* On a few machines, XINT can only be done by calling this. */ | 143 | /* On a few machines, XINT can only be done by calling this. */ |
| 147 | 144 | ||
| 148 | int | 145 | int |
| 149 | sign_extend_lisp_int (num) | 146 | sign_extend_lisp_int (EMACS_INT num) |
| 150 | EMACS_INT num; | ||
| 151 | { | 147 | { |
| 152 | if (num & (((EMACS_INT) 1) << (VALBITS - 1))) | 148 | if (num & (((EMACS_INT) 1) << (VALBITS - 1))) |
| 153 | return num | (((EMACS_INT) (-1)) << VALBITS); | 149 | return num | (((EMACS_INT) (-1)) << VALBITS); |
| @@ -159,8 +155,7 @@ sign_extend_lisp_int (num) | |||
| 159 | 155 | ||
| 160 | DEFUN ("eq", Feq, Seq, 2, 2, 0, | 156 | DEFUN ("eq", Feq, Seq, 2, 2, 0, |
| 161 | doc: /* Return t if the two args are the same Lisp object. */) | 157 | doc: /* Return t if the two args are the same Lisp object. */) |
| 162 | (obj1, obj2) | 158 | (Lisp_Object obj1, Lisp_Object obj2) |
| 163 | Lisp_Object obj1, obj2; | ||
| 164 | { | 159 | { |
| 165 | if (EQ (obj1, obj2)) | 160 | if (EQ (obj1, obj2)) |
| 166 | return Qt; | 161 | return Qt; |
| @@ -169,8 +164,7 @@ DEFUN ("eq", Feq, Seq, 2, 2, 0, | |||
| 169 | 164 | ||
| 170 | DEFUN ("null", Fnull, Snull, 1, 1, 0, | 165 | DEFUN ("null", Fnull, Snull, 1, 1, 0, |
| 171 | doc: /* Return t if OBJECT is nil. */) | 166 | doc: /* Return t if OBJECT is nil. */) |
| 172 | (object) | 167 | (Lisp_Object object) |
| 173 | Lisp_Object object; | ||
| 174 | { | 168 | { |
| 175 | if (NILP (object)) | 169 | if (NILP (object)) |
| 176 | return Qt; | 170 | return Qt; |
| @@ -181,8 +175,7 @@ DEFUN ("type-of", Ftype_of, Stype_of, 1, 1, 0, | |||
| 181 | doc: /* Return a symbol representing the type of OBJECT. | 175 | doc: /* Return a symbol representing the type of OBJECT. |
| 182 | The symbol returned names the object's basic type; | 176 | The symbol returned names the object's basic type; |
| 183 | for example, (type-of 1) returns `integer'. */) | 177 | for example, (type-of 1) returns `integer'. */) |
| 184 | (object) | 178 | (Lisp_Object object) |
| 185 | Lisp_Object object; | ||
| 186 | { | 179 | { |
| 187 | switch (XTYPE (object)) | 180 | switch (XTYPE (object)) |
| 188 | { | 181 | { |
| @@ -249,8 +242,7 @@ for example, (type-of 1) returns `integer'. */) | |||
| 249 | 242 | ||
| 250 | DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, | 243 | DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, |
| 251 | doc: /* Return t if OBJECT is a cons cell. */) | 244 | doc: /* Return t if OBJECT is a cons cell. */) |
| 252 | (object) | 245 | (Lisp_Object object) |
| 253 | Lisp_Object object; | ||
| 254 | { | 246 | { |
| 255 | if (CONSP (object)) | 247 | if (CONSP (object)) |
| 256 | return Qt; | 248 | return Qt; |
| @@ -259,8 +251,7 @@ DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, | |||
| 259 | 251 | ||
| 260 | DEFUN ("atom", Fatom, Satom, 1, 1, 0, | 252 | DEFUN ("atom", Fatom, Satom, 1, 1, 0, |
| 261 | doc: /* Return t if OBJECT is not a cons cell. This includes nil. */) | 253 | doc: /* Return t if OBJECT is not a cons cell. This includes nil. */) |
| 262 | (object) | 254 | (Lisp_Object object) |
| 263 | Lisp_Object object; | ||
| 264 | { | 255 | { |
| 265 | if (CONSP (object)) | 256 | if (CONSP (object)) |
| 266 | return Qnil; | 257 | return Qnil; |
| @@ -270,8 +261,7 @@ DEFUN ("atom", Fatom, Satom, 1, 1, 0, | |||
| 270 | DEFUN ("listp", Flistp, Slistp, 1, 1, 0, | 261 | DEFUN ("listp", Flistp, Slistp, 1, 1, 0, |
| 271 | doc: /* Return t if OBJECT is a list, that is, a cons cell or nil. | 262 | doc: /* Return t if OBJECT is a list, that is, a cons cell or nil. |
| 272 | Otherwise, return nil. */) | 263 | Otherwise, return nil. */) |
| 273 | (object) | 264 | (Lisp_Object object) |
| 274 | Lisp_Object object; | ||
| 275 | { | 265 | { |
| 276 | if (CONSP (object) || NILP (object)) | 266 | if (CONSP (object) || NILP (object)) |
| 277 | return Qt; | 267 | return Qt; |
| @@ -280,8 +270,7 @@ Otherwise, return nil. */) | |||
| 280 | 270 | ||
| 281 | DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, | 271 | DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, |
| 282 | doc: /* Return t if OBJECT is not a list. Lists include nil. */) | 272 | doc: /* Return t if OBJECT is not a list. Lists include nil. */) |
| 283 | (object) | 273 | (Lisp_Object object) |
| 284 | Lisp_Object object; | ||
| 285 | { | 274 | { |
| 286 | if (CONSP (object) || NILP (object)) | 275 | if (CONSP (object) || NILP (object)) |
| 287 | return Qnil; | 276 | return Qnil; |
| @@ -290,8 +279,7 @@ DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, | |||
| 290 | 279 | ||
| 291 | DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, | 280 | DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, |
| 292 | doc: /* Return t if OBJECT is a symbol. */) | 281 | doc: /* Return t if OBJECT is a symbol. */) |
| 293 | (object) | 282 | (Lisp_Object object) |
| 294 | Lisp_Object object; | ||
| 295 | { | 283 | { |
| 296 | if (SYMBOLP (object)) | 284 | if (SYMBOLP (object)) |
| 297 | return Qt; | 285 | return Qt; |
| @@ -304,8 +292,7 @@ DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0, | |||
| 304 | doc: /* Return t if OBJECT is a keyword. | 292 | doc: /* Return t if OBJECT is a keyword. |
| 305 | This means that it is a symbol with a print name beginning with `:' | 293 | This means that it is a symbol with a print name beginning with `:' |
| 306 | interned in the initial obarray. */) | 294 | interned in the initial obarray. */) |
| 307 | (object) | 295 | (Lisp_Object object) |
| 308 | Lisp_Object object; | ||
| 309 | { | 296 | { |
| 310 | if (SYMBOLP (object) | 297 | if (SYMBOLP (object) |
| 311 | && SREF (SYMBOL_NAME (object), 0) == ':' | 298 | && SREF (SYMBOL_NAME (object), 0) == ':' |
| @@ -316,8 +303,7 @@ interned in the initial obarray. */) | |||
| 316 | 303 | ||
| 317 | DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, | 304 | DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, |
| 318 | doc: /* Return t if OBJECT is a vector. */) | 305 | doc: /* Return t if OBJECT is a vector. */) |
| 319 | (object) | 306 | (Lisp_Object object) |
| 320 | Lisp_Object object; | ||
| 321 | { | 307 | { |
| 322 | if (VECTORP (object)) | 308 | if (VECTORP (object)) |
| 323 | return Qt; | 309 | return Qt; |
| @@ -326,8 +312,7 @@ DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, | |||
| 326 | 312 | ||
| 327 | DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, | 313 | DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, |
| 328 | doc: /* Return t if OBJECT is a string. */) | 314 | doc: /* Return t if OBJECT is a string. */) |
| 329 | (object) | 315 | (Lisp_Object object) |
| 330 | Lisp_Object object; | ||
| 331 | { | 316 | { |
| 332 | if (STRINGP (object)) | 317 | if (STRINGP (object)) |
| 333 | return Qt; | 318 | return Qt; |
| @@ -337,8 +322,7 @@ DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, | |||
| 337 | DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, | 322 | DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, |
| 338 | 1, 1, 0, | 323 | 1, 1, 0, |
| 339 | doc: /* Return t if OBJECT is a multibyte string. */) | 324 | doc: /* Return t if OBJECT is a multibyte string. */) |
| 340 | (object) | 325 | (Lisp_Object object) |
| 341 | Lisp_Object object; | ||
| 342 | { | 326 | { |
| 343 | if (STRINGP (object) && STRING_MULTIBYTE (object)) | 327 | if (STRINGP (object) && STRING_MULTIBYTE (object)) |
| 344 | return Qt; | 328 | return Qt; |
| @@ -347,8 +331,7 @@ DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, | |||
| 347 | 331 | ||
| 348 | DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0, | 332 | DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0, |
| 349 | doc: /* Return t if OBJECT is a char-table. */) | 333 | doc: /* Return t if OBJECT is a char-table. */) |
| 350 | (object) | 334 | (Lisp_Object object) |
| 351 | Lisp_Object object; | ||
| 352 | { | 335 | { |
| 353 | if (CHAR_TABLE_P (object)) | 336 | if (CHAR_TABLE_P (object)) |
| 354 | return Qt; | 337 | return Qt; |
| @@ -358,8 +341,7 @@ DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0, | |||
| 358 | DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p, | 341 | DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p, |
| 359 | Svector_or_char_table_p, 1, 1, 0, | 342 | Svector_or_char_table_p, 1, 1, 0, |
| 360 | doc: /* Return t if OBJECT is a char-table or vector. */) | 343 | doc: /* Return t if OBJECT is a char-table or vector. */) |
| 361 | (object) | 344 | (Lisp_Object object) |
| 362 | Lisp_Object object; | ||
| 363 | { | 345 | { |
| 364 | if (VECTORP (object) || CHAR_TABLE_P (object)) | 346 | if (VECTORP (object) || CHAR_TABLE_P (object)) |
| 365 | return Qt; | 347 | return Qt; |
| @@ -368,8 +350,7 @@ DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p, | |||
| 368 | 350 | ||
| 369 | DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, | 351 | DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, |
| 370 | doc: /* Return t if OBJECT is a bool-vector. */) | 352 | doc: /* Return t if OBJECT is a bool-vector. */) |
| 371 | (object) | 353 | (Lisp_Object object) |
| 372 | Lisp_Object object; | ||
| 373 | { | 354 | { |
| 374 | if (BOOL_VECTOR_P (object)) | 355 | if (BOOL_VECTOR_P (object)) |
| 375 | return Qt; | 356 | return Qt; |
| @@ -378,8 +359,7 @@ DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, | |||
| 378 | 359 | ||
| 379 | DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, | 360 | DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, |
| 380 | doc: /* Return t if OBJECT is an array (string or vector). */) | 361 | doc: /* Return t if OBJECT is an array (string or vector). */) |
| 381 | (object) | 362 | (Lisp_Object object) |
| 382 | Lisp_Object object; | ||
| 383 | { | 363 | { |
| 384 | if (ARRAYP (object)) | 364 | if (ARRAYP (object)) |
| 385 | return Qt; | 365 | return Qt; |
| @@ -388,8 +368,7 @@ DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, | |||
| 388 | 368 | ||
| 389 | DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, | 369 | DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, |
| 390 | doc: /* Return t if OBJECT is a sequence (list or array). */) | 370 | doc: /* Return t if OBJECT is a sequence (list or array). */) |
| 391 | (object) | 371 | (register Lisp_Object object) |
| 392 | register Lisp_Object object; | ||
| 393 | { | 372 | { |
| 394 | if (CONSP (object) || NILP (object) || ARRAYP (object)) | 373 | if (CONSP (object) || NILP (object) || ARRAYP (object)) |
| 395 | return Qt; | 374 | return Qt; |
| @@ -398,8 +377,7 @@ DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, | |||
| 398 | 377 | ||
| 399 | DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, | 378 | DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, |
| 400 | doc: /* Return t if OBJECT is an editor buffer. */) | 379 | doc: /* Return t if OBJECT is an editor buffer. */) |
| 401 | (object) | 380 | (Lisp_Object object) |
| 402 | Lisp_Object object; | ||
| 403 | { | 381 | { |
| 404 | if (BUFFERP (object)) | 382 | if (BUFFERP (object)) |
| 405 | return Qt; | 383 | return Qt; |
| @@ -408,8 +386,7 @@ DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, | |||
| 408 | 386 | ||
| 409 | DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, | 387 | DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, |
| 410 | doc: /* Return t if OBJECT is a marker (editor pointer). */) | 388 | doc: /* Return t if OBJECT is a marker (editor pointer). */) |
| 411 | (object) | 389 | (Lisp_Object object) |
| 412 | Lisp_Object object; | ||
| 413 | { | 390 | { |
| 414 | if (MARKERP (object)) | 391 | if (MARKERP (object)) |
| 415 | return Qt; | 392 | return Qt; |
| @@ -418,8 +395,7 @@ DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, | |||
| 418 | 395 | ||
| 419 | DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, | 396 | DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, |
| 420 | doc: /* Return t if OBJECT is a built-in function. */) | 397 | doc: /* Return t if OBJECT is a built-in function. */) |
| 421 | (object) | 398 | (Lisp_Object object) |
| 422 | Lisp_Object object; | ||
| 423 | { | 399 | { |
| 424 | if (SUBRP (object)) | 400 | if (SUBRP (object)) |
| 425 | return Qt; | 401 | return Qt; |
| @@ -429,8 +405,7 @@ DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, | |||
| 429 | DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p, | 405 | DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p, |
| 430 | 1, 1, 0, | 406 | 1, 1, 0, |
| 431 | doc: /* Return t if OBJECT is a byte-compiled function object. */) | 407 | doc: /* Return t if OBJECT is a byte-compiled function object. */) |
| 432 | (object) | 408 | (Lisp_Object object) |
| 433 | Lisp_Object object; | ||
| 434 | { | 409 | { |
| 435 | if (COMPILEDP (object)) | 410 | if (COMPILEDP (object)) |
| 436 | return Qt; | 411 | return Qt; |
| @@ -439,8 +414,7 @@ DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p, | |||
| 439 | 414 | ||
| 440 | DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, | 415 | DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, |
| 441 | doc: /* Return t if OBJECT is a character or a string. */) | 416 | doc: /* Return t if OBJECT is a character or a string. */) |
| 442 | (object) | 417 | (register Lisp_Object object) |
| 443 | register Lisp_Object object; | ||
| 444 | { | 418 | { |
| 445 | if (CHARACTERP (object) || STRINGP (object)) | 419 | if (CHARACTERP (object) || STRINGP (object)) |
| 446 | return Qt; | 420 | return Qt; |
| @@ -449,8 +423,7 @@ DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, | |||
| 449 | 423 | ||
| 450 | DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, | 424 | DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, |
| 451 | doc: /* Return t if OBJECT is an integer. */) | 425 | doc: /* Return t if OBJECT is an integer. */) |
| 452 | (object) | 426 | (Lisp_Object object) |
| 453 | Lisp_Object object; | ||
| 454 | { | 427 | { |
| 455 | if (INTEGERP (object)) | 428 | if (INTEGERP (object)) |
| 456 | return Qt; | 429 | return Qt; |
| @@ -459,8 +432,7 @@ DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, | |||
| 459 | 432 | ||
| 460 | DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, | 433 | DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, |
| 461 | doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */) | 434 | doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */) |
| 462 | (object) | 435 | (register Lisp_Object object) |
| 463 | register Lisp_Object object; | ||
| 464 | { | 436 | { |
| 465 | if (MARKERP (object) || INTEGERP (object)) | 437 | if (MARKERP (object) || INTEGERP (object)) |
| 466 | return Qt; | 438 | return Qt; |
| @@ -469,8 +441,7 @@ DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, | |||
| 469 | 441 | ||
| 470 | DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, | 442 | DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, |
| 471 | doc: /* Return t if OBJECT is a nonnegative integer. */) | 443 | doc: /* Return t if OBJECT is a nonnegative integer. */) |
| 472 | (object) | 444 | (Lisp_Object object) |
| 473 | Lisp_Object object; | ||
| 474 | { | 445 | { |
| 475 | if (NATNUMP (object)) | 446 | if (NATNUMP (object)) |
| 476 | return Qt; | 447 | return Qt; |
| @@ -479,8 +450,7 @@ DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, | |||
| 479 | 450 | ||
| 480 | DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, | 451 | DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, |
| 481 | doc: /* Return t if OBJECT is a number (floating point or integer). */) | 452 | doc: /* Return t if OBJECT is a number (floating point or integer). */) |
| 482 | (object) | 453 | (Lisp_Object object) |
| 483 | Lisp_Object object; | ||
| 484 | { | 454 | { |
| 485 | if (NUMBERP (object)) | 455 | if (NUMBERP (object)) |
| 486 | return Qt; | 456 | return Qt; |
| @@ -491,8 +461,7 @@ DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, | |||
| 491 | DEFUN ("number-or-marker-p", Fnumber_or_marker_p, | 461 | DEFUN ("number-or-marker-p", Fnumber_or_marker_p, |
| 492 | Snumber_or_marker_p, 1, 1, 0, | 462 | Snumber_or_marker_p, 1, 1, 0, |
| 493 | doc: /* Return t if OBJECT is a number or a marker. */) | 463 | doc: /* Return t if OBJECT is a number or a marker. */) |
| 494 | (object) | 464 | (Lisp_Object object) |
| 495 | Lisp_Object object; | ||
| 496 | { | 465 | { |
| 497 | if (NUMBERP (object) || MARKERP (object)) | 466 | if (NUMBERP (object) || MARKERP (object)) |
| 498 | return Qt; | 467 | return Qt; |
| @@ -501,8 +470,7 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p, | |||
| 501 | 470 | ||
| 502 | DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, | 471 | DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, |
| 503 | doc: /* Return t if OBJECT is a floating point number. */) | 472 | doc: /* Return t if OBJECT is a floating point number. */) |
| 504 | (object) | 473 | (Lisp_Object object) |
| 505 | Lisp_Object object; | ||
| 506 | { | 474 | { |
| 507 | if (FLOATP (object)) | 475 | if (FLOATP (object)) |
| 508 | return Qt; | 476 | return Qt; |
| @@ -518,16 +486,14 @@ Error if arg is not nil and not a cons cell. See also `car-safe'. | |||
| 518 | 486 | ||
| 519 | See Info node `(elisp)Cons Cells' for a discussion of related basic | 487 | See Info node `(elisp)Cons Cells' for a discussion of related basic |
| 520 | Lisp concepts such as car, cdr, cons cell and list. */) | 488 | Lisp concepts such as car, cdr, cons cell and list. */) |
| 521 | (list) | 489 | (register Lisp_Object list) |
| 522 | register Lisp_Object list; | ||
| 523 | { | 490 | { |
| 524 | return CAR (list); | 491 | return CAR (list); |
| 525 | } | 492 | } |
| 526 | 493 | ||
| 527 | DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, | 494 | DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, |
| 528 | doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) | 495 | doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) |
| 529 | (object) | 496 | (Lisp_Object object) |
| 530 | Lisp_Object object; | ||
| 531 | { | 497 | { |
| 532 | return CAR_SAFE (object); | 498 | return CAR_SAFE (object); |
| 533 | } | 499 | } |
| @@ -538,24 +504,21 @@ Error if arg is not nil and not a cons cell. See also `cdr-safe'. | |||
| 538 | 504 | ||
| 539 | See Info node `(elisp)Cons Cells' for a discussion of related basic | 505 | See Info node `(elisp)Cons Cells' for a discussion of related basic |
| 540 | Lisp concepts such as cdr, car, cons cell and list. */) | 506 | Lisp concepts such as cdr, car, cons cell and list. */) |
| 541 | (list) | 507 | (register Lisp_Object list) |
| 542 | register Lisp_Object list; | ||
| 543 | { | 508 | { |
| 544 | return CDR (list); | 509 | return CDR (list); |
| 545 | } | 510 | } |
| 546 | 511 | ||
| 547 | DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, | 512 | DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, |
| 548 | doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) | 513 | doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) |
| 549 | (object) | 514 | (Lisp_Object object) |
| 550 | Lisp_Object object; | ||
| 551 | { | 515 | { |
| 552 | return CDR_SAFE (object); | 516 | return CDR_SAFE (object); |
| 553 | } | 517 | } |
| 554 | 518 | ||
| 555 | DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | 519 | DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, |
| 556 | doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) | 520 | doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) |
| 557 | (cell, newcar) | 521 | (register Lisp_Object cell, Lisp_Object newcar) |
| 558 | register Lisp_Object cell, newcar; | ||
| 559 | { | 522 | { |
| 560 | CHECK_CONS (cell); | 523 | CHECK_CONS (cell); |
| 561 | CHECK_IMPURE (cell); | 524 | CHECK_IMPURE (cell); |
| @@ -565,8 +528,7 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | |||
| 565 | 528 | ||
| 566 | DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | 529 | DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, |
| 567 | doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) | 530 | doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) |
| 568 | (cell, newcdr) | 531 | (register Lisp_Object cell, Lisp_Object newcdr) |
| 569 | register Lisp_Object cell, newcdr; | ||
| 570 | { | 532 | { |
| 571 | CHECK_CONS (cell); | 533 | CHECK_CONS (cell); |
| 572 | CHECK_IMPURE (cell); | 534 | CHECK_IMPURE (cell); |
| @@ -578,8 +540,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | |||
| 578 | 540 | ||
| 579 | DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, | 541 | DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, |
| 580 | doc: /* Return t if SYMBOL's value is not void. */) | 542 | doc: /* Return t if SYMBOL's value is not void. */) |
| 581 | (symbol) | 543 | (register Lisp_Object symbol) |
| 582 | register Lisp_Object symbol; | ||
| 583 | { | 544 | { |
| 584 | Lisp_Object valcontents; | 545 | Lisp_Object valcontents; |
| 585 | struct Lisp_Symbol *sym; | 546 | struct Lisp_Symbol *sym; |
| @@ -617,8 +578,7 @@ DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, | |||
| 617 | 578 | ||
| 618 | DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, | 579 | DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, |
| 619 | doc: /* Return t if SYMBOL's function definition is not void. */) | 580 | doc: /* Return t if SYMBOL's function definition is not void. */) |
| 620 | (symbol) | 581 | (register Lisp_Object symbol) |
| 621 | register Lisp_Object symbol; | ||
| 622 | { | 582 | { |
| 623 | CHECK_SYMBOL (symbol); | 583 | CHECK_SYMBOL (symbol); |
| 624 | return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt); | 584 | return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt); |
| @@ -627,8 +587,7 @@ DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, | |||
| 627 | DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0, | 587 | DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0, |
| 628 | doc: /* Make SYMBOL's value be void. | 588 | doc: /* Make SYMBOL's value be void. |
| 629 | Return SYMBOL. */) | 589 | Return SYMBOL. */) |
| 630 | (symbol) | 590 | (register Lisp_Object symbol) |
| 631 | register Lisp_Object symbol; | ||
| 632 | { | 591 | { |
| 633 | CHECK_SYMBOL (symbol); | 592 | CHECK_SYMBOL (symbol); |
| 634 | if (SYMBOL_CONSTANT_P (symbol)) | 593 | if (SYMBOL_CONSTANT_P (symbol)) |
| @@ -640,8 +599,7 @@ Return SYMBOL. */) | |||
| 640 | DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, | 599 | DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, |
| 641 | doc: /* Make SYMBOL's function definition be void. | 600 | doc: /* Make SYMBOL's function definition be void. |
| 642 | Return SYMBOL. */) | 601 | Return SYMBOL. */) |
| 643 | (symbol) | 602 | (register Lisp_Object symbol) |
| 644 | register Lisp_Object symbol; | ||
| 645 | { | 603 | { |
| 646 | CHECK_SYMBOL (symbol); | 604 | CHECK_SYMBOL (symbol); |
| 647 | if (NILP (symbol) || EQ (symbol, Qt)) | 605 | if (NILP (symbol) || EQ (symbol, Qt)) |
| @@ -652,8 +610,7 @@ Return SYMBOL. */) | |||
| 652 | 610 | ||
| 653 | DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | 611 | DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, |
| 654 | doc: /* Return SYMBOL's function definition. Error if that is void. */) | 612 | doc: /* Return SYMBOL's function definition. Error if that is void. */) |
| 655 | (symbol) | 613 | (register Lisp_Object symbol) |
| 656 | register Lisp_Object symbol; | ||
| 657 | { | 614 | { |
| 658 | CHECK_SYMBOL (symbol); | 615 | CHECK_SYMBOL (symbol); |
| 659 | if (!EQ (XSYMBOL (symbol)->function, Qunbound)) | 616 | if (!EQ (XSYMBOL (symbol)->function, Qunbound)) |
| @@ -663,8 +620,7 @@ DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | |||
| 663 | 620 | ||
| 664 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | 621 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, |
| 665 | doc: /* Return SYMBOL's property list. */) | 622 | doc: /* Return SYMBOL's property list. */) |
| 666 | (symbol) | 623 | (register Lisp_Object symbol) |
| 667 | register Lisp_Object symbol; | ||
| 668 | { | 624 | { |
| 669 | CHECK_SYMBOL (symbol); | 625 | CHECK_SYMBOL (symbol); |
| 670 | return XSYMBOL (symbol)->plist; | 626 | return XSYMBOL (symbol)->plist; |
| @@ -672,8 +628,7 @@ DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | |||
| 672 | 628 | ||
| 673 | DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, | 629 | DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, |
| 674 | doc: /* Return SYMBOL's name, a string. */) | 630 | doc: /* Return SYMBOL's name, a string. */) |
| 675 | (symbol) | 631 | (register Lisp_Object symbol) |
| 676 | register Lisp_Object symbol; | ||
| 677 | { | 632 | { |
| 678 | register Lisp_Object name; | 633 | register Lisp_Object name; |
| 679 | 634 | ||
| @@ -684,8 +639,7 @@ DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, | |||
| 684 | 639 | ||
| 685 | DEFUN ("fset", Ffset, Sfset, 2, 2, 0, | 640 | DEFUN ("fset", Ffset, Sfset, 2, 2, 0, |
| 686 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) | 641 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) |
| 687 | (symbol, definition) | 642 | (register Lisp_Object symbol, Lisp_Object definition) |
| 688 | register Lisp_Object symbol, definition; | ||
| 689 | { | 643 | { |
| 690 | register Lisp_Object function; | 644 | register Lisp_Object function; |
| 691 | 645 | ||
| @@ -711,16 +665,13 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0, | |||
| 711 | return definition; | 665 | return definition; |
| 712 | } | 666 | } |
| 713 | 667 | ||
| 714 | extern Lisp_Object Qfunction_documentation; | ||
| 715 | |||
| 716 | DEFUN ("defalias", Fdefalias, Sdefalias, 2, 3, 0, | 668 | DEFUN ("defalias", Fdefalias, Sdefalias, 2, 3, 0, |
| 717 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. | 669 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. |
| 718 | Associates the function with the current load file, if any. | 670 | Associates the function with the current load file, if any. |
| 719 | The optional third argument DOCSTRING specifies the documentation string | 671 | The optional third argument DOCSTRING specifies the documentation string |
| 720 | for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string | 672 | for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string |
| 721 | determined by DEFINITION. */) | 673 | determined by DEFINITION. */) |
| 722 | (symbol, definition, docstring) | 674 | (register Lisp_Object symbol, Lisp_Object definition, Lisp_Object docstring) |
| 723 | register Lisp_Object symbol, definition, docstring; | ||
| 724 | { | 675 | { |
| 725 | CHECK_SYMBOL (symbol); | 676 | CHECK_SYMBOL (symbol); |
| 726 | if (CONSP (XSYMBOL (symbol)->function) | 677 | if (CONSP (XSYMBOL (symbol)->function) |
| @@ -735,8 +686,7 @@ determined by DEFINITION. */) | |||
| 735 | 686 | ||
| 736 | DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0, | 687 | DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0, |
| 737 | doc: /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */) | 688 | doc: /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */) |
| 738 | (symbol, newplist) | 689 | (register Lisp_Object symbol, Lisp_Object newplist) |
| 739 | register Lisp_Object symbol, newplist; | ||
| 740 | { | 690 | { |
| 741 | CHECK_SYMBOL (symbol); | 691 | CHECK_SYMBOL (symbol); |
| 742 | XSYMBOL (symbol)->plist = newplist; | 692 | XSYMBOL (symbol)->plist = newplist; |
| @@ -749,8 +699,7 @@ SUBR must be a built-in function. | |||
| 749 | The returned value is a pair (MIN . MAX). MIN is the minimum number | 699 | The returned value is a pair (MIN . MAX). MIN is the minimum number |
| 750 | of args. MAX is the maximum number or the symbol `many', for a | 700 | of args. MAX is the maximum number or the symbol `many', for a |
| 751 | function with `&rest' args, or `unevalled' for a special form. */) | 701 | function with `&rest' args, or `unevalled' for a special form. */) |
| 752 | (subr) | 702 | (Lisp_Object subr) |
| 753 | Lisp_Object subr; | ||
| 754 | { | 703 | { |
| 755 | short minargs, maxargs; | 704 | short minargs, maxargs; |
| 756 | CHECK_SUBR (subr); | 705 | CHECK_SUBR (subr); |
| @@ -767,8 +716,7 @@ function with `&rest' args, or `unevalled' for a special form. */) | |||
| 767 | DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, | 716 | DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, |
| 768 | doc: /* Return name of subroutine SUBR. | 717 | doc: /* Return name of subroutine SUBR. |
| 769 | SUBR must be a built-in function. */) | 718 | SUBR must be a built-in function. */) |
| 770 | (subr) | 719 | (Lisp_Object subr) |
| 771 | Lisp_Object subr; | ||
| 772 | { | 720 | { |
| 773 | const char *name; | 721 | const char *name; |
| 774 | CHECK_SUBR (subr); | 722 | CHECK_SUBR (subr); |
| @@ -780,8 +728,7 @@ DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, | |||
| 780 | doc: /* Return the interactive form of CMD or nil if none. | 728 | doc: /* Return the interactive form of CMD or nil if none. |
| 781 | If CMD is not a command, the return value is nil. | 729 | If CMD is not a command, the return value is nil. |
| 782 | Value, if non-nil, is a list \(interactive SPEC). */) | 730 | Value, if non-nil, is a list \(interactive SPEC). */) |
| 783 | (cmd) | 731 | (Lisp_Object cmd) |
| 784 | Lisp_Object cmd; | ||
| 785 | { | 732 | { |
| 786 | Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ | 733 | Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ |
| 787 | 734 | ||
| @@ -802,7 +749,7 @@ Value, if non-nil, is a list \(interactive SPEC). */) | |||
| 802 | 749 | ||
| 803 | if (SUBRP (fun)) | 750 | if (SUBRP (fun)) |
| 804 | { | 751 | { |
| 805 | char *spec = XSUBR (fun)->intspec; | 752 | const char *spec = XSUBR (fun)->intspec; |
| 806 | if (spec) | 753 | if (spec) |
| 807 | return list2 (Qinteractive, | 754 | return list2 (Qinteractive, |
| 808 | (*spec != '(') ? build_string (spec) : | 755 | (*spec != '(') ? build_string (spec) : |
| @@ -840,8 +787,7 @@ Value, if non-nil, is a list \(interactive SPEC). */) | |||
| 840 | indirections contains a loop. */ | 787 | indirections contains a loop. */ |
| 841 | 788 | ||
| 842 | struct Lisp_Symbol * | 789 | struct Lisp_Symbol * |
| 843 | indirect_variable (symbol) | 790 | indirect_variable (struct Lisp_Symbol *symbol) |
| 844 | struct Lisp_Symbol *symbol; | ||
| 845 | { | 791 | { |
| 846 | struct Lisp_Symbol *tortoise, *hare; | 792 | struct Lisp_Symbol *tortoise, *hare; |
| 847 | 793 | ||
| @@ -874,8 +820,7 @@ If OBJECT is a symbol, follow all variable indirections and return the final | |||
| 874 | variable. If OBJECT is not a symbol, just return it. | 820 | variable. If OBJECT is not a symbol, just return it. |
| 875 | Signal a cyclic-variable-indirection error if there is a loop in the | 821 | Signal a cyclic-variable-indirection error if there is a loop in the |
| 876 | variable chain of symbols. */) | 822 | variable chain of symbols. */) |
| 877 | (object) | 823 | (Lisp_Object object) |
| 878 | Lisp_Object object; | ||
| 879 | { | 824 | { |
| 880 | if (SYMBOLP (object)) | 825 | if (SYMBOLP (object)) |
| 881 | XSETSYMBOL (object, indirect_variable (XSYMBOL (object))); | 826 | XSETSYMBOL (object, indirect_variable (XSYMBOL (object))); |
| @@ -892,8 +837,7 @@ variable chain of symbols. */) | |||
| 892 | ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) | 837 | ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) |
| 893 | 838 | ||
| 894 | Lisp_Object | 839 | Lisp_Object |
| 895 | do_symval_forwarding (valcontents) | 840 | do_symval_forwarding (register union Lisp_Fwd *valcontents) |
| 896 | register union Lisp_Fwd *valcontents; | ||
| 897 | { | 841 | { |
| 898 | register Lisp_Object val; | 842 | register Lisp_Object val; |
| 899 | switch (XFWDTYPE (valcontents)) | 843 | switch (XFWDTYPE (valcontents)) |
| @@ -947,11 +891,7 @@ do_symval_forwarding (valcontents) | |||
| 947 | } while (0) | 891 | } while (0) |
| 948 | 892 | ||
| 949 | static void | 893 | static void |
| 950 | store_symval_forwarding (/* symbol, */ valcontents, newval, buf) | 894 | store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf) |
| 951 | /* struct Lisp_Symbol *symbol; */ | ||
| 952 | union Lisp_Fwd *valcontents; | ||
| 953 | register Lisp_Object newval; | ||
| 954 | struct buffer *buf; | ||
| 955 | { | 895 | { |
| 956 | switch (XFWDTYPE (valcontents)) | 896 | switch (XFWDTYPE (valcontents)) |
| 957 | { | 897 | { |
| @@ -1032,8 +972,7 @@ store_symval_forwarding (/* symbol, */ valcontents, newval, buf) | |||
| 1032 | This makes it safe to alter the status of other bindings. */ | 972 | This makes it safe to alter the status of other bindings. */ |
| 1033 | 973 | ||
| 1034 | void | 974 | void |
| 1035 | swap_in_global_binding (symbol) | 975 | swap_in_global_binding (struct Lisp_Symbol *symbol) |
| 1036 | struct Lisp_Symbol *symbol; | ||
| 1037 | { | 976 | { |
| 1038 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol); | 977 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol); |
| 1039 | 978 | ||
| @@ -1059,9 +998,7 @@ swap_in_global_binding (symbol) | |||
| 1059 | This could be another forwarding pointer. */ | 998 | This could be another forwarding pointer. */ |
| 1060 | 999 | ||
| 1061 | static void | 1000 | static void |
| 1062 | swap_in_symval_forwarding (symbol, blv) | 1001 | swap_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 | { | 1002 | { |
| 1066 | register Lisp_Object tem1; | 1003 | register Lisp_Object tem1; |
| 1067 | 1004 | ||
| @@ -1111,8 +1048,7 @@ swap_in_symval_forwarding (symbol, blv) | |||
| 1111 | within this function. Great care is required for this. */ | 1048 | within this function. Great care is required for this. */ |
| 1112 | 1049 | ||
| 1113 | Lisp_Object | 1050 | Lisp_Object |
| 1114 | find_symbol_value (symbol) | 1051 | find_symbol_value (Lisp_Object symbol) |
| 1115 | Lisp_Object symbol; | ||
| 1116 | { | 1052 | { |
| 1117 | struct Lisp_Symbol *sym; | 1053 | struct Lisp_Symbol *sym; |
| 1118 | 1054 | ||
| @@ -1139,8 +1075,7 @@ find_symbol_value (symbol) | |||
| 1139 | 1075 | ||
| 1140 | DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | 1076 | DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, |
| 1141 | doc: /* Return SYMBOL's value. Error if that is void. */) | 1077 | doc: /* Return SYMBOL's value. Error if that is void. */) |
| 1142 | (symbol) | 1078 | (Lisp_Object symbol) |
| 1143 | Lisp_Object symbol; | ||
| 1144 | { | 1079 | { |
| 1145 | Lisp_Object val; | 1080 | Lisp_Object val; |
| 1146 | 1081 | ||
| @@ -1153,8 +1088,7 @@ DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | |||
| 1153 | 1088 | ||
| 1154 | DEFUN ("set", Fset, Sset, 2, 2, 0, | 1089 | DEFUN ("set", Fset, Sset, 2, 2, 0, |
| 1155 | doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) | 1090 | doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) |
| 1156 | (symbol, newval) | 1091 | (register Lisp_Object symbol, Lisp_Object newval) |
| 1157 | register Lisp_Object symbol, newval; | ||
| 1158 | { | 1092 | { |
| 1159 | set_internal (symbol, newval, Qnil, 0); | 1093 | set_internal (symbol, newval, Qnil, 0); |
| 1160 | return newval; | 1094 | return newval; |
| @@ -1183,8 +1117,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | |||
| 1183 | } | 1117 | } |
| 1184 | 1118 | ||
| 1185 | static int | 1119 | static int |
| 1186 | let_shadows_global_binding_p (symbol) | 1120 | let_shadows_global_binding_p (Lisp_Object symbol) |
| 1187 | Lisp_Object symbol; | ||
| 1188 | { | 1121 | { |
| 1189 | struct specbinding *p; | 1122 | struct specbinding *p; |
| 1190 | 1123 | ||
| @@ -1204,9 +1137,7 @@ let_shadows_global_binding_p (symbol) | |||
| 1204 | If BINDFLAG is nonzero, we don't do that. */ | 1137 | If BINDFLAG is nonzero, we don't do that. */ |
| 1205 | 1138 | ||
| 1206 | void | 1139 | void |
| 1207 | set_internal (symbol, newval, where, bindflag) | 1140 | set_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 | { | 1141 | { |
| 1211 | int voide = EQ (newval, Qunbound); | 1142 | int voide = EQ (newval, Qunbound); |
| 1212 | struct Lisp_Symbol *sym; | 1143 | struct Lisp_Symbol *sym; |
| @@ -1357,8 +1288,7 @@ set_internal (symbol, newval, where, bindflag) | |||
| 1357 | Return Qunbound if it is void. */ | 1288 | Return Qunbound if it is void. */ |
| 1358 | 1289 | ||
| 1359 | Lisp_Object | 1290 | Lisp_Object |
| 1360 | default_value (symbol) | 1291 | default_value (Lisp_Object symbol) |
| 1361 | Lisp_Object symbol; | ||
| 1362 | { | 1292 | { |
| 1363 | struct Lisp_Symbol *sym; | 1293 | struct Lisp_Symbol *sym; |
| 1364 | 1294 | ||
| @@ -1406,8 +1336,7 @@ DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, | |||
| 1406 | doc: /* Return t if SYMBOL has a non-void default value. | 1336 | doc: /* Return t if SYMBOL has a non-void default value. |
| 1407 | This is the value that is seen in buffers that do not have their own values | 1337 | This is the value that is seen in buffers that do not have their own values |
| 1408 | for this variable. */) | 1338 | for this variable. */) |
| 1409 | (symbol) | 1339 | (Lisp_Object symbol) |
| 1410 | Lisp_Object symbol; | ||
| 1411 | { | 1340 | { |
| 1412 | register Lisp_Object value; | 1341 | register Lisp_Object value; |
| 1413 | 1342 | ||
| @@ -1420,8 +1349,7 @@ DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, | |||
| 1420 | This is the value that is seen in buffers that do not have their own values | 1349 | This is the value that is seen in buffers that do not have their own values |
| 1421 | for this variable. The default value is meaningful for variables with | 1350 | for this variable. The default value is meaningful for variables with |
| 1422 | local bindings in certain buffers. */) | 1351 | local bindings in certain buffers. */) |
| 1423 | (symbol) | 1352 | (Lisp_Object symbol) |
| 1424 | Lisp_Object symbol; | ||
| 1425 | { | 1353 | { |
| 1426 | register Lisp_Object value; | 1354 | register Lisp_Object value; |
| 1427 | 1355 | ||
| @@ -1436,8 +1364,7 @@ DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, | |||
| 1436 | doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. | 1364 | doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. |
| 1437 | The default value is seen in buffers that do not have their own values | 1365 | The default value is seen in buffers that do not have their own values |
| 1438 | for this variable. */) | 1366 | for this variable. */) |
| 1439 | (symbol, value) | 1367 | (Lisp_Object symbol, Lisp_Object value) |
| 1440 | Lisp_Object symbol, value; | ||
| 1441 | { | 1368 | { |
| 1442 | struct Lisp_Symbol *sym; | 1369 | struct Lisp_Symbol *sym; |
| 1443 | 1370 | ||
| @@ -1516,8 +1443,7 @@ This sets each VAR's default value to the corresponding VALUE. | |||
| 1516 | The VALUE for the Nth VAR can refer to the new default values | 1443 | The VALUE for the Nth VAR can refer to the new default values |
| 1517 | of previous VARs. | 1444 | of previous VARs. |
| 1518 | usage: (setq-default [VAR VALUE]...) */) | 1445 | usage: (setq-default [VAR VALUE]...) */) |
| 1519 | (args) | 1446 | (Lisp_Object args) |
| 1520 | Lisp_Object args; | ||
| 1521 | { | 1447 | { |
| 1522 | register Lisp_Object args_left; | 1448 | register Lisp_Object args_left; |
| 1523 | register Lisp_Object val, symbol; | 1449 | register Lisp_Object val, symbol; |
| @@ -1591,8 +1517,7 @@ In most cases it is better to use `make-local-variable', | |||
| 1591 | which makes a variable local in just one buffer. | 1517 | which makes a variable local in just one buffer. |
| 1592 | 1518 | ||
| 1593 | The function `default-value' gets the default value and `set-default' sets it. */) | 1519 | The function `default-value' gets the default value and `set-default' sets it. */) |
| 1594 | (variable) | 1520 | (register Lisp_Object variable) |
| 1595 | register Lisp_Object variable; | ||
| 1596 | { | 1521 | { |
| 1597 | struct Lisp_Symbol *sym; | 1522 | struct Lisp_Symbol *sym; |
| 1598 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1523 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| @@ -1669,8 +1594,7 @@ See also `make-variable-buffer-local'. | |||
| 1669 | 1594 | ||
| 1670 | Do not use `make-local-variable' to make a hook variable buffer-local. | 1595 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 1671 | Instead, use `add-hook' and specify t for the LOCAL argument. */) | 1596 | Instead, use `add-hook' and specify t for the LOCAL argument. */) |
| 1672 | (variable) | 1597 | (register Lisp_Object variable) |
| 1673 | register Lisp_Object variable; | ||
| 1674 | { | 1598 | { |
| 1675 | register Lisp_Object tem; | 1599 | register Lisp_Object tem; |
| 1676 | int forwarded; | 1600 | int forwarded; |
| @@ -1771,8 +1695,7 @@ DEFUN ("kill-local-variable", Fkill_local_variable, Skill_local_variable, | |||
| 1771 | 1, 1, "vKill Local Variable: ", | 1695 | 1, 1, "vKill Local Variable: ", |
| 1772 | doc: /* Make VARIABLE no longer have a separate value in the current buffer. | 1696 | doc: /* Make VARIABLE no longer have a separate value in the current buffer. |
| 1773 | From now on the default value will apply in this buffer. Return VARIABLE. */) | 1697 | From now on the default value will apply in this buffer. Return VARIABLE. */) |
| 1774 | (variable) | 1698 | (register Lisp_Object variable) |
| 1775 | register Lisp_Object variable; | ||
| 1776 | { | 1699 | { |
| 1777 | register Lisp_Object tem; | 1700 | register Lisp_Object tem; |
| 1778 | struct Lisp_Buffer_Local_Value *blv; | 1701 | struct Lisp_Buffer_Local_Value *blv; |
| @@ -1860,8 +1783,7 @@ is to set the VARIABLE frame parameter of that frame. See | |||
| 1860 | Note that since Emacs 23.1, variables cannot be both buffer-local and | 1783 | Note that since Emacs 23.1, variables cannot be both buffer-local and |
| 1861 | frame-local any more (buffer-local bindings used to take precedence over | 1784 | frame-local any more (buffer-local bindings used to take precedence over |
| 1862 | frame-local bindings). */) | 1785 | frame-local bindings). */) |
| 1863 | (variable) | 1786 | (register Lisp_Object variable) |
| 1864 | register Lisp_Object variable; | ||
| 1865 | { | 1787 | { |
| 1866 | int forwarded; | 1788 | int forwarded; |
| 1867 | union Lisp_Val_Fwd valcontents; | 1789 | union Lisp_Val_Fwd valcontents; |
| @@ -1916,8 +1838,7 @@ DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, | |||
| 1916 | 1, 2, 0, | 1838 | 1, 2, 0, |
| 1917 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. | 1839 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. |
| 1918 | BUFFER defaults to the current buffer. */) | 1840 | BUFFER defaults to the current buffer. */) |
| 1919 | (variable, buffer) | 1841 | (register Lisp_Object variable, Lisp_Object buffer) |
| 1920 | register Lisp_Object variable, buffer; | ||
| 1921 | { | 1842 | { |
| 1922 | register struct buffer *buf; | 1843 | register struct buffer *buf; |
| 1923 | struct Lisp_Symbol *sym; | 1844 | struct Lisp_Symbol *sym; |
| @@ -1943,6 +1864,7 @@ BUFFER defaults to the current buffer. */) | |||
| 1943 | Lisp_Object tail, elt, tmp; | 1864 | Lisp_Object tail, elt, tmp; |
| 1944 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); | 1865 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); |
| 1945 | XSETBUFFER (tmp, buf); | 1866 | XSETBUFFER (tmp, buf); |
| 1867 | XSETSYMBOL (variable, sym); /* Update in case of aliasing. */ | ||
| 1946 | 1868 | ||
| 1947 | for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail)) | 1869 | for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail)) |
| 1948 | { | 1870 | { |
| @@ -1981,8 +1903,7 @@ while it does not have a `let'-style binding that was made in BUFFER, | |||
| 1981 | will produce a buffer local binding. See Info node | 1903 | will produce a buffer local binding. See Info node |
| 1982 | `(elisp)Creating Buffer-Local'. | 1904 | `(elisp)Creating Buffer-Local'. |
| 1983 | BUFFER defaults to the current buffer. */) | 1905 | BUFFER defaults to the current buffer. */) |
| 1984 | (variable, buffer) | 1906 | (register Lisp_Object variable, Lisp_Object buffer) |
| 1985 | register Lisp_Object variable, buffer; | ||
| 1986 | { | 1907 | { |
| 1987 | struct Lisp_Symbol *sym; | 1908 | struct Lisp_Symbol *sym; |
| 1988 | 1909 | ||
| @@ -2015,8 +1936,7 @@ DEFUN ("variable-binding-locus", Fvariable_binding_locus, Svariable_binding_locu | |||
| 2015 | If the current binding is buffer-local, the value is the current buffer. | 1936 | If the current binding is buffer-local, the value is the current buffer. |
| 2016 | If the current binding is frame-local, the value is the selected frame. | 1937 | If the current binding is frame-local, the value is the selected frame. |
| 2017 | If the current binding is global (the default), the value is nil. */) | 1938 | If the current binding is global (the default), the value is nil. */) |
| 2018 | (variable) | 1939 | (register Lisp_Object variable) |
| 2019 | register Lisp_Object variable; | ||
| 2020 | { | 1940 | { |
| 2021 | struct Lisp_Symbol *sym; | 1941 | struct Lisp_Symbol *sym; |
| 2022 | 1942 | ||
| @@ -2057,7 +1977,7 @@ If the current binding is global (the default), the value is nil. */) | |||
| 2057 | /* This code is disabled now that we use the selected frame to return | 1977 | /* This code is disabled now that we use the selected frame to return |
| 2058 | keyboard-local-values. */ | 1978 | keyboard-local-values. */ |
| 2059 | #if 0 | 1979 | #if 0 |
| 2060 | extern struct terminal *get_terminal P_ ((Lisp_Object display, int)); | 1980 | extern struct terminal *get_terminal (Lisp_Object display, int); |
| 2061 | 1981 | ||
| 2062 | DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, | 1982 | DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, |
| 2063 | doc: /* Return the terminal-local value of SYMBOL on TERMINAL. | 1983 | doc: /* Return the terminal-local value of SYMBOL on TERMINAL. |
| @@ -2066,9 +1986,7 @@ value, like `symbol-value'. | |||
| 2066 | 1986 | ||
| 2067 | TERMINAL may be a terminal object, a frame, or nil (meaning the | 1987 | TERMINAL may be a terminal object, a frame, or nil (meaning the |
| 2068 | selected frame's terminal device). */) | 1988 | selected frame's terminal device). */) |
| 2069 | (symbol, terminal) | 1989 | (Lisp_Object symbol, Lisp_Object terminal) |
| 2070 | Lisp_Object symbol; | ||
| 2071 | Lisp_Object terminal; | ||
| 2072 | { | 1990 | { |
| 2073 | Lisp_Object result; | 1991 | Lisp_Object result; |
| 2074 | struct terminal *t = get_terminal (terminal, 1); | 1992 | struct terminal *t = get_terminal (terminal, 1); |
| @@ -2085,10 +2003,7 @@ binding, like `set'. | |||
| 2085 | 2003 | ||
| 2086 | TERMINAL may be a terminal object, a frame, or nil (meaning the | 2004 | TERMINAL may be a terminal object, a frame, or nil (meaning the |
| 2087 | selected frame's terminal device). */) | 2005 | selected frame's terminal device). */) |
| 2088 | (symbol, terminal, value) | 2006 | (Lisp_Object symbol, Lisp_Object terminal, Lisp_Object value) |
| 2089 | Lisp_Object symbol; | ||
| 2090 | Lisp_Object terminal; | ||
| 2091 | Lisp_Object value; | ||
| 2092 | { | 2007 | { |
| 2093 | Lisp_Object result; | 2008 | Lisp_Object result; |
| 2094 | struct terminal *t = get_terminal (terminal, 1); | 2009 | struct terminal *t = get_terminal (terminal, 1); |
| @@ -2109,8 +2024,7 @@ selected frame's terminal device). */) | |||
| 2109 | This is like Findirect_function, except that it doesn't signal an | 2024 | This is like Findirect_function, except that it doesn't signal an |
| 2110 | error if the chain ends up unbound. */ | 2025 | error if the chain ends up unbound. */ |
| 2111 | Lisp_Object | 2026 | Lisp_Object |
| 2112 | indirect_function (object) | 2027 | indirect_function (register Lisp_Object object) |
| 2113 | register Lisp_Object object; | ||
| 2114 | { | 2028 | { |
| 2115 | Lisp_Object tortoise, hare; | 2029 | Lisp_Object tortoise, hare; |
| 2116 | 2030 | ||
| @@ -2142,9 +2056,7 @@ If the final symbol in the chain is unbound, signal a void-function error. | |||
| 2142 | Optional arg NOERROR non-nil means to return nil instead of signalling. | 2056 | Optional arg NOERROR non-nil means to return nil instead of signalling. |
| 2143 | Signal a cyclic-function-indirection error if there is a loop in the | 2057 | Signal a cyclic-function-indirection error if there is a loop in the |
| 2144 | function chain of symbols. */) | 2058 | function chain of symbols. */) |
| 2145 | (object, noerror) | 2059 | (register Lisp_Object object, Lisp_Object noerror) |
| 2146 | register Lisp_Object object; | ||
| 2147 | Lisp_Object noerror; | ||
| 2148 | { | 2060 | { |
| 2149 | Lisp_Object result; | 2061 | Lisp_Object result; |
| 2150 | 2062 | ||
| @@ -2168,9 +2080,7 @@ DEFUN ("aref", Faref, Saref, 2, 2, 0, | |||
| 2168 | doc: /* Return the element of ARRAY at index IDX. | 2080 | doc: /* Return the element of ARRAY at index IDX. |
| 2169 | ARRAY may be a vector, a string, a char-table, a bool-vector, | 2081 | ARRAY may be a vector, a string, a char-table, a bool-vector, |
| 2170 | or a byte-code object. IDX starts at 0. */) | 2082 | or a byte-code object. IDX starts at 0. */) |
| 2171 | (array, idx) | 2083 | (register Lisp_Object array, Lisp_Object idx) |
| 2172 | register Lisp_Object array; | ||
| 2173 | Lisp_Object idx; | ||
| 2174 | { | 2084 | { |
| 2175 | register int idxval; | 2085 | register int idxval; |
| 2176 | 2086 | ||
| @@ -2224,9 +2134,7 @@ DEFUN ("aset", Faset, Saset, 3, 3, 0, | |||
| 2224 | doc: /* Store into the element of ARRAY at index IDX the value NEWELT. | 2134 | doc: /* Store into the element of ARRAY at index IDX the value NEWELT. |
| 2225 | Return NEWELT. ARRAY may be a vector, a string, a char-table or a | 2135 | Return NEWELT. ARRAY may be a vector, a string, a char-table or a |
| 2226 | bool-vector. IDX starts at 0. */) | 2136 | bool-vector. IDX starts at 0. */) |
| 2227 | (array, idx, newelt) | 2137 | (register Lisp_Object array, Lisp_Object idx, Lisp_Object newelt) |
| 2228 | register Lisp_Object array; | ||
| 2229 | Lisp_Object idx, newelt; | ||
| 2230 | { | 2138 | { |
| 2231 | register int idxval; | 2139 | register int idxval; |
| 2232 | 2140 | ||
| @@ -2284,13 +2192,13 @@ bool-vector. IDX starts at 0. */) | |||
| 2284 | USE_SAFE_ALLOCA; | 2192 | USE_SAFE_ALLOCA; |
| 2285 | 2193 | ||
| 2286 | SAFE_ALLOCA (str, unsigned char *, nbytes); | 2194 | SAFE_ALLOCA (str, unsigned char *, nbytes); |
| 2287 | bcopy (SDATA (array), str, nbytes); | 2195 | memcpy (str, SDATA (array), nbytes); |
| 2288 | allocate_string_data (XSTRING (array), nchars, | 2196 | allocate_string_data (XSTRING (array), nchars, |
| 2289 | nbytes + new_bytes - prev_bytes); | 2197 | nbytes + new_bytes - prev_bytes); |
| 2290 | bcopy (str, SDATA (array), idxval_byte); | 2198 | memcpy (SDATA (array), str, idxval_byte); |
| 2291 | p1 = SDATA (array) + idxval_byte; | 2199 | p1 = SDATA (array) + idxval_byte; |
| 2292 | bcopy (str + idxval_byte + prev_bytes, p1 + new_bytes, | 2200 | memcpy (p1 + new_bytes, str + idxval_byte + prev_bytes, |
| 2293 | nbytes - (idxval_byte + prev_bytes)); | 2201 | nbytes - (idxval_byte + prev_bytes)); |
| 2294 | SAFE_FREE (); | 2202 | SAFE_FREE (); |
| 2295 | clear_string_char_byte_cache (); | 2203 | clear_string_char_byte_cache (); |
| 2296 | } | 2204 | } |
| @@ -2326,9 +2234,7 @@ bool-vector. IDX starts at 0. */) | |||
| 2326 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; | 2234 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; |
| 2327 | 2235 | ||
| 2328 | Lisp_Object | 2236 | Lisp_Object |
| 2329 | arithcompare (num1, num2, comparison) | 2237 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) |
| 2330 | Lisp_Object num1, num2; | ||
| 2331 | enum comparison comparison; | ||
| 2332 | { | 2238 | { |
| 2333 | double f1 = 0, f2 = 0; | 2239 | double f1 = 0, f2 = 0; |
| 2334 | int floatp = 0; | 2240 | int floatp = 0; |
| @@ -2382,24 +2288,21 @@ arithcompare (num1, num2, comparison) | |||
| 2382 | 2288 | ||
| 2383 | DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, | 2289 | DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, |
| 2384 | doc: /* Return t if two args, both numbers or markers, are equal. */) | 2290 | doc: /* Return t if two args, both numbers or markers, are equal. */) |
| 2385 | (num1, num2) | 2291 | (register Lisp_Object num1, Lisp_Object num2) |
| 2386 | register Lisp_Object num1, num2; | ||
| 2387 | { | 2292 | { |
| 2388 | return arithcompare (num1, num2, equal); | 2293 | return arithcompare (num1, num2, equal); |
| 2389 | } | 2294 | } |
| 2390 | 2295 | ||
| 2391 | DEFUN ("<", Flss, Slss, 2, 2, 0, | 2296 | DEFUN ("<", Flss, Slss, 2, 2, 0, |
| 2392 | doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) | 2297 | doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) |
| 2393 | (num1, num2) | 2298 | (register Lisp_Object num1, Lisp_Object num2) |
| 2394 | register Lisp_Object num1, num2; | ||
| 2395 | { | 2299 | { |
| 2396 | return arithcompare (num1, num2, less); | 2300 | return arithcompare (num1, num2, less); |
| 2397 | } | 2301 | } |
| 2398 | 2302 | ||
| 2399 | DEFUN (">", Fgtr, Sgtr, 2, 2, 0, | 2303 | DEFUN (">", Fgtr, Sgtr, 2, 2, 0, |
| 2400 | doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) | 2304 | doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) |
| 2401 | (num1, num2) | 2305 | (register Lisp_Object num1, Lisp_Object num2) |
| 2402 | register Lisp_Object num1, num2; | ||
| 2403 | { | 2306 | { |
| 2404 | return arithcompare (num1, num2, grtr); | 2307 | return arithcompare (num1, num2, grtr); |
| 2405 | } | 2308 | } |
| @@ -2407,8 +2310,7 @@ DEFUN (">", Fgtr, Sgtr, 2, 2, 0, | |||
| 2407 | DEFUN ("<=", Fleq, Sleq, 2, 2, 0, | 2310 | DEFUN ("<=", Fleq, Sleq, 2, 2, 0, |
| 2408 | doc: /* Return t if first arg is less than or equal to second arg. | 2311 | doc: /* Return t if first arg is less than or equal to second arg. |
| 2409 | Both must be numbers or markers. */) | 2312 | Both must be numbers or markers. */) |
| 2410 | (num1, num2) | 2313 | (register Lisp_Object num1, Lisp_Object num2) |
| 2411 | register Lisp_Object num1, num2; | ||
| 2412 | { | 2314 | { |
| 2413 | return arithcompare (num1, num2, less_or_equal); | 2315 | return arithcompare (num1, num2, less_or_equal); |
| 2414 | } | 2316 | } |
| @@ -2416,24 +2318,21 @@ Both must be numbers or markers. */) | |||
| 2416 | DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, | 2318 | DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, |
| 2417 | doc: /* Return t if first arg is greater than or equal to second arg. | 2319 | doc: /* Return t if first arg is greater than or equal to second arg. |
| 2418 | Both must be numbers or markers. */) | 2320 | Both must be numbers or markers. */) |
| 2419 | (num1, num2) | 2321 | (register Lisp_Object num1, Lisp_Object num2) |
| 2420 | register Lisp_Object num1, num2; | ||
| 2421 | { | 2322 | { |
| 2422 | return arithcompare (num1, num2, grtr_or_equal); | 2323 | return arithcompare (num1, num2, grtr_or_equal); |
| 2423 | } | 2324 | } |
| 2424 | 2325 | ||
| 2425 | DEFUN ("/=", Fneq, Sneq, 2, 2, 0, | 2326 | DEFUN ("/=", Fneq, Sneq, 2, 2, 0, |
| 2426 | doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */) | 2327 | doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */) |
| 2427 | (num1, num2) | 2328 | (register Lisp_Object num1, Lisp_Object num2) |
| 2428 | register Lisp_Object num1, num2; | ||
| 2429 | { | 2329 | { |
| 2430 | return arithcompare (num1, num2, notequal); | 2330 | return arithcompare (num1, num2, notequal); |
| 2431 | } | 2331 | } |
| 2432 | 2332 | ||
| 2433 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | 2333 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, |
| 2434 | doc: /* Return t if NUMBER is zero. */) | 2334 | doc: /* Return t if NUMBER is zero. */) |
| 2435 | (number) | 2335 | (register Lisp_Object number) |
| 2436 | register Lisp_Object number; | ||
| 2437 | { | 2336 | { |
| 2438 | CHECK_NUMBER_OR_FLOAT (number); | 2337 | CHECK_NUMBER_OR_FLOAT (number); |
| 2439 | 2338 | ||
| @@ -2454,8 +2353,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | |||
| 2454 | when the value fits in one. */ | 2353 | when the value fits in one. */ |
| 2455 | 2354 | ||
| 2456 | Lisp_Object | 2355 | Lisp_Object |
| 2457 | long_to_cons (i) | 2356 | long_to_cons (long unsigned int i) |
| 2458 | unsigned long i; | ||
| 2459 | { | 2357 | { |
| 2460 | unsigned long top = i >> 16; | 2358 | unsigned long top = i >> 16; |
| 2461 | unsigned int bot = i & 0xFFFF; | 2359 | unsigned int bot = i & 0xFFFF; |
| @@ -2467,8 +2365,7 @@ long_to_cons (i) | |||
| 2467 | } | 2365 | } |
| 2468 | 2366 | ||
| 2469 | unsigned long | 2367 | unsigned long |
| 2470 | cons_to_long (c) | 2368 | cons_to_long (Lisp_Object c) |
| 2471 | Lisp_Object c; | ||
| 2472 | { | 2369 | { |
| 2473 | Lisp_Object top, bot; | 2370 | Lisp_Object top, bot; |
| 2474 | if (INTEGERP (c)) | 2371 | if (INTEGERP (c)) |
| @@ -2484,8 +2381,7 @@ DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, | |||
| 2484 | doc: /* Return the decimal representation of NUMBER as a string. | 2381 | doc: /* Return the decimal representation of NUMBER as a string. |
| 2485 | Uses a minus sign if negative. | 2382 | Uses a minus sign if negative. |
| 2486 | NUMBER may be an integer or a floating point number. */) | 2383 | NUMBER may be an integer or a floating point number. */) |
| 2487 | (number) | 2384 | (Lisp_Object number) |
| 2488 | Lisp_Object number; | ||
| 2489 | { | 2385 | { |
| 2490 | char buffer[VALBITS]; | 2386 | char buffer[VALBITS]; |
| 2491 | 2387 | ||
| @@ -2509,8 +2405,7 @@ NUMBER may be an integer or a floating point number. */) | |||
| 2509 | } | 2405 | } |
| 2510 | 2406 | ||
| 2511 | INLINE static int | 2407 | INLINE static int |
| 2512 | digit_to_number (character, base) | 2408 | digit_to_number (int character, int base) |
| 2513 | int character, base; | ||
| 2514 | { | 2409 | { |
| 2515 | int digit; | 2410 | int digit; |
| 2516 | 2411 | ||
| @@ -2537,8 +2432,7 @@ It ignores leading spaces and tabs, and all trailing chars. | |||
| 2537 | If BASE, interpret STRING as a number in that base. If BASE isn't | 2432 | If BASE, interpret STRING as a number in that base. If BASE isn't |
| 2538 | present, base 10 is used. BASE must be between 2 and 16 (inclusive). | 2433 | present, base 10 is used. BASE must be between 2 and 16 (inclusive). |
| 2539 | If the base used is not 10, STRING is always parsed as integer. */) | 2434 | If the base used is not 10, STRING is always parsed as integer. */) |
| 2540 | (string, base) | 2435 | (register Lisp_Object string, Lisp_Object base) |
| 2541 | register Lisp_Object string, base; | ||
| 2542 | { | 2436 | { |
| 2543 | register unsigned char *p; | 2437 | register unsigned char *p; |
| 2544 | register int b; | 2438 | register int b; |
| @@ -2605,15 +2499,10 @@ enum arithop | |||
| 2605 | Amin | 2499 | Amin |
| 2606 | }; | 2500 | }; |
| 2607 | 2501 | ||
| 2608 | static Lisp_Object float_arith_driver P_ ((double, int, enum arithop, | 2502 | static Lisp_Object float_arith_driver (double, int, enum arithop, |
| 2609 | int, Lisp_Object *)); | 2503 | int, Lisp_Object *); |
| 2610 | extern Lisp_Object fmod_float (); | ||
| 2611 | |||
| 2612 | Lisp_Object | 2504 | Lisp_Object |
| 2613 | arith_driver (code, nargs, args) | 2505 | arith_driver (enum arithop code, int nargs, register Lisp_Object *args) |
| 2614 | enum arithop code; | ||
| 2615 | int nargs; | ||
| 2616 | register Lisp_Object *args; | ||
| 2617 | { | 2506 | { |
| 2618 | register Lisp_Object val; | 2507 | register Lisp_Object val; |
| 2619 | register int argnum; | 2508 | register int argnum; |
| @@ -2698,12 +2587,7 @@ arith_driver (code, nargs, args) | |||
| 2698 | #define isnan(x) ((x) != (x)) | 2587 | #define isnan(x) ((x) != (x)) |
| 2699 | 2588 | ||
| 2700 | static Lisp_Object | 2589 | static Lisp_Object |
| 2701 | float_arith_driver (accum, argnum, code, nargs, args) | 2590 | float_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 | { | 2591 | { |
| 2708 | register Lisp_Object val; | 2592 | register Lisp_Object val; |
| 2709 | double next; | 2593 | double next; |
| @@ -2765,9 +2649,7 @@ float_arith_driver (accum, argnum, code, nargs, args) | |||
| 2765 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, | 2649 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, |
| 2766 | doc: /* Return sum of any number of arguments, which are numbers or markers. | 2650 | doc: /* Return sum of any number of arguments, which are numbers or markers. |
| 2767 | usage: (+ &rest NUMBERS-OR-MARKERS) */) | 2651 | usage: (+ &rest NUMBERS-OR-MARKERS) */) |
| 2768 | (nargs, args) | 2652 | (int nargs, Lisp_Object *args) |
| 2769 | int nargs; | ||
| 2770 | Lisp_Object *args; | ||
| 2771 | { | 2653 | { |
| 2772 | return arith_driver (Aadd, nargs, args); | 2654 | return arith_driver (Aadd, nargs, args); |
| 2773 | } | 2655 | } |
| @@ -2777,9 +2659,7 @@ DEFUN ("-", Fminus, Sminus, 0, MANY, 0, | |||
| 2777 | With one arg, negates it. With more than one arg, | 2659 | With one arg, negates it. With more than one arg, |
| 2778 | subtracts all but the first from the first. | 2660 | subtracts all but the first from the first. |
| 2779 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | 2661 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) |
| 2780 | (nargs, args) | 2662 | (int nargs, Lisp_Object *args) |
| 2781 | int nargs; | ||
| 2782 | Lisp_Object *args; | ||
| 2783 | { | 2663 | { |
| 2784 | return arith_driver (Asub, nargs, args); | 2664 | return arith_driver (Asub, nargs, args); |
| 2785 | } | 2665 | } |
| @@ -2787,9 +2667,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | |||
| 2787 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, | 2667 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, |
| 2788 | doc: /* Return product of any number of arguments, which are numbers or markers. | 2668 | doc: /* Return product of any number of arguments, which are numbers or markers. |
| 2789 | usage: (* &rest NUMBERS-OR-MARKERS) */) | 2669 | usage: (* &rest NUMBERS-OR-MARKERS) */) |
| 2790 | (nargs, args) | 2670 | (int nargs, Lisp_Object *args) |
| 2791 | int nargs; | ||
| 2792 | Lisp_Object *args; | ||
| 2793 | { | 2671 | { |
| 2794 | return arith_driver (Amult, nargs, args); | 2672 | return arith_driver (Amult, nargs, args); |
| 2795 | } | 2673 | } |
| @@ -2798,9 +2676,7 @@ DEFUN ("/", Fquo, Squo, 2, MANY, 0, | |||
| 2798 | doc: /* Return first argument divided by all the remaining arguments. | 2676 | doc: /* Return first argument divided by all the remaining arguments. |
| 2799 | The arguments must be numbers or markers. | 2677 | The arguments must be numbers or markers. |
| 2800 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | 2678 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) |
| 2801 | (nargs, args) | 2679 | (int nargs, Lisp_Object *args) |
| 2802 | int nargs; | ||
| 2803 | Lisp_Object *args; | ||
| 2804 | { | 2680 | { |
| 2805 | int argnum; | 2681 | int argnum; |
| 2806 | for (argnum = 2; argnum < nargs; argnum++) | 2682 | for (argnum = 2; argnum < nargs; argnum++) |
| @@ -2812,8 +2688,7 @@ usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | |||
| 2812 | DEFUN ("%", Frem, Srem, 2, 2, 0, | 2688 | DEFUN ("%", Frem, Srem, 2, 2, 0, |
| 2813 | doc: /* Return remainder of X divided by Y. | 2689 | doc: /* Return remainder of X divided by Y. |
| 2814 | Both must be integers or markers. */) | 2690 | Both must be integers or markers. */) |
| 2815 | (x, y) | 2691 | (register Lisp_Object x, Lisp_Object y) |
| 2816 | register Lisp_Object x, y; | ||
| 2817 | { | 2692 | { |
| 2818 | Lisp_Object val; | 2693 | Lisp_Object val; |
| 2819 | 2694 | ||
| @@ -2854,8 +2729,7 @@ DEFUN ("mod", Fmod, Smod, 2, 2, 0, | |||
| 2854 | doc: /* Return X modulo Y. | 2729 | doc: /* Return X modulo Y. |
| 2855 | The result falls between zero (inclusive) and Y (exclusive). | 2730 | The result falls between zero (inclusive) and Y (exclusive). |
| 2856 | Both X and Y must be numbers or markers. */) | 2731 | Both X and Y must be numbers or markers. */) |
| 2857 | (x, y) | 2732 | (register Lisp_Object x, Lisp_Object y) |
| 2858 | register Lisp_Object x, y; | ||
| 2859 | { | 2733 | { |
| 2860 | Lisp_Object val; | 2734 | Lisp_Object val; |
| 2861 | EMACS_INT i1, i2; | 2735 | EMACS_INT i1, i2; |
| @@ -2886,9 +2760,7 @@ DEFUN ("max", Fmax, Smax, 1, MANY, 0, | |||
| 2886 | doc: /* Return largest of all the arguments (which must be numbers or markers). | 2760 | doc: /* Return largest of all the arguments (which must be numbers or markers). |
| 2887 | The value is always a number; markers are converted to numbers. | 2761 | The value is always a number; markers are converted to numbers. |
| 2888 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2762 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2889 | (nargs, args) | 2763 | (int nargs, Lisp_Object *args) |
| 2890 | int nargs; | ||
| 2891 | Lisp_Object *args; | ||
| 2892 | { | 2764 | { |
| 2893 | return arith_driver (Amax, nargs, args); | 2765 | return arith_driver (Amax, nargs, args); |
| 2894 | } | 2766 | } |
| @@ -2897,9 +2769,7 @@ DEFUN ("min", Fmin, Smin, 1, MANY, 0, | |||
| 2897 | doc: /* Return smallest of all the arguments (which must be numbers or markers). | 2769 | doc: /* Return smallest of all the arguments (which must be numbers or markers). |
| 2898 | The value is always a number; markers are converted to numbers. | 2770 | The value is always a number; markers are converted to numbers. |
| 2899 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2771 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2900 | (nargs, args) | 2772 | (int nargs, Lisp_Object *args) |
| 2901 | int nargs; | ||
| 2902 | Lisp_Object *args; | ||
| 2903 | { | 2773 | { |
| 2904 | return arith_driver (Amin, nargs, args); | 2774 | return arith_driver (Amin, nargs, args); |
| 2905 | } | 2775 | } |
| @@ -2908,9 +2778,7 @@ DEFUN ("logand", Flogand, Slogand, 0, MANY, 0, | |||
| 2908 | doc: /* Return bitwise-and of all the arguments. | 2778 | doc: /* Return bitwise-and of all the arguments. |
| 2909 | Arguments may be integers, or markers converted to integers. | 2779 | Arguments may be integers, or markers converted to integers. |
| 2910 | usage: (logand &rest INTS-OR-MARKERS) */) | 2780 | usage: (logand &rest INTS-OR-MARKERS) */) |
| 2911 | (nargs, args) | 2781 | (int nargs, Lisp_Object *args) |
| 2912 | int nargs; | ||
| 2913 | Lisp_Object *args; | ||
| 2914 | { | 2782 | { |
| 2915 | return arith_driver (Alogand, nargs, args); | 2783 | return arith_driver (Alogand, nargs, args); |
| 2916 | } | 2784 | } |
| @@ -2919,9 +2787,7 @@ DEFUN ("logior", Flogior, Slogior, 0, MANY, 0, | |||
| 2919 | doc: /* Return bitwise-or of all the arguments. | 2787 | doc: /* Return bitwise-or of all the arguments. |
| 2920 | Arguments may be integers, or markers converted to integers. | 2788 | Arguments may be integers, or markers converted to integers. |
| 2921 | usage: (logior &rest INTS-OR-MARKERS) */) | 2789 | usage: (logior &rest INTS-OR-MARKERS) */) |
| 2922 | (nargs, args) | 2790 | (int nargs, Lisp_Object *args) |
| 2923 | int nargs; | ||
| 2924 | Lisp_Object *args; | ||
| 2925 | { | 2791 | { |
| 2926 | return arith_driver (Alogior, nargs, args); | 2792 | return arith_driver (Alogior, nargs, args); |
| 2927 | } | 2793 | } |
| @@ -2930,9 +2796,7 @@ DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0, | |||
| 2930 | doc: /* Return bitwise-exclusive-or of all the arguments. | 2796 | doc: /* Return bitwise-exclusive-or of all the arguments. |
| 2931 | Arguments may be integers, or markers converted to integers. | 2797 | Arguments may be integers, or markers converted to integers. |
| 2932 | usage: (logxor &rest INTS-OR-MARKERS) */) | 2798 | usage: (logxor &rest INTS-OR-MARKERS) */) |
| 2933 | (nargs, args) | 2799 | (int nargs, Lisp_Object *args) |
| 2934 | int nargs; | ||
| 2935 | Lisp_Object *args; | ||
| 2936 | { | 2800 | { |
| 2937 | return arith_driver (Alogxor, nargs, args); | 2801 | return arith_driver (Alogxor, nargs, args); |
| 2938 | } | 2802 | } |
| @@ -2941,8 +2805,7 @@ DEFUN ("ash", Fash, Sash, 2, 2, 0, | |||
| 2941 | doc: /* Return VALUE with its bits shifted left by COUNT. | 2805 | doc: /* Return VALUE with its bits shifted left by COUNT. |
| 2942 | If COUNT is negative, shifting is actually to the right. | 2806 | If COUNT is negative, shifting is actually to the right. |
| 2943 | In this case, the sign bit is duplicated. */) | 2807 | In this case, the sign bit is duplicated. */) |
| 2944 | (value, count) | 2808 | (register Lisp_Object value, Lisp_Object count) |
| 2945 | register Lisp_Object value, count; | ||
| 2946 | { | 2809 | { |
| 2947 | register Lisp_Object val; | 2810 | register Lisp_Object val; |
| 2948 | 2811 | ||
| @@ -2964,8 +2827,7 @@ DEFUN ("lsh", Flsh, Slsh, 2, 2, 0, | |||
| 2964 | doc: /* Return VALUE with its bits shifted left by COUNT. | 2827 | doc: /* Return VALUE with its bits shifted left by COUNT. |
| 2965 | If COUNT is negative, shifting is actually to the right. | 2828 | If COUNT is negative, shifting is actually to the right. |
| 2966 | In this case, zeros are shifted in on the left. */) | 2829 | In this case, zeros are shifted in on the left. */) |
| 2967 | (value, count) | 2830 | (register Lisp_Object value, Lisp_Object count) |
| 2968 | register Lisp_Object value, count; | ||
| 2969 | { | 2831 | { |
| 2970 | register Lisp_Object val; | 2832 | register Lisp_Object val; |
| 2971 | 2833 | ||
| @@ -2986,8 +2848,7 @@ In this case, zeros are shifted in on the left. */) | |||
| 2986 | DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, | 2848 | DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, |
| 2987 | doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. | 2849 | doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. |
| 2988 | Markers are converted to integers. */) | 2850 | Markers are converted to integers. */) |
| 2989 | (number) | 2851 | (register Lisp_Object number) |
| 2990 | register Lisp_Object number; | ||
| 2991 | { | 2852 | { |
| 2992 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); | 2853 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); |
| 2993 | 2854 | ||
| @@ -3001,8 +2862,7 @@ Markers are converted to integers. */) | |||
| 3001 | DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, | 2862 | DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, |
| 3002 | doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. | 2863 | doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. |
| 3003 | Markers are converted to integers. */) | 2864 | Markers are converted to integers. */) |
| 3004 | (number) | 2865 | (register Lisp_Object number) |
| 3005 | register Lisp_Object number; | ||
| 3006 | { | 2866 | { |
| 3007 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); | 2867 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); |
| 3008 | 2868 | ||
| @@ -3015,8 +2875,7 @@ Markers are converted to integers. */) | |||
| 3015 | 2875 | ||
| 3016 | DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, | 2876 | DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, |
| 3017 | doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */) | 2877 | doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */) |
| 3018 | (number) | 2878 | (register Lisp_Object number) |
| 3019 | register Lisp_Object number; | ||
| 3020 | { | 2879 | { |
| 3021 | CHECK_NUMBER (number); | 2880 | CHECK_NUMBER (number); |
| 3022 | XSETINT (number, ~XINT (number)); | 2881 | XSETINT (number, ~XINT (number)); |
| @@ -3027,7 +2886,7 @@ DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, | |||
| 3027 | doc: /* Return the byteorder for the machine. | 2886 | doc: /* Return the byteorder for the machine. |
| 3028 | Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII | 2887 | Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII |
| 3029 | lowercase l) for small endian machines. */) | 2888 | lowercase l) for small endian machines. */) |
| 3030 | () | 2889 | (void) |
| 3031 | { | 2890 | { |
| 3032 | unsigned i = 0x04030201; | 2891 | unsigned i = 0x04030201; |
| 3033 | int order = *(char *)&i == 1 ? 108 : 66; | 2892 | int order = *(char *)&i == 1 ? 108 : 66; |
| @@ -3038,7 +2897,7 @@ lowercase l) for small endian machines. */) | |||
| 3038 | 2897 | ||
| 3039 | 2898 | ||
| 3040 | void | 2899 | void |
| 3041 | syms_of_data () | 2900 | syms_of_data (void) |
| 3042 | { | 2901 | { |
| 3043 | Lisp_Object error_tail, arith_tail; | 2902 | Lisp_Object error_tail, arith_tail; |
| 3044 | 2903 | ||
| @@ -3467,8 +3326,7 @@ syms_of_data () | |||
| 3467 | } | 3326 | } |
| 3468 | 3327 | ||
| 3469 | SIGTYPE | 3328 | SIGTYPE |
| 3470 | arith_error (signo) | 3329 | arith_error (int signo) |
| 3471 | int signo; | ||
| 3472 | { | 3330 | { |
| 3473 | sigsetmask (SIGEMPTYMASK); | 3331 | sigsetmask (SIGEMPTYMASK); |
| 3474 | 3332 | ||
| @@ -3477,7 +3335,7 @@ arith_error (signo) | |||
| 3477 | } | 3335 | } |
| 3478 | 3336 | ||
| 3479 | void | 3337 | void |
| 3480 | init_data () | 3338 | init_data (void) |
| 3481 | { | 3339 | { |
| 3482 | /* Don't do this if just dumping out. | 3340 | /* Don't do this if just dumping out. |
| 3483 | We don't want to call `signal' in this case | 3341 | We don't want to call `signal' in this case |