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