+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):
#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
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)
{
widget_value *wv, *first_wv, *prev_wv = 0;
int i;
-#ifdef NSMENUPROFILE
+#if NSMENUPROFILE
struct timeb tb;
long t;
#endif
[attMenu close];
}
-#ifdef NSMENUPROFILE
+#if NSMENUPROFILE
ftime (&tb);
t = -(1000*tb.time+tb.millitm);
#endif
{
/* 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);
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);