aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32menu.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-05 19:47:28 +0400
committerDmitry Antipov2012-08-05 19:47:28 +0400
commit663e2b3f88f9be61399e06dfc0b76700f90c6ca6 (patch)
tree71e48dfc0079f80f2089b5bdebe991a200d594ed /src/w32menu.c
parent777fe95e05ab77e77e4ecee45382ec64d381c776 (diff)
downloademacs-663e2b3f88f9be61399e06dfc0b76700f90c6ca6.tar.gz
emacs-663e2b3f88f9be61399e06dfc0b76700f90c6ca6.zip
Generalize common compile-time constants.
* lisp.h (header_size, bool_header_size, word_size): Now here. (struct Lisp_Vector): Add comment. (struct Lisp_Bool_Vector): Move up to define handy constants. (VECSIZE, PSEUDOVECSIZE): Simplify. (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation. * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c: * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c: * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c: * xfont.c, xmenu.c: Use word_size where appropriate.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r--src/w32menu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/w32menu.c b/src/w32menu.c
index 67bd575258e..f6b7e62049a 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -276,7 +276,7 @@ menubar_selection_callback (FRAME_PTR f, void * client_data)
276 if (!f) 276 if (!f)
277 return; 277 return;
278 entry = Qnil; 278 entry = Qnil;
279 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object)); 279 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * word_size);
280 vector = FVAR (f, menu_bar_vector); 280 vector = FVAR (f, menu_bar_vector);
281 prefix = Qnil; 281 prefix = Qnil;
282 i = 0; 282 i = 0;
@@ -387,7 +387,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
387 int previous_menu_items_used = f->menu_bar_items_used; 387 int previous_menu_items_used = f->menu_bar_items_used;
388 Lisp_Object *previous_items 388 Lisp_Object *previous_items
389 = (Lisp_Object *) alloca (previous_menu_items_used 389 = (Lisp_Object *) alloca (previous_menu_items_used
390 * sizeof (Lisp_Object)); 390 * word_size);
391 391
392 /* If we are making a new widget, its contents are empty, 392 /* If we are making a new widget, its contents are empty,
393 do always reinitialize them. */ 393 do always reinitialize them. */
@@ -420,7 +420,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
420 /* Save the frame's previous menu bar contents data. */ 420 /* Save the frame's previous menu bar contents data. */
421 if (previous_menu_items_used) 421 if (previous_menu_items_used)
422 memcpy (previous_items, XVECTOR (FVAR (f, menu_bar_vector))->contents, 422 memcpy (previous_items, XVECTOR (FVAR (f, menu_bar_vector))->contents,
423 previous_menu_items_used * sizeof (Lisp_Object)); 423 previous_menu_items_used * word_size);
424 424
425 /* Fill in menu_items with the current menu bar contents. 425 /* Fill in menu_items with the current menu bar contents.
426 This can evaluate Lisp code. */ 426 This can evaluate Lisp code. */
@@ -665,7 +665,7 @@ w32_menu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
665 widget_value **submenu_stack 665 widget_value **submenu_stack
666 = (widget_value **) alloca (menu_items_used * sizeof (widget_value *)); 666 = (widget_value **) alloca (menu_items_used * sizeof (widget_value *));
667 Lisp_Object *subprefix_stack 667 Lisp_Object *subprefix_stack
668 = (Lisp_Object *) alloca (menu_items_used * sizeof (Lisp_Object)); 668 = (Lisp_Object *) alloca (menu_items_used * word_size);
669 int submenu_depth = 0; 669 int submenu_depth = 0;
670 int first_pane; 670 int first_pane;
671 671