diff options
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lread.c b/src/lread.c index 6ebd13e7a59..ca2f6cf04be 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -963,10 +963,10 @@ Return t if the file exists and loads successfully. */) | |||
| 963 | { | 963 | { |
| 964 | /* Don't insist on adding a suffix if FILE already ends with one. */ | 964 | /* Don't insist on adding a suffix if FILE already ends with one. */ |
| 965 | if (size > 3 | 965 | if (size > 3 |
| 966 | && !strcmp (SDATA (file) + size - 3, ".el")) | 966 | && !strcmp (SSDATA (file) + size - 3, ".el")) |
| 967 | must_suffix = Qnil; | 967 | must_suffix = Qnil; |
| 968 | else if (size > 4 | 968 | else if (size > 4 |
| 969 | && !strcmp (SDATA (file) + size - 4, ".elc")) | 969 | && !strcmp (SSDATA (file) + size - 4, ".elc")) |
| 970 | must_suffix = Qnil; | 970 | must_suffix = Qnil; |
| 971 | /* Don't insist on adding a suffix | 971 | /* Don't insist on adding a suffix |
| 972 | if the argument includes a directory name. */ | 972 | if the argument includes a directory name. */ |
| @@ -1348,19 +1348,19 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto | |||
| 1348 | && SREF (filename, 0) == '/' | 1348 | && SREF (filename, 0) == '/' |
| 1349 | && SREF (filename, 1) == ':') | 1349 | && SREF (filename, 1) == ':') |
| 1350 | { | 1350 | { |
| 1351 | strncpy (fn, SDATA (filename) + 2, | 1351 | strncpy (fn, SSDATA (filename) + 2, |
| 1352 | SBYTES (filename) - 2); | 1352 | SBYTES (filename) - 2); |
| 1353 | fn[SBYTES (filename) - 2] = 0; | 1353 | fn[SBYTES (filename) - 2] = 0; |
| 1354 | } | 1354 | } |
| 1355 | else | 1355 | else |
| 1356 | { | 1356 | { |
| 1357 | strncpy (fn, SDATA (filename), | 1357 | strncpy (fn, SSDATA (filename), |
| 1358 | SBYTES (filename)); | 1358 | SBYTES (filename)); |
| 1359 | fn[SBYTES (filename)] = 0; | 1359 | fn[SBYTES (filename)] = 0; |
| 1360 | } | 1360 | } |
| 1361 | 1361 | ||
| 1362 | if (lsuffix != 0) /* Bug happens on CCI if lsuffix is 0. */ | 1362 | if (lsuffix != 0) /* Bug happens on CCI if lsuffix is 0. */ |
| 1363 | strncat (fn, SDATA (XCAR (tail)), lsuffix); | 1363 | strncat (fn, SSDATA (XCAR (tail)), lsuffix); |
| 1364 | 1364 | ||
| 1365 | /* Check that the file exists and is not a directory. */ | 1365 | /* Check that the file exists and is not a directory. */ |
| 1366 | /* We used to only check for handlers on non-absolute file names: | 1366 | /* We used to only check for handlers on non-absolute file names: |
| @@ -1395,7 +1395,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto | |||
| 1395 | const char *pfn; | 1395 | const char *pfn; |
| 1396 | 1396 | ||
| 1397 | encoded_fn = ENCODE_FILE (string); | 1397 | encoded_fn = ENCODE_FILE (string); |
| 1398 | pfn = SDATA (encoded_fn); | 1398 | pfn = SSDATA (encoded_fn); |
| 1399 | exists = (stat (pfn, &st) >= 0 | 1399 | exists = (stat (pfn, &st) >= 0 |
| 1400 | && (st.st_mode & S_IFMT) != S_IFDIR); | 1400 | && (st.st_mode & S_IFMT) != S_IFDIR); |
| 1401 | if (exists) | 1401 | if (exists) |
| @@ -3527,7 +3527,7 @@ it defaults to the value of `obarray'. */) | |||
| 3527 | 3527 | ||
| 3528 | CHECK_STRING (string); | 3528 | CHECK_STRING (string); |
| 3529 | 3529 | ||
| 3530 | tem = oblookup (obarray, SDATA (string), | 3530 | tem = oblookup (obarray, SSDATA (string), |
| 3531 | SCHARS (string), | 3531 | SCHARS (string), |
| 3532 | SBYTES (string)); | 3532 | SBYTES (string)); |
| 3533 | if (!INTEGERP (tem)) | 3533 | if (!INTEGERP (tem)) |
| @@ -3580,7 +3580,7 @@ it defaults to the value of `obarray'. */) | |||
| 3580 | else | 3580 | else |
| 3581 | string = SYMBOL_NAME (name); | 3581 | string = SYMBOL_NAME (name); |
| 3582 | 3582 | ||
| 3583 | tem = oblookup (obarray, SDATA (string), SCHARS (string), SBYTES (string)); | 3583 | tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string)); |
| 3584 | if (INTEGERP (tem) || (SYMBOLP (name) && !EQ (name, tem))) | 3584 | if (INTEGERP (tem) || (SYMBOLP (name) && !EQ (name, tem))) |
| 3585 | return Qnil; | 3585 | return Qnil; |
| 3586 | else | 3586 | else |
| @@ -3609,7 +3609,7 @@ OBARRAY defaults to the value of the variable `obarray'. */) | |||
| 3609 | string = name; | 3609 | string = name; |
| 3610 | } | 3610 | } |
| 3611 | 3611 | ||
| 3612 | tem = oblookup (obarray, SDATA (string), | 3612 | tem = oblookup (obarray, SSDATA (string), |
| 3613 | SCHARS (string), | 3613 | SCHARS (string), |
| 3614 | SBYTES (string)); | 3614 | SBYTES (string)); |
| 3615 | if (INTEGERP (tem)) | 3615 | if (INTEGERP (tem)) |
| @@ -4055,7 +4055,7 @@ init_lread (void) | |||
| 4055 | if (STRINGP (dirfile)) | 4055 | if (STRINGP (dirfile)) |
| 4056 | { | 4056 | { |
| 4057 | dirfile = Fdirectory_file_name (dirfile); | 4057 | dirfile = Fdirectory_file_name (dirfile); |
| 4058 | if (access (SDATA (dirfile), 0) < 0) | 4058 | if (access (SSDATA (dirfile), 0) < 0) |
| 4059 | dir_warning ("Warning: Lisp directory `%s' does not exist.\n", | 4059 | dir_warning ("Warning: Lisp directory `%s' does not exist.\n", |
| 4060 | XCAR (path_tail)); | 4060 | XCAR (path_tail)); |
| 4061 | } | 4061 | } |