From xemacs-m  Fri Jun 20 18:26:18 1997
Received: from iria.mines.u-nancy.fr (galibert@iria.mines.u-nancy.fr [193.49.140.100])
	by xemacs.org (8.8.5/8.8.5) with SMTP id SAA15077
	for <xemacs-beta@xemacs.org>; Fri, 20 Jun 1997 18:26:01 -0500 (CDT)
Received: (from galibert@localhost) by iria.mines.u-nancy.fr (950413.SGI.8.6.12/950213.SGI.AUTOCF) id BAA02737; Sat, 21 Jun 1997 01:24:25 +0200
Message-ID: <19970621012424.18989@iria.mines.u-nancy.fr>
Date: Sat, 21 Jun 1997 01:24:24 +0200
From: Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr>
To: Xemacs-beta ML <xemacs-beta@xemacs.org>
Subject: Yet more 64bits lossage
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="HcAYCG3uE/tztfnV"
X-Mailer: Mutt 0.74


--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii

If you end the parameter list of a XtVa* call by 0 instead
of null, you'll crash in 64bits mode on Irix.

  OG.

PS: It eventually works ! Joy joy joy :-)

--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=d2

--- lwlib/lwlib-Xaw.c.orig	Sat Jun 21 00:58:30 1997
+++ lwlib/lwlib-Xaw.c	Sat Jun 21 01:00:42 1997
@@ -75,7 +75,7 @@
 		     XtNy, data->scrollbar_y,
 		     XtNwidth, data->scrollbar_width,
 		     XtNheight, data->scrollbar_height,
-		     0);
+		     NULL);
 
       /*
        * Now the size the scrollbar's slider.
@@ -84,7 +84,7 @@
       XtVaGetValues (widget,
 		     XtNtopOfThumb, &widget_topOfThumb,
 		     XtNshown, &widget_shown,
-		     0);
+		     NULL);
 
       new_shown = (double) data->slider_size /
 	(double) (data->maximum - data->minimum);
@@ -123,12 +123,12 @@
 #ifdef DIALOGS_ATHENA
   else if (XtIsSubclass (widget, dialogWidgetClass))
       {
-	XtVaSetValues (widget, XtNlabel, val->contents->value, 0);
+	XtVaSetValues (widget, XtNlabel, val->contents->value, NULL);
       }
   else if (XtIsSubclass (widget, commandWidgetClass))
     {
       Dimension bw = 0;
-      XtVaGetValues (widget, XtNborderWidth, &bw, 0);
+      XtVaGetValues (widget, XtNborderWidth, &bw, NULL);
 
 #ifndef LWLIB_DIALOGS_ATHENA3D
       if (bw == 0)
@@ -138,7 +138,7 @@
 	   that I don't feel like opening right now.  Making Athena widgets
 	   not look like shit is just entirely too much work.
 	 */
-	XtVaSetValues (widget, XtNborderWidth, 1, 0);
+	XtVaSetValues (widget, XtNborderWidth, 1, NULL);
 #endif
 
       XtVaSetValues (widget,
@@ -146,7 +146,7 @@
 		     XtNsensitive, val->enabled,
 		     /* Force centered button text.  Se above. */
 		     XtNjustify, XtJustifyCenter,
-		     0);
+		     NULL);
 
       XtRemoveAllCallbacks (widget, XtNcallback);
       XtAddCallback (widget, XtNcallback, xaw_generic_callback, instance);
@@ -448,7 +448,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
@@ -481,7 +481,7 @@
   Widget widget;
   if (! XtIsSubclass (shell, shellWidgetClass))
     abort ();
-  XtVaGetValues (shell, XtNchildren, &kids, 0);
+  XtVaGetValues (shell, XtNchildren, &kids, NULL);
   if (!kids || !*kids)
     abort ();
   widget = kids [0];
--- lwlib/lwlib-Xlw.c.orig	Sat Jun 21 00:58:42 1997
+++ lwlib/lwlib-Xlw.c	Sat Jun 21 01:01:26 1997
@@ -110,7 +110,7 @@
     XtVaCreateWidget (instance->info->name, xlwMenuWidgetClass,
 		      instance->parent,
 		      XtNmenu, instance->info->val,
-		      0);
+		      NULL);
   XtAddCallback (widget, XtNopen,   pre_hook,  (XtPointer)instance);
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
   return widget;
@@ -128,7 +128,7 @@
 			     popup_shell,
 			     XtNmenu, instance->info->val,
 			     XtNhorizontal, False,
-			     0);
+			     NULL);
 
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
 
@@ -269,13 +269,13 @@
 		     XtNy, data->scrollbar_y,
 		     XtNwidth, data->scrollbar_width,
 		     XtNheight, data->scrollbar_height,
-		     0);
+		     NULL);
 
       /* Now size the scrollbar's slider. */
       XtVaGetValues (widget,
 		     XmNsliderSize, &widget_sliderSize,
 		     XmNvalue,      &widget_val,
-		     0);
+		     NULL);
 
       percent = (double) data->slider_size /
 	(double) (data->maximum - data->minimum);
@@ -357,7 +357,7 @@
 	mw = (XlwMenuWidget)((CompositeWidget)widget)->composite.children [0];
       else
 	mw = (XlwMenuWidget)widget;
-      XtVaSetValues (widget, XtNmenu, val, 0);
+      XtVaSetValues (widget, XtNmenu, val, NULL);
     }
 #endif
 #ifdef SCROLLBARS_LUCID
--- lwlib/lwlib-Xm.c.orig	Sat Jun 21 00:58:48 1997
+++ lwlib/lwlib-Xm.c	Sat Jun 21 01:03:37 1997
@@ -335,7 +335,7 @@
 xm_update_pushbutton (widget_instance* instance, 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);
 }
@@ -383,7 +383,7 @@
                 xm_internal_update_other_instances, instance);
 #endif 
   XtVaSetValues (widget, XmNset, val->selected,
-		 XmNalignment, XmALIGNMENT_BEGINNING, 0);
+		 XmNalignment, XmALIGNMENT_BEGINNING, NULL);
 }
 
 static void
@@ -408,11 +408,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);
 	}
     }
 
@@ -421,7 +421,7 @@
     {
       toggle = XtNameToWidget (widget, val->value);
       if (toggle)
-	XtVaSetValues (toggle, XmNset, True, 0);
+	XtVaSetValues (toggle, XmNset, True, NULL);
     }
 }
 
@@ -568,7 +568,7 @@
   XtVaSetValues (widget,
 		 XmNsensitive, val->enabled,
 		 XmNuserData, val->call_data,
-		 0);
+		 NULL);
 
   /* update the menu button as a label. */
   if (val->change >= VISIBLE_CHANGE)
@@ -722,7 +722,7 @@
 		     XtNy, data->scrollbar_y,
 		     XtNwidth, data->scrollbar_width,
 		     XtNheight, data->scrollbar_height,
-		     0);
+		     NULL);
 
       /*
        * Now the size the scrollbar's slider.
@@ -731,7 +731,7 @@
       XtVaGetValues (widget,
 		     XmNsliderSize, &widget_sliderSize,
 		     XmNvalue, &widget_val,
-		     0);
+		     NULL);
 
       percent = (double) data->slider_size /
 	(double) (data->maximum - data->minimum);
@@ -790,7 +790,7 @@
   XtVaSetValues (widget,
 		 XmNsensitive, val->enabled,
 		 XmNuserData,  val->call_data,
-		 0);
+		 NULL);
 
 #if defined (DIALOGS_MOTIF) || defined (MENUBARS_MOTIF)
   /* Common to all label like widgets */
@@ -869,7 +869,7 @@
   
   if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass)
     {
-      XtVaGetValues (widget, XmNset, &val->selected, 0);
+      XtVaGetValues (widget, XmNset, &val->selected, NULL);
       val->edited = True;
     }
 #ifdef DIALOGS_MOTIF
@@ -903,7 +903,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)
@@ -1348,9 +1348,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;
@@ -1367,7 +1367,7 @@
   if (y < 0)
     y = 0;
 
-  XtVaSetValues (widget, XtNx, x, XtNy, y, 0);
+  XtVaSetValues (widget, XtNx, x, XtNy, y, NULL);
 }
 
 static Widget
@@ -1397,7 +1397,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);
@@ -1749,7 +1749,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);
@@ -1764,8 +1764,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);
 }
 
 #endif
@@ -1874,8 +1874,8 @@
       || XtClass (widget) == xmToggleButtonGadgetClass)
     {
       Boolean check;
-      XtVaGetValues (widget, XmNset, &check, 0);
-      XtVaSetValues (widget, XmNset, !check, 0);
+      XtVaGetValues (widget, XmNset, &check, NULL);
+      XtVaSetValues (widget, XmNset, !check, NULL);
     }
 #endif 
   lw_internal_update_other_instances (widget, closure, call_data);
--- lwlib/lwlib.c.orig	Sat Jun 21 00:58:54 1997
+++ lwlib/lwlib.c	Sat Jun 21 01:04:02 1997
@@ -1257,11 +1257,11 @@
   XtVaGetValues (widget_to_invert,
 		 XtNforeground, &foreground,
 		 XtNbackground, &background,
-		 0);
+		 NULL);
   XtVaSetValues (widget_to_invert,
 		 XtNforeground, background,
 		 XtNbackground, foreground,
-		 0);
+		 NULL);
 }
 
 void
--- src/frame-x.c.orig	Sun Mar  9 00:27:48 1997
+++ src/frame-x.c	Sat Jun 21 00:53:59 1997
@@ -201,7 +201,7 @@
   /* Because of questionable logic in Shell.c, this sequence can't work:
 
        w = XtCreatePopupShell (...);
-       XtVaSetValues (w, XtNiconic, True, 0);
+       XtVaSetValues (w, XtNiconic, True, NULL);
        XtRealizeWidget (w);
 
      The iconic resource is only consulted at initialization time (when
@@ -216,7 +216,7 @@
      realization.  This is true of MIT X11R5 patch level 25, at least.
      (Apparently some other versions of Xt don't have this bug?)
    */
-  XtVaSetValues (shell, XtNiconic, iconic_p, 0);
+  XtVaSetValues (shell, XtNiconic, iconic_p, NULL);
   EmacsShellSmashIconicHint (shell, iconic_p);
 }
 
@@ -231,7 +231,7 @@
   XtVaSetValues (wmshell,
 		 XtNwidthInc, cw, 
 		 XtNheightInc, ch,
-		 0);
+		 NULL);
 }
 
 void
@@ -247,7 +247,7 @@
   XtVaSetValues (wmshell,
 		 XtNwidthCells, width,
 		 XtNheightCells, height,
-		 0);
+		 NULL);
 }
 
 /* If the WM_PROTOCOLS property does not already contain WM_TAKE_FOCUS
@@ -718,7 +718,7 @@
     }
   else
     temp = NULL;
-  XtVaSetValues (FRAME_X_SHELL_WIDGET (f), XtNgeometry, temp, 0);
+  XtVaSetValues (FRAME_X_SHELL_WIDGET (f), XtNgeometry, temp, NULL);
 }
 
 /* Report to X that a frame property of frame S is being set or changed.
@@ -758,13 +758,13 @@
 
 	      GET_STRING_CTEXT_DATA_ALLOCA (val, extval, extvallen);
 	      XtVaSetValues (w, XtVaTypedArg, extprop,
-			     XtRString, extval, extvallen + 1, 0);
+			     XtRString, extval, extvallen + 1, NULL);
 	    }
 	  else
 	    XtVaSetValues (w, XtVaTypedArg,
 			   extprop, XtRInt, XINT (val),
 			   sizeof (int),
-			   0);
+			   NULL);
 	}
       else if (SYMBOLP (prop))
 	{
@@ -838,20 +838,20 @@
 	    {
 	      CHECK_INT (val);
 	      XtVaSetValues (w, (char *) XSTRING_DATA (str),
-			     XINT (val), 0);
+			     XINT (val), NULL);
 	    }
 	  else if (EQ (val, Qt))
 	    XtVaSetValues (w,
 			   /* XtN... */
 			   (char *) XSTRING_DATA (str),
 			   True,
-			   0);
+			   NULL);
 	  else if (EQ (val, Qnil))
 	    XtVaSetValues (w,
 			   /* XtN... */
 			   (char *) XSTRING_DATA (str),
 			   False,
-			   0);
+			   NULL);
 	  else
 	    {
 	      CHECK_STRING (val);
@@ -861,7 +861,7 @@
 			     XtRString,
 			     XSTRING_DATA (val),
 			     XSTRING_LENGTH (val) + 1,
-			     0);
+			     NULL);
 	    }
 
 #ifdef HAVE_SCROLLBARS
@@ -1354,14 +1354,14 @@
 
   if (!FRAME_X_TOP_LEVEL_FRAME_P (f))
     {
-      XtVaGetValues (ew, XtNgeometry, &ew_geom, 0);
+      XtVaGetValues (ew, XtNgeometry, &ew_geom, NULL);
       if (ew_geom)
 	frame_flags = XParseGeometry (ew_geom, &frame_x, &frame_y,
 				       &frame_w, &frame_h);
       if (! (frame_flags & (WidthValue | HeightValue)))
 	{
 	  XtVaGetValues (ew, XtNwidth, &frame_w,
-			 XtNheight, &frame_h, 0);
+			 XtNheight, &frame_h, NULL);
 	  if (!frame_w && !frame_h)
 	    {
 	      frame_w = 64;
@@ -1374,12 +1374,12 @@
       if (frame_flags & (XValue | YValue))
 	{
 	  XtVaGetValues (ew, XtNwidth, &frame_w,
-			 XtNheight, &frame_h, 0);
+			 XtNheight, &frame_h, NULL);
 	  if (frame_flags & XNegative)
 	    frame_x += frame_w;
 	  if (frame_flags & YNegative)
 	    frame_y += frame_h;
-	  XtVaSetValues (ew, XtNx, frame_x, XtNy, frame_y, 0);
+	  XtVaSetValues (ew, XtNx, frame_x, XtNy, frame_y, NULL);
 	}
       return;
     }
@@ -1394,31 +1394,31 @@
      treat that as the geometry of the frame.  (Is this bogus?
      I'm not sure.) */
 
-  XtVaGetValues (ew, XtNgeometry, &ew_geom, 0);
+  XtVaGetValues (ew, XtNgeometry, &ew_geom, NULL);
   if (!ew_geom)
     {
-      XtVaGetValues (wmshell, XtNgeometry, &geom, 0);
+      XtVaGetValues (wmshell, XtNgeometry, &geom, NULL);
       if (geom)
 	{
 	  ew_geom = geom;
-	  XtVaSetValues (ew, XtNgeometry, ew_geom, 0);
+	  XtVaSetValues (ew, XtNgeometry, ew_geom, NULL);
 	}
     }
 
   /* If the Shell is iconic, then the EmacsFrame is iconic.  (Is
      this bogus? I'm not sure.) */
-  XtVaGetValues (ew, XtNiconic, &ew_iconic_p, 0);
+  XtVaGetValues (ew, XtNiconic, &ew_iconic_p, NULL);
   if (!ew_iconic_p)
     {
-      XtVaGetValues (wmshell, XtNiconic, &iconic_p, 0);
+      XtVaGetValues (wmshell, XtNiconic, &iconic_p, NULL);
       if (iconic_p)
 	{
 	  ew_iconic_p = iconic_p;
-	  XtVaSetValues (ew, XtNiconic, iconic_p, 0);
+	  XtVaSetValues (ew, XtNiconic, iconic_p, NULL);
 	}
     }
   
-  XtVaGetValues (app_shell, XtNgeometry, &geom, 0);
+  XtVaGetValues (app_shell, XtNgeometry, &geom, NULL);
   if (geom)
     app_flags = XParseGeometry (geom, &app_x, &app_y, &app_w, &app_h);
 
@@ -1467,11 +1467,11 @@
       /* If the AppShell is iconic, then the EmacsFrame is iconic. */
       if (!ew_iconic_p)
 	{
-	  XtVaGetValues (app_shell, XtNiconic, &iconic_p, 0);
+	  XtVaGetValues (app_shell, XtNiconic, &iconic_p, NULL);
 	  if (iconic_p)
 	    {
 	      ew_iconic_p = iconic_p;
-	      XtVaSetValues (ew, XtNiconic, iconic_p, 0);
+	      XtVaSetValues (ew, XtNiconic, iconic_p, NULL);
 	    }
 	}
     }
@@ -1561,7 +1561,7 @@
     /* The scrollbar positioning is completely handled by redisplay.  We
        just need to know which sides they are supposed to go on. */
     unsigned char scrollbar_placement;
-    XtVaGetValues (text, XtNscrollBarPlacement, &scrollbar_placement, 0);
+    XtVaGetValues (text, XtNscrollBarPlacement, &scrollbar_placement, NULL);
     f->scrollbar_on_left = (scrollbar_placement == XtTOP_LEFT ||
                             scrollbar_placement == XtBOTTOM_LEFT);
     f->scrollbar_on_top  = (scrollbar_placement == XtTOP_LEFT ||
@@ -1725,7 +1725,7 @@
   /* Create the manager widget */
   container = XtVaCreateWidget ("container",
 				emacsManagerWidgetClass,
-				shell, 0);
+				shell, NULL);
   FRAME_X_CONTAINER_WIDGET (f) = container;
   XtAddCallback (container, XtNresizeCallback, x_layout_widgets,
 		 (XtPointer) f);
@@ -2068,7 +2068,7 @@
 		 XtNwidth,       &shell_w,
 		 XtNheight,      &shell_h,
 		 XtNborderWidth, &shell_bord,
-		 0);
+		 NULL);
 
   win_gravity =
     xoff >= 0 && yoff >= 0 ? NorthWestGravity :
@@ -2088,7 +2088,7 @@
 		 XtNwinGravity, win_gravity,
 		 XtNx, xoff,
 		 XtNy, yoff,
-		 0);
+		 NULL);
   
   /* Sometimes you will find that
 
--- src/EmacsFrame.c.orig	Sun Mar 16 04:06:16 1997
+++ src/EmacsFrame.c	Sat Jun 21 00:45:53 1997
@@ -604,5 +604,5 @@
   XtVaSetValues ((Widget) ew,
 		 XtNwidth, (Dimension) pixel_width,
 		 XtNheight, (Dimension) pixel_height,
-		 0);
+		 NULL);
 }
--- src/menubar-x.c.orig	Sun Apr 27 21:31:00 1997
+++ src/menubar-x.c	Sat Jun 21 00:55:41 1997
@@ -796,7 +796,7 @@
     XtVaGetValues (container,
 		   XtNwidth, &req.width,
 		   XtNheight, &req.height,
-		   0);
+		   NULL);
     XtQueryGeometry (container, &req, &repl);
     EmacsManagerChangeSize (container, repl.width,
 			    repl.height);
--- src/redisplay-x.c.orig	Fri Mar 28 03:29:57 1997
+++ src/redisplay-x.c	Sat Jun 21 00:56:14 1997
@@ -2215,7 +2215,7 @@
   Widget shell = FRAME_X_SHELL_WIDGET (f);
   Dimension width, height;
 
-  XtVaGetValues (shell, XtNwidth, &width, XtNheight, &height, 0);
+  XtVaGetValues (shell, XtNwidth, &width, XtNheight, &height, NULL);
   XSETFRAME (frame, f);
 
   tmp_pixel = FACE_FOREGROUND (Vdefault_face, frame);
--- src/scrollbar-x.c.orig	Thu Feb 27 07:08:48 1997
+++ src/scrollbar-x.c	Sat Jun 21 00:57:07 1997
@@ -189,7 +189,7 @@
   Boolean use_backing_store;
 
   XtVaGetValues (FRAME_X_TEXT_WIDGET (f),
-		 XtNuseBackingStore, &use_backing_store, 0);
+		 XtNuseBackingStore, &use_backing_store, NULL);
 
   if (use_backing_store && sb_widget)
     {
@@ -309,7 +309,7 @@
      done. */
   if (!in_resource_setting)
     XtVaSetValues (FRAME_X_TEXT_WIDGET (f), XtNscrollBarWidth,
-		   XINT (newval), 0);
+		   XINT (newval), NULL);
 
   if (XtIsRealized (FRAME_X_CONTAINER_WIDGET (f)))
     {
@@ -351,7 +351,7 @@
        (which might specify a user preference). */
   if (!in_resource_setting)
     XtVaSetValues (FRAME_X_TEXT_WIDGET (f), XtNscrollBarHeight,
-		   XINT (newval), 0);
+		   XINT (newval), NULL);
 
   if (XtIsRealized (FRAME_X_CONTAINER_WIDGET (f)))
     {

--HcAYCG3uE/tztfnV--

