]> code.delx.au - gnu-emacs/blobdiff - src/w32menu.c
Merge from trunk.
[gnu-emacs] / src / w32menu.c
index 92447eb9faeceafdb507cff3da59bb6bfeb965aa..c31a8c1fd96d69ba56e0279eb1098bd2a08b1de2 100644 (file)
@@ -33,7 +33,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "blockinput.h"
 #include "buffer.h"
 #include "charset.h"
-#include "character.h"
 #include "coding.h"
 #include "menu.h"
 
@@ -84,14 +83,6 @@ MessageBoxW_Proc unicode_message_box = NULL;
 
 Lisp_Object Qdebug_on_next_call;
 
-extern Lisp_Object Qmenu_bar;
-
-extern Lisp_Object QCtoggle, QCradio;
-
-extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
-
-extern Lisp_Object Qmenu_bar_update_hook;
-
 void set_frame_menubar (FRAME_PTR, int, int);
 
 #ifdef HAVE_DIALOGS
@@ -154,7 +145,7 @@ otherwise it is "Question". */)
       FRAME_PTR new_f = SELECTED_FRAME ();
       Lisp_Object bar_window;
       enum scroll_bar_part part;
-      unsigned long time;
+      Time time;
       Lisp_Object x, y;
 
       (*mouse_position_hook) (&new_f, 1, &bar_window, &part, &x, &y, &time);
@@ -435,11 +426,10 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
 
       menu_items = f->menu_bar_vector;
       menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
-      submenu_start = (int *) alloca (XVECTOR (items)->size * sizeof (int *));
-      submenu_end = (int *) alloca (XVECTOR (items)->size * sizeof (int *));
-      submenu_n_panes = (int *) alloca (XVECTOR (items)->size * sizeof (int));
-      submenu_top_level_items
-       = (int *) alloca (XVECTOR (items)->size * sizeof (int *));
+      submenu_start = (int *) alloca (ASIZE (items) * sizeof (int));
+      submenu_end = (int *) alloca (ASIZE (items) * sizeof (int));
+      submenu_n_panes = (int *) alloca (ASIZE (items) * sizeof (int));
+      submenu_top_level_items = (int *) alloca (ASIZE (items) * sizeof (int));
       init_menu_items ();
       for (i = 0; i < ASIZE (items); i += 4)
        {
@@ -1328,7 +1318,6 @@ utf8to16 (unsigned char * src, int len, WCHAR * dest)
 {
   while (len > 0)
     {
-      int utf16;
       if (*src < 0x80)
        {
          *dest = (WCHAR) *src;
@@ -1554,8 +1543,6 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
 static int
 fill_in_menu (HMENU menu, widget_value *wv)
 {
-  int items_added = 0;
-
   for ( ; wv != NULL; wv = wv->next)
     {
       if (wv->contents)
@@ -1627,7 +1614,7 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags)
       else
        /* X version has a loop through frames here, which doesn't
           appear to do anything, unless it has some side effect.  */
-       show_help_echo (help, Qnil, Qnil, Qnil, 1);
+       show_help_echo (help, Qnil, Qnil, Qnil);
     }
 }