blob: 0d80613279966f45bcc3c09569fc440b48bf7f93 (
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
|
$NetBSD: patch-ae,v 1.1 2003/12/19 12:24:25 agc Exp $
--- clients/telnet/commands.c 2003/12/19 12:14:28 1.1
+++ clients/telnet/commands.c 2003/12/19 12:16:29
@@ -83,7 +83,7 @@
#include <signal.h>
#include <ctype.h>
#include <pwd.h>
-#include <varargs.h>
+#include <stdarg.h>
#include <errno.h>
#include <arpa/telnet.h>
@@ -122,7 +122,7 @@
extern int Ambiguous();
extern void herror();
-static call();
+static int call(void *, ...);
typedef struct {
char *name; /* command name */
@@ -2092,17 +2092,15 @@
/*VARARGS1*/
static int
-call(va_alist)
- va_dcl
+call(void *func, ...)
{
va_list ap;
typedef int (*intrtn_t)();
- intrtn_t routine;
+ intrtn_t routine = (intrtn_t) func;
char *args[100];
int argno = 0;
- va_start(ap);
- routine = (va_arg(ap, intrtn_t));
+ va_start(ap, func);
while ((args[argno++] = va_arg(ap, char *)) != 0) {
;
}
|