diff options
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 164 |
1 files changed, 50 insertions, 114 deletions
diff --git a/src/lread.c b/src/lread.c index 16efd7114ea..5e0d2d8c772 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -230,7 +230,7 @@ static Lisp_Object load_unwind (Lisp_Object); | |||
| 230 | static Lisp_Object load_descriptor_unwind (Lisp_Object); | 230 | static Lisp_Object load_descriptor_unwind (Lisp_Object); |
| 231 | 231 | ||
| 232 | static void invalid_syntax (const char *, int) NO_RETURN; | 232 | static void invalid_syntax (const char *, int) NO_RETURN; |
| 233 | static void end_of_file_error () NO_RETURN; | 233 | static void end_of_file_error (void) NO_RETURN; |
| 234 | 234 | ||
| 235 | 235 | ||
| 236 | /* Functions that read one byte from the current source READCHARFUN | 236 | /* Functions that read one byte from the current source READCHARFUN |
| @@ -262,9 +262,7 @@ static int readbyte_from_string (int, Lisp_Object); | |||
| 262 | static int unread_char; | 262 | static int unread_char; |
| 263 | 263 | ||
| 264 | static int | 264 | static int |
| 265 | readchar (readcharfun, multibyte) | 265 | readchar (Lisp_Object readcharfun, int *multibyte) |
| 266 | Lisp_Object readcharfun; | ||
| 267 | int *multibyte; | ||
| 268 | { | 266 | { |
| 269 | Lisp_Object tem; | 267 | Lisp_Object tem; |
| 270 | register int c; | 268 | register int c; |
| @@ -435,9 +433,7 @@ readchar (readcharfun, multibyte) | |||
| 435 | If the stream is a user function, call it with the char as argument. */ | 433 | If the stream is a user function, call it with the char as argument. */ |
| 436 | 434 | ||
| 437 | static void | 435 | static void |
| 438 | unreadchar (readcharfun, c) | 436 | unreadchar (Lisp_Object readcharfun, int c) |
| 439 | Lisp_Object readcharfun; | ||
| 440 | int c; | ||
| 441 | { | 437 | { |
| 442 | readchar_count--; | 438 | readchar_count--; |
| 443 | if (c == -1) | 439 | if (c == -1) |
| @@ -501,18 +497,14 @@ unreadchar (readcharfun, c) | |||
| 501 | } | 497 | } |
| 502 | 498 | ||
| 503 | static int | 499 | static int |
| 504 | readbyte_for_lambda (c, readcharfun) | 500 | readbyte_for_lambda (int c, Lisp_Object readcharfun) |
| 505 | int c; | ||
| 506 | Lisp_Object readcharfun; | ||
| 507 | { | 501 | { |
| 508 | return read_bytecode_char (c >= 0); | 502 | return read_bytecode_char (c >= 0); |
| 509 | } | 503 | } |
| 510 | 504 | ||
| 511 | 505 | ||
| 512 | static int | 506 | static int |
| 513 | readbyte_from_file (c, readcharfun) | 507 | readbyte_from_file (int c, Lisp_Object readcharfun) |
| 514 | int c; | ||
| 515 | Lisp_Object readcharfun; | ||
| 516 | { | 508 | { |
| 517 | if (c >= 0) | 509 | if (c >= 0) |
| 518 | { | 510 | { |
| @@ -543,9 +535,7 @@ readbyte_from_file (c, readcharfun) | |||
| 543 | } | 535 | } |
| 544 | 536 | ||
| 545 | static int | 537 | static int |
| 546 | readbyte_from_string (c, readcharfun) | 538 | readbyte_from_string (int c, Lisp_Object readcharfun) |
| 547 | int c; | ||
| 548 | Lisp_Object readcharfun; | ||
| 549 | { | 539 | { |
| 550 | Lisp_Object string = XCAR (readcharfun); | 540 | Lisp_Object string = XCAR (readcharfun); |
| 551 | 541 | ||
| @@ -573,10 +563,7 @@ readbyte_from_string (c, readcharfun) | |||
| 573 | extern char emacs_mule_bytes[256]; | 563 | extern char emacs_mule_bytes[256]; |
| 574 | 564 | ||
| 575 | static int | 565 | static int |
| 576 | read_emacs_mule_char (c, readbyte, readcharfun) | 566 | read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object readcharfun) |
| 577 | int c; | ||
| 578 | int (*readbyte) (int, Lisp_Object); | ||
| 579 | Lisp_Object readcharfun; | ||
| 580 | { | 567 | { |
| 581 | /* Emacs-mule coding uses at most 4-byte for one character. */ | 568 | /* Emacs-mule coding uses at most 4-byte for one character. */ |
| 582 | unsigned char buf[4]; | 569 | unsigned char buf[4]; |
| @@ -871,8 +858,7 @@ DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, | |||
| 871 | because of an incompatible change in the byte compiler. */ | 858 | because of an incompatible change in the byte compiler. */ |
| 872 | 859 | ||
| 873 | static int | 860 | static int |
| 874 | safe_to_load_p (fd) | 861 | safe_to_load_p (int fd) |
| 875 | int fd; | ||
| 876 | { | 862 | { |
| 877 | char buf[512]; | 863 | char buf[512]; |
| 878 | int nbytes, i; | 864 | int nbytes, i; |
| @@ -909,8 +895,7 @@ safe_to_load_p (fd) | |||
| 909 | after loading a file successfully. */ | 895 | after loading a file successfully. */ |
| 910 | 896 | ||
| 911 | static Lisp_Object | 897 | static Lisp_Object |
| 912 | record_load_unwind (old) | 898 | record_load_unwind (Lisp_Object old) |
| 913 | Lisp_Object old; | ||
| 914 | { | 899 | { |
| 915 | return Vloads_in_progress = old; | 900 | return Vloads_in_progress = old; |
| 916 | } | 901 | } |
| @@ -918,15 +903,13 @@ record_load_unwind (old) | |||
| 918 | /* This handler function is used via internal_condition_case_1. */ | 903 | /* This handler function is used via internal_condition_case_1. */ |
| 919 | 904 | ||
| 920 | static Lisp_Object | 905 | static Lisp_Object |
| 921 | load_error_handler (data) | 906 | load_error_handler (Lisp_Object data) |
| 922 | Lisp_Object data; | ||
| 923 | { | 907 | { |
| 924 | return Qnil; | 908 | return Qnil; |
| 925 | } | 909 | } |
| 926 | 910 | ||
| 927 | static Lisp_Object | 911 | static Lisp_Object |
| 928 | load_warn_old_style_backquotes (file) | 912 | load_warn_old_style_backquotes (Lisp_Object file) |
| 929 | Lisp_Object file; | ||
| 930 | { | 913 | { |
| 931 | if (!NILP (Vold_style_backquotes)) | 914 | if (!NILP (Vold_style_backquotes)) |
| 932 | { | 915 | { |
| @@ -1299,8 +1282,8 @@ Return t if the file exists and loads successfully. */) | |||
| 1299 | } | 1282 | } |
| 1300 | 1283 | ||
| 1301 | static Lisp_Object | 1284 | static Lisp_Object |
| 1302 | load_unwind (arg) /* used as unwind-protect function in load */ | 1285 | load_unwind (Lisp_Object arg) /* used as unwind-protect function in load */ |
| 1303 | Lisp_Object arg; | 1286 | |
| 1304 | { | 1287 | { |
| 1305 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; | 1288 | FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; |
| 1306 | if (stream != NULL) | 1289 | if (stream != NULL) |
| @@ -1313,8 +1296,7 @@ load_unwind (arg) /* used as unwind-protect function in load */ | |||
| 1313 | } | 1296 | } |
| 1314 | 1297 | ||
| 1315 | static Lisp_Object | 1298 | static Lisp_Object |
| 1316 | load_descriptor_unwind (oldlist) | 1299 | load_descriptor_unwind (Lisp_Object oldlist) |
| 1317 | Lisp_Object oldlist; | ||
| 1318 | { | 1300 | { |
| 1319 | load_descriptor_list = oldlist; | 1301 | load_descriptor_list = oldlist; |
| 1320 | return Qnil; | 1302 | return Qnil; |
| @@ -1324,7 +1306,7 @@ load_descriptor_unwind (oldlist) | |||
| 1324 | This is used when starting a subprocess. */ | 1306 | This is used when starting a subprocess. */ |
| 1325 | 1307 | ||
| 1326 | void | 1308 | void |
| 1327 | close_load_descs () | 1309 | close_load_descs (void) |
| 1328 | { | 1310 | { |
| 1329 | #ifndef WINDOWSNT | 1311 | #ifndef WINDOWSNT |
| 1330 | Lisp_Object tail; | 1312 | Lisp_Object tail; |
| @@ -1334,8 +1316,7 @@ close_load_descs () | |||
| 1334 | } | 1316 | } |
| 1335 | 1317 | ||
| 1336 | static int | 1318 | static int |
| 1337 | complete_filename_p (pathname) | 1319 | complete_filename_p (Lisp_Object pathname) |
| 1338 | Lisp_Object pathname; | ||
| 1339 | { | 1320 | { |
| 1340 | register const unsigned char *s = SDATA (pathname); | 1321 | register const unsigned char *s = SDATA (pathname); |
| 1341 | return (IS_DIRECTORY_SEP (s[0]) | 1322 | return (IS_DIRECTORY_SEP (s[0]) |
| @@ -1383,11 +1364,7 @@ in which case file-name-handlers are ignored. */) | |||
| 1383 | but store the found remote file name in *STOREPTR. */ | 1364 | but store the found remote file name in *STOREPTR. */ |
| 1384 | 1365 | ||
| 1385 | int | 1366 | int |
| 1386 | openp (path, str, suffixes, storeptr, predicate) | 1367 | openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *storeptr, Lisp_Object predicate) |
| 1387 | Lisp_Object path, str; | ||
| 1388 | Lisp_Object suffixes; | ||
| 1389 | Lisp_Object *storeptr; | ||
| 1390 | Lisp_Object predicate; | ||
| 1391 | { | 1368 | { |
| 1392 | register int fd; | 1369 | register int fd; |
| 1393 | int fn_size = 100; | 1370 | int fn_size = 100; |
| @@ -1539,9 +1516,7 @@ openp (path, str, suffixes, storeptr, predicate) | |||
| 1539 | ENTIRE is 1 if loading that entire file, 0 if evaluating part of it. */ | 1516 | ENTIRE is 1 if loading that entire file, 0 if evaluating part of it. */ |
| 1540 | 1517 | ||
| 1541 | static void | 1518 | static void |
| 1542 | build_load_history (filename, entire) | 1519 | build_load_history (Lisp_Object filename, int entire) |
| 1543 | Lisp_Object filename; | ||
| 1544 | int entire; | ||
| 1545 | { | 1520 | { |
| 1546 | register Lisp_Object tail, prev, newelt; | 1521 | register Lisp_Object tail, prev, newelt; |
| 1547 | register Lisp_Object tem, tem2; | 1522 | register Lisp_Object tem, tem2; |
| @@ -1601,16 +1576,15 @@ build_load_history (filename, entire) | |||
| 1601 | } | 1576 | } |
| 1602 | 1577 | ||
| 1603 | Lisp_Object | 1578 | Lisp_Object |
| 1604 | unreadpure (junk) /* Used as unwind-protect function in readevalloop */ | 1579 | unreadpure (Lisp_Object junk) /* Used as unwind-protect function in readevalloop */ |
| 1605 | Lisp_Object junk; | 1580 | |
| 1606 | { | 1581 | { |
| 1607 | read_pure = 0; | 1582 | read_pure = 0; |
| 1608 | return Qnil; | 1583 | return Qnil; |
| 1609 | } | 1584 | } |
| 1610 | 1585 | ||
| 1611 | static Lisp_Object | 1586 | static Lisp_Object |
| 1612 | readevalloop_1 (old) | 1587 | readevalloop_1 (Lisp_Object old) |
| 1613 | Lisp_Object old; | ||
| 1614 | { | 1588 | { |
| 1615 | load_convert_to_unibyte = ! NILP (old); | 1589 | load_convert_to_unibyte = ! NILP (old); |
| 1616 | return Qnil; | 1590 | return Qnil; |
| @@ -1620,7 +1594,7 @@ readevalloop_1 (old) | |||
| 1620 | information. */ | 1594 | information. */ |
| 1621 | 1595 | ||
| 1622 | static void | 1596 | static void |
| 1623 | end_of_file_error () | 1597 | end_of_file_error (void) |
| 1624 | { | 1598 | { |
| 1625 | if (STRINGP (Vload_file_name)) | 1599 | if (STRINGP (Vload_file_name)) |
| 1626 | xsignal1 (Qend_of_file, Vload_file_name); | 1600 | xsignal1 (Qend_of_file, Vload_file_name); |
| @@ -1924,10 +1898,10 @@ START and END optionally delimit a substring of STRING from which to read; | |||
| 1924 | /* Function to set up the global context we need in toplevel read | 1898 | /* Function to set up the global context we need in toplevel read |
| 1925 | calls. */ | 1899 | calls. */ |
| 1926 | static Lisp_Object | 1900 | static Lisp_Object |
| 1927 | read_internal_start (stream, start, end) | 1901 | read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end) |
| 1928 | Lisp_Object stream; | 1902 | |
| 1929 | Lisp_Object start; /* Only used when stream is a string. */ | 1903 | /* Only used when stream is a string. */ |
| 1930 | Lisp_Object end; /* Only used when stream is a string. */ | 1904 | /* Only used when stream is a string. */ |
| 1931 | { | 1905 | { |
| 1932 | Lisp_Object retval; | 1906 | Lisp_Object retval; |
| 1933 | 1907 | ||
| @@ -1985,9 +1959,7 @@ read_internal_start (stream, start, end) | |||
| 1985 | S is error string of length N (if > 0) */ | 1959 | S is error string of length N (if > 0) */ |
| 1986 | 1960 | ||
| 1987 | static void | 1961 | static void |
| 1988 | invalid_syntax (s, n) | 1962 | invalid_syntax (const char *s, int n) |
| 1989 | const char *s; | ||
| 1990 | int n; | ||
| 1991 | { | 1963 | { |
| 1992 | if (!n) | 1964 | if (!n) |
| 1993 | n = strlen (s); | 1965 | n = strlen (s); |
| @@ -1999,8 +1971,7 @@ invalid_syntax (s, n) | |||
| 1999 | are not allowed. */ | 1971 | are not allowed. */ |
| 2000 | 1972 | ||
| 2001 | static Lisp_Object | 1973 | static Lisp_Object |
| 2002 | read0 (readcharfun) | 1974 | read0 (Lisp_Object readcharfun) |
| 2003 | Lisp_Object readcharfun; | ||
| 2004 | { | 1975 | { |
| 2005 | register Lisp_Object val; | 1976 | register Lisp_Object val; |
| 2006 | int c; | 1977 | int c; |
| @@ -2020,9 +1991,7 @@ static char *read_buffer; | |||
| 2020 | If the escape sequence forces unibyte, return eight-bit char. */ | 1991 | If the escape sequence forces unibyte, return eight-bit char. */ |
| 2021 | 1992 | ||
| 2022 | static int | 1993 | static int |
| 2023 | read_escape (readcharfun, stringp) | 1994 | read_escape (Lisp_Object readcharfun, int stringp) |
| 2024 | Lisp_Object readcharfun; | ||
| 2025 | int stringp; | ||
| 2026 | { | 1995 | { |
| 2027 | register int c = READCHAR; | 1996 | register int c = READCHAR; |
| 2028 | /* \u allows up to four hex digits, \U up to eight. Default to the | 1997 | /* \u allows up to four hex digits, \U up to eight. Default to the |
| @@ -2236,9 +2205,7 @@ read_escape (readcharfun, stringp) | |||
| 2236 | range. */ | 2205 | range. */ |
| 2237 | 2206 | ||
| 2238 | static Lisp_Object | 2207 | static Lisp_Object |
| 2239 | read_integer (readcharfun, radix) | 2208 | read_integer (Lisp_Object readcharfun, int radix) |
| 2240 | Lisp_Object readcharfun; | ||
| 2241 | int radix; | ||
| 2242 | { | 2209 | { |
| 2243 | int ndigits = 0, invalid_p, c, sign = 0; | 2210 | int ndigits = 0, invalid_p, c, sign = 0; |
| 2244 | /* We use a floating point number because */ | 2211 | /* We use a floating point number because */ |
| @@ -2303,10 +2270,7 @@ read_integer (readcharfun, radix) | |||
| 2303 | FIRST_IN_LIST is nonzero if this is the first element of a list. */ | 2270 | FIRST_IN_LIST is nonzero if this is the first element of a list. */ |
| 2304 | 2271 | ||
| 2305 | static Lisp_Object | 2272 | static Lisp_Object |
| 2306 | read1 (readcharfun, pch, first_in_list) | 2273 | read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) |
| 2307 | register Lisp_Object readcharfun; | ||
| 2308 | int *pch; | ||
| 2309 | int first_in_list; | ||
| 2310 | { | 2274 | { |
| 2311 | register int c; | 2275 | register int c; |
| 2312 | int uninterned_symbol = 0; | 2276 | int uninterned_symbol = 0; |
| @@ -3110,9 +3074,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 3110 | static Lisp_Object seen_list; | 3074 | static Lisp_Object seen_list; |
| 3111 | 3075 | ||
| 3112 | static void | 3076 | static void |
| 3113 | substitute_object_in_subtree (object, placeholder) | 3077 | substitute_object_in_subtree (Lisp_Object object, Lisp_Object placeholder) |
| 3114 | Lisp_Object object; | ||
| 3115 | Lisp_Object placeholder; | ||
| 3116 | { | 3078 | { |
| 3117 | Lisp_Object check_object; | 3079 | Lisp_Object check_object; |
| 3118 | 3080 | ||
| @@ -3147,10 +3109,7 @@ substitute_object_in_subtree (object, placeholder) | |||
| 3147 | } while (0) | 3109 | } while (0) |
| 3148 | 3110 | ||
| 3149 | static Lisp_Object | 3111 | static Lisp_Object |
| 3150 | substitute_object_recurse (object, placeholder, subtree) | 3112 | substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Object subtree) |
| 3151 | Lisp_Object object; | ||
| 3152 | Lisp_Object placeholder; | ||
| 3153 | Lisp_Object subtree; | ||
| 3154 | { | 3113 | { |
| 3155 | /* If we find the placeholder, return the target object. */ | 3114 | /* If we find the placeholder, return the target object. */ |
| 3156 | if (EQ (placeholder, subtree)) | 3115 | if (EQ (placeholder, subtree)) |
| @@ -3225,9 +3184,7 @@ substitute_object_recurse (object, placeholder, subtree) | |||
| 3225 | 3184 | ||
| 3226 | /* Helper function for substitute_object_recurse. */ | 3185 | /* Helper function for substitute_object_recurse. */ |
| 3227 | static void | 3186 | static void |
| 3228 | substitute_in_interval (interval, arg) | 3187 | substitute_in_interval (INTERVAL interval, Lisp_Object arg) |
| 3229 | INTERVAL interval; | ||
| 3230 | Lisp_Object arg; | ||
| 3231 | { | 3188 | { |
| 3232 | Lisp_Object object = Fcar (arg); | 3189 | Lisp_Object object = Fcar (arg); |
| 3233 | Lisp_Object placeholder = Fcdr (arg); | 3190 | Lisp_Object placeholder = Fcdr (arg); |
| @@ -3243,9 +3200,7 @@ substitute_in_interval (interval, arg) | |||
| 3243 | #define EXP_INT 16 | 3200 | #define EXP_INT 16 |
| 3244 | 3201 | ||
| 3245 | int | 3202 | int |
| 3246 | isfloat_string (cp, ignore_trailing) | 3203 | isfloat_string (register char *cp, int ignore_trailing) |
| 3247 | register char *cp; | ||
| 3248 | int ignore_trailing; | ||
| 3249 | { | 3204 | { |
| 3250 | register int state; | 3205 | register int state; |
| 3251 | 3206 | ||
| @@ -3310,9 +3265,7 @@ isfloat_string (cp, ignore_trailing) | |||
| 3310 | 3265 | ||
| 3311 | 3266 | ||
| 3312 | static Lisp_Object | 3267 | static Lisp_Object |
| 3313 | read_vector (readcharfun, bytecodeflag) | 3268 | read_vector (Lisp_Object readcharfun, int bytecodeflag) |
| 3314 | Lisp_Object readcharfun; | ||
| 3315 | int bytecodeflag; | ||
| 3316 | { | 3269 | { |
| 3317 | register int i; | 3270 | register int i; |
| 3318 | register int size; | 3271 | register int size; |
| @@ -3395,9 +3348,7 @@ read_vector (readcharfun, bytecodeflag) | |||
| 3395 | and make structure pure. */ | 3348 | and make structure pure. */ |
| 3396 | 3349 | ||
| 3397 | static Lisp_Object | 3350 | static Lisp_Object |
| 3398 | read_list (flag, readcharfun) | 3351 | read_list (int flag, register Lisp_Object readcharfun) |
| 3399 | int flag; | ||
| 3400 | register Lisp_Object readcharfun; | ||
| 3401 | { | 3352 | { |
| 3402 | /* -1 means check next element for defun, | 3353 | /* -1 means check next element for defun, |
| 3403 | 0 means don't check, | 3354 | 0 means don't check, |
| @@ -3585,14 +3536,13 @@ Lisp_Object initial_obarray; | |||
| 3585 | 3536 | ||
| 3586 | int oblookup_last_bucket_number; | 3537 | int oblookup_last_bucket_number; |
| 3587 | 3538 | ||
| 3588 | static int hash_string (); | 3539 | static int hash_string (const unsigned char *ptr, int len); |
| 3589 | 3540 | ||
| 3590 | /* Get an error if OBARRAY is not an obarray. | 3541 | /* Get an error if OBARRAY is not an obarray. |
| 3591 | If it is one, return it. */ | 3542 | If it is one, return it. */ |
| 3592 | 3543 | ||
| 3593 | Lisp_Object | 3544 | Lisp_Object |
| 3594 | check_obarray (obarray) | 3545 | check_obarray (Lisp_Object obarray) |
| 3595 | Lisp_Object obarray; | ||
| 3596 | { | 3546 | { |
| 3597 | if (!VECTORP (obarray) || XVECTOR (obarray)->size == 0) | 3547 | if (!VECTORP (obarray) || XVECTOR (obarray)->size == 0) |
| 3598 | { | 3548 | { |
| @@ -3607,8 +3557,7 @@ check_obarray (obarray) | |||
| 3607 | interned in the current obarray. */ | 3557 | interned in the current obarray. */ |
| 3608 | 3558 | ||
| 3609 | Lisp_Object | 3559 | Lisp_Object |
| 3610 | intern (str) | 3560 | intern (const char *str) |
| 3611 | const char *str; | ||
| 3612 | { | 3561 | { |
| 3613 | Lisp_Object tem; | 3562 | Lisp_Object tem; |
| 3614 | int len = strlen (str); | 3563 | int len = strlen (str); |
| @@ -3649,8 +3598,7 @@ intern_c_string (const char *str) | |||
| 3649 | /* Create an uninterned symbol with name STR. */ | 3598 | /* Create an uninterned symbol with name STR. */ |
| 3650 | 3599 | ||
| 3651 | Lisp_Object | 3600 | Lisp_Object |
| 3652 | make_symbol (str) | 3601 | make_symbol (char *str) |
| 3653 | char *str; | ||
| 3654 | { | 3602 | { |
| 3655 | int len = strlen (str); | 3603 | int len = strlen (str); |
| 3656 | 3604 | ||
| @@ -3812,10 +3760,7 @@ OBARRAY defaults to the value of the variable `obarray'. */) | |||
| 3812 | Also store the bucket number in oblookup_last_bucket_number. */ | 3760 | Also store the bucket number in oblookup_last_bucket_number. */ |
| 3813 | 3761 | ||
| 3814 | Lisp_Object | 3762 | Lisp_Object |
| 3815 | oblookup (obarray, ptr, size, size_byte) | 3763 | oblookup (Lisp_Object obarray, register const char *ptr, int size, int size_byte) |
| 3816 | Lisp_Object obarray; | ||
| 3817 | register const char *ptr; | ||
| 3818 | int size, size_byte; | ||
| 3819 | { | 3764 | { |
| 3820 | int hash; | 3765 | int hash; |
| 3821 | int obsize; | 3766 | int obsize; |
| @@ -3852,9 +3797,7 @@ oblookup (obarray, ptr, size, size_byte) | |||
| 3852 | } | 3797 | } |
| 3853 | 3798 | ||
| 3854 | static int | 3799 | static int |
| 3855 | hash_string (ptr, len) | 3800 | hash_string (const unsigned char *ptr, int len) |
| 3856 | const unsigned char *ptr; | ||
| 3857 | int len; | ||
| 3858 | { | 3801 | { |
| 3859 | register const unsigned char *p = ptr; | 3802 | register const unsigned char *p = ptr; |
| 3860 | register const unsigned char *end = p + len; | 3803 | register const unsigned char *end = p + len; |
| @@ -3871,10 +3814,7 @@ hash_string (ptr, len) | |||
| 3871 | } | 3814 | } |
| 3872 | 3815 | ||
| 3873 | void | 3816 | void |
| 3874 | map_obarray (obarray, fn, arg) | 3817 | map_obarray (Lisp_Object obarray, void (*fn) (Lisp_Object, Lisp_Object), Lisp_Object arg) |
| 3875 | Lisp_Object obarray; | ||
| 3876 | void (*fn) (Lisp_Object, Lisp_Object); | ||
| 3877 | Lisp_Object arg; | ||
| 3878 | { | 3818 | { |
| 3879 | register int i; | 3819 | register int i; |
| 3880 | register Lisp_Object tail; | 3820 | register Lisp_Object tail; |
| @@ -3894,8 +3834,7 @@ map_obarray (obarray, fn, arg) | |||
| 3894 | } | 3834 | } |
| 3895 | 3835 | ||
| 3896 | void | 3836 | void |
| 3897 | mapatoms_1 (sym, function) | 3837 | mapatoms_1 (Lisp_Object sym, Lisp_Object function) |
| 3898 | Lisp_Object sym, function; | ||
| 3899 | { | 3838 | { |
| 3900 | call1 (function, sym); | 3839 | call1 (function, sym); |
| 3901 | } | 3840 | } |
| @@ -3916,7 +3855,7 @@ OBARRAY defaults to the value of `obarray'. */) | |||
| 3916 | #define OBARRAY_SIZE 1511 | 3855 | #define OBARRAY_SIZE 1511 |
| 3917 | 3856 | ||
| 3918 | void | 3857 | void |
| 3919 | init_obarray () | 3858 | init_obarray (void) |
| 3920 | { | 3859 | { |
| 3921 | Lisp_Object oblength; | 3860 | Lisp_Object oblength; |
| 3922 | 3861 | ||
| @@ -3957,8 +3896,7 @@ init_obarray () | |||
| 3957 | } | 3896 | } |
| 3958 | 3897 | ||
| 3959 | void | 3898 | void |
| 3960 | defsubr (sname) | 3899 | defsubr (struct Lisp_Subr *sname) |
| 3961 | struct Lisp_Subr *sname; | ||
| 3962 | { | 3900 | { |
| 3963 | Lisp_Object sym; | 3901 | Lisp_Object sym; |
| 3964 | sym = intern_c_string (sname->symbol_name); | 3902 | sym = intern_c_string (sname->symbol_name); |
| @@ -4053,7 +3991,7 @@ defvar_kboard (struct Lisp_Kboard_Objfwd *ko_fwd, | |||
| 4053 | static Lisp_Object dump_path; | 3991 | static Lisp_Object dump_path; |
| 4054 | 3992 | ||
| 4055 | void | 3993 | void |
| 4056 | init_lread () | 3994 | init_lread (void) |
| 4057 | { | 3995 | { |
| 4058 | char *normal; | 3996 | char *normal; |
| 4059 | int turn_off_warning = 0; | 3997 | int turn_off_warning = 0; |
| @@ -4246,9 +4184,7 @@ init_lread () | |||
| 4246 | does not exist. Print it on stderr and put it in *Messages*. */ | 4184 | does not exist. Print it on stderr and put it in *Messages*. */ |
| 4247 | 4185 | ||
| 4248 | void | 4186 | void |
| 4249 | dir_warning (format, dirname) | 4187 | dir_warning (char *format, Lisp_Object dirname) |
| 4250 | char *format; | ||
| 4251 | Lisp_Object dirname; | ||
| 4252 | { | 4188 | { |
| 4253 | char *buffer | 4189 | char *buffer |
| 4254 | = (char *) alloca (SCHARS (dirname) + strlen (format) + 5); | 4190 | = (char *) alloca (SCHARS (dirname) + strlen (format) + 5); |
| @@ -4261,7 +4197,7 @@ dir_warning (format, dirname) | |||
| 4261 | } | 4197 | } |
| 4262 | 4198 | ||
| 4263 | void | 4199 | void |
| 4264 | syms_of_lread () | 4200 | syms_of_lread (void) |
| 4265 | { | 4201 | { |
| 4266 | defsubr (&Sread); | 4202 | defsubr (&Sread); |
| 4267 | defsubr (&Sread_from_string); | 4203 | defsubr (&Sread_from_string); |