diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-01-30 14:22:58 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-01-30 14:22:58 -0800 |
commit | 4eec7f8b2b465c6fc2c09d37d4da2b540f607df0 (patch) | |
tree | 9f4e30300e4f96dd3c72f5f435032f8180ce1a6c /src/lread.c | |
parent | fcabb1a6e66f7e6cf4fe0984c4d5c169f4decd8a (diff) | |
parent | 42a5b22fc0201fe98ad8a093c3ab91122ab3a72b (diff) | |
download | emacs-4eec7f8b2b465c6fc2c09d37d4da2b540f607df0.tar.gz emacs-4eec7f8b2b465c6fc2c09d37d4da2b540f607df0.tar.bz2 emacs-4eec7f8b2b465c6fc2c09d37d4da2b540f607df0.zip |
Use SSDATA when the context wants char *.
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. */) { /* Don't insist on adding a suffix if FILE already ends with one. */ if (size > 3 - && !strcmp (SDATA (file) + size - 3, ".el")) + && !strcmp (SSDATA (file) + size - 3, ".el")) must_suffix = Qnil; else if (size > 4 - && !strcmp (SDATA (file) + size - 4, ".elc")) + && !strcmp (SSDATA (file) + size - 4, ".elc")) must_suffix = Qnil; /* Don't insist on adding a suffix if the argument includes a directory name. */ @@ -1348,19 +1348,19 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto && SREF (filename, 0) == '/' && SREF (filename, 1) == ':') { - strncpy (fn, SDATA (filename) + 2, + strncpy (fn, SSDATA (filename) + 2, SBYTES (filename) - 2); fn[SBYTES (filename) - 2] = 0; } else { - strncpy (fn, SDATA (filename), + strncpy (fn, SSDATA (filename), SBYTES (filename)); fn[SBYTES (filename)] = 0; } if (lsuffix != 0) /* Bug happens on CCI if lsuffix is 0. */ - strncat (fn, SDATA (XCAR (tail)), lsuffix); + strncat (fn, SSDATA (XCAR (tail)), lsuffix); /* Check that the file exists and is not a directory. */ /* 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 const char *pfn; encoded_fn = ENCODE_FILE (string); - pfn = SDATA (encoded_fn); + pfn = SSDATA (encoded_fn); exists = (stat (pfn, &st) >= 0 && (st.st_mode & S_IFMT) != S_IFDIR); if (exists) @@ -3527,7 +3527,7 @@ it defaults to the value of `obarray'. */) CHECK_STRING (string); - tem = oblookup (obarray, SDATA (string), + tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string)); if (!INTEGERP (tem)) @@ -3580,7 +3580,7 @@ it defaults to the value of `obarray'. */) else string = SYMBOL_NAME (name); - tem = oblookup (obarray, SDATA (string), SCHARS (string), SBYTES (string)); + tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string)); if (INTEGERP (tem) || (SYMBOLP (name) && !EQ (name, tem))) return Qnil; else @@ -3609,7 +3609,7 @@ OBARRAY defaults to the value of the variable `obarray'. */) string = name; } - tem = oblookup (obarray, SDATA (string), + tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string)); if (INTEGERP (tem)) @@ -4055,7 +4055,7 @@ init_lread (void) if (STRINGP (dirfile)) { dirfile = Fdirectory_file_name (dirfile); - if (access (SDATA (dirfile), 0) < 0) + if (access (SSDATA (dirfile), 0) < 0) dir_warning ("Warning: Lisp directory `%s' does not exist.\n", XCAR (path_tail)); } |