blob: a385599eea648010e216566ef391085aac1c6aa0 (
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
|
--- telnet/commands.c.old Sun Jan 7 10:03:38 2001
+++ telnet/commands.c Sun Jan 7 10:16:53 2001
@@ -55,7 +55,7 @@
#include <netdb.h>
#include <ctype.h>
#include <pwd.h>
-#include <varargs.h>
+#include <stdarg.h>
#include <errno.h>
#include <arpa/telnet.h>
@@ -100,7 +100,8 @@
extern char **genget();
extern int Ambiguous();
-static call();
+typedef int (*intrtn_t)();
+static int call(intrtn_t, ...);
typedef struct {
char *name; /* command name */
@@ -2550,18 +2551,14 @@
*/
/*VARARGS1*/
- static
-call(va_alist)
- va_dcl
+ static int
+call(intrtn_t routine, ...)
{
va_list ap;
- typedef int (*intrtn_t)();
- intrtn_t routine;
char *args[100];
int argno = 0;
- va_start(ap);
- routine = (va_arg(ap, intrtn_t));
+ va_start(ap, routine);
while ((args[argno++] = va_arg(ap, char *)) != 0) {
;
}
|