X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/b9345dfd4b5479ec624f1870723a8ea5c9c719e7..6bee44d6400c47201de3abfef17b63ce9acfb8c9:/src/menu.c diff --git a/src/menu.c b/src/menu.c index e4338f349f..df86208c7e 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1,6 +1,6 @@ /* Platform-independent code for terminal communications. -Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2011 +Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -67,6 +67,9 @@ Lisp_Object menu_items; /* If non-nil, means that the global vars defined here are already in use. Used to detect cases where we try to re-enter this non-reentrant code. */ +#if ! (defined USE_GTK || defined USE_MOTIF) +static +#endif Lisp_Object menu_items_inuse; /* Number of slots currently allocated in menu_items. */ @@ -178,7 +181,7 @@ static void grow_menu_items (void) { if ((INT_MAX - MENU_ITEMS_PANE_LENGTH) / 2 < menu_items_allocated) - memory_full (); + memory_full (SIZE_MAX); menu_items_allocated *= 2; menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); } @@ -361,7 +364,7 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk return; } -#if defined(HAVE_X_WINDOWS) || defined(MSDOS) +#if defined (HAVE_X_WINDOWS) || defined (MSDOS) #ifndef HAVE_BOXES /* Simulate radio buttons and toggle boxes by putting a prefix in front of them. */ @@ -974,7 +977,7 @@ find_and_return_menu_selection (FRAME_PTR f, int keymaps, void *client_data) prefix = entry = Qnil; i = 0; subprefix_stack = - (Lisp_Object *)alloca(menu_items_used * sizeof (Lisp_Object)); + (Lisp_Object *)alloca (menu_items_used * sizeof (Lisp_Object)); while (i < menu_items_used) {