aboutsummaryrefslogtreecommitdiff
path: root/databases/msql3/files/patch-az
blob: bf2ebbbec755ebc23028f218a58763996e07c93c (plain) (blame)
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
--- src/common/debug.c.bak	Mon Aug 20 05:19:27 2001
+++ src/common/debug.c	Thu Sep 11 10:38:57 2003
@@ -18,7 +18,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <string.h>
 #include "debug.h"
 
@@ -136,26 +136,20 @@
 
 
 
-void _msqlTrace(va_alist)
-	va_dcl
+void _msqlTrace(int dir, char *fmt, ...)
 {
 	va_list args;
-	char	*fmt,
-		*tag;
-	int	loop,
-		dir;
+	char    *tag;
+	int     loop;
 	static	int indent = 0;
 	static 	char inTag[] = "-->",
 		     outTag[] = "<--";
 
-	va_start(args);
 	if (! (debugLevel & MOD_TRACE))
 	{
-		va_end(args);
 		return;
 	}
 
-	dir = va_arg(args, int);
 	if (dir == TRACE_IN)
 	{
 		tag = inTag;
@@ -163,9 +157,9 @@
 	}
 	else
 		tag = outTag;
-	fmt = (char *)va_arg(args, char *);
 	if (!fmt)
         	return;
+	va_start(args, fmt);
 	(void)vsprintf(msqlDebugBuf,fmt,args);
 	va_end(args);
 	printf("[%s] ",PROGNAME);