diff options
| author | Stefan Monnier | 2010-07-23 17:23:09 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-07-23 17:23:09 +0200 |
| commit | 0ee81a0ce066375eac701c06cdfbdebefe594fdc (patch) | |
| tree | f0dccd24163316cfe688f927681a3032a9b1fe2f /src/data.c | |
| parent | 894e369ddf48e191638b8e66ce732f24ff9abe2a (diff) | |
| parent | 94da839793affa2a270bc26cee9c4d95d4dc4708 (diff) | |
| download | emacs-0ee81a0ce066375eac701c06cdfbdebefe594fdc.tar.gz emacs-0ee81a0ce066375eac701c06cdfbdebefe594fdc.zip | |
Merge from trunk
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 392 |
1 files changed, 126 insertions, 266 deletions
diff --git a/src/data.c b/src/data.c index 6a21ad44720..cccd53f6076 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; |
| @@ -97,16 +97,14 @@ Lisp_Object Vmost_positive_fixnum, Vmost_negative_fixnum; | |||
| 97 | 97 | ||
| 98 | 98 | ||
| 99 | void | 99 | void |
| 100 | circular_list_error (list) | 100 | circular_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 | ||
| 107 | Lisp_Object | 106 | Lisp_Object |
| 108 | wrong_type_argument (predicate, value) | 107 | wrong_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 | ||
| 121 | void | 119 | void |
| 122 | pure_write_error () | 120 | pure_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 | ||
| 127 | void | 125 | void |
| 128 | args_out_of_range (a1, a2) | 126 | args_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 | ||
| 134 | void | 131 | void |
| 135 | args_out_of_range_3 (a1, a2, a3) | 132 | args_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 | ||
| 148 | int | 144 | int |
| 149 | sign_extend_lisp_int (num) | 145 | sign_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); |
| @@ -159,8 +154,7 @@ sign_extend_lisp_int (num) | |||
| 159 | 154 | ||
| 160 | DEFUN ("eq", Feq, Seq, 2, 2, 0, | 155 | DEFUN ("eq", Feq, Seq, 2, 2, 0, |
| 161 | doc: /* Return t if the two args are the same Lisp object. */) | 156 | doc: /* Return t if the two args are the same Lisp object. */) |
| 162 | (obj1, obj2) | 157 | (Lisp_Object obj1, Lisp_Object obj2) |
| 163 | Lisp_Object obj1, obj2; | ||
| 164 | { | 158 | { |
| 165 | if (EQ (obj1, obj2)) | 159 | if (EQ (obj1, obj2)) |
| 166 | return Qt; | 160 | return Qt; |
| @@ -169,8 +163,7 @@ DEFUN ("eq", Feq, Seq, 2, 2, 0, | |||
| 169 | 163 | ||
| 170 | DEFUN ("null", Fnull, Snull, 1, 1, 0, | 164 | DEFUN ("null", Fnull, Snull, 1, 1, 0, |
| 171 | doc: /* Return t if OBJECT is nil. */) | 165 | doc: /* Return t if OBJECT is nil. */) |
| 172 | (object) | 166 | (Lisp_Object object) |
| 173 | Lisp_Object object; | ||
| 174 | { | 167 | { |
| 175 | if (NILP (object)) | 168 | if (NILP (object)) |
| 176 | return Qt; | 169 | return Qt; |
| @@ -181,8 +174,7 @@ DEFUN ("type-of", Ftype_of, Stype_of, 1, 1, 0, | |||
| 181 | doc: /* Return a symbol representing the type of OBJECT. | 174 | doc: /* Return a symbol representing the type of OBJECT. |
| 182 | The symbol returned names the object's basic type; | 175 | The symbol returned names the object's basic type; |
| 183 | for example, (type-of 1) returns `integer'. */) | 176 | for example, (type-of 1) returns `integer'. */) |
| 184 | (object) | 177 | (Lisp_Object object) |
| 185 | Lisp_Object object; | ||
| 186 | { | 178 | { |
| 187 | switch (XTYPE (object)) | 179 | switch (XTYPE (object)) |
| 188 | { | 180 | { |
| @@ -252,8 +244,7 @@ for example, (type-of 1) returns `integer'. */) | |||
| 252 | 244 | ||
| 253 | DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, | 245 | DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, |
| 254 | doc: /* Return t if OBJECT is a cons cell. */) | 246 | doc: /* Return t if OBJECT is a cons cell. */) |
| 255 | (object) | 247 | (Lisp_Object object) |
| 256 | Lisp_Object object; | ||
| 257 | { | 248 | { |
| 258 | if (CONSP (object)) | 249 | if (CONSP (object)) |
| 259 | return Qt; | 250 | return Qt; |
| @@ -262,8 +253,7 @@ DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, | |||
| 262 | 253 | ||
| 263 | DEFUN ("atom", Fatom, Satom, 1, 1, 0, | 254 | DEFUN ("atom", Fatom, Satom, 1, 1, 0, |
| 264 | doc: /* Return t if OBJECT is not a cons cell. This includes nil. */) | 255 | doc: /* Return t if OBJECT is not a cons cell. This includes nil. */) |
| 265 | (object) | 256 | (Lisp_Object object) |
| 266 | Lisp_Object object; | ||
| 267 | { | 257 | { |
| 268 | if (CONSP (object)) | 258 | if (CONSP (object)) |
| 269 | return Qnil; | 259 | return Qnil; |
| @@ -273,8 +263,7 @@ DEFUN ("atom", Fatom, Satom, 1, 1, 0, | |||
| 273 | DEFUN ("listp", Flistp, Slistp, 1, 1, 0, | 263 | DEFUN ("listp", Flistp, Slistp, 1, 1, 0, |
| 274 | doc: /* Return t if OBJECT is a list, that is, a cons cell or nil. | 264 | doc: /* Return t if OBJECT is a list, that is, a cons cell or nil. |
| 275 | Otherwise, return nil. */) | 265 | Otherwise, return nil. */) |
| 276 | (object) | 266 | (Lisp_Object object) |
| 277 | Lisp_Object object; | ||
| 278 | { | 267 | { |
| 279 | if (CONSP (object) || NILP (object)) | 268 | if (CONSP (object) || NILP (object)) |
| 280 | return Qt; | 269 | return Qt; |
| @@ -283,8 +272,7 @@ Otherwise, return nil. */) | |||
| 283 | 272 | ||
| 284 | DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, | 273 | DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, |
| 285 | doc: /* Return t if OBJECT is not a list. Lists include nil. */) | 274 | doc: /* Return t if OBJECT is not a list. Lists include nil. */) |
| 286 | (object) | 275 | (Lisp_Object object) |
| 287 | Lisp_Object object; | ||
| 288 | { | 276 | { |
| 289 | if (CONSP (object) || NILP (object)) | 277 | if (CONSP (object) || NILP (object)) |
| 290 | return Qnil; | 278 | return Qnil; |
| @@ -293,8 +281,7 @@ DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, | |||
| 293 | 281 | ||
| 294 | DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, | 282 | DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, |
| 295 | doc: /* Return t if OBJECT is a symbol. */) | 283 | doc: /* Return t if OBJECT is a symbol. */) |
| 296 | (object) | 284 | (Lisp_Object object) |
| 297 | Lisp_Object object; | ||
| 298 | { | 285 | { |
| 299 | if (SYMBOLP (object)) | 286 | if (SYMBOLP (object)) |
| 300 | return Qt; | 287 | return Qt; |
| @@ -307,8 +294,7 @@ DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0, | |||
| 307 | doc: /* Return t if OBJECT is a keyword. | 294 | doc: /* Return t if OBJECT is a keyword. |
| 308 | This means that it is a symbol with a print name beginning with `:' | 295 | This means that it is a symbol with a print name beginning with `:' |
| 309 | interned in the initial obarray. */) | 296 | interned in the initial obarray. */) |
| 310 | (object) | 297 | (Lisp_Object object) |
| 311 | Lisp_Object object; | ||
| 312 | { | 298 | { |
| 313 | if (SYMBOLP (object) | 299 | if (SYMBOLP (object) |
| 314 | && SREF (SYMBOL_NAME (object), 0) == ':' | 300 | && SREF (SYMBOL_NAME (object), 0) == ':' |
| @@ -319,8 +305,7 @@ interned in the initial obarray. */) | |||
| 319 | 305 | ||
| 320 | DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, | 306 | DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, |
| 321 | doc: /* Return t if OBJECT is a vector. */) | 307 | doc: /* Return t if OBJECT is a vector. */) |
| 322 | (object) | 308 | (Lisp_Object object) |
| 323 | Lisp_Object object; | ||
| 324 | { | 309 | { |
| 325 | if (VECTORP (object)) | 310 | if (VECTORP (object)) |
| 326 | return Qt; | 311 | return Qt; |
| @@ -329,8 +314,7 @@ DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, | |||
| 329 | 314 | ||
| 330 | DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, | 315 | DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, |
| 331 | doc: /* Return t if OBJECT is a string. */) | 316 | doc: /* Return t if OBJECT is a string. */) |
| 332 | (object) | 317 | (Lisp_Object object) |
| 333 | Lisp_Object object; | ||
| 334 | { | 318 | { |
| 335 | if (STRINGP (object)) | 319 | if (STRINGP (object)) |
| 336 | return Qt; | 320 | return Qt; |
| @@ -340,8 +324,7 @@ DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, | |||
| 340 | DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, | 324 | DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, |
| 341 | 1, 1, 0, | 325 | 1, 1, 0, |
| 342 | doc: /* Return t if OBJECT is a multibyte string. */) | 326 | doc: /* Return t if OBJECT is a multibyte string. */) |
| 343 | (object) | 327 | (Lisp_Object object) |
| 344 | Lisp_Object object; | ||
| 345 | { | 328 | { |
| 346 | if (STRINGP (object) && STRING_MULTIBYTE (object)) | 329 | if (STRINGP (object) && STRING_MULTIBYTE (object)) |
| 347 | return Qt; | 330 | return Qt; |
| @@ -350,8 +333,7 @@ DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, | |||
| 350 | 333 | ||
| 351 | DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0, | 334 | DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0, |
| 352 | doc: /* Return t if OBJECT is a char-table. */) | 335 | doc: /* Return t if OBJECT is a char-table. */) |
| 353 | (object) | 336 | (Lisp_Object object) |
| 354 | Lisp_Object object; | ||
| 355 | { | 337 | { |
| 356 | if (CHAR_TABLE_P (object)) | 338 | if (CHAR_TABLE_P (object)) |
| 357 | return Qt; | 339 | return Qt; |
| @@ -361,8 +343,7 @@ DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0, | |||
| 361 | DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p, | 343 | DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p, |
| 362 | Svector_or_char_table_p, 1, 1, 0, | 344 | Svector_or_char_table_p, 1, 1, 0, |
| 363 | doc: /* Return t if OBJECT is a char-table or vector. */) | 345 | doc: /* Return t if OBJECT is a char-table or vector. */) |
| 364 | (object) | 346 | (Lisp_Object object) |
| 365 | Lisp_Object object; | ||
| 366 | { | 347 | { |
| 367 | if (VECTORP (object) || CHAR_TABLE_P (object)) | 348 | if (VECTORP (object) || CHAR_TABLE_P (object)) |
| 368 | return Qt; | 349 | return Qt; |
| @@ -371,8 +352,7 @@ DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p, | |||
| 371 | 352 | ||
| 372 | DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, | 353 | DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, |
| 373 | doc: /* Return t if OBJECT is a bool-vector. */) | 354 | doc: /* Return t if OBJECT is a bool-vector. */) |
| 374 | (object) | 355 | (Lisp_Object object) |
| 375 | Lisp_Object object; | ||
| 376 | { | 356 | { |
| 377 | if (BOOL_VECTOR_P (object)) | 357 | if (BOOL_VECTOR_P (object)) |
| 378 | return Qt; | 358 | return Qt; |
| @@ -381,8 +361,7 @@ DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, | |||
| 381 | 361 | ||
| 382 | DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, | 362 | DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, |
| 383 | doc: /* Return t if OBJECT is an array (string or vector). */) | 363 | doc: /* Return t if OBJECT is an array (string or vector). */) |
| 384 | (object) | 364 | (Lisp_Object object) |
| 385 | Lisp_Object object; | ||
| 386 | { | 365 | { |
| 387 | if (ARRAYP (object)) | 366 | if (ARRAYP (object)) |
| 388 | return Qt; | 367 | return Qt; |
| @@ -391,8 +370,7 @@ DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, | |||
| 391 | 370 | ||
| 392 | DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, | 371 | DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, |
| 393 | doc: /* Return t if OBJECT is a sequence (list or array). */) | 372 | doc: /* Return t if OBJECT is a sequence (list or array). */) |
| 394 | (object) | 373 | (register Lisp_Object object) |
| 395 | register Lisp_Object object; | ||
| 396 | { | 374 | { |
| 397 | if (CONSP (object) || NILP (object) || ARRAYP (object)) | 375 | if (CONSP (object) || NILP (object) || ARRAYP (object)) |
| 398 | return Qt; | 376 | return Qt; |
| @@ -401,8 +379,7 @@ DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, | |||
| 401 | 379 | ||
| 402 | DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, | 380 | DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, |
| 403 | doc: /* Return t if OBJECT is an editor buffer. */) | 381 | doc: /* Return t if OBJECT is an editor buffer. */) |
| 404 | (object) | 382 | (Lisp_Object object) |
| 405 | Lisp_Object object; | ||
| 406 | { | 383 | { |
| 407 | if (BUFFERP (object)) | 384 | if (BUFFERP (object)) |
| 408 | return Qt; | 385 | return Qt; |
| @@ -411,8 +388,7 @@ DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, | |||
| 411 | 388 | ||
| 412 | DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, | 389 | DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, |
| 413 | doc: /* Return t if OBJECT is a marker (editor pointer). */) | 390 | doc: /* Return t if OBJECT is a marker (editor pointer). */) |
| 414 | (object) | 391 | (Lisp_Object object) |
| 415 | Lisp_Object object; | ||
| 416 | { | 392 | { |
| 417 | if (MARKERP (object)) | 393 | if (MARKERP (object)) |
| 418 | return Qt; | 394 | return Qt; |
| @@ -421,8 +397,7 @@ DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, | |||
| 421 | 397 | ||
| 422 | DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, | 398 | DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, |
| 423 | doc: /* Return t if OBJECT is a built-in function. */) | 399 | doc: /* Return t if OBJECT is a built-in function. */) |
| 424 | (object) | 400 | (Lisp_Object object) |
| 425 | Lisp_Object object; | ||
| 426 | { | 401 | { |
| 427 | if (SUBRP (object)) | 402 | if (SUBRP (object)) |
| 428 | return Qt; | 403 | return Qt; |
| @@ -432,8 +407,7 @@ DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, | |||
| 432 | DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p, | 407 | DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p, |
| 433 | 1, 1, 0, | 408 | 1, 1, 0, |
| 434 | doc: /* Return t if OBJECT is a byte-compiled function object. */) | 409 | doc: /* Return t if OBJECT is a byte-compiled function object. */) |
| 435 | (object) | 410 | (Lisp_Object object) |
| 436 | Lisp_Object object; | ||
| 437 | { | 411 | { |
| 438 | if (COMPILEDP (object)) | 412 | if (COMPILEDP (object)) |
| 439 | return Qt; | 413 | return Qt; |
| @@ -450,8 +424,7 @@ DEFUN ("funvecp", Ffunvecp, Sfunvecp, 1, 1, 0, | |||
| 450 | 424 | ||
| 451 | DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, | 425 | DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, |
| 452 | doc: /* Return t if OBJECT is a character or a string. */) | 426 | doc: /* Return t if OBJECT is a character or a string. */) |
| 453 | (object) | 427 | (register Lisp_Object object) |
| 454 | register Lisp_Object object; | ||
| 455 | { | 428 | { |
| 456 | if (CHARACTERP (object) || STRINGP (object)) | 429 | if (CHARACTERP (object) || STRINGP (object)) |
| 457 | return Qt; | 430 | return Qt; |
| @@ -460,8 +433,7 @@ DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, | |||
| 460 | 433 | ||
| 461 | DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, | 434 | DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, |
| 462 | doc: /* Return t if OBJECT is an integer. */) | 435 | doc: /* Return t if OBJECT is an integer. */) |
| 463 | (object) | 436 | (Lisp_Object object) |
| 464 | Lisp_Object object; | ||
| 465 | { | 437 | { |
| 466 | if (INTEGERP (object)) | 438 | if (INTEGERP (object)) |
| 467 | return Qt; | 439 | return Qt; |
| @@ -470,8 +442,7 @@ DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, | |||
| 470 | 442 | ||
| 471 | DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, | 443 | DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, |
| 472 | doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */) | 444 | doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */) |
| 473 | (object) | 445 | (register Lisp_Object object) |
| 474 | register Lisp_Object object; | ||
| 475 | { | 446 | { |
| 476 | if (MARKERP (object) || INTEGERP (object)) | 447 | if (MARKERP (object) || INTEGERP (object)) |
| 477 | return Qt; | 448 | return Qt; |
| @@ -480,8 +451,7 @@ DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, | |||
| 480 | 451 | ||
| 481 | DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, | 452 | DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, |
| 482 | doc: /* Return t if OBJECT is a nonnegative integer. */) | 453 | doc: /* Return t if OBJECT is a nonnegative integer. */) |
| 483 | (object) | 454 | (Lisp_Object object) |
| 484 | Lisp_Object object; | ||
| 485 | { | 455 | { |
| 486 | if (NATNUMP (object)) | 456 | if (NATNUMP (object)) |
| 487 | return Qt; | 457 | return Qt; |
| @@ -490,8 +460,7 @@ DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, | |||
| 490 | 460 | ||
| 491 | DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, | 461 | DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, |
| 492 | doc: /* Return t if OBJECT is a number (floating point or integer). */) | 462 | doc: /* Return t if OBJECT is a number (floating point or integer). */) |
| 493 | (object) | 463 | (Lisp_Object object) |
| 494 | Lisp_Object object; | ||
| 495 | { | 464 | { |
| 496 | if (NUMBERP (object)) | 465 | if (NUMBERP (object)) |
| 497 | return Qt; | 466 | return Qt; |
| @@ -502,8 +471,7 @@ DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, | |||
| 502 | DEFUN ("number-or-marker-p", Fnumber_or_marker_p, | 471 | DEFUN ("number-or-marker-p", Fnumber_or_marker_p, |
| 503 | Snumber_or_marker_p, 1, 1, 0, | 472 | Snumber_or_marker_p, 1, 1, 0, |
| 504 | doc: /* Return t if OBJECT is a number or a marker. */) | 473 | doc: /* Return t if OBJECT is a number or a marker. */) |
| 505 | (object) | 474 | (Lisp_Object object) |
| 506 | Lisp_Object object; | ||
| 507 | { | 475 | { |
| 508 | if (NUMBERP (object) || MARKERP (object)) | 476 | if (NUMBERP (object) || MARKERP (object)) |
| 509 | return Qt; | 477 | return Qt; |
| @@ -512,8 +480,7 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p, | |||
| 512 | 480 | ||
| 513 | DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, | 481 | DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, |
| 514 | doc: /* Return t if OBJECT is a floating point number. */) | 482 | doc: /* Return t if OBJECT is a floating point number. */) |
| 515 | (object) | 483 | (Lisp_Object object) |
| 516 | Lisp_Object object; | ||
| 517 | { | 484 | { |
| 518 | if (FLOATP (object)) | 485 | if (FLOATP (object)) |
| 519 | return Qt; | 486 | return Qt; |
| @@ -529,16 +496,14 @@ Error if arg is not nil and not a cons cell. See also `car-safe'. | |||
| 529 | 496 | ||
| 530 | See Info node `(elisp)Cons Cells' for a discussion of related basic | 497 | See Info node `(elisp)Cons Cells' for a discussion of related basic |
| 531 | Lisp concepts such as car, cdr, cons cell and list. */) | 498 | Lisp concepts such as car, cdr, cons cell and list. */) |
| 532 | (list) | 499 | (register Lisp_Object list) |
| 533 | register Lisp_Object list; | ||
| 534 | { | 500 | { |
| 535 | return CAR (list); | 501 | return CAR (list); |
| 536 | } | 502 | } |
| 537 | 503 | ||
| 538 | DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, | 504 | DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, |
| 539 | doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) | 505 | doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) |
| 540 | (object) | 506 | (Lisp_Object object) |
| 541 | Lisp_Object object; | ||
| 542 | { | 507 | { |
| 543 | return CAR_SAFE (object); | 508 | return CAR_SAFE (object); |
| 544 | } | 509 | } |
| @@ -549,24 +514,21 @@ Error if arg is not nil and not a cons cell. See also `cdr-safe'. | |||
| 549 | 514 | ||
| 550 | See Info node `(elisp)Cons Cells' for a discussion of related basic | 515 | See Info node `(elisp)Cons Cells' for a discussion of related basic |
| 551 | Lisp concepts such as cdr, car, cons cell and list. */) | 516 | Lisp concepts such as cdr, car, cons cell and list. */) |
| 552 | (list) | 517 | (register Lisp_Object list) |
| 553 | register Lisp_Object list; | ||
| 554 | { | 518 | { |
| 555 | return CDR (list); | 519 | return CDR (list); |
| 556 | } | 520 | } |
| 557 | 521 | ||
| 558 | DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, | 522 | DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, |
| 559 | doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) | 523 | doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) |
| 560 | (object) | 524 | (Lisp_Object object) |
| 561 | Lisp_Object object; | ||
| 562 | { | 525 | { |
| 563 | return CDR_SAFE (object); | 526 | return CDR_SAFE (object); |
| 564 | } | 527 | } |
| 565 | 528 | ||
| 566 | DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | 529 | DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, |
| 567 | doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) | 530 | doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) |
| 568 | (cell, newcar) | 531 | (register Lisp_Object cell, Lisp_Object newcar) |
| 569 | register Lisp_Object cell, newcar; | ||
| 570 | { | 532 | { |
| 571 | CHECK_CONS (cell); | 533 | CHECK_CONS (cell); |
| 572 | CHECK_IMPURE (cell); | 534 | CHECK_IMPURE (cell); |
| @@ -576,8 +538,7 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | |||
| 576 | 538 | ||
| 577 | DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | 539 | DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, |
| 578 | doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) | 540 | doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) |
| 579 | (cell, newcdr) | 541 | (register Lisp_Object cell, Lisp_Object newcdr) |
| 580 | register Lisp_Object cell, newcdr; | ||
| 581 | { | 542 | { |
| 582 | CHECK_CONS (cell); | 543 | CHECK_CONS (cell); |
| 583 | CHECK_IMPURE (cell); | 544 | CHECK_IMPURE (cell); |
| @@ -589,8 +550,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | |||
| 589 | 550 | ||
| 590 | DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, | 551 | DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, |
| 591 | doc: /* Return t if SYMBOL's value is not void. */) | 552 | doc: /* Return t if SYMBOL's value is not void. */) |
| 592 | (symbol) | 553 | (register Lisp_Object symbol) |
| 593 | register Lisp_Object symbol; | ||
| 594 | { | 554 | { |
| 595 | Lisp_Object valcontents; | 555 | Lisp_Object valcontents; |
| 596 | struct Lisp_Symbol *sym; | 556 | struct Lisp_Symbol *sym; |
| @@ -628,8 +588,7 @@ DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, | |||
| 628 | 588 | ||
| 629 | DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, | 589 | DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, |
| 630 | doc: /* Return t if SYMBOL's function definition is not void. */) | 590 | doc: /* Return t if SYMBOL's function definition is not void. */) |
| 631 | (symbol) | 591 | (register Lisp_Object symbol) |
| 632 | register Lisp_Object symbol; | ||
| 633 | { | 592 | { |
| 634 | CHECK_SYMBOL (symbol); | 593 | CHECK_SYMBOL (symbol); |
| 635 | return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt); | 594 | return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt); |
| @@ -638,8 +597,7 @@ DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, | |||
| 638 | DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0, | 597 | DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0, |
| 639 | doc: /* Make SYMBOL's value be void. | 598 | doc: /* Make SYMBOL's value be void. |
| 640 | Return SYMBOL. */) | 599 | Return SYMBOL. */) |
| 641 | (symbol) | 600 | (register Lisp_Object symbol) |
| 642 | register Lisp_Object symbol; | ||
| 643 | { | 601 | { |
| 644 | CHECK_SYMBOL (symbol); | 602 | CHECK_SYMBOL (symbol); |
| 645 | if (SYMBOL_CONSTANT_P (symbol)) | 603 | if (SYMBOL_CONSTANT_P (symbol)) |
| @@ -651,8 +609,7 @@ Return SYMBOL. */) | |||
| 651 | DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, | 609 | DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, |
| 652 | doc: /* Make SYMBOL's function definition be void. | 610 | doc: /* Make SYMBOL's function definition be void. |
| 653 | Return SYMBOL. */) | 611 | Return SYMBOL. */) |
| 654 | (symbol) | 612 | (register Lisp_Object symbol) |
| 655 | register Lisp_Object symbol; | ||
| 656 | { | 613 | { |
| 657 | CHECK_SYMBOL (symbol); | 614 | CHECK_SYMBOL (symbol); |
| 658 | if (NILP (symbol) || EQ (symbol, Qt)) | 615 | if (NILP (symbol) || EQ (symbol, Qt)) |
| @@ -663,8 +620,7 @@ Return SYMBOL. */) | |||
| 663 | 620 | ||
| 664 | DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | 621 | DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, |
| 665 | doc: /* Return SYMBOL's function definition. Error if that is void. */) | 622 | doc: /* Return SYMBOL's function definition. Error if that is void. */) |
| 666 | (symbol) | 623 | (register Lisp_Object symbol) |
| 667 | register Lisp_Object symbol; | ||
| 668 | { | 624 | { |
| 669 | CHECK_SYMBOL (symbol); | 625 | CHECK_SYMBOL (symbol); |
| 670 | if (!EQ (XSYMBOL (symbol)->function, Qunbound)) | 626 | if (!EQ (XSYMBOL (symbol)->function, Qunbound)) |
| @@ -674,8 +630,7 @@ DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | |||
| 674 | 630 | ||
| 675 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | 631 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, |
| 676 | doc: /* Return SYMBOL's property list. */) | 632 | doc: /* Return SYMBOL's property list. */) |
| 677 | (symbol) | 633 | (register Lisp_Object symbol) |
| 678 | register Lisp_Object symbol; | ||
| 679 | { | 634 | { |
| 680 | CHECK_SYMBOL (symbol); | 635 | CHECK_SYMBOL (symbol); |
| 681 | return XSYMBOL (symbol)->plist; | 636 | return XSYMBOL (symbol)->plist; |
| @@ -683,8 +638,7 @@ DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | |||
| 683 | 638 | ||
| 684 | DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, | 639 | DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, |
| 685 | doc: /* Return SYMBOL's name, a string. */) | 640 | doc: /* Return SYMBOL's name, a string. */) |
| 686 | (symbol) | 641 | (register Lisp_Object symbol) |
| 687 | register Lisp_Object symbol; | ||
| 688 | { | 642 | { |
| 689 | register Lisp_Object name; | 643 | register Lisp_Object name; |
| 690 | 644 | ||
| @@ -695,8 +649,7 @@ DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, | |||
| 695 | 649 | ||
| 696 | DEFUN ("fset", Ffset, Sfset, 2, 2, 0, | 650 | DEFUN ("fset", Ffset, Sfset, 2, 2, 0, |
| 697 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) | 651 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) |
| 698 | (symbol, definition) | 652 | (register Lisp_Object symbol, Lisp_Object definition) |
| 699 | register Lisp_Object symbol, definition; | ||
| 700 | { | 653 | { |
| 701 | register Lisp_Object function; | 654 | register Lisp_Object function; |
| 702 | 655 | ||
| @@ -730,8 +683,7 @@ Associates the function with the current load file, if any. | |||
| 730 | The optional third argument DOCSTRING specifies the documentation string | 683 | The optional third argument DOCSTRING specifies the documentation string |
| 731 | for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string | 684 | for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string |
| 732 | determined by DEFINITION. */) | 685 | determined by DEFINITION. */) |
| 733 | (symbol, definition, docstring) | 686 | (register Lisp_Object symbol, Lisp_Object definition, Lisp_Object docstring) |
| 734 | register Lisp_Object symbol, definition, docstring; | ||
| 735 | { | 687 | { |
| 736 | CHECK_SYMBOL (symbol); | 688 | CHECK_SYMBOL (symbol); |
| 737 | if (CONSP (XSYMBOL (symbol)->function) | 689 | if (CONSP (XSYMBOL (symbol)->function) |
| @@ -746,8 +698,7 @@ determined by DEFINITION. */) | |||
| 746 | 698 | ||
| 747 | DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0, | 699 | DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0, |
| 748 | doc: /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */) | 700 | doc: /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */) |
| 749 | (symbol, newplist) | 701 | (register Lisp_Object symbol, Lisp_Object newplist) |
| 750 | register Lisp_Object symbol, newplist; | ||
| 751 | { | 702 | { |
| 752 | CHECK_SYMBOL (symbol); | 703 | CHECK_SYMBOL (symbol); |
| 753 | XSYMBOL (symbol)->plist = newplist; | 704 | XSYMBOL (symbol)->plist = newplist; |
| @@ -760,8 +711,7 @@ SUBR must be a built-in function. | |||
| 760 | The returned value is a pair (MIN . MAX). MIN is the minimum number | 711 | The returned value is a pair (MIN . MAX). MIN is the minimum number |
| 761 | of args. MAX is the maximum number or the symbol `many', for a | 712 | of args. MAX is the maximum number or the symbol `many', for a |
| 762 | function with `&rest' args, or `unevalled' for a special form. */) | 713 | function with `&rest' args, or `unevalled' for a special form. */) |
| 763 | (subr) | 714 | (Lisp_Object subr) |
| 764 | Lisp_Object subr; | ||
| 765 | { | 715 | { |
| 766 | short minargs, maxargs; | 716 | short minargs, maxargs; |
| 767 | CHECK_SUBR (subr); | 717 | CHECK_SUBR (subr); |
| @@ -778,8 +728,7 @@ function with `&rest' args, or `unevalled' for a special form. */) | |||
| 778 | DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, | 728 | DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, |
| 779 | doc: /* Return name of subroutine SUBR. | 729 | doc: /* Return name of subroutine SUBR. |
| 780 | SUBR must be a built-in function. */) | 730 | SUBR must be a built-in function. */) |
| 781 | (subr) | 731 | (Lisp_Object subr) |
| 782 | Lisp_Object subr; | ||
| 783 | { | 732 | { |
| 784 | const char *name; | 733 | const char *name; |
| 785 | CHECK_SUBR (subr); | 734 | CHECK_SUBR (subr); |
| @@ -791,8 +740,7 @@ DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, | |||
| 791 | doc: /* Return the interactive form of CMD or nil if none. | 740 | doc: /* Return the interactive form of CMD or nil if none. |
| 792 | If CMD is not a command, the return value is nil. | 741 | If CMD is not a command, the return value is nil. |
| 793 | Value, if non-nil, is a list \(interactive SPEC). */) | 742 | Value, if non-nil, is a list \(interactive SPEC). */) |
| 794 | (cmd) | 743 | (Lisp_Object cmd) |
| 795 | Lisp_Object cmd; | ||
| 796 | { | 744 | { |
| 797 | Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ | 745 | Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ |
| 798 | 746 | ||
| @@ -851,8 +799,7 @@ Value, if non-nil, is a list \(interactive SPEC). */) | |||
| 851 | indirections contains a loop. */ | 799 | indirections contains a loop. */ |
| 852 | 800 | ||
| 853 | struct Lisp_Symbol * | 801 | struct Lisp_Symbol * |
| 854 | indirect_variable (symbol) | 802 | indirect_variable (struct Lisp_Symbol *symbol) |
| 855 | struct Lisp_Symbol *symbol; | ||
| 856 | { | 803 | { |
| 857 | struct Lisp_Symbol *tortoise, *hare; | 804 | struct Lisp_Symbol *tortoise, *hare; |
| 858 | 805 | ||
| @@ -885,8 +832,7 @@ If OBJECT is a symbol, follow all variable indirections and return the final | |||
| 885 | variable. If OBJECT is not a symbol, just return it. | 832 | variable. If OBJECT is not a symbol, just return it. |
| 886 | Signal a cyclic-variable-indirection error if there is a loop in the | 833 | Signal a cyclic-variable-indirection error if there is a loop in the |
| 887 | variable chain of symbols. */) | 834 | variable chain of symbols. */) |
| 888 | (object) | 835 | (Lisp_Object object) |
| 889 | Lisp_Object object; | ||
| 890 | { | 836 | { |
| 891 | if (SYMBOLP (object)) | 837 | if (SYMBOLP (object)) |
| 892 | XSETSYMBOL (object, indirect_variable (XSYMBOL (object))); | 838 | XSETSYMBOL (object, indirect_variable (XSYMBOL (object))); |
| @@ -903,8 +849,7 @@ variable chain of symbols. */) | |||
| 903 | ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) | 849 | ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) |
| 904 | 850 | ||
| 905 | Lisp_Object | 851 | Lisp_Object |
| 906 | do_symval_forwarding (valcontents) | 852 | do_symval_forwarding (register union Lisp_Fwd *valcontents) |
| 907 | register union Lisp_Fwd *valcontents; | ||
| 908 | { | 853 | { |
| 909 | register Lisp_Object val; | 854 | register Lisp_Object val; |
| 910 | switch (XFWDTYPE (valcontents)) | 855 | switch (XFWDTYPE (valcontents)) |
| @@ -958,11 +903,7 @@ do_symval_forwarding (valcontents) | |||
| 958 | } while (0) | 903 | } while (0) |
| 959 | 904 | ||
| 960 | static void | 905 | static void |
| 961 | store_symval_forwarding (/* symbol, */ valcontents, newval, buf) | 906 | store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf) |
| 962 | /* struct Lisp_Symbol *symbol; */ | ||
| 963 | union Lisp_Fwd *valcontents; | ||
| 964 | register Lisp_Object newval; | ||
| 965 | struct buffer *buf; | ||
| 966 | { | 907 | { |
| 967 | switch (XFWDTYPE (valcontents)) | 908 | switch (XFWDTYPE (valcontents)) |
| 968 | { | 909 | { |
| @@ -1043,8 +984,7 @@ store_symval_forwarding (/* symbol, */ valcontents, newval, buf) | |||
| 1043 | This makes it safe to alter the status of other bindings. */ | 984 | This makes it safe to alter the status of other bindings. */ |
| 1044 | 985 | ||
| 1045 | void | 986 | void |
| 1046 | swap_in_global_binding (symbol) | 987 | swap_in_global_binding (struct Lisp_Symbol *symbol) |
| 1047 | struct Lisp_Symbol *symbol; | ||
| 1048 | { | 988 | { |
| 1049 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol); | 989 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (symbol); |
| 1050 | 990 | ||
| @@ -1070,9 +1010,7 @@ swap_in_global_binding (symbol) | |||
| 1070 | This could be another forwarding pointer. */ | 1010 | This could be another forwarding pointer. */ |
| 1071 | 1011 | ||
| 1072 | static void | 1012 | static void |
| 1073 | swap_in_symval_forwarding (symbol, blv) | 1013 | swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_Value *blv) |
| 1074 | struct Lisp_Symbol *symbol; | ||
| 1075 | struct Lisp_Buffer_Local_Value *blv; | ||
| 1076 | { | 1014 | { |
| 1077 | register Lisp_Object tem1; | 1015 | register Lisp_Object tem1; |
| 1078 | 1016 | ||
| @@ -1122,8 +1060,7 @@ swap_in_symval_forwarding (symbol, blv) | |||
| 1122 | within this function. Great care is required for this. */ | 1060 | within this function. Great care is required for this. */ |
| 1123 | 1061 | ||
| 1124 | Lisp_Object | 1062 | Lisp_Object |
| 1125 | find_symbol_value (symbol) | 1063 | find_symbol_value (Lisp_Object symbol) |
| 1126 | Lisp_Object symbol; | ||
| 1127 | { | 1064 | { |
| 1128 | struct Lisp_Symbol *sym; | 1065 | struct Lisp_Symbol *sym; |
| 1129 | 1066 | ||
| @@ -1150,8 +1087,7 @@ find_symbol_value (symbol) | |||
| 1150 | 1087 | ||
| 1151 | DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | 1088 | DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, |
| 1152 | doc: /* Return SYMBOL's value. Error if that is void. */) | 1089 | doc: /* Return SYMBOL's value. Error if that is void. */) |
| 1153 | (symbol) | 1090 | (Lisp_Object symbol) |
| 1154 | Lisp_Object symbol; | ||
| 1155 | { | 1091 | { |
| 1156 | Lisp_Object val; | 1092 | Lisp_Object val; |
| 1157 | 1093 | ||
| @@ -1164,8 +1100,7 @@ DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | |||
| 1164 | 1100 | ||
| 1165 | DEFUN ("set", Fset, Sset, 2, 2, 0, | 1101 | DEFUN ("set", Fset, Sset, 2, 2, 0, |
| 1166 | doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) | 1102 | doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) |
| 1167 | (symbol, newval) | 1103 | (register Lisp_Object symbol, Lisp_Object newval) |
| 1168 | register Lisp_Object symbol, newval; | ||
| 1169 | { | 1104 | { |
| 1170 | set_internal (symbol, newval, Qnil, 0); | 1105 | set_internal (symbol, newval, Qnil, 0); |
| 1171 | return newval; | 1106 | return newval; |
| @@ -1194,8 +1129,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | |||
| 1194 | } | 1129 | } |
| 1195 | 1130 | ||
| 1196 | static int | 1131 | static int |
| 1197 | let_shadows_global_binding_p (symbol) | 1132 | let_shadows_global_binding_p (Lisp_Object symbol) |
| 1198 | Lisp_Object symbol; | ||
| 1199 | { | 1133 | { |
| 1200 | struct specbinding *p; | 1134 | struct specbinding *p; |
| 1201 | 1135 | ||
| @@ -1215,9 +1149,7 @@ let_shadows_global_binding_p (symbol) | |||
| 1215 | If BINDFLAG is nonzero, we don't do that. */ | 1149 | If BINDFLAG is nonzero, we don't do that. */ |
| 1216 | 1150 | ||
| 1217 | void | 1151 | void |
| 1218 | set_internal (symbol, newval, where, bindflag) | 1152 | set_internal (register Lisp_Object symbol, register Lisp_Object newval, register Lisp_Object where, int bindflag) |
| 1219 | register Lisp_Object symbol, newval, where; | ||
| 1220 | int bindflag; | ||
| 1221 | { | 1153 | { |
| 1222 | int voide = EQ (newval, Qunbound); | 1154 | int voide = EQ (newval, Qunbound); |
| 1223 | struct Lisp_Symbol *sym; | 1155 | struct Lisp_Symbol *sym; |
| @@ -1368,8 +1300,7 @@ set_internal (symbol, newval, where, bindflag) | |||
| 1368 | Return Qunbound if it is void. */ | 1300 | Return Qunbound if it is void. */ |
| 1369 | 1301 | ||
| 1370 | Lisp_Object | 1302 | Lisp_Object |
| 1371 | default_value (symbol) | 1303 | default_value (Lisp_Object symbol) |
| 1372 | Lisp_Object symbol; | ||
| 1373 | { | 1304 | { |
| 1374 | struct Lisp_Symbol *sym; | 1305 | struct Lisp_Symbol *sym; |
| 1375 | 1306 | ||
| @@ -1417,8 +1348,7 @@ DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, | |||
| 1417 | doc: /* Return t if SYMBOL has a non-void default value. | 1348 | doc: /* Return t if SYMBOL has a non-void default value. |
| 1418 | 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 |
| 1419 | for this variable. */) | 1350 | for this variable. */) |
| 1420 | (symbol) | 1351 | (Lisp_Object symbol) |
| 1421 | Lisp_Object symbol; | ||
| 1422 | { | 1352 | { |
| 1423 | register Lisp_Object value; | 1353 | register Lisp_Object value; |
| 1424 | 1354 | ||
| @@ -1431,8 +1361,7 @@ DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, | |||
| 1431 | This is the value that is seen in buffers that do not have their own values | 1361 | This is the value that is seen in buffers that do not have their own values |
| 1432 | for this variable. The default value is meaningful for variables with | 1362 | for this variable. The default value is meaningful for variables with |
| 1433 | local bindings in certain buffers. */) | 1363 | local bindings in certain buffers. */) |
| 1434 | (symbol) | 1364 | (Lisp_Object symbol) |
| 1435 | Lisp_Object symbol; | ||
| 1436 | { | 1365 | { |
| 1437 | register Lisp_Object value; | 1366 | register Lisp_Object value; |
| 1438 | 1367 | ||
| @@ -1447,8 +1376,7 @@ DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, | |||
| 1447 | doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. | 1376 | doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. |
| 1448 | The default value is seen in buffers that do not have their own values | 1377 | The default value is seen in buffers that do not have their own values |
| 1449 | for this variable. */) | 1378 | for this variable. */) |
| 1450 | (symbol, value) | 1379 | (Lisp_Object symbol, Lisp_Object value) |
| 1451 | Lisp_Object symbol, value; | ||
| 1452 | { | 1380 | { |
| 1453 | struct Lisp_Symbol *sym; | 1381 | struct Lisp_Symbol *sym; |
| 1454 | 1382 | ||
| @@ -1527,8 +1455,7 @@ This sets each VAR's default value to the corresponding VALUE. | |||
| 1527 | The VALUE for the Nth VAR can refer to the new default values | 1455 | The VALUE for the Nth VAR can refer to the new default values |
| 1528 | of previous VARs. | 1456 | of previous VARs. |
| 1529 | usage: (setq-default [VAR VALUE]...) */) | 1457 | usage: (setq-default [VAR VALUE]...) */) |
| 1530 | (args) | 1458 | (Lisp_Object args) |
| 1531 | Lisp_Object args; | ||
| 1532 | { | 1459 | { |
| 1533 | register Lisp_Object args_left; | 1460 | register Lisp_Object args_left; |
| 1534 | register Lisp_Object val, symbol; | 1461 | register Lisp_Object val, symbol; |
| @@ -1602,8 +1529,7 @@ In most cases it is better to use `make-local-variable', | |||
| 1602 | which makes a variable local in just one buffer. | 1529 | which makes a variable local in just one buffer. |
| 1603 | 1530 | ||
| 1604 | The function `default-value' gets the default value and `set-default' sets it. */) | 1531 | The function `default-value' gets the default value and `set-default' sets it. */) |
| 1605 | (variable) | 1532 | (register Lisp_Object variable) |
| 1606 | register Lisp_Object variable; | ||
| 1607 | { | 1533 | { |
| 1608 | struct Lisp_Symbol *sym; | 1534 | struct Lisp_Symbol *sym; |
| 1609 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1535 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| @@ -1680,8 +1606,7 @@ See also `make-variable-buffer-local'. | |||
| 1680 | 1606 | ||
| 1681 | Do not use `make-local-variable' to make a hook variable buffer-local. | 1607 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 1682 | Instead, use `add-hook' and specify t for the LOCAL argument. */) | 1608 | Instead, use `add-hook' and specify t for the LOCAL argument. */) |
| 1683 | (variable) | 1609 | (register Lisp_Object variable) |
| 1684 | register Lisp_Object variable; | ||
| 1685 | { | 1610 | { |
| 1686 | register Lisp_Object tem; | 1611 | register Lisp_Object tem; |
| 1687 | int forwarded; | 1612 | int forwarded; |
| @@ -1782,8 +1707,7 @@ DEFUN ("kill-local-variable", Fkill_local_variable, Skill_local_variable, | |||
| 1782 | 1, 1, "vKill Local Variable: ", | 1707 | 1, 1, "vKill Local Variable: ", |
| 1783 | doc: /* Make VARIABLE no longer have a separate value in the current buffer. | 1708 | doc: /* Make VARIABLE no longer have a separate value in the current buffer. |
| 1784 | From now on the default value will apply in this buffer. Return VARIABLE. */) | 1709 | From now on the default value will apply in this buffer. Return VARIABLE. */) |
| 1785 | (variable) | 1710 | (register Lisp_Object variable) |
| 1786 | register Lisp_Object variable; | ||
| 1787 | { | 1711 | { |
| 1788 | register Lisp_Object tem; | 1712 | register Lisp_Object tem; |
| 1789 | struct Lisp_Buffer_Local_Value *blv; | 1713 | struct Lisp_Buffer_Local_Value *blv; |
| @@ -1871,8 +1795,7 @@ is to set the VARIABLE frame parameter of that frame. See | |||
| 1871 | Note that since Emacs 23.1, variables cannot be both buffer-local and | 1795 | Note that since Emacs 23.1, variables cannot be both buffer-local and |
| 1872 | frame-local any more (buffer-local bindings used to take precedence over | 1796 | frame-local any more (buffer-local bindings used to take precedence over |
| 1873 | frame-local bindings). */) | 1797 | frame-local bindings). */) |
| 1874 | (variable) | 1798 | (register Lisp_Object variable) |
| 1875 | register Lisp_Object variable; | ||
| 1876 | { | 1799 | { |
| 1877 | int forwarded; | 1800 | int forwarded; |
| 1878 | union Lisp_Val_Fwd valcontents; | 1801 | union Lisp_Val_Fwd valcontents; |
| @@ -1927,8 +1850,7 @@ DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, | |||
| 1927 | 1, 2, 0, | 1850 | 1, 2, 0, |
| 1928 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. | 1851 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. |
| 1929 | BUFFER defaults to the current buffer. */) | 1852 | BUFFER defaults to the current buffer. */) |
| 1930 | (variable, buffer) | 1853 | (register Lisp_Object variable, Lisp_Object buffer) |
| 1931 | register Lisp_Object variable, buffer; | ||
| 1932 | { | 1854 | { |
| 1933 | register struct buffer *buf; | 1855 | register struct buffer *buf; |
| 1934 | struct Lisp_Symbol *sym; | 1856 | struct Lisp_Symbol *sym; |
| @@ -1992,8 +1914,7 @@ while it does not have a `let'-style binding that was made in BUFFER, | |||
| 1992 | will produce a buffer local binding. See Info node | 1914 | will produce a buffer local binding. See Info node |
| 1993 | `(elisp)Creating Buffer-Local'. | 1915 | `(elisp)Creating Buffer-Local'. |
| 1994 | BUFFER defaults to the current buffer. */) | 1916 | BUFFER defaults to the current buffer. */) |
| 1995 | (variable, buffer) | 1917 | (register Lisp_Object variable, Lisp_Object buffer) |
| 1996 | register Lisp_Object variable, buffer; | ||
| 1997 | { | 1918 | { |
| 1998 | struct Lisp_Symbol *sym; | 1919 | struct Lisp_Symbol *sym; |
| 1999 | 1920 | ||
| @@ -2026,8 +1947,7 @@ DEFUN ("variable-binding-locus", Fvariable_binding_locus, Svariable_binding_locu | |||
| 2026 | If the current binding is buffer-local, the value is the current buffer. | 1947 | If the current binding is buffer-local, the value is the current buffer. |
| 2027 | If the current binding is frame-local, the value is the selected frame. | 1948 | If the current binding is frame-local, the value is the selected frame. |
| 2028 | If the current binding is global (the default), the value is nil. */) | 1949 | If the current binding is global (the default), the value is nil. */) |
| 2029 | (variable) | 1950 | (register Lisp_Object variable) |
| 2030 | register Lisp_Object variable; | ||
| 2031 | { | 1951 | { |
| 2032 | struct Lisp_Symbol *sym; | 1952 | struct Lisp_Symbol *sym; |
| 2033 | 1953 | ||
| @@ -2068,7 +1988,7 @@ If the current binding is global (the default), the value is nil. */) | |||
| 2068 | /* This code is disabled now that we use the selected frame to return | 1988 | /* This code is disabled now that we use the selected frame to return |
| 2069 | keyboard-local-values. */ | 1989 | keyboard-local-values. */ |
| 2070 | #if 0 | 1990 | #if 0 |
| 2071 | extern struct terminal *get_terminal P_ ((Lisp_Object display, int)); | 1991 | extern struct terminal *get_terminal (Lisp_Object display, int); |
| 2072 | 1992 | ||
| 2073 | DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, | 1993 | DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, |
| 2074 | doc: /* Return the terminal-local value of SYMBOL on TERMINAL. | 1994 | doc: /* Return the terminal-local value of SYMBOL on TERMINAL. |
| @@ -2077,9 +1997,7 @@ value, like `symbol-value'. | |||
| 2077 | 1997 | ||
| 2078 | TERMINAL may be a terminal object, a frame, or nil (meaning the | 1998 | TERMINAL may be a terminal object, a frame, or nil (meaning the |
| 2079 | selected frame's terminal device). */) | 1999 | selected frame's terminal device). */) |
| 2080 | (symbol, terminal) | 2000 | (Lisp_Object symbol, Lisp_Object terminal) |
| 2081 | Lisp_Object symbol; | ||
| 2082 | Lisp_Object terminal; | ||
| 2083 | { | 2001 | { |
| 2084 | Lisp_Object result; | 2002 | Lisp_Object result; |
| 2085 | struct terminal *t = get_terminal (terminal, 1); | 2003 | struct terminal *t = get_terminal (terminal, 1); |
| @@ -2096,10 +2014,7 @@ binding, like `set'. | |||
| 2096 | 2014 | ||
| 2097 | TERMINAL may be a terminal object, a frame, or nil (meaning the | 2015 | TERMINAL may be a terminal object, a frame, or nil (meaning the |
| 2098 | selected frame's terminal device). */) | 2016 | selected frame's terminal device). */) |
| 2099 | (symbol, terminal, value) | 2017 | (Lisp_Object symbol, Lisp_Object terminal, Lisp_Object value) |
| 2100 | Lisp_Object symbol; | ||
| 2101 | Lisp_Object terminal; | ||
| 2102 | Lisp_Object value; | ||
| 2103 | { | 2018 | { |
| 2104 | Lisp_Object result; | 2019 | Lisp_Object result; |
| 2105 | struct terminal *t = get_terminal (terminal, 1); | 2020 | struct terminal *t = get_terminal (terminal, 1); |
| @@ -2120,8 +2035,7 @@ selected frame's terminal device). */) | |||
| 2120 | This is like Findirect_function, except that it doesn't signal an | 2035 | This is like Findirect_function, except that it doesn't signal an |
| 2121 | error if the chain ends up unbound. */ | 2036 | error if the chain ends up unbound. */ |
| 2122 | Lisp_Object | 2037 | Lisp_Object |
| 2123 | indirect_function (object) | 2038 | indirect_function (register Lisp_Object object) |
| 2124 | register Lisp_Object object; | ||
| 2125 | { | 2039 | { |
| 2126 | Lisp_Object tortoise, hare; | 2040 | Lisp_Object tortoise, hare; |
| 2127 | 2041 | ||
| @@ -2153,9 +2067,7 @@ If the final symbol in the chain is unbound, signal a void-function error. | |||
| 2153 | Optional arg NOERROR non-nil means to return nil instead of signalling. | 2067 | Optional arg NOERROR non-nil means to return nil instead of signalling. |
| 2154 | Signal a cyclic-function-indirection error if there is a loop in the | 2068 | Signal a cyclic-function-indirection error if there is a loop in the |
| 2155 | function chain of symbols. */) | 2069 | function chain of symbols. */) |
| 2156 | (object, noerror) | 2070 | (register Lisp_Object object, Lisp_Object noerror) |
| 2157 | register Lisp_Object object; | ||
| 2158 | Lisp_Object noerror; | ||
| 2159 | { | 2071 | { |
| 2160 | Lisp_Object result; | 2072 | Lisp_Object result; |
| 2161 | 2073 | ||
| @@ -2179,9 +2091,7 @@ DEFUN ("aref", Faref, Saref, 2, 2, 0, | |||
| 2179 | doc: /* Return the element of ARRAY at index IDX. | 2091 | doc: /* Return the element of ARRAY at index IDX. |
| 2180 | ARRAY may be a vector, a string, a char-table, a bool-vector, | 2092 | ARRAY may be a vector, a string, a char-table, a bool-vector, |
| 2181 | or a byte-code object. IDX starts at 0. */) | 2093 | or a byte-code object. IDX starts at 0. */) |
| 2182 | (array, idx) | 2094 | (register Lisp_Object array, Lisp_Object idx) |
| 2183 | register Lisp_Object array; | ||
| 2184 | Lisp_Object idx; | ||
| 2185 | { | 2095 | { |
| 2186 | register int idxval; | 2096 | register int idxval; |
| 2187 | 2097 | ||
| @@ -2235,9 +2145,7 @@ DEFUN ("aset", Faset, Saset, 3, 3, 0, | |||
| 2235 | doc: /* Store into the element of ARRAY at index IDX the value NEWELT. | 2145 | doc: /* Store into the element of ARRAY at index IDX the value NEWELT. |
| 2236 | Return NEWELT. ARRAY may be a vector, a string, a char-table or a | 2146 | Return NEWELT. ARRAY may be a vector, a string, a char-table or a |
| 2237 | bool-vector. IDX starts at 0. */) | 2147 | bool-vector. IDX starts at 0. */) |
| 2238 | (array, idx, newelt) | 2148 | (register Lisp_Object array, Lisp_Object idx, Lisp_Object newelt) |
| 2239 | register Lisp_Object array; | ||
| 2240 | Lisp_Object idx, newelt; | ||
| 2241 | { | 2149 | { |
| 2242 | register int idxval; | 2150 | register int idxval; |
| 2243 | 2151 | ||
| @@ -2295,13 +2203,13 @@ bool-vector. IDX starts at 0. */) | |||
| 2295 | USE_SAFE_ALLOCA; | 2203 | USE_SAFE_ALLOCA; |
| 2296 | 2204 | ||
| 2297 | SAFE_ALLOCA (str, unsigned char *, nbytes); | 2205 | SAFE_ALLOCA (str, unsigned char *, nbytes); |
| 2298 | bcopy (SDATA (array), str, nbytes); | 2206 | memcpy (str, SDATA (array), nbytes); |
| 2299 | allocate_string_data (XSTRING (array), nchars, | 2207 | allocate_string_data (XSTRING (array), nchars, |
| 2300 | nbytes + new_bytes - prev_bytes); | 2208 | nbytes + new_bytes - prev_bytes); |
| 2301 | bcopy (str, SDATA (array), idxval_byte); | 2209 | memcpy (SDATA (array), str, idxval_byte); |
| 2302 | p1 = SDATA (array) + idxval_byte; | 2210 | p1 = SDATA (array) + idxval_byte; |
| 2303 | bcopy (str + idxval_byte + prev_bytes, p1 + new_bytes, | 2211 | memcpy (p1 + new_bytes, str + idxval_byte + prev_bytes, |
| 2304 | nbytes - (idxval_byte + prev_bytes)); | 2212 | nbytes - (idxval_byte + prev_bytes)); |
| 2305 | SAFE_FREE (); | 2213 | SAFE_FREE (); |
| 2306 | clear_string_char_byte_cache (); | 2214 | clear_string_char_byte_cache (); |
| 2307 | } | 2215 | } |
| @@ -2337,9 +2245,7 @@ bool-vector. IDX starts at 0. */) | |||
| 2337 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; | 2245 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; |
| 2338 | 2246 | ||
| 2339 | Lisp_Object | 2247 | Lisp_Object |
| 2340 | arithcompare (num1, num2, comparison) | 2248 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) |
| 2341 | Lisp_Object num1, num2; | ||
| 2342 | enum comparison comparison; | ||
| 2343 | { | 2249 | { |
| 2344 | double f1 = 0, f2 = 0; | 2250 | double f1 = 0, f2 = 0; |
| 2345 | int floatp = 0; | 2251 | int floatp = 0; |
| @@ -2393,24 +2299,21 @@ arithcompare (num1, num2, comparison) | |||
| 2393 | 2299 | ||
| 2394 | DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, | 2300 | DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, |
| 2395 | doc: /* Return t if two args, both numbers or markers, are equal. */) | 2301 | doc: /* Return t if two args, both numbers or markers, are equal. */) |
| 2396 | (num1, num2) | 2302 | (register Lisp_Object num1, Lisp_Object num2) |
| 2397 | register Lisp_Object num1, num2; | ||
| 2398 | { | 2303 | { |
| 2399 | return arithcompare (num1, num2, equal); | 2304 | return arithcompare (num1, num2, equal); |
| 2400 | } | 2305 | } |
| 2401 | 2306 | ||
| 2402 | DEFUN ("<", Flss, Slss, 2, 2, 0, | 2307 | DEFUN ("<", Flss, Slss, 2, 2, 0, |
| 2403 | doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) | 2308 | doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) |
| 2404 | (num1, num2) | 2309 | (register Lisp_Object num1, Lisp_Object num2) |
| 2405 | register Lisp_Object num1, num2; | ||
| 2406 | { | 2310 | { |
| 2407 | return arithcompare (num1, num2, less); | 2311 | return arithcompare (num1, num2, less); |
| 2408 | } | 2312 | } |
| 2409 | 2313 | ||
| 2410 | DEFUN (">", Fgtr, Sgtr, 2, 2, 0, | 2314 | DEFUN (">", Fgtr, Sgtr, 2, 2, 0, |
| 2411 | doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) | 2315 | doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) |
| 2412 | (num1, num2) | 2316 | (register Lisp_Object num1, Lisp_Object num2) |
| 2413 | register Lisp_Object num1, num2; | ||
| 2414 | { | 2317 | { |
| 2415 | return arithcompare (num1, num2, grtr); | 2318 | return arithcompare (num1, num2, grtr); |
| 2416 | } | 2319 | } |
| @@ -2418,8 +2321,7 @@ DEFUN (">", Fgtr, Sgtr, 2, 2, 0, | |||
| 2418 | DEFUN ("<=", Fleq, Sleq, 2, 2, 0, | 2321 | DEFUN ("<=", Fleq, Sleq, 2, 2, 0, |
| 2419 | doc: /* Return t if first arg is less than or equal to second arg. | 2322 | doc: /* Return t if first arg is less than or equal to second arg. |
| 2420 | Both must be numbers or markers. */) | 2323 | Both must be numbers or markers. */) |
| 2421 | (num1, num2) | 2324 | (register Lisp_Object num1, Lisp_Object num2) |
| 2422 | register Lisp_Object num1, num2; | ||
| 2423 | { | 2325 | { |
| 2424 | return arithcompare (num1, num2, less_or_equal); | 2326 | return arithcompare (num1, num2, less_or_equal); |
| 2425 | } | 2327 | } |
| @@ -2427,24 +2329,21 @@ Both must be numbers or markers. */) | |||
| 2427 | DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, | 2329 | DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, |
| 2428 | doc: /* Return t if first arg is greater than or equal to second arg. | 2330 | doc: /* Return t if first arg is greater than or equal to second arg. |
| 2429 | Both must be numbers or markers. */) | 2331 | Both must be numbers or markers. */) |
| 2430 | (num1, num2) | 2332 | (register Lisp_Object num1, Lisp_Object num2) |
| 2431 | register Lisp_Object num1, num2; | ||
| 2432 | { | 2333 | { |
| 2433 | return arithcompare (num1, num2, grtr_or_equal); | 2334 | return arithcompare (num1, num2, grtr_or_equal); |
| 2434 | } | 2335 | } |
| 2435 | 2336 | ||
| 2436 | DEFUN ("/=", Fneq, Sneq, 2, 2, 0, | 2337 | DEFUN ("/=", Fneq, Sneq, 2, 2, 0, |
| 2437 | doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */) | 2338 | doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */) |
| 2438 | (num1, num2) | 2339 | (register Lisp_Object num1, Lisp_Object num2) |
| 2439 | register Lisp_Object num1, num2; | ||
| 2440 | { | 2340 | { |
| 2441 | return arithcompare (num1, num2, notequal); | 2341 | return arithcompare (num1, num2, notequal); |
| 2442 | } | 2342 | } |
| 2443 | 2343 | ||
| 2444 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | 2344 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, |
| 2445 | doc: /* Return t if NUMBER is zero. */) | 2345 | doc: /* Return t if NUMBER is zero. */) |
| 2446 | (number) | 2346 | (register Lisp_Object number) |
| 2447 | register Lisp_Object number; | ||
| 2448 | { | 2347 | { |
| 2449 | CHECK_NUMBER_OR_FLOAT (number); | 2348 | CHECK_NUMBER_OR_FLOAT (number); |
| 2450 | 2349 | ||
| @@ -2465,8 +2364,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | |||
| 2465 | when the value fits in one. */ | 2364 | when the value fits in one. */ |
| 2466 | 2365 | ||
| 2467 | Lisp_Object | 2366 | Lisp_Object |
| 2468 | long_to_cons (i) | 2367 | long_to_cons (long unsigned int i) |
| 2469 | unsigned long i; | ||
| 2470 | { | 2368 | { |
| 2471 | unsigned long top = i >> 16; | 2369 | unsigned long top = i >> 16; |
| 2472 | unsigned int bot = i & 0xFFFF; | 2370 | unsigned int bot = i & 0xFFFF; |
| @@ -2478,8 +2376,7 @@ long_to_cons (i) | |||
| 2478 | } | 2376 | } |
| 2479 | 2377 | ||
| 2480 | unsigned long | 2378 | unsigned long |
| 2481 | cons_to_long (c) | 2379 | cons_to_long (Lisp_Object c) |
| 2482 | Lisp_Object c; | ||
| 2483 | { | 2380 | { |
| 2484 | Lisp_Object top, bot; | 2381 | Lisp_Object top, bot; |
| 2485 | if (INTEGERP (c)) | 2382 | if (INTEGERP (c)) |
| @@ -2495,8 +2392,7 @@ DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, | |||
| 2495 | doc: /* Return the decimal representation of NUMBER as a string. | 2392 | doc: /* Return the decimal representation of NUMBER as a string. |
| 2496 | Uses a minus sign if negative. | 2393 | Uses a minus sign if negative. |
| 2497 | NUMBER may be an integer or a floating point number. */) | 2394 | NUMBER may be an integer or a floating point number. */) |
| 2498 | (number) | 2395 | (Lisp_Object number) |
| 2499 | Lisp_Object number; | ||
| 2500 | { | 2396 | { |
| 2501 | char buffer[VALBITS]; | 2397 | char buffer[VALBITS]; |
| 2502 | 2398 | ||
| @@ -2520,8 +2416,7 @@ NUMBER may be an integer or a floating point number. */) | |||
| 2520 | } | 2416 | } |
| 2521 | 2417 | ||
| 2522 | INLINE static int | 2418 | INLINE static int |
| 2523 | digit_to_number (character, base) | 2419 | digit_to_number (int character, int base) |
| 2524 | int character, base; | ||
| 2525 | { | 2420 | { |
| 2526 | int digit; | 2421 | int digit; |
| 2527 | 2422 | ||
| @@ -2548,8 +2443,7 @@ It ignores leading spaces and tabs, and all trailing chars. | |||
| 2548 | If BASE, interpret STRING as a number in that base. If BASE isn't | 2443 | If BASE, interpret STRING as a number in that base. If BASE isn't |
| 2549 | present, base 10 is used. BASE must be between 2 and 16 (inclusive). | 2444 | present, base 10 is used. BASE must be between 2 and 16 (inclusive). |
| 2550 | If the base used is not 10, STRING is always parsed as integer. */) | 2445 | If the base used is not 10, STRING is always parsed as integer. */) |
| 2551 | (string, base) | 2446 | (register Lisp_Object string, Lisp_Object base) |
| 2552 | register Lisp_Object string, base; | ||
| 2553 | { | 2447 | { |
| 2554 | register unsigned char *p; | 2448 | register unsigned char *p; |
| 2555 | register int b; | 2449 | register int b; |
| @@ -2616,15 +2510,12 @@ enum arithop | |||
| 2616 | Amin | 2510 | Amin |
| 2617 | }; | 2511 | }; |
| 2618 | 2512 | ||
| 2619 | static Lisp_Object float_arith_driver P_ ((double, int, enum arithop, | 2513 | static Lisp_Object float_arith_driver (double, int, enum arithop, |
| 2620 | int, Lisp_Object *)); | 2514 | int, Lisp_Object *); |
| 2621 | extern Lisp_Object fmod_float (); | 2515 | extern Lisp_Object fmod_float (Lisp_Object, Lisp_Object); |
| 2622 | 2516 | ||
| 2623 | Lisp_Object | 2517 | Lisp_Object |
| 2624 | arith_driver (code, nargs, args) | 2518 | arith_driver (enum arithop code, int nargs, register Lisp_Object *args) |
| 2625 | enum arithop code; | ||
| 2626 | int nargs; | ||
| 2627 | register Lisp_Object *args; | ||
| 2628 | { | 2519 | { |
| 2629 | register Lisp_Object val; | 2520 | register Lisp_Object val; |
| 2630 | register int argnum; | 2521 | register int argnum; |
| @@ -2709,12 +2600,7 @@ arith_driver (code, nargs, args) | |||
| 2709 | #define isnan(x) ((x) != (x)) | 2600 | #define isnan(x) ((x) != (x)) |
| 2710 | 2601 | ||
| 2711 | static Lisp_Object | 2602 | static Lisp_Object |
| 2712 | float_arith_driver (accum, argnum, code, nargs, args) | 2603 | float_arith_driver (double accum, register int argnum, enum arithop code, int nargs, register Lisp_Object *args) |
| 2713 | double accum; | ||
| 2714 | register int argnum; | ||
| 2715 | enum arithop code; | ||
| 2716 | int nargs; | ||
| 2717 | register Lisp_Object *args; | ||
| 2718 | { | 2604 | { |
| 2719 | register Lisp_Object val; | 2605 | register Lisp_Object val; |
| 2720 | double next; | 2606 | double next; |
| @@ -2776,9 +2662,7 @@ float_arith_driver (accum, argnum, code, nargs, args) | |||
| 2776 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, | 2662 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, |
| 2777 | doc: /* Return sum of any number of arguments, which are numbers or markers. | 2663 | doc: /* Return sum of any number of arguments, which are numbers or markers. |
| 2778 | usage: (+ &rest NUMBERS-OR-MARKERS) */) | 2664 | usage: (+ &rest NUMBERS-OR-MARKERS) */) |
| 2779 | (nargs, args) | 2665 | (int nargs, Lisp_Object *args) |
| 2780 | int nargs; | ||
| 2781 | Lisp_Object *args; | ||
| 2782 | { | 2666 | { |
| 2783 | return arith_driver (Aadd, nargs, args); | 2667 | return arith_driver (Aadd, nargs, args); |
| 2784 | } | 2668 | } |
| @@ -2788,9 +2672,7 @@ DEFUN ("-", Fminus, Sminus, 0, MANY, 0, | |||
| 2788 | With one arg, negates it. With more than one arg, | 2672 | With one arg, negates it. With more than one arg, |
| 2789 | subtracts all but the first from the first. | 2673 | subtracts all but the first from the first. |
| 2790 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | 2674 | usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) |
| 2791 | (nargs, args) | 2675 | (int nargs, Lisp_Object *args) |
| 2792 | int nargs; | ||
| 2793 | Lisp_Object *args; | ||
| 2794 | { | 2676 | { |
| 2795 | return arith_driver (Asub, nargs, args); | 2677 | return arith_driver (Asub, nargs, args); |
| 2796 | } | 2678 | } |
| @@ -2798,9 +2680,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | |||
| 2798 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, | 2680 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, |
| 2799 | doc: /* Return product of any number of arguments, which are numbers or markers. | 2681 | doc: /* Return product of any number of arguments, which are numbers or markers. |
| 2800 | usage: (* &rest NUMBERS-OR-MARKERS) */) | 2682 | usage: (* &rest NUMBERS-OR-MARKERS) */) |
| 2801 | (nargs, args) | 2683 | (int nargs, Lisp_Object *args) |
| 2802 | int nargs; | ||
| 2803 | Lisp_Object *args; | ||
| 2804 | { | 2684 | { |
| 2805 | return arith_driver (Amult, nargs, args); | 2685 | return arith_driver (Amult, nargs, args); |
| 2806 | } | 2686 | } |
| @@ -2809,9 +2689,7 @@ DEFUN ("/", Fquo, Squo, 2, MANY, 0, | |||
| 2809 | doc: /* Return first argument divided by all the remaining arguments. | 2689 | doc: /* Return first argument divided by all the remaining arguments. |
| 2810 | The arguments must be numbers or markers. | 2690 | The arguments must be numbers or markers. |
| 2811 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | 2691 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) |
| 2812 | (nargs, args) | 2692 | (int nargs, Lisp_Object *args) |
| 2813 | int nargs; | ||
| 2814 | Lisp_Object *args; | ||
| 2815 | { | 2693 | { |
| 2816 | int argnum; | 2694 | int argnum; |
| 2817 | for (argnum = 2; argnum < nargs; argnum++) | 2695 | for (argnum = 2; argnum < nargs; argnum++) |
| @@ -2823,8 +2701,7 @@ usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | |||
| 2823 | DEFUN ("%", Frem, Srem, 2, 2, 0, | 2701 | DEFUN ("%", Frem, Srem, 2, 2, 0, |
| 2824 | doc: /* Return remainder of X divided by Y. | 2702 | doc: /* Return remainder of X divided by Y. |
| 2825 | Both must be integers or markers. */) | 2703 | Both must be integers or markers. */) |
| 2826 | (x, y) | 2704 | (register Lisp_Object x, Lisp_Object y) |
| 2827 | register Lisp_Object x, y; | ||
| 2828 | { | 2705 | { |
| 2829 | Lisp_Object val; | 2706 | Lisp_Object val; |
| 2830 | 2707 | ||
| @@ -2865,8 +2742,7 @@ DEFUN ("mod", Fmod, Smod, 2, 2, 0, | |||
| 2865 | doc: /* Return X modulo Y. | 2742 | doc: /* Return X modulo Y. |
| 2866 | The result falls between zero (inclusive) and Y (exclusive). | 2743 | The result falls between zero (inclusive) and Y (exclusive). |
| 2867 | Both X and Y must be numbers or markers. */) | 2744 | Both X and Y must be numbers or markers. */) |
| 2868 | (x, y) | 2745 | (register Lisp_Object x, Lisp_Object y) |
| 2869 | register Lisp_Object x, y; | ||
| 2870 | { | 2746 | { |
| 2871 | Lisp_Object val; | 2747 | Lisp_Object val; |
| 2872 | EMACS_INT i1, i2; | 2748 | EMACS_INT i1, i2; |
| @@ -2897,9 +2773,7 @@ DEFUN ("max", Fmax, Smax, 1, MANY, 0, | |||
| 2897 | doc: /* Return largest of all the arguments (which must be numbers or markers). | 2773 | doc: /* Return largest of all the arguments (which must be numbers or markers). |
| 2898 | The value is always a number; markers are converted to numbers. | 2774 | The value is always a number; markers are converted to numbers. |
| 2899 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2775 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2900 | (nargs, args) | 2776 | (int nargs, Lisp_Object *args) |
| 2901 | int nargs; | ||
| 2902 | Lisp_Object *args; | ||
| 2903 | { | 2777 | { |
| 2904 | return arith_driver (Amax, nargs, args); | 2778 | return arith_driver (Amax, nargs, args); |
| 2905 | } | 2779 | } |
| @@ -2908,9 +2782,7 @@ DEFUN ("min", Fmin, Smin, 1, MANY, 0, | |||
| 2908 | doc: /* Return smallest of all the arguments (which must be numbers or markers). | 2782 | doc: /* Return smallest of all the arguments (which must be numbers or markers). |
| 2909 | The value is always a number; markers are converted to numbers. | 2783 | The value is always a number; markers are converted to numbers. |
| 2910 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2784 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| 2911 | (nargs, args) | 2785 | (int nargs, Lisp_Object *args) |
| 2912 | int nargs; | ||
| 2913 | Lisp_Object *args; | ||
| 2914 | { | 2786 | { |
| 2915 | return arith_driver (Amin, nargs, args); | 2787 | return arith_driver (Amin, nargs, args); |
| 2916 | } | 2788 | } |
| @@ -2919,9 +2791,7 @@ DEFUN ("logand", Flogand, Slogand, 0, MANY, 0, | |||
| 2919 | doc: /* Return bitwise-and of all the arguments. | 2791 | doc: /* Return bitwise-and of all the arguments. |
| 2920 | Arguments may be integers, or markers converted to integers. | 2792 | Arguments may be integers, or markers converted to integers. |
| 2921 | usage: (logand &rest INTS-OR-MARKERS) */) | 2793 | usage: (logand &rest INTS-OR-MARKERS) */) |
| 2922 | (nargs, args) | 2794 | (int nargs, Lisp_Object *args) |
| 2923 | int nargs; | ||
| 2924 | Lisp_Object *args; | ||
| 2925 | { | 2795 | { |
| 2926 | return arith_driver (Alogand, nargs, args); | 2796 | return arith_driver (Alogand, nargs, args); |
| 2927 | } | 2797 | } |
| @@ -2930,9 +2800,7 @@ DEFUN ("logior", Flogior, Slogior, 0, MANY, 0, | |||
| 2930 | doc: /* Return bitwise-or of all the arguments. | 2800 | doc: /* Return bitwise-or of all the arguments. |
| 2931 | Arguments may be integers, or markers converted to integers. | 2801 | Arguments may be integers, or markers converted to integers. |
| 2932 | usage: (logior &rest INTS-OR-MARKERS) */) | 2802 | usage: (logior &rest INTS-OR-MARKERS) */) |
| 2933 | (nargs, args) | 2803 | (int nargs, Lisp_Object *args) |
| 2934 | int nargs; | ||
| 2935 | Lisp_Object *args; | ||
| 2936 | { | 2804 | { |
| 2937 | return arith_driver (Alogior, nargs, args); | 2805 | return arith_driver (Alogior, nargs, args); |
| 2938 | } | 2806 | } |
| @@ -2941,9 +2809,7 @@ DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0, | |||
| 2941 | doc: /* Return bitwise-exclusive-or of all the arguments. | 2809 | doc: /* Return bitwise-exclusive-or of all the arguments. |
| 2942 | Arguments may be integers, or markers converted to integers. | 2810 | Arguments may be integers, or markers converted to integers. |
| 2943 | usage: (logxor &rest INTS-OR-MARKERS) */) | 2811 | usage: (logxor &rest INTS-OR-MARKERS) */) |
| 2944 | (nargs, args) | 2812 | (int nargs, Lisp_Object *args) |
| 2945 | int nargs; | ||
| 2946 | Lisp_Object *args; | ||
| 2947 | { | 2813 | { |
| 2948 | return arith_driver (Alogxor, nargs, args); | 2814 | return arith_driver (Alogxor, nargs, args); |
| 2949 | } | 2815 | } |
| @@ -2952,8 +2818,7 @@ DEFUN ("ash", Fash, Sash, 2, 2, 0, | |||
| 2952 | doc: /* Return VALUE with its bits shifted left by COUNT. | 2818 | doc: /* Return VALUE with its bits shifted left by COUNT. |
| 2953 | If COUNT is negative, shifting is actually to the right. | 2819 | If COUNT is negative, shifting is actually to the right. |
| 2954 | In this case, the sign bit is duplicated. */) | 2820 | In this case, the sign bit is duplicated. */) |
| 2955 | (value, count) | 2821 | (register Lisp_Object value, Lisp_Object count) |
| 2956 | register Lisp_Object value, count; | ||
| 2957 | { | 2822 | { |
| 2958 | register Lisp_Object val; | 2823 | register Lisp_Object val; |
| 2959 | 2824 | ||
| @@ -2975,8 +2840,7 @@ DEFUN ("lsh", Flsh, Slsh, 2, 2, 0, | |||
| 2975 | doc: /* Return VALUE with its bits shifted left by COUNT. | 2840 | doc: /* Return VALUE with its bits shifted left by COUNT. |
| 2976 | If COUNT is negative, shifting is actually to the right. | 2841 | If COUNT is negative, shifting is actually to the right. |
| 2977 | In this case, zeros are shifted in on the left. */) | 2842 | In this case, zeros are shifted in on the left. */) |
| 2978 | (value, count) | 2843 | (register Lisp_Object value, Lisp_Object count) |
| 2979 | register Lisp_Object value, count; | ||
| 2980 | { | 2844 | { |
| 2981 | register Lisp_Object val; | 2845 | register Lisp_Object val; |
| 2982 | 2846 | ||
| @@ -2997,8 +2861,7 @@ In this case, zeros are shifted in on the left. */) | |||
| 2997 | DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, | 2861 | DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, |
| 2998 | doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. | 2862 | doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. |
| 2999 | Markers are converted to integers. */) | 2863 | Markers are converted to integers. */) |
| 3000 | (number) | 2864 | (register Lisp_Object number) |
| 3001 | register Lisp_Object number; | ||
| 3002 | { | 2865 | { |
| 3003 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); | 2866 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); |
| 3004 | 2867 | ||
| @@ -3012,8 +2875,7 @@ Markers are converted to integers. */) | |||
| 3012 | DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, | 2875 | DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, |
| 3013 | doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. | 2876 | doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. |
| 3014 | Markers are converted to integers. */) | 2877 | Markers are converted to integers. */) |
| 3015 | (number) | 2878 | (register Lisp_Object number) |
| 3016 | register Lisp_Object number; | ||
| 3017 | { | 2879 | { |
| 3018 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); | 2880 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); |
| 3019 | 2881 | ||
| @@ -3026,8 +2888,7 @@ Markers are converted to integers. */) | |||
| 3026 | 2888 | ||
| 3027 | DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, | 2889 | DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, |
| 3028 | doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */) | 2890 | doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */) |
| 3029 | (number) | 2891 | (register Lisp_Object number) |
| 3030 | register Lisp_Object number; | ||
| 3031 | { | 2892 | { |
| 3032 | CHECK_NUMBER (number); | 2893 | CHECK_NUMBER (number); |
| 3033 | XSETINT (number, ~XINT (number)); | 2894 | XSETINT (number, ~XINT (number)); |
| @@ -3038,7 +2899,7 @@ DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, | |||
| 3038 | doc: /* Return the byteorder for the machine. | 2899 | doc: /* Return the byteorder for the machine. |
| 3039 | Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII | 2900 | Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII |
| 3040 | lowercase l) for small endian machines. */) | 2901 | lowercase l) for small endian machines. */) |
| 3041 | () | 2902 | (void) |
| 3042 | { | 2903 | { |
| 3043 | unsigned i = 0x04030201; | 2904 | unsigned i = 0x04030201; |
| 3044 | int order = *(char *)&i == 1 ? 108 : 66; | 2905 | int order = *(char *)&i == 1 ? 108 : 66; |
| @@ -3049,7 +2910,7 @@ lowercase l) for small endian machines. */) | |||
| 3049 | 2910 | ||
| 3050 | 2911 | ||
| 3051 | void | 2912 | void |
| 3052 | syms_of_data () | 2913 | syms_of_data (void) |
| 3053 | { | 2914 | { |
| 3054 | Lisp_Object error_tail, arith_tail; | 2915 | Lisp_Object error_tail, arith_tail; |
| 3055 | 2916 | ||
| @@ -3481,8 +3342,7 @@ syms_of_data () | |||
| 3481 | } | 3342 | } |
| 3482 | 3343 | ||
| 3483 | SIGTYPE | 3344 | SIGTYPE |
| 3484 | arith_error (signo) | 3345 | arith_error (int signo) |
| 3485 | int signo; | ||
| 3486 | { | 3346 | { |
| 3487 | sigsetmask (SIGEMPTYMASK); | 3347 | sigsetmask (SIGEMPTYMASK); |
| 3488 | 3348 | ||
| @@ -3491,7 +3351,7 @@ arith_error (signo) | |||
| 3491 | } | 3351 | } |
| 3492 | 3352 | ||
| 3493 | void | 3353 | void |
| 3494 | init_data () | 3354 | init_data (void) |
| 3495 | { | 3355 | { |
| 3496 | /* Don't do this if just dumping out. | 3356 | /* Don't do this if just dumping out. |
| 3497 | We don't want to call `signal' in this case | 3357 | We don't want to call `signal' in this case |