Mercurial > emacs
changeset 112435:4889fb6961b2
Merge: Promote SSDATA macro to lisp.h.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 22 Jan 2011 18:57:40 -0800 |
parents | 27320025ed54 (current diff) 9de5a68b57e1 (diff) |
children | 473533159689 |
files | |
diffstat | 37 files changed, 177 insertions(+), 199 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sun Jan 23 00:34:08 2011 +0000 +++ b/src/ChangeLog Sat Jan 22 18:57:40 2011 -0800 @@ -1,3 +1,12 @@ +2011-01-23 Paul Eggert <eggert@cs.ucla.edu> + + Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h. + * lisp.h (SSDATA): New macro. + All uses of (char *) SDATA (x) replaced with SSDATA (x), + and all uses of (unsigned char *) SDATA (x) replaced with SDATA (x). + * gtkutil.c (SSDATA): Remove, as lisp.h now defines this. + * xsmfns.c (SSDATA): Likewise. + 2011-01-22 Martin Rudalics <rudalics@gmx.at> * window.c (select_window): New function.
--- a/src/callint.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/callint.c Sat Jan 22 18:57:40 2011 -0800 @@ -646,7 +646,7 @@ if (next_event >= key_count) error ("%s must be bound to an event with parameters", (SYMBOLP (function) - ? (char *) SDATA (SYMBOL_NAME (function)) + ? SSDATA (SYMBOL_NAME (function)) : "command")); args[i] = AREF (keys, next_event); next_event++; @@ -974,4 +974,3 @@ defsubr (&Scall_interactively); defsubr (&Sprefix_numeric_value); } -
--- a/src/callproc.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/callproc.c Sat Jan 22 18:57:40 2011 -0800 @@ -1278,7 +1278,7 @@ { if (SBYTES (entry) > varlen && SREF (entry, varlen) == '=') { - *value = (char *) SDATA (entry) + (varlen + 1); + *value = SSDATA (entry) + (varlen + 1); *valuelen = SBYTES (entry) - (varlen + 1); return 1; } @@ -1310,7 +1310,7 @@ = Fframe_parameter (NILP (frame) ? selected_frame : frame, Qdisplay); if (STRINGP (display)) { - *value = (char *) SDATA (display); + *value = SSDATA (display); *valuelen = SBYTES (display); return 1; } @@ -1594,4 +1594,3 @@ defsubr (&Sgetenv_internal); defsubr (&Scall_process_region); } -
--- a/src/charset.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/charset.c Sat Jan 22 18:57:40 2011 -0800 @@ -666,7 +666,7 @@ c = temp_charset_work->min_char; stop = (temp_charset_work->max_char < 0x20000 ? temp_charset_work->max_char : 0xFFFF); - + while (1) { int index = GET_TEMP_CHARSET_WORK_ENCODER (c); @@ -1828,7 +1828,7 @@ else { code = GET_TEMP_CHARSET_WORK_ENCODER (c); - code = INDEX_TO_CODE_POINT (charset, code); + code = INDEX_TO_CODE_POINT (charset, code); } } else /* method == CHARSET_METHOD_OFFSET */ @@ -2295,7 +2295,7 @@ { Lisp_Object tempdir; tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory); - if (access ((char *) SDATA (tempdir), 0) < 0) + if (access (SSDATA (tempdir), 0) < 0) { dir_warning ("Error: charsets directory (%s) does not exist.\n\ Emacs will not function correctly without the character map files.\n\ @@ -2431,4 +2431,3 @@ } #endif /* emacs */ -
--- a/src/coding.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/coding.c Sat Jan 22 18:57:40 2011 -0800 @@ -5380,9 +5380,9 @@ attrs = CODING_ID_ATTRS (coding->id); valids = AREF (attrs, coding_attr_charset_valids); name = CODING_ID_NAME (coding->id); - if (strncmp ((char *) SDATA (SYMBOL_NAME (name)), + if (strncmp (SSDATA (SYMBOL_NAME (name)), "iso-8859-", sizeof ("iso-8859-") - 1) == 0 - || strncmp ((char *) SDATA (SYMBOL_NAME (name)), + || strncmp (SSDATA (SYMBOL_NAME (name)), "iso-latin-", sizeof ("iso-latin-") - 1) == 0) check_latin_extra = 1; @@ -10827,7 +10827,7 @@ Lisp_Object dec = code_convert_string_norecord (build_string (str), Vlocale_coding_system, 0); - str = (char *) SDATA (dec); + str = SSDATA (dec); } return str;
--- a/src/dispnew.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/dispnew.c Sat Jan 22 18:57:40 2011 -0800 @@ -312,7 +312,7 @@ w, ((BUFFERP (w->buffer) && STRINGP (XBUFFER (w->buffer)->name)) - ? (char *) SDATA (XBUFFER (w->buffer)->name) + ? SSDATA (XBUFFER (w->buffer)->name) : "???"), paused_p ? " ***paused***" : ""); strcat (buf, msg); @@ -6592,4 +6592,3 @@ Vwindow_system_version = Qnil; } } -
--- a/src/doc.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/doc.c Sat Jan 22 18:57:40 2011 -0800 @@ -126,7 +126,7 @@ } else { - name = (char *) SDATA (file); + name = SSDATA (file); } fd = emacs_open (name, O_RDONLY, 0); @@ -891,7 +891,7 @@ bufp += length_byte; nchars += length; /* Check STRING again in case gc relocated it. */ - strp = (unsigned char *) SDATA (string) + idx; + strp = SDATA (string) + idx; } } else if (! multibyte) /* just copy other chars */ @@ -938,4 +938,3 @@ defsubr (&Ssnarf_documentation); defsubr (&Ssubstitute_command_keys); } -
--- a/src/editfns.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/editfns.c Sat Jan 22 18:57:40 2011 -0800 @@ -1397,7 +1397,7 @@ get_system_name (void) { if (STRINGP (Vsystem_name)) - return (const char *) SDATA (Vsystem_name); + return SSDATA (Vsystem_name); else return ""; } @@ -1406,7 +1406,7 @@ get_operating_system_release (void) { if (STRINGP (Voperating_system_release)) - return (char *) SDATA (Voperating_system_release); + return SSDATA (Voperating_system_release); else return ""; } @@ -1814,7 +1814,7 @@ if (EQ (zone, Qt)) tzstring = "UTC0"; else if (STRINGP (zone)) - tzstring = (char *) SDATA (zone); + tzstring = SSDATA (zone); else if (INTEGERP (zone)) { int abszone = eabs (XINT (zone)); @@ -2003,7 +2003,7 @@ else { CHECK_STRING (tz); - tzstring = (char *) SDATA (tz); + tzstring = SSDATA (tz); } set_time_zone_rule (tzstring); @@ -4677,4 +4677,3 @@ defsubr (&Ssave_restriction); defsubr (&Stranspose_regions); } -
--- a/src/emacs.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/emacs.c Sat Jan 22 18:57:40 2011 -0800 @@ -2205,7 +2205,7 @@ { *plocale = desired_locale; setlocale (category, (STRINGP (desired_locale) - ? (char *) SDATA (desired_locale) + ? SSDATA (desired_locale) : "")); } } @@ -2490,4 +2490,3 @@ /* Make sure IS_DAEMON starts up as false. */ daemon_pipe[1] = 0; } -
--- a/src/fileio.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/fileio.c Sat Jan 22 18:57:40 2011 -0800 @@ -194,7 +194,7 @@ { int c; - str = (char *) SDATA (errstring); + str = SSDATA (errstring); c = STRING_CHAR (str); Faset (errstring, make_number (0), make_number (DOWNCASE (c))); } @@ -2558,7 +2558,7 @@ return Qnil; return (statbuf.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil; #else - return (check_writable (!NILP (dir) ? (char *) SDATA (dir) : "") + return (check_writable (!NILP (dir) ? SSDATA (dir) : "") ? Qt : Qnil); #endif }
--- a/src/filelock.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/filelock.c Sat Jan 22 18:57:40 2011 -0800 @@ -358,11 +358,11 @@ boot_time = get_boot_time (); if (STRINGP (Fuser_login_name (Qnil))) - user_name = (char *)SDATA (Fuser_login_name (Qnil)); + user_name = SSDATA (Fuser_login_name (Qnil)); else user_name = ""; if (STRINGP (Fsystem_name ())) - host_name = (char *)SDATA (Fsystem_name ()); + host_name = SSDATA (Fsystem_name ()); else host_name = ""; lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) @@ -738,4 +738,3 @@ defsubr (&Sfile_locked_p); #endif } -
--- a/src/font.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/font.c Sat Jan 22 18:57:40 2011 -0800 @@ -1190,7 +1190,7 @@ if (SYMBOLP (val)) val = SYMBOL_NAME (val); if (j == XLFD_REGISTRY_INDEX - && ! strchr ((char *) SDATA (val), '-')) + && ! strchr (SSDATA (val), '-')) { /* Change "jisx0208*" and "jisx0208" to "jisx0208*-*". */ if (SDATA (val)[SBYTES (val) - 1] == '*') @@ -1207,7 +1207,7 @@ } } else - f[j] = (char *) SDATA (val), len += SBYTES (val) + 1; + f[j] = SSDATA (val), len += SBYTES (val) + 1; } } @@ -1220,7 +1220,7 @@ else { val = SYMBOL_NAME (val); - f[j] = (char *) SDATA (val), len += SBYTES (val) + 1; + f[j] = SSDATA (val), len += SBYTES (val) + 1; } } @@ -1703,7 +1703,7 @@ { CHECK_STRING (family); len = SBYTES (family); - p0 = (char *) SDATA (family); + p0 = SSDATA (family); p1 = strchr (p0, '-'); if (p1) { @@ -1722,7 +1722,7 @@ /* Convert "XXX" and "XXX*" to "XXX*-*". */ CHECK_STRING (registry); len = SBYTES (registry); - p0 = (char *) SDATA (registry); + p0 = SSDATA (registry); p1 = strchr (p0, '-'); if (! p1) { @@ -1855,7 +1855,7 @@ otf = XSAVE_VALUE (XCDR (val))->pointer; else { - otf = STRINGP (file) ? OTF_open ((char *) SDATA (file)) : NULL; + otf = STRINGP (file) ? OTF_open (SSDATA (file)) : NULL; val = make_save_value (otf, 0); otf_list = Fcons (Fcons (file, val), otf_list); } @@ -3000,7 +3000,7 @@ Lisp_Object spec = Ffont_spec (0, NULL); CHECK_STRING (font_name); - if (font_parse_name ((char *) SDATA (font_name), spec) == -1) + if (font_parse_name (SSDATA (font_name), spec) == -1) return Qnil; font_put_extra (spec, QCname, font_name); font_put_extra (spec, QCuser_spec, font_name); @@ -3158,7 +3158,7 @@ else if (STRINGP (attrs[LFACE_FOUNDRY_INDEX])) { val = attrs[LFACE_FOUNDRY_INDEX]; - foundry[0] = font_intern_prop ((char *) SDATA (val), SBYTES (val), 1); + foundry[0] = font_intern_prop (SSDATA (val), SBYTES (val), 1); foundry[1] = Qnil; foundry[2] = null_vector; } @@ -3189,7 +3189,7 @@ if (NILP (val) && STRINGP (attrs[LFACE_FAMILY_INDEX])) { val = attrs[LFACE_FAMILY_INDEX]; - val = font_intern_prop ((char *) SDATA (val), SBYTES (val), 1); + val = font_intern_prop (SSDATA (val), SBYTES (val), 1); } if (NILP (val)) { @@ -3620,7 +3620,7 @@ if (strcmp (boolean_properties[i], keystr) == 0) { const char *str = INTEGERP (val) ? (XINT (val) ? "true" : "false") - : SYMBOLP (val) ? (const char *) SDATA (SYMBOL_NAME (val)) + : SYMBOLP (val) ? SSDATA (SYMBOL_NAME (val)) : "true"; if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0 @@ -3890,7 +3890,7 @@ if (EQ (key, QCname)) { CHECK_STRING (val); - font_parse_name ((char *) SDATA (val), spec); + font_parse_name (SSDATA (val), spec); font_put_extra (spec, key, val); } else @@ -4250,7 +4250,7 @@ { if (NILP (fold_wildcards)) return font_name; - strcpy (name, (char *) SDATA (font_name)); + strcpy (name, SSDATA (font_name)); goto done; } pixel_size = XFONT_OBJECT (font)->pixel_size; @@ -4913,7 +4913,7 @@ if (fontset >= 0) name = fontset_ascii (fontset); - font_object = font_open_by_name (f, (char *) SDATA (name)); + font_object = font_open_by_name (f, SSDATA (name)); } else if (FONT_OBJECT_P (name)) font_object = name; @@ -4991,7 +4991,7 @@ return; if (STRINGP (AREF (Vfont_log_deferred, 0))) { - char *str = (char *) SDATA (AREF (Vfont_log_deferred, 0)); + char *str = SSDATA (AREF (Vfont_log_deferred, 0)); ASET (Vfont_log_deferred, 0, Qnil); font_add_log (str, AREF (Vfont_log_deferred, 1), @@ -5269,4 +5269,3 @@ { Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; } -
--- a/src/fontset.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/fontset.c Sat Jan 22 18:57:40 2011 -0800 @@ -1049,7 +1049,7 @@ the corresponding regular expression. */ static Lisp_Object Vcached_fontset_data; -#define CACHED_FONTSET_NAME ((char *) SDATA (XCAR (Vcached_fontset_data))) +#define CACHED_FONTSET_NAME SSDATA (XCAR (Vcached_fontset_data)) #define CACHED_FONTSET_REGEX (XCDR (Vcached_fontset_data)) /* If fontset name PATTERN contains any wild card, return regular @@ -1058,13 +1058,13 @@ static Lisp_Object fontset_pattern_regexp (Lisp_Object pattern) { - if (!strchr ((char *) SDATA (pattern), '*') - && !strchr ((char *) SDATA (pattern), '?')) + if (!strchr (SSDATA (pattern), '*') + && !strchr (SSDATA (pattern), '?')) /* PATTERN does not contain any wild cards. */ return Qnil; if (!CONSP (Vcached_fontset_data) - || strcmp ((char *) SDATA (pattern), CACHED_FONTSET_NAME)) + || strcmp (SSDATA (pattern), CACHED_FONTSET_NAME)) { /* We must at first update the cached data. */ unsigned char *regex, *p0, *p1; @@ -1115,7 +1115,7 @@ *p1++ = '$'; *p1++ = 0; - Vcached_fontset_data = Fcons (build_string ((char *) SDATA (pattern)), + Vcached_fontset_data = Fcons (build_string (SSDATA (pattern)), build_string ((char *) regex)); } @@ -1225,7 +1225,7 @@ if (STRINGP (regexp) ? (fast_string_match (regexp, name) < 0) - : strcmp ((char *) SDATA (pattern), (char *) SDATA (name))) + : strcmp (SSDATA (pattern), SSDATA (name))) continue; val = Fcons (Fcopy_sequence (FONTSET_NAME (fontset)), val); @@ -1651,10 +1651,10 @@ char xlfd[256]; int len; - if (font_parse_xlfd ((char *) SDATA (name), font_spec) < 0) + if (font_parse_xlfd (SSDATA (name), font_spec) < 0) error ("Fontset name must be in XLFD format"); short_name = AREF (font_spec, FONT_REGISTRY_INDEX); - if (strncmp ((char *) SDATA (SYMBOL_NAME (short_name)), "fontset-", 8) + if (strncmp (SSDATA (SYMBOL_NAME (short_name)), "fontset-", 8) || SBYTES (SYMBOL_NAME (short_name)) < 9) error ("Registry field of fontset name must be \"fontset-*\""); Vfontset_alias_alist = Fcons (Fcons (name, SYMBOL_NAME (short_name)),
--- a/src/frame.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/frame.c Sat Jan 22 18:57:40 2011 -0800 @@ -4037,7 +4037,7 @@ CHECK_STRING (string); - geometry = XParseGeometry ((char *) SDATA (string), + geometry = XParseGeometry (SSDATA (string), &x, &y, &width, &height); result = Qnil; if (geometry & XValue) @@ -4637,4 +4637,3 @@ #endif } -
--- a/src/ftfont.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/ftfont.c Sat Jan 22 18:57:40 2011 -0800 @@ -392,7 +392,7 @@ if (cache_for == FTFONT_CACHE_FOR_FACE ? ! cache_data->ft_face : ! cache_data->fc_charset) { - char *filename = (char *) SDATA (XCAR (key)); + char *filename = SSDATA (XCAR (key)); int index = XINT (XCDR (key)); if (cache_for == FTFONT_CACHE_FOR_FACE) @@ -555,7 +555,7 @@ static int ftfont_get_charset (Lisp_Object registry) { - char *str = (char *) SDATA (SYMBOL_NAME (registry)); + char *str = SSDATA (SYMBOL_NAME (registry)); char *re = alloca (SBYTES (SYMBOL_NAME (registry)) * 2 + 1); Lisp_Object regexp; int i, j; @@ -2453,7 +2453,7 @@ flt_font_ft.flt_font.family = Mnil; else flt_font_ft.flt_font.family - = msymbol ((char *) SDATA (Fdowncase (SYMBOL_NAME (family)))); + = msymbol (SSDATA (Fdowncase (SYMBOL_NAME (family)))); } flt_font_ft.flt_font.x_ppem = ft_face->size->metrics.x_ppem; flt_font_ft.flt_font.y_ppem = ft_face->size->metrics.y_ppem; @@ -2675,4 +2675,3 @@ ftfont_driver.type = Qfreetype; register_font_driver (&ftfont_driver, NULL); } -
--- a/src/gnutls.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/gnutls.c Sat Jan 22 18:57:40 2011 -0800 @@ -448,7 +448,7 @@ (x509_cred, SDATA (trustfile), file_format); - + if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); } @@ -470,7 +470,7 @@ (x509_cred, SDATA (keyfile), file_format); - + if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); } @@ -497,7 +497,7 @@ if (STRINGP (priority_string)) { - priority_string_ptr = (char*) SDATA (priority_string); + priority_string_ptr = SSDATA (priority_string); GNUTLS_LOG2 (1, max_log_level, "got non-default priority string:", priority_string_ptr); } @@ -506,7 +506,7 @@ GNUTLS_LOG2 (1, max_log_level, "using default priority string:", priority_string_ptr); } - + GNUTLS_LOG (1, max_log_level, "setting the priority string"); ret = gnutls_priority_set_direct (state,
--- a/src/gtkutil.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/gtkutil.c Sat Jan 22 18:57:40 2011 -0800 @@ -46,9 +46,6 @@ #define FRAME_TOTAL_PIXEL_WIDTH(f) \ (FRAME_PIXEL_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f)) -/* Avoid "differ in sign" warnings */ -#define SSDATA(x) ((char *) SDATA (x)) - #ifndef HAVE_GTK_WIDGET_SET_HAS_WINDOW #define gtk_widget_set_has_window(w, b) \ (gtk_fixed_set_has_window (GTK_FIXED (w), b)) @@ -4565,4 +4562,3 @@ } #endif /* USE_GTK */ -
--- a/src/image.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/image.c Sat Jan 22 18:57:40 2011 -0800 @@ -350,7 +350,7 @@ { if (dpyinfo->bitmaps[id].refcount && dpyinfo->bitmaps[id].file - && !strcmp (dpyinfo->bitmaps[id].file, (char *) SDATA (file))) + && !strcmp (dpyinfo->bitmaps[id].file, SSDATA (file))) { ++dpyinfo->bitmaps[id].refcount; return id + 1; @@ -363,7 +363,7 @@ return -1; emacs_close (fd); - filename = (char *) SDATA (found); + filename = SSDATA (found); result = XReadBitmapFile (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), filename, &width, &height, &bitmap, &xhot, &yhot); @@ -8883,4 +8883,3 @@ init_image (void) { } -
--- a/src/keyboard.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/keyboard.c Sat Jan 22 18:57:40 2011 -0800 @@ -8177,8 +8177,8 @@ /* Try to make one from caption and key. */ Lisp_Object key = PROP (TOOL_BAR_ITEM_KEY); Lisp_Object capt = PROP (TOOL_BAR_ITEM_CAPTION); - const char *label = SYMBOLP (key) ? (char *) SDATA (SYMBOL_NAME (key)) : ""; - const char *caption = STRINGP (capt) ? (char *) SDATA (capt) : ""; + const char *label = SYMBOLP (key) ? SSDATA (SYMBOL_NAME (key)) : ""; + const char *caption = STRINGP (capt) ? SSDATA (capt) : ""; EMACS_INT max_lbl = 2 * tool_bar_max_label_size; char *buf = (char *) xmalloc (max_lbl + 1); Lisp_Object new_lbl; @@ -12298,4 +12298,3 @@ } } } -
--- a/src/lisp.h Sun Jan 23 00:34:08 2011 +0000 +++ b/src/lisp.h Sat Jan 22 18:57:40 2011 -0800 @@ -635,6 +635,9 @@ #define SCHARS(string) (XSTRING (string)->size + 0) #define SBYTES(string) (STRING_BYTES (XSTRING (string)) + 0) +/* Avoid "differ in sign" warnings. */ +#define SSDATA(x) ((char *) SDATA (x)) + #define STRING_SET_CHARS(string, newsize) \ (XSTRING (string)->size = (newsize)) @@ -1844,7 +1847,7 @@ /* Macros we use to define forwarded Lisp variables. These are used in the syms_of_FILENAME functions. - + An ordinary (not in buffer_defaults, per-buffer, or per-keyboard) lisp variable is actually a field in `struct emacs_globals'. The field's name begins with "f_", which is a convention enforced by
--- a/src/lread.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/lread.c Sat Jan 22 18:57:40 2011 -0800 @@ -1082,9 +1082,9 @@ #ifdef DOS_NT fmode = "rb"; #endif /* DOS_NT */ - stat ((char *)SDATA (efound), &s1); + stat (SSDATA (efound), &s1); SSET (efound, SBYTES (efound) - 1, 0); - result = stat ((char *)SDATA (efound), &s2); + result = stat (SSDATA (efound), &s2); SSET (efound, SBYTES (efound) - 1, 'c'); if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime) @@ -1125,7 +1125,7 @@ #ifdef WINDOWSNT emacs_close (fd); efound = ENCODE_FILE (found); - stream = fopen ((char *) SDATA (efound), fmode); + stream = fopen (SSDATA (efound), fmode); #else /* not WINDOWSNT */ stream = fdopen (fd, fmode); #endif /* not WINDOWSNT */ @@ -4404,4 +4404,3 @@ Qrehash_threshold = intern_c_string ("rehash-threshold"); staticpro (&Qrehash_threshold); } -
--- a/src/menu.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/menu.c Sat Jan 22 18:57:40 2011 -0800 @@ -695,7 +695,7 @@ #endif pane_string = (NILP (pane_name) - ? "" : (char *) SDATA (pane_name)); + ? "" : SSDATA (pane_name)); /* If there is just one top-level pane, put all its items directly under the top-level menu. */ if (menu_items_n_panes == 1) @@ -847,7 +847,7 @@ { if (STRINGP (wv->lname)) { - wv->name = (char *) SDATA (wv->lname); + wv->name = SSDATA (wv->lname); /* Ignore the @ that means "separate pane". This is a kludge, but this isn't worth more time. */ @@ -860,7 +860,7 @@ } if (STRINGP (wv->lkey)) - wv->key = (char *) SDATA (wv->lkey); + wv->key = SSDATA (wv->lkey); if (wv->contents) update_submenu_strings (wv->contents); @@ -1353,4 +1353,3 @@ defsubr (&Sx_popup_menu); } -
--- a/src/nsmenu.m Sun Jan 23 00:34:08 2011 +0000 +++ b/src/nsmenu.m Sat Jan 22 18:57:40 2011 -0800 @@ -355,7 +355,7 @@ /* if (submenu && strcmp (submenuTitle, SDATA (string))) continue; */ - wv->name = (char *) SDATA (string); + wv->name = SSDATA (string); update_submenu_strings (wv->contents); wv = wv->next; } @@ -444,7 +444,7 @@ strncpy (previous_strings[i/4], SDATA (string), 10); wv = xmalloc_widget_value (); - wv->name = (char *) SDATA (string); + wv->name = SSDATA (string); wv->value = 0; wv->enabled = 1; wv->button_type = BUTTON_TYPE_NONE; @@ -833,7 +833,7 @@ } #endif pane_string = (NILP (pane_name) - ? "" : (char *) SDATA (pane_name)); + ? "" : SSDATA (pane_name)); /* If there is just one top-level pane, put all its items directly under the top-level menu. */ if (menu_items_n_panes == 1) @@ -898,9 +898,9 @@ prev_wv->next = wv; else save_wv->contents = wv; - wv->name = (char *) SDATA (item_name); + wv->name = SSDATA (item_name); if (!NILP (descrip)) - wv->key = (char *) SDATA (descrip); + wv->key = SSDATA (descrip); wv->value = 0; /* If this item has a null value, make the call_data null so that it won't display a box @@ -949,7 +949,7 @@ title = ENCODE_MENU_STRING (title); #endif - wv_title->name = (char *) SDATA (title); + wv_title->name = SSDATA (title); wv_title->enabled = NO; wv_title->button_type = BUTTON_TYPE_NONE; wv_title->help = Qnil; @@ -1036,7 +1036,7 @@ helpObj = TOOLPROP (TOOL_BAR_ITEM_HELP); if (NILP (helpObj)) helpObj = TOOLPROP (TOOL_BAR_ITEM_CAPTION); - helpText = NILP (helpObj) ? "" : (char *)SDATA (helpObj); + helpText = NILP (helpObj) ? "" : SSDATA (helpObj); /* Ignore invalid image specifications. */ if (!valid_image_p (image))
--- a/src/process.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/process.c Sat Jan 22 18:57:40 2011 -0800 @@ -411,7 +411,7 @@ max_input_desc = fd; break; } - + } } @@ -498,7 +498,7 @@ if (! NILP (Vlocale_coding_system)) string = (code_convert_string_norecord (string, Vlocale_coding_system, 0)); - c1 = STRING_CHAR ((char *) SDATA (string)); + c1 = STRING_CHAR (SSDATA (string)); c2 = DOWNCASE (c1); if (c1 != c2) Faset (string, make_number (0), make_number (c2)); @@ -1420,7 +1420,7 @@ port = Fformat_network_address (Fplist_get (p->childp, QClocal), Qnil); sprintf (tembuf, "(network %s server on %s)\n", (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"), - (STRINGP (port) ? (char *)SDATA (port) : "?")); + (STRINGP (port) ? SSDATA (port) : "?")); insert_string (tembuf); } else if (NETCONN1_P (p)) @@ -1438,7 +1438,7 @@ host = Fformat_network_address (Fplist_get (p->childp, QCremote), Qnil); sprintf (tembuf, "(network %s connection to %s)\n", (DATAGRAM_CHAN_P (p->infd) ? "datagram" : "stream"), - (STRINGP (host) ? (char *)SDATA (host) : "?")); + (STRINGP (host) ? SSDATA (host) : "?")); insert_string (tembuf); } else if (SERIALCONN1_P (p)) @@ -2517,7 +2517,7 @@ CHECK_SYMBOL (opt); - name = (char *) SDATA (SYMBOL_NAME (opt)); + name = SSDATA (SYMBOL_NAME (opt)); for (sopt = socket_options; sopt->name; sopt++) if (strcmp (name, sopt->name) == 0) break; @@ -2556,7 +2556,7 @@ memset (devname, 0, sizeof devname); if (STRINGP (val)) { - char *arg = (char *) SDATA (val); + char *arg = SSDATA (val); int len = min (strlen (arg), IFNAMSIZ); memcpy (devname, arg, len); } @@ -2841,7 +2841,7 @@ record_unwind_protect (make_serial_process_unwind, proc); p = XPROCESS (proc); - fd = serial_open ((char*) SDATA (port)); + fd = serial_open (SSDATA (port)); p->infd = fd; p->outfd = fd; if (fd > max_process_desc) @@ -3377,7 +3377,7 @@ /* Attempt to interpret host as numeric inet address */ { unsigned long numeric_addr; - numeric_addr = inet_addr ((char *) SDATA (host)); + numeric_addr = inet_addr (SSDATA (host)); if (numeric_addr == -1) error ("Unknown host \"%s\"", SDATA (host)); @@ -5645,7 +5645,7 @@ #ifdef HAVE_GNUTLS if (XPROCESS (proc)->gnutls_p) rv = emacs_gnutls_write (outfd, - XPROCESS (proc), + XPROCESS (proc), (char *) buf, this); else #endif @@ -7727,4 +7727,3 @@ defsubr (&Slist_system_processes); defsubr (&Sprocess_attributes); } -
--- a/src/search.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/search.c Sat Jan 22 18:57:40 2011 -0800 @@ -153,7 +153,7 @@ else re_set_whitespace_regexp (NULL); - val = (char *) re_compile_pattern ((char *) SDATA (pattern), + val = (char *) re_compile_pattern (SSDATA (pattern), SBYTES (pattern), &cp->buf); /* If the compiled pattern hard codes some of the contents of the @@ -414,7 +414,7 @@ immediate_quit = 1; re_match_object = string; - val = re_search (bufp, (char *) SDATA (string), + val = re_search (bufp, SSDATA (string), SBYTES (string), pos_byte, SBYTES (string) - pos_byte, (NILP (Vinhibit_changing_match_data) @@ -485,7 +485,7 @@ immediate_quit = 1; re_match_object = string; - val = re_search (bufp, (char *) SDATA (string), + val = re_search (bufp, SSDATA (string), SBYTES (string), 0, SBYTES (string), 0); immediate_quit = 0; @@ -528,7 +528,7 @@ immediate_quit = 1; re_match_object = string; - val = re_search (bufp, (char *) SDATA (string), + val = re_search (bufp, SSDATA (string), SBYTES (string), 0, SBYTES (string), 0); immediate_quit = 0; @@ -1268,7 +1268,7 @@ if (multibyte == STRING_MULTIBYTE (string)) { - raw_pattern = (unsigned char *) SDATA (string); + raw_pattern = SDATA (string); raw_pattern_size = SCHARS (string); raw_pattern_size_byte = SBYTES (string); } @@ -3254,4 +3254,3 @@ defsubr (&Sset_match_data); defsubr (&Sregexp_quote); } -
--- a/src/term.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/term.c Sat Jan 22 18:57:40 2011 -0800 @@ -1949,7 +1949,7 @@ if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display)) acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c); buf[0] = '['; - str = STRINGP (acronym) ? (char *) SDATA (acronym) : ""; + str = STRINGP (acronym) ? SSDATA (acronym) : ""; for (len = 0; len < 6 && str[len] && ASCII_BYTE_P (str[len]); len++) buf[1 + len] = str[len]; buf[1 + len] = ']'; @@ -3157,7 +3157,7 @@ tty->mouse_highlight.mouse_face_window = Qnil; #endif - + #ifndef DOS_NT set_tty_hooks (terminal); @@ -3800,4 +3800,3 @@ encode_terminal_src = NULL; encode_terminal_dst = NULL; } -
--- a/src/w32fns.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/w32fns.c Sat Jan 22 18:57:40 2011 -0800 @@ -1507,11 +1507,11 @@ BLOCK_INPUT; result = x_text_icon (f, - (char *) SDATA ((!NILP (f->icon_name) - ? f->icon_name - : !NILP (f->title) - ? f->title - : f->name))); + SSDATA ((!NILP (f->icon_name) + ? f->icon_name + : !NILP (f->title) + ? f->title + : f->name))); if (result) { @@ -3877,7 +3877,7 @@ Elsewhere we specify the window name for the window manager. */ { - char *str = (char *) SDATA (Vx_resource_name); + char *str = SSDATA (Vx_resource_name); f->namebuf = (char *) xmalloc (strlen (str) + 1); strcpy (f->namebuf, str); } @@ -3943,9 +3943,9 @@ ? IconicState : NormalState)); - x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name) - ? f->icon_name - : f->name))); + x_text_icon (f, SSDATA ((!NILP (f->icon_name) + ? f->icon_name + : f->name))); #endif UNBLOCK_INPUT; @@ -4723,7 +4723,7 @@ validate_x_resource_name (); dpyinfo = w32_term_init (name, (unsigned char *)0, - (char *) SDATA (Vx_resource_name)); + SSDATA (Vx_resource_name)); if (dpyinfo == 0) error ("Cannot connect to server %s", SDATA (name)); @@ -4786,7 +4786,7 @@ add_system_logical_colors_to_map (&Vw32_color_map); if (! NILP (xrm_string)) - xrm_option = (unsigned char *) SDATA (xrm_string); + xrm_option = SDATA (xrm_string); else xrm_option = (unsigned char *) 0; @@ -4807,7 +4807,7 @@ /* This is what opens the connection and sets x_current_display. This also initializes many symbols, such as those used for input. */ dpyinfo = w32_term_init (display, xrm_option, - (char *) SDATA (Vx_resource_name)); + SSDATA (Vx_resource_name)); if (dpyinfo == 0) { @@ -6188,7 +6188,7 @@ code_convert_string_norecord (make_unibyte_string (errstr, strlen (errstr)), Vlocale_coding_system, 0); - errstr = (char *)SDATA (decoded); + errstr = SSDATA (decoded); } error ("ShellExecute failed: %s", errstr); } @@ -7203,4 +7203,3 @@ { return GetLastError (); } -
--- a/src/w32menu.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/w32menu.c Sat Jan 22 18:57:40 2011 -0800 @@ -527,7 +527,7 @@ string = AREF (items, i + 1); if (NILP (string)) break; - wv->name = (char *) SDATA (string); + wv->name = SSDATA (string); update_submenu_strings (wv->contents); wv = wv->next; } @@ -555,7 +555,7 @@ break; wv = xmalloc_widget_value (); - wv->name = (char *) SDATA (string); + wv->name = SSDATA (string); wv->value = 0; wv->enabled = 1; wv->button_type = BUTTON_TYPE_NONE; @@ -745,7 +745,7 @@ } pane_string = (NILP (pane_name) - ? "" : (char *) SDATA (pane_name)); + ? "" : SSDATA (pane_name)); /* If there is just one top-level pane, put all its items directly under the top-level menu. */ if (menu_items_n_panes == 1) @@ -813,9 +813,9 @@ prev_wv->next = wv; else save_wv->contents = wv; - wv->name = (char *) SDATA (item_name); + wv->name = SSDATA (item_name); if (!NILP (descrip)) - wv->key = (char *) SDATA (descrip); + wv->key = SSDATA (descrip); wv->value = 0; /* Use the contents index as call_data, since we are restricted to 16-bits. */ @@ -861,7 +861,7 @@ else if (STRING_MULTIBYTE (title)) title = ENCODE_SYSTEM (title); - wv_title->name = (char *) SDATA (title); + wv_title->name = SSDATA (title); wv_title->enabled = TRUE; wv_title->title = TRUE; wv_title->button_type = BUTTON_TYPE_NONE; @@ -1021,7 +1021,7 @@ pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME); prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX); pane_string = (NILP (pane_name) - ? "" : (char *) SDATA (pane_name)); + ? "" : SSDATA (pane_name)); prev_wv = xmalloc_widget_value (); prev_wv->value = pane_string; if (keymaps && !NILP (prefix)) @@ -1069,8 +1069,8 @@ prev_wv->next = wv; wv->name = (char *) button_names[nb_buttons]; if (!NILP (descrip)) - wv->key = (char *) SDATA (descrip); - wv->value = (char *) SDATA (item_name); + wv->key = SSDATA (descrip); + wv->value = SSDATA (item_name); wv->call_data = (void *) &AREF (menu_items, i); wv->enabled = !NILP (enable); wv->help = Qnil; @@ -1730,4 +1730,3 @@ unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32, "AppendMenuW"); unicode_message_box = (MessageBoxW_Proc) GetProcAddress (user32, "MessageBoxW"); } -
--- a/src/w32term.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/w32term.c Sat Jan 22 18:57:40 2011 -0800 @@ -1406,7 +1406,7 @@ glyph->u.glyphless.ch) : XCHAR_TABLE (Vglyphless_char_display)->extras[0]); if (STRINGP (acronym)) - str = (char *) SDATA (acronym); + str = SSDATA (acronym); } } else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) @@ -6429,4 +6429,3 @@ staticpro (&last_mouse_motion_frame); last_mouse_motion_frame = Qnil; } -
--- a/src/xdisp.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xdisp.c Sat Jan 22 18:57:40 2011 -0800 @@ -11035,7 +11035,7 @@ w, ((BUFFERP (w->buffer) && STRINGP (XBUFFER (w->buffer)->name)) - ? (char *) SDATA (XBUFFER (w->buffer)->name) + ? SSDATA (XBUFFER (w->buffer)->name) : "no buffer"), buffer); } @@ -19298,9 +19298,9 @@ case 'F': /* %F displays the frame name. */ if (!NILP (f->title)) - return (char *) SDATA (f->title); + return SSDATA (f->title); if (f->explicit_name || ! FRAME_WINDOW_P (f)) - return (char *) SDATA (f->name); + return SSDATA (f->name); return "Emacs"; case 'f': @@ -19583,7 +19583,7 @@ if (STRINGP (obj)) { *string = obj; - return (char *) SDATA (obj); + return SSDATA (obj); } else return ""; @@ -22230,7 +22230,7 @@ { if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display)) acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c); - str = STRINGP (acronym) ? (char *) SDATA (acronym) : ""; + str = STRINGP (acronym) ? SSDATA (acronym) : ""; } else { @@ -22266,7 +22266,7 @@ else upper_xoff = (width - metrics_upper.width) / 2; } - + /* +5 is for horizontal bars of a box plus 1-pixel spaces at top, bottom, and between upper and lower strings. */ height = (metrics_upper.ascent + metrics_upper.descent @@ -26991,4 +26991,3 @@ #endif } #endif /* ! WINDOWSNT */ -
--- a/src/xfaces.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xfaces.c Sat Jan 22 18:57:40 2011 -0800 @@ -3612,7 +3612,7 @@ #if defined HAVE_X_I18N char *fontsetname = xic_create_fontsetname (SDATA (xlfd), motif); #else - char *fontsetname = (char *) SDATA (xlfd); + char *fontsetname = SSDATA (xlfd); #endif sprintf (line, "%s.pane.menubar*font%s: %s", myname, suffix, fontsetname); @@ -3621,7 +3621,7 @@ myname, popup_path, suffix, fontsetname); XrmPutLineResource (&rdb, line); changed_p = 1; - if (fontsetname != (char *) SDATA (xlfd)) + if (fontsetname != SSDATA (xlfd)) xfree (fontsetname); } } @@ -6763,4 +6763,3 @@ defsubr (&Sx_family_fonts); #endif } -
--- a/src/xfns.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xfns.c Sat Jan 22 18:57:40 2011 -0800 @@ -723,7 +723,7 @@ { GdkPixbuf *pixbuf; GError *err = NULL; - char *filename = (char *) SDATA (found); + char *filename = SSDATA (found); BLOCK_INPUT; pixbuf = gdk_pixbuf_new_from_file (filename, &err); @@ -1161,9 +1161,9 @@ BLOCK_INPUT; if (NILP (arg)) result = x_text_icon (f, - (char *) SDATA ((!NILP (f->icon_name) - ? f->icon_name - : f->name))); + SSDATA ((!NILP (f->icon_name) + ? f->icon_name + : f->name))); else result = x_bitmap_icon (f, arg); @@ -1198,11 +1198,11 @@ BLOCK_INPUT; result = x_text_icon (f, - (char *) SDATA ((!NILP (f->icon_name) - ? f->icon_name - : !NILP (f->title) - ? f->title - : f->name))); + SSDATA ((!NILP (f->icon_name) + ? f->icon_name + : !NILP (f->title) + ? f->title + : f->name))); if (result) { @@ -1598,14 +1598,14 @@ #ifdef USE_GTK gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), - (char *) SDATA (encoded_name)); + SSDATA (encoded_name)); #else /* not USE_GTK */ XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name, FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 8, PropModeReplace, - (char *) SDATA (encoded_name), + SSDATA (encoded_name), SBYTES (encoded_name)); #endif /* not USE_GTK */ @@ -1614,7 +1614,7 @@ FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name, FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 8, PropModeReplace, - (char *) SDATA (encoded_icon_name), + SSDATA (encoded_icon_name), SBYTES (encoded_icon_name)); if (do_free_icon_value) @@ -2397,7 +2397,7 @@ Elsewhere we specify the window name for the window manager. */ { - char *str = (char *) SDATA (Vx_resource_name); + char *str = SSDATA (Vx_resource_name); f->namebuf = (char *) xmalloc (strlen (str) + 1); strcpy (f->namebuf, str); } @@ -2546,8 +2546,8 @@ validate_x_resource_name (); - class_hints.res_name = (char *) SDATA (Vx_resource_name); - class_hints.res_class = (char *) SDATA (Vx_resource_class); + class_hints.res_name = SSDATA (Vx_resource_name); + class_hints.res_class = SSDATA (Vx_resource_class); XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints); #ifdef HAVE_X_I18N @@ -2711,8 +2711,8 @@ validate_x_resource_name (); - class_hints.res_name = (char *) SDATA (Vx_resource_name); - class_hints.res_class = (char *) SDATA (Vx_resource_class); + class_hints.res_name = SSDATA (Vx_resource_name); + class_hints.res_class = SSDATA (Vx_resource_class); XSetClassHint (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &class_hints); /* The menubar is part of the ordinary display; @@ -2824,9 +2824,9 @@ : NormalState)); #endif - x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name) - ? f->icon_name - : f->name))); + x_text_icon (f, SSDATA ((!NILP (f->icon_name) + ? f->icon_name + : f->name))); UNBLOCK_INPUT; } @@ -4047,7 +4047,7 @@ validate_x_resource_name (); dpyinfo = x_term_init (name, (char *)0, - (char *) SDATA (Vx_resource_name)); + SSDATA (Vx_resource_name)); if (dpyinfo == 0) error ("Cannot connect to X server %s", SDATA (name)); @@ -4082,7 +4082,7 @@ #endif if (! NILP (xrm_string)) - xrm_option = (unsigned char *) SDATA (xrm_string); + xrm_option = SDATA (xrm_string); else xrm_option = (unsigned char *) 0; @@ -4091,7 +4091,7 @@ /* This is what opens the connection and sets x_current_display. This also initializes many symbols, such as those used for input. */ dpyinfo = x_term_init (display, xrm_option, - (char *) SDATA (Vx_resource_name)); + SSDATA (Vx_resource_name)); if (dpyinfo == 0) {
--- a/src/xfont.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xfont.c Sat Jan 22 18:57:40 2011 -0800 @@ -362,7 +362,7 @@ script = Qnil; } } - + BLOCK_INPUT; x_catch_errors (display); @@ -540,7 +540,7 @@ if (STRINGP (XCAR (alter)) && ((r - name) + SBYTES (XCAR (alter))) < 256) { - strcpy (r, (char *) SDATA (XCAR (alter))); + strcpy (r, SSDATA (XCAR (alter))); list = xfont_list_pattern (display, name, registry, script); if (! NILP (list)) break; @@ -797,7 +797,7 @@ ASET (font_object, FONT_TYPE_INDEX, Qx); if (STRINGP (fullname)) { - font_parse_xlfd ((char *) SDATA (fullname), font_object); + font_parse_xlfd (SSDATA (fullname), font_object); ASET (font_object, FONT_NAME_INDEX, fullname); } else @@ -1113,4 +1113,3 @@ xfont_driver.type = Qx; register_font_driver (&xfont_driver, NULL); } -
--- a/src/xmenu.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xmenu.c Sat Jan 22 18:57:40 2011 -0800 @@ -882,7 +882,7 @@ apply_systemfont_to_dialog (Widget w) { const char *fn = xsettings_get_system_normal_font (); - if (fn) + if (fn) { XrmDatabase db = XtDatabase (XtDisplay (w)); if (db) @@ -1106,7 +1106,7 @@ string = XVECTOR (items)->contents[i + 1]; if (NILP (string)) break; - wv->name = (char *) SDATA (string); + wv->name = SSDATA (string); update_submenu_strings (wv->contents); wv = wv->next; } @@ -1135,7 +1135,7 @@ break; wv = xmalloc_widget_value (); - wv->name = (char *) SDATA (string); + wv->name = SSDATA (string); wv->value = 0; wv->enabled = 1; wv->button_type = BUTTON_TYPE_NONE; @@ -1680,7 +1680,7 @@ } #endif pane_string = (NILP (pane_name) - ? "" : (char *) SDATA (pane_name)); + ? "" : SSDATA (pane_name)); /* If there is just one top-level pane, put all its items directly under the top-level menu. */ if (menu_items_n_panes == 1) @@ -1745,9 +1745,9 @@ prev_wv->next = wv; else save_wv->contents = wv; - wv->name = (char *) SDATA (item_name); + wv->name = SSDATA (item_name); if (!NILP (descrip)) - wv->key = (char *) SDATA (descrip); + wv->key = SSDATA (descrip); wv->value = 0; /* If this item has a null value, make the call_data null so that it won't display a box @@ -1798,7 +1798,7 @@ title = ENCODE_MENU_STRING (title); #endif - wv_title->name = (char *) SDATA (title); + wv_title->name = SSDATA (title); wv_title->enabled = TRUE; wv_title->button_type = BUTTON_TYPE_NONE; wv_title->help = Qnil; @@ -2019,7 +2019,7 @@ pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME]; prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX]; pane_string = (NILP (pane_name) - ? "" : (char *) SDATA (pane_name)); + ? "" : SSDATA (pane_name)); prev_wv = xmalloc_widget_value (); prev_wv->value = pane_string; if (keymaps && !NILP (prefix)) @@ -2066,8 +2066,8 @@ prev_wv->next = wv; wv->name = (char *) button_names[nb_buttons]; if (!NILP (descrip)) - wv->key = (char *) SDATA (descrip); - wv->value = (char *) SDATA (item_name); + wv->key = SSDATA (descrip); + wv->value = SSDATA (item_name); wv->call_data = (void *) &XVECTOR (menu_items)->contents[i]; wv->enabled = !NILP (enable); wv->help = Qnil; @@ -2317,7 +2317,7 @@ pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; pane_string = (NILP (pane_name) - ? "" : (char *) SDATA (pane_name)); + ? "" : SSDATA (pane_name)); if (keymaps && !NILP (prefix)) pane_string++; @@ -2582,4 +2582,3 @@ defsubr (&Sx_popup_dialog); #endif } -
--- a/src/xselect.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xselect.c Sat Jan 22 18:57:40 2011 -0800 @@ -235,9 +235,9 @@ if (EQ (sym, QNULL)) return dpyinfo->Xatom_NULL; if (!SYMBOLP (sym)) abort (); - TRACE1 (" XInternAtom %s", (char *) SDATA (SYMBOL_NAME (sym))); + TRACE1 (" XInternAtom %s", SSDATA (SYMBOL_NAME (sym))); BLOCK_INPUT; - val = XInternAtom (display, (char *) SDATA (SYMBOL_NAME (sym)), False); + val = XInternAtom (display, SSDATA (SYMBOL_NAME (sym)), False); UNBLOCK_INPUT; return val; } @@ -2255,7 +2255,7 @@ else if (STRINGP (o)) { BLOCK_INPUT; - val = (long) XInternAtom (dpy, (char *) SDATA (o), False); + val = (long) XInternAtom (dpy, SSDATA (o), False); UNBLOCK_INPUT; } else @@ -2392,7 +2392,7 @@ else if (STRINGP (atom)) { BLOCK_INPUT; - x_atom = XInternAtom (FRAME_X_DISPLAY (f), (char *) SDATA (atom), False); + x_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (atom), False); UNBLOCK_INPUT; } else
--- a/src/xsmfns.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xsmfns.c Sat Jan 22 18:57:40 2011 -0800 @@ -39,9 +39,6 @@ #include "termopts.h" #include "xterm.h" -/* Avoid "differ in sign" warnings */ -#define SSDATA(x) ((char *) SDATA (x)) - /* This is the event used when SAVE_SESSION_EVENT occurs. */ static struct input_event emacs_event; @@ -232,7 +229,7 @@ props[props_idx]->vals[2].value = NOSPLASH_OPT; cwd = get_current_dir_name (); - if (cwd) + if (cwd) { chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1); strcpy (chdir_opt, CHDIR_OPT); @@ -394,8 +391,8 @@ -1, -1, 1, 1, CopyFromParent, CopyFromParent, CopyFromParent); - class_hints.res_name = (char *) SDATA (Vx_resource_name); - class_hints.res_class = (char *) SDATA (Vx_resource_class); + class_hints.res_name = SSDATA (Vx_resource_name); + class_hints.res_class = SSDATA (Vx_resource_class); XSetClassHint (dpyinfo->display, w, &class_hints); XStoreName (dpyinfo->display, w, class_hints.res_name); @@ -537,10 +534,10 @@ SmcCloseConnection (smc_conn, 0, 0); ice_connection_closed (); } - + return Qnil; } - + /*********************************************************************** @@ -584,4 +581,3 @@ } #endif /* HAVE_X_SM */ -
--- a/src/xterm.c Sun Jan 23 00:34:08 2011 +0000 +++ b/src/xterm.c Sat Jan 22 18:57:40 2011 -0800 @@ -1365,7 +1365,7 @@ glyph->u.glyphless.ch) : XCHAR_TABLE (Vglyphless_char_display)->extras[0]); if (STRINGP (acronym)) - str = (char *) SDATA (acronym); + str = SSDATA (acronym); } } else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) @@ -8442,7 +8442,7 @@ for (i = 0; i < actual_size; ++i) { Atom a = ((Atom*)tmp_data)[i]; - if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) + if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) { if (*size_state == FULLSCREEN_HEIGHT) *size_state = FULLSCREEN_MAXIMIZED; @@ -9894,7 +9894,7 @@ { static char display_opt[] = "--display"; static char name_opt[] = "--name"; - + for (argc = 0; argc < NUM_ARGV; ++argc) argv[argc] = 0; @@ -10849,4 +10849,3 @@ } #endif /* HAVE_X_WINDOWS */ -