aboutsummaryrefslogtreecommitdiffstats
path: root/src/macterm.c
diff options
context:
space:
mode:
authorKen Raeburn2002-07-15 00:01:34 +0000
committerKen Raeburn2002-07-15 00:01:34 +0000
commitd5db40779d7505244d37476b4f046641f07eea2b (patch)
tree5c8bf4dad41639287e722cb7cbdc0709e47a9e53 /src/macterm.c
parent491c2516d32fa8b9ba9422ec142c8925dd82af00 (diff)
downloademacs-d5db40779d7505244d37476b4f046641f07eea2b.tar.gz
emacs-d5db40779d7505244d37476b4f046641f07eea2b.zip
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.
Diffstat (limited to 'src/macterm.c')
-rw-r--r--src/macterm.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/macterm.c b/src/macterm.c
index 7885f6c4a30..c471ba4bf35 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -7005,9 +7005,9 @@ note_mode_line_highlight (w, x, mode_line_p)
7005 7005
7006 if (glyph < end 7006 if (glyph < end
7007 && STRINGP (glyph->object) 7007 && STRINGP (glyph->object)
7008 && XSTRING (glyph->object)->intervals 7008 && STRING_INTERVALS (glyph->object)
7009 && glyph->charpos >= 0 7009 && glyph->charpos >= 0
7010 && glyph->charpos < XSTRING (glyph->object)->size) 7010 && glyph->charpos < SCHARS (glyph->object))
7011 { 7011 {
7012 /* If we're on a string with `help-echo' text property, 7012 /* If we're on a string with `help-echo' text property,
7013 arrange for the help to be displayed. This is done by 7013 arrange for the help to be displayed. This is done by
@@ -7328,7 +7328,7 @@ note_mouse_highlight (f, x, y)
7328 if (NILP (b)) 7328 if (NILP (b))
7329 b = make_number (0); 7329 b = make_number (0);
7330 if (NILP (e)) 7330 if (NILP (e))
7331 e = make_number (XSTRING (object)->size - 1); 7331 e = make_number (SCHARS (object) - 1);
7332 fast_find_string_pos (w, XINT (b), object, 7332 fast_find_string_pos (w, XINT (b), object,
7333 &dpyinfo->mouse_face_beg_col, 7333 &dpyinfo->mouse_face_beg_col,
7334 &dpyinfo->mouse_face_beg_row, 7334 &dpyinfo->mouse_face_beg_row,
@@ -7426,7 +7426,7 @@ note_mouse_highlight (f, x, y)
7426 /* Try text properties. */ 7426 /* Try text properties. */
7427 if (STRINGP (object) 7427 if (STRINGP (object)
7428 && charpos >= 0 7428 && charpos >= 0
7429 && charpos < XSTRING (object)->size) 7429 && charpos < SCHARS (object))
7430 { 7430 {
7431 help = Fget_text_property (make_number (charpos), 7431 help = Fget_text_property (make_number (charpos),
7432 Qhelp_echo, object); 7432 Qhelp_echo, object);
@@ -9469,7 +9469,7 @@ x_bitmap_icon (f, icon)
9469 if (NILP (icon)) 9469 if (NILP (icon))
9470 hicon = LoadIcon (hinst, EMACS_CLASS); 9470 hicon = LoadIcon (hinst, EMACS_CLASS);
9471 else if (STRINGP (icon)) 9471 else if (STRINGP (icon))
9472 hicon = LoadImage (NULL, (LPCTSTR) XSTRING (icon)->data, IMAGE_ICON, 0, 0, 9472 hicon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0,
9473 LR_DEFAULTSIZE | LR_LOADFROMFILE); 9473 LR_DEFAULTSIZE | LR_LOADFROMFILE);
9474 else if (SYMBOLP (icon)) 9474 else if (SYMBOLP (icon))
9475 { 9475 {
@@ -9606,7 +9606,7 @@ x_new_fontset (f, fontsetname)
9606 to do. */ 9606 to do. */
9607 return fontset_name (fontset); 9607 return fontset_name (fontset);
9608 9608
9609 result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); 9609 result = x_new_font (f, (SDATA (fontset_ascii (fontset))));
9610 9610
9611 if (!STRINGP (result)) 9611 if (!STRINGP (result))
9612 /* Can't load ASCII font. */ 9612 /* Can't load ASCII font. */
@@ -10893,7 +10893,7 @@ x_list_fonts (struct frame *f,
10893 } 10893 }
10894 } 10894 }
10895 10895
10896 ptnstr = XSTRING (pattern)->data; 10896 ptnstr = SDATA (pattern);
10897 10897
10898 GCPRO2 (pattern, newlist); 10898 GCPRO2 (pattern, newlist);
10899 10899
@@ -11243,9 +11243,9 @@ x_load_font (f, fontname, size)
11243 for (tail = font_names; CONSP (tail); tail = XCDR (tail)) 11243 for (tail = font_names; CONSP (tail); tail = XCDR (tail))
11244 if (dpyinfo->font_table[i].name 11244 if (dpyinfo->font_table[i].name
11245 && (!strcmp (dpyinfo->font_table[i].name, 11245 && (!strcmp (dpyinfo->font_table[i].name,
11246 XSTRING (XCAR (tail))->data) 11246 SDATA (XCAR (tail)))
11247 || !strcmp (dpyinfo->font_table[i].full_name, 11247 || !strcmp (dpyinfo->font_table[i].full_name,
11248 XSTRING (XCAR (tail))->data))) 11248 SDATA (XCAR (tail)))))
11249 return (dpyinfo->font_table + i); 11249 return (dpyinfo->font_table + i);
11250 } 11250 }
11251 11251
@@ -11263,7 +11263,7 @@ x_load_font (f, fontname, size)
11263 a bug of not finding a font even if the font surely exists and 11263 a bug of not finding a font even if the font surely exists and
11264 is loadable by XLoadQueryFont. */ 11264 is loadable by XLoadQueryFont. */
11265 if (size > 0 && !NILP (font_names)) 11265 if (size > 0 && !NILP (font_names))
11266 fontname = (char *) XSTRING (XCAR (font_names))->data; 11266 fontname = (char *) SDATA (XCAR (font_names));
11267 11267
11268 font = (MacFontStruct *) XLoadQueryFont (FRAME_MAC_DISPLAY (f), fontname); 11268 font = (MacFontStruct *) XLoadQueryFont (FRAME_MAC_DISPLAY (f), fontname);
11269 if (!font) 11269 if (!font)
@@ -11457,7 +11457,7 @@ same_x_server (name1, name2)
11457 char *name1, *name2; 11457 char *name1, *name2;
11458{ 11458{
11459 int seen_colon = 0; 11459 int seen_colon = 0;
11460 unsigned char *system_name = XSTRING (Vsystem_name)->data; 11460 unsigned char *system_name = SDATA (Vsystem_name);
11461 int system_name_length = strlen (system_name); 11461 int system_name_length = strlen (system_name);
11462 int length_until_period = 0; 11462 int length_until_period = 0;
11463 11463
@@ -12968,7 +12968,7 @@ same_x_server (name1, name2)
12968 char *name1, *name2; 12968 char *name1, *name2;
12969{ 12969{
12970 int seen_colon = 0; 12970 int seen_colon = 0;
12971 unsigned char *system_name = XSTRING (Vsystem_name)->data; 12971 unsigned char *system_name = SDATA (Vsystem_name);
12972 int system_name_length = strlen (system_name); 12972 int system_name_length = strlen (system_name);
12973 int length_until_period = 0; 12973 int length_until_period = 0;
12974 12974
@@ -13026,11 +13026,11 @@ mac_initialize_display_info ()
13026 13026
13027#if 0 13027#if 0
13028 dpyinfo->mac_id_name 13028 dpyinfo->mac_id_name
13029 = (char *) xmalloc (XSTRING (Vinvocation_name)->size 13029 = (char *) xmalloc (SCHARS (Vinvocation_name)
13030 + XSTRING (Vsystem_name)->size 13030 + SCHARS (Vsystem_name)
13031 + 2); 13031 + 2);
13032 sprintf (dpyinfo->mac_id_name, "%s@%s", 13032 sprintf (dpyinfo->mac_id_name, "%s@%s",
13033 XSTRING (Vinvocation_name)->data, XSTRING (Vsystem_name)->data); 13033 SDATA (Vinvocation_name), SDATA (Vsystem_name));
13034#else 13034#else
13035 dpyinfo->mac_id_name = (char *) xmalloc (strlen ("Mac Display") + 1); 13035 dpyinfo->mac_id_name = (char *) xmalloc (strlen ("Mac Display") + 1);
13036 strcpy (dpyinfo->mac_id_name, "Mac Display"); 13036 strcpy (dpyinfo->mac_id_name, "Mac Display");