1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 3. Neither the name of the University nor the names of its contributors 16 * may be used to endorse or promote products derived from this software 17 * without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * 31 * @(#)extern.h 8.2 (Berkeley) 4/20/95 32 * 33 * $FreeBSD$ 34 */ 35 36 struct name *cat(struct name *, struct name *); 37 struct name *delname(struct name *, char *); 38 struct name *elide(struct name *); 39 struct name *extract(char *, int); 40 struct name *gexpand(struct name *, struct grouphead *, int, int); 41 struct name *nalloc(char *, int); 42 struct name *outof(struct name *, FILE *, struct header *); 43 struct name *put(struct name *, struct name *); 44 struct name *tailof(struct name *); 45 struct name *usermap(struct name *); 46 FILE *Fdopen(int, const char *); 47 FILE *Fopen(const char *, const char *); 48 FILE *Popen(char *, const char *); 49 FILE *collect(struct header *, int); 50 char *copyin(char *, char **); 51 char *detract(struct name *, int); 52 char *expand(char *); 53 char *getdeadletter(void); 54 char *getname(uid_t); 55 char *hfield(const char *, struct message *); 56 FILE *infix(struct header *, FILE *); 57 char *ishfield(char *, char *, const char *); 58 char *name1(struct message *, int); 59 char *nameof(struct message *, int); 60 char *nextword(char *, char *); 61 char *readtty(const char *, char *); 62 char *reedit(char *); 63 FILE *run_editor(FILE *, off_t, int, int); 64 char *salloc(int); 65 char *savestr(char *); 66 FILE *setinput(struct message *); 67 char *skin(char *); 68 char *skip_comment(char *); 69 char *snarf(char *, int *); 70 char *username(void); 71 char *value(const char *); 72 char *vcopy(const char *); 73 char *yankword(char *, char *); 74 char *yanklogin(char *, char *); 75 int Fclose(FILE *); 76 int More(void *); 77 int Pclose(FILE *); 78 int Respond(int *); 79 int Type(void *); 80 int doRespond(int *); 81 int dorespond(int *); 82 void alter(char *); 83 int alternates(char **); 84 void announce(void); 85 int append(struct message *, FILE *); 86 int argcount(char **); 87 void assign(const char *, const char *); 88 int bangexp(char *, size_t); 89 void brokpipe(int); 90 int charcount(char *, int); 91 int check(int, int); 92 void clob1(int); 93 int clobber(char **); 94 void close_all_files(void); 95 int cmatch(char *, char *); 96 void collhup(int); 97 void collint(int); 98 void collstop(int); 99 void commands(void); 100 int copycmd(void *v); 101 int core(void); 102 int count(struct name *); 103 int deletecmd(void *); 104 int delm(int *); 105 int deltype(void *); 106 void demail(void); 107 int diction(const void *, const void *); 108 int dosh(char *); 109 int echo(char **); 110 int edit1(int *, int); 111 int editor(int *); 112 void edstop(void); 113 int elsecmd(void); 114 int endifcmd(void); 115 int evalcol(int); 116 int execute(char *, int); 117 int exwrite(char *, FILE *, int); 118 void fail(const char *, const char *); 119 int file(char **); 120 struct grouphead * 121 findgroup(char *); 122 void findmail(char *, char *, int); 123 int first(int, int); 124 void fixhead(struct header *, struct name *); 125 void fmt(const char *, struct name *, FILE *, int); 126 int folders(void); 127 int forward(char *, FILE *, char *, int); 128 void free_child(int); 129 int from(void *); 130 off_t fsize(FILE *); 131 int getfold(char *, int); 132 int gethfield(FILE *, char *, int, char **); 133 int getmsglist(char *, int *, int); 134 int getrawlist(char *, char **, int); 135 uid_t getuserid(char *); 136 int grabh(struct header *, int); 137 int group(void *); 138 void hangup(int); 139 int hash(const char *); 140 void hdrstop(int); 141 int headers(void *); 142 int help(void); 143 void holdsigs(void); 144 int ifcmd(char **); 145 int igcomp(const void *, const void *); 146 int igfield(void *); 147 int ignore1(char **, struct ignoretab *, const char *); 148 int igshow(struct ignoretab *, const char *); 149 int inc(void *); 150 int incfile(void); 151 void intr(int); 152 int isdate(char *); 153 int isdir(char *); 154 int isfileaddr(char *); 155 int ishead(char *); 156 int isign(const char *, struct ignoretab [2]); 157 int isprefix(const char *, const char *); 158 void istrncpy(char *, const char *, size_t); 159 const struct cmd * 160 lex(char *); 161 void load(char *); 162 struct var * 163 lookup(const char *); 164 int mail(struct name *, 165 struct name *, struct name *, struct name *, char *, char *); 166 void mail1(struct header *, int); 167 void makemessage(FILE *, int); 168 void mark(int); 169 int markall(char *, int); 170 int matchsender(char *, int); 171 int matchfield(char *, int); 172 int mboxit(void *); 173 int member(char *, struct ignoretab *); 174 void mesedit(FILE *, int); 175 void mespipe(FILE *, char *); 176 int messize(void *); 177 int metamess(int, int); 178 int more(void *); 179 int newfileinfo(int); 180 int next(void *); 181 int null(int); 182 void parse(char *, struct headline *, char *); 183 int pcmdlist(void); 184 int pdot(void); 185 void prepare_child(sigset_t *, int, int); 186 int preserve(void *); 187 void prettyprint(struct name *); 188 void printgroup(char *); 189 void printhead(int); 190 int puthead(struct header *, FILE *, int); 191 int putline(FILE *, char *, int); 192 int pversion(int); 193 void quit(void); 194 int quitcmd(void); 195 int readline(FILE *, char *, int); 196 void register_file(FILE *, int, int); 197 void regret(int); 198 void relsesigs(void); 199 int respond(void *); 200 int retfield(void *); 201 int rexit(void *); 202 int rm(char *); 203 int run_command(char *, sigset_t *, int, int, ...); 204 int save(void *v); 205 int save1(char *, int, const char *, struct ignoretab *); 206 void savedeadletter(FILE *); 207 int saveigfield(void *); 208 int savemail(char *, FILE *); 209 int saveretfield(void *); 210 int scan(char **); 211 void scaninit(void); 212 int schdir(void *); 213 int screensize(void); 214 int scroll(void *); 215 int sendmessage(struct message *, FILE *, struct ignoretab *, char *); 216 int sendmail(char *); 217 int set(void *); 218 int setfile(char *); 219 void setmsize(int); 220 void setptr(FILE *, off_t); 221 void setscreensize(void); 222 int shell(char *); 223 void sigchild(int); 224 void sort(char **); 225 int source(char **); 226 void spreserve(void); 227 void sreset(void); 228 int start_command(char *, sigset_t *, int, int, ...); 229 void statusput(struct message *, FILE *, char *); 230 void stop(int); 231 int stouch(void *); 232 int swrite(void *); 233 void tinit(void); 234 int top(void *); 235 void touch(struct message *); 236 void ttyint(int); 237 void ttystop(int); 238 int type(void *); 239 int type1(int *, int, int); 240 int undeletecmd(void *); 241 void unmark(int); 242 char **unpack(struct name *); 243 int unread(void *); 244 void unregister_file(FILE *); 245 int unset(void *); 246 int unstack(void); 247 void vfree(char *); 248 int visual(int *); 249 int wait_child(int); 250 int wait_command(int); 251 int writeback(FILE *); 252 253 extern char *__progname; 254 extern char *tmpdir; 255