Mercurial > emacs
diff src/macterm.c @ 46370:40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references
left unchanged for now.
| author | Ken Raeburn <raeburn@raeburn.org> |
|---|---|
| date | Mon, 15 Jul 2002 00:00:41 +0000 |
| parents | 36989d5089ee |
| children | a8e027c9c403 |
line wrap: on
line diff
--- a/src/macterm.c Sun Jul 14 23:54:05 2002 +0000 +++ b/src/macterm.c Mon Jul 15 00:00:41 2002 +0000 @@ -7005,9 +7005,9 @@ if (glyph < end && STRINGP (glyph->object) - && XSTRING (glyph->object)->intervals + && STRING_INTERVALS (glyph->object) && glyph->charpos >= 0 - && glyph->charpos < XSTRING (glyph->object)->size) + && glyph->charpos < SCHARS (glyph->object)) { /* If we're on a string with `help-echo' text property, arrange for the help to be displayed. This is done by @@ -7328,7 +7328,7 @@ if (NILP (b)) b = make_number (0); if (NILP (e)) - e = make_number (XSTRING (object)->size - 1); + e = make_number (SCHARS (object) - 1); fast_find_string_pos (w, XINT (b), object, &dpyinfo->mouse_face_beg_col, &dpyinfo->mouse_face_beg_row, @@ -7426,7 +7426,7 @@ /* Try text properties. */ if (STRINGP (object) && charpos >= 0 - && charpos < XSTRING (object)->size) + && charpos < SCHARS (object)) { help = Fget_text_property (make_number (charpos), Qhelp_echo, object); @@ -9469,7 +9469,7 @@ if (NILP (icon)) hicon = LoadIcon (hinst, EMACS_CLASS); else if (STRINGP (icon)) - hicon = LoadImage (NULL, (LPCTSTR) XSTRING (icon)->data, IMAGE_ICON, 0, 0, + hicon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE); else if (SYMBOLP (icon)) { @@ -9606,7 +9606,7 @@ to do. */ return fontset_name (fontset); - result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); + result = x_new_font (f, (SDATA (fontset_ascii (fontset)))); if (!STRINGP (result)) /* Can't load ASCII font. */ @@ -10893,7 +10893,7 @@ } } - ptnstr = XSTRING (pattern)->data; + ptnstr = SDATA (pattern); GCPRO2 (pattern, newlist); @@ -11243,9 +11243,9 @@ for (tail = font_names; CONSP (tail); tail = XCDR (tail)) if (dpyinfo->font_table[i].name && (!strcmp (dpyinfo->font_table[i].name, - XSTRING (XCAR (tail))->data) + SDATA (XCAR (tail))) || !strcmp (dpyinfo->font_table[i].full_name, - XSTRING (XCAR (tail))->data))) + SDATA (XCAR (tail))))) return (dpyinfo->font_table + i); } @@ -11263,7 +11263,7 @@ a bug of not finding a font even if the font surely exists and is loadable by XLoadQueryFont. */ if (size > 0 && !NILP (font_names)) - fontname = (char *) XSTRING (XCAR (font_names))->data; + fontname = (char *) SDATA (XCAR (font_names)); font = (MacFontStruct *) XLoadQueryFont (FRAME_MAC_DISPLAY (f), fontname); if (!font) @@ -11457,7 +11457,7 @@ char *name1, *name2; { int seen_colon = 0; - unsigned char *system_name = XSTRING (Vsystem_name)->data; + unsigned char *system_name = SDATA (Vsystem_name); int system_name_length = strlen (system_name); int length_until_period = 0; @@ -12968,7 +12968,7 @@ char *name1, *name2; { int seen_colon = 0; - unsigned char *system_name = XSTRING (Vsystem_name)->data; + unsigned char *system_name = SDATA (Vsystem_name); int system_name_length = strlen (system_name); int length_until_period = 0; @@ -13026,11 +13026,11 @@ #if 0 dpyinfo->mac_id_name - = (char *) xmalloc (XSTRING (Vinvocation_name)->size - + XSTRING (Vsystem_name)->size + = (char *) xmalloc (SCHARS (Vinvocation_name) + + SCHARS (Vsystem_name) + 2); sprintf (dpyinfo->mac_id_name, "%s@%s", - XSTRING (Vinvocation_name)->data, XSTRING (Vsystem_name)->data); + SDATA (Vinvocation_name), SDATA (Vsystem_name)); #else dpyinfo->mac_id_name = (char *) xmalloc (strlen ("Mac Display") + 1); strcpy (dpyinfo->mac_id_name, "Mac Display");
