xref: /netbsd-src/usr.bin/mail/extern.h (revision 23c8222edbfb0f0932d88a8351d3a0cf817dfb9e)
1 /*	$NetBSD: extern.h,v 1.19 2003/10/31 01:25:54 ross Exp $	*/
2 
3 /*-
4  * Copyright (c) 1992, 1993
5  *	The Regents of the University of California.  All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
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.
18  *
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
29  * SUCH DAMAGE.
30  *
31  *	@(#)extern.h	8.2 (Berkeley) 4/20/95
32  *	$NetBSD: extern.h,v 1.19 2003/10/31 01:25:54 ross Exp $
33  */
34 
35 struct name;
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 grouphead;
41 struct name *gexpand(struct name *, struct grouphead *, int, int);
42 struct name *nalloc(char [], int);
43 struct header;
44 struct name *outof(struct name *, FILE *, struct header *);
45 struct name *put(struct name *, struct name *);
46 struct name *tailof(struct name *);
47 struct name *usermap(struct name *);
48 FILE	*Fdopen(int, char *);
49 FILE	*Fopen(char *, char *);
50 FILE	*Popen(char *, char *);
51 FILE	*collect(struct header *, int);
52 char	*copy(char *, char *);
53 char	*copyin(char *, char **);
54 char	*detract(struct name *, int);
55 char	*expand(char *);
56 char	*getdeadletter(void);
57 const	char *getname(int);
58 struct message;
59 char	*hfield(const char [], const struct message *);
60 FILE	*infix(struct header *, FILE *);
61 char	*ishfield(const char [], char[], const char *);
62 char	*name1(struct message *, int);
63 char	*nameof(struct message *, int);
64 char	*nextword(char *, char *);
65 char	*readtty(char [], char []);
66 char 	*reedit(char *);
67 FILE	*run_editor(FILE *, off_t, int, int);
68 char	*salloc(int);
69 char	*savestr(const char *);
70 FILE	*setinput(const struct message *);
71 char	*skin(char *);
72 char	*skip_comment(char *);
73 char	*snarf(char [], int *);
74 const	char *username(void);
75 char	*value(char []);
76 char	*vcopy(char []);
77 char	*yankword(char *, char []);
78 int	 Fclose(FILE *);
79 int	 More(void *);
80 int	 Pclose(FILE *);
81 int	 Respond(void *);
82 int	 Type(void *);
83 int	 _Respond(int []);
84 int	 _respond(int *);
85 void	 alter(char *);
86 int	 alternates(void *);
87 void	 announce(void);
88 int	 append(struct message *, FILE *);
89 int	 argcount(char **);
90 void	 assign(char [], char []);
91 int	 bangexp(char *);
92 int	 blankline(char []);
93 void	 brokpipe(int);
94 int	 charcount(char *, int);
95 int	 check(int, int);
96 void	 clob1(int);
97 int	 clobber(void *);
98 void	 close_all_files(void);
99 int	 cmatch(char *, char *);
100 void	 collhup(int);
101 void	 collint(int);
102 void	 collstop(int);
103 void	 commands(void);
104 int	 copycmd(void *);
105 int	 core(void *);
106 int	 count(struct name *);
107 int	 delete(void *);
108 int	 delm(int []);
109 int	 deltype(void *);
110 void	 demail(void);
111 int	 dosh(void *);
112 int	 dot_lock(const char *, int, FILE *, const char *);
113 void	 dot_unlock(const char *);
114 int	 echo(void *);
115 int	 edit1(int *, int);
116 int	 editor(void *);
117 void	 edstop(void);
118 int	 elsecmd(void *);
119 int	 endifcmd(void *);
120 int	 evalcol(int);
121 int	 execute(char [], int);
122 int	 exwrite(char [], FILE *, int);
123 void	 fail(char [], char []);
124 int	 file(void *);
125 struct grouphead *
126 	 findgroup(char []);
127 void	 findmail(char *, char *);
128 int	 first(int, int);
129 void	 fixhead(struct header *, struct name *);
130 void	 fmt(char *, struct name *, FILE *, int);
131 int	 folders(void *);
132 int	 forward(char [], FILE *, char *, int);
133 void	 free_child(int);
134 int	 from(void *);
135 off_t	 fsize(FILE *);
136 int	 getfold(char *);
137 int	 gethfield(FILE *, char [], int, char **);
138 int	 getmsglist(char *, int *, int);
139 int	 getrawlist(char [], char **, int);
140 int	 getuserid(char []);
141 int	 grabh(struct header *, int);
142 int	 group(void *);
143 void	 hangup(int);
144 int	 hash(char *);
145 void	 hdrstop(int);
146 int	 headers(void *);
147 int	 help(void *);
148 void	 holdsigs(void);
149 int	 ifcmd(void *);
150 int	 igfield(void *);
151 struct ignoretab;
152 int	 ignore1(char *[], struct ignoretab *, char *);
153 int	 igshow(struct ignoretab *, char *);
154 void	 intr(int);
155 int	 inc(void *);
156 int	 incfile(void);
157 int	 isdate(char []);
158 int	 isdir(char []);
159 int	 isfileaddr(char *);
160 int	 ishead(char []);
161 int	 isign(char *, struct ignoretab []);
162 int	 isprefix(char *, char *);
163 void	 istrcpy(char *, char *);
164 const struct cmd *
165 	 lex(char []);
166 void	 load(char *);
167 struct var *
168 	 lookup(char []);
169 int	 mail(struct name *,
170 	      struct name *, struct name *, struct name *, char *);
171 void	 mail1(struct header *, int);
172 void	 makemessage(FILE *, int);
173 void	 mark(int);
174 int	 markall(char [], int);
175 int	 matchsender(char *, int);
176 int	 matchsubj(char *, int);
177 int	 mboxit(void *);
178 int	 member(char *, struct ignoretab *);
179 void	 mesedit(FILE *, int);
180 void	 mespipe(FILE *, char []);
181 int	 messize(void *);
182 int	 metamess(int, int);
183 int	 more(void *);
184 int	 newfileinfo(int);
185 int	 next(void *);
186 int	 null(void *);
187 struct headline;
188 void	 parse(char [], struct headline *, char []);
189 int	 pcmdlist(void *);
190 int	 pdot(void *);
191 void	 prepare_child(sigset_t *, int, int);
192 int	 preserve(void *);
193 void	 prettyprint(struct name *);
194 void	 printgroup(char []);
195 void	 printhead(int);
196 int	 puthead(struct header *, FILE *, int);
197 int	 putline(FILE *, char *, int);
198 int	 pversion(void *);
199 void	 quit(void);
200 int	 quitcmd(void *);
201 int	 upcase(int);
202 int	 readline(FILE *, char *, int);
203 void	 register_file(FILE *, int, int);
204 void	 regret(int);
205 void	 relsesigs(void);
206 int	 respond(void *);
207 int	 retfield(void *);
208 int	 rexit(void *);
209 int	 rm(char *);
210 int	 run_command(char *, sigset_t *, int, int, ...);
211 int	 save(void *);
212 int	 Save(void *);
213 int	 save1(char [], int, char *, struct ignoretab *);
214 void	 savedeadletter(FILE *);
215 int	 saveigfield(void *);
216 int	 savemail(char [], FILE *);
217 int	 saveretfield(void *);
218 int	 scan(char **);
219 void	 scaninit(void);
220 int	 schdir(void *);
221 int	 screensize(void);
222 int	 scroll(void *);
223 int	 sendmessage(struct message *, FILE *, struct ignoretab *, char *);
224 int	 sendmail(void *);
225 int	 set(void *);
226 int	 setfile(char *);
227 void	 setmsize(int);
228 void	 setptr(FILE *, off_t);
229 void	 setscreensize(void);
230 int	 shell(void *);
231 void	 sigchild(int);
232 void	 sort(char **);
233 int	 source(void *);
234 void	 spreserve(void);
235 void	 sreset(void);
236 int	 start_command(char *, sigset_t *, int, int, ...);
237 void	 statusput(struct message *, FILE *, char *);
238 void	 stop(int);
239 int	 stouch(void *);
240 int	 swrite(void *);
241 void	 tinit(void);
242 int	 top(void *);
243 void	 touch(struct message *);
244 void	 ttyint(int);
245 void	 ttystop(int);
246 int	 type(void *);
247 int	 type1(int *, int, int);
248 int	 undeletecmd(void *);
249 void	 unmark(int);
250 char	**unpack(struct name *);
251 int	 unread(void *);
252 void	 unregister_file(FILE *);
253 int	 unset(void *);
254 int	 unstack(void);
255 void	 v_free(char *);
256 int	 visual(void *);
257 int	 wait_child(int);
258 int	 wait_command(int);
259 int	 writeback(FILE *);
260