#define MENU_ITEM_ID_BITS(x) (((x) & 0x7FFF) | 0x8000)
static HMENU top_level_menu;
-#define MAX_MENUITEM_LENGTH 128
-
/*
* This returns Windows-style menu item string:
* "Left Flush\tRight Flush"
/* Escape '&' as '&&' */
ptr = buf;
- while ((ptr=memchr (ptr, '&', ll-(ptr-buf))) != NULL)
+ while ((ptr = (char*) memchr (ptr, '&', ll - (ptr - buf))) != NULL)
{
- if (ll+2 >= MAX_MENUITEM_LENGTH)
+ if (ll + 2 >= MAX_MENUITEM_LENGTH)
signal_simple_error ("Menu item produces too long displayable string",
XGUI_ITEM (gui_item)->name);
- memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
+ memmove (ptr + 1, ptr, (ll - (ptr - buf)) + 1);
ll++;
- ptr+=2;
+ ptr += 2;
}
/* Replace XEmacs accelerator '%_' with Windows accelerator '&' */
ptr = buf;
- while ((ptr=memchr (ptr, '%', ll-(ptr-buf))) != NULL)
+ while ((ptr = (char*) memchr (ptr, '%', ll - (ptr - buf))) != NULL)
{
- if (*(ptr+1) == '_')
+ if (*(ptr + 1) == '_')
{
*ptr = '&';
- memmove (ptr+1, ptr+2, ll-(ptr-buf+2));
+ memmove (ptr + 1, ptr + 2, ll - (ptr - buf + 2));
ll--;
}
ptr++;
/* Submenu */
HMENU submenu;
Lisp_Object gui_item = allocate_gui_item ();
- struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
struct gcpro gcpro1;
GCPRO1 (gui_item);
/* An ordinary item */
Lisp_Object style, id;
Lisp_Object gui_item = gui_parse_item_keywords (item);
- struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
struct gcpro gcpro1;
GCPRO1 (gui_item);
struct gcpro gcpro1;
unsigned long checksum;
Lisp_Object gui_item = allocate_gui_item ();
- struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
GCPRO1 (gui_item);
/* We are sometimes called with the menubar unchanged, and with changed
mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event)
{
struct frame *f = selected_frame ();
- struct Lisp_Event *eev = NULL;
+ Lisp_Event *eev = NULL;
HMENU menu;
POINT pt;
int ok;