Mercurial > emacs
changeset 101315:ace10a84526f
* nsmenu.m (NSMENUPROFILE): Change #if style.
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Wed, 21 Jan 2009 16:34:24 +0000 |
parents | b34b0237ca1a |
children | f4441bcb2612 |
files | src/ChangeLog src/nsmenu.m |
diffstat | 2 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Wed Jan 21 11:03:25 2009 +0000 +++ b/src/ChangeLog Wed Jan 21 16:34:24 2009 +0000 @@ -1,3 +1,8 @@ +2009-01-21 Adrian Robert <Adrian.B.Robert@gmail.com> + + * nsmenu.m (NSMENUPROFILE): Change #if style. + + 2009-01-19 Chong Yidong <cyd@stupidchicken.com> * xfaces.c (Finternal_set_lisp_face_attribute, Fx_list_fonts):
--- a/src/nsmenu.m Wed Jan 21 11:03:25 2009 +0000 +++ b/src/nsmenu.m Wed Jan 21 16:34:24 2009 +0000 @@ -36,9 +36,12 @@ #include "termhooks.h" #include "keyboard.h" -/* for profiling */ +#define NSMENUPROFILE 0 + +#if NSMENUPROFILE #include <sys/timeb.h> #include <sys/types.h> +#endif #define MenuStagger 10.0 @@ -114,7 +117,6 @@ 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 @@ widget_value *wv, *first_wv, *prev_wv = 0; int i; -#ifdef NSMENUPROFILE +#if NSMENUPROFILE struct timeb tb; long t; #endif @@ -163,7 +165,7 @@ [attMenu close]; } -#ifdef NSMENUPROFILE +#if NSMENUPROFILE ftime (&tb); t = -(1000*tb.time+tb.millitm); #endif @@ -329,7 +331,7 @@ { /* 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 @@ 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);