]> git.eshelyaron.com Git - emacs.git/commitdiff
*** empty log message ***
authorRichard M. Stallman <rms@gnu.org>
Sat, 19 Feb 1994 20:53:26 +0000 (20:53 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 19 Feb 1994 20:53:26 +0000 (20:53 +0000)
lwlib/Makefile.in
lwlib/lwlib-Xlw.c

index ac6b875273ab7375755e0aeb4fc6d5d6e82f5f50..5690838f52b0e3b782d45ecc326df656a0f8a174 100644 (file)
@@ -54,10 +54,10 @@ liblw.a: $(OBJS)
 #That's ok.  So don't stop the build.
 
 lwlib.o:  lwlib.c
-       $(CC) -c $(ALL_CFLAGS)  $(TOOLKIT_DEFINES) $(srcdir)/lwlib.c
+       $(CC) -c $(TOOLKIT_DEFINES) $(ALL_CFLAGS) $(srcdir)/lwlib.c
 
 xrdb-cpp.o:  xrdb-cpp.c
-       $(CC) -c $(ALL_CFLAGS) "-DCPP_PROGRAM=$(CPP)" $(srcdir)/xrdb-cpp.c
+       $(CC) -c "-DCPP_PROGRAM=$(CPP)" $(ALL_CFLAGS) $(srcdir)/xrdb-cpp.c
 
 lwlib-utils.o: lwlib-utils.h
 lwlib.o:       lwlib.h lwlib-int.h
index e07ee19c7bfcb302f68932f5267449ff9df7328b..4b48b231a4dbe066f3618085c81c0d5436d3e180 100644 (file)
@@ -78,19 +78,24 @@ xlw_create_menubar (instance)
 {
   Widget widget;
 
-  widget_value *tem = malloc_widget_value (); 
+  /* Don't use malloc_widget_value, because the freeing will be done by free.
+     (Also it wastes time calling memset).  */
+  widget_value *tem = (widget_value *) malloc (sizeof (widget_value));
 
   /* _XtCreate is freeing the object we passed,
      so make a copy that we free later.  */
   bcopy (instance->info->val, tem, sizeof (widget_value));
 
-  widget =
-    XtVaCreateWidget (instance->info->name, xlwMenuWidgetClass,
-                     instance->parent,
-                     XtNmenu, tem,
-                     0);
+  widget
+    XtVaCreateWidget (instance->info->name, xlwMenuWidgetClass,
+                       instance->parent,
+                       XtNmenu, tem,
+                       0);
 
+#if 0 /* XtVaCreateWidget frees this, at least in the X11R4
+        version that is running on mole.gnu.ai.mit.edu.  */
   free_widget_value (tem);
+#endif
 
   XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance);
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
@@ -101,26 +106,30 @@ static Widget
 xlw_create_popup_menu (instance)
      widget_instance* instance;
 {
-  Widget popup_shell =
-    XtCreatePopupShell (instance->info->name, overrideShellWidgetClass,
-                       instance->parent, NULL, 0);
+  Widget popup_shell
+    XtCreatePopupShell (instance->info->name, overrideShellWidgetClass,
+                         instance->parent, NULL, 0);
   
   Widget widget;
 
-  widget_value *tem = malloc_widget_value ();
+  /* Don't use malloc_widget_value, because the freeing will be done by free.
+     (Also it wastes time calling memset).  */
+  widget_value *tem = (widget_value *) malloc (sizeof (widget_value));
 
   /* _XtCreate is freeing the object we passed,
      so make a copy that we free later.  */
   bcopy (instance->info->val, tem, sizeof (widget_value));
 
-  widget = 
-    XtVaCreateManagedWidget ("popup", xlwMenuWidgetClass,
-                            popup_shell,
-                            XtNmenu, tem,
-                            XtNhorizontal, False,
-                            0);
+  widget
+    XtVaCreateManagedWidget ("popup", xlwMenuWidgetClass,
+                              popup_shell,
+                              XtNmenu, tem,
+                              XtNhorizontal, False,
+                              0);
 
+#if 0
   free_widget_value (tem);
+#endif
 
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
 
@@ -140,12 +149,12 @@ lw_lucid_widget_p (widget)
      Widget widget;
 {
   WidgetClass the_class = XtClass (widget);
+
   if (the_class == xlwMenuWidgetClass)
     return True;
   if (the_class == overrideShellWidgetClass)
-    return
-      XtClass (((CompositeWidget)widget)->composite.children [0])
-       == xlwMenuWidgetClass;
+    return (XtClass (((CompositeWidget)widget)->composite.children [0])
+           == xlwMenuWidgetClass);
   return False;
 }