extern.h revision 1.62
1/*	$NetBSD: extern.h,v 1.62 2003/08/07 11:13:54 agc Exp $	*/
2
3/*-
4 * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Luke Mewburn.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 *    notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in the
17 *    documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 *    must display the following acknowledgement:
20 *	This product includes software developed by the NetBSD
21 *	Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 *    contributors may be used to endorse or promote products derived
24 *    from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39/*-
40 * Copyright (c) 1994 The Regents of the University of California.
41 * All rights reserved.
42 *
43 * Redistribution and use in source and binary forms, with or without
44 * modification, are permitted provided that the following conditions
45 * are met:
46 * 1. Redistributions of source code must retain the above copyright
47 *    notice, this list of conditions and the following disclaimer.
48 * 2. Redistributions in binary form must reproduce the above copyright
49 *    notice, this list of conditions and the following disclaimer in the
50 *    documentation and/or other materials provided with the distribution.
51 * 3. Neither the name of the University nor the names of its contributors
52 *    may be used to endorse or promote products derived from this software
53 *    without specific prior written permission.
54 *
55 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
56 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
57 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
58 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
59 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
60 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
61 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
62 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
63 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
64 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
65 * SUCH DAMAGE.
66 *
67 *	@(#)extern.h	8.3 (Berkeley) 10/9/94
68 */
69
70/*
71 * Copyright (C) 1997 and 1998 WIDE Project.
72 * All rights reserved.
73 *
74 * Redistribution and use in source and binary forms, with or without
75 * modification, are permitted provided that the following conditions
76 * are met:
77 * 1. Redistributions of source code must retain the above copyright
78 *    notice, this list of conditions and the following disclaimer.
79 * 2. Redistributions in binary form must reproduce the above copyright
80 *    notice, this list of conditions and the following disclaimer in the
81 *    documentation and/or other materials provided with the distribution.
82 * 3. Neither the name of the project nor the names of its contributors
83 *    may be used to endorse or promote products derived from this software
84 *    without specific prior written permission.
85 *
86 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
87 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
88 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
89 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
90 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
91 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
92 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
93 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
94 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
95 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
96 * SUCH DAMAGE.
97 */
98
99struct sockaddr;
100struct tm;
101struct addrinfo;
102
103void	abort_remote(FILE *);
104void	abort_squared(int);
105void	abortpt(int);
106void	abortxfer(int);
107void	account(int, char **);
108void	ai_unmapped(struct addrinfo *);
109int	another(int *, char ***, const char *);
110int	auto_fetch(int, char **);
111int	auto_put(int, char **, const char *);
112void	blkfree(char **);
113void	cd(int, char **);
114void	cdup(int, char **);
115void	changetype(int, int);
116void	cleanuppeer(void);
117void	cmdabort(int);
118void	cmdtimeout(int);
119void	cmdscanner(void);
120int	command(const char *, ...)
121     __attribute__((__format__(__printf__, 1, 2)));
122#ifndef NO_EDITCOMPLETE
123unsigned char complete(EditLine *, int);
124void	controlediting(void);
125#endif /* !NO_EDITCOMPLETE */
126void	crankrate(int);
127FILE   *dataconn(const char *);
128void	delete(int, char **);
129void	disconnect(int, char **);
130void	do_chmod(int, char **);
131void	do_umask(int, char **);
132char   *docase(char *);
133void	domacro(int, char **);
134char   *domap(char *);
135void	doproxy(int, char **);
136char   *dotrans(char *);
137void	feat(int, char **);
138void	fget(int, char **);
139int	foregroundproc(void);
140void	formatbuf(char *, size_t, const char *);
141void	ftpvis(char *, size_t, const char *, size_t);
142int	ftp_login(const char *, const char *, const char *);
143void	get(int, char **);
144struct cmd *getcmd(const char *);
145int	getit(int, char **, int, const char *);
146struct option *getoption(const char *);
147char   *getoptionvalue(const char *);
148void	getremoteinfo(void);
149int	getreply(int);
150char   *globulize(const char *);
151char   *gunique(const char *);
152void	help(int, char **);
153char   *hookup(char *, char *);
154void	idlecmd(int, char **);
155int	initconn(void);
156void	intr(int);
157int	isipv6addr(const char *);
158void	list_vertical(StringList *);
159void	lcd(int, char **);
160void	lostpeer(int);
161void	lpage(int, char **);
162void	lpwd(int, char **);
163void	ls(int, char **);
164void	mabort(void);
165void	macdef(int, char **);
166void	makeargv(void);
167void	makedir(int, char **);
168void	mdelete(int, char **);
169void	mget(int, char **);
170void	mintr(int);
171void	mls(int, char **);
172void	mlst(int, char **);
173void	modtime(int, char **);
174void	mput(int, char **);
175char   *onoff(int);
176void	opts(int, char **);
177void	newer(int, char **);
178void	page(int, char **);
179int	parseport(const char *, int);
180int	parserate(int, char **, int);
181char   *prompt(void);
182void	proxabort(int);
183void	proxtrans(const char *, const char *, const char *);
184void	psabort(int);
185void	pswitch(int);
186void	put(int, char **);
187void	pwd(int, char **);
188void	quit(int, char **);
189void	quote(int, char **);
190void	quote1(const char *, int, char **);
191void	recvrequest(const char *, const char *, const char *,
192	    const char *, int, int);
193void	reget(int, char **);
194char   *remglob(char **, int, char **);
195time_t	remotemodtime(const char *, int);
196off_t	remotesize(const char *, int);
197void	removedir(int, char **);
198void	renamefile(int, char **);
199void	reset(int, char **);
200void	restart(int, char **);
201void	rmthelp(int, char **);
202void	rmtstatus(int, char **);
203char   *rprompt(void);
204int	ruserpass(const char *, const char **, const char **,
205	    const char **);
206void	sendrequest(const char *, const char *, const char *, int);
207void	setascii(int, char **);
208void	setbell(int, char **);
209void	setbinary(int, char **);
210void	setcase(int, char **);
211void	setcr(int, char **);
212void	setdebug(int, char **);
213void	setedit(int, char **);
214void	setepsv4(int, char **);
215void	setform(int, char **);
216void	setftmode(int, char **);
217void	setgate(int, char **);
218void	setglob(int, char **);
219void	sethash(int, char **);
220void	setnmap(int, char **);
221void	setntrans(int, char **);
222void	setoption(int, char **);
223void	setpassive(int, char **);
224void	setpeer(int, char **);
225void	setport(int, char **);
226void	setpreserve(int, char **);
227void	setprogress(int, char **);
228void	setprompt(int, char **);
229void	setrate(int, char **);
230void	setrunique(int, char **);
231void	setstruct(int, char **);
232void	setsunique(int, char **);
233void	settenex(int, char **);
234void	settrace(int, char **);
235void	setttywidth(int);
236void	settype(int, char **);
237void	setupsockbufsize(int);
238void	setverbose(int, char **);
239void	setxferbuf(int, char **);
240void	shell(int, char **);
241void	site(int, char **);
242void	sizecmd(int, char **);
243char   *slurpstring(void);
244void	status(int, char **);
245int	strsuftoi(const char *);
246void	syst(int, char **);
247int	togglevar(int, char **, int *, const char *);
248void	unsetoption(int, char **);
249void	updateremotepwd(void);
250void	usage(void);
251void	user(int, char **);
252int	xconnect(int, const struct sockaddr *, int);
253int	xlisten(int, int);
254void   *xmalloc(size_t);
255StringList *xsl_init(void);
256void	xsl_add(StringList *, char *);
257char   *xstrdup(const char *);
258