summaryrefslogtreecommitdiffstats
path: root/net/tcpview/files/patch-util.c
blob: a42a462b54e1289503bd363b63b013216b00d862 (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
--- util.c.orig	Fri Apr 23 04:40:36 1993
+++ util.c	Tue Oct 28 01:59:11 2003
@@ -64,7 +64,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <ctype.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 
@@ -277,16 +277,13 @@
 }
 
 void
-error(va_alist)
-	va_dcl
+error(char *cp, ...)
 {
-	register char *cp;
 	va_list ap;
 
 	(void)fprintf(stderr, "%s: ", stripdir(program_name));
 
-	va_start(ap);
-	cp = va_arg(ap, char *);
+	va_start(ap, cp);
 	(void)vfprintf(stderr, cp, ap);
 	va_end(ap);
 	if (*cp) {
@@ -301,16 +298,13 @@
 
 /* VARARGS */
 void
-warning(va_alist)
-	va_dcl
+warning(char *cp, ...)
 {
-	register char *cp;
 	va_list ap;
 
 	(void)fprintf(stderr, "%s: warning: ", stripdir(program_name));
 
-	va_start(ap);
-	cp = va_arg(ap, char *);
+	va_start(ap, cp);
 	(void)vfprintf(stderr, cp, ap);
 	va_end(ap);
 	if (*cp) {
OpenPOWER on IntegriCloud