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 32 struct name *cat(struct name *, struct name *); 33 struct name *delname(struct name *, char *); 34 struct name *elide(struct name *); 35 struct name *extract(char *, int); 36 struct name *gexpand(struct name *, struct grouphead *, int, int); 37 struct name *nalloc(char *, int); 38 struct name *outof(struct name *, FILE *, struct header *); 39 struct name *put(struct name *, struct name *); 40 struct name *tailof(struct name *); 41 struct name *usermap(struct name *); 42 FILE *Fdopen(int, const char *); 43 FILE *Fopen(const char *, const char *); 44 FILE *Popen(char *, const char *); 45 FILE *collect(struct header *, int); 46 char *copyin(char *, char **); 47 char *detract(struct name *, int); 48 char *expand(char *); 49 char *getdeadletter(void); 50 char *getname(uid_t); 51 char *hfield(const char *, struct message *); 52 FILE *infix(struct header *, FILE *); 53 char *ishfield(char *, char *, const char *); 54 char *name1(struct message *, int); 55 char *nameof(struct message *, int); 56 char *nextword(char *, char *); 57 char *readtty(const char *, char *); 58 char *reedit(char *); 59 FILE *run_editor(FILE *, off_t, int, int); 60 char *salloc(int); 61 char *savestr(char *); 62 FILE *setinput(struct message *); 63 char *skin(char *); 64 char *skip_comment(char *); 65 char *snarf(char *, int *); 66 char *username(void); 67 char *value(const char *); 68 char *vcopy(const char *); 69 char *yankword(char *, char *); 70 char *yanklogin(char *, char *); 71 int Fclose(FILE *); 72 int More(void *); 73 int Pclose(FILE *); 74 int Respond(void *); 75 int Type(void *); 76 int doRespond(int *); 77 int dorespond(int *); 78 void alter(char *); 79 int alternates(void *); 80 void announce(void); 81 int append(struct message *, FILE *); 82 int argcount(char **); 83 void assign(const char *, const char *); 84 int bangexp(char *, size_t); 85 void brokpipe(int); 86 int charcount(char *, int); 87 int check(int, int); 88 void clob1(int); 89 int clobber(void *); 90 void close_all_files(void); 91 int cmatch(char *, char *); 92 void collhup(int); 93 void collint(int); 94 void collstop(int); 95 void commands(void); 96 int copycmd(void *v); 97 int core(void *); 98 int count(struct name *); 99 int deletecmd(void *); 100 int delm(int *); 101 int deltype(void *); 102 void demail(void); 103 int diction(const void *, const void *); 104 int dosh(void *); 105 int echo(void *); 106 int edit1(int *, int); 107 int editor(void *); 108 void edstop(void); 109 int elsecmd(void *); 110 int endifcmd(void *); 111 int evalcol(int); 112 int execute(char *, int); 113 int exwrite(char *, FILE *, int); 114 void fail(const char *, const char *); 115 int file(void *); 116 struct grouphead * 117 findgroup(char *); 118 void findmail(char *, char *, int); 119 int first(int, int); 120 void fixhead(struct header *, struct name *); 121 void fmt(const char *, struct name *, FILE *, int); 122 int folders(void *); 123 int forward(char *, FILE *, char *, int); 124 void free_child(int); 125 int from(void *); 126 off_t fsize(FILE *); 127 int getfold(char *, int); 128 int gethfield(FILE *, char *, int, char **); 129 int getmsglist(char *, int *, int); 130 int getrawlist(char *, char **, int); 131 uid_t getuserid(char *); 132 int grabh(struct header *, int); 133 int group(void *); 134 void hangup(int); 135 int hash(const char *); 136 void hdrstop(int); 137 int headers(void *); 138 int help(void *); 139 void holdsigs(void); 140 int ifcmd(void *); 141 int igcomp(const void *, const void *); 142 int igfield(void *); 143 int ignore1(char **, struct ignoretab *, const char *); 144 int igshow(struct ignoretab *, const char *); 145 int inc(void *); 146 int incfile(void); 147 void intr(int); 148 int isdate(char *); 149 int isdir(char *); 150 int isfileaddr(char *); 151 int ishead(char *); 152 int isign(const char *, struct ignoretab [2]); 153 int isprefix(const char *, const char *); 154 void istrncpy(char *, const char *, size_t); 155 const struct cmd * 156 lex(char *); 157 void load(char *); 158 struct var * 159 lookup(const char *); 160 int mail(struct name *, 161 struct name *, struct name *, struct name *, char *, char *); 162 void mail1(struct header *, int); 163 void makemessage(FILE *, int); 164 void mark(int); 165 int markall(char *, int); 166 int matchsender(char *, int); 167 int matchfield(char *, int); 168 int mboxit(void *); 169 int member(char *, struct ignoretab *); 170 void mesedit(FILE *, int); 171 void mespipe(FILE *, char *); 172 int messize(void *); 173 int metamess(int, int); 174 int more(void *); 175 int newfileinfo(int); 176 int next(void *); 177 int null(void *); 178 void parse(char *, struct headline *, char *); 179 int pcmdlist(void *); 180 int pdot(void *); 181 void prepare_child(sigset_t *, int, int); 182 int preserve(void *); 183 void prettyprint(struct name *); 184 void printgroup(char *); 185 void printhead(int); 186 int puthead(struct header *, FILE *, int); 187 int putline(FILE *, char *, int); 188 int pversion(void *); 189 void quit(void); 190 int quitcmd(void *); 191 int readline(FILE *, char *, int); 192 void register_file(FILE *, int, int); 193 void regret(int); 194 void relsesigs(void); 195 int respond(void *); 196 int retfield(void *); 197 int rexit(void *); 198 int rm(char *); 199 int run_command(char *, sigset_t *, int, int, ...); 200 int save(void *v); 201 int save1(char *, int, const char *, struct ignoretab *); 202 void savedeadletter(FILE *); 203 int saveigfield(void *); 204 int savemail(char *, FILE *); 205 int saveretfield(void *); 206 int scan(char **); 207 void scaninit(void); 208 int schdir(void *); 209 int screensize(void); 210 int scroll(void *); 211 int sendmessage(struct message *, FILE *, struct ignoretab *, char *); 212 int sendmail(void *); 213 int set(void *); 214 int setfile(char *); 215 void setmsize(int); 216 void setptr(FILE *, off_t); 217 void setscreensize(void); 218 int shell(void *); 219 void sigchild(int); 220 void sort(char **); 221 int source(void *); 222 void spreserve(void); 223 void sreset(void); 224 int start_command(char *, sigset_t *, int, int, ...); 225 void statusput(struct message *, FILE *, char *); 226 void stop(int); 227 int stouch(void *); 228 int swrite(void *); 229 void tinit(void); 230 int top(void *); 231 void touch(struct message *); 232 void ttyint(int); 233 void ttystop(int); 234 int type(void *); 235 int type1(int *, int, int); 236 int undeletecmd(void *); 237 void unmark(int); 238 char **unpack(struct name *); 239 int unread(void *); 240 void unregister_file(FILE *); 241 int unset(void *); 242 int unstack(void); 243 void vfree(char *); 244 int visual(void *); 245 int wait_child(int); 246 int wait_command(int); 247 int writeback(FILE *); 248 249 extern char *__progname; 250 extern char *tmpdir; 251