aboutsummaryrefslogtreecommitdiffstats
path: root/src/macmenu.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/macmenu.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/macmenu.c')
-rw-r--r--src/macmenu.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/macmenu.c b/src/macmenu.c
index 15190a7813b..cb51018ce00 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -541,7 +541,7 @@ single_menu_item (key, item, pending_maps_ptr, notreal, maxdepth)
541 enabled = XVECTOR (item_properties)->contents[ITEM_PROPERTY_ENABLE]; 541 enabled = XVECTOR (item_properties)->contents[ITEM_PROPERTY_ENABLE];
542 item_string = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME]; 542 item_string = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME];
543 543
544 if (!NILP (map) && XSTRING (item_string)->data[0] == '@') 544 if (!NILP (map) && SREF (item_string, 0) == '@')
545 { 545 {
546 if (!NILP (enabled)) 546 if (!NILP (enabled))
547 /* An enabled separate pane. Remember this to handle it later. */ 547 /* An enabled separate pane. Remember this to handle it later. */
@@ -1223,7 +1223,7 @@ single_submenu (item_key, item_name, maps)
1223 } 1223 }
1224#endif 1224#endif
1225 pane_string = (NILP (pane_name) 1225 pane_string = (NILP (pane_name)
1226 ? "" : (char *) XSTRING (pane_name)->data); 1226 ? "" : (char *) SDATA (pane_name));
1227 /* If there is just one top-level pane, put all its items directly 1227 /* If there is just one top-level pane, put all its items directly
1228 under the top-level menu. */ 1228 under the top-level menu. */
1229 if (menu_items_n_panes == 1) 1229 if (menu_items_n_panes == 1)
@@ -1287,9 +1287,9 @@ single_submenu (item_key, item_name, maps)
1287 else 1287 else
1288 save_wv->contents = wv; 1288 save_wv->contents = wv;
1289 1289
1290 wv->name = (char *) XSTRING (item_name)->data; 1290 wv->name = (char *) SDATA (item_name);
1291 if (!NILP (descrip)) 1291 if (!NILP (descrip))
1292 wv->key = (char *) XSTRING (descrip)->data; 1292 wv->key = (char *) SDATA (descrip);
1293 wv->value = 0; 1293 wv->value = 0;
1294 /* The EMACS_INT cast avoids a warning. There's no problem 1294 /* The EMACS_INT cast avoids a warning. There's no problem
1295 as long as pointers have enough bits to hold small integers. */ 1295 as long as pointers have enough bits to hold small integers. */
@@ -1470,7 +1470,7 @@ set_frame_menubar (f, first_time, deep_p)
1470 string = XVECTOR (items)->contents[i + 1]; 1470 string = XVECTOR (items)->contents[i + 1];
1471 if (NILP (string)) 1471 if (NILP (string))
1472 break; 1472 break;
1473 wv->name = (char *) XSTRING (string)->data; 1473 wv->name = (char *) SDATA (string);
1474 wv = wv->next; 1474 wv = wv->next;
1475 } 1475 }
1476 1476
@@ -1493,7 +1493,7 @@ set_frame_menubar (f, first_time, deep_p)
1493 break; 1493 break;
1494 1494
1495 wv = xmalloc_widget_value (); 1495 wv = xmalloc_widget_value ();
1496 wv->name = (char *) XSTRING (string)->data; 1496 wv->name = (char *) SDATA (string);
1497 wv->value = 0; 1497 wv->value = 0;
1498 wv->enabled = 1; 1498 wv->enabled = 1;
1499 wv->button_type = BUTTON_TYPE_NONE; 1499 wv->button_type = BUTTON_TYPE_NONE;
@@ -1676,7 +1676,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1676 } 1676 }
1677#endif 1677#endif
1678 pane_string = (NILP (pane_name) 1678 pane_string = (NILP (pane_name)
1679 ? "" : (char *) XSTRING (pane_name)->data); 1679 ? "" : (char *) SDATA (pane_name));
1680 /* If there is just one top-level pane, put all its items directly 1680 /* If there is just one top-level pane, put all its items directly
1681 under the top-level menu. */ 1681 under the top-level menu. */
1682 if (menu_items_n_panes == 1) 1682 if (menu_items_n_panes == 1)
@@ -1741,9 +1741,9 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1741 prev_wv->next = wv; 1741 prev_wv->next = wv;
1742 else 1742 else
1743 save_wv->contents = wv; 1743 save_wv->contents = wv;
1744 wv->name = (char *) XSTRING (item_name)->data; 1744 wv->name = (char *) SDATA (item_name);
1745 if (!NILP (descrip)) 1745 if (!NILP (descrip))
1746 wv->key = (char *) XSTRING (descrip)->data; 1746 wv->key = (char *) SDATA (descrip);
1747 wv->value = 0; 1747 wv->value = 0;
1748 /* Use the contents index as call_data, since we are 1748 /* Use the contents index as call_data, since we are
1749 restricted to 16-bits. */ 1749 restricted to 16-bits. */
@@ -1787,7 +1787,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1787 if (STRING_MULTIBYTE (title)) 1787 if (STRING_MULTIBYTE (title))
1788 title = ENCODE_SYSTEM (title); 1788 title = ENCODE_SYSTEM (title);
1789#endif 1789#endif
1790 wv_title->name = (char *) XSTRING (title)->data; 1790 wv_title->name = (char *) SDATA (title);
1791 wv_title->enabled = TRUE; 1791 wv_title->enabled = TRUE;
1792 wv_title->title = TRUE; 1792 wv_title->title = TRUE;
1793 wv_title->button_type = BUTTON_TYPE_NONE; 1793 wv_title->button_type = BUTTON_TYPE_NONE;
@@ -2047,7 +2047,7 @@ mac_dialog_show (f, keymaps, title, error)
2047 pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME]; 2047 pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];
2048 prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX]; 2048 prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];
2049 pane_string = (NILP (pane_name) 2049 pane_string = (NILP (pane_name)
2050 ? "" : (char *) XSTRING (pane_name)->data); 2050 ? "" : (char *) SDATA (pane_name));
2051 prev_wv = xmalloc_widget_value (); 2051 prev_wv = xmalloc_widget_value ();
2052 prev_wv->value = pane_string; 2052 prev_wv->value = pane_string;
2053 if (keymaps && !NILP (prefix)) 2053 if (keymaps && !NILP (prefix))
@@ -2096,8 +2096,8 @@ mac_dialog_show (f, keymaps, title, error)
2096 prev_wv->next = wv; 2096 prev_wv->next = wv;
2097 wv->name = (char *) button_names[nb_buttons]; 2097 wv->name = (char *) button_names[nb_buttons];
2098 if (!NILP (descrip)) 2098 if (!NILP (descrip))
2099 wv->key = (char *) XSTRING (descrip)->data; 2099 wv->key = (char *) SDATA (descrip);
2100 wv->value = (char *) XSTRING (item_name)->data; 2100 wv->value = (char *) SDATA (item_name);
2101 wv->call_data = (void *) i; 2101 wv->call_data = (void *) i;
2102 /* menu item is identified by its index in menu_items table */ 2102 /* menu item is identified by its index in menu_items table */
2103 wv->enabled = !NILP (enable); 2103 wv->enabled = !NILP (enable);