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 int hash(const char *); 135 void hdrstop(int); 136 int headers(void *); 137 int help(void *); 138 void holdsigs(void); 139 int ifcmd(void *); 140 int igcomp(const void *, const void *); 141 int igfield(void *); 142 int ignore1(char **, struct ignoretab *, const char *); 143 int igshow(struct ignoretab *, const char *); 144 int inc(void *); 145 int incfile(void); 146 void intr(int); 147 int isdate(char *); 148 int isdir(char *); 149 int isfileaddr(char *); 150 int ishead(char *); 151 int isign(const char *, struct ignoretab [2]); 152 int isprefix(const char *, const char *); 153 void istrncpy(char *, const char *, size_t); 154 const struct cmd * 155 lex(char *); 156 void load(char *); 157 struct var * 158 lookup(const char *); 159 int mail(struct name *, 160 struct name *, struct name *, struct name *, char *, char *); 161 void mail1(struct header *, int); 162 void makemessage(FILE *, int); 163 void mark(int); 164 int markall(char *, int); 165 int matchsender(char *, int); 166 int matchfield(char *, int); 167 int mboxit(void *); 168 int member(char *, struct ignoretab *); 169 void mesedit(FILE *, int); 170 void mespipe(FILE *, char *); 171 int messize(void *); 172 int metamess(int, int); 173 int more(void *); 174 int newfileinfo(int); 175 int next(void *); 176 int null(void *); 177 void parse(char *, struct headline *, char *); 178 int pcmdlist(void *); 179 int pdot(void *); 180 void prepare_child(sigset_t *, int, int); 181 int preserve(void *); 182 void prettyprint(struct name *); 183 void printgroup(char *); 184 void printhead(int); 185 int puthead(struct header *, FILE *, int); 186 int putline(FILE *, char *, int); 187 int pversion(void *); 188 void quit(void); 189 int quitcmd(void *); 190 int readline(FILE *, char *, int); 191 void register_file(FILE *, int, int); 192 void regret(int); 193 void relsesigs(void); 194 int respond(void *); 195 int retfield(void *); 196 int rexit(void *); 197 int rm(char *); 198 int run_command(char *, sigset_t *, int, int, ...); 199 int save(void *v); 200 int save1(char *, int, const char *, struct ignoretab *); 201 void savedeadletter(FILE *); 202 int saveigfield(void *); 203 int savemail(char *, FILE *); 204 int saveretfield(void *); 205 int scan(char **); 206 void scaninit(void); 207 int schdir(void *); 208 int screensize(void); 209 int scroll(void *); 210 int sendmessage(struct message *, FILE *, struct ignoretab *, char *); 211 int sendmail(void *); 212 int set(void *); 213 int setfile(char *); 214 void setmsize(int); 215 void setptr(FILE *, off_t); 216 void setscreensize(void); 217 int shell(void *); 218 void sigchild(int); 219 void sort(char **); 220 int source(void *); 221 void spreserve(void); 222 void sreset(void); 223 int start_command(char *, sigset_t *, int, int, ...); 224 void statusput(struct message *, FILE *, char *); 225 void stop(int); 226 int stouch(void *); 227 int swrite(void *); 228 void tinit(void); 229 int top(void *); 230 void touch(struct message *); 231 void ttyint(int); 232 void ttystop(int); 233 int type(void *); 234 int type1(int *, int, int); 235 int undeletecmd(void *); 236 void unmark(int); 237 char **unpack(struct name *); 238 int unread(void *); 239 void unregister_file(FILE *); 240 int unset(void *); 241 int unstack(void); 242 void vfree(char *); 243 int visual(void *); 244 int wait_child(int); 245 int wait_command(int); 246 int writeback(FILE *); 247 248 extern char *__progname; 249 extern char *tmpdir; 250