pkgsrc/x11/xpaste/patches/patch-aa
seb 04cb239af6 Fix varargs problems encountered with gcc 3.
While here fix my email address.
2003-09-29 09:20:12 +00:00

107 lines
2.2 KiB
Text

$NetBSD: patch-aa,v 1.1 2003/09/29 09:20:12 seb Exp $
--- Xju.c.orig 2003-09-29 08:30:33.000000000 +0000
+++ Xju.c
@@ -5,3 +5,3 @@
*/
-#include <varargs.h>
+#include <stdarg.h>
#include <X11/Intrinsic.h>
@@ -11,4 +11,3 @@ extern Widget root;
-void SetArgs(va_alist)
-va_dcl
+void SetArgs(Arg **arglist, ...)
{
@@ -23,9 +22,6 @@ va_dcl
unsigned i;
- Arg **arglist;
Cardinal *count;
- va_start(argindex);
-
/* Get first two arguments */
- arglist = va_arg(argindex, Arg **);
+ va_start(argindex, arglist);
count = va_arg(argindex, Cardinal *);
@@ -46,6 +42,5 @@ va_dcl
/* Set new Arg list */
- va_start(argindex);
+ va_start(argindex, arglist);
/* skip past first two arguments */
- (void) va_arg(argindex, Arg **);
(void) va_arg(argindex, int *);
@@ -60,4 +55,3 @@ va_dcl
-Widget CreateWidget(va_alist)
-va_dcl
+Widget CreateWidget(char *name, ...)
{
@@ -80,9 +74,7 @@ va_dcl
Widget w, parent;
- char *name;
WidgetClass class;
- va_start(argindex);
+ va_start(argindex, name);
/* Get first three arguments */
- name = va_arg(argindex, char *);
class = va_arg(argindex, WidgetClass);
@@ -104,6 +96,5 @@ va_dcl
/* Set new Arg list */
- va_start(argindex);
+ va_start(argindex, name);
/* skip past first three arguments */
- (void) va_arg(argindex, char *);
(void) va_arg(argindex, WidgetClass);
@@ -125,4 +116,3 @@ va_dcl
-void QueryWidget(va_alist)
-va_dcl
+void QueryWidget(Widget w, ...)
{
@@ -140,8 +130,4 @@ va_dcl
Cardinal count;
- Widget w;
-
- va_start(argindex);
- /* Get first argument */
- w = va_arg(argindex, Widget);
+ va_start(argindex, w);
@@ -161,6 +147,3 @@ va_dcl
/* Set new Arg list */
- va_start(argindex);
-
- /* skip past first argument */
- (void) va_arg(argindex, Widget);
+ va_start(argindex, w);
@@ -176,4 +159,3 @@ va_dcl
-void ConfigureWidget(va_alist)
-va_dcl
+void ConfigureWidget(Widget w, ...)
{
@@ -191,8 +173,4 @@ va_dcl
Cardinal count;
- Widget w;
- va_start(argindex);
-
- /* Get first argument */
- w = va_arg(argindex, Widget);
+ va_start(argindex, w);
@@ -212,6 +190,3 @@ va_dcl
/* Set new Arg list */
- va_start(argindex);
-
- /* skip past first argument */
- (void) va_arg(argindex, Widget);
+ va_start(argindex, w);