extern.h revision 1.84
1/* $NetBSD: extern.h,v 1.84 2024/10/04 18:06:53 christos Exp $ */ 2 3/*- 4 * Copyright (c) 1996-2023 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 * 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 account(int, char **); 98void ai_unmapped(struct addrinfo *); 99int another(int *, char ***, const char *); 100int auto_fetch(int, char **); 101int auto_put(int, char **, const char *); 102void blkfree(char **); 103void cd(int, char **); 104void cdup(int, char **); 105void changetype(int, int); 106void cleanuppeer(void); 107void cmdabort(int); 108void cmdtimeout(int); 109void cmdscanner(void); 110int command(const char *, ...) 111 __attribute__((__format__(__printf__, 1, 2))); 112#ifndef NO_EDITCOMPLETE 113unsigned char complete(EditLine *, int); 114void controlediting(void); 115#endif /* !NO_EDITCOMPLETE */ 116void crankrate(int); 117FILE *dataconn(const char *); 118void delete(int, char **); 119void disconnect(int, char **); 120void do_chmod(int, char **); 121void do_umask(int, char **); 122void domacro(int, char **); 123void doproxy(int, char **); 124void feat(int, char **); 125void fget(int, char **); 126int fileindir(const char *, const char *); 127int foregroundproc(void); 128void formatbuf(char *, size_t, const char *); 129void ftpvis(char *, size_t, const char *, size_t); 130int ftp_login(const char *, const char *, const char *); 131void get(int, char **); 132struct cmd *getcmd(const char *); 133int getit(int, char **, int, const char *); 134int get_line(FILE *, char *, size_t, const char **); 135struct option *getoption(const char *); 136char *getoptionvalue(const char *); 137void getremoteinfo(void); 138int getreply(int); 139char *globulize(const char *); 140char *gunique(char *); 141void help(int, char **); 142char *hookup(const char *, const char *); 143void idlecmd(int, char **); 144int initconn(void); 145__dead void intr(int); 146int isipv6addr(const char *); 147void list_vertical(StringList *); 148void lcd(int, char **); 149void lostpeer(int); 150void lpage(int, char **); 151void lpwd(int, char **); 152void ls(int, char **); 153void macdef(int, char **); 154void makeargv(void); 155void makedir(int, char **); 156void mdelete(int, char **); 157void mget(int, char **); 158void mls(int, char **); 159void mlst(int, char **); 160void modtime(int, char **); 161void mput(int, char **); 162const char *onoff(int); 163void opts(int, char **); 164void newer(int, char **); 165void page(int, char **); 166const char *parse_rfc2616time(struct tm *, const char *); 167int parserate(int, char **, int); 168char *prompt(void); 169__dead void proxabort(int); 170void proxtrans(const char *, const char *, const char *); 171void psabort(int); 172void pswitch(int); 173void put(int, char **); 174void pwd(int, char **); 175void quit(int, char **); 176void justquit(void) __dead; 177void quote(int, char **); 178void quote1(const char *, int, char **); 179void recvrequest(const char *, char *, const char *, 180 const char *, int, int); 181void reget(int, char **); 182char *remglob(char **, int, const char **); 183time_t remotemodtime(const char *, int); 184off_t remotesize(const char *, int); 185void removedir(int, char **); 186void renamefile(int, char **); 187void reset(int, char **); 188void restart(int, char **); 189const char *rfc2822time(const struct tm *); 190void rmthelp(int, char **); 191void rmtstatus(int, char **); 192char *rprompt(void); 193int ruserpass(const char *, char **, char **, char **); 194void sendrequest(const char *, const char *, const char *, int); 195void setascii(int, char **); 196void setbell(int, char **); 197void setbinary(int, char **); 198void setcase(int, char **); 199void setcr(int, char **); 200void setdebug(int, char **); 201void setedit(int, char **); 202void setepsv4(int, char **); 203void setepsv6(int, char **); 204void setepsv(int, char **); 205void setform(int, char **); 206void setftmode(int, char **); 207void setgate(int, char **); 208void setglob(int, char **); 209void sethash(int, char **); 210void setnmap(int, char **); 211void setntrans(int, char **); 212void setoption(int, char **); 213void setpassive(int, char **); 214void setpeer(int, char **); 215void setport(int, char **); 216void setpreserve(int, char **); 217void setprogress(int, char **); 218void setprompt(int, char **); 219void setrate(int, char **); 220void setrunique(int, char **); 221void setstruct(int, char **); 222void setsunique(int, char **); 223void settenex(int, char **); 224void settrace(int, char **); 225void setttywidth(int); 226void settype(int, char **); 227void setupsockbufsize(int); 228void setverbose(int, char **); 229void setxferbuf(int, char **); 230void set_option(const char *, const char *, int); 231void shell(int, char **); 232void site(int, char **); 233void sizecmd(int, char **); 234char *slurpstring(void); 235void status(int, char **); 236int strsuftoi(const char *); 237void syst(int, char **); 238int togglevar(int, char **, int *, const char *); 239void unsetoption(int, char **); 240void updatelocalcwd(void); 241void updateremotecwd(void); 242void user(int, char **); 243int ftp_connect(int, const struct sockaddr *, socklen_t, int); 244int ftp_listen(int, int); 245int ftp_poll(struct pollfd *, int, int); 246int ftp_truthy(const char *, const char *, int); 247#ifndef SMALL 248void *ftp_malloc(size_t); 249StringList *ftp_sl_init(void); 250void ftp_sl_add(StringList *, char *); 251char *ftp_strdup(const char *); 252#else 253#define ftp_malloc(a) malloc(a); 254#define ftp_sl_init() sl_init() 255#define ftp_sl_add(a, b) sl_add((a), (b)) 256#define ftp_strdup(a) strdup(a) 257#endif 258