summaryrefslogtreecommitdiff
path: root/net/socks4/patches/patch-ag
blob: 5bfc4acceb15e494be4372748d63f71d4e903bb5 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
$NetBSD: patch-ag,v 1.2 2009/02/08 00:16:00 joerg Exp $

--- rtelnet/telnet/commands.c.orig	1995-02-25 01:36:16.000000000 +0100
+++ rtelnet/telnet/commands.c
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)commands.c	5
 #include <netdb.h>
 #include <ctype.h>
 #include <pwd.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <errno.h>
 #if defined(ISC)
 #include <net/errno.h>
@@ -112,7 +112,16 @@ extern int isprefix();
 extern char **genget();
 extern int Ambiguous();
 
-static call();
+static int call(void *, ...);
+static int help(int argc, char *argvp[]);
+static int send_esc();
+
+#ifndef SOLARIS
+static void send_do();
+static void send_dont();
+static void send_will();
+static void send_wont();
+#endif
 
 typedef struct {
 	char	*name;		/* command name */
@@ -265,7 +274,7 @@ struct sendlist {
 };
 
 
-extern int
+static int
 	send_esc P((void)),
 	send_help P((void)),
 	send_docmd P((char *)),
@@ -406,9 +415,6 @@ send_esc()
 send_docmd(name)
     char *name;
 {
-#ifndef SOLARIS
-    void send_do();
-#endif
     return(send_tncmd(send_do, "do", name));
 }
 
@@ -416,27 +422,18 @@ send_docmd(name)
 send_dontcmd(name)
     char *name;
 {
-#ifndef SOLARIS
-    void send_dont();
-#endif
     return(send_tncmd(send_dont, "dont", name));
 }
     static int
 send_willcmd(name)
     char *name;
 {
-#ifndef SOLARIS
-    void send_will();
-#endif
     return(send_tncmd(send_will, "will", name));
 }
     static int
 send_wontcmd(name)
     char *name;
 {
-#ifndef SOLARIS
-    void send_wont();
-#endif
     return(send_tncmd(send_wont, "wont", name));
 }
 
@@ -635,9 +632,9 @@ togxbinary(val)
 }
 
 
-extern int togglehelp P((void));
+static int togglehelp P((void));
 #if	defined(AUTHENTICATE)
-extern int auth_togdebug P((int));
+static int auth_togdebug P((int));
 #endif
 
 struct togglelist {
@@ -1477,7 +1474,7 @@ struct slclist {
 	int	arg;
 };
 
-extern void slc_help();
+static void slc_help();
 
 struct slclist SlcList[] = {
     { "export",	"Use local special character definitions",
@@ -1555,7 +1552,7 @@ struct envlist {
 
 extern struct env_lst *
 	env_define P((unsigned char *, unsigned char *));
-extern void
+static void
 	env_undefine P((unsigned char *)),
 	env_export P((unsigned char *)),
 	env_unexport P((unsigned char *)),
@@ -2345,17 +2342,15 @@ static Command cmdtab2[] = {
 
     /*VARARGS1*/
     static
-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) {
 	;
     }