changeset 30571:aa1b8b4c369d

Use NULL at the end of the variable argument lists of XtVaSetValues and XtVaGetValues functions because 0 is not sufficient on systems where sizeof (int) < sizeof (void *).
author Gerd Moellmann <gerd@gnu.org>
date Thu, 03 Aug 2000 20:09:56 +0000
parents 2dba7ac68499
children f0463edb8518
files lwlib/lwlib-Xaw.c lwlib/lwlib-Xm.c lwlib/lwlib.c
diffstat 3 files changed, 29 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/lwlib-Xaw.c	Thu Aug 03 20:08:27 2000 +0000
+++ b/lwlib/lwlib-Xaw.c	Thu Aug 03 20:09:56 2000 +0000
@@ -73,7 +73,7 @@
 		     XtNy, &pos_y,
 		     XtNtopOfThumb, &widget_topOfThumb,
 		     XtNshown, &widget_shown,
-		     0);
+		     NULL);
 
       /*
        * First size and position the scrollbar widget.
@@ -88,7 +88,7 @@
 	  XtVaSetValues (widget,
 			 XtNlength, data->scrollbar_height,
 			 XtNthickness, width,
-			 0);
+			 NULL);
 	}
 
       /*
@@ -141,7 +141,7 @@
       Dimension bw = 0;
       Arg al[3];
 
-      XtVaGetValues (widget, XtNborderWidth, &bw, 0);
+      XtVaGetValues (widget, XtNborderWidth, &bw, NULL);
       if (bw == 0)
 	/* Don't let buttons end up with 0 borderwidth, that's ugly...
 	   Yeah, all this should really be done through app-defaults files
@@ -476,7 +476,7 @@
 
 #if 0
   user_data = NULL;
-  XtVaGetValues (widget, XtNuserData, &user_data, 0);
+  XtVaGetValues (widget, XtNuserData, &user_data, NULL);
 #else
   /* Damn!  Athena doesn't give us a way to hang our own data on the
      buttons, so we have to go find it...  I guess this assumes that
@@ -512,8 +512,8 @@
   Widget widget;
   if (! XtIsSubclass (shell, shellWidgetClass))
     abort ();
-  XtVaGetValues (shell, XtNnumChildren, &nkids, 0);
-  XtVaGetValues (shell, XtNchildren, &kids, 0);
+  XtVaGetValues (shell, XtNnumChildren, &nkids, NULL);
+  XtVaGetValues (shell, XtNchildren, &kids, NULL);
   if (!kids || !*kids)
     abort ();
   for (i = 0; i < nkids; i++)
@@ -607,7 +607,7 @@
   Dimension width;
   Widget scrollbar;
 
-  XtVaGetValues (instance->parent, XtNwidth, &width, 0);
+  XtVaGetValues (instance->parent, XtNwidth, &width, NULL);
   
   XtSetArg (av[ac], XtNshowGrip, 0); ac++;
   XtSetArg (av[ac], XtNresizeToPreferred, 1); ac++;
@@ -622,7 +622,7 @@
 
   /* We have to force the border width to be 0 otherwise the
      geometry manager likes to start looping for awhile... */
-  XtVaSetValues (scrollbar, XtNborderWidth, 0, 0);
+  XtVaSetValues (scrollbar, XtNborderWidth, 0, NULL);
 
   XtRemoveAllCallbacks (scrollbar, "jumpProc");
   XtRemoveAllCallbacks (scrollbar, "scrollProc");
--- a/lwlib/lwlib-Xm.c	Thu Aug 03 20:08:27 2000 +0000
+++ b/lwlib/lwlib-Xm.c	Thu Aug 03 20:09:56 2000 +0000
@@ -388,7 +388,7 @@
      Widget widget;
      widget_value* val;
 {
-  XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, 0);
+  XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, NULL);
   XtRemoveAllCallbacks (widget, XmNactivateCallback);
   XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance);
 }
@@ -416,7 +416,7 @@
   XtAddCallback (widget, XmNvalueChangedCallback,
 		 xm_generic_callback, instance);
   XtVaSetValues (widget, XmNset, val->selected,
-		 XmNalignment, XmALIGNMENT_BEGINNING, 0);
+		 XmNalignment, XmALIGNMENT_BEGINNING, NULL);
 }
 
 static void
@@ -444,11 +444,11 @@
       toggle = XtNameToWidget (widget, cur->value);
       if (toggle)
 	{
-	  XtVaSetValues (toggle, XmNsensitive, cur->enabled, 0);
+	  XtVaSetValues (toggle, XmNsensitive, cur->enabled, NULL);
 	  if (!val->value && cur->selected)
-	    XtVaSetValues (toggle, XmNset, cur->selected, 0);
+	    XtVaSetValues (toggle, XmNset, cur->selected, NULL);
 	  if (val->value && strcmp (val->value, cur->value))
-	    XtVaSetValues (toggle, XmNset, False, 0);
+	    XtVaSetValues (toggle, XmNset, False, NULL);
 	}
     }
 
@@ -457,7 +457,7 @@
     {
       toggle = XtNameToWidget (widget, val->value);
       if (toggle)
-	XtVaSetValues (toggle, XmNset, True, 0);
+	XtVaSetValues (toggle, XmNset, True, NULL);
     }
 }
 
@@ -619,13 +619,13 @@
      XmNmenuHelpWidget work, we need to set it before managing the
      children.. --gerd.  */
   if (button)
-    XtVaSetValues (widget, XmNmenuHelpWidget, button, 0);
+    XtVaSetValues (widget, XmNmenuHelpWidget, button, NULL);
 
   /* LessTif apparently doesn't recompute centered text when more
      widgets are added.  So, do it after all widgets have been
      created.  */
   if (title)
-    XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, 0);
+    XtVaSetValues (title, XmNalignment, XmALIGNMENT_CENTER, NULL);
 
   if (num_children)
     XtManageChildren (children, num_children);
@@ -655,7 +655,7 @@
   XtVaSetValues (widget,
 		 XmNsensitive, val->enabled,
 		 XmNuserData, val->call_data,
-		 0);
+		 NULL);
 
   /* update the menu button as a label. */
   if (val->this_one_change >= VISIBLE_CHANGE)
@@ -858,7 +858,7 @@
   XtVaSetValues (widget,
 		 XmNsensitive, val->enabled,
 		 XmNuserData, val->call_data,
-		 0);
+		 NULL);
   
   /* Common to all label like widgets */
   if (XtIsSubclass (widget, xmLabelWidgetClass))
@@ -928,7 +928,7 @@
   
   if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass)
     {
-      XtVaGetValues (widget, XmNset, &val->selected, 0);
+      XtVaGetValues (widget, XmNset, &val->selected, NULL);
       val->edited = True;
     }
   else if (class == xmTextWidgetClass)
@@ -963,7 +963,7 @@
 	      int set = False;
 	      Widget toggle = radio->composite.children [i];
 	      
-	      XtVaGetValues (toggle, XmNset, &set, 0);
+	      XtVaGetValues (toggle, XmNset, &set, NULL);
 	      if (set)
 		{
 		  if (val->value)
@@ -1343,9 +1343,9 @@
   Position x;
   Position y;
 
-  XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, 0);
+  XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, NULL);
   XtVaGetValues (parent, XtNwidth, &parent_width, XtNheight, &parent_height,
-		 0);
+		 NULL);
 
   x = (((Position)parent_width) - ((Position)child_width)) / 2;
   y = (((Position)parent_height) - ((Position)child_height)) / 2;
@@ -1362,7 +1362,7 @@
   if (y < 0)
     y = 0;
 
-  XtVaSetValues (widget, XtNx, x, XtNy, y, 0);
+  XtVaSetValues (widget, XtNx, x, XtNy, y, NULL);
 }
 
 static Widget
@@ -1393,7 +1393,7 @@
       /* shrink the separator label back to their original size */
       separator = XtNameToWidget (widget, "*separator_button");
       if (separator)
-	XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, 0);
+	XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, NULL);
 
       /* Center the dialog in its parent */
       recenter_widget (widget);
@@ -1739,7 +1739,7 @@
       else if (event->xbutton.state & Button3Mask) trans = "<Btn3Down>";
       else if (event->xbutton.state & Button2Mask) trans = "<Btn2Down>";
       else if (event->xbutton.state & Button1Mask) trans = "<Btn1Down>";
-      if (trans) XtVaSetValues (widget, XmNmenuPost, trans, 0);
+      if (trans) XtVaSetValues (widget, XmNmenuPost, trans, NULL);
       XmMenuPosition (widget, (XButtonPressedEvent *) event);
     }
   XtManageChild (widget);
@@ -1751,8 +1751,8 @@
 {
   short width;
   short height;
-  XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, 0);
-  XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, 0);
+  XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, NULL);
+  XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, NULL);
 }
 
 void
--- a/lwlib/lwlib.c	Thu Aug 03 20:08:27 2000 +0000
+++ b/lwlib/lwlib.c	Thu Aug 03 20:09:56 2000 +0000
@@ -1383,11 +1383,11 @@
   XtVaGetValues (widget_to_invert,
 		 XtNforeground, &foreground,
 		 XtNbackground, &background,
-		 0);
+		 NULL);
   XtVaSetValues (widget_to_invert,
 		 XtNforeground, background,
 		 XtNbackground, foreground,
-		 0);
+		 NULL);
 }
 
 void