xref: /freebsd/usr.bin/mail/extern.h (revision 5dae51da3da0cc94d17bd67b308fad304ebec7e0)
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  * 4. 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$
32  */
33 
34 struct name *cat(struct name *, struct name *);
35 struct name *delname(struct name *, char *);
36 struct name *elide(struct name *);
37 struct name *extract(char *, int);
38 struct name *gexpand(struct name *, struct grouphead *, int, int);
39 struct name *nalloc(char *, int);
40 struct name *outof(struct name *, FILE *, struct header *);
41 struct name *put(struct name *, struct name *);
42 struct name *tailof(struct name *);
43 struct name *usermap(struct name *);
44 FILE	*Fdopen(int, const char *);
45 FILE	*Fopen(const char *, const char *);
46 FILE	*Popen(char *, const char *);
47 FILE	*collect(struct header *, int);
48 char	*copyin(char *, char **);
49 char	*detract(struct name *, int);
50 char	*expand(char *);
51 char	*getdeadletter(void);
52 char	*getname(uid_t);
53 char	*hfield(const char *, struct message *);
54 FILE	*infix(struct header *, FILE *);
55 char	*ishfield(char *, char *, const char *);
56 char	*name1(struct message *, int);
57 char	*nameof(struct message *, int);
58 char	*nextword(char *, char *);
59 char	*readtty(const char *, char *);
60 char 	*reedit(char *);
61 FILE	*run_editor(FILE *, off_t, int, int);
62 char	*salloc(int);
63 char	*savestr(char *);
64 FILE	*setinput(struct message *);
65 char	*skin(char *);
66 char	*skip_comment(char *);
67 char	*snarf(char *, int *);
68 char	*username(void);
69 char	*value(const char *);
70 char	*vcopy(const char *);
71 char	*yankword(char *, char *);
72 char	*yanklogin(char *, char *);
73 int	 Fclose(FILE *);
74 int	 More(void *);
75 int	 Pclose(FILE *);
76 int	 Respond(int *);
77 int	 Type(void *);
78 int	 doRespond(int *);
79 int	 dorespond(int *);
80 void	 alter(char *);
81 int	 alternates(char **);
82 void	 announce(void);
83 int	 append(struct message *, FILE *);
84 int	 argcount(char **);
85 void	 assign(const char *, const char *);
86 int	 bangexp(char *, size_t);
87 void	 brokpipe(int);
88 int	 charcount(char *, int);
89 int	 check(int, int);
90 void	 clob1(int);
91 int	 clobber(char **);
92 void	 close_all_files(void);
93 int	 cmatch(char *, char *);
94 void	 collhup(int);
95 void	 collint(int);
96 void	 collstop(int);
97 void	 commands(void);
98 int	 copycmd(void *v);
99 int	 core(void);
100 int	 count(struct name *);
101 int	 deletecmd(void *);
102 int	 delm(int *);
103 int	 deltype(void *);
104 void	 demail(void);
105 int	 diction(const void *, const void *);
106 int	 dosh(char *);
107 int	 echo(char **);
108 int	 edit1(int *, int);
109 int	 editor(int *);
110 void	 edstop(void);
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(void *);
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 uid_t	 getuserid(char *);
134 int	 grabh(struct header *, int);
135 int	 group(void *);
136 void	 hangup(int);
137 int	 hash(const char *);
138 void	 hdrstop(int);
139 int	 headers(void *);
140 int	 help(void);
141 void	 holdsigs(void);
142 int	 ifcmd(char **);
143 int	 igcomp(const void *, const void *);
144 int	 igfield(void *);
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 void	 mark(int);
167 int	 markall(char *, int);
168 int	 matchsender(char *, int);
169 int	 matchfield(char *, int);
170 int	 mboxit(void *);
171 int	 member(char *, struct ignoretab *);
172 void	 mesedit(FILE *, int);
173 void	 mespipe(FILE *, char *);
174 int	 messize(void *);
175 int	 metamess(int, int);
176 int	 more(void *);
177 int	 newfileinfo(int);
178 int	 next(void *);
179 int	 null(int);
180 void	 parse(char *, struct headline *, char *);
181 int	 pcmdlist(void);
182 int	 pdot(void);
183 void	 prepare_child(sigset_t *, int, int);
184 int	 preserve(void *);
185 void	 prettyprint(struct name *);
186 void	 printgroup(char *);
187 void	 printhead(int);
188 int	 puthead(struct header *, FILE *, int);
189 int	 putline(FILE *, char *, int);
190 int	 pversion(int);
191 void	 quit(void);
192 int	 quitcmd(void);
193 int	 readline(FILE *, char *, int);
194 void	 register_file(FILE *, int, int);
195 void	 regret(int);
196 void	 relsesigs(void);
197 int	 respond(void *);
198 int	 retfield(void *);
199 int	 rexit(void *);
200 int	 rm(char *);
201 int	 run_command(char *, sigset_t *, int, int, ...);
202 int	 save(void *v);
203 int	 save1(char *, int, const char *, struct ignoretab *);
204 void	 savedeadletter(FILE *);
205 int	 saveigfield(void *);
206 int	 savemail(char *, FILE *);
207 int	 saveretfield(void *);
208 int	 scan(char **);
209 void	 scaninit(void);
210 int	 schdir(void *);
211 int	 screensize(void);
212 int	 scroll(void *);
213 int	 sendmessage(struct message *, FILE *, struct ignoretab *, char *);
214 int	 sendmail(char *);
215 int	 set(void *);
216 int	 setfile(char *);
217 void	 setmsize(int);
218 void	 setptr(FILE *, off_t);
219 void	 setscreensize(void);
220 int	 shell(char *);
221 void	 sigchild(int);
222 void	 sort(char **);
223 int	 source(char **);
224 void	 spreserve(void);
225 void	 sreset(void);
226 int	 start_command(char *, sigset_t *, int, int, ...);
227 void	 statusput(struct message *, FILE *, char *);
228 void	 stop(int);
229 int	 stouch(void *);
230 int	 swrite(void *);
231 void	 tinit(void);
232 int	 top(void *);
233 void	 touch(struct message *);
234 void	 ttyint(int);
235 void	 ttystop(int);
236 int	 type(void *);
237 int	 type1(int *, int, int);
238 int	 undeletecmd(void *);
239 void	 unmark(int);
240 char	**unpack(struct name *);
241 int	 unread(void *);
242 void	 unregister_file(FILE *);
243 int	 unset(void *);
244 int	 unstack(void);
245 void	 vfree(char *);
246 int	 visual(int *);
247 int	 wait_child(int);
248 int	 wait_command(int);
249 int	 writeback(FILE *);
250 
251 extern char *__progname;
252 extern char *tmpdir;
253