aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-01-30 14:17:44 -0800
committerPaul Eggert2011-01-30 14:17:44 -0800
commit42a5b22fc0201fe98ad8a093c3ab91122ab3a72b (patch)
treee9e37d432417ac382a36b9e6f26db38e59ca0585
parent3de84ad9c45382c181e3383d433442f4e19ba722 (diff)
downloademacs-42a5b22fc0201fe98ad8a093c3ab91122ab3a72b.tar.gz
emacs-42a5b22fc0201fe98ad8a093c3ab91122ab3a72b.zip
Use SSDATA when the context wants char *.
* alloc.c, buffer.c, bytecode.c, callproc.c, dired.c: * dispnew.c, doc.c, editfns.c, emacs.c, fileio.c, filelock.c: * fns.c, font.c, frame.c, image.c, indent.c, keyboard.c: * lread.c, minibuf.c, print.c, process.c, search.c, widget.c: * xdisp.c, xfaces.c, xfns.c, xml.c, xselect.c, xterm.c: Use SSDATA (not SDATA) when the context of the expression wants char * (not unsigned char *).
-rw-r--r--src/ChangeLog11
-rw-r--r--src/alloc.c3
-rw-r--r--src/buffer.c5
-rw-r--r--src/bytecode.c3
-rw-r--r--src/callproc.c22
-rw-r--r--src/dired.c9
-rw-r--r--src/dispnew.c2
-rw-r--r--src/doc.c10
-rw-r--r--src/editfns.c8
-rw-r--r--src/emacs.c8
-rw-r--r--src/fileio.c90
-rw-r--r--src/filelock.c8
-rw-r--r--src/fns.c19
-rw-r--r--src/font.c4
-rw-r--r--src/frame.c68
-rw-r--r--src/image.c28
-rw-r--r--src/indent.c3
-rw-r--r--src/keyboard.c16
-rw-r--r--src/lread.c20
-rw-r--r--src/minibuf.c5
-rw-r--r--src/print.c11
-rw-r--r--src/process.c18
-rw-r--r--src/search.c2
-rw-r--r--src/widget.c3
-rw-r--r--src/xdisp.c4
-rw-r--r--src/xfaces.c24
-rw-r--r--src/xfns.c26
-rw-r--r--src/xml.c2
-rw-r--r--src/xselect.c6
-rw-r--r--src/xterm.c28
30 files changed, 234 insertions, 232 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 50a7a217245..aea3d94f0a8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
12011-01-30 Paul Eggert <eggert@cs.ucla.edu>
2
3 Use SSDATA when the context wants char *.
4 * alloc.c, buffer.c, bytecode.c, callproc.c, dired.c:
5 * dispnew.c, doc.c, editfns.c, emacs.c, fileio.c, filelock.c:
6 * fns.c, font.c, frame.c, image.c, indent.c, keyboard.c:
7 * lread.c, minibuf.c, print.c, process.c, search.c, widget.c:
8 * xdisp.c, xfaces.c, xfns.c, xml.c, xselect.c, xterm.c:
9 Use SSDATA (not SDATA) when the context of the expression wants
10 char * (not unsigned char *).
11
12011-01-30 Andreas Schwab <schwab@linux-m68k.org> 122011-01-30 Andreas Schwab <schwab@linux-m68k.org>
2 13
3 * font.c (PROP_MATCH): Remove parameter N and use strlen instead. 14 * font.c (PROP_MATCH): Remove parameter N and use strlen instead.
diff --git a/src/alloc.c b/src/alloc.c
index d5c9f307cbc..67d34d25642 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4756,7 +4756,7 @@ Does not copy symbols. Copies strings without text properties. */)
4756 else if (FLOATP (obj)) 4756 else if (FLOATP (obj))
4757 obj = make_pure_float (XFLOAT_DATA (obj)); 4757 obj = make_pure_float (XFLOAT_DATA (obj));
4758 else if (STRINGP (obj)) 4758 else if (STRINGP (obj))
4759 obj = make_pure_string (SDATA (obj), SCHARS (obj), 4759 obj = make_pure_string (SSDATA (obj), SCHARS (obj),
4760 SBYTES (obj), 4760 SBYTES (obj),
4761 STRING_MULTIBYTE (obj)); 4761 STRING_MULTIBYTE (obj));
4762 else if (COMPILEDP (obj) || VECTORP (obj)) 4762 else if (COMPILEDP (obj) || VECTORP (obj))
@@ -6276,4 +6276,3 @@ The time is in seconds as a floating point value. */);
6276 defsubr (&Sgc_status); 6276 defsubr (&Sgc_status);
6277#endif 6277#endif
6278} 6278}
6279
diff --git a/src/buffer.c b/src/buffer.c
index 9b036a1a6db..2c6eb7b84e3 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1638,7 +1638,7 @@ the current buffer's major mode. */)
1638 CHECK_BUFFER (buffer); 1638 CHECK_BUFFER (buffer);
1639 1639
1640 if (STRINGP (XBUFFER (buffer)->name) 1640 if (STRINGP (XBUFFER (buffer)->name)
1641 && strcmp (SDATA (XBUFFER (buffer)->name), "*scratch*") == 0) 1641 && strcmp (SSDATA (XBUFFER (buffer)->name), "*scratch*") == 0)
1642 function = find_symbol_value (intern ("initial-major-mode")); 1642 function = find_symbol_value (intern ("initial-major-mode"));
1643 else 1643 else
1644 { 1644 {
@@ -5229,7 +5229,7 @@ init_buffer (void)
5229 because of the ange-ftp completion handler. 5229 because of the ange-ftp completion handler.
5230 However, it is not necessary to turn / into /:/. 5230 However, it is not necessary to turn / into /:/.
5231 So avoid doing that. */ 5231 So avoid doing that. */
5232 && strcmp ("/", SDATA (current_buffer->directory))) 5232 && strcmp ("/", SSDATA (current_buffer->directory)))
5233 current_buffer->directory 5233 current_buffer->directory
5234 = concat2 (build_string ("/:"), current_buffer->directory); 5234 = concat2 (build_string ("/:"), current_buffer->directory);
5235 5235
@@ -6208,4 +6208,3 @@ keys_of_buffer (void)
6208 initialized when that function gets called. */ 6208 initialized when that function gets called. */
6209 Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt); 6209 Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt);
6210} 6210}
6211
diff --git a/src/bytecode.c b/src/bytecode.c
index 038050cf114..fd2680e4054 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -871,7 +871,7 @@ If the third argument is incorrect, Emacs may crash. */)
871 case Btemp_output_buffer_setup: 871 case Btemp_output_buffer_setup:
872 BEFORE_POTENTIAL_GC (); 872 BEFORE_POTENTIAL_GC ();
873 CHECK_STRING (TOP); 873 CHECK_STRING (TOP);
874 temp_output_buffer_setup (SDATA (TOP)); 874 temp_output_buffer_setup (SSDATA (TOP));
875 AFTER_POTENTIAL_GC (); 875 AFTER_POTENTIAL_GC ();
876 TOP = Vstandard_output; 876 TOP = Vstandard_output;
877 break; 877 break;
@@ -1709,4 +1709,3 @@ integer, it is incremented each time that symbol's function is called. */);
1709 } 1709 }
1710#endif 1710#endif
1711} 1711}
1712
diff --git a/src/callproc.c b/src/callproc.c
index 8ce80022e9a..09d0ca5b42c 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -349,7 +349,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
349 349
350 display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]); 350 display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]);
351 351
352 filefd = emacs_open (SDATA (infile), O_RDONLY, 0); 352 filefd = emacs_open (SSDATA (infile), O_RDONLY, 0);
353 if (filefd < 0) 353 if (filefd < 0)
354 { 354 {
355 infile = DECODE_FILE (infile); 355 infile = DECODE_FILE (infile);
@@ -465,11 +465,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
465 else if (STRINGP (error_file)) 465 else if (STRINGP (error_file))
466 { 466 {
467#ifdef DOS_NT 467#ifdef DOS_NT
468 fd_error = emacs_open (SDATA (error_file), 468 fd_error = emacs_open (SSDATA (error_file),
469 O_WRONLY | O_TRUNC | O_CREAT | O_TEXT, 469 O_WRONLY | O_TRUNC | O_CREAT | O_TEXT,
470 S_IREAD | S_IWRITE); 470 S_IREAD | S_IWRITE);
471#else /* not DOS_NT */ 471#else /* not DOS_NT */
472 fd_error = creat (SDATA (error_file), 0666); 472 fd_error = creat (SSDATA (error_file), 0666);
473#endif /* not DOS_NT */ 473#endif /* not DOS_NT */
474 } 474 }
475 475
@@ -1079,7 +1079,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1079 CONSP (tem) && STRINGP (XCAR (tem)); 1079 CONSP (tem) && STRINGP (XCAR (tem));
1080 tem = XCDR (tem)) 1080 tem = XCDR (tem))
1081 { 1081 {
1082 if (strncmp (SDATA (XCAR (tem)), "DISPLAY", 7) == 0 1082 if (strncmp (SSDATA (XCAR (tem)), "DISPLAY", 7) == 0
1083 && (SDATA (XCAR (tem)) [7] == '\0' 1083 && (SDATA (XCAR (tem)) [7] == '\0'
1084 || SDATA (XCAR (tem)) [7] == '=')) 1084 || SDATA (XCAR (tem)) [7] == '='))
1085 /* DISPLAY is specified in process-environment. */ 1085 /* DISPLAY is specified in process-environment. */
@@ -1111,10 +1111,10 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1111 1111
1112 if (STRINGP (display)) 1112 if (STRINGP (display))
1113 { 1113 {
1114 int vlen = strlen ("DISPLAY=") + strlen (SDATA (display)) + 1; 1114 int vlen = strlen ("DISPLAY=") + strlen (SSDATA (display)) + 1;
1115 char *vdata = (char *) alloca (vlen); 1115 char *vdata = (char *) alloca (vlen);
1116 strcpy (vdata, "DISPLAY="); 1116 strcpy (vdata, "DISPLAY=");
1117 strcat (vdata, SDATA (display)); 1117 strcat (vdata, SSDATA (display));
1118 new_env = add_env (env, new_env, vdata); 1118 new_env = add_env (env, new_env, vdata);
1119 } 1119 }
1120 1120
@@ -1122,7 +1122,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1122 for (tem = Vprocess_environment; 1122 for (tem = Vprocess_environment;
1123 CONSP (tem) && STRINGP (XCAR (tem)); 1123 CONSP (tem) && STRINGP (XCAR (tem));
1124 tem = XCDR (tem)) 1124 tem = XCDR (tem))
1125 new_env = add_env (env, new_env, SDATA (XCAR (tem))); 1125 new_env = add_env (env, new_env, SSDATA (XCAR (tem)));
1126 1126
1127 *new_env = 0; 1127 *new_env = 0;
1128 1128
@@ -1340,13 +1340,13 @@ If optional parameter ENV is a list, then search this list instead of
1340 CHECK_STRING (variable); 1340 CHECK_STRING (variable);
1341 if (CONSP (env)) 1341 if (CONSP (env))
1342 { 1342 {
1343 if (getenv_internal_1 (SDATA (variable), SBYTES (variable), 1343 if (getenv_internal_1 (SSDATA (variable), SBYTES (variable),
1344 &value, &valuelen, env)) 1344 &value, &valuelen, env))
1345 return value ? make_string (value, valuelen) : Qt; 1345 return value ? make_string (value, valuelen) : Qt;
1346 else 1346 else
1347 return Qnil; 1347 return Qnil;
1348 } 1348 }
1349 else if (getenv_internal (SDATA (variable), SBYTES (variable), 1349 else if (getenv_internal (SSDATA (variable), SBYTES (variable),
1350 &value, &valuelen, env)) 1350 &value, &valuelen, env))
1351 return make_string (value, valuelen); 1351 return make_string (value, valuelen);
1352 else 1352 else
@@ -1459,13 +1459,13 @@ init_callproc (void)
1459#endif 1459#endif
1460 { 1460 {
1461 tempdir = Fdirectory_file_name (Vexec_directory); 1461 tempdir = Fdirectory_file_name (Vexec_directory);
1462 if (access (SDATA (tempdir), 0) < 0) 1462 if (access (SSDATA (tempdir), 0) < 0)
1463 dir_warning ("Warning: arch-dependent data dir (%s) does not exist.\n", 1463 dir_warning ("Warning: arch-dependent data dir (%s) does not exist.\n",
1464 Vexec_directory); 1464 Vexec_directory);
1465 } 1465 }
1466 1466
1467 tempdir = Fdirectory_file_name (Vdata_directory); 1467 tempdir = Fdirectory_file_name (Vdata_directory);
1468 if (access (SDATA (tempdir), 0) < 0) 1468 if (access (SSDATA (tempdir), 0) < 0)
1469 dir_warning ("Warning: arch-independent data dir (%s) does not exist.\n", 1469 dir_warning ("Warning: arch-independent data dir (%s) does not exist.\n",
1470 Vdata_directory); 1470 Vdata_directory);
1471 1471
diff --git a/src/dired.c b/src/dired.c
index 0f1b07a395d..08aa230f65f 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -176,7 +176,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m
176 which might compile a new regexp until we're done with the loop! */ 176 which might compile a new regexp until we're done with the loop! */
177 177
178 BLOCK_INPUT; 178 BLOCK_INPUT;
179 d = opendir (SDATA (dirfilename)); 179 d = opendir (SSDATA (dirfilename));
180 UNBLOCK_INPUT; 180 UNBLOCK_INPUT;
181 if (d == NULL) 181 if (d == NULL)
182 report_file_error ("Opening directory", Fcons (directory, Qnil)); 182 report_file_error ("Opening directory", Fcons (directory, Qnil));
@@ -258,7 +258,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m
258 QUIT; 258 QUIT;
259 259
260 if (NILP (match) 260 if (NILP (match)
261 || (0 <= re_search (bufp, SDATA (name), len, 0, len, 0))) 261 || (0 <= re_search (bufp, SSDATA (name), len, 0, len, 0)))
262 wanted = 1; 262 wanted = 1;
263 263
264 immediate_quit = 0; 264 immediate_quit = 0;
@@ -498,7 +498,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v
498 encoded_dir = ENCODE_FILE (dirname); 498 encoded_dir = ENCODE_FILE (dirname);
499 499
500 BLOCK_INPUT; 500 BLOCK_INPUT;
501 d = opendir (SDATA (Fdirectory_file_name (encoded_dir))); 501 d = opendir (SSDATA (Fdirectory_file_name (encoded_dir)));
502 UNBLOCK_INPUT; 502 UNBLOCK_INPUT;
503 if (!d) 503 if (!d)
504 report_file_error ("Opening directory", Fcons (dirname, Qnil)); 504 report_file_error ("Opening directory", Fcons (dirname, Qnil));
@@ -970,7 +970,7 @@ so last access time will always be midnight of that day. */)
970 encoded = ENCODE_FILE (filename); 970 encoded = ENCODE_FILE (filename);
971 UNGCPRO; 971 UNGCPRO;
972 972
973 if (lstat (SDATA (encoded), &s) < 0) 973 if (lstat (SSDATA (encoded), &s) < 0)
974 return Qnil; 974 return Qnil;
975 975
976 switch (s.st_mode & S_IFMT) 976 switch (s.st_mode & S_IFMT)
@@ -1099,4 +1099,3 @@ It ignores directory names if they match any string in this list which
1099ends in a slash. */); 1099ends in a slash. */);
1100 Vcompletion_ignored_extensions = Qnil; 1100 Vcompletion_ignored_extensions = Qnil;
1101} 1101}
1102
diff --git a/src/dispnew.c b/src/dispnew.c
index 8980e6a87ad..1aef70f1a5d 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5849,7 +5849,7 @@ FILE = nil means just close any termscript file currently open. */)
5849 if (! NILP (file)) 5849 if (! NILP (file))
5850 { 5850 {
5851 file = Fexpand_file_name (file, Qnil); 5851 file = Fexpand_file_name (file, Qnil);
5852 tty->termscript = fopen (SDATA (file), "w"); 5852 tty->termscript = fopen (SSDATA (file), "w");
5853 if (tty->termscript == 0) 5853 if (tty->termscript == 0)
5854 report_file_error ("Opening termscript", Fcons (file, Qnil)); 5854 report_file_error ("Opening termscript", Fcons (file, Qnil));
5855 } 5855 }
diff --git a/src/doc.c b/src/doc.c
index 6e53545dfb8..b47bf8132a0 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -120,8 +120,8 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
120 if (minsize < 8) 120 if (minsize < 8)
121 minsize = 8; 121 minsize = 8;
122 name = (char *) alloca (minsize + SCHARS (file) + 8); 122 name = (char *) alloca (minsize + SCHARS (file) + 8);
123 strcpy (name, SDATA (Vdoc_directory)); 123 strcpy (name, SSDATA (Vdoc_directory));
124 strcat (name, SDATA (file)); 124 strcat (name, SSDATA (file));
125 } 125 }
126 else 126 else
127 { 127 {
@@ -137,7 +137,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
137 /* Preparing to dump; DOC file is probably not installed. 137 /* Preparing to dump; DOC file is probably not installed.
138 So check in ../etc. */ 138 So check in ../etc. */
139 strcpy (name, "../etc/"); 139 strcpy (name, "../etc/");
140 strcat (name, SDATA (file)); 140 strcat (name, SSDATA (file));
141 141
142 fd = emacs_open (name, O_RDONLY, 0); 142 fd = emacs_open (name, O_RDONLY, 0);
143 } 143 }
@@ -559,9 +559,9 @@ the same file name is found in the `doc-directory'. */)
559 CHECK_STRING (Vdoc_directory); 559 CHECK_STRING (Vdoc_directory);
560 name = (char *) alloca (SCHARS (filename) 560 name = (char *) alloca (SCHARS (filename)
561 + SCHARS (Vdoc_directory) + 1); 561 + SCHARS (Vdoc_directory) + 1);
562 strcpy (name, SDATA (Vdoc_directory)); 562 strcpy (name, SSDATA (Vdoc_directory));
563 } 563 }
564 strcat (name, SDATA (filename)); /*** Add this line ***/ 564 strcat (name, SSDATA (filename)); /*** Add this line ***/
565 565
566 /* Vbuild_files is nil when temacs is run, and non-nil after that. */ 566 /* Vbuild_files is nil when temacs is run, and non-nil after that. */
567 if (NILP (Vbuild_files)) 567 if (NILP (Vbuild_files))
diff --git a/src/editfns.c b/src/editfns.c
index 5407cd772a7..a5f39870000 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1345,7 +1345,7 @@ name, or nil if there is no such user. */)
1345 else if (STRINGP (uid)) 1345 else if (STRINGP (uid))
1346 { 1346 {
1347 BLOCK_INPUT; 1347 BLOCK_INPUT;
1348 pw = (struct passwd *) getpwnam (SDATA (uid)); 1348 pw = (struct passwd *) getpwnam (SSDATA (uid));
1349 UNBLOCK_INPUT; 1349 UNBLOCK_INPUT;
1350 } 1350 }
1351 else 1351 else
@@ -1372,7 +1372,7 @@ name, or nil if there is no such user. */)
1372 r = (unsigned char *) alloca (strlen (p) + SCHARS (login) + 1); 1372 r = (unsigned char *) alloca (strlen (p) + SCHARS (login) + 1);
1373 memcpy (r, p, q - p); 1373 memcpy (r, p, q - p);
1374 r[q - p] = 0; 1374 r[q - p] = 0;
1375 strcat (r, SDATA (login)); 1375 strcat (r, SSDATA (login));
1376 r[q - p] = UPCASE (r[q - p]); 1376 r[q - p] = UPCASE (r[q - p]);
1377 strcat (r, q + 1); 1377 strcat (r, q + 1);
1378 full = build_string (r); 1378 full = build_string (r);
@@ -1680,7 +1680,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */)
1680 1680
1681 buf[0] = '\1'; 1681 buf[0] = '\1';
1682 BLOCK_INPUT; 1682 BLOCK_INPUT;
1683 result = emacs_memftimeu (buf, size, SDATA (format_string), 1683 result = emacs_memftimeu (buf, size, SSDATA (format_string),
1684 SBYTES (format_string), 1684 SBYTES (format_string),
1685 tm, ut); 1685 tm, ut);
1686 UNBLOCK_INPUT; 1686 UNBLOCK_INPUT;
@@ -1691,7 +1691,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */)
1691 /* If buffer was too small, make it bigger and try again. */ 1691 /* If buffer was too small, make it bigger and try again. */
1692 BLOCK_INPUT; 1692 BLOCK_INPUT;
1693 result = emacs_memftimeu (NULL, (size_t) -1, 1693 result = emacs_memftimeu (NULL, (size_t) -1,
1694 SDATA (format_string), 1694 SSDATA (format_string),
1695 SBYTES (format_string), 1695 SBYTES (format_string),
1696 tm, ut); 1696 tm, ut);
1697 UNBLOCK_INPUT; 1697 UNBLOCK_INPUT;
diff --git a/src/emacs.c b/src/emacs.c
index ae3c318c07f..e696c820298 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -755,8 +755,8 @@ main (int argc, char **argv)
755 } 755 }
756 else 756 else
757 { 757 {
758 version = SDATA (tem); 758 version = SSDATA (tem);
759 copyright = SDATA (tem2); 759 copyright = SSDATA (tem2);
760 } 760 }
761 } 761 }
762 else 762 else
@@ -1988,7 +1988,7 @@ all of which are called before Emacs is actually killed. */)
1988 kill it because we are exiting Emacs deliberately (not crashing). 1988 kill it because we are exiting Emacs deliberately (not crashing).
1989 Do it after shut_down_emacs, which does an auto-save. */ 1989 Do it after shut_down_emacs, which does an auto-save. */
1990 if (STRINGP (Vauto_save_list_file_name)) 1990 if (STRINGP (Vauto_save_list_file_name))
1991 unlink (SDATA (Vauto_save_list_file_name)); 1991 unlink (SSDATA (Vauto_save_list_file_name));
1992 1992
1993 exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS); 1993 exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS);
1994} 1994}
@@ -2169,7 +2169,7 @@ You must run Emacs in batch mode in order to dump it. */)
2169#ifdef USE_MMAP_FOR_BUFFERS 2169#ifdef USE_MMAP_FOR_BUFFERS
2170 mmap_set_vars (0); 2170 mmap_set_vars (0);
2171#endif 2171#endif
2172 unexec (SDATA (filename), !NILP (symfile) ? SDATA (symfile) : 0); 2172 unexec (SSDATA (filename), !NILP (symfile) ? SSDATA (symfile) : 0);
2173#ifdef USE_MMAP_FOR_BUFFERS 2173#ifdef USE_MMAP_FOR_BUFFERS
2174 mmap_set_vars (1); 2174 mmap_set_vars (1);
2175#endif 2175#endif
diff --git a/src/fileio.c b/src/fileio.c
index 84e32a61265..3c61ee57bf2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -500,7 +500,7 @@ For a Unix-syntax file name, just appends a slash. */)
500 return call2 (handler, Qfile_name_as_directory, file); 500 return call2 (handler, Qfile_name_as_directory, file);
501 501
502 buf = (char *) alloca (SBYTES (file) + 10); 502 buf = (char *) alloca (SBYTES (file) + 10);
503 file_name_as_directory (buf, SDATA (file)); 503 file_name_as_directory (buf, SSDATA (file));
504 return make_specified_string (buf, -1, strlen (buf), 504 return make_specified_string (buf, -1, strlen (buf),
505 STRING_MULTIBYTE (file)); 505 STRING_MULTIBYTE (file));
506} 506}
@@ -559,7 +559,7 @@ In Unix-syntax, this function just removes the final slash. */)
559 return call2 (handler, Qdirectory_file_name, directory); 559 return call2 (handler, Qdirectory_file_name, directory);
560 560
561 buf = (char *) alloca (SBYTES (directory) + 20); 561 buf = (char *) alloca (SBYTES (directory) + 20);
562 directory_file_name (SDATA (directory), buf); 562 directory_file_name (SSDATA (directory), buf);
563 return make_specified_string (buf, -1, strlen (buf), 563 return make_specified_string (buf, -1, strlen (buf),
564 STRING_MULTIBYTE (directory)); 564 STRING_MULTIBYTE (directory));
565} 565}
@@ -935,7 +935,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
935#ifdef WINDOWSNT 935#ifdef WINDOWSNT
936 if (IS_DIRECTORY_SEP (nm[1])) 936 if (IS_DIRECTORY_SEP (nm[1]))
937 { 937 {
938 if (strcmp (nm, SDATA (name)) != 0) 938 if (strcmp (nm, SSDATA (name)) != 0)
939 name = make_specified_string (nm, -1, strlen (nm), multibyte); 939 name = make_specified_string (nm, -1, strlen (nm), multibyte);
940 } 940 }
941 else 941 else
@@ -951,7 +951,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
951 } 951 }
952 return name; 952 return name;
953#else /* not DOS_NT */ 953#else /* not DOS_NT */
954 if (strcmp (nm, SDATA (name)) == 0) 954 if (strcmp (nm, SSDATA (name)) == 0)
955 return name; 955 return name;
956 return make_specified_string (nm, -1, strlen (nm), multibyte); 956 return make_specified_string (nm, -1, strlen (nm), multibyte);
957#endif /* not DOS_NT */ 957#endif /* not DOS_NT */
@@ -1685,13 +1685,13 @@ those `/' is discarded. */)
1685 orig = make_unibyte_string (o, orig_length); 1685 orig = make_unibyte_string (o, orig_length);
1686 decoded = DECODE_FILE (orig); 1686 decoded = DECODE_FILE (orig);
1687 decoded_length = SBYTES (decoded); 1687 decoded_length = SBYTES (decoded);
1688 strncpy (x, SDATA (decoded), decoded_length); 1688 strncpy (x, SSDATA (decoded), decoded_length);
1689 x += decoded_length; 1689 x += decoded_length;
1690 1690
1691 /* If environment variable needed decoding, return value 1691 /* If environment variable needed decoding, return value
1692 needs to be multibyte. */ 1692 needs to be multibyte. */
1693 if (decoded_length != orig_length 1693 if (decoded_length != orig_length
1694 || strncmp (SDATA (decoded), o, orig_length)) 1694 || strncmp (SSDATA (decoded), o, orig_length))
1695 multibyte = 1; 1695 multibyte = 1;
1696 } 1696 }
1697 } 1697 }
@@ -1761,7 +1761,7 @@ barf_or_query_if_file_exists (Lisp_Object absname, const unsigned char *querystr
1761 1761
1762 /* stat is a good way to tell whether the file exists, 1762 /* stat is a good way to tell whether the file exists,
1763 regardless of what access permissions it has. */ 1763 regardless of what access permissions it has. */
1764 if (lstat (SDATA (encoded_filename), &statbuf) >= 0) 1764 if (lstat (SSDATA (encoded_filename), &statbuf) >= 0)
1765 { 1765 {
1766 if (! interactive) 1766 if (! interactive)
1767 xsignal2 (Qfile_already_exists, 1767 xsignal2 (Qfile_already_exists,
@@ -1859,7 +1859,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
1859 || INTEGERP (ok_if_already_exists)) 1859 || INTEGERP (ok_if_already_exists))
1860 barf_or_query_if_file_exists (newname, "copy to it", 1860 barf_or_query_if_file_exists (newname, "copy to it",
1861 INTEGERP (ok_if_already_exists), &out_st, 0); 1861 INTEGERP (ok_if_already_exists), &out_st, 0);
1862 else if (stat (SDATA (encoded_newname), &out_st) < 0) 1862 else if (stat (SSDATA (encoded_newname), &out_st) < 0)
1863 out_st.st_mode = 0; 1863 out_st.st_mode = 0;
1864 1864
1865#ifdef WINDOWSNT 1865#ifdef WINDOWSNT
@@ -1892,7 +1892,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
1892 } 1892 }
1893#else /* not WINDOWSNT */ 1893#else /* not WINDOWSNT */
1894 immediate_quit = 1; 1894 immediate_quit = 1;
1895 ifd = emacs_open (SDATA (encoded_file), O_RDONLY, 0); 1895 ifd = emacs_open (SSDATA (encoded_file), O_RDONLY, 0);
1896 immediate_quit = 0; 1896 immediate_quit = 0;
1897 1897
1898 if (ifd < 0) 1898 if (ifd < 0)
@@ -1942,7 +1942,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
1942 | (NILP (ok_if_already_exists) ? O_EXCL : 0), 1942 | (NILP (ok_if_already_exists) ? O_EXCL : 0),
1943 S_IREAD | S_IWRITE); 1943 S_IREAD | S_IWRITE);
1944#else /* not MSDOS */ 1944#else /* not MSDOS */
1945 ofd = emacs_open (SDATA (encoded_newname), 1945 ofd = emacs_open (SSDATA (encoded_newname),
1946 O_WRONLY | O_TRUNC | O_CREAT 1946 O_WRONLY | O_TRUNC | O_CREAT
1947 | (NILP (ok_if_already_exists) ? O_EXCL : 0), 1947 | (NILP (ok_if_already_exists) ? O_EXCL : 0),
1948 0666); 1948 0666);
@@ -1993,7 +1993,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
1993 EMACS_TIME atime, mtime; 1993 EMACS_TIME atime, mtime;
1994 EMACS_SET_SECS_USECS (atime, st.st_atime, 0); 1994 EMACS_SET_SECS_USECS (atime, st.st_atime, 0);
1995 EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0); 1995 EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
1996 if (set_file_times (SDATA (encoded_newname), 1996 if (set_file_times (SSDATA (encoded_newname),
1997 atime, mtime)) 1997 atime, mtime))
1998 xsignal2 (Qfile_date_error, 1998 xsignal2 (Qfile_date_error,
1999 build_string ("Cannot set file date"), newname); 1999 build_string ("Cannot set file date"), newname);
@@ -2109,7 +2109,7 @@ With a prefix argument, TRASH is nil. */)
2109 2109
2110 encoded_file = ENCODE_FILE (filename); 2110 encoded_file = ENCODE_FILE (filename);
2111 2111
2112 if (0 > unlink (SDATA (encoded_file))) 2112 if (0 > unlink (SSDATA (encoded_file)))
2113 report_file_error ("Removing old name", list1 (filename)); 2113 report_file_error ("Removing old name", list1 (filename));
2114 return Qnil; 2114 return Qnil;
2115} 2115}
@@ -2190,7 +2190,7 @@ This is what happens in interactive use with M-x. */)
2190 || INTEGERP (ok_if_already_exists)) 2190 || INTEGERP (ok_if_already_exists))
2191 barf_or_query_if_file_exists (newname, "rename to it", 2191 barf_or_query_if_file_exists (newname, "rename to it",
2192 INTEGERP (ok_if_already_exists), 0, 0); 2192 INTEGERP (ok_if_already_exists), 0, 0);
2193 if (0 > rename (SDATA (encoded_file), SDATA (encoded_newname))) 2193 if (0 > rename (SSDATA (encoded_file), SSDATA (encoded_newname)))
2194 { 2194 {
2195 if (errno == EXDEV) 2195 if (errno == EXDEV)
2196 { 2196 {
@@ -2277,8 +2277,8 @@ This is what happens in interactive use with M-x. */)
2277 barf_or_query_if_file_exists (newname, "make it a new name", 2277 barf_or_query_if_file_exists (newname, "make it a new name",
2278 INTEGERP (ok_if_already_exists), 0, 0); 2278 INTEGERP (ok_if_already_exists), 0, 0);
2279 2279
2280 unlink (SDATA (newname)); 2280 unlink (SSDATA (newname));
2281 if (0 > link (SDATA (encoded_file), SDATA (encoded_newname))) 2281 if (0 > link (SSDATA (encoded_file), SSDATA (encoded_newname)))
2282 report_file_error ("Adding new name", list2 (file, newname)); 2282 report_file_error ("Adding new name", list2 (file, newname));
2283 2283
2284 UNGCPRO; 2284 UNGCPRO;
@@ -2336,15 +2336,15 @@ This happens for interactive use with M-x. */)
2336 || INTEGERP (ok_if_already_exists)) 2336 || INTEGERP (ok_if_already_exists))
2337 barf_or_query_if_file_exists (linkname, "make it a link", 2337 barf_or_query_if_file_exists (linkname, "make it a link",
2338 INTEGERP (ok_if_already_exists), 0, 0); 2338 INTEGERP (ok_if_already_exists), 0, 0);
2339 if (0 > symlink (SDATA (encoded_filename), 2339 if (0 > symlink (SSDATA (encoded_filename),
2340 SDATA (encoded_linkname))) 2340 SSDATA (encoded_linkname)))
2341 { 2341 {
2342 /* If we didn't complain already, silently delete existing file. */ 2342 /* If we didn't complain already, silently delete existing file. */
2343 if (errno == EEXIST) 2343 if (errno == EEXIST)
2344 { 2344 {
2345 unlink (SDATA (encoded_linkname)); 2345 unlink (SSDATA (encoded_linkname));
2346 if (0 <= symlink (SDATA (encoded_filename), 2346 if (0 <= symlink (SSDATA (encoded_filename),
2347 SDATA (encoded_linkname))) 2347 SSDATA (encoded_linkname)))
2348 { 2348 {
2349 UNGCPRO; 2349 UNGCPRO;
2350 return Qnil; 2350 return Qnil;
@@ -2444,7 +2444,7 @@ Use `file-symlink-p' to test for such links. */)
2444 2444
2445 absname = ENCODE_FILE (absname); 2445 absname = ENCODE_FILE (absname);
2446 2446
2447 return (stat (SDATA (absname), &statbuf) >= 0) ? Qt : Qnil; 2447 return (stat (SSDATA (absname), &statbuf) >= 0) ? Qt : Qnil;
2448} 2448}
2449 2449
2450DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0, 2450DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0,
@@ -2466,7 +2466,7 @@ For a directory, this means you can access files in that directory. */)
2466 2466
2467 absname = ENCODE_FILE (absname); 2467 absname = ENCODE_FILE (absname);
2468 2468
2469 return (check_executable (SDATA (absname)) ? Qt : Qnil); 2469 return (check_executable (SSDATA (absname)) ? Qt : Qnil);
2470} 2470}
2471 2471
2472DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0, 2472DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0,
@@ -2503,13 +2503,13 @@ See also `file-exists-p' and `file-attributes'. */)
2503 /* Opening a fifo without O_NONBLOCK can wait. 2503 /* Opening a fifo without O_NONBLOCK can wait.
2504 We don't want to wait. But we don't want to mess wth O_NONBLOCK 2504 We don't want to wait. But we don't want to mess wth O_NONBLOCK
2505 except in the case of a fifo, on a system which handles it. */ 2505 except in the case of a fifo, on a system which handles it. */
2506 desc = stat (SDATA (absname), &statbuf); 2506 desc = stat (SSDATA (absname), &statbuf);
2507 if (desc < 0) 2507 if (desc < 0)
2508 return Qnil; 2508 return Qnil;
2509 if (S_ISFIFO (statbuf.st_mode)) 2509 if (S_ISFIFO (statbuf.st_mode))
2510 flags |= O_NONBLOCK; 2510 flags |= O_NONBLOCK;
2511#endif 2511#endif
2512 desc = emacs_open (SDATA (absname), flags, 0); 2512 desc = emacs_open (SSDATA (absname), flags, 0);
2513 if (desc < 0) 2513 if (desc < 0)
2514 return Qnil; 2514 return Qnil;
2515 emacs_close (desc); 2515 emacs_close (desc);
@@ -2537,8 +2537,8 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
2537 return call2 (handler, Qfile_writable_p, absname); 2537 return call2 (handler, Qfile_writable_p, absname);
2538 2538
2539 encoded = ENCODE_FILE (absname); 2539 encoded = ENCODE_FILE (absname);
2540 if (stat (SDATA (encoded), &statbuf) >= 0) 2540 if (stat (SSDATA (encoded), &statbuf) >= 0)
2541 return (check_writable (SDATA (encoded)) 2541 return (check_writable (SSDATA (encoded))
2542 ? Qt : Qnil); 2542 ? Qt : Qnil);
2543 2543
2544 dir = Ffile_name_directory (absname); 2544 dir = Ffile_name_directory (absname);
@@ -2583,9 +2583,9 @@ If there is no error, returns nil. */)
2583 2583
2584 encoded_filename = ENCODE_FILE (absname); 2584 encoded_filename = ENCODE_FILE (absname);
2585 2585
2586 fd = emacs_open (SDATA (encoded_filename), O_RDONLY, 0); 2586 fd = emacs_open (SSDATA (encoded_filename), O_RDONLY, 0);
2587 if (fd < 0) 2587 if (fd < 0)
2588 report_file_error (SDATA (string), Fcons (filename, Qnil)); 2588 report_file_error (SSDATA (string), Fcons (filename, Qnil));
2589 emacs_close (fd); 2589 emacs_close (fd);
2590 2590
2591 return Qnil; 2591 return Qnil;
@@ -2629,7 +2629,7 @@ points to a nonexistent file. */)
2629 memset (buf, 0, bufsize); 2629 memset (buf, 0, bufsize);
2630 2630
2631 errno = 0; 2631 errno = 0;
2632 valsize = readlink (SDATA (filename), buf, bufsize); 2632 valsize = readlink (SSDATA (filename), buf, bufsize);
2633 if (valsize == -1) 2633 if (valsize == -1)
2634 { 2634 {
2635#ifdef ERANGE 2635#ifdef ERANGE
@@ -2678,7 +2678,7 @@ See `file-symlink-p' to distinguish symlinks. */)
2678 2678
2679 absname = ENCODE_FILE (absname); 2679 absname = ENCODE_FILE (absname);
2680 2680
2681 if (stat (SDATA (absname), &st) < 0) 2681 if (stat (SSDATA (absname), &st) < 0)
2682 return Qnil; 2682 return Qnil;
2683 return (st.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil; 2683 return (st.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil;
2684} 2684}
@@ -2746,7 +2746,7 @@ See `file-symlink-p' to distinguish symlinks. */)
2746 return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil; 2746 return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil;
2747 } 2747 }
2748#else 2748#else
2749 if (stat (SDATA (absname), &st) < 0) 2749 if (stat (SSDATA (absname), &st) < 0)
2750 return Qnil; 2750 return Qnil;
2751 return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil; 2751 return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil;
2752#endif 2752#endif
@@ -2903,7 +2903,7 @@ Return nil, if file does not exist or is not accessible. */)
2903 2903
2904 absname = ENCODE_FILE (absname); 2904 absname = ENCODE_FILE (absname);
2905 2905
2906 if (stat (SDATA (absname), &st) < 0) 2906 if (stat (SSDATA (absname), &st) < 0)
2907 return Qnil; 2907 return Qnil;
2908 2908
2909 return make_number (st.st_mode & 07777); 2909 return make_number (st.st_mode & 07777);
@@ -2933,7 +2933,7 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */)
2933 2933
2934 encoded_absname = ENCODE_FILE (absname); 2934 encoded_absname = ENCODE_FILE (absname);
2935 2935
2936 if (chmod (SDATA (encoded_absname), XINT (mode)) < 0) 2936 if (chmod (SSDATA (encoded_absname), XINT (mode)) < 0)
2937 report_file_error ("Doing chmod", Fcons (absname, Qnil)); 2937 report_file_error ("Doing chmod", Fcons (absname, Qnil));
2938 2938
2939 return Qnil; 2939 return Qnil;
@@ -3000,7 +3000,7 @@ Use the current time if TIME is nil. TIME is in the format of
3000 EMACS_SET_SECS (t, sec); 3000 EMACS_SET_SECS (t, sec);
3001 EMACS_SET_USECS (t, usec); 3001 EMACS_SET_USECS (t, usec);
3002 3002
3003 if (set_file_times (SDATA (encoded_absname), t, t)) 3003 if (set_file_times (SSDATA (encoded_absname), t, t))
3004 { 3004 {
3005#ifdef DOS_NT 3005#ifdef DOS_NT
3006 struct stat st; 3006 struct stat st;
@@ -3063,12 +3063,12 @@ otherwise, if FILE2 does not exist, the answer is t. */)
3063 absname2 = ENCODE_FILE (absname2); 3063 absname2 = ENCODE_FILE (absname2);
3064 UNGCPRO; 3064 UNGCPRO;
3065 3065
3066 if (stat (SDATA (absname1), &st) < 0) 3066 if (stat (SSDATA (absname1), &st) < 0)
3067 return Qnil; 3067 return Qnil;
3068 3068
3069 mtime1 = st.st_mtime; 3069 mtime1 = st.st_mtime;
3070 3070
3071 if (stat (SDATA (absname2), &st) < 0) 3071 if (stat (SSDATA (absname2), &st) < 0)
3072 return Qt; 3072 return Qt;
3073 3073
3074 return (mtime1 > st.st_mtime) ? Qt : Qnil; 3074 return (mtime1 > st.st_mtime) ? Qt : Qnil;
@@ -3250,12 +3250,12 @@ variable `last-coding-system-used' to the coding system actually used. */)
3250 3250
3251 /* Tell stat to use expensive method to get accurate info. */ 3251 /* Tell stat to use expensive method to get accurate info. */
3252 Vw32_get_true_file_attributes = Qt; 3252 Vw32_get_true_file_attributes = Qt;
3253 total = stat (SDATA (filename), &st); 3253 total = stat (SSDATA (filename), &st);
3254 Vw32_get_true_file_attributes = tem; 3254 Vw32_get_true_file_attributes = tem;
3255 } 3255 }
3256 if (total < 0) 3256 if (total < 0)
3257#else 3257#else
3258 if (stat (SDATA (filename), &st) < 0) 3258 if (stat (SSDATA (filename), &st) < 0)
3259#endif /* WINDOWSNT */ 3259#endif /* WINDOWSNT */
3260 { 3260 {
3261 if (fd >= 0) emacs_close (fd); 3261 if (fd >= 0) emacs_close (fd);
@@ -3287,7 +3287,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
3287#endif 3287#endif
3288 3288
3289 if (fd < 0) 3289 if (fd < 0)
3290 if ((fd = emacs_open (SDATA (filename), O_RDONLY, 0)) < 0) 3290 if ((fd = emacs_open (SSDATA (filename), O_RDONLY, 0)) < 0)
3291 goto badopen; 3291 goto badopen;
3292 3292
3293 /* Replacement should preserve point as it preserves markers. */ 3293 /* Replacement should preserve point as it preserves markers. */
@@ -4975,8 +4975,8 @@ e_write (int desc, Lisp_Object string, int start, int end, struct coding_system
4975 coding->produced -= 4975 coding->produced -=
4976 emacs_write (desc, 4976 emacs_write (desc,
4977 STRINGP (coding->dst_object) 4977 STRINGP (coding->dst_object)
4978 ? SDATA (coding->dst_object) 4978 ? SSDATA (coding->dst_object)
4979 : BYTE_POS_ADDR (coding->dst_pos_byte), 4979 : (char *) BYTE_POS_ADDR (coding->dst_pos_byte),
4980 coding->produced); 4980 coding->produced);
4981 4981
4982 if (coding->produced) 4982 if (coding->produced)
@@ -5021,7 +5021,7 @@ See Info node `(elisp)Modification Time' for more details. */)
5021 5021
5022 filename = ENCODE_FILE (b->filename); 5022 filename = ENCODE_FILE (b->filename);
5023 5023
5024 if (stat (SDATA (filename), &st) < 0) 5024 if (stat (SSDATA (filename), &st) < 0)
5025 { 5025 {
5026 /* If the file doesn't exist now and didn't exist before, 5026 /* If the file doesn't exist now and didn't exist before,
5027 we say that it isn't modified, provided the error is a tame one. */ 5027 we say that it isn't modified, provided the error is a tame one. */
@@ -5098,7 +5098,7 @@ An argument specifies the modification time value to use
5098 5098
5099 filename = ENCODE_FILE (filename); 5099 filename = ENCODE_FILE (filename);
5100 5100
5101 if (stat (SDATA (filename), &st) >= 0) 5101 if (stat (SSDATA (filename), &st) >= 0)
5102 { 5102 {
5103 current_buffer->modtime = st.st_mtime; 5103 current_buffer->modtime = st.st_mtime;
5104 current_buffer->modtime_size = st.st_size; 5104 current_buffer->modtime_size = st.st_size;
@@ -5155,7 +5155,7 @@ auto_save_1 (void)
5155 /* Get visited file's mode to become the auto save file's mode. */ 5155 /* Get visited file's mode to become the auto save file's mode. */
5156 if (! NILP (current_buffer->filename)) 5156 if (! NILP (current_buffer->filename))
5157 { 5157 {
5158 if (stat (SDATA (current_buffer->filename), &st) >= 0) 5158 if (stat (SSDATA (current_buffer->filename), &st) >= 0)
5159 /* But make sure we can overwrite it later! */ 5159 /* But make sure we can overwrite it later! */
5160 auto_save_mode_bits = st.st_mode | 0600; 5160 auto_save_mode_bits = st.st_mode | 0600;
5161 else if ((modes = Ffile_modes (current_buffer->filename), 5161 else if ((modes = Ffile_modes (current_buffer->filename),
@@ -5278,7 +5278,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
5278 UNGCPRO; 5278 UNGCPRO;
5279 } 5279 }
5280 5280
5281 stream = fopen (SDATA (listfile), "w"); 5281 stream = fopen (SSDATA (listfile), "w");
5282 } 5282 }
5283 5283
5284 record_unwind_protect (do_auto_save_unwind, 5284 record_unwind_protect (do_auto_save_unwind,
diff --git a/src/filelock.c b/src/filelock.c
index c23a9fef765..8fa871f56ef 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -214,9 +214,9 @@ get_boot_time (void)
214 214
215 if (! NILP (filename)) 215 if (! NILP (filename))
216 { 216 {
217 get_boot_time_1 (SDATA (filename), 1); 217 get_boot_time_1 (SSDATA (filename), 1);
218 if (delete_flag) 218 if (delete_flag)
219 unlink (SDATA (filename)); 219 unlink (SSDATA (filename));
220 } 220 }
221 } 221 }
222 222
@@ -315,7 +315,7 @@ fill_in_lock_file_name (register char *lockfile, register Lisp_Object fn)
315 struct stat st; 315 struct stat st;
316 int count = 0; 316 int count = 0;
317 317
318 strcpy (lockfile, SDATA (fn)); 318 strcpy (lockfile, SSDATA (fn));
319 319
320 /* Shift the nondirectory part of the file name (including the null) 320 /* Shift the nondirectory part of the file name (including the null)
321 right two characters. Here is one of the places where we'd have to 321 right two characters. Here is one of the places where we'd have to
@@ -475,7 +475,7 @@ current_lock_owner (lock_info_type *owner, char *lfname)
475 475
476 /* On current host? */ 476 /* On current host? */
477 if (STRINGP (Fsystem_name ()) 477 if (STRINGP (Fsystem_name ())
478 && strcmp (owner->host, SDATA (Fsystem_name ())) == 0) 478 && strcmp (owner->host, SSDATA (Fsystem_name ())) == 0)
479 { 479 {
480 if (owner->pid == getpid ()) 480 if (owner->pid == getpid ())
481 ret = 2; /* We own it. */ 481 ret = 2; /* We own it. */
diff --git a/src/fns.c b/src/fns.c
index 218f08901ae..e2853c2be94 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -908,7 +908,7 @@ string_to_multibyte (Lisp_Object string)
908 /* If all the chars are ASCII, they won't need any more bytes once 908 /* If all the chars are ASCII, they won't need any more bytes once
909 converted. */ 909 converted. */
910 if (nbytes == SBYTES (string)) 910 if (nbytes == SBYTES (string))
911 return make_multibyte_string (SDATA (string), nbytes, nbytes); 911 return make_multibyte_string (SSDATA (string), nbytes, nbytes);
912 912
913 SAFE_ALLOCA (buf, unsigned char *, nbytes); 913 SAFE_ALLOCA (buf, unsigned char *, nbytes);
914 memcpy (buf, SDATA (string), SBYTES (string)); 914 memcpy (buf, SDATA (string), SBYTES (string));
@@ -1171,7 +1171,7 @@ value is a new vector that contains the elements between index FROM
1171 1171
1172 if (STRINGP (string)) 1172 if (STRINGP (string))
1173 { 1173 {
1174 res = make_specified_string (SDATA (string) + from_byte, 1174 res = make_specified_string (SSDATA (string) + from_byte,
1175 to_char - from_char, to_byte - from_byte, 1175 to_char - from_char, to_byte - from_byte,
1176 STRING_MULTIBYTE (string)); 1176 STRING_MULTIBYTE (string));
1177 copy_text_properties (make_number (from_char), make_number (to_char), 1177 copy_text_properties (make_number (from_char), make_number (to_char),
@@ -1235,7 +1235,7 @@ With one argument, just copy STRING without its properties. */)
1235 args_out_of_range_3 (string, make_number (from_char), 1235 args_out_of_range_3 (string, make_number (from_char),
1236 make_number (to_char)); 1236 make_number (to_char));
1237 1237
1238 return make_specified_string (SDATA (string) + from_byte, 1238 return make_specified_string (SSDATA (string) + from_byte,
1239 to_char - from_char, to_byte - from_byte, 1239 to_char - from_char, to_byte - from_byte,
1240 STRING_MULTIBYTE (string)); 1240 STRING_MULTIBYTE (string));
1241} 1241}
@@ -1266,7 +1266,7 @@ substring_both (Lisp_Object string, EMACS_INT from, EMACS_INT from_byte,
1266 1266
1267 if (STRINGP (string)) 1267 if (STRINGP (string))
1268 { 1268 {
1269 res = make_specified_string (SDATA (string) + from_byte, 1269 res = make_specified_string (SSDATA (string) + from_byte,
1270 to - from, to_byte - from_byte, 1270 to - from, to_byte - from_byte,
1271 STRING_MULTIBYTE (string)); 1271 STRING_MULTIBYTE (string));
1272 copy_text_properties (make_number (from), make_number (to), 1272 copy_text_properties (make_number (from), make_number (to),
@@ -2496,12 +2496,12 @@ is nil, and `use-dialog-box' is non-nil. */)
2496 ans = Fdowncase (Fread_from_minibuffer (prompt, Qnil, Qnil, Qnil, 2496 ans = Fdowncase (Fread_from_minibuffer (prompt, Qnil, Qnil, Qnil,
2497 Qyes_or_no_p_history, Qnil, 2497 Qyes_or_no_p_history, Qnil,
2498 Qnil)); 2498 Qnil));
2499 if (SCHARS (ans) == 3 && !strcmp (SDATA (ans), "yes")) 2499 if (SCHARS (ans) == 3 && !strcmp (SSDATA (ans), "yes"))
2500 { 2500 {
2501 UNGCPRO; 2501 UNGCPRO;
2502 return Qt; 2502 return Qt;
2503 } 2503 }
2504 if (SCHARS (ans) == 2 && !strcmp (SDATA (ans), "no")) 2504 if (SCHARS (ans) == 2 && !strcmp (SSDATA (ans), "no"))
2505 { 2505 {
2506 UNGCPRO; 2506 UNGCPRO;
2507 return Qnil; 2507 return Qnil;
@@ -3038,7 +3038,7 @@ into shorter lines. */)
3038 /* We need to allocate enough room for decoding the text. */ 3038 /* We need to allocate enough room for decoding the text. */
3039 SAFE_ALLOCA (encoded, char *, allength); 3039 SAFE_ALLOCA (encoded, char *, allength);
3040 3040
3041 encoded_length = base64_encode_1 (SDATA (string), 3041 encoded_length = base64_encode_1 (SSDATA (string),
3042 encoded, length, NILP (no_line_break), 3042 encoded, length, NILP (no_line_break),
3043 STRING_MULTIBYTE (string)); 3043 STRING_MULTIBYTE (string));
3044 if (encoded_length > allength) 3044 if (encoded_length > allength)
@@ -3233,7 +3233,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string,
3233 SAFE_ALLOCA (decoded, char *, length); 3233 SAFE_ALLOCA (decoded, char *, length);
3234 3234
3235 /* The decoded result should be unibyte. */ 3235 /* The decoded result should be unibyte. */
3236 decoded_length = base64_decode_1 (SDATA (string), decoded, length, 3236 decoded_length = base64_decode_1 (SSDATA (string), decoded, length,
3237 0, NULL); 3237 0, NULL);
3238 if (decoded_length > length) 3238 if (decoded_length > length)
3239 abort (); 3239 abort ();
@@ -4745,7 +4745,7 @@ guesswork fails. Normally, an error is signaled in such case. */)
4745 object = code_convert_string (object, coding_system, Qnil, 1, 0, 0); 4745 object = code_convert_string (object, coding_system, Qnil, 1, 0, 0);
4746 } 4746 }
4747 4747
4748 md5_buffer (SDATA (object) + start_byte, 4748 md5_buffer (SSDATA (object) + start_byte,
4749 SBYTES (object) - (size_byte - end_byte), 4749 SBYTES (object) - (size_byte - end_byte),
4750 digest); 4750 digest);
4751 4751
@@ -4936,4 +4936,3 @@ void
4936init_fns (void) 4936init_fns (void)
4937{ 4937{
4938} 4938}
4939
diff --git a/src/font.c b/src/font.c
index 58d8dc90962..907271566da 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3591,7 +3591,7 @@ font_filter_properties (Lisp_Object font,
3591 { 3591 {
3592 Lisp_Object key = XCAR (XCAR (it)); 3592 Lisp_Object key = XCAR (XCAR (it));
3593 Lisp_Object val = XCDR (XCAR (it)); 3593 Lisp_Object val = XCDR (XCAR (it));
3594 char *keystr = SDATA (SYMBOL_NAME (key)); 3594 char *keystr = SSDATA (SYMBOL_NAME (key));
3595 3595
3596 if (strcmp (boolean_properties[i], keystr) == 0) 3596 if (strcmp (boolean_properties[i], keystr) == 0)
3597 { 3597 {
@@ -3616,7 +3616,7 @@ font_filter_properties (Lisp_Object font,
3616 { 3616 {
3617 Lisp_Object key = XCAR (XCAR (it)); 3617 Lisp_Object key = XCAR (XCAR (it));
3618 Lisp_Object val = XCDR (XCAR (it)); 3618 Lisp_Object val = XCDR (XCAR (it));
3619 char *keystr = SDATA (SYMBOL_NAME (key)); 3619 char *keystr = SSDATA (SYMBOL_NAME (key));
3620 if (strcmp (non_boolean_properties[i], keystr) == 0) 3620 if (strcmp (non_boolean_properties[i], keystr) == 0)
3621 Ffont_put (font, key, val); 3621 Ffont_put (font, key, val);
3622 } 3622 }
diff --git a/src/frame.c b/src/frame.c
index 961c42c0976..20bad4cb8c5 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -693,7 +693,7 @@ affects all frames on the same terminal device. */)
693 if (!NILP (tty)) 693 if (!NILP (tty))
694 { 694 {
695 name = (char *) alloca (SBYTES (tty) + 1); 695 name = (char *) alloca (SBYTES (tty) + 1);
696 strncpy (name, SDATA (tty), SBYTES (tty)); 696 strncpy (name, SSDATA (tty), SBYTES (tty));
697 name[SBYTES (tty)] = 0; 697 name[SBYTES (tty)] = 0;
698 } 698 }
699 699
@@ -704,7 +704,7 @@ affects all frames on the same terminal device. */)
704 if (!NILP (tty_type)) 704 if (!NILP (tty_type))
705 { 705 {
706 type = (char *) alloca (SBYTES (tty_type) + 1); 706 type = (char *) alloca (SBYTES (tty_type) + 1);
707 strncpy (type, SDATA (tty_type), SBYTES (tty_type)); 707 strncpy (type, SSDATA (tty_type), SBYTES (tty_type));
708 type[SBYTES (tty_type)] = 0; 708 type[SBYTES (tty_type)] = 0;
709 } 709 }
710 710
@@ -2176,7 +2176,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
2176 2176
2177 /* Check for no change needed in this very common case 2177 /* Check for no change needed in this very common case
2178 before we do any consing. */ 2178 before we do any consing. */
2179 if (frame_name_fnn_p (SDATA (f->name), 2179 if (frame_name_fnn_p (SSDATA (f->name),
2180 SBYTES (f->name))) 2180 SBYTES (f->name)))
2181 return; 2181 return;
2182 2182
@@ -2194,7 +2194,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
2194 2194
2195 /* Don't allow the user to set the frame name to F<num>, so it 2195 /* Don't allow the user to set the frame name to F<num>, so it
2196 doesn't clash with the names we generate for terminal frames. */ 2196 doesn't clash with the names we generate for terminal frames. */
2197 if (frame_name_fnn_p (SDATA (name), SBYTES (name))) 2197 if (frame_name_fnn_p (SSDATA (name), SBYTES (name)))
2198 error ("Frame names of the form F<num> are usurped by Emacs"); 2198 error ("Frame names of the form F<num> are usurped by Emacs");
2199 } 2199 }
2200 2200
@@ -2321,11 +2321,11 @@ If FRAME is omitted, return information on the currently selected frame. */)
2321 elt = Fassq (Qforeground_color, alist); 2321 elt = Fassq (Qforeground_color, alist);
2322 if (CONSP (elt) && STRINGP (XCDR (elt))) 2322 if (CONSP (elt) && STRINGP (XCDR (elt)))
2323 { 2323 {
2324 if (strncmp (SDATA (XCDR (elt)), 2324 if (strncmp (SSDATA (XCDR (elt)),
2325 unspecified_bg, 2325 unspecified_bg,
2326 SCHARS (XCDR (elt))) == 0) 2326 SCHARS (XCDR (elt))) == 0)
2327 store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg)); 2327 store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg));
2328 else if (strncmp (SDATA (XCDR (elt)), 2328 else if (strncmp (SSDATA (XCDR (elt)),
2329 unspecified_fg, 2329 unspecified_fg,
2330 SCHARS (XCDR (elt))) == 0) 2330 SCHARS (XCDR (elt))) == 0)
2331 store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); 2331 store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg));
@@ -2335,11 +2335,11 @@ If FRAME is omitted, return information on the currently selected frame. */)
2335 elt = Fassq (Qbackground_color, alist); 2335 elt = Fassq (Qbackground_color, alist);
2336 if (CONSP (elt) && STRINGP (XCDR (elt))) 2336 if (CONSP (elt) && STRINGP (XCDR (elt)))
2337 { 2337 {
2338 if (strncmp (SDATA (XCDR (elt)), 2338 if (strncmp (SSDATA (XCDR (elt)),
2339 unspecified_fg, 2339 unspecified_fg,
2340 SCHARS (XCDR (elt))) == 0) 2340 SCHARS (XCDR (elt))) == 0)
2341 store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg)); 2341 store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg));
2342 else if (strncmp (SDATA (XCDR (elt)), 2342 else if (strncmp (SSDATA (XCDR (elt)),
2343 unspecified_bg, 2343 unspecified_bg,
2344 SCHARS (XCDR (elt))) == 0) 2344 SCHARS (XCDR (elt))) == 0)
2345 store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); 2345 store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg));
@@ -2428,7 +2428,7 @@ If FRAME is nil, describe the currently selected frame. */)
2428 2428
2429 if (EQ (parameter, Qbackground_color)) 2429 if (EQ (parameter, Qbackground_color))
2430 { 2430 {
2431 color_name = SDATA (value); 2431 color_name = SSDATA (value);
2432 csz = SCHARS (value); 2432 csz = SCHARS (value);
2433 if (strncmp (color_name, unspecified_bg, csz) == 0) 2433 if (strncmp (color_name, unspecified_bg, csz) == 0)
2434 value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f)); 2434 value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f));
@@ -2437,7 +2437,7 @@ If FRAME is nil, describe the currently selected frame. */)
2437 } 2437 }
2438 else if (EQ (parameter, Qforeground_color)) 2438 else if (EQ (parameter, Qforeground_color))
2439 { 2439 {
2440 color_name = SDATA (value); 2440 color_name = SSDATA (value);
2441 csz = SCHARS (value); 2441 csz = SCHARS (value);
2442 if (strncmp (color_name, unspecified_fg, csz) == 0) 2442 if (strncmp (color_name, unspecified_fg, csz) == 0)
2443 value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f)); 2443 value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f));
@@ -3307,16 +3307,16 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
3307 fontset = fs_query_fontset (arg, 0); 3307 fontset = fs_query_fontset (arg, 0);
3308 if (fontset < 0) 3308 if (fontset < 0)
3309 { 3309 {
3310 font_object = font_open_by_name (f, SDATA (arg)); 3310 font_object = font_open_by_name (f, SSDATA (arg));
3311 if (NILP (font_object)) 3311 if (NILP (font_object))
3312 error ("Font `%s' is not defined", SDATA (arg)); 3312 error ("Font `%s' is not defined", SSDATA (arg));
3313 arg = AREF (font_object, FONT_NAME_INDEX); 3313 arg = AREF (font_object, FONT_NAME_INDEX);
3314 } 3314 }
3315 else if (fontset > 0) 3315 else if (fontset > 0)
3316 { 3316 {
3317 Lisp_Object ascii_font = fontset_ascii (fontset); 3317 Lisp_Object ascii_font = fontset_ascii (fontset);
3318 3318
3319 font_object = font_open_by_name (f, SDATA (ascii_font)); 3319 font_object = font_open_by_name (f, SSDATA (ascii_font));
3320 if (NILP (font_object)) 3320 if (NILP (font_object))
3321 error ("Font `%s' is not defined", SDATA (arg)); 3321 error ("Font `%s' is not defined", SDATA (arg));
3322 arg = AREF (font_object, FONT_NAME_INDEX); 3322 arg = AREF (font_object, FONT_NAME_INDEX);
@@ -3394,7 +3394,7 @@ x_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
3394 char *p0, *p1; 3394 char *p0, *p1;
3395 3395
3396 CHECK_STRING (new_value); 3396 CHECK_STRING (new_value);
3397 p0 = p1 = SDATA (new_value); 3397 p0 = p1 = SSDATA (new_value);
3398 new_value = Qnil; 3398 new_value = Qnil;
3399 while (*p0) 3399 while (*p0)
3400 { 3400 {
@@ -3771,23 +3771,23 @@ xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Li
3771 3771
3772 /* Start with emacs.FRAMENAME for the name (the specific one) 3772 /* Start with emacs.FRAMENAME for the name (the specific one)
3773 and with `Emacs' for the class key (the general one). */ 3773 and with `Emacs' for the class key (the general one). */
3774 strcpy (name_key, SDATA (Vx_resource_name)); 3774 strcpy (name_key, SSDATA (Vx_resource_name));
3775 strcpy (class_key, SDATA (Vx_resource_class)); 3775 strcpy (class_key, SSDATA (Vx_resource_class));
3776 3776
3777 strcat (class_key, "."); 3777 strcat (class_key, ".");
3778 strcat (class_key, SDATA (class)); 3778 strcat (class_key, SSDATA (class));
3779 3779
3780 if (!NILP (component)) 3780 if (!NILP (component))
3781 { 3781 {
3782 strcat (class_key, "."); 3782 strcat (class_key, ".");
3783 strcat (class_key, SDATA (subclass)); 3783 strcat (class_key, SSDATA (subclass));
3784 3784
3785 strcat (name_key, "."); 3785 strcat (name_key, ".");
3786 strcat (name_key, SDATA (component)); 3786 strcat (name_key, SSDATA (component));
3787 } 3787 }
3788 3788
3789 strcat (name_key, "."); 3789 strcat (name_key, ".");
3790 strcat (name_key, SDATA (attribute)); 3790 strcat (name_key, SSDATA (attribute));
3791 3791
3792 value = x_get_string_resource (rdb, name_key, class_key); 3792 value = x_get_string_resource (rdb, name_key, class_key);
3793 3793
@@ -3904,25 +3904,25 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
3904 switch (type) 3904 switch (type)
3905 { 3905 {
3906 case RES_TYPE_NUMBER: 3906 case RES_TYPE_NUMBER:
3907 return make_number (atoi (SDATA (tem))); 3907 return make_number (atoi (SSDATA (tem)));
3908 3908
3909 case RES_TYPE_BOOLEAN_NUMBER: 3909 case RES_TYPE_BOOLEAN_NUMBER:
3910 if (!strcmp (SDATA (tem), "on") 3910 if (!strcmp (SSDATA (tem), "on")
3911 || !strcmp (SDATA (tem), "true")) 3911 || !strcmp (SSDATA (tem), "true"))
3912 return make_number (1); 3912 return make_number (1);
3913 return make_number (atoi (SDATA (tem))); 3913 return make_number (atoi (SSDATA (tem)));
3914 break; 3914 break;
3915 3915
3916 case RES_TYPE_FLOAT: 3916 case RES_TYPE_FLOAT:
3917 return make_float (atof (SDATA (tem))); 3917 return make_float (atof (SSDATA (tem)));
3918 3918
3919 case RES_TYPE_BOOLEAN: 3919 case RES_TYPE_BOOLEAN:
3920 tem = Fdowncase (tem); 3920 tem = Fdowncase (tem);
3921 if (!strcmp (SDATA (tem), "on") 3921 if (!strcmp (SSDATA (tem), "on")
3922#ifdef HAVE_NS 3922#ifdef HAVE_NS
3923 || !strcmp(SDATA(tem), "yes") 3923 || !strcmp (SSDATA (tem), "yes")
3924#endif 3924#endif
3925 || !strcmp (SDATA (tem), "true")) 3925 || !strcmp (SSDATA (tem), "true"))
3926 return Qt; 3926 return Qt;
3927 else 3927 else
3928 return Qnil; 3928 return Qnil;
@@ -3936,17 +3936,17 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
3936 { 3936 {
3937 Lisp_Object lower; 3937 Lisp_Object lower;
3938 lower = Fdowncase (tem); 3938 lower = Fdowncase (tem);
3939 if (!strcmp (SDATA (lower), "on") 3939 if (!strcmp (SSDATA (lower), "on")
3940#ifdef HAVE_NS 3940#ifdef HAVE_NS
3941 || !strcmp(SDATA(lower), "yes") 3941 || !strcmp (SSDATA (lower), "yes")
3942#endif 3942#endif
3943 || !strcmp (SDATA (lower), "true")) 3943 || !strcmp (SSDATA (lower), "true"))
3944 return Qt; 3944 return Qt;
3945 else if (!strcmp (SDATA (lower), "off") 3945 else if (!strcmp (SSDATA (lower), "off")
3946#ifdef HAVE_NS 3946#ifdef HAVE_NS
3947 || !strcmp(SDATA(lower), "no") 3947 || !strcmp (SSDATA (lower), "no")
3948#endif 3948#endif
3949 || !strcmp (SDATA (lower), "false")) 3949 || !strcmp (SSDATA (lower), "false"))
3950 return Qnil; 3950 return Qnil;
3951 else 3951 else
3952 return Fintern (tem, Qnil); 3952 return Fintern (tem, Qnil);
diff --git a/src/image.c b/src/image.c
index 67de90e32a7..d533d7edee6 100644
--- a/src/image.c
+++ b/src/image.c
@@ -376,7 +376,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
376 dpyinfo->bitmaps[id - 1].depth = 1; 376 dpyinfo->bitmaps[id - 1].depth = 1;
377 dpyinfo->bitmaps[id - 1].height = height; 377 dpyinfo->bitmaps[id - 1].height = height;
378 dpyinfo->bitmaps[id - 1].width = width; 378 dpyinfo->bitmaps[id - 1].width = width;
379 strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); 379 strcpy (dpyinfo->bitmaps[id - 1].file, SSDATA (file));
380 380
381 return id; 381 return id;
382#endif /* HAVE_X_WINDOWS */ 382#endif /* HAVE_X_WINDOWS */
@@ -770,7 +770,7 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
770 770
771 /* Find key in KEYWORDS. Error if not found. */ 771 /* Find key in KEYWORDS. Error if not found. */
772 for (i = 0; i < nkeywords; ++i) 772 for (i = 0; i < nkeywords; ++i)
773 if (strcmp (keywords[i].name, SDATA (SYMBOL_NAME (key))) == 0) 773 if (strcmp (keywords[i].name, SSDATA (SYMBOL_NAME (key))) == 0)
774 break; 774 break;
775 775
776 if (i == nkeywords) 776 if (i == nkeywords)
@@ -1366,7 +1366,7 @@ x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
1366 1366
1367 xassert (STRINGP (color_name)); 1367 xassert (STRINGP (color_name));
1368 1368
1369 if (x_defined_color (f, SDATA (color_name), &color, 1)) 1369 if (x_defined_color (f, SSDATA (color_name), &color, 1))
1370 { 1370 {
1371 /* This isn't called frequently so we get away with simply 1371 /* This isn't called frequently so we get away with simply
1372 reallocating the color vector to the needed size, here. */ 1372 reallocating the color vector to the needed size, here. */
@@ -2857,7 +2857,7 @@ xbm_load (struct frame *f, struct image *img)
2857 return 0; 2857 return 0;
2858 } 2858 }
2859 2859
2860 contents = slurp_file (SDATA (file), &size); 2860 contents = slurp_file (SSDATA (file), &size);
2861 if (contents == NULL) 2861 if (contents == NULL)
2862 { 2862 {
2863 image_error ("Error loading XBM image `%s'", img->spec, Qnil); 2863 image_error ("Error loading XBM image `%s'", img->spec, Qnil);
@@ -2934,7 +2934,7 @@ xbm_load (struct frame *f, struct image *img)
2934 } 2934 }
2935 } 2935 }
2936 else if (STRINGP (data)) 2936 else if (STRINGP (data))
2937 bits = SDATA (data); 2937 bits = SSDATA (data);
2938 else 2938 else
2939 bits = XBOOL_VECTOR (data)->data; 2939 bits = XBOOL_VECTOR (data)->data;
2940 2940
@@ -3441,14 +3441,14 @@ xpm_load (struct frame *f, struct image *img)
3441 if (STRINGP (name)) 3441 if (STRINGP (name))
3442 { 3442 {
3443 xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1); 3443 xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1);
3444 strcpy (xpm_syms[i].name, SDATA (name)); 3444 strcpy (xpm_syms[i].name, SSDATA (name));
3445 } 3445 }
3446 else 3446 else
3447 xpm_syms[i].name = ""; 3447 xpm_syms[i].name = "";
3448 if (STRINGP (color)) 3448 if (STRINGP (color))
3449 { 3449 {
3450 xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); 3450 xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1);
3451 strcpy (xpm_syms[i].value, SDATA (color)); 3451 strcpy (xpm_syms[i].value, SSDATA (color));
3452 } 3452 }
3453 else 3453 else
3454 xpm_syms[i].value = ""; 3454 xpm_syms[i].value = "";
@@ -3491,7 +3491,7 @@ xpm_load (struct frame *f, struct image *img)
3491 &attrs); 3491 &attrs);
3492#else 3492#else
3493 rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 3493 rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
3494 SDATA (file), &img->pixmap, &img->mask, 3494 SSDATA (file), &img->pixmap, &img->mask,
3495 &attrs); 3495 &attrs);
3496#endif /* HAVE_NTGUI */ 3496#endif /* HAVE_NTGUI */
3497 } 3497 }
@@ -3514,7 +3514,7 @@ xpm_load (struct frame *f, struct image *img)
3514 &attrs); 3514 &attrs);
3515#else 3515#else
3516 rc = XpmCreatePixmapFromBuffer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 3516 rc = XpmCreatePixmapFromBuffer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
3517 SDATA (buffer), 3517 SSDATA (buffer),
3518 &img->pixmap, &img->mask, 3518 &img->pixmap, &img->mask,
3519 &attrs); 3519 &attrs);
3520#endif /* HAVE_NTGUI */ 3520#endif /* HAVE_NTGUI */
@@ -5101,7 +5101,7 @@ pbm_load (struct frame *f, struct image *img)
5101 return 0; 5101 return 0;
5102 } 5102 }
5103 5103
5104 contents = slurp_file (SDATA (file), &size); 5104 contents = slurp_file (SSDATA (file), &size);
5105 if (contents == NULL) 5105 if (contents == NULL)
5106 { 5106 {
5107 image_error ("Error reading `%s'", file, Qnil); 5107 image_error ("Error reading `%s'", file, Qnil);
@@ -5603,7 +5603,7 @@ png_load (struct frame *f, struct image *img)
5603 } 5603 }
5604 5604
5605 /* Open the image file. */ 5605 /* Open the image file. */
5606 fp = fopen (SDATA (file), "rb"); 5606 fp = fopen (SSDATA (file), "rb");
5607 if (!fp) 5607 if (!fp)
5608 { 5608 {
5609 image_error ("Cannot open image file `%s'", file, Qnil); 5609 image_error ("Cannot open image file `%s'", file, Qnil);
@@ -5740,7 +5740,7 @@ png_load (struct frame *f, struct image *img)
5740 /* The user specified `:background', use that. */ 5740 /* The user specified `:background', use that. */
5741 { 5741 {
5742 XColor color; 5742 XColor color;
5743 if (x_defined_color (f, SDATA (specified_bg), &color, 0)) 5743 if (x_defined_color (f, SSDATA (specified_bg), &color, 0))
5744 { 5744 {
5745 png_color_16 user_bg; 5745 png_color_16 user_bg;
5746 5746
@@ -6321,7 +6321,7 @@ jpeg_load (struct frame *f, struct image *img)
6321 return 0; 6321 return 0;
6322 } 6322 }
6323 6323
6324 fp = fopen (SDATA (file), "rb"); 6324 fp = fopen (SSDATA (file), "rb");
6325 if (fp == NULL) 6325 if (fp == NULL)
6326 { 6326 {
6327 image_error ("Cannot open `%s'", file, Qnil); 6327 image_error ("Cannot open `%s'", file, Qnil);
@@ -6756,7 +6756,7 @@ tiff_load (struct frame *f, struct image *img)
6756 6756
6757 /* Try to open the image file. Casting return value avoids a 6757 /* Try to open the image file. Casting return value avoids a
6758 GCC warning on W32. */ 6758 GCC warning on W32. */
6759 tiff = (TIFF *)fn_TIFFOpen (SDATA (file), "r"); 6759 tiff = (TIFF *)fn_TIFFOpen (SSDATA (file), "r");
6760 if (tiff == NULL) 6760 if (tiff == NULL)
6761 { 6761 {
6762 image_error ("Cannot open `%s'", file, Qnil); 6762 image_error ("Cannot open `%s'", file, Qnil);
diff --git a/src/indent.c b/src/indent.c
index e2cd0fc0a99..b40cb9f50b6 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2046,7 +2046,7 @@ whether or not it is currently displayed in some window. */)
2046 it_overshoot_expected = 1; 2046 it_overshoot_expected = 1;
2047 else if (it.method == GET_FROM_STRING) 2047 else if (it.method == GET_FROM_STRING)
2048 { 2048 {
2049 const char *s = SDATA (it.string); 2049 const char *s = SSDATA (it.string);
2050 const char *e = s + SBYTES (it.string); 2050 const char *e = s + SBYTES (it.string);
2051 while (s < e && *s != '\n') 2051 while (s < e && *s != '\n')
2052 ++s; 2052 ++s;
@@ -2164,4 +2164,3 @@ syms_of_indent (void)
2164 defsubr (&Svertical_motion); 2164 defsubr (&Svertical_motion);
2165 defsubr (&Scompute_motion); 2165 defsubr (&Scompute_motion);
2166} 2166}
2167
diff --git a/src/keyboard.c b/src/keyboard.c
index 3283fd4dfe4..d53321306db 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6025,7 +6025,7 @@ parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end)
6025 6025
6026#define MULTI_LETTER_MOD(BIT, NAME, LEN) \ 6026#define MULTI_LETTER_MOD(BIT, NAME, LEN) \
6027 if (i + LEN + 1 <= SBYTES (name) \ 6027 if (i + LEN + 1 <= SBYTES (name) \
6028 && ! strncmp (SDATA (name) + i, NAME, LEN)) \ 6028 && ! strncmp (SSDATA (name) + i, NAME, LEN)) \
6029 { \ 6029 { \
6030 this_mod_end = i + LEN; \ 6030 this_mod_end = i + LEN; \
6031 this_mod = BIT; \ 6031 this_mod = BIT; \
@@ -6063,13 +6063,13 @@ parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end)
6063 if (! (modifiers & (down_modifier | drag_modifier 6063 if (! (modifiers & (down_modifier | drag_modifier
6064 | double_modifier | triple_modifier)) 6064 | double_modifier | triple_modifier))
6065 && i + 7 == SBYTES (name) 6065 && i + 7 == SBYTES (name)
6066 && strncmp (SDATA (name) + i, "mouse-", 6) == 0 6066 && strncmp (SSDATA (name) + i, "mouse-", 6) == 0
6067 && ('0' <= SREF (name, i + 6) && SREF (name, i + 6) <= '9')) 6067 && ('0' <= SREF (name, i + 6) && SREF (name, i + 6) <= '9'))
6068 modifiers |= click_modifier; 6068 modifiers |= click_modifier;
6069 6069
6070 if (! (modifiers & (double_modifier | triple_modifier)) 6070 if (! (modifiers & (double_modifier | triple_modifier))
6071 && i + 6 < SBYTES (name) 6071 && i + 6 < SBYTES (name)
6072 && strncmp (SDATA (name) + i, "wheel-", 6) == 0) 6072 && strncmp (SSDATA (name) + i, "wheel-", 6) == 0)
6073 modifiers |= click_modifier; 6073 modifiers |= click_modifier;
6074 6074
6075 if (modifier_end) 6075 if (modifier_end)
@@ -6187,7 +6187,7 @@ parse_modifiers (Lisp_Object symbol)
6187 Lisp_Object unmodified; 6187 Lisp_Object unmodified;
6188 Lisp_Object mask; 6188 Lisp_Object mask;
6189 6189
6190 unmodified = Fintern (make_string (SDATA (SYMBOL_NAME (symbol)) + end, 6190 unmodified = Fintern (make_string (SSDATA (SYMBOL_NAME (symbol)) + end,
6191 SBYTES (SYMBOL_NAME (symbol)) - end), 6191 SBYTES (SYMBOL_NAME (symbol)) - end),
6192 Qnil); 6192 Qnil);
6193 6193
@@ -6255,7 +6255,7 @@ apply_modifiers (int modifiers, Lisp_Object base)
6255 { 6255 {
6256 /* We have to create the symbol ourselves. */ 6256 /* We have to create the symbol ourselves. */
6257 new_symbol = apply_modifiers_uncached (modifiers, 6257 new_symbol = apply_modifiers_uncached (modifiers,
6258 SDATA (SYMBOL_NAME (base)), 6258 SSDATA (SYMBOL_NAME (base)),
6259 SCHARS (SYMBOL_NAME (base)), 6259 SCHARS (SYMBOL_NAME (base)),
6260 SBYTES (SYMBOL_NAME (base))); 6260 SBYTES (SYMBOL_NAME (base)));
6261 6261
@@ -8084,7 +8084,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
8084 item = XCDR (item); 8084 item = XCDR (item);
8085 if (!CONSP (item)) 8085 if (!CONSP (item))
8086 { 8086 {
8087 if (menu_separator_name_p (SDATA (caption))) 8087 if (menu_separator_name_p (SSDATA (caption)))
8088 { 8088 {
8089 PROP (TOOL_BAR_ITEM_TYPE) = Qt; 8089 PROP (TOOL_BAR_ITEM_TYPE) = Qt;
8090#if !defined (USE_GTK) && !defined (HAVE_NS) 8090#if !defined (USE_GTK) && !defined (HAVE_NS)
@@ -8439,7 +8439,7 @@ read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps)
8439 menu = read_char_minibuf_menu_text; 8439 menu = read_char_minibuf_menu_text;
8440 8440
8441 /* Prompt string always starts with map's prompt, and a space. */ 8441 /* Prompt string always starts with map's prompt, and a space. */
8442 strcpy (menu, SDATA (name)); 8442 strcpy (menu, SSDATA (name));
8443 nlength = SBYTES (name); 8443 nlength = SBYTES (name);
8444 menu[nlength++] = ':'; 8444 menu[nlength++] = ':';
8445 menu[nlength++] = ' '; 8445 menu[nlength++] = ' ';
@@ -10562,7 +10562,7 @@ If FILE is nil, close any open dribble file. */)
10562 if (!NILP (file)) 10562 if (!NILP (file))
10563 { 10563 {
10564 file = Fexpand_file_name (file, Qnil); 10564 file = Fexpand_file_name (file, Qnil);
10565 dribble = fopen (SDATA (file), "w"); 10565 dribble = fopen (SSDATA (file), "w");
10566 if (dribble == 0) 10566 if (dribble == 0)
10567 report_file_error ("Opening dribble", Fcons (file, Qnil)); 10567 report_file_error ("Opening dribble", Fcons (file, Qnil));
10568 } 10568 }
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 }
diff --git a/src/minibuf.c b/src/minibuf.c
index e4d4e47a55e..921657b450a 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1762,7 +1762,7 @@ the values STRING, PREDICATE and `lambda'. */)
1762 { 1762 {
1763 /* Bypass intern-soft as that loses for nil. */ 1763 /* Bypass intern-soft as that loses for nil. */
1764 tem = oblookup (collection, 1764 tem = oblookup (collection,
1765 SDATA (string), 1765 SSDATA (string),
1766 SCHARS (string), 1766 SCHARS (string),
1767 SBYTES (string)); 1767 SBYTES (string));
1768 if (!SYMBOLP (tem)) 1768 if (!SYMBOLP (tem))
@@ -1773,7 +1773,7 @@ the values STRING, PREDICATE and `lambda'. */)
1773 string = Fstring_make_multibyte (string); 1773 string = Fstring_make_multibyte (string);
1774 1774
1775 tem = oblookup (collection, 1775 tem = oblookup (collection,
1776 SDATA (string), 1776 SSDATA (string),
1777 SCHARS (string), 1777 SCHARS (string),
1778 SBYTES (string)); 1778 SBYTES (string));
1779 } 1779 }
@@ -2185,4 +2185,3 @@ properties. */);
2185 defsubr (&Sassoc_string); 2185 defsubr (&Sassoc_string);
2186 defsubr (&Scompleting_read); 2186 defsubr (&Scompleting_read);
2187} 2187}
2188
diff --git a/src/print.c b/src/print.c
index 79ff8ba314b..8bef7a76f4d 100644
--- a/src/print.c
+++ b/src/print.c
@@ -411,7 +411,7 @@ print_string (Lisp_Object string, Lisp_Object printcharfun)
411 } 411 }
412 else 412 else
413 /* No need to copy, since output to print_buffer can't GC. */ 413 /* No need to copy, since output to print_buffer can't GC. */
414 strout (SDATA (string), 414 strout (SSDATA (string),
415 chars, SBYTES (string), 415 chars, SBYTES (string),
416 printcharfun, STRING_MULTIBYTE (string)); 416 printcharfun, STRING_MULTIBYTE (string));
417 } 417 }
@@ -584,7 +584,7 @@ usage: (with-output-to-temp-buffer BUFNAME BODY...) */)
584 GCPRO1(args); 584 GCPRO1(args);
585 name = Feval (Fcar (args)); 585 name = Feval (Fcar (args));
586 CHECK_STRING (name); 586 CHECK_STRING (name);
587 temp_output_buffer_setup (SDATA (name)); 587 temp_output_buffer_setup (SSDATA (name));
588 buf = Vstandard_output; 588 buf = Vstandard_output;
589 UNGCPRO; 589 UNGCPRO;
590 590
@@ -1097,7 +1097,7 @@ float_to_string (unsigned char *buf, double data)
1097 if (cp[1] != 0) 1097 if (cp[1] != 0)
1098 goto lose; 1098 goto lose;
1099 1099
1100 sprintf (buf, SDATA (Vfloat_output_format), data); 1100 sprintf (buf, SSDATA (Vfloat_output_format), data);
1101 } 1101 }
1102 1102
1103 /* Make sure there is a decimal point with digit after, or an 1103 /* Make sure there is a decimal point with digit after, or an
@@ -1511,7 +1511,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1511 PRINTCHAR ('f'); 1511 PRINTCHAR ('f');
1512 } 1512 }
1513 else if (multibyte 1513 else if (multibyte
1514 && (CHAR_BYTE8_P (c) 1514 && (CHAR_BYTE8_P (c)
1515 || (! ASCII_CHAR_P (c) && print_escape_multibyte))) 1515 || (! ASCII_CHAR_P (c) && print_escape_multibyte)))
1516 { 1516 {
1517 /* When multibyte is disabled, 1517 /* When multibyte is disabled,
@@ -1933,7 +1933,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1933 if (NATNUMP (Vprint_length) 1933 if (NATNUMP (Vprint_length)
1934 && XFASTINT (Vprint_length) < size) 1934 && XFASTINT (Vprint_length) < size)
1935 size = XFASTINT (Vprint_length); 1935 size = XFASTINT (Vprint_length);
1936 1936
1937 PRINTCHAR ('('); 1937 PRINTCHAR ('(');
1938 for (i = 0; i < size; i++) 1938 for (i = 0; i < size; i++)
1939 if (!NILP (HASH_HASH (h, i))) 1939 if (!NILP (HASH_HASH (h, i)))
@@ -2311,4 +2311,3 @@ priorities. */);
2311 2311
2312 defsubr (&Swith_output_to_temp_buffer); 2312 defsubr (&Swith_output_to_temp_buffer);
2313} 2313}
2314
diff --git a/src/process.c b/src/process.c
index 22446fb7004..ca29145bfd4 100644
--- a/src/process.c
+++ b/src/process.c
@@ -498,7 +498,7 @@ status_message (struct Lisp_Process *p)
498 if (! NILP (Vlocale_coding_system)) 498 if (! NILP (Vlocale_coding_system))
499 string = (code_convert_string_norecord 499 string = (code_convert_string_norecord
500 (string, Vlocale_coding_system, 0)); 500 (string, Vlocale_coding_system, 0));
501 c1 = STRING_CHAR (SSDATA (string)); 501 c1 = STRING_CHAR (SDATA (string));
502 c2 = DOWNCASE (c1); 502 c2 = DOWNCASE (c1);
503 if (c1 != c2) 503 if (c1 != c2)
504 Faset (string, make_number (0), make_number (c2)); 504 Faset (string, make_number (0), make_number (c2));
@@ -1447,7 +1447,7 @@ list_processes_1 (Lisp_Object query_only)
1447 Lisp_Object speed = Fplist_get (p->childp, QCspeed); 1447 Lisp_Object speed = Fplist_get (p->childp, QCspeed);
1448 insert_string ("(serial port "); 1448 insert_string ("(serial port ");
1449 if (STRINGP (port)) 1449 if (STRINGP (port))
1450 insert_string (SDATA (port)); 1450 insert_string (SSDATA (port));
1451 else 1451 else
1452 insert_string ("?"); 1452 insert_string ("?");
1453 if (INTEGERP (speed)) 1453 if (INTEGERP (speed))
@@ -3262,7 +3262,7 @@ usage: (make-network-process &rest ARGS) */)
3262 CHECK_STRING (service); 3262 CHECK_STRING (service);
3263 memset (&address_un, 0, sizeof address_un); 3263 memset (&address_un, 0, sizeof address_un);
3264 address_un.sun_family = AF_LOCAL; 3264 address_un.sun_family = AF_LOCAL;
3265 strncpy (address_un.sun_path, SDATA (service), sizeof address_un.sun_path); 3265 strncpy (address_un.sun_path, SSDATA (service), sizeof address_un.sun_path);
3266 ai.ai_addr = (struct sockaddr *) &address_un; 3266 ai.ai_addr = (struct sockaddr *) &address_un;
3267 ai.ai_addrlen = sizeof address_un; 3267 ai.ai_addrlen = sizeof address_un;
3268 goto open_socket; 3268 goto open_socket;
@@ -3298,7 +3298,7 @@ usage: (make-network-process &rest ARGS) */)
3298 else 3298 else
3299 { 3299 {
3300 CHECK_STRING (service); 3300 CHECK_STRING (service);
3301 portstring = SDATA (service); 3301 portstring = SSDATA (service);
3302 } 3302 }
3303 3303
3304 immediate_quit = 1; 3304 immediate_quit = 1;
@@ -3313,12 +3313,12 @@ usage: (make-network-process &rest ARGS) */)
3313 res_init (); 3313 res_init ();
3314#endif 3314#endif
3315 3315
3316 ret = getaddrinfo (SDATA (host), portstring, &hints, &res); 3316 ret = getaddrinfo (SSDATA (host), portstring, &hints, &res);
3317 if (ret) 3317 if (ret)
3318#ifdef HAVE_GAI_STRERROR 3318#ifdef HAVE_GAI_STRERROR
3319 error ("%s/%s %s", SDATA (host), portstring, gai_strerror (ret)); 3319 error ("%s/%s %s", SSDATA (host), portstring, gai_strerror (ret));
3320#else 3320#else
3321 error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret); 3321 error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret);
3322#endif 3322#endif
3323 immediate_quit = 0; 3323 immediate_quit = 0;
3324 3324
@@ -3337,7 +3337,7 @@ usage: (make-network-process &rest ARGS) */)
3337 { 3337 {
3338 struct servent *svc_info; 3338 struct servent *svc_info;
3339 CHECK_STRING (service); 3339 CHECK_STRING (service);
3340 svc_info = getservbyname (SDATA (service), 3340 svc_info = getservbyname (SSDATA (service),
3341 (socktype == SOCK_DGRAM ? "udp" : "tcp")); 3341 (socktype == SOCK_DGRAM ? "udp" : "tcp"));
3342 if (svc_info == 0) 3342 if (svc_info == 0)
3343 error ("Unknown service: %s", SDATA (service)); 3343 error ("Unknown service: %s", SDATA (service));
@@ -5807,7 +5807,7 @@ emacs_get_tty_pgrp (struct Lisp_Process *p)
5807 int fd; 5807 int fd;
5808 /* Some OS:es (Solaris 8/9) does not allow TIOCGPGRP from the 5808 /* Some OS:es (Solaris 8/9) does not allow TIOCGPGRP from the
5809 master side. Try the slave side. */ 5809 master side. Try the slave side. */
5810 fd = emacs_open (SDATA (p->tty_name), O_RDONLY, 0); 5810 fd = emacs_open (SSDATA (p->tty_name), O_RDONLY, 0);
5811 5811
5812 if (fd != -1) 5812 if (fd != -1)
5813 { 5813 {
diff --git a/src/search.c b/src/search.c
index 76c04a22d34..c0f8d8067e6 100644
--- a/src/search.c
+++ b/src/search.c
@@ -148,7 +148,7 @@ compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object tra
148 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING)); 148 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
149 149
150 if (STRINGP (Vsearch_spaces_regexp)) 150 if (STRINGP (Vsearch_spaces_regexp))
151 re_set_whitespace_regexp (SDATA (Vsearch_spaces_regexp)); 151 re_set_whitespace_regexp (SSDATA (Vsearch_spaces_regexp));
152 else 152 else
153 re_set_whitespace_regexp (NULL); 153 re_set_whitespace_regexp (NULL);
154 154
diff --git a/src/widget.c b/src/widget.c
index a8c341359b4..3053ceaea13 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -560,7 +560,7 @@ setup_frame_gcs (EmacsFrame ew)
560 if (STRINGP (font)) 560 if (STRINGP (font))
561 { 561 {
562 XFontStruct *xfont = XLoadQueryFont (FRAME_X_DISPLAY_INFO (s)->display, 562 XFontStruct *xfont = XLoadQueryFont (FRAME_X_DISPLAY_INFO (s)->display,
563 SDATA (font)); 563 SSDATA (font));
564 if (xfont) 564 if (xfont)
565 { 565 {
566 gc_values.font = xfont->fid; 566 gc_values.font = xfont->fid;
@@ -840,4 +840,3 @@ widget_store_internal_border (Widget widget)
840 840
841 ew->emacs_frame.internal_border_width = f->internal_border_width; 841 ew->emacs_frame.internal_border_width = f->internal_border_width;
842} 842}
843
diff --git a/src/xdisp.c b/src/xdisp.c
index 8ec12962e77..5f86a594968 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2778,7 +2778,7 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
2778 to 16 in 22.1 to make this a lesser problem. */ 2778 to 16 in 22.1 to make this a lesser problem. */
2779 for (i = 0; i < it->n_overlay_strings && i < OVERLAY_STRING_CHUNK_SIZE; ++i) 2779 for (i = 0; i < it->n_overlay_strings && i < OVERLAY_STRING_CHUNK_SIZE; ++i)
2780 { 2780 {
2781 const char *s = SDATA (it->overlay_strings[i]); 2781 const char *s = SSDATA (it->overlay_strings[i]);
2782 const char *e = s + SBYTES (it->overlay_strings[i]); 2782 const char *e = s + SBYTES (it->overlay_strings[i]);
2783 2783
2784 while (s < e && *s != '\n') 2784 while (s < e && *s != '\n')
@@ -20077,7 +20077,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
20077 { 20077 {
20078 if (SCHARS (SYMBOL_NAME (prop)) == 2) 20078 if (SCHARS (SYMBOL_NAME (prop)) == 2)
20079 { 20079 {
20080 char *unit = SDATA (SYMBOL_NAME (prop)); 20080 char *unit = SSDATA (SYMBOL_NAME (prop));
20081 20081
20082 if (unit[0] == 'i' && unit[1] == 'n') 20082 if (unit[0] == 'i' && unit[1] == 'n')
20083 pixels = 1.0; 20083 pixels = 1.0;
diff --git a/src/xfaces.c b/src/xfaces.c
index c7467b0fccc..f1d21c098f0 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -979,7 +979,7 @@ load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h
979 h = XINT (Fcar (Fcdr (name))); 979 h = XINT (Fcar (Fcdr (name)));
980 bits = Fcar (Fcdr (Fcdr (name))); 980 bits = Fcar (Fcdr (Fcdr (name)));
981 981
982 bitmap_id = x_create_bitmap_from_data (f, SDATA (bits), 982 bitmap_id = x_create_bitmap_from_data (f, SSDATA (bits),
983 w, h); 983 w, h);
984 } 984 }
985 else 985 else
@@ -1271,7 +1271,7 @@ If FRAME is nil or omitted, use the selected frame. */)
1271 else 1271 else
1272 CHECK_FRAME (frame); 1272 CHECK_FRAME (frame);
1273 f = XFRAME (frame); 1273 f = XFRAME (frame);
1274 return face_color_gray_p (f, SDATA (color)) ? Qt : Qnil; 1274 return face_color_gray_p (f, SSDATA (color)) ? Qt : Qnil;
1275} 1275}
1276 1276
1277 1277
@@ -1292,7 +1292,7 @@ COLOR must be a valid color name. */)
1292 else 1292 else
1293 CHECK_FRAME (frame); 1293 CHECK_FRAME (frame);
1294 f = XFRAME (frame); 1294 f = XFRAME (frame);
1295 if (face_color_supported_p (f, SDATA (color), !NILP (background_p))) 1295 if (face_color_supported_p (f, SSDATA (color), !NILP (background_p)))
1296 return Qt; 1296 return Qt;
1297 return Qnil; 1297 return Qnil;
1298} 1298}
@@ -1322,7 +1322,7 @@ load_color (struct frame *f, struct face *face, Lisp_Object name, enum lface_att
1322 1322
1323 /* if the color map is full, defined_color will return a best match 1323 /* if the color map is full, defined_color will return a best match
1324 to the values in an existing cell. */ 1324 to the values in an existing cell. */
1325 if (!defined_color (f, SDATA (name), &color, 1)) 1325 if (!defined_color (f, SSDATA (name), &color, 1))
1326 { 1326 {
1327 add_to_log ("Unable to load color \"%s\"", name, Qnil); 1327 add_to_log ("Unable to load color \"%s\"", name, Qnil);
1328 1328
@@ -1399,7 +1399,7 @@ load_face_colors (struct frame *f, struct face *face, Lisp_Object *attrs)
1399 face_color_supported_p is smart enough to know that grays are 1399 face_color_supported_p is smart enough to know that grays are
1400 "supported" as background because we are supposed to use stipple 1400 "supported" as background because we are supposed to use stipple
1401 for them. */ 1401 for them. */
1402 if (!face_color_supported_p (f, SDATA (bg), 0) 1402 if (!face_color_supported_p (f, SSDATA (bg), 0)
1403 && !NILP (Fbitmap_spec_p (Vface_default_stipple))) 1403 && !NILP (Fbitmap_spec_p (Vface_default_stipple)))
1404 { 1404 {
1405 x_destroy_bitmap (f, face->stipple); 1405 x_destroy_bitmap (f, face->stipple);
@@ -1586,7 +1586,7 @@ compare_fonts_by_sort_order (const void *v1, const void *v2)
1586 if (idx <= FONT_REGISTRY_INDEX) 1586 if (idx <= FONT_REGISTRY_INDEX)
1587 { 1587 {
1588 if (STRINGP (val1)) 1588 if (STRINGP (val1))
1589 result = STRINGP (val2) ? strcmp (SDATA (val1), SDATA (val2)) : -1; 1589 result = STRINGP (val2) ? strcmp (SSDATA (val1), SSDATA (val2)) : -1;
1590 else 1590 else
1591 result = STRINGP (val2) ? 1 : 0; 1591 result = STRINGP (val2) ? 1 : 0;
1592 } 1592 }
@@ -2031,7 +2031,7 @@ resolve_face_name (Lisp_Object face_name, int signal_p)
2031 Lisp_Object tortoise, hare; 2031 Lisp_Object tortoise, hare;
2032 2032
2033 if (STRINGP (face_name)) 2033 if (STRINGP (face_name))
2034 face_name = intern (SDATA (face_name)); 2034 face_name = intern (SSDATA (face_name));
2035 2035
2036 if (NILP (face_name) || !SYMBOLP (face_name)) 2036 if (NILP (face_name) || !SYMBOLP (face_name))
2037 return face_name; 2037 return face_name;
@@ -3502,7 +3502,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource",
3502 else if (EQ (attr, QCbold) || EQ (attr, QCitalic)) 3502 else if (EQ (attr, QCbold) || EQ (attr, QCitalic))
3503 value = face_boolean_x_resource_value (value, 1); 3503 value = face_boolean_x_resource_value (value, 1);
3504 else if (EQ (attr, QCweight) || EQ (attr, QCslant) || EQ (attr, QCwidth)) 3504 else if (EQ (attr, QCweight) || EQ (attr, QCslant) || EQ (attr, QCwidth))
3505 value = intern (SDATA (value)); 3505 value = intern (SSDATA (value));
3506 else if (EQ (attr, QCreverse_video) || EQ (attr, QCinverse_video)) 3506 else if (EQ (attr, QCreverse_video) || EQ (attr, QCinverse_video))
3507 value = face_boolean_x_resource_value (value, 1); 3507 value = face_boolean_x_resource_value (value, 1);
3508 else if (EQ (attr, QCunderline) 3508 else if (EQ (attr, QCunderline)
@@ -3547,7 +3547,7 @@ x_update_menu_appearance (struct frame *f)
3547 char line[512]; 3547 char line[512];
3548 Lisp_Object lface = lface_from_face_name (f, Qmenu, 1); 3548 Lisp_Object lface = lface_from_face_name (f, Qmenu, 1);
3549 struct face *face = FACE_FROM_ID (f, MENU_FACE_ID); 3549 struct face *face = FACE_FROM_ID (f, MENU_FACE_ID);
3550 const char *myname = SDATA (Vx_resource_name); 3550 const char *myname = SSDATA (Vx_resource_name);
3551 int changed_p = 0; 3551 int changed_p = 0;
3552#ifdef USE_MOTIF 3552#ifdef USE_MOTIF
3553 const char *popup_path = "popup_menu"; 3553 const char *popup_path = "popup_menu";
@@ -3608,7 +3608,7 @@ x_update_menu_appearance (struct frame *f)
3608 if (! NILP (xlfd)) 3608 if (! NILP (xlfd))
3609 { 3609 {
3610#if defined HAVE_X_I18N 3610#if defined HAVE_X_I18N
3611 char *fontsetname = xic_create_fontsetname (SDATA (xlfd), motif); 3611 char *fontsetname = xic_create_fontsetname (SSDATA (xlfd), motif);
3612#else 3612#else
3613 char *fontsetname = SSDATA (xlfd); 3613 char *fontsetname = SSDATA (xlfd);
3614#endif 3614#endif
@@ -4204,10 +4204,10 @@ If FRAME is unspecified or nil, the current frame is used. */)
4204 f = XFRAME (frame); 4204 f = XFRAME (frame);
4205 4205
4206 if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1)) 4206 if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1))
4207 && !(STRINGP (color1) && defined_color (f, SDATA (color1), &cdef1, 0))) 4207 && !(STRINGP (color1) && defined_color (f, SSDATA (color1), &cdef1, 0)))
4208 signal_error ("Invalid color", color1); 4208 signal_error ("Invalid color", color1);
4209 if (!(CONSP (color2) && parse_rgb_list (color2, &cdef2)) 4209 if (!(CONSP (color2) && parse_rgb_list (color2, &cdef2))
4210 && !(STRINGP (color2) && defined_color (f, SDATA (color2), &cdef2, 0))) 4210 && !(STRINGP (color2) && defined_color (f, SSDATA (color2), &cdef2, 0)))
4211 signal_error ("Invalid color", color2); 4211 signal_error ("Invalid color", color2);
4212 4212
4213 return make_number (color_distance (&cdef1, &cdef2)); 4213 return make_number (color_distance (&cdef1, &cdef2));
diff --git a/src/xfns.c b/src/xfns.c
index b962e1b6c1a..f8ac7c3f760 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -670,7 +670,7 @@ x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color)
670 670
671 /* x_defined_color is responsible for coping with failures 671 /* x_defined_color is responsible for coping with failures
672 by looking for a near-miss. */ 672 by looking for a near-miss. */
673 if (x_defined_color (f, SDATA (color_name), &cdef, 1)) 673 if (x_defined_color (f, SSDATA (color_name), &cdef, 1))
674 return cdef.pixel; 674 return cdef.pixel;
675 675
676 signal_error ("Undefined color", color_name); 676 signal_error ("Undefined color", color_name);
@@ -1603,7 +1603,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1603 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name, 1603 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
1604 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 1604 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
1605 8, PropModeReplace, 1605 8, PropModeReplace,
1606 SSDATA (encoded_name), 1606 SDATA (encoded_name),
1607 SBYTES (encoded_name)); 1607 SBYTES (encoded_name));
1608#endif /* not USE_GTK */ 1608#endif /* not USE_GTK */
1609 1609
@@ -1612,7 +1612,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1612 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name, 1612 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
1613 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 1613 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
1614 8, PropModeReplace, 1614 8, PropModeReplace,
1615 SSDATA (encoded_icon_name), 1615 SDATA (encoded_icon_name),
1616 SBYTES (encoded_icon_name)); 1616 SBYTES (encoded_icon_name));
1617 1617
1618 if (do_free_icon_value) 1618 if (do_free_icon_value)
@@ -1658,7 +1658,7 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
1658 /* Check for no change needed in this very common case 1658 /* Check for no change needed in this very common case
1659 before we do any consing. */ 1659 before we do any consing. */
1660 if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name, 1660 if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name,
1661 SDATA (f->name))) 1661 SSDATA (f->name)))
1662 return; 1662 return;
1663 name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name); 1663 name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name);
1664 } 1664 }
@@ -3549,7 +3549,7 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
3549 3549
3550 CHECK_STRING (color); 3550 CHECK_STRING (color);
3551 3551
3552 if (x_defined_color (f, SDATA (color), &foo, 0)) 3552 if (x_defined_color (f, SSDATA (color), &foo, 0))
3553 return Qt; 3553 return Qt;
3554 else 3554 else
3555 return Qnil; 3555 return Qnil;
@@ -3564,7 +3564,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
3564 3564
3565 CHECK_STRING (color); 3565 CHECK_STRING (color);
3566 3566
3567 if (x_defined_color (f, SDATA (color), &foo, 0)) 3567 if (x_defined_color (f, SSDATA (color), &foo, 0))
3568 return list3 (make_number (foo.red), 3568 return list3 (make_number (foo.red),
3569 make_number (foo.green), 3569 make_number (foo.green),
3570 make_number (foo.blue)); 3570 make_number (foo.blue));
@@ -3965,7 +3965,7 @@ select_visual (struct x_display_info *dpyinfo)
3965 int i, class = -1; 3965 int i, class = -1;
3966 XVisualInfo vinfo; 3966 XVisualInfo vinfo;
3967 3967
3968 strcpy (s, SDATA (value)); 3968 strcpy (s, SSDATA (value));
3969 dash = strchr (s, '-'); 3969 dash = strchr (s, '-');
3970 if (dash) 3970 if (dash)
3971 { 3971 {
@@ -4244,11 +4244,11 @@ FRAME. Default is to change on the edit X window. */)
4244 } 4244 }
4245 4245
4246 BLOCK_INPUT; 4246 BLOCK_INPUT;
4247 prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); 4247 prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
4248 if (! NILP (type)) 4248 if (! NILP (type))
4249 { 4249 {
4250 CHECK_STRING (type); 4250 CHECK_STRING (type);
4251 target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False); 4251 target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
4252 } 4252 }
4253 4253
4254 if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f); 4254 if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f);
@@ -4279,7 +4279,7 @@ FRAME nil or omitted means use the selected frame. Value is PROP. */)
4279 4279
4280 CHECK_STRING (prop); 4280 CHECK_STRING (prop);
4281 BLOCK_INPUT; 4281 BLOCK_INPUT;
4282 prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); 4282 prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
4283 XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), prop_atom); 4283 XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), prop_atom);
4284 4284
4285 /* Make sure the property is removed when we return. */ 4285 /* Make sure the property is removed when we return. */
@@ -4343,13 +4343,13 @@ no value of TYPE (always string in the MS Windows case). */)
4343 BLOCK_INPUT; 4343 BLOCK_INPUT;
4344 if (STRINGP (type)) 4344 if (STRINGP (type))
4345 { 4345 {
4346 if (strcmp ("AnyPropertyType", SDATA (type)) == 0) 4346 if (strcmp ("AnyPropertyType", SSDATA (type)) == 0)
4347 target_type = AnyPropertyType; 4347 target_type = AnyPropertyType;
4348 else 4348 else
4349 target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False); 4349 target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
4350 } 4350 }
4351 4351
4352 prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); 4352 prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
4353 rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window, 4353 rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
4354 prop_atom, 0, 0, False, target_type, 4354 prop_atom, 0, 0, False, target_type,
4355 &actual_type, &actual_format, &actual_size, 4355 &actual_type, &actual_format, &actual_size,
diff --git a/src/xml.c b/src/xml.c
index 43eef260a99..16907d4b44a 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -96,7 +96,7 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
96 if (! NILP (base_url)) 96 if (! NILP (base_url))
97 { 97 {
98 CHECK_STRING (base_url); 98 CHECK_STRING (base_url);
99 burl = SDATA (base_url); 99 burl = SSDATA (base_url);
100 } 100 }
101 101
102 bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart); 102 bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart);
diff --git a/src/xselect.c b/src/xselect.c
index ea0282a4ba0..96c8b9c4c47 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -2502,7 +2502,7 @@ are ignored. */)
2502 CHECK_STRING (message_type); 2502 CHECK_STRING (message_type);
2503 x_send_client_event(display, dest, from, 2503 x_send_client_event(display, dest, from,
2504 XInternAtom (dpyinfo->display, 2504 XInternAtom (dpyinfo->display,
2505 SDATA (message_type), 2505 SSDATA (message_type),
2506 False), 2506 False),
2507 format, values); 2507 format, values);
2508 2508
@@ -2538,9 +2538,9 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, At
2538 } 2538 }
2539 else if (STRINGP (dest)) 2539 else if (STRINGP (dest))
2540 { 2540 {
2541 if (strcmp (SDATA (dest), "PointerWindow") == 0) 2541 if (strcmp (SSDATA (dest), "PointerWindow") == 0)
2542 wdest = PointerWindow; 2542 wdest = PointerWindow;
2543 else if (strcmp (SDATA (dest), "InputFocus") == 0) 2543 else if (strcmp (SSDATA (dest), "InputFocus") == 0)
2544 wdest = InputFocus; 2544 wdest = InputFocus;
2545 else 2545 else
2546 error ("DEST as a string must be one of PointerWindow or InputFocus"); 2546 error ("DEST as a string must be one of PointerWindow or InputFocus");
diff --git a/src/xterm.c b/src/xterm.c
index 4f5563b79da..b6e596b854a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7949,7 +7949,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
7949 && (FRAME_XIC_STYLE (f) & (XIMPreeditPosition | XIMStatusArea))) 7949 && (FRAME_XIC_STYLE (f) & (XIMPreeditPosition | XIMStatusArea)))
7950 { 7950 {
7951 BLOCK_INPUT; 7951 BLOCK_INPUT;
7952 xic_set_xfontset (f, SDATA (fontset_ascii (fontset))); 7952 xic_set_xfontset (f, SSDATA (fontset_ascii (fontset)));
7953 UNBLOCK_INPUT; 7953 UNBLOCK_INPUT;
7954 } 7954 }
7955#endif 7955#endif
@@ -9873,7 +9873,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9873 ++x_initialized; 9873 ++x_initialized;
9874 } 9874 }
9875 9875
9876 if (! x_display_ok (SDATA (display_name))) 9876 if (! x_display_ok (SSDATA (display_name)))
9877 error ("Display %s can't be opened", SDATA (display_name)); 9877 error ("Display %s can't be opened", SDATA (display_name));
9878 9878
9879#ifdef USE_GTK 9879#ifdef USE_GTK
@@ -9965,7 +9965,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9965 argv[argc++] = xrm_option; 9965 argv[argc++] = xrm_option;
9966 } 9966 }
9967 turn_on_atimers (0); 9967 turn_on_atimers (0);
9968 dpy = XtOpenDisplay (Xt_app_con, SDATA (display_name), 9968 dpy = XtOpenDisplay (Xt_app_con, SSDATA (display_name),
9969 resource_name, EMACS_CLASS, 9969 resource_name, EMACS_CLASS,
9970 emacs_options, XtNumber (emacs_options), 9970 emacs_options, XtNumber (emacs_options),
9971 &argc, argv); 9971 &argc, argv);
@@ -10004,8 +10004,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10004 10004
10005 for (share = x_display_list, tail = x_display_name_list; share; 10005 for (share = x_display_list, tail = x_display_name_list; share;
10006 share = share->next, tail = XCDR (tail)) 10006 share = share->next, tail = XCDR (tail))
10007 if (same_x_server (SDATA (XCAR (XCAR (tail))), 10007 if (same_x_server (SSDATA (XCAR (XCAR (tail))),
10008 SDATA (display_name))) 10008 SSDATA (display_name)))
10009 break; 10009 break;
10010 if (share) 10010 if (share)
10011 terminal->kboard = share->terminal->kboard; 10011 terminal->kboard = share->terminal->kboard;
@@ -10066,7 +10066,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10066 10066
10067 /* Set the name of the terminal. */ 10067 /* Set the name of the terminal. */
10068 terminal->name = (char *) xmalloc (SBYTES (display_name) + 1); 10068 terminal->name = (char *) xmalloc (SBYTES (display_name) + 1);
10069 strncpy (terminal->name, SDATA (display_name), SBYTES (display_name)); 10069 strncpy (terminal->name, SSDATA (display_name), SBYTES (display_name));
10070 terminal->name[SBYTES (display_name)] = 0; 10070 terminal->name[SBYTES (display_name)] = 0;
10071 10071
10072#if 0 10072#if 0
@@ -10157,8 +10157,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10157 build_string ("PrivateColormap"), 10157 build_string ("PrivateColormap"),
10158 Qnil, Qnil); 10158 Qnil, Qnil);
10159 if (STRINGP (value) 10159 if (STRINGP (value)
10160 && (!strcmp (SDATA (value), "true") 10160 && (!strcmp (SSDATA (value), "true")
10161 || !strcmp (SDATA (value), "on"))) 10161 || !strcmp (SSDATA (value), "on")))
10162 dpyinfo->cmap = XCopyColormapAndFree (dpyinfo->display, dpyinfo->cmap); 10162 dpyinfo->cmap = XCopyColormapAndFree (dpyinfo->display, dpyinfo->cmap);
10163 } 10163 }
10164 } 10164 }
@@ -10355,8 +10355,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10355 build_string ("Synchronous"), 10355 build_string ("Synchronous"),
10356 Qnil, Qnil); 10356 Qnil, Qnil);
10357 if (STRINGP (value) 10357 if (STRINGP (value)
10358 && (!strcmp (SDATA (value), "true") 10358 && (!strcmp (SSDATA (value), "true")
10359 || !strcmp (SDATA (value), "on"))) 10359 || !strcmp (SSDATA (value), "on")))
10360 XSynchronize (dpyinfo->display, True); 10360 XSynchronize (dpyinfo->display, True);
10361 } 10361 }
10362 10362
@@ -10368,13 +10368,13 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10368 Qnil, Qnil); 10368 Qnil, Qnil);
10369#ifdef USE_XIM 10369#ifdef USE_XIM
10370 if (STRINGP (value) 10370 if (STRINGP (value)
10371 && (!strcmp (SDATA (value), "false") 10371 && (!strcmp (SSDATA (value), "false")
10372 || !strcmp (SDATA (value), "off"))) 10372 || !strcmp (SSDATA (value), "off")))
10373 use_xim = 0; 10373 use_xim = 0;
10374#else 10374#else
10375 if (STRINGP (value) 10375 if (STRINGP (value)
10376 && (!strcmp (SDATA (value), "true") 10376 && (!strcmp (SSDATA (value), "true")
10377 || !strcmp (SDATA (value), "on"))) 10377 || !strcmp (SSDATA (value), "on")))
10378 use_xim = 1; 10378 use_xim = 1;
10379#endif 10379#endif
10380 } 10380 }