2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
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.
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
31 * @(#)extern.h 8.2 (Berkeley) 4/20/95
36 struct name *cat(struct name *, struct name *);
37 struct name *delname(struct name *, char *);
38 struct name *elide(struct name *);
39 struct name *extract(char *, int);
40 struct name *gexpand(struct name *, struct grouphead *, int, int);
41 struct name *nalloc(char *, int);
42 struct name *outof(struct name *, FILE *, struct header *);
43 struct name *put(struct name *, struct name *);
44 struct name *tailof(struct name *);
45 struct name *usermap(struct name *);
46 FILE *Fdopen(int, const char *);
47 FILE *Fopen(const char *, const char *);
48 FILE *Popen(char *, const char *);
49 FILE *collect(struct header *, int);
50 char *copyin(char *, char **);
51 char *detract(struct name *, int);
53 char *getdeadletter(void);
55 char *hfield(const char *, struct message *);
56 FILE *infix(struct header *, FILE *);
57 char *ishfield(char *, char *, const char *);
58 char *name1(struct message *, int);
59 char *nameof(struct message *, int);
60 char *nextword(char *, char *);
61 char *readtty(const char *, char *);
63 FILE *run_editor(FILE *, off_t, int, int);
65 char *savestr(char *);
66 FILE *setinput(struct message *);
68 char *skip_comment(char *);
69 char *snarf(char *, int *);
71 char *value(const char *);
72 char *vcopy(const char *);
73 char *yankword(char *, char *);
74 char *yanklogin(char *, char *);
83 int alternates(char **);
85 int append(struct message *, FILE *);
86 int argcount(char **);
87 void assign(const char *, const char *);
88 int bangexp(char *, size_t);
90 int charcount(char *, int);
94 void close_all_files(void);
95 int cmatch(char *, char *);
100 int copycmd(void *v);
102 int count(struct name *);
103 int deletecmd(void *);
107 int diction(const void *, const void *);
110 int edit1(int *, int);
116 int execute(char *, int);
117 int exwrite(char *, FILE *, int);
118 void fail(const char *, const char *);
122 void findmail(char *, char *, int);
124 void fixhead(struct header *, struct name *);
125 void fmt(const char *, struct name *, FILE *, int);
127 int forward(char *, FILE *, char *, int);
128 void free_child(int);
131 int getfold(char *, int);
132 int gethfield(FILE *, char *, int, char **);
133 int getmsglist(char *, int *, int);
134 int getrawlist(char *, char **, int);
135 uid_t getuserid(char *);
136 int grabh(struct header *, int);
139 int hash(const char *);
145 int igcomp(const void *, const void *);
147 int ignore1(char **, struct ignoretab *, const char *);
148 int igshow(struct ignoretab *, const char *);
154 int isfileaddr(char *);
156 int isign(const char *, struct ignoretab []);
157 int isprefix(const char *, const char *);
158 void istrncpy(char *, const char *, size_t);
163 lookup(const char *);
164 int mail(struct name *,
165 struct name *, struct name *, struct name *, char *, char *);
166 void mail1(struct header *, int);
167 void makemessage(FILE *, int);
169 int markall(char *, int);
170 int matchsender(char *, int);
171 int matchfield(char *, int);
173 int member(char *, struct ignoretab *);
174 void mesedit(FILE *, int);
175 void mespipe(FILE *, char *);
177 int metamess(int, int);
179 int newfileinfo(int);
182 void parse(char *, struct headline *, char *);
185 void prepare_child(sigset_t *, int, int);
186 int preserve(void *);
187 void prettyprint(struct name *);
188 void printgroup(char *);
190 int puthead(struct header *, FILE *, int);
191 int putline(FILE *, char *, int);
195 int readline(FILE *, char *, int);
196 void register_file(FILE *, int, int);
198 void relsesigs(void);
200 int retfield(void *);
203 int run_command(char *, sigset_t *, int, int, ...);
205 int save1(char *, int, const char *, struct ignoretab *);
206 void savedeadletter(FILE *);
207 int saveigfield(void *);
208 int savemail(char *, FILE *);
209 int saveretfield(void *);
213 int screensize(void);
215 int sendmessage(struct message *, FILE *, struct ignoretab *, char *);
216 int sendmail(char *);
220 void setptr(FILE *, off_t);
221 void setscreensize(void);
226 void spreserve(void);
228 int start_command(char *, sigset_t *, int, int, ...);
229 void statusput(struct message *, FILE *, char *);
235 void touch(struct message *);
239 int type1(int *, int, int);
240 int undeletecmd(void *);
242 char **unpack(struct name *);
244 void unregister_file(FILE *);
250 int wait_command(int);
251 int writeback(FILE *);
253 extern char *__progname;