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