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