summaryrefslogtreecommitdiff
path: root/x11/xpaste/patches/patch-aa
blob: fbe67855b285783053cc2bb19462cdf40f3c4b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
$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);