11590Srgrimes/*- 21590Srgrimes * Copyright (c) 1992, 1993 31590Srgrimes * The Regents of the University of California. All rights reserved. 41590Srgrimes * 51590Srgrimes * Redistribution and use in source and binary forms, with or without 61590Srgrimes * modification, are permitted provided that the following conditions 71590Srgrimes * are met: 81590Srgrimes * 1. Redistributions of source code must retain the above copyright 91590Srgrimes * notice, this list of conditions and the following disclaimer. 101590Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111590Srgrimes * notice, this list of conditions and the following disclaimer in the 121590Srgrimes * documentation and/or other materials provided with the distribution. 131590Srgrimes * 4. Neither the name of the University nor the names of its contributors 141590Srgrimes * may be used to endorse or promote products derived from this software 151590Srgrimes * without specific prior written permission. 161590Srgrimes * 171590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 181590Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191590Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201590Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211590Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271590Srgrimes * SUCH DAMAGE. 281590Srgrimes * 2988150Smikeh * @(#)extern.h 8.2 (Berkeley) 4/20/95 3074769Smikeh * 3174769Smikeh * $FreeBSD: stable/11/usr.bin/mail/extern.h 336953 2018-07-31 00:37:25Z markj $ 321590Srgrimes */ 331590Srgrimes 3492921Simpstruct name *cat(struct name *, struct name *); 3592921Simpstruct name *delname(struct name *, char []); 3692921Simpstruct name *elide(struct name *); 3792921Simpstruct name *extract(char [], int); 3892921Simpstruct name *gexpand(struct name *, struct grouphead *, int, int); 3992921Simpstruct name *nalloc(char [], int); 4092921Simpstruct name *outof(struct name *, FILE *, struct header *); 4192921Simpstruct name *put(struct name *, struct name *); 4292921Simpstruct name *tailof(struct name *); 4392921Simpstruct name *usermap(struct name *); 4492921SimpFILE *Fdopen(int, const char *); 4592921SimpFILE *Fopen(const char *, const char *); 4692921SimpFILE *Popen(char *, const char *); 4792921SimpFILE *collect(struct header *, int); 4892921Simpchar *copyin(char *, char **); 4992921Simpchar *detract(struct name *, int); 5092921Simpchar *expand(char *); 5192921Simpchar *getdeadletter(void); 52336953Smarkjchar *getname(int); 5392921Simpchar *hfield(const char *, struct message *); 5492921SimpFILE *infix(struct header *, FILE *); 5592921Simpchar *ishfield(char [], char *, const char *); 5692921Simpchar *name1(struct message *, int); 5792921Simpchar *nameof(struct message *, int); 5892921Simpchar *nextword(char *, char *); 5992921Simpchar *readtty(const char *, char []); 6092921Simpchar *reedit(char *); 6192921SimpFILE *run_editor(FILE *, off_t, int, int); 6292921Simpchar *salloc(int); 6392921Simpchar *savestr(char *); 6492921SimpFILE *setinput(struct message *); 6592921Simpchar *skin(char *); 6692921Simpchar *skip_comment(char *); 6792921Simpchar *snarf(char [], int *); 6892921Simpchar *username(void); 6992921Simpchar *value(const char *); 7092921Simpchar *vcopy(const char *); 7192921Simpchar *yankword(char *, char []); 72126415Smikehchar *yanklogin(char *, char []); 7392921Simpint Fclose(FILE *); 7492921Simpint More(int *); 7592921Simpint Pclose(FILE *); 7692921Simpint Respond(int *); 7792921Simpint Type(int *); 7892921Simpint doRespond(int []); 7992921Simpint dorespond(int *); 8092921Simpvoid alter(char *); 8192921Simpint alternates(char **); 8292921Simpvoid announce(void); 8392921Simpint append(struct message *, FILE *); 8492921Simpint argcount(char **); 8592921Simpvoid assign(const char *, const char *); 8692921Simpint bangexp(char *, size_t); 8792921Simpvoid brokpipe(int); 8892921Simpint charcount(char *, int); 8992921Simpint check(int, int); 9092921Simpvoid clob1(int); 9192921Simpint clobber(char **); 9292921Simpvoid close_all_files(void); 9392921Simpint cmatch(char *, char *); 9492921Simpvoid collhup(int); 9592921Simpvoid collint(int); 9692921Simpvoid collstop(int); 9792921Simpvoid commands(void); 98336953Smarkjint copycmd(char []); 9992921Simpint core(void); 10092921Simpint count(struct name *); 10192921Simpint delete(int []); 10292921Simpint delm(int []); 10392921Simpint deltype(int []); 10492921Simpvoid demail(void); 10592921Simpint diction(const void *, const void *); 10692921Simpint dosh(char *); 10792921Simpint echo(char **); 10892921Simpint edit1(int *, int); 10992921Simpint editor(int *); 11092921Simpvoid edstop(void); 11192921Simpint elsecmd(void); 11292921Simpint endifcmd(void); 11392921Simpint evalcol(int); 11492921Simpint execute(char [], int); 11592921Simpint exwrite(char [], FILE *, int); 11692921Simpvoid fail(const char *, const char *); 11792921Simpint file(char **); 1181590Srgrimesstruct grouphead * 11992921Simp findgroup(char []); 12092921Simpvoid findmail(char *, char *, int); 12192921Simpint first(int, int); 12292921Simpvoid fixhead(struct header *, struct name *); 12392921Simpvoid fmt(const char *, struct name *, FILE *, int); 12492921Simpint folders(void); 12592921Simpint forward(char [], FILE *, char *, int); 12692921Simpvoid free_child(int); 12792921Simpint from(int *); 12892921Simpoff_t fsize(FILE *); 12992921Simpint getfold(char *, int); 13092921Simpint gethfield(FILE *, char [], int, char **); 13192921Simpint getmsglist(char *, int *, int); 13292921Simpint getrawlist(char [], char **, int); 133336953Smarkjint getuserid(char []); 13492921Simpint grabh(struct header *, int); 13592921Simpint group(char **); 13692921Simpvoid hangup(int); 13792921Simpint hash(const char *); 13892921Simpvoid hdrstop(int); 13992921Simpint headers(int *); 14092921Simpint help(void); 14192921Simpvoid holdsigs(void); 14292921Simpint ifcmd(char **); 14392921Simpint igcomp(const void *, const void *); 14492921Simpint igfield(char *[]); 14592921Simpint ignore1(char *[], struct ignoretab *, const char *); 14692921Simpint igshow(struct ignoretab *, const char *); 14792921Simpint inc(void *); 14892921Simpint incfile(void); 14992921Simpvoid intr(int); 15092921Simpint isdate(char []); 15192921Simpint isdir(char []); 15292921Simpint isfileaddr(char *); 15392921Simpint ishead(char []); 15492921Simpint isign(const char *, struct ignoretab []); 15592921Simpint isprefix(const char *, const char *); 15692921Simpvoid istrncpy(char *, const char *, size_t); 157228468Sedconst struct cmd * 15892921Simp lex(char []); 15992921Simpvoid load(char *); 1601590Srgrimesstruct var * 16192921Simp lookup(const char *); 16292921Simpint mail(struct name *, 16392921Simp struct name *, struct name *, struct name *, char *, char *); 16492921Simpvoid mail1(struct header *, int); 16592921Simpvoid makemessage(FILE *, int); 16692921Simpvoid mark(int); 16792921Simpint markall(char [], int); 16892921Simpint matchsender(char *, int); 16998803Smikehint matchfield(char *, int); 17092921Simpint mboxit(int []); 17192921Simpint member(char *, struct ignoretab *); 17292921Simpvoid mesedit(FILE *, int); 17392921Simpvoid mespipe(FILE *, char []); 17492921Simpint messize(int *); 17592921Simpint metamess(int, int); 17692921Simpint more(int *); 17792921Simpint newfileinfo(int); 17892921Simpint next(int *); 17992921Simpint null(int); 18092921Simpvoid parse(char [], struct headline *, char []); 18192921Simpint pcmdlist(void); 18292921Simpint pdot(void); 18392921Simpvoid prepare_child(sigset_t *, int, int); 18492921Simpint preserve(int *); 18592921Simpvoid prettyprint(struct name *); 18692921Simpvoid printgroup(char []); 18792921Simpvoid printhead(int); 18892921Simpint puthead(struct header *, FILE *, int); 18992921Simpint putline(FILE *, char *, int); 19092921Simpint pversion(int); 19192921Simpvoid quit(void); 19292921Simpint quitcmd(void); 19392921Simpint readline(FILE *, char *, int); 19492921Simpvoid register_file(FILE *, int, int); 19592921Simpvoid regret(int); 19692921Simpvoid relsesigs(void); 19792921Simpint respond(int *); 19892921Simpint retfield(char *[]); 19992921Simpint rexit(int); 20092921Simpint rm(char *); 201336953Smarkjint run_command(char *, sigset_t *, int, int, char *, char *, char *); 202336953Smarkjint save(char []); 20392921Simpint save1(char [], int, const char *, struct ignoretab *); 20492921Simpvoid savedeadletter(FILE *); 20592921Simpint saveigfield(char *[]); 20692921Simpint savemail(char [], FILE *); 20792921Simpint saveretfield(char *[]); 20892921Simpint scan(char **); 20992921Simpvoid scaninit(void); 21092921Simpint schdir(char **); 21192921Simpint screensize(void); 21292921Simpint scroll(char []); 21392921Simpint sendmessage(struct message *, FILE *, struct ignoretab *, char *); 21492921Simpint sendmail(char *); 21592921Simpint set(char **); 21692921Simpint setfile(char *); 21792921Simpvoid setmsize(int); 21892921Simpvoid setptr(FILE *, off_t); 21992921Simpvoid setscreensize(void); 22092921Simpint shell(char *); 22192921Simpvoid sigchild(int); 22292921Simpvoid sort(char **); 22392921Simpint source(char **); 22492921Simpvoid spreserve(void); 22592921Simpvoid sreset(void); 226336953Smarkjint start_command(char *, sigset_t *, int, int, char *, char *, char *); 22792921Simpvoid statusput(struct message *, FILE *, char *); 22892921Simpvoid stop(int); 22992921Simpint stouch(int []); 23092921Simpint swrite(char []); 23192921Simpvoid tinit(void); 23292921Simpint top(int *); 23392921Simpvoid touch(struct message *); 23492921Simpvoid ttyint(int); 23592921Simpvoid ttystop(int); 23692921Simpint type(int *); 23792921Simpint type1(int *, int, int); 23892921Simpint undelete_messages(int *); 23992921Simpvoid unmark(int); 24092921Simpchar **unpack(struct name *); 24192921Simpint unread(int []); 24292921Simpvoid unregister_file(FILE *); 24392921Simpint unset(char **); 24492921Simpint unstack(void); 24592921Simpvoid vfree(char *); 24692921Simpint visual(int *); 24792921Simpint wait_child(int); 24892921Simpint wait_command(int); 24992921Simpint writeback(FILE *); 25074769Smikeh 25174769Smikehextern char *__progname; 25274769Smikehextern char *tmpdir; 253