From cbe0b5bfa9426db7f60af0ec3bb555eaa6ccd43c Mon Sep 17 00:00:00 2001 From: Adrian Robert Date: Wed, 21 Jan 2009 16:34:24 +0000 Subject: [PATCH] * nsmenu.m (NSMENUPROFILE): Change #if style. --- src/ChangeLog | 5 +++++ src/nsmenu.m | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d97cad250fd..b1d021a186a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-01-21 Adrian Robert + + * nsmenu.m (NSMENUPROFILE): Change #if style. + + 2009-01-19 Chong Yidong * xfaces.c (Finternal_set_lisp_face_attribute, Fx_list_fonts): diff --git a/src/nsmenu.m b/src/nsmenu.m index 3d190a9b253..6f9f3728dee 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -36,9 +36,12 @@ Carbon version by Yamamoto Mitsuharu. */ #include "termhooks.h" #include "keyboard.h" -/* for profiling */ +#define NSMENUPROFILE 0 + +#if NSMENUPROFILE #include #include +#endif #define MenuStagger 10.0 @@ -114,7 +117,6 @@ popup_activated () 2) deep_p = 1, submenu = nil: Recompute all submenus. 3) deep_p = 1, submenu = non-nil: Update contents of a single submenu. -------------------------------------------------------------------------- */ -/*#define NSMENUPROFILE 1 */ void ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) { @@ -129,7 +131,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) widget_value *wv, *first_wv, *prev_wv = 0; int i; -#ifdef NSMENUPROFILE +#if NSMENUPROFILE struct timeb tb; long t; #endif @@ -163,7 +165,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) [attMenu close]; } -#ifdef NSMENUPROFILE +#if NSMENUPROFILE ftime (&tb); t = -(1000*tb.time+tb.millitm); #endif @@ -329,7 +331,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) { /* No change.. */ -#ifdef NSMENUPROFILE +#if NSMENUPROFILE ftime (&tb); t += 1000*tb.time+tb.millitm; fprintf (stderr, "NO CHANGE! CUTTING OUT after %ld msec.\n", t); @@ -480,7 +482,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) free_menubar_widget_value_tree (first_wv); -#ifdef NSMENUPROFILE +#if NSMENUPROFILE ftime (&tb); t += 1000*tb.time+tb.millitm; fprintf (stderr, "Menu update took %ld msec.\n", t); -- 2.39.2