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