XEmacs 21.2.30 "Hygeia".
[chise/xemacs-chise.git.1] / src / menubar-msw.c
index e3db02f..a388c30 100644 (file)
@@ -116,8 +116,6 @@ static Lisp_Object current_hash_table;
 #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"
@@ -138,24 +136,24 @@ displayable_menu_item (Lisp_Object gui_item, int bar_p)
 
   /* 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++;
@@ -280,7 +278,7 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
       /* 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);
@@ -330,7 +328,7 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
       /* 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);
@@ -395,7 +393,7 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc,
   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
@@ -738,7 +736,7 @@ static void
 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;