1/*-
2 * Copyright (c) 1994 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 *    must display the following acknowledgement:
15 *	This product includes software developed by the University of
16 *	California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 *    may be used to endorse or promote products derived from this software
19 *    without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 *	@(#)extern.h	8.3 (Berkeley) 10/9/94
34 */
35
36/* $Id$ */
37
38#include <setjmp.h>
39#include <stdlib.h>
40#ifdef TIME_WITH_SYS_TIME
41#include <sys/time.h>
42#include <time.h>
43#elif defined(HAVE_SYS_TIME_H)
44#include <sys/time.h>
45#else
46#include <time.h>
47#endif
48#ifdef HAVE_SYS_SELECT_H
49#include <sys/select.h>
50#endif
51
52void    abort_remote (FILE *);
53void    abortpt (int);
54void    abortrecv (int);
55void	account (int, char **);
56int	another (int *, char ***, char *);
57void	blkfree (char **);
58void	cd (int, char **);
59void	cdup (int, char **);
60void	changetype (int, int);
61void	cmdabort (int);
62void	cmdscanner (int);
63int	command (char *fmt, ...)
64    __attribute__ ((format (printf, 1,2)));
65int	confirm (char *, char *);
66FILE   *dataconn (const char *);
67void	delete (int, char **);
68void	disconnect (int, char **);
69void	do_chmod (int, char **);
70void	do_umask (int, char **);
71void	domacro (int, char **);
72char   *domap (char *);
73void	doproxy (int, char **);
74char   *dotrans (char *);
75int     empty (fd_set *, int);
76void	fatal (char *);
77void	get (int, char **);
78struct cmd *getcmd (char *);
79int	getit (int, char **, int, char *);
80int	getreply (int);
81int	globulize (char **);
82char   *gunique (char *);
83void	help (int, char **);
84char   *hookup (const char *, int);
85void	ftp_idle (int, char **);
86int     initconn (void);
87void	intr (int);
88void	lcd (int, char **);
89int	login (char *);
90RETSIGTYPE	lostpeer (int);
91void	ls (int, char **);
92void	macdef (int, char **);
93void	makeargv (void);
94void	makedir (int, char **);
95void	mdelete (int, char **);
96void	mget (int, char **);
97void	mls (int, char **);
98void	modtime (int, char **);
99void	mput (int, char **);
100char   *onoff (int);
101void	newer (int, char **);
102void    proxtrans (char *, char *, char *);
103void    psabort (int);
104void    pswitch (int);
105void    ptransfer (char *, long, struct timeval *, struct timeval *);
106void	put (int, char **);
107void	pwd (int, char **);
108void	quit (int, char **);
109void	quote (int, char **);
110void	quote1 (char *, int, char **);
111void    recvrequest (char *, char *, char *, char *, int, int);
112void	reget (int, char **);
113char   *remglob (char **, int);
114void	removedir (int, char **);
115void	renamefile (int, char **);
116void    reset (int, char **);
117void	restart (int, char **);
118void	rmthelp (int, char **);
119void	rmtstatus (int, char **);
120int	ruserpassword (char *, char **, char **, char **);
121void    sendrequest (char *, char *, char *, char *, int);
122void	setascii (int, char **);
123void	setbell (int, char **);
124void	setbinary (int, char **);
125void	setcase (int, char **);
126void	setcr (int, char **);
127void	setdebug (int, char **);
128void	setform (int, char **);
129void	setftmode (int, char **);
130void	setglob (int, char **);
131void	sethash (int, char **);
132void	setnmap (int, char **);
133void	setntrans (int, char **);
134void	setpassive (int, char **);
135void	setpeer (int, char **);
136void	setport (int, char **);
137void	setprompt (int, char **);
138void	setrunique (int, char **);
139void	setstruct (int, char **);
140void	setsunique (int, char **);
141void	settenex (int, char **);
142void	settrace (int, char **);
143void	settype (int, char **);
144void	setverbose (int, char **);
145void	shell (int, char **);
146void	site (int, char **);
147void	sizecmd (int, char **);
148char   *slurpstring (void);
149void	status (int, char **);
150void	syst (int, char **);
151void    tvsub (struct timeval *, struct timeval *, struct timeval *);
152void	user (int, char **);
153
154extern jmp_buf	abortprox;
155extern int	abrtflag;
156extern struct	cmd cmdtab[];
157extern FILE	*cout;
158extern int	data;
159extern char    *home;
160extern jmp_buf	jabort;
161extern int	proxy;
162extern char	reply_string[];
163extern off_t	restart_point;
164extern int	NCMDS;
165
166extern char 	username[32];
167extern char	myhostname[];
168extern char	*mydomain;
169
170void afslog (int, char **);
171void kauth (int, char **);
172void kdestroy (int, char **);
173void klist (int, char **);
174void krbtkfile (int, char **);
175