extern.h revision 1.69
11.69Slukem/*	$NetBSD: extern.h,v 1.69 2005/06/10 00:18:46 lukem Exp $	*/
21.43Slukem
31.43Slukem/*-
41.63Slukem * Copyright (c) 1996-2005 The NetBSD Foundation, Inc.
51.43Slukem * All rights reserved.
61.43Slukem *
71.43Slukem * This code is derived from software contributed to The NetBSD Foundation
81.43Slukem * by Luke Mewburn.
91.43Slukem *
101.43Slukem * Redistribution and use in source and binary forms, with or without
111.43Slukem * modification, are permitted provided that the following conditions
121.43Slukem * are met:
131.43Slukem * 1. Redistributions of source code must retain the above copyright
141.43Slukem *    notice, this list of conditions and the following disclaimer.
151.43Slukem * 2. Redistributions in binary form must reproduce the above copyright
161.43Slukem *    notice, this list of conditions and the following disclaimer in the
171.43Slukem *    documentation and/or other materials provided with the distribution.
181.43Slukem * 3. All advertising materials mentioning features or use of this software
191.43Slukem *    must display the following acknowledgement:
201.43Slukem *	This product includes software developed by the NetBSD
211.43Slukem *	Foundation, Inc. and its contributors.
221.43Slukem * 4. Neither the name of The NetBSD Foundation nor the names of its
231.43Slukem *    contributors may be used to endorse or promote products derived
241.43Slukem *    from this software without specific prior written permission.
251.43Slukem *
261.43Slukem * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
271.43Slukem * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
281.43Slukem * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
291.43Slukem * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
301.43Slukem * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
311.43Slukem * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
321.43Slukem * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
331.43Slukem * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
341.43Slukem * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
351.43Slukem * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
361.43Slukem * POSSIBILITY OF SUCH DAMAGE.
371.43Slukem */
381.32Sitojun
391.40Slukem/*-
401.40Slukem * Copyright (c) 1994 The Regents of the University of California.
411.32Sitojun * All rights reserved.
421.40Slukem *
431.32Sitojun * Redistribution and use in source and binary forms, with or without
441.32Sitojun * modification, are permitted provided that the following conditions
451.32Sitojun * are met:
461.32Sitojun * 1. Redistributions of source code must retain the above copyright
471.32Sitojun *    notice, this list of conditions and the following disclaimer.
481.32Sitojun * 2. Redistributions in binary form must reproduce the above copyright
491.32Sitojun *    notice, this list of conditions and the following disclaimer in the
501.32Sitojun *    documentation and/or other materials provided with the distribution.
511.62Sagc * 3. Neither the name of the University nor the names of its contributors
521.32Sitojun *    may be used to endorse or promote products derived from this software
531.32Sitojun *    without specific prior written permission.
541.40Slukem *
551.40Slukem * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
561.32Sitojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
571.32Sitojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
581.40Slukem * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
591.32Sitojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
601.32Sitojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
611.32Sitojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
621.32Sitojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
631.32Sitojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
641.32Sitojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
651.32Sitojun * SUCH DAMAGE.
661.40Slukem *
671.40Slukem *	@(#)extern.h	8.3 (Berkeley) 10/9/94
681.32Sitojun */
691.4Stls
701.40Slukem/*
711.40Slukem * Copyright (C) 1997 and 1998 WIDE Project.
721.1Scgd * All rights reserved.
731.66Slukem *
741.1Scgd * Redistribution and use in source and binary forms, with or without
751.1Scgd * modification, are permitted provided that the following conditions
761.1Scgd * are met:
771.1Scgd * 1. Redistributions of source code must retain the above copyright
781.1Scgd *    notice, this list of conditions and the following disclaimer.
791.1Scgd * 2. Redistributions in binary form must reproduce the above copyright
801.1Scgd *    notice, this list of conditions and the following disclaimer in the
811.1Scgd *    documentation and/or other materials provided with the distribution.
821.40Slukem * 3. Neither the name of the project nor the names of its contributors
831.1Scgd *    may be used to endorse or promote products derived from this software
841.1Scgd *    without specific prior written permission.
851.66Slukem *
861.40Slukem * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
871.1Scgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
881.1Scgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
891.40Slukem * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
901.1Scgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
911.1Scgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
921.1Scgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
931.1Scgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
941.1Scgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
951.1Scgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
961.1Scgd * SUCH DAMAGE.
971.1Scgd */
981.1Scgd
991.21Sthorpejstruct sockaddr;
1001.26Sitohystruct tm;
1011.55Sitojunstruct addrinfo;
1021.1Scgd
1031.54Slukemvoid	abort_remote(FILE *);
1041.54Slukemvoid	abort_squared(int);
1051.54Slukemvoid	abortpt(int);
1061.54Slukemvoid	abortxfer(int);
1071.54Slukemvoid	account(int, char **);
1081.55Sitojunvoid	ai_unmapped(struct addrinfo *);
1091.54Slukemint	another(int *, char ***, const char *);
1101.54Slukemint	auto_fetch(int, char **);
1111.56Slukemint	auto_put(int, char **, const char *);
1121.54Slukemvoid	blkfree(char **);
1131.54Slukemvoid	cd(int, char **);
1141.54Slukemvoid	cdup(int, char **);
1151.54Slukemvoid	changetype(int, int);
1161.54Slukemvoid	cleanuppeer(void);
1171.54Slukemvoid	cmdabort(int);
1181.54Slukemvoid	cmdtimeout(int);
1191.54Slukemvoid	cmdscanner(void);
1201.60Sisint	command(const char *, ...)
1211.60Sis     __attribute__((__format__(__printf__, 1, 2)));
1221.29Scgd#ifndef NO_EDITCOMPLETE
1231.54Slukemunsigned char complete(EditLine *, int);
1241.54Slukemvoid	controlediting(void);
1251.29Scgd#endif /* !NO_EDITCOMPLETE */
1261.54Slukemvoid	crankrate(int);
1271.54SlukemFILE   *dataconn(const char *);
1281.54Slukemvoid	delete(int, char **);
1291.54Slukemvoid	disconnect(int, char **);
1301.54Slukemvoid	do_chmod(int, char **);
1311.54Slukemvoid	do_umask(int, char **);
1321.54Slukemvoid	domacro(int, char **);
1331.54Slukemvoid	doproxy(int, char **);
1341.58Slukemvoid	feat(int, char **);
1351.54Slukemvoid	fget(int, char **);
1361.63Slukemint	fileindir(const char *, const char *);
1371.54Slukemint	foregroundproc(void);
1381.54Slukemvoid	formatbuf(char *, size_t, const char *);
1391.54Slukemvoid	ftpvis(char *, size_t, const char *, size_t);
1401.54Slukemint	ftp_login(const char *, const char *, const char *);
1411.54Slukemvoid	get(int, char **);
1421.54Slukemstruct cmd *getcmd(const char *);
1431.54Slukemint	getit(int, char **, int, const char *);
1441.69Slukemint	getline(FILE *, char *, size_t, const char **);
1451.54Slukemstruct option *getoption(const char *);
1461.54Slukemchar   *getoptionvalue(const char *);
1471.58Slukemvoid	getremoteinfo(void);
1481.54Slukemint	getreply(int);
1491.54Slukemchar   *globulize(const char *);
1501.54Slukemchar   *gunique(const char *);
1511.54Slukemvoid	help(int, char **);
1521.54Slukemchar   *hookup(char *, char *);
1531.54Slukemvoid	idlecmd(int, char **);
1541.54Slukemint	initconn(void);
1551.54Slukemvoid	intr(int);
1561.54Slukemint	isipv6addr(const char *);
1571.54Slukemvoid	list_vertical(StringList *);
1581.54Slukemvoid	lcd(int, char **);
1591.54Slukemvoid	lostpeer(int);
1601.54Slukemvoid	lpage(int, char **);
1611.54Slukemvoid	lpwd(int, char **);
1621.54Slukemvoid	ls(int, char **);
1631.54Slukemvoid	mabort(void);
1641.54Slukemvoid	macdef(int, char **);
1651.54Slukemvoid	makeargv(void);
1661.54Slukemvoid	makedir(int, char **);
1671.54Slukemvoid	mdelete(int, char **);
1681.54Slukemvoid	mget(int, char **);
1691.54Slukemvoid	mintr(int);
1701.54Slukemvoid	mls(int, char **);
1711.58Slukemvoid	mlst(int, char **);
1721.54Slukemvoid	modtime(int, char **);
1731.54Slukemvoid	mput(int, char **);
1741.68Slukemconst char *onoff(int);
1751.58Slukemvoid	opts(int, char **);
1761.54Slukemvoid	newer(int, char **);
1771.54Slukemvoid	page(int, char **);
1781.59Slukemint	parseport(const char *, int);
1791.54Slukemint	parserate(int, char **, int);
1801.54Slukemchar   *prompt(void);
1811.54Slukemvoid	proxabort(int);
1821.54Slukemvoid	proxtrans(const char *, const char *, const char *);
1831.54Slukemvoid	psabort(int);
1841.54Slukemvoid	pswitch(int);
1851.54Slukemvoid	put(int, char **);
1861.54Slukemvoid	pwd(int, char **);
1871.54Slukemvoid	quit(int, char **);
1881.54Slukemvoid	quote(int, char **);
1891.54Slukemvoid	quote1(const char *, int, char **);
1901.54Slukemvoid	recvrequest(const char *, const char *, const char *,
1911.54Slukem	    const char *, int, int);
1921.54Slukemvoid	reget(int, char **);
1931.68Slukemchar   *remglob(char **, int, const char **);
1941.57Slukemtime_t	remotemodtime(const char *, int);
1951.54Slukemoff_t	remotesize(const char *, int);
1961.54Slukemvoid	removedir(int, char **);
1971.54Slukemvoid	renamefile(int, char **);
1981.54Slukemvoid	reset(int, char **);
1991.54Slukemvoid	restart(int, char **);
2001.54Slukemvoid	rmthelp(int, char **);
2011.54Slukemvoid	rmtstatus(int, char **);
2021.54Slukemchar   *rprompt(void);
2031.69Slukemint	ruserpass(const char *, char **, char **, char **);
2041.54Slukemvoid	sendrequest(const char *, const char *, const char *, int);
2051.54Slukemvoid	setascii(int, char **);
2061.54Slukemvoid	setbell(int, char **);
2071.54Slukemvoid	setbinary(int, char **);
2081.54Slukemvoid	setcase(int, char **);
2091.54Slukemvoid	setcr(int, char **);
2101.54Slukemvoid	setdebug(int, char **);
2111.54Slukemvoid	setedit(int, char **);
2121.54Slukemvoid	setepsv4(int, char **);
2131.54Slukemvoid	setform(int, char **);
2141.54Slukemvoid	setftmode(int, char **);
2151.54Slukemvoid	setgate(int, char **);
2161.54Slukemvoid	setglob(int, char **);
2171.54Slukemvoid	sethash(int, char **);
2181.54Slukemvoid	setnmap(int, char **);
2191.54Slukemvoid	setntrans(int, char **);
2201.54Slukemvoid	setoption(int, char **);
2211.54Slukemvoid	setpassive(int, char **);
2221.54Slukemvoid	setpeer(int, char **);
2231.54Slukemvoid	setport(int, char **);
2241.54Slukemvoid	setpreserve(int, char **);
2251.54Slukemvoid	setprogress(int, char **);
2261.54Slukemvoid	setprompt(int, char **);
2271.54Slukemvoid	setrate(int, char **);
2281.54Slukemvoid	setrunique(int, char **);
2291.54Slukemvoid	setstruct(int, char **);
2301.54Slukemvoid	setsunique(int, char **);
2311.54Slukemvoid	settenex(int, char **);
2321.54Slukemvoid	settrace(int, char **);
2331.54Slukemvoid	setttywidth(int);
2341.54Slukemvoid	settype(int, char **);
2351.54Slukemvoid	setupsockbufsize(int);
2361.54Slukemvoid	setverbose(int, char **);
2371.54Slukemvoid	setxferbuf(int, char **);
2381.54Slukemvoid	shell(int, char **);
2391.54Slukemvoid	site(int, char **);
2401.54Slukemvoid	sizecmd(int, char **);
2411.54Slukemchar   *slurpstring(void);
2421.54Slukemvoid	status(int, char **);
2431.54Slukemint	strsuftoi(const char *);
2441.54Slukemvoid	syst(int, char **);
2451.54Slukemint	togglevar(int, char **, int *, const char *);
2461.54Slukemvoid	unsetoption(int, char **);
2471.63Slukemvoid	updatelocalcwd(void);
2481.63Slukemvoid	updateremotecwd(void);
2491.54Slukemvoid	usage(void);
2501.54Slukemvoid	user(int, char **);
2511.67Slukemint	xconnect(int, const struct sockaddr *, socklen_t);
2521.54Slukemint	xlisten(int, int);
2531.65Slukemint	xpoll(struct pollfd *, int, int);
2541.54Slukemvoid   *xmalloc(size_t);
2551.54SlukemStringList *xsl_init(void);
2561.54Slukemvoid	xsl_add(StringList *, char *);
2571.54Slukemchar   *xstrdup(const char *);
258