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