Commit cbe0b5bf authored by Adrian Robert's avatar Adrian Robert
Browse files

* nsmenu.m (NSMENUPROFILE): Change #if style.

parent 24c7b460
2009-01-21 Adrian Robert <Adrian.B.Robert@gmail.com>
* nsmenu.m (NSMENUPROFILE): Change #if style.
2009-01-19 Chong Yidong <cyd@stupidchicken.com> 2009-01-19 Chong Yidong <cyd@stupidchicken.com>
   
* xfaces.c (Finternal_set_lisp_face_attribute, Fx_list_fonts): * xfaces.c (Finternal_set_lisp_face_attribute, Fx_list_fonts):
......
...@@ -36,9 +36,12 @@ ...@@ -36,9 +36,12 @@
#include "termhooks.h" #include "termhooks.h"
#include "keyboard.h" #include "keyboard.h"
/* for profiling */ #define NSMENUPROFILE 0
#if NSMENUPROFILE
#include <sys/timeb.h> #include <sys/timeb.h>
#include <sys/types.h> #include <sys/types.h>
#endif
#define MenuStagger 10.0 #define MenuStagger 10.0
...@@ -114,7 +117,6 @@ ...@@ -114,7 +117,6 @@
2) deep_p = 1, submenu = nil: Recompute all submenus. 2) deep_p = 1, submenu = nil: Recompute all submenus.
3) deep_p = 1, submenu = non-nil: Update contents of a single submenu. 3) deep_p = 1, submenu = non-nil: Update contents of a single submenu.
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
/*#define NSMENUPROFILE 1 */
void void
ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu) ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
{ {
...@@ -129,7 +131,7 @@ ...@@ -129,7 +131,7 @@
widget_value *wv, *first_wv, *prev_wv = 0; widget_value *wv, *first_wv, *prev_wv = 0;
int i; int i;
#ifdef NSMENUPROFILE #if NSMENUPROFILE
struct timeb tb; struct timeb tb;
long t; long t;
#endif #endif
...@@ -163,7 +165,7 @@ ...@@ -163,7 +165,7 @@
[attMenu close]; [attMenu close];
} }
#ifdef NSMENUPROFILE #if NSMENUPROFILE
ftime (&tb); ftime (&tb);
t = -(1000*tb.time+tb.millitm); t = -(1000*tb.time+tb.millitm);
#endif #endif
...@@ -329,7 +331,7 @@ ...@@ -329,7 +331,7 @@
{ {
/* No change.. */ /* No change.. */
#ifdef NSMENUPROFILE #if NSMENUPROFILE
ftime (&tb); ftime (&tb);
t += 1000*tb.time+tb.millitm; t += 1000*tb.time+tb.millitm;
fprintf (stderr, "NO CHANGE! CUTTING OUT after %ld msec.\n", t); fprintf (stderr, "NO CHANGE! CUTTING OUT after %ld msec.\n", t);
...@@ -480,7 +482,7 @@ ...@@ -480,7 +482,7 @@
free_menubar_widget_value_tree (first_wv); free_menubar_widget_value_tree (first_wv);
#ifdef NSMENUPROFILE #if NSMENUPROFILE
ftime (&tb); ftime (&tb);
t += 1000*tb.time+tb.millitm; t += 1000*tb.time+tb.millitm;
fprintf (stderr, "Menu update took %ld msec.\n", t); fprintf (stderr, "Menu update took %ld msec.\n", t);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment