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