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