xref: /openbsd-src/usr.bin/ftp/extern.h (revision 8500990981f885cbe5e6a4958549cacc238b5ae6)
1 /*	$OpenBSD: extern.h,v 1.26 2003/08/11 21:23:58 millert Exp $	*/
2 /*	$NetBSD: extern.h,v 1.17 1997/08/18 10:20:19 lukem Exp $	*/
3 
4 /*
5  * Copyright (C) 1997 and 1998 WIDE Project.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the project nor the names of its contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  */
32 
33 /*-
34  * Copyright (c) 1994 The Regents of the University of California.
35  * All rights reserved.
36  *
37  * Redistribution and use in source and binary forms, with or without
38  * modification, are permitted provided that the following conditions
39  * are met:
40  * 1. Redistributions of source code must retain the above copyright
41  *    notice, this list of conditions and the following disclaimer.
42  * 2. Redistributions in binary form must reproduce the above copyright
43  *    notice, this list of conditions and the following disclaimer in the
44  *    documentation and/or other materials provided with the distribution.
45  * 3. Neither the name of the University nor the names of its contributors
46  *    may be used to endorse or promote products derived from this software
47  *    without specific prior written permission.
48  *
49  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
50  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59  * SUCH DAMAGE.
60  *
61  *	@(#)extern.h	8.3 (Berkeley) 10/9/94
62  */
63 
64 #include <sys/types.h>
65 
66 void    abort_remote(FILE *);
67 void    abortpt(int);
68 void    abortrecv(int);
69 void    abortsend(int);
70 void	account(int, char **);
71 void	alarmtimer(int);
72 int	another(int *, char ***, const char *);
73 int	auto_fetch(int, char **, char *);
74 void	blkfree(char **);
75 void	cd(int, char **);
76 void	cdup(int, char **);
77 void	changetype(int, int);
78 void	cmdabort(int);
79 void	cmdscanner(int);
80 int	command(const char *, ...);
81 #ifndef SMALL
82 unsigned char complete(EditLine *, int);
83 void	controlediting(void);
84 #endif /* !SMALL */
85 int	confirm(const char *, const char *);
86 FILE   *dataconn(const char *);
87 void	delete(int, char **);
88 void	disconnect(int, char **);
89 void	do_chmod(int, char **);
90 void	do_umask(int, char **);
91 void	domacro(int, char **);
92 char   *domap(char *);
93 void	doproxy(int, char **);
94 char   *dotrans(char *);
95 int	foregroundproc(void);
96 void	get(int, char **);
97 struct cmd *getcmd(const char *);
98 int	getit(int, char **, int, const char *);
99 int	getreply(int);
100 int	globulize(char **);
101 char   *gunique(const char *);
102 void	help(int, char **);
103 char   *hookup(char *, char *);
104 void	idle(int, char **);
105 int     initconn(void);
106 void	intr(void);
107 int	isurl(const char *);
108 void	list_vertical(StringList *);
109 void	lcd(int, char **);
110 int	ftp_login(const char *, char *, char *);
111 void	lostpeer(void);
112 void	lpwd(int, char **);
113 void	ls(int, char **);
114 void	mabort(int);
115 void	macdef(int, char **);
116 void	makeargv(void);
117 void	makedir(int, char **);
118 void	mdelete(int, char **);
119 void	mget(int, char **);
120 void	mls(int, char **);
121 void	modtime(int, char **);
122 void	mput(int, char **);
123 char   *onoff(int);
124 void	newer(int, char **);
125 void	page(int, char **);
126 void    progressmeter(int);
127 char   *prompt(void);
128 void	proxabort(int);
129 void    proxtrans(const char *, const char *, const char *);
130 void    psabort(int);
131 void	psummary(int);
132 void    pswitch(int);
133 void    ptransfer(int);
134 void	put(int, char **);
135 void	pwd(int, char **);
136 void	quit(int, char **);
137 void	quote(int, char **);
138 void	quote1(const char *, int, char **);
139 void    recvrequest(const char *, const char *, const char *,
140 	    const char *, int, int);
141 void	reget(int, char **);
142 char   *remglob(char **, int, char **);
143 off_t	remotesize(const char *, int);
144 time_t	remotemodtime(const char *, int);
145 void	removedir(int, char **);
146 void	renamefile(int, char **);
147 void    reset(int, char **);
148 void	restart(int, char **);
149 void	rmthelp(int, char **);
150 void	rmtstatus(int, char **);
151 int	ruserpass(const char *, char **, char **, char **);
152 void    sendrequest(const char *, const char *, const char *, int);
153 void	setascii(int, char **);
154 void	setbell(int, char **);
155 void	setbinary(int, char **);
156 void	setcase(int, char **);
157 void	setcr(int, char **);
158 void	setdebug(int, char **);
159 void	setedit(int, char **);
160 void	setepsv4(int, char **);
161 void	setform(int, char **);
162 void	setftmode(int, char **);
163 void	setgate(int, char **);
164 void	setglob(int, char **);
165 void	sethash(int, char **);
166 void	setnmap(int, char **);
167 void	setntrans(int, char **);
168 void	setpassive(int, char **);
169 void	setpeer(int, char **);
170 void	setport(int, char **);
171 void	setpreserve(int, char **);
172 void	setprogress(int, char **);
173 void	setprompt(int, char **);
174 void	setrunique(int, char **);
175 void	setstruct(int, char **);
176 void	setsunique(int, char **);
177 void	settenex(int, char **);
178 void	settrace(int, char **);
179 void	setttywidth(int);
180 void	settype(int, char **);
181 void	setverbose(int, char **);
182 void	shell(int, char **);
183 void	site(int, char **);
184 void	sizecmd(int, char **);
185 char   *slurpstring(void);
186 void	status(int, char **);
187 void	syst(int, char **);
188 int	togglevar(int, char **, int *, const char *);
189 void	usage(void);
190 void	user(int, char **);
191 
192 
193 extern jmp_buf	abortprox;
194 extern int	abrtflag;
195 extern struct	cmd cmdtab[];
196 extern FILE    *cout;
197 extern int	data;
198 extern char    *home;
199 extern jmp_buf	jabort;
200 extern int	family;
201 extern int	proxy;
202 extern char	reply_string[];
203 extern off_t	restart_point;
204 extern int	NCMDS;
205 
206 extern char *__progname;		/* from crt0.o */
207 
208