aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-01-22 18:56:06 -0800
committerPaul Eggert2011-01-22 18:56:06 -0800
commit51b59d794fe1d4a82fcd842b478657cc93f91595 (patch)
tree25e57573403a13f3fe70934b40bf38c0190fd5ed /src
parent9e928ac989c824c376b1ab576a6da69cd86b12c6 (diff)
downloademacs-51b59d794fe1d4a82fcd842b478657cc93f91595.tar.gz
emacs-51b59d794fe1d4a82fcd842b478657cc93f91595.zip
Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/callint.c3
-rw-r--r--src/callproc.c5
-rw-r--r--src/charset.c7
-rw-r--r--src/coding.c6
-rw-r--r--src/dispnew.c3
-rw-r--r--src/doc.c5
-rw-r--r--src/editfns.c9
-rw-r--r--src/emacs.c3
-rw-r--r--src/fileio.c4
-rw-r--r--src/filelock.c5
-rw-r--r--src/font.c29
-rw-r--r--src/fontset.c16
-rw-r--r--src/frame.c3
-rw-r--r--src/ftfont.c7
-rw-r--r--src/gnutls.c8
-rw-r--r--src/gtkutil.c4
-rw-r--r--src/image.c5
-rw-r--r--src/keyboard.c5
-rw-r--r--src/lisp.h5
-rw-r--r--src/lread.c7
-rw-r--r--src/menu.c7
-rw-r--r--src/nsmenu.m14
-rw-r--r--src/process.c19
-rw-r--r--src/search.c11
-rw-r--r--src/term.c5
-rw-r--r--src/w32fns.c27
-rw-r--r--src/w32menu.c19
-rw-r--r--src/w32term.c3
-rw-r--r--src/xdisp.c13
-rw-r--r--src/xfaces.c5
-rw-r--r--src/xfns.c46
-rw-r--r--src/xfont.c7
-rw-r--r--src/xmenu.c23
-rw-r--r--src/xselect.c8
-rw-r--r--src/xsmfns.c14
-rw-r--r--src/xterm.c7
37 files changed, 177 insertions, 199 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 355376a886b..0c5c98eac2e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12011-01-23 Paul Eggert <eggert@cs.ucla.edu>
2
3 Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
4 * lisp.h (SSDATA): New macro.
5 All uses of (char *) SDATA (x) replaced with SSDATA (x),
6 and all uses of (unsigned char *) SDATA (x) replaced with SDATA (x).
7 * gtkutil.c (SSDATA): Remove, as lisp.h now defines this.
8 * xsmfns.c (SSDATA): Likewise.
9
12011-01-22 Martin Rudalics <rudalics@gmx.at> 102011-01-22 Martin Rudalics <rudalics@gmx.at>
2 11
3 * window.c (select_window): New function. 12 * window.c (select_window): New function.
diff --git a/src/callint.c b/src/callint.c
index 4ac1acd4abc..33dee693a95 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -646,7 +646,7 @@ invoke it. If KEYS is omitted or nil, the return value of
646 if (next_event >= key_count) 646 if (next_event >= key_count)
647 error ("%s must be bound to an event with parameters", 647 error ("%s must be bound to an event with parameters",
648 (SYMBOLP (function) 648 (SYMBOLP (function)
649 ? (char *) SDATA (SYMBOL_NAME (function)) 649 ? SSDATA (SYMBOL_NAME (function))
650 : "command")); 650 : "command"));
651 args[i] = AREF (keys, next_event); 651 args[i] = AREF (keys, next_event);
652 next_event++; 652 next_event++;
@@ -974,4 +974,3 @@ a way to turn themselves off when a mouse command switches windows. */);
974 defsubr (&Scall_interactively); 974 defsubr (&Scall_interactively);
975 defsubr (&Sprefix_numeric_value); 975 defsubr (&Sprefix_numeric_value);
976} 976}
977
diff --git a/src/callproc.c b/src/callproc.c
index 4c17cecdced..bc4c6a2f20d 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1278,7 +1278,7 @@ getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen,
1278 { 1278 {
1279 if (SBYTES (entry) > varlen && SREF (entry, varlen) == '=') 1279 if (SBYTES (entry) > varlen && SREF (entry, varlen) == '=')
1280 { 1280 {
1281 *value = (char *) SDATA (entry) + (varlen + 1); 1281 *value = SSDATA (entry) + (varlen + 1);
1282 *valuelen = SBYTES (entry) - (varlen + 1); 1282 *valuelen = SBYTES (entry) - (varlen + 1);
1283 return 1; 1283 return 1;
1284 } 1284 }
@@ -1310,7 +1310,7 @@ getenv_internal (const char *var, int varlen, char **value, int *valuelen,
1310 = Fframe_parameter (NILP (frame) ? selected_frame : frame, Qdisplay); 1310 = Fframe_parameter (NILP (frame) ? selected_frame : frame, Qdisplay);
1311 if (STRINGP (display)) 1311 if (STRINGP (display))
1312 { 1312 {
1313 *value = (char *) SDATA (display); 1313 *value = SSDATA (display);
1314 *valuelen = SBYTES (display); 1314 *valuelen = SBYTES (display);
1315 return 1; 1315 return 1;
1316 } 1316 }
@@ -1594,4 +1594,3 @@ See `setenv' and `getenv'. */);
1594 defsubr (&Sgetenv_internal); 1594 defsubr (&Sgetenv_internal);
1595 defsubr (&Scall_process_region); 1595 defsubr (&Scall_process_region);
1596} 1596}
1597
diff --git a/src/charset.c b/src/charset.c
index c37c33cd9fb..67315544e91 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -666,7 +666,7 @@ map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), Lisp_Object
666 c = temp_charset_work->min_char; 666 c = temp_charset_work->min_char;
667 stop = (temp_charset_work->max_char < 0x20000 667 stop = (temp_charset_work->max_char < 0x20000
668 ? temp_charset_work->max_char : 0xFFFF); 668 ? temp_charset_work->max_char : 0xFFFF);
669 669
670 while (1) 670 while (1)
671 { 671 {
672 int index = GET_TEMP_CHARSET_WORK_ENCODER (c); 672 int index = GET_TEMP_CHARSET_WORK_ENCODER (c);
@@ -1828,7 +1828,7 @@ encode_char (struct charset *charset, int c)
1828 else 1828 else
1829 { 1829 {
1830 code = GET_TEMP_CHARSET_WORK_ENCODER (c); 1830 code = GET_TEMP_CHARSET_WORK_ENCODER (c);
1831 code = INDEX_TO_CODE_POINT (charset, code); 1831 code = INDEX_TO_CODE_POINT (charset, code);
1832 } 1832 }
1833 } 1833 }
1834 else /* method == CHARSET_METHOD_OFFSET */ 1834 else /* method == CHARSET_METHOD_OFFSET */
@@ -2295,7 +2295,7 @@ init_charset (void)
2295{ 2295{
2296 Lisp_Object tempdir; 2296 Lisp_Object tempdir;
2297 tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory); 2297 tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory);
2298 if (access ((char *) SDATA (tempdir), 0) < 0) 2298 if (access (SSDATA (tempdir), 0) < 0)
2299 { 2299 {
2300 dir_warning ("Error: charsets directory (%s) does not exist.\n\ 2300 dir_warning ("Error: charsets directory (%s) does not exist.\n\
2301Emacs will not function correctly without the character map files.\n\ 2301Emacs will not function correctly without the character map files.\n\
@@ -2431,4 +2431,3 @@ the value may be a list of mnemonics. */);
2431} 2431}
2432 2432
2433#endif /* emacs */ 2433#endif /* emacs */
2434
diff --git a/src/coding.c b/src/coding.c
index 4d47b28cf33..dc86112ee87 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5380,9 +5380,9 @@ detect_coding_charset (struct coding_system *coding,
5380 attrs = CODING_ID_ATTRS (coding->id); 5380 attrs = CODING_ID_ATTRS (coding->id);
5381 valids = AREF (attrs, coding_attr_charset_valids); 5381 valids = AREF (attrs, coding_attr_charset_valids);
5382 name = CODING_ID_NAME (coding->id); 5382 name = CODING_ID_NAME (coding->id);
5383 if (strncmp ((char *) SDATA (SYMBOL_NAME (name)), 5383 if (strncmp (SSDATA (SYMBOL_NAME (name)),
5384 "iso-8859-", sizeof ("iso-8859-") - 1) == 0 5384 "iso-8859-", sizeof ("iso-8859-") - 1) == 0
5385 || strncmp ((char *) SDATA (SYMBOL_NAME (name)), 5385 || strncmp (SSDATA (SYMBOL_NAME (name)),
5386 "iso-latin-", sizeof ("iso-latin-") - 1) == 0) 5386 "iso-latin-", sizeof ("iso-latin-") - 1) == 0)
5387 check_latin_extra = 1; 5387 check_latin_extra = 1;
5388 5388
@@ -10827,7 +10827,7 @@ emacs_strerror (int error_number)
10827 Lisp_Object dec = code_convert_string_norecord (build_string (str), 10827 Lisp_Object dec = code_convert_string_norecord (build_string (str),
10828 Vlocale_coding_system, 10828 Vlocale_coding_system,
10829 0); 10829 0);
10830 str = (char *) SDATA (dec); 10830 str = SSDATA (dec);
10831 } 10831 }
10832 10832
10833 return str; 10833 return str;
diff --git a/src/dispnew.c b/src/dispnew.c
index 061058b1465..80c55864b9a 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -312,7 +312,7 @@ add_window_display_history (struct window *w, char *msg, int paused_p)
312 w, 312 w,
313 ((BUFFERP (w->buffer) 313 ((BUFFERP (w->buffer)
314 && STRINGP (XBUFFER (w->buffer)->name)) 314 && STRINGP (XBUFFER (w->buffer)->name))
315 ? (char *) SDATA (XBUFFER (w->buffer)->name) 315 ? SSDATA (XBUFFER (w->buffer)->name)
316 : "???"), 316 : "???"),
317 paused_p ? " ***paused***" : ""); 317 paused_p ? " ***paused***" : "");
318 strcat (buf, msg); 318 strcat (buf, msg);
@@ -6592,4 +6592,3 @@ If nil, never pre-empt redisplay. */);
6592 Vwindow_system_version = Qnil; 6592 Vwindow_system_version = Qnil;
6593 } 6593 }
6594} 6594}
6595
diff --git a/src/doc.c b/src/doc.c
index 900deded25c..cc054938c44 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -126,7 +126,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
126 } 126 }
127 else 127 else
128 { 128 {
129 name = (char *) SDATA (file); 129 name = SSDATA (file);
130 } 130 }
131 131
132 fd = emacs_open (name, O_RDONLY, 0); 132 fd = emacs_open (name, O_RDONLY, 0);
@@ -891,7 +891,7 @@ a new string, without any text properties, is returned. */)
891 bufp += length_byte; 891 bufp += length_byte;
892 nchars += length; 892 nchars += length;
893 /* Check STRING again in case gc relocated it. */ 893 /* Check STRING again in case gc relocated it. */
894 strp = (unsigned char *) SDATA (string) + idx; 894 strp = SDATA (string) + idx;
895 } 895 }
896 } 896 }
897 else if (! multibyte) /* just copy other chars */ 897 else if (! multibyte) /* just copy other chars */
@@ -938,4 +938,3 @@ syms_of_doc (void)
938 defsubr (&Ssnarf_documentation); 938 defsubr (&Ssnarf_documentation);
939 defsubr (&Ssubstitute_command_keys); 939 defsubr (&Ssubstitute_command_keys);
940} 940}
941
diff --git a/src/editfns.c b/src/editfns.c
index 0c4bf4f0d7e..7d70c0fee70 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1397,7 +1397,7 @@ const char *
1397get_system_name (void) 1397get_system_name (void)
1398{ 1398{
1399 if (STRINGP (Vsystem_name)) 1399 if (STRINGP (Vsystem_name))
1400 return (const char *) SDATA (Vsystem_name); 1400 return SSDATA (Vsystem_name);
1401 else 1401 else
1402 return ""; 1402 return "";
1403} 1403}
@@ -1406,7 +1406,7 @@ const char *
1406get_operating_system_release (void) 1406get_operating_system_release (void)
1407{ 1407{
1408 if (STRINGP (Voperating_system_release)) 1408 if (STRINGP (Voperating_system_release))
1409 return (char *) SDATA (Voperating_system_release); 1409 return SSDATA (Voperating_system_release);
1410 else 1410 else
1411 return ""; 1411 return "";
1412} 1412}
@@ -1814,7 +1814,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
1814 if (EQ (zone, Qt)) 1814 if (EQ (zone, Qt))
1815 tzstring = "UTC0"; 1815 tzstring = "UTC0";
1816 else if (STRINGP (zone)) 1816 else if (STRINGP (zone))
1817 tzstring = (char *) SDATA (zone); 1817 tzstring = SSDATA (zone);
1818 else if (INTEGERP (zone)) 1818 else if (INTEGERP (zone))
1819 { 1819 {
1820 int abszone = eabs (XINT (zone)); 1820 int abszone = eabs (XINT (zone));
@@ -2003,7 +2003,7 @@ If TZ is t, use Universal Time. */)
2003 else 2003 else
2004 { 2004 {
2005 CHECK_STRING (tz); 2005 CHECK_STRING (tz);
2006 tzstring = (char *) SDATA (tz); 2006 tzstring = SSDATA (tz);
2007 } 2007 }
2008 2008
2009 set_time_zone_rule (tzstring); 2009 set_time_zone_rule (tzstring);
@@ -4677,4 +4677,3 @@ functions if all the text being accessed has this property. */);
4677 defsubr (&Ssave_restriction); 4677 defsubr (&Ssave_restriction);
4678 defsubr (&Stranspose_regions); 4678 defsubr (&Stranspose_regions);
4679} 4679}
4680
diff --git a/src/emacs.c b/src/emacs.c
index 304f87ea90e..70dd76d3a3b 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2205,7 +2205,7 @@ synchronize_locale (int category, Lisp_Object *plocale, Lisp_Object desired_loca
2205 { 2205 {
2206 *plocale = desired_locale; 2206 *plocale = desired_locale;
2207 setlocale (category, (STRINGP (desired_locale) 2207 setlocale (category, (STRINGP (desired_locale)
2208 ? (char *) SDATA (desired_locale) 2208 ? SSDATA (desired_locale)
2209 : "")); 2209 : ""));
2210 } 2210 }
2211} 2211}
@@ -2490,4 +2490,3 @@ libraries; only those already known by Emacs will be loaded. */);
2490 /* Make sure IS_DAEMON starts up as false. */ 2490 /* Make sure IS_DAEMON starts up as false. */
2491 daemon_pipe[1] = 0; 2491 daemon_pipe[1] = 0;
2492} 2492}
2493
diff --git a/src/fileio.c b/src/fileio.c
index b12f92b7b8a..ca4412cbb6b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -194,7 +194,7 @@ report_file_error (const char *string, Lisp_Object data)
194 { 194 {
195 int c; 195 int c;
196 196
197 str = (char *) SDATA (errstring); 197 str = SSDATA (errstring);
198 c = STRING_CHAR (str); 198 c = STRING_CHAR (str);
199 Faset (errstring, make_number (0), make_number (DOWNCASE (c))); 199 Faset (errstring, make_number (0), make_number (DOWNCASE (c)));
200 } 200 }
@@ -2558,7 +2558,7 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
2558 return Qnil; 2558 return Qnil;
2559 return (statbuf.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil; 2559 return (statbuf.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil;
2560#else 2560#else
2561 return (check_writable (!NILP (dir) ? (char *) SDATA (dir) : "") 2561 return (check_writable (!NILP (dir) ? SSDATA (dir) : "")
2562 ? Qt : Qnil); 2562 ? Qt : Qnil);
2563#endif 2563#endif
2564} 2564}
diff --git a/src/filelock.c b/src/filelock.c
index bae6f58f024..a46d7ecfaa0 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -358,11 +358,11 @@ lock_file_1 (char *lfname, int force)
358 boot_time = get_boot_time (); 358 boot_time = get_boot_time ();
359 359
360 if (STRINGP (Fuser_login_name (Qnil))) 360 if (STRINGP (Fuser_login_name (Qnil)))
361 user_name = (char *)SDATA (Fuser_login_name (Qnil)); 361 user_name = SSDATA (Fuser_login_name (Qnil));
362 else 362 else
363 user_name = ""; 363 user_name = "";
364 if (STRINGP (Fsystem_name ())) 364 if (STRINGP (Fsystem_name ()))
365 host_name = (char *)SDATA (Fsystem_name ()); 365 host_name = SSDATA (Fsystem_name ());
366 else 366 else
367 host_name = ""; 367 host_name = "";
368 lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) 368 lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name)
@@ -738,4 +738,3 @@ syms_of_filelock (void)
738 defsubr (&Sfile_locked_p); 738 defsubr (&Sfile_locked_p);
739#endif 739#endif
740} 740}
741
diff --git a/src/font.c b/src/font.c
index fa8e18f0100..9ef609d16fa 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1190,7 +1190,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1190 if (SYMBOLP (val)) 1190 if (SYMBOLP (val))
1191 val = SYMBOL_NAME (val); 1191 val = SYMBOL_NAME (val);
1192 if (j == XLFD_REGISTRY_INDEX 1192 if (j == XLFD_REGISTRY_INDEX
1193 && ! strchr ((char *) SDATA (val), '-')) 1193 && ! strchr (SSDATA (val), '-'))
1194 { 1194 {
1195 /* Change "jisx0208*" and "jisx0208" to "jisx0208*-*". */ 1195 /* Change "jisx0208*" and "jisx0208" to "jisx0208*-*". */
1196 if (SDATA (val)[SBYTES (val) - 1] == '*') 1196 if (SDATA (val)[SBYTES (val) - 1] == '*')
@@ -1207,7 +1207,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1207 } 1207 }
1208 } 1208 }
1209 else 1209 else
1210 f[j] = (char *) SDATA (val), len += SBYTES (val) + 1; 1210 f[j] = SSDATA (val), len += SBYTES (val) + 1;
1211 } 1211 }
1212 } 1212 }
1213 1213
@@ -1220,7 +1220,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1220 else 1220 else
1221 { 1221 {
1222 val = SYMBOL_NAME (val); 1222 val = SYMBOL_NAME (val);
1223 f[j] = (char *) SDATA (val), len += SBYTES (val) + 1; 1223 f[j] = SSDATA (val), len += SBYTES (val) + 1;
1224 } 1224 }
1225 } 1225 }
1226 1226
@@ -1703,7 +1703,7 @@ font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Objec
1703 { 1703 {
1704 CHECK_STRING (family); 1704 CHECK_STRING (family);
1705 len = SBYTES (family); 1705 len = SBYTES (family);
1706 p0 = (char *) SDATA (family); 1706 p0 = SSDATA (family);
1707 p1 = strchr (p0, '-'); 1707 p1 = strchr (p0, '-');
1708 if (p1) 1708 if (p1)
1709 { 1709 {
@@ -1722,7 +1722,7 @@ font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Objec
1722 /* Convert "XXX" and "XXX*" to "XXX*-*". */ 1722 /* Convert "XXX" and "XXX*" to "XXX*-*". */
1723 CHECK_STRING (registry); 1723 CHECK_STRING (registry);
1724 len = SBYTES (registry); 1724 len = SBYTES (registry);
1725 p0 = (char *) SDATA (registry); 1725 p0 = SSDATA (registry);
1726 p1 = strchr (p0, '-'); 1726 p1 = strchr (p0, '-');
1727 if (! p1) 1727 if (! p1)
1728 { 1728 {
@@ -1855,7 +1855,7 @@ otf_open (file)
1855 otf = XSAVE_VALUE (XCDR (val))->pointer; 1855 otf = XSAVE_VALUE (XCDR (val))->pointer;
1856 else 1856 else
1857 { 1857 {
1858 otf = STRINGP (file) ? OTF_open ((char *) SDATA (file)) : NULL; 1858 otf = STRINGP (file) ? OTF_open (SSDATA (file)) : NULL;
1859 val = make_save_value (otf, 0); 1859 val = make_save_value (otf, 0);
1860 otf_list = Fcons (Fcons (file, val), otf_list); 1860 otf_list = Fcons (Fcons (file, val), otf_list);
1861 } 1861 }
@@ -3000,7 +3000,7 @@ font_spec_from_name (Lisp_Object font_name)
3000 Lisp_Object spec = Ffont_spec (0, NULL); 3000 Lisp_Object spec = Ffont_spec (0, NULL);
3001 3001
3002 CHECK_STRING (font_name); 3002 CHECK_STRING (font_name);
3003 if (font_parse_name ((char *) SDATA (font_name), spec) == -1) 3003 if (font_parse_name (SSDATA (font_name), spec) == -1)
3004 return Qnil; 3004 return Qnil;
3005 font_put_extra (spec, QCname, font_name); 3005 font_put_extra (spec, QCname, font_name);
3006 font_put_extra (spec, QCuser_spec, font_name); 3006 font_put_extra (spec, QCuser_spec, font_name);
@@ -3158,7 +3158,7 @@ font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c)
3158 else if (STRINGP (attrs[LFACE_FOUNDRY_INDEX])) 3158 else if (STRINGP (attrs[LFACE_FOUNDRY_INDEX]))
3159 { 3159 {
3160 val = attrs[LFACE_FOUNDRY_INDEX]; 3160 val = attrs[LFACE_FOUNDRY_INDEX];
3161 foundry[0] = font_intern_prop ((char *) SDATA (val), SBYTES (val), 1); 3161 foundry[0] = font_intern_prop (SSDATA (val), SBYTES (val), 1);
3162 foundry[1] = Qnil; 3162 foundry[1] = Qnil;
3163 foundry[2] = null_vector; 3163 foundry[2] = null_vector;
3164 } 3164 }
@@ -3189,7 +3189,7 @@ font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c)
3189 if (NILP (val) && STRINGP (attrs[LFACE_FAMILY_INDEX])) 3189 if (NILP (val) && STRINGP (attrs[LFACE_FAMILY_INDEX]))
3190 { 3190 {
3191 val = attrs[LFACE_FAMILY_INDEX]; 3191 val = attrs[LFACE_FAMILY_INDEX];
3192 val = font_intern_prop ((char *) SDATA (val), SBYTES (val), 1); 3192 val = font_intern_prop (SSDATA (val), SBYTES (val), 1);
3193 } 3193 }
3194 if (NILP (val)) 3194 if (NILP (val))
3195 { 3195 {
@@ -3620,7 +3620,7 @@ font_filter_properties (Lisp_Object font,
3620 if (strcmp (boolean_properties[i], keystr) == 0) 3620 if (strcmp (boolean_properties[i], keystr) == 0)
3621 { 3621 {
3622 const char *str = INTEGERP (val) ? (XINT (val) ? "true" : "false") 3622 const char *str = INTEGERP (val) ? (XINT (val) ? "true" : "false")
3623 : SYMBOLP (val) ? (const char *) SDATA (SYMBOL_NAME (val)) 3623 : SYMBOLP (val) ? SSDATA (SYMBOL_NAME (val))
3624 : "true"; 3624 : "true";
3625 3625
3626 if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0 3626 if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0
@@ -3890,7 +3890,7 @@ usage: (font-spec ARGS...) */)
3890 if (EQ (key, QCname)) 3890 if (EQ (key, QCname))
3891 { 3891 {
3892 CHECK_STRING (val); 3892 CHECK_STRING (val);
3893 font_parse_name ((char *) SDATA (val), spec); 3893 font_parse_name (SSDATA (val), spec);
3894 font_put_extra (spec, key, val); 3894 font_put_extra (spec, key, val);
3895 } 3895 }
3896 else 3896 else
@@ -4250,7 +4250,7 @@ the consecutive wildcards are folded to one. */)
4250 { 4250 {
4251 if (NILP (fold_wildcards)) 4251 if (NILP (fold_wildcards))
4252 return font_name; 4252 return font_name;
4253 strcpy (name, (char *) SDATA (font_name)); 4253 strcpy (name, SSDATA (font_name));
4254 goto done; 4254 goto done;
4255 } 4255 }
4256 pixel_size = XFONT_OBJECT (font)->pixel_size; 4256 pixel_size = XFONT_OBJECT (font)->pixel_size;
@@ -4913,7 +4913,7 @@ If the named font is not yet loaded, return nil. */)
4913 4913
4914 if (fontset >= 0) 4914 if (fontset >= 0)
4915 name = fontset_ascii (fontset); 4915 name = fontset_ascii (fontset);
4916 font_object = font_open_by_name (f, (char *) SDATA (name)); 4916 font_object = font_open_by_name (f, SSDATA (name));
4917 } 4917 }
4918 else if (FONT_OBJECT_P (name)) 4918 else if (FONT_OBJECT_P (name))
4919 font_object = name; 4919 font_object = name;
@@ -4991,7 +4991,7 @@ font_add_log (const char *action, Lisp_Object arg, Lisp_Object result)
4991 return; 4991 return;
4992 if (STRINGP (AREF (Vfont_log_deferred, 0))) 4992 if (STRINGP (AREF (Vfont_log_deferred, 0)))
4993 { 4993 {
4994 char *str = (char *) SDATA (AREF (Vfont_log_deferred, 0)); 4994 char *str = SSDATA (AREF (Vfont_log_deferred, 0));
4995 4995
4996 ASET (Vfont_log_deferred, 0, Qnil); 4996 ASET (Vfont_log_deferred, 0, Qnil);
4997 font_add_log (str, AREF (Vfont_log_deferred, 1), 4997 font_add_log (str, AREF (Vfont_log_deferred, 1),
@@ -5269,4 +5269,3 @@ init_font (void)
5269{ 5269{
5270 Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; 5270 Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt;
5271} 5271}
5272
diff --git a/src/fontset.c b/src/fontset.c
index be8ff1bd0eb..41a8a567a9a 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1049,7 +1049,7 @@ make_fontset_for_ascii_face (FRAME_PTR f, int base_fontset_id, struct face *face
1049 the corresponding regular expression. */ 1049 the corresponding regular expression. */
1050static Lisp_Object Vcached_fontset_data; 1050static Lisp_Object Vcached_fontset_data;
1051 1051
1052#define CACHED_FONTSET_NAME ((char *) SDATA (XCAR (Vcached_fontset_data))) 1052#define CACHED_FONTSET_NAME SSDATA (XCAR (Vcached_fontset_data))
1053#define CACHED_FONTSET_REGEX (XCDR (Vcached_fontset_data)) 1053#define CACHED_FONTSET_REGEX (XCDR (Vcached_fontset_data))
1054 1054
1055/* If fontset name PATTERN contains any wild card, return regular 1055/* If fontset name PATTERN contains any wild card, return regular
@@ -1058,13 +1058,13 @@ static Lisp_Object Vcached_fontset_data;
1058static Lisp_Object 1058static Lisp_Object
1059fontset_pattern_regexp (Lisp_Object pattern) 1059fontset_pattern_regexp (Lisp_Object pattern)
1060{ 1060{
1061 if (!strchr ((char *) SDATA (pattern), '*') 1061 if (!strchr (SSDATA (pattern), '*')
1062 && !strchr ((char *) SDATA (pattern), '?')) 1062 && !strchr (SSDATA (pattern), '?'))
1063 /* PATTERN does not contain any wild cards. */ 1063 /* PATTERN does not contain any wild cards. */
1064 return Qnil; 1064 return Qnil;
1065 1065
1066 if (!CONSP (Vcached_fontset_data) 1066 if (!CONSP (Vcached_fontset_data)
1067 || strcmp ((char *) SDATA (pattern), CACHED_FONTSET_NAME)) 1067 || strcmp (SSDATA (pattern), CACHED_FONTSET_NAME))
1068 { 1068 {
1069 /* We must at first update the cached data. */ 1069 /* We must at first update the cached data. */
1070 unsigned char *regex, *p0, *p1; 1070 unsigned char *regex, *p0, *p1;
@@ -1115,7 +1115,7 @@ fontset_pattern_regexp (Lisp_Object pattern)
1115 *p1++ = '$'; 1115 *p1++ = '$';
1116 *p1++ = 0; 1116 *p1++ = 0;
1117 1117
1118 Vcached_fontset_data = Fcons (build_string ((char *) SDATA (pattern)), 1118 Vcached_fontset_data = Fcons (build_string (SSDATA (pattern)),
1119 build_string ((char *) regex)); 1119 build_string ((char *) regex));
1120 } 1120 }
1121 1121
@@ -1225,7 +1225,7 @@ list_fontsets (FRAME_PTR f, Lisp_Object pattern, int size)
1225 1225
1226 if (STRINGP (regexp) 1226 if (STRINGP (regexp)
1227 ? (fast_string_match (regexp, name) < 0) 1227 ? (fast_string_match (regexp, name) < 0)
1228 : strcmp ((char *) SDATA (pattern), (char *) SDATA (name))) 1228 : strcmp (SSDATA (pattern), SSDATA (name)))
1229 continue; 1229 continue;
1230 1230
1231 val = Fcons (Fcopy_sequence (FONTSET_NAME (fontset)), val); 1231 val = Fcons (Fcopy_sequence (FONTSET_NAME (fontset)), val);
@@ -1651,10 +1651,10 @@ FONT-SPEC is a vector, a cons, or a string. See the documentation of
1651 char xlfd[256]; 1651 char xlfd[256];
1652 int len; 1652 int len;
1653 1653
1654 if (font_parse_xlfd ((char *) SDATA (name), font_spec) < 0) 1654 if (font_parse_xlfd (SSDATA (name), font_spec) < 0)
1655 error ("Fontset name must be in XLFD format"); 1655 error ("Fontset name must be in XLFD format");
1656 short_name = AREF (font_spec, FONT_REGISTRY_INDEX); 1656 short_name = AREF (font_spec, FONT_REGISTRY_INDEX);
1657 if (strncmp ((char *) SDATA (SYMBOL_NAME (short_name)), "fontset-", 8) 1657 if (strncmp (SSDATA (SYMBOL_NAME (short_name)), "fontset-", 8)
1658 || SBYTES (SYMBOL_NAME (short_name)) < 9) 1658 || SBYTES (SYMBOL_NAME (short_name)) < 9)
1659 error ("Registry field of fontset name must be \"fontset-*\""); 1659 error ("Registry field of fontset name must be \"fontset-*\"");
1660 Vfontset_alias_alist = Fcons (Fcons (name, SYMBOL_NAME (short_name)), 1660 Vfontset_alias_alist = Fcons (Fcons (name, SYMBOL_NAME (short_name)),
diff --git a/src/frame.c b/src/frame.c
index 89f58ba6a68..5cbdcf15abf 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4037,7 +4037,7 @@ On Nextstep, this just calls `ns-parse-geometry'. */)
4037 4037
4038 CHECK_STRING (string); 4038 CHECK_STRING (string);
4039 4039
4040 geometry = XParseGeometry ((char *) SDATA (string), 4040 geometry = XParseGeometry (SSDATA (string),
4041 &x, &y, &width, &height); 4041 &x, &y, &width, &height);
4042 result = Qnil; 4042 result = Qnil;
4043 if (geometry & XValue) 4043 if (geometry & XValue)
@@ -4637,4 +4637,3 @@ automatically. See also `mouse-autoselect-window'. */);
4637#endif 4637#endif
4638 4638
4639} 4639}
4640
diff --git a/src/ftfont.c b/src/ftfont.c
index 372160dc0f6..e3edb45b14a 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -392,7 +392,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
392 if (cache_for == FTFONT_CACHE_FOR_FACE 392 if (cache_for == FTFONT_CACHE_FOR_FACE
393 ? ! cache_data->ft_face : ! cache_data->fc_charset) 393 ? ! cache_data->ft_face : ! cache_data->fc_charset)
394 { 394 {
395 char *filename = (char *) SDATA (XCAR (key)); 395 char *filename = SSDATA (XCAR (key));
396 int index = XINT (XCDR (key)); 396 int index = XINT (XCDR (key));
397 397
398 if (cache_for == FTFONT_CACHE_FOR_FACE) 398 if (cache_for == FTFONT_CACHE_FOR_FACE)
@@ -555,7 +555,7 @@ ftfont_get_cache (FRAME_PTR f)
555static int 555static int
556ftfont_get_charset (Lisp_Object registry) 556ftfont_get_charset (Lisp_Object registry)
557{ 557{
558 char *str = (char *) SDATA (SYMBOL_NAME (registry)); 558 char *str = SSDATA (SYMBOL_NAME (registry));
559 char *re = alloca (SBYTES (SYMBOL_NAME (registry)) * 2 + 1); 559 char *re = alloca (SBYTES (SYMBOL_NAME (registry)) * 2 + 1);
560 Lisp_Object regexp; 560 Lisp_Object regexp;
561 int i, j; 561 int i, j;
@@ -2453,7 +2453,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
2453 flt_font_ft.flt_font.family = Mnil; 2453 flt_font_ft.flt_font.family = Mnil;
2454 else 2454 else
2455 flt_font_ft.flt_font.family 2455 flt_font_ft.flt_font.family
2456 = msymbol ((char *) SDATA (Fdowncase (SYMBOL_NAME (family)))); 2456 = msymbol (SSDATA (Fdowncase (SYMBOL_NAME (family))));
2457 } 2457 }
2458 flt_font_ft.flt_font.x_ppem = ft_face->size->metrics.x_ppem; 2458 flt_font_ft.flt_font.x_ppem = ft_face->size->metrics.x_ppem;
2459 flt_font_ft.flt_font.y_ppem = ft_face->size->metrics.y_ppem; 2459 flt_font_ft.flt_font.y_ppem = ft_face->size->metrics.y_ppem;
@@ -2675,4 +2675,3 @@ syms_of_ftfont (void)
2675 ftfont_driver.type = Qfreetype; 2675 ftfont_driver.type = Qfreetype;
2676 register_font_driver (&ftfont_driver, NULL); 2676 register_font_driver (&ftfont_driver, NULL);
2677} 2677}
2678
diff --git a/src/gnutls.c b/src/gnutls.c
index 1872d6cc340..07db43db2f1 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -448,7 +448,7 @@ one trustfile (usually a CA bundle). */)
448 (x509_cred, 448 (x509_cred,
449 SDATA (trustfile), 449 SDATA (trustfile),
450 file_format); 450 file_format);
451 451
452 if (ret < GNUTLS_E_SUCCESS) 452 if (ret < GNUTLS_E_SUCCESS)
453 return gnutls_make_error (ret); 453 return gnutls_make_error (ret);
454 } 454 }
@@ -470,7 +470,7 @@ one trustfile (usually a CA bundle). */)
470 (x509_cred, 470 (x509_cred,
471 SDATA (keyfile), 471 SDATA (keyfile),
472 file_format); 472 file_format);
473 473
474 if (ret < GNUTLS_E_SUCCESS) 474 if (ret < GNUTLS_E_SUCCESS)
475 return gnutls_make_error (ret); 475 return gnutls_make_error (ret);
476 } 476 }
@@ -497,7 +497,7 @@ one trustfile (usually a CA bundle). */)
497 497
498 if (STRINGP (priority_string)) 498 if (STRINGP (priority_string))
499 { 499 {
500 priority_string_ptr = (char*) SDATA (priority_string); 500 priority_string_ptr = SSDATA (priority_string);
501 GNUTLS_LOG2 (1, max_log_level, "got non-default priority string:", 501 GNUTLS_LOG2 (1, max_log_level, "got non-default priority string:",
502 priority_string_ptr); 502 priority_string_ptr);
503 } 503 }
@@ -506,7 +506,7 @@ one trustfile (usually a CA bundle). */)
506 GNUTLS_LOG2 (1, max_log_level, "using default priority string:", 506 GNUTLS_LOG2 (1, max_log_level, "using default priority string:",
507 priority_string_ptr); 507 priority_string_ptr);
508 } 508 }
509 509
510 GNUTLS_LOG (1, max_log_level, "setting the priority string"); 510 GNUTLS_LOG (1, max_log_level, "setting the priority string");
511 511
512 ret = gnutls_priority_set_direct (state, 512 ret = gnutls_priority_set_direct (state,
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 9d55f52c9f9..8147954957f 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -46,9 +46,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
46#define FRAME_TOTAL_PIXEL_WIDTH(f) \ 46#define FRAME_TOTAL_PIXEL_WIDTH(f) \
47 (FRAME_PIXEL_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f)) 47 (FRAME_PIXEL_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f))
48 48
49/* Avoid "differ in sign" warnings */
50#define SSDATA(x) ((char *) SDATA (x))
51
52#ifndef HAVE_GTK_WIDGET_SET_HAS_WINDOW 49#ifndef HAVE_GTK_WIDGET_SET_HAS_WINDOW
53#define gtk_widget_set_has_window(w, b) \ 50#define gtk_widget_set_has_window(w, b) \
54 (gtk_fixed_set_has_window (GTK_FIXED (w), b)) 51 (gtk_fixed_set_has_window (GTK_FIXED (w), b))
@@ -4565,4 +4562,3 @@ xg_initialize (void)
4565} 4562}
4566 4563
4567#endif /* USE_GTK */ 4564#endif /* USE_GTK */
4568
diff --git a/src/image.c b/src/image.c
index 8f438e26015..542968d2a76 100644
--- a/src/image.c
+++ b/src/image.c
@@ -350,7 +350,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
350 { 350 {
351 if (dpyinfo->bitmaps[id].refcount 351 if (dpyinfo->bitmaps[id].refcount
352 && dpyinfo->bitmaps[id].file 352 && dpyinfo->bitmaps[id].file
353 && !strcmp (dpyinfo->bitmaps[id].file, (char *) SDATA (file))) 353 && !strcmp (dpyinfo->bitmaps[id].file, SSDATA (file)))
354 { 354 {
355 ++dpyinfo->bitmaps[id].refcount; 355 ++dpyinfo->bitmaps[id].refcount;
356 return id + 1; 356 return id + 1;
@@ -363,7 +363,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
363 return -1; 363 return -1;
364 emacs_close (fd); 364 emacs_close (fd);
365 365
366 filename = (char *) SDATA (found); 366 filename = SSDATA (found);
367 367
368 result = XReadBitmapFile (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 368 result = XReadBitmapFile (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
369 filename, &width, &height, &bitmap, &xhot, &yhot); 369 filename, &width, &height, &bitmap, &xhot, &yhot);
@@ -8883,4 +8883,3 @@ void
8883init_image (void) 8883init_image (void)
8884{ 8884{
8885} 8885}
8886
diff --git a/src/keyboard.c b/src/keyboard.c
index 1d09c084f81..5da1310d541 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8177,8 +8177,8 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
8177 /* Try to make one from caption and key. */ 8177 /* Try to make one from caption and key. */
8178 Lisp_Object key = PROP (TOOL_BAR_ITEM_KEY); 8178 Lisp_Object key = PROP (TOOL_BAR_ITEM_KEY);
8179 Lisp_Object capt = PROP (TOOL_BAR_ITEM_CAPTION); 8179 Lisp_Object capt = PROP (TOOL_BAR_ITEM_CAPTION);
8180 const char *label = SYMBOLP (key) ? (char *) SDATA (SYMBOL_NAME (key)) : ""; 8180 const char *label = SYMBOLP (key) ? SSDATA (SYMBOL_NAME (key)) : "";
8181 const char *caption = STRINGP (capt) ? (char *) SDATA (capt) : ""; 8181 const char *caption = STRINGP (capt) ? SSDATA (capt) : "";
8182 EMACS_INT max_lbl = 2 * tool_bar_max_label_size; 8182 EMACS_INT max_lbl = 2 * tool_bar_max_label_size;
8183 char *buf = (char *) xmalloc (max_lbl + 1); 8183 char *buf = (char *) xmalloc (max_lbl + 1);
8184 Lisp_Object new_lbl; 8184 Lisp_Object new_lbl;
@@ -12298,4 +12298,3 @@ mark_kboards (void)
12298 } 12298 }
12299 } 12299 }
12300} 12300}
12301
diff --git a/src/lisp.h b/src/lisp.h
index 726b7671f4a..64c0b2332e3 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -635,6 +635,9 @@ extern Lisp_Object make_number (EMACS_INT);
635#define SCHARS(string) (XSTRING (string)->size + 0) 635#define SCHARS(string) (XSTRING (string)->size + 0)
636#define SBYTES(string) (STRING_BYTES (XSTRING (string)) + 0) 636#define SBYTES(string) (STRING_BYTES (XSTRING (string)) + 0)
637 637
638/* Avoid "differ in sign" warnings. */
639#define SSDATA(x) ((char *) SDATA (x))
640
638#define STRING_SET_CHARS(string, newsize) \ 641#define STRING_SET_CHARS(string, newsize) \
639 (XSTRING (string)->size = (newsize)) 642 (XSTRING (string)->size = (newsize))
640 643
@@ -1844,7 +1847,7 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
1844 1847
1845/* Macros we use to define forwarded Lisp variables. 1848/* Macros we use to define forwarded Lisp variables.
1846 These are used in the syms_of_FILENAME functions. 1849 These are used in the syms_of_FILENAME functions.
1847 1850
1848 An ordinary (not in buffer_defaults, per-buffer, or per-keyboard) 1851 An ordinary (not in buffer_defaults, per-buffer, or per-keyboard)
1849 lisp variable is actually a field in `struct emacs_globals'. The 1852 lisp variable is actually a field in `struct emacs_globals'. The
1850 field's name begins with "f_", which is a convention enforced by 1853 field's name begins with "f_", which is a convention enforced by
diff --git a/src/lread.c b/src/lread.c
index 60a2778dbbc..0baab54a00c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1082,9 +1082,9 @@ Return t if the file exists and loads successfully. */)
1082#ifdef DOS_NT 1082#ifdef DOS_NT
1083 fmode = "rb"; 1083 fmode = "rb";
1084#endif /* DOS_NT */ 1084#endif /* DOS_NT */
1085 stat ((char *)SDATA (efound), &s1); 1085 stat (SSDATA (efound), &s1);
1086 SSET (efound, SBYTES (efound) - 1, 0); 1086 SSET (efound, SBYTES (efound) - 1, 0);
1087 result = stat ((char *)SDATA (efound), &s2); 1087 result = stat (SSDATA (efound), &s2);
1088 SSET (efound, SBYTES (efound) - 1, 'c'); 1088 SSET (efound, SBYTES (efound) - 1, 'c');
1089 1089
1090 if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime) 1090 if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime)
@@ -1125,7 +1125,7 @@ Return t if the file exists and loads successfully. */)
1125#ifdef WINDOWSNT 1125#ifdef WINDOWSNT
1126 emacs_close (fd); 1126 emacs_close (fd);
1127 efound = ENCODE_FILE (found); 1127 efound = ENCODE_FILE (found);
1128 stream = fopen ((char *) SDATA (efound), fmode); 1128 stream = fopen (SSDATA (efound), fmode);
1129#else /* not WINDOWSNT */ 1129#else /* not WINDOWSNT */
1130 stream = fdopen (fd, fmode); 1130 stream = fdopen (fd, fmode);
1131#endif /* not WINDOWSNT */ 1131#endif /* not WINDOWSNT */
@@ -4404,4 +4404,3 @@ to load. See also `load-dangerous-libraries'. */);
4404 Qrehash_threshold = intern_c_string ("rehash-threshold"); 4404 Qrehash_threshold = intern_c_string ("rehash-threshold");
4405 staticpro (&Qrehash_threshold); 4405 staticpro (&Qrehash_threshold);
4406} 4406}
4407
diff --git a/src/menu.c b/src/menu.c
index 24df935eef6..53cd721a1e8 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -695,7 +695,7 @@ digest_single_submenu (int start, int end, int top_level_items)
695#endif 695#endif
696 696
697 pane_string = (NILP (pane_name) 697 pane_string = (NILP (pane_name)
698 ? "" : (char *) SDATA (pane_name)); 698 ? "" : SSDATA (pane_name));
699 /* If there is just one top-level pane, put all its items directly 699 /* If there is just one top-level pane, put all its items directly
700 under the top-level menu. */ 700 under the top-level menu. */
701 if (menu_items_n_panes == 1) 701 if (menu_items_n_panes == 1)
@@ -847,7 +847,7 @@ update_submenu_strings (widget_value *first_wv)
847 { 847 {
848 if (STRINGP (wv->lname)) 848 if (STRINGP (wv->lname))
849 { 849 {
850 wv->name = (char *) SDATA (wv->lname); 850 wv->name = SSDATA (wv->lname);
851 851
852 /* Ignore the @ that means "separate pane". 852 /* Ignore the @ that means "separate pane".
853 This is a kludge, but this isn't worth more time. */ 853 This is a kludge, but this isn't worth more time. */
@@ -860,7 +860,7 @@ update_submenu_strings (widget_value *first_wv)
860 } 860 }
861 861
862 if (STRINGP (wv->lkey)) 862 if (STRINGP (wv->lkey))
863 wv->key = (char *) SDATA (wv->lkey); 863 wv->key = SSDATA (wv->lkey);
864 864
865 if (wv->contents) 865 if (wv->contents)
866 update_submenu_strings (wv->contents); 866 update_submenu_strings (wv->contents);
@@ -1353,4 +1353,3 @@ syms_of_menu (void)
1353 1353
1354 defsubr (&Sx_popup_menu); 1354 defsubr (&Sx_popup_menu);
1355} 1355}
1356
diff --git a/src/nsmenu.m b/src/nsmenu.m
index fb402845cf1..44621f0c2fd 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -355,7 +355,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
355/* if (submenu && strcmp (submenuTitle, SDATA (string))) 355/* if (submenu && strcmp (submenuTitle, SDATA (string)))
356 continue; */ 356 continue; */
357 357
358 wv->name = (char *) SDATA (string); 358 wv->name = SSDATA (string);
359 update_submenu_strings (wv->contents); 359 update_submenu_strings (wv->contents);
360 wv = wv->next; 360 wv = wv->next;
361 } 361 }
@@ -444,7 +444,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
444 strncpy (previous_strings[i/4], SDATA (string), 10); 444 strncpy (previous_strings[i/4], SDATA (string), 10);
445 445
446 wv = xmalloc_widget_value (); 446 wv = xmalloc_widget_value ();
447 wv->name = (char *) SDATA (string); 447 wv->name = SSDATA (string);
448 wv->value = 0; 448 wv->value = 0;
449 wv->enabled = 1; 449 wv->enabled = 1;
450 wv->button_type = BUTTON_TYPE_NONE; 450 wv->button_type = BUTTON_TYPE_NONE;
@@ -833,7 +833,7 @@ ns_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
833 } 833 }
834#endif 834#endif
835 pane_string = (NILP (pane_name) 835 pane_string = (NILP (pane_name)
836 ? "" : (char *) SDATA (pane_name)); 836 ? "" : SSDATA (pane_name));
837 /* If there is just one top-level pane, put all its items directly 837 /* If there is just one top-level pane, put all its items directly
838 under the top-level menu. */ 838 under the top-level menu. */
839 if (menu_items_n_panes == 1) 839 if (menu_items_n_panes == 1)
@@ -898,9 +898,9 @@ ns_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
898 prev_wv->next = wv; 898 prev_wv->next = wv;
899 else 899 else
900 save_wv->contents = wv; 900 save_wv->contents = wv;
901 wv->name = (char *) SDATA (item_name); 901 wv->name = SSDATA (item_name);
902 if (!NILP (descrip)) 902 if (!NILP (descrip))
903 wv->key = (char *) SDATA (descrip); 903 wv->key = SSDATA (descrip);
904 wv->value = 0; 904 wv->value = 0;
905 /* If this item has a null value, 905 /* If this item has a null value,
906 make the call_data null so that it won't display a box 906 make the call_data null so that it won't display a box
@@ -949,7 +949,7 @@ ns_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
949 title = ENCODE_MENU_STRING (title); 949 title = ENCODE_MENU_STRING (title);
950#endif 950#endif
951 951
952 wv_title->name = (char *) SDATA (title); 952 wv_title->name = SSDATA (title);
953 wv_title->enabled = NO; 953 wv_title->enabled = NO;
954 wv_title->button_type = BUTTON_TYPE_NONE; 954 wv_title->button_type = BUTTON_TYPE_NONE;
955 wv_title->help = Qnil; 955 wv_title->help = Qnil;
@@ -1036,7 +1036,7 @@ update_frame_tool_bar (FRAME_PTR f)
1036 helpObj = TOOLPROP (TOOL_BAR_ITEM_HELP); 1036 helpObj = TOOLPROP (TOOL_BAR_ITEM_HELP);
1037 if (NILP (helpObj)) 1037 if (NILP (helpObj))
1038 helpObj = TOOLPROP (TOOL_BAR_ITEM_CAPTION); 1038 helpObj = TOOLPROP (TOOL_BAR_ITEM_CAPTION);
1039 helpText = NILP (helpObj) ? "" : (char *)SDATA (helpObj); 1039 helpText = NILP (helpObj) ? "" : SSDATA (helpObj);
1040 1040
1041 /* Ignore invalid image specifications. */ 1041 /* Ignore invalid image specifications. */
1042 if (!valid_image_p (image)) 1042 if (!valid_image_p (image))
diff --git a/src/process.c b/src/process.c
index 80d149347a5..5f28cc6b48f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -411,7 +411,7 @@ delete_write_fd (int fd)
411 max_input_desc = fd; 411 max_input_desc = fd;
412 break; 412 break;
413 } 413 }
414 414
415 } 415 }
416} 416}
417 417
@@ -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 ((char *) SDATA (string)); 501 c1 = STRING_CHAR (SSDATA (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));
@@ -1420,7 +1420,7 @@ list_processes_1 (Lisp_Object query_only)
1420 port = Fformat_network_address (Fplist_get (p->childp, QClocal), Qnil); 1420 port = Fformat_network_address (Fplist_get (p->childp, QClocal), Qnil);
1421 sprintf (tembuf, "(network %s server on %s)\n", 1421 sprintf (tembuf, "(network %s server on %s)\n",
1422 (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"), 1422 (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"),
1423 (STRINGP (port) ? (char *)SDATA (port) : "?")); 1423 (STRINGP (port) ? SSDATA (port) : "?"));
1424 insert_string (tembuf); 1424 insert_string (tembuf);
1425 } 1425 }
1426 else if (NETCONN1_P (p)) 1426 else if (NETCONN1_P (p))
@@ -1438,7 +1438,7 @@ list_processes_1 (Lisp_Object query_only)
1438 host = Fformat_network_address (Fplist_get (p->childp, QCremote), Qnil); 1438 host = Fformat_network_address (Fplist_get (p->childp, QCremote), Qnil);
1439 sprintf (tembuf, "(network %s connection to %s)\n", 1439 sprintf (tembuf, "(network %s connection to %s)\n",
1440 (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"), 1440 (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"),
1441 (STRINGP (host) ? (char *)SDATA (host) : "?")); 1441 (STRINGP (host) ? SSDATA (host) : "?"));
1442 insert_string (tembuf); 1442 insert_string (tembuf);
1443 } 1443 }
1444 else if (SERIALCONN1_P (p)) 1444 else if (SERIALCONN1_P (p))
@@ -2517,7 +2517,7 @@ set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
2517 2517
2518 CHECK_SYMBOL (opt); 2518 CHECK_SYMBOL (opt);
2519 2519
2520 name = (char *) SDATA (SYMBOL_NAME (opt)); 2520 name = SSDATA (SYMBOL_NAME (opt));
2521 for (sopt = socket_options; sopt->name; sopt++) 2521 for (sopt = socket_options; sopt->name; sopt++)
2522 if (strcmp (name, sopt->name) == 0) 2522 if (strcmp (name, sopt->name) == 0)
2523 break; 2523 break;
@@ -2556,7 +2556,7 @@ set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
2556 memset (devname, 0, sizeof devname); 2556 memset (devname, 0, sizeof devname);
2557 if (STRINGP (val)) 2557 if (STRINGP (val))
2558 { 2558 {
2559 char *arg = (char *) SDATA (val); 2559 char *arg = SSDATA (val);
2560 int len = min (strlen (arg), IFNAMSIZ); 2560 int len = min (strlen (arg), IFNAMSIZ);
2561 memcpy (devname, arg, len); 2561 memcpy (devname, arg, len);
2562 } 2562 }
@@ -2841,7 +2841,7 @@ usage: (make-serial-process &rest ARGS) */)
2841 record_unwind_protect (make_serial_process_unwind, proc); 2841 record_unwind_protect (make_serial_process_unwind, proc);
2842 p = XPROCESS (proc); 2842 p = XPROCESS (proc);
2843 2843
2844 fd = serial_open ((char*) SDATA (port)); 2844 fd = serial_open (SSDATA (port));
2845 p->infd = fd; 2845 p->infd = fd;
2846 p->outfd = fd; 2846 p->outfd = fd;
2847 if (fd > max_process_desc) 2847 if (fd > max_process_desc)
@@ -3377,7 +3377,7 @@ usage: (make-network-process &rest ARGS) */)
3377 /* Attempt to interpret host as numeric inet address */ 3377 /* Attempt to interpret host as numeric inet address */
3378 { 3378 {
3379 unsigned long numeric_addr; 3379 unsigned long numeric_addr;
3380 numeric_addr = inet_addr ((char *) SDATA (host)); 3380 numeric_addr = inet_addr (SSDATA (host));
3381 if (numeric_addr == -1) 3381 if (numeric_addr == -1)
3382 error ("Unknown host \"%s\"", SDATA (host)); 3382 error ("Unknown host \"%s\"", SDATA (host));
3383 3383
@@ -5645,7 +5645,7 @@ send_process (volatile Lisp_Object proc, const unsigned char *volatile buf,
5645#ifdef HAVE_GNUTLS 5645#ifdef HAVE_GNUTLS
5646 if (XPROCESS (proc)->gnutls_p) 5646 if (XPROCESS (proc)->gnutls_p)
5647 rv = emacs_gnutls_write (outfd, 5647 rv = emacs_gnutls_write (outfd,
5648 XPROCESS (proc), 5648 XPROCESS (proc),
5649 (char *) buf, this); 5649 (char *) buf, this);
5650 else 5650 else
5651#endif 5651#endif
@@ -7727,4 +7727,3 @@ The variable takes effect when `start-process' is called. */);
7727 defsubr (&Slist_system_processes); 7727 defsubr (&Slist_system_processes);
7728 defsubr (&Sprocess_attributes); 7728 defsubr (&Sprocess_attributes);
7729} 7729}
7730
diff --git a/src/search.c b/src/search.c
index c7e6f15a876..570bbe72588 100644
--- a/src/search.c
+++ b/src/search.c
@@ -153,7 +153,7 @@ compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object tra
153 else 153 else
154 re_set_whitespace_regexp (NULL); 154 re_set_whitespace_regexp (NULL);
155 155
156 val = (char *) re_compile_pattern ((char *) SDATA (pattern), 156 val = (char *) re_compile_pattern (SSDATA (pattern),
157 SBYTES (pattern), &cp->buf); 157 SBYTES (pattern), &cp->buf);
158 158
159 /* If the compiled pattern hard codes some of the contents of the 159 /* If the compiled pattern hard codes some of the contents of the
@@ -414,7 +414,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int p
414 immediate_quit = 1; 414 immediate_quit = 1;
415 re_match_object = string; 415 re_match_object = string;
416 416
417 val = re_search (bufp, (char *) SDATA (string), 417 val = re_search (bufp, SSDATA (string),
418 SBYTES (string), pos_byte, 418 SBYTES (string), pos_byte,
419 SBYTES (string) - pos_byte, 419 SBYTES (string) - pos_byte,
420 (NILP (Vinhibit_changing_match_data) 420 (NILP (Vinhibit_changing_match_data)
@@ -485,7 +485,7 @@ fast_string_match (Lisp_Object regexp, Lisp_Object string)
485 immediate_quit = 1; 485 immediate_quit = 1;
486 re_match_object = string; 486 re_match_object = string;
487 487
488 val = re_search (bufp, (char *) SDATA (string), 488 val = re_search (bufp, SSDATA (string),
489 SBYTES (string), 0, 489 SBYTES (string), 0,
490 SBYTES (string), 0); 490 SBYTES (string), 0);
491 immediate_quit = 0; 491 immediate_quit = 0;
@@ -528,7 +528,7 @@ fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
528 immediate_quit = 1; 528 immediate_quit = 1;
529 re_match_object = string; 529 re_match_object = string;
530 530
531 val = re_search (bufp, (char *) SDATA (string), 531 val = re_search (bufp, SSDATA (string),
532 SBYTES (string), 0, 532 SBYTES (string), 0,
533 SBYTES (string), 0); 533 SBYTES (string), 0);
534 immediate_quit = 0; 534 immediate_quit = 0;
@@ -1268,7 +1268,7 @@ search_buffer (Lisp_Object string, EMACS_INT pos, EMACS_INT pos_byte,
1268 1268
1269 if (multibyte == STRING_MULTIBYTE (string)) 1269 if (multibyte == STRING_MULTIBYTE (string))
1270 { 1270 {
1271 raw_pattern = (unsigned char *) SDATA (string); 1271 raw_pattern = SDATA (string);
1272 raw_pattern_size = SCHARS (string); 1272 raw_pattern_size = SCHARS (string);
1273 raw_pattern_size_byte = SBYTES (string); 1273 raw_pattern_size_byte = SBYTES (string);
1274 } 1274 }
@@ -3254,4 +3254,3 @@ is to bind it with `let' around a small expression. */);
3254 defsubr (&Sset_match_data); 3254 defsubr (&Sset_match_data);
3255 defsubr (&Sregexp_quote); 3255 defsubr (&Sregexp_quote);
3256} 3256}
3257
diff --git a/src/term.c b/src/term.c
index 63548304a75..f8484ce636c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1949,7 +1949,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
1949 if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display)) 1949 if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display))
1950 acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c); 1950 acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c);
1951 buf[0] = '['; 1951 buf[0] = '[';
1952 str = STRINGP (acronym) ? (char *) SDATA (acronym) : ""; 1952 str = STRINGP (acronym) ? SSDATA (acronym) : "";
1953 for (len = 0; len < 6 && str[len] && ASCII_BYTE_P (str[len]); len++) 1953 for (len = 0; len < 6 && str[len] && ASCII_BYTE_P (str[len]); len++)
1954 buf[1 + len] = str[len]; 1954 buf[1 + len] = str[len];
1955 buf[1 + len] = ']'; 1955 buf[1 + len] = ']';
@@ -3157,7 +3157,7 @@ init_tty (const char *name, const char *terminal_type, int must_succeed)
3157 tty->mouse_highlight.mouse_face_window = Qnil; 3157 tty->mouse_highlight.mouse_face_window = Qnil;
3158#endif 3158#endif
3159 3159
3160 3160
3161#ifndef DOS_NT 3161#ifndef DOS_NT
3162 set_tty_hooks (terminal); 3162 set_tty_hooks (terminal);
3163 3163
@@ -3800,4 +3800,3 @@ bigger, or it may make it blink, or it may do nothing at all. */);
3800 encode_terminal_src = NULL; 3800 encode_terminal_src = NULL;
3801 encode_terminal_dst = NULL; 3801 encode_terminal_dst = NULL;
3802} 3802}
3803
diff --git a/src/w32fns.c b/src/w32fns.c
index 8508e3313aa..387a8313297 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1507,11 +1507,11 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1507 BLOCK_INPUT; 1507 BLOCK_INPUT;
1508 1508
1509 result = x_text_icon (f, 1509 result = x_text_icon (f,
1510 (char *) SDATA ((!NILP (f->icon_name) 1510 SSDATA ((!NILP (f->icon_name)
1511 ? f->icon_name 1511 ? f->icon_name
1512 : !NILP (f->title) 1512 : !NILP (f->title)
1513 ? f->title 1513 ? f->title
1514 : f->name))); 1514 : f->name)));
1515 1515
1516 if (result) 1516 if (result)
1517 { 1517 {
@@ -3877,7 +3877,7 @@ w32_window (struct frame *f, long window_prompting, int minibuffer_only)
3877 Elsewhere we specify the window name for the window manager. */ 3877 Elsewhere we specify the window name for the window manager. */
3878 3878
3879 { 3879 {
3880 char *str = (char *) SDATA (Vx_resource_name); 3880 char *str = SSDATA (Vx_resource_name);
3881 f->namebuf = (char *) xmalloc (strlen (str) + 1); 3881 f->namebuf = (char *) xmalloc (strlen (str) + 1);
3882 strcpy (f->namebuf, str); 3882 strcpy (f->namebuf, str);
3883 } 3883 }
@@ -3943,9 +3943,9 @@ x_icon (struct frame *f, Lisp_Object parms)
3943 ? IconicState 3943 ? IconicState
3944 : NormalState)); 3944 : NormalState));
3945 3945
3946 x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name) 3946 x_text_icon (f, SSDATA ((!NILP (f->icon_name)
3947 ? f->icon_name 3947 ? f->icon_name
3948 : f->name))); 3948 : f->name)));
3949#endif 3949#endif
3950 3950
3951 UNBLOCK_INPUT; 3951 UNBLOCK_INPUT;
@@ -4723,7 +4723,7 @@ x_display_info_for_name (Lisp_Object name)
4723 validate_x_resource_name (); 4723 validate_x_resource_name ();
4724 4724
4725 dpyinfo = w32_term_init (name, (unsigned char *)0, 4725 dpyinfo = w32_term_init (name, (unsigned char *)0,
4726 (char *) SDATA (Vx_resource_name)); 4726 SSDATA (Vx_resource_name));
4727 4727
4728 if (dpyinfo == 0) 4728 if (dpyinfo == 0)
4729 error ("Cannot connect to server %s", SDATA (name)); 4729 error ("Cannot connect to server %s", SDATA (name));
@@ -4786,7 +4786,7 @@ terminate Emacs if we can't open the connection.
4786 add_system_logical_colors_to_map (&Vw32_color_map); 4786 add_system_logical_colors_to_map (&Vw32_color_map);
4787 4787
4788 if (! NILP (xrm_string)) 4788 if (! NILP (xrm_string))
4789 xrm_option = (unsigned char *) SDATA (xrm_string); 4789 xrm_option = SDATA (xrm_string);
4790 else 4790 else
4791 xrm_option = (unsigned char *) 0; 4791 xrm_option = (unsigned char *) 0;
4792 4792
@@ -4807,7 +4807,7 @@ terminate Emacs if we can't open the connection.
4807 /* This is what opens the connection and sets x_current_display. 4807 /* This is what opens the connection and sets x_current_display.
4808 This also initializes many symbols, such as those used for input. */ 4808 This also initializes many symbols, such as those used for input. */
4809 dpyinfo = w32_term_init (display, xrm_option, 4809 dpyinfo = w32_term_init (display, xrm_option,
4810 (char *) SDATA (Vx_resource_name)); 4810 SSDATA (Vx_resource_name));
4811 4811
4812 if (dpyinfo == 0) 4812 if (dpyinfo == 0)
4813 { 4813 {
@@ -6188,7 +6188,7 @@ an integer representing a ShowWindow flag:
6188 code_convert_string_norecord (make_unibyte_string (errstr, 6188 code_convert_string_norecord (make_unibyte_string (errstr,
6189 strlen (errstr)), 6189 strlen (errstr)),
6190 Vlocale_coding_system, 0); 6190 Vlocale_coding_system, 0);
6191 errstr = (char *)SDATA (decoded); 6191 errstr = SSDATA (decoded);
6192 } 6192 }
6193 error ("ShellExecute failed: %s", errstr); 6193 error ("ShellExecute failed: %s", errstr);
6194} 6194}
@@ -7203,4 +7203,3 @@ w32_last_error (void)
7203{ 7203{
7204 return GetLastError (); 7204 return GetLastError ();
7205} 7205}
7206
diff --git a/src/w32menu.c b/src/w32menu.c
index 7f883e3de84..6c6a4edd167 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -527,7 +527,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
527 string = AREF (items, i + 1); 527 string = AREF (items, i + 1);
528 if (NILP (string)) 528 if (NILP (string))
529 break; 529 break;
530 wv->name = (char *) SDATA (string); 530 wv->name = SSDATA (string);
531 update_submenu_strings (wv->contents); 531 update_submenu_strings (wv->contents);
532 wv = wv->next; 532 wv = wv->next;
533 } 533 }
@@ -555,7 +555,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
555 break; 555 break;
556 556
557 wv = xmalloc_widget_value (); 557 wv = xmalloc_widget_value ();
558 wv->name = (char *) SDATA (string); 558 wv->name = SSDATA (string);
559 wv->value = 0; 559 wv->value = 0;
560 wv->enabled = 1; 560 wv->enabled = 1;
561 wv->button_type = BUTTON_TYPE_NONE; 561 wv->button_type = BUTTON_TYPE_NONE;
@@ -745,7 +745,7 @@ w32_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
745 } 745 }
746 746
747 pane_string = (NILP (pane_name) 747 pane_string = (NILP (pane_name)
748 ? "" : (char *) SDATA (pane_name)); 748 ? "" : SSDATA (pane_name));
749 /* If there is just one top-level pane, put all its items directly 749 /* If there is just one top-level pane, put all its items directly
750 under the top-level menu. */ 750 under the top-level menu. */
751 if (menu_items_n_panes == 1) 751 if (menu_items_n_panes == 1)
@@ -813,9 +813,9 @@ w32_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
813 prev_wv->next = wv; 813 prev_wv->next = wv;
814 else 814 else
815 save_wv->contents = wv; 815 save_wv->contents = wv;
816 wv->name = (char *) SDATA (item_name); 816 wv->name = SSDATA (item_name);
817 if (!NILP (descrip)) 817 if (!NILP (descrip))
818 wv->key = (char *) SDATA (descrip); 818 wv->key = SSDATA (descrip);
819 wv->value = 0; 819 wv->value = 0;
820 /* Use the contents index as call_data, since we are 820 /* Use the contents index as call_data, since we are
821 restricted to 16-bits. */ 821 restricted to 16-bits. */
@@ -861,7 +861,7 @@ w32_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
861 else if (STRING_MULTIBYTE (title)) 861 else if (STRING_MULTIBYTE (title))
862 title = ENCODE_SYSTEM (title); 862 title = ENCODE_SYSTEM (title);
863 863
864 wv_title->name = (char *) SDATA (title); 864 wv_title->name = SSDATA (title);
865 wv_title->enabled = TRUE; 865 wv_title->enabled = TRUE;
866 wv_title->title = TRUE; 866 wv_title->title = TRUE;
867 wv_title->button_type = BUTTON_TYPE_NONE; 867 wv_title->button_type = BUTTON_TYPE_NONE;
@@ -1021,7 +1021,7 @@ w32_dialog_show (FRAME_PTR f, int keymaps,
1021 pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME); 1021 pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME);
1022 prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX); 1022 prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX);
1023 pane_string = (NILP (pane_name) 1023 pane_string = (NILP (pane_name)
1024 ? "" : (char *) SDATA (pane_name)); 1024 ? "" : SSDATA (pane_name));
1025 prev_wv = xmalloc_widget_value (); 1025 prev_wv = xmalloc_widget_value ();
1026 prev_wv->value = pane_string; 1026 prev_wv->value = pane_string;
1027 if (keymaps && !NILP (prefix)) 1027 if (keymaps && !NILP (prefix))
@@ -1069,8 +1069,8 @@ w32_dialog_show (FRAME_PTR f, int keymaps,
1069 prev_wv->next = wv; 1069 prev_wv->next = wv;
1070 wv->name = (char *) button_names[nb_buttons]; 1070 wv->name = (char *) button_names[nb_buttons];
1071 if (!NILP (descrip)) 1071 if (!NILP (descrip))
1072 wv->key = (char *) SDATA (descrip); 1072 wv->key = SSDATA (descrip);
1073 wv->value = (char *) SDATA (item_name); 1073 wv->value = SSDATA (item_name);
1074 wv->call_data = (void *) &AREF (menu_items, i); 1074 wv->call_data = (void *) &AREF (menu_items, i);
1075 wv->enabled = !NILP (enable); 1075 wv->enabled = !NILP (enable);
1076 wv->help = Qnil; 1076 wv->help = Qnil;
@@ -1730,4 +1730,3 @@ globals_of_w32menu (void)
1730 unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32, "AppendMenuW"); 1730 unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32, "AppendMenuW");
1731 unicode_message_box = (MessageBoxW_Proc) GetProcAddress (user32, "MessageBoxW"); 1731 unicode_message_box = (MessageBoxW_Proc) GetProcAddress (user32, "MessageBoxW");
1732} 1732}
1733
diff --git a/src/w32term.c b/src/w32term.c
index dfe844f8827..c32cc327c09 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1406,7 +1406,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
1406 glyph->u.glyphless.ch) 1406 glyph->u.glyphless.ch)
1407 : XCHAR_TABLE (Vglyphless_char_display)->extras[0]); 1407 : XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
1408 if (STRINGP (acronym)) 1408 if (STRINGP (acronym))
1409 str = (char *) SDATA (acronym); 1409 str = SSDATA (acronym);
1410 } 1410 }
1411 } 1411 }
1412 else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) 1412 else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE)
@@ -6429,4 +6429,3 @@ With MS Windows, the value is t. */);
6429 staticpro (&last_mouse_motion_frame); 6429 staticpro (&last_mouse_motion_frame);
6430 last_mouse_motion_frame = Qnil; 6430 last_mouse_motion_frame = Qnil;
6431} 6431}
6432
diff --git a/src/xdisp.c b/src/xdisp.c
index 384e49abe05..4d0ff88f9a3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11035,7 +11035,7 @@ debug_method_add (w, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9)
11035 w, 11035 w,
11036 ((BUFFERP (w->buffer) 11036 ((BUFFERP (w->buffer)
11037 && STRINGP (XBUFFER (w->buffer)->name)) 11037 && STRINGP (XBUFFER (w->buffer)->name))
11038 ? (char *) SDATA (XBUFFER (w->buffer)->name) 11038 ? SSDATA (XBUFFER (w->buffer)->name)
11039 : "no buffer"), 11039 : "no buffer"),
11040 buffer); 11040 buffer);
11041} 11041}
@@ -19298,9 +19298,9 @@ decode_mode_spec (struct window *w, register int c, int field_width,
19298 case 'F': 19298 case 'F':
19299 /* %F displays the frame name. */ 19299 /* %F displays the frame name. */
19300 if (!NILP (f->title)) 19300 if (!NILP (f->title))
19301 return (char *) SDATA (f->title); 19301 return SSDATA (f->title);
19302 if (f->explicit_name || ! FRAME_WINDOW_P (f)) 19302 if (f->explicit_name || ! FRAME_WINDOW_P (f))
19303 return (char *) SDATA (f->name); 19303 return SSDATA (f->name);
19304 return "Emacs"; 19304 return "Emacs";
19305 19305
19306 case 'f': 19306 case 'f':
@@ -19583,7 +19583,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
19583 if (STRINGP (obj)) 19583 if (STRINGP (obj))
19584 { 19584 {
19585 *string = obj; 19585 *string = obj;
19586 return (char *) SDATA (obj); 19586 return SSDATA (obj);
19587 } 19587 }
19588 else 19588 else
19589 return ""; 19589 return "";
@@ -22230,7 +22230,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
22230 { 22230 {
22231 if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display)) 22231 if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display))
22232 acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c); 22232 acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c);
22233 str = STRINGP (acronym) ? (char *) SDATA (acronym) : ""; 22233 str = STRINGP (acronym) ? SSDATA (acronym) : "";
22234 } 22234 }
22235 else 22235 else
22236 { 22236 {
@@ -22266,7 +22266,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
22266 else 22266 else
22267 upper_xoff = (width - metrics_upper.width) / 2; 22267 upper_xoff = (width - metrics_upper.width) / 2;
22268 } 22268 }
22269 22269
22270 /* +5 is for horizontal bars of a box plus 1-pixel spaces at 22270 /* +5 is for horizontal bars of a box plus 1-pixel spaces at
22271 top, bottom, and between upper and lower strings. */ 22271 top, bottom, and between upper and lower strings. */
22272 height = (metrics_upper.ascent + metrics_upper.descent 22272 height = (metrics_upper.ascent + metrics_upper.descent
@@ -26991,4 +26991,3 @@ cancel_hourglass (void)
26991#endif 26991#endif
26992} 26992}
26993#endif /* ! WINDOWSNT */ 26993#endif /* ! WINDOWSNT */
26994
diff --git a/src/xfaces.c b/src/xfaces.c
index cdb398ef102..abfa70b15a0 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3612,7 +3612,7 @@ x_update_menu_appearance (struct frame *f)
3612#if defined HAVE_X_I18N 3612#if defined HAVE_X_I18N
3613 char *fontsetname = xic_create_fontsetname (SDATA (xlfd), motif); 3613 char *fontsetname = xic_create_fontsetname (SDATA (xlfd), motif);
3614#else 3614#else
3615 char *fontsetname = (char *) SDATA (xlfd); 3615 char *fontsetname = SSDATA (xlfd);
3616#endif 3616#endif
3617 sprintf (line, "%s.pane.menubar*font%s: %s", 3617 sprintf (line, "%s.pane.menubar*font%s: %s",
3618 myname, suffix, fontsetname); 3618 myname, suffix, fontsetname);
@@ -3621,7 +3621,7 @@ x_update_menu_appearance (struct frame *f)
3621 myname, popup_path, suffix, fontsetname); 3621 myname, popup_path, suffix, fontsetname);
3622 XrmPutLineResource (&rdb, line); 3622 XrmPutLineResource (&rdb, line);
3623 changed_p = 1; 3623 changed_p = 1;
3624 if (fontsetname != (char *) SDATA (xlfd)) 3624 if (fontsetname != SSDATA (xlfd))
3625 xfree (fontsetname); 3625 xfree (fontsetname);
3626 } 3626 }
3627 } 3627 }
@@ -6763,4 +6763,3 @@ a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point. */);
6763 defsubr (&Sx_family_fonts); 6763 defsubr (&Sx_family_fonts);
6764#endif 6764#endif
6765} 6765}
6766
diff --git a/src/xfns.c b/src/xfns.c
index d79c3a9d8e2..bd1ffea2cd5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -723,7 +723,7 @@ xg_set_icon (FRAME_PTR f, Lisp_Object file)
723 { 723 {
724 GdkPixbuf *pixbuf; 724 GdkPixbuf *pixbuf;
725 GError *err = NULL; 725 GError *err = NULL;
726 char *filename = (char *) SDATA (found); 726 char *filename = SSDATA (found);
727 BLOCK_INPUT; 727 BLOCK_INPUT;
728 728
729 pixbuf = gdk_pixbuf_new_from_file (filename, &err); 729 pixbuf = gdk_pixbuf_new_from_file (filename, &err);
@@ -1161,9 +1161,9 @@ x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1161 BLOCK_INPUT; 1161 BLOCK_INPUT;
1162 if (NILP (arg)) 1162 if (NILP (arg))
1163 result = x_text_icon (f, 1163 result = x_text_icon (f,
1164 (char *) SDATA ((!NILP (f->icon_name) 1164 SSDATA ((!NILP (f->icon_name)
1165 ? f->icon_name 1165 ? f->icon_name
1166 : f->name))); 1166 : f->name)));
1167 else 1167 else
1168 result = x_bitmap_icon (f, arg); 1168 result = x_bitmap_icon (f, arg);
1169 1169
@@ -1198,11 +1198,11 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1198 BLOCK_INPUT; 1198 BLOCK_INPUT;
1199 1199
1200 result = x_text_icon (f, 1200 result = x_text_icon (f,
1201 (char *) SDATA ((!NILP (f->icon_name) 1201 SSDATA ((!NILP (f->icon_name)
1202 ? f->icon_name 1202 ? f->icon_name
1203 : !NILP (f->title) 1203 : !NILP (f->title)
1204 ? f->title 1204 ? f->title
1205 : f->name))); 1205 : f->name)));
1206 1206
1207 if (result) 1207 if (result)
1208 { 1208 {
@@ -1598,14 +1598,14 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1598 1598
1599#ifdef USE_GTK 1599#ifdef USE_GTK
1600 gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), 1600 gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
1601 (char *) SDATA (encoded_name)); 1601 SSDATA (encoded_name));
1602#else /* not USE_GTK */ 1602#else /* not USE_GTK */
1603 XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); 1603 XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
1604 XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), 1604 XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
1605 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name, 1605 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
1606 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 1606 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
1607 8, PropModeReplace, 1607 8, PropModeReplace,
1608 (char *) SDATA (encoded_name), 1608 SSDATA (encoded_name),
1609 SBYTES (encoded_name)); 1609 SBYTES (encoded_name));
1610#endif /* not USE_GTK */ 1610#endif /* not USE_GTK */
1611 1611
@@ -1614,7 +1614,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1614 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name, 1614 FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
1615 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 1615 FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
1616 8, PropModeReplace, 1616 8, PropModeReplace,
1617 (char *) SDATA (encoded_icon_name), 1617 SSDATA (encoded_icon_name),
1618 SBYTES (encoded_icon_name)); 1618 SBYTES (encoded_icon_name));
1619 1619
1620 if (do_free_icon_value) 1620 if (do_free_icon_value)
@@ -2397,7 +2397,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
2397 Elsewhere we specify the window name for the window manager. */ 2397 Elsewhere we specify the window name for the window manager. */
2398 2398
2399 { 2399 {
2400 char *str = (char *) SDATA (Vx_resource_name); 2400 char *str = SSDATA (Vx_resource_name);
2401 f->namebuf = (char *) xmalloc (strlen (str) + 1); 2401 f->namebuf = (char *) xmalloc (strlen (str) + 1);
2402 strcpy (f->namebuf, str); 2402 strcpy (f->namebuf, str);
2403 } 2403 }
@@ -2546,8 +2546,8 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
2546 2546
2547 validate_x_resource_name (); 2547 validate_x_resource_name ();
2548 2548
2549 class_hints.res_name = (char *) SDATA (Vx_resource_name); 2549 class_hints.res_name = SSDATA (Vx_resource_name);
2550 class_hints.res_class = (char *) SDATA (Vx_resource_class); 2550 class_hints.res_class = SSDATA (Vx_resource_class);
2551 XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints); 2551 XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints);
2552 2552
2553#ifdef HAVE_X_I18N 2553#ifdef HAVE_X_I18N
@@ -2711,8 +2711,8 @@ x_window (struct frame *f)
2711 2711
2712 validate_x_resource_name (); 2712 validate_x_resource_name ();
2713 2713
2714 class_hints.res_name = (char *) SDATA (Vx_resource_name); 2714 class_hints.res_name = SSDATA (Vx_resource_name);
2715 class_hints.res_class = (char *) SDATA (Vx_resource_class); 2715 class_hints.res_class = SSDATA (Vx_resource_class);
2716 XSetClassHint (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &class_hints); 2716 XSetClassHint (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &class_hints);
2717 2717
2718 /* The menubar is part of the ordinary display; 2718 /* The menubar is part of the ordinary display;
@@ -2824,9 +2824,9 @@ x_icon (struct frame *f, Lisp_Object parms)
2824 : NormalState)); 2824 : NormalState));
2825#endif 2825#endif
2826 2826
2827 x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name) 2827 x_text_icon (f, SSDATA ((!NILP (f->icon_name)
2828 ? f->icon_name 2828 ? f->icon_name
2829 : f->name))); 2829 : f->name)));
2830 2830
2831 UNBLOCK_INPUT; 2831 UNBLOCK_INPUT;
2832} 2832}
@@ -4047,7 +4047,7 @@ x_display_info_for_name (Lisp_Object name)
4047 validate_x_resource_name (); 4047 validate_x_resource_name ();
4048 4048
4049 dpyinfo = x_term_init (name, (char *)0, 4049 dpyinfo = x_term_init (name, (char *)0,
4050 (char *) SDATA (Vx_resource_name)); 4050 SSDATA (Vx_resource_name));
4051 4051
4052 if (dpyinfo == 0) 4052 if (dpyinfo == 0)
4053 error ("Cannot connect to X server %s", SDATA (name)); 4053 error ("Cannot connect to X server %s", SDATA (name));
@@ -4082,7 +4082,7 @@ terminate Emacs if we can't open the connection.
4082#endif 4082#endif
4083 4083
4084 if (! NILP (xrm_string)) 4084 if (! NILP (xrm_string))
4085 xrm_option = (unsigned char *) SDATA (xrm_string); 4085 xrm_option = SDATA (xrm_string);
4086 else 4086 else
4087 xrm_option = (unsigned char *) 0; 4087 xrm_option = (unsigned char *) 0;
4088 4088
@@ -4091,7 +4091,7 @@ terminate Emacs if we can't open the connection.
4091 /* This is what opens the connection and sets x_current_display. 4091 /* This is what opens the connection and sets x_current_display.
4092 This also initializes many symbols, such as those used for input. */ 4092 This also initializes many symbols, such as those used for input. */
4093 dpyinfo = x_term_init (display, xrm_option, 4093 dpyinfo = x_term_init (display, xrm_option,
4094 (char *) SDATA (Vx_resource_name)); 4094 SSDATA (Vx_resource_name));
4095 4095
4096 if (dpyinfo == 0) 4096 if (dpyinfo == 0)
4097 { 4097 {
diff --git a/src/xfont.c b/src/xfont.c
index a3de5988093..8326d357ca9 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -362,7 +362,7 @@ xfont_list_pattern (Display *display, const char *pattern,
362 script = Qnil; 362 script = Qnil;
363 } 363 }
364 } 364 }
365 365
366 BLOCK_INPUT; 366 BLOCK_INPUT;
367 x_catch_errors (display); 367 x_catch_errors (display);
368 368
@@ -540,7 +540,7 @@ xfont_list (Lisp_Object frame, Lisp_Object spec)
540 if (STRINGP (XCAR (alter)) 540 if (STRINGP (XCAR (alter))
541 && ((r - name) + SBYTES (XCAR (alter))) < 256) 541 && ((r - name) + SBYTES (XCAR (alter))) < 256)
542 { 542 {
543 strcpy (r, (char *) SDATA (XCAR (alter))); 543 strcpy (r, SSDATA (XCAR (alter)));
544 list = xfont_list_pattern (display, name, registry, script); 544 list = xfont_list_pattern (display, name, registry, script);
545 if (! NILP (list)) 545 if (! NILP (list))
546 break; 546 break;
@@ -797,7 +797,7 @@ xfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
797 ASET (font_object, FONT_TYPE_INDEX, Qx); 797 ASET (font_object, FONT_TYPE_INDEX, Qx);
798 if (STRINGP (fullname)) 798 if (STRINGP (fullname))
799 { 799 {
800 font_parse_xlfd ((char *) SDATA (fullname), font_object); 800 font_parse_xlfd (SSDATA (fullname), font_object);
801 ASET (font_object, FONT_NAME_INDEX, fullname); 801 ASET (font_object, FONT_NAME_INDEX, fullname);
802 } 802 }
803 else 803 else
@@ -1113,4 +1113,3 @@ syms_of_xfont (void)
1113 xfont_driver.type = Qx; 1113 xfont_driver.type = Qx;
1114 register_font_driver (&xfont_driver, NULL); 1114 register_font_driver (&xfont_driver, NULL);
1115} 1115}
1116
diff --git a/src/xmenu.c b/src/xmenu.c
index 47f4ec15347..93fcf693279 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -882,7 +882,7 @@ static void
882apply_systemfont_to_dialog (Widget w) 882apply_systemfont_to_dialog (Widget w)
883{ 883{
884 const char *fn = xsettings_get_system_normal_font (); 884 const char *fn = xsettings_get_system_normal_font ();
885 if (fn) 885 if (fn)
886 { 886 {
887 XrmDatabase db = XtDatabase (XtDisplay (w)); 887 XrmDatabase db = XtDatabase (XtDisplay (w));
888 if (db) 888 if (db)
@@ -1106,7 +1106,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
1106 string = XVECTOR (items)->contents[i + 1]; 1106 string = XVECTOR (items)->contents[i + 1];
1107 if (NILP (string)) 1107 if (NILP (string))
1108 break; 1108 break;
1109 wv->name = (char *) SDATA (string); 1109 wv->name = SSDATA (string);
1110 update_submenu_strings (wv->contents); 1110 update_submenu_strings (wv->contents);
1111 wv = wv->next; 1111 wv = wv->next;
1112 } 1112 }
@@ -1135,7 +1135,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
1135 break; 1135 break;
1136 1136
1137 wv = xmalloc_widget_value (); 1137 wv = xmalloc_widget_value ();
1138 wv->name = (char *) SDATA (string); 1138 wv->name = SSDATA (string);
1139 wv->value = 0; 1139 wv->value = 0;
1140 wv->enabled = 1; 1140 wv->enabled = 1;
1141 wv->button_type = BUTTON_TYPE_NONE; 1141 wv->button_type = BUTTON_TYPE_NONE;
@@ -1680,7 +1680,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
1680 } 1680 }
1681#endif 1681#endif
1682 pane_string = (NILP (pane_name) 1682 pane_string = (NILP (pane_name)
1683 ? "" : (char *) SDATA (pane_name)); 1683 ? "" : SSDATA (pane_name));
1684 /* If there is just one top-level pane, put all its items directly 1684 /* If there is just one top-level pane, put all its items directly
1685 under the top-level menu. */ 1685 under the top-level menu. */
1686 if (menu_items_n_panes == 1) 1686 if (menu_items_n_panes == 1)
@@ -1745,9 +1745,9 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
1745 prev_wv->next = wv; 1745 prev_wv->next = wv;
1746 else 1746 else
1747 save_wv->contents = wv; 1747 save_wv->contents = wv;
1748 wv->name = (char *) SDATA (item_name); 1748 wv->name = SSDATA (item_name);
1749 if (!NILP (descrip)) 1749 if (!NILP (descrip))
1750 wv->key = (char *) SDATA (descrip); 1750 wv->key = SSDATA (descrip);
1751 wv->value = 0; 1751 wv->value = 0;
1752 /* If this item has a null value, 1752 /* If this item has a null value,
1753 make the call_data null so that it won't display a box 1753 make the call_data null so that it won't display a box
@@ -1798,7 +1798,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
1798 title = ENCODE_MENU_STRING (title); 1798 title = ENCODE_MENU_STRING (title);
1799#endif 1799#endif
1800 1800
1801 wv_title->name = (char *) SDATA (title); 1801 wv_title->name = SSDATA (title);
1802 wv_title->enabled = TRUE; 1802 wv_title->enabled = TRUE;
1803 wv_title->button_type = BUTTON_TYPE_NONE; 1803 wv_title->button_type = BUTTON_TYPE_NONE;
1804 wv_title->help = Qnil; 1804 wv_title->help = Qnil;
@@ -2019,7 +2019,7 @@ xdialog_show (FRAME_PTR f,
2019 pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME]; 2019 pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];
2020 prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX]; 2020 prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];
2021 pane_string = (NILP (pane_name) 2021 pane_string = (NILP (pane_name)
2022 ? "" : (char *) SDATA (pane_name)); 2022 ? "" : SSDATA (pane_name));
2023 prev_wv = xmalloc_widget_value (); 2023 prev_wv = xmalloc_widget_value ();
2024 prev_wv->value = pane_string; 2024 prev_wv->value = pane_string;
2025 if (keymaps && !NILP (prefix)) 2025 if (keymaps && !NILP (prefix))
@@ -2066,8 +2066,8 @@ xdialog_show (FRAME_PTR f,
2066 prev_wv->next = wv; 2066 prev_wv->next = wv;
2067 wv->name = (char *) button_names[nb_buttons]; 2067 wv->name = (char *) button_names[nb_buttons];
2068 if (!NILP (descrip)) 2068 if (!NILP (descrip))
2069 wv->key = (char *) SDATA (descrip); 2069 wv->key = SSDATA (descrip);
2070 wv->value = (char *) SDATA (item_name); 2070 wv->value = SSDATA (item_name);
2071 wv->call_data = (void *) &XVECTOR (menu_items)->contents[i]; 2071 wv->call_data = (void *) &XVECTOR (menu_items)->contents[i];
2072 wv->enabled = !NILP (enable); 2072 wv->enabled = !NILP (enable);
2073 wv->help = Qnil; 2073 wv->help = Qnil;
@@ -2317,7 +2317,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
2317 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; 2317 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME];
2318 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; 2318 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];
2319 pane_string = (NILP (pane_name) 2319 pane_string = (NILP (pane_name)
2320 ? "" : (char *) SDATA (pane_name)); 2320 ? "" : SSDATA (pane_name));
2321 if (keymaps && !NILP (prefix)) 2321 if (keymaps && !NILP (prefix))
2322 pane_string++; 2322 pane_string++;
2323 2323
@@ -2582,4 +2582,3 @@ syms_of_xmenu (void)
2582 defsubr (&Sx_popup_dialog); 2582 defsubr (&Sx_popup_dialog);
2583#endif 2583#endif
2584} 2584}
2585
diff --git a/src/xselect.c b/src/xselect.c
index 0f57677a302..9031bd03f64 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -235,9 +235,9 @@ symbol_to_x_atom (struct x_display_info *dpyinfo, Display *display, Lisp_Object
235 if (EQ (sym, QNULL)) return dpyinfo->Xatom_NULL; 235 if (EQ (sym, QNULL)) return dpyinfo->Xatom_NULL;
236 if (!SYMBOLP (sym)) abort (); 236 if (!SYMBOLP (sym)) abort ();
237 237
238 TRACE1 (" XInternAtom %s", (char *) SDATA (SYMBOL_NAME (sym))); 238 TRACE1 (" XInternAtom %s", SSDATA (SYMBOL_NAME (sym)));
239 BLOCK_INPUT; 239 BLOCK_INPUT;
240 val = XInternAtom (display, (char *) SDATA (SYMBOL_NAME (sym)), False); 240 val = XInternAtom (display, SSDATA (SYMBOL_NAME (sym)), False);
241 UNBLOCK_INPUT; 241 UNBLOCK_INPUT;
242 return val; 242 return val;
243} 243}
@@ -2255,7 +2255,7 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
2255 else if (STRINGP (o)) 2255 else if (STRINGP (o))
2256 { 2256 {
2257 BLOCK_INPUT; 2257 BLOCK_INPUT;
2258 val = (long) XInternAtom (dpy, (char *) SDATA (o), False); 2258 val = (long) XInternAtom (dpy, SSDATA (o), False);
2259 UNBLOCK_INPUT; 2259 UNBLOCK_INPUT;
2260 } 2260 }
2261 else 2261 else
@@ -2392,7 +2392,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
2392 else if (STRINGP (atom)) 2392 else if (STRINGP (atom))
2393 { 2393 {
2394 BLOCK_INPUT; 2394 BLOCK_INPUT;
2395 x_atom = XInternAtom (FRAME_X_DISPLAY (f), (char *) SDATA (atom), False); 2395 x_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (atom), False);
2396 UNBLOCK_INPUT; 2396 UNBLOCK_INPUT;
2397 } 2397 }
2398 else 2398 else
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 57a95607fa0..5b65e1fa2a3 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -39,9 +39,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39#include "termopts.h" 39#include "termopts.h"
40#include "xterm.h" 40#include "xterm.h"
41 41
42/* Avoid "differ in sign" warnings */
43#define SSDATA(x) ((char *) SDATA (x))
44
45/* This is the event used when SAVE_SESSION_EVENT occurs. */ 42/* This is the event used when SAVE_SESSION_EVENT occurs. */
46 43
47static struct input_event emacs_event; 44static struct input_event emacs_event;
@@ -232,7 +229,7 @@ smc_save_yourself_CB (SmcConn smcConn,
232 props[props_idx]->vals[2].value = NOSPLASH_OPT; 229 props[props_idx]->vals[2].value = NOSPLASH_OPT;
233 230
234 cwd = get_current_dir_name (); 231 cwd = get_current_dir_name ();
235 if (cwd) 232 if (cwd)
236 { 233 {
237 chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1); 234 chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1);
238 strcpy (chdir_opt, CHDIR_OPT); 235 strcpy (chdir_opt, CHDIR_OPT);
@@ -394,8 +391,8 @@ create_client_leader_window (struct x_display_info *dpyinfo, char *client_id)
394 -1, -1, 1, 1, 391 -1, -1, 1, 1,
395 CopyFromParent, CopyFromParent, CopyFromParent); 392 CopyFromParent, CopyFromParent, CopyFromParent);
396 393
397 class_hints.res_name = (char *) SDATA (Vx_resource_name); 394 class_hints.res_name = SSDATA (Vx_resource_name);
398 class_hints.res_class = (char *) SDATA (Vx_resource_class); 395 class_hints.res_class = SSDATA (Vx_resource_class);
399 XSetClassHint (dpyinfo->display, w, &class_hints); 396 XSetClassHint (dpyinfo->display, w, &class_hints);
400 XStoreName (dpyinfo->display, w, class_hints.res_name); 397 XStoreName (dpyinfo->display, w, class_hints.res_name);
401 398
@@ -537,10 +534,10 @@ Do not call this function yourself. */)
537 SmcCloseConnection (smc_conn, 0, 0); 534 SmcCloseConnection (smc_conn, 0, 0);
538 ice_connection_closed (); 535 ice_connection_closed ();
539 } 536 }
540 537
541 return Qnil; 538 return Qnil;
542} 539}
543 540
544 541
545 542
546/*********************************************************************** 543/***********************************************************************
@@ -584,4 +581,3 @@ See also `emacs-save-session-functions', `emacs-session-save' and
584} 581}
585 582
586#endif /* HAVE_X_SM */ 583#endif /* HAVE_X_SM */
587
diff --git a/src/xterm.c b/src/xterm.c
index 9f5c8569b96..eca8f8b0b97 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1365,7 +1365,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
1365 glyph->u.glyphless.ch) 1365 glyph->u.glyphless.ch)
1366 : XCHAR_TABLE (Vglyphless_char_display)->extras[0]); 1366 : XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
1367 if (STRINGP (acronym)) 1367 if (STRINGP (acronym))
1368 str = (char *) SDATA (acronym); 1368 str = SSDATA (acronym);
1369 } 1369 }
1370 } 1370 }
1371 else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) 1371 else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE)
@@ -8442,7 +8442,7 @@ get_current_wm_state (struct frame *f,
8442 for (i = 0; i < actual_size; ++i) 8442 for (i = 0; i < actual_size; ++i)
8443 { 8443 {
8444 Atom a = ((Atom*)tmp_data)[i]; 8444 Atom a = ((Atom*)tmp_data)[i];
8445 if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) 8445 if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
8446 { 8446 {
8447 if (*size_state == FULLSCREEN_HEIGHT) 8447 if (*size_state == FULLSCREEN_HEIGHT)
8448 *size_state = FULLSCREEN_MAXIMIZED; 8448 *size_state = FULLSCREEN_MAXIMIZED;
@@ -9894,7 +9894,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9894 { 9894 {
9895 static char display_opt[] = "--display"; 9895 static char display_opt[] = "--display";
9896 static char name_opt[] = "--name"; 9896 static char name_opt[] = "--name";
9897 9897
9898 for (argc = 0; argc < NUM_ARGV; ++argc) 9898 for (argc = 0; argc < NUM_ARGV; ++argc)
9899 argv[argc] = 0; 9899 argv[argc] = 0;
9900 9900
@@ -10849,4 +10849,3 @@ default is nil, which is the same as `super'. */);
10849} 10849}
10850 10850
10851#endif /* HAVE_X_WINDOWS */ 10851#endif /* HAVE_X_WINDOWS */
10852