extern.h revision 1.25 1 /* $NetBSD: extern.h,v 1.25 2006/10/21 21:37:20 christos 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.25 2006/10/21 21:37:20 christos 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 *lexpand(char *, int);
43 struct name *nalloc(char [], int);
44 struct header;
45 struct name *outof(struct name *, FILE *, struct header *);
46 struct name *put(struct name *, struct name *);
47 struct name *tailof(struct name *);
48 struct name *usermap(struct name *);
49 FILE *Fdopen(int, const char *);
50 FILE *Fopen(const char *, const char *);
51 FILE *Popen(const char *, const char *);
52 FILE *collect(struct header *, int);
53 char *copy(char *, char *);
54 char *copyin(const char *, char **);
55 void *csalloc(size_t, size_t);
56 char *detract(struct name *, int);
57 const char *expand(const char *);
58 const char *getdeadletter(void);
59 const char *getname(uid_t);
60 struct message;
61 char *hfield(const char [], const struct message *);
62 FILE *infix(struct header *, FILE *);
63 char *ishfield(const char [], char[], const char *);
64 char *name1(struct message *, int);
65 char *nameof(struct message *, int);
66 const char *nextword(const char *, char *);
67 char *readtty(const char [], char []);
68 char *reedit(char *);
69 FILE *run_editor(FILE *, off_t, int, int);
70 void *salloc(size_t);
71 char *savestr(const char *);
72 FILE *setinput(const struct message *);
73 char *skin(char *);
74 char *skip_comment(char *);
75 char *snarf(char [], int *);
76 const char *username(void);
77 char *value(const char []);
78 char *vcopy(const char []);
79 char *yankword(char *, char []);
80 int Fclose(FILE *);
81 int More(void *);
82 int Pclose(FILE *);
83 int Respond(void *);
84 int Type(void *);
85 int _Respond(int []);
86 int _respond(int *);
87 void alter(char *);
88 int alternates(void *);
89 void announce(void);
90 int append(struct message *, FILE *);
91 int argcount(char **);
92 void assign(const char [], const char []);
93 int bangexp(char *);
94 int blankline(char []);
95 void brokpipe(int);
96 int charcount(char *, int);
97 int check(int, int);
98 void clob1(int);
99 int clobber(void *);
100 void close_all_files(void);
101 int cmatch(const char *, char *);
102 void collhup(int);
103 void collint(int);
104 void collstop(int);
105 void commands(void);
106 int copycmd(void *);
107 int core(void *);
108 int count(struct name *);
109 int delete(void *);
110 int delm(int []);
111 int deltype(void *);
112 void demail(void);
113 int dosh(void *);
114 int dot_lock(const char *, int, FILE *, const char *);
115 void dot_unlock(const char *);
116 int echo(void *);
117 int edit1(int *, int);
118 int editor(void *);
119 void edstop(void);
120 int elsecmd(void *);
121 int endifcmd(void *);
122 int evalcol(int);
123 int execute(char [], int);
124 int exwrite(const char [], FILE *, int);
125 void fail(const char [], const char []);
126 int file(void *);
127 struct grouphead *
128 findgroup(char []);
129 void findmail(const char *, char *);
130 int first(int, int);
131 void fixhead(struct header *, struct name *);
132 void fmt(const char *, struct name *, FILE *, int);
133 int folders(void *);
134 int forward(char [], FILE *, char *, int);
135 void free_child(int);
136 int from(void *);
137 off_t fsize(FILE *);
138 int getfold(char *);
139 int getmsglist(char *, int *, int);
140 int getrawlist(const char [], char **, int);
141 int getuserid(char []);
142 int grabh(struct header *, int);
143 int group(void *);
144 void hangup(int);
145 int hash(const char *);
146 void hdrstop(int);
147 int headers(void *);
148 int help(void *);
149 void holdsigs(void);
150 int ifcmd(void *);
151 int igfield(void *);
152 int unalias(void *);
153 struct ignoretab;
154 int ignore1(char *[], struct ignoretab *, const char *);
155 int igshow(struct ignoretab *, const char *);
156 void intr(int);
157 int inc(void *);
158 int incfile(void);
159 int isdate(const char []);
160 int isdir(const char []);
161 int isfileaddr(char *);
162 int ishead(const char []);
163 int isign(const char *, struct ignoretab []);
164 int isprefix(char *, const char *);
165 void istrcpy(char *, const char *);
166 const struct cmd *
167 lex(char []);
168 void load(const char *);
169 struct var *
170 lookup(const char []);
171 #ifdef MIME_SUPPORT
172 int mail(struct name *,
173 struct name *, struct name *, struct name *, char *,
174 struct attachment *);
175 #else
176 int mail(struct name *,
177 struct name *, struct name *, struct name *, char *);
178 #endif
179 void mail1(struct header *, int);
180 void makemessage(FILE *, int);
181 void mark(int);
182 int markall(char [], int);
183 int matchsender(char *, int);
184 int matchsubj(char *, int);
185 int mboxit(void *);
186 int member(char *, struct ignoretab *);
187 void mesedit(FILE *, int);
188 void mespipe(FILE *, char []);
189 int messize(void *);
190 int metamess(int, int);
191 int more(void *);
192 int newfileinfo(int);
193 int next(void *);
194 int null(void *);
195 struct headline;
196 void parse(const char [], struct headline *, char []);
197 int pcmdlist(void *);
198 int pdot(void *);
199 int pipecmd(void *);
200 void prepare_child(sigset_t *, int, int);
201 int preserve(void *);
202 void prettyprint(struct name *);
203 void printgroup(char []);
204 void printhead(int);
205 int puthead(struct header *, FILE *, int);
206 int putline(FILE *, const char *, int);
207 int pversion(void *);
208 void quit(void);
209 int quitcmd(void *);
210 int upcase(int);
211 int mail_readline(FILE *, char *, int);
212 void register_file(FILE *, int, int);
213 void regret(int);
214 void relsesigs(void);
215 int respond(void *);
216 int retfield(void *);
217 int rexit(void *);
218 int rm(char *);
219 int run_command(const char *, sigset_t *, int, int, ...);
220 int save(void *);
221 // int Save(void *);
222 int save1(char [], int, const char *, struct ignoretab *);
223 void savedeadletter(FILE *);
224 int saveigfield(void *);
225 int savemail(const char [], FILE *, struct name *);
226 int saveretfield(void *);
227 int scan(char **);
228 void scaninit(void);
229 int schdir(void *);
230 int screensize(void);
231 int scroll(void *);
232 #ifdef MIME_SUPPORT
233 int sendmessage(struct message *, FILE *, struct ignoretab *,
234 const char *, struct mime_info *);
235 #else
236 int sendmessage(struct message *, FILE *, struct ignoretab *,
237 const char *);
238 #endif
239 int sendmail(void *);
240 int set(void *);
241 int setfile(const char *);
242 void setmsize(int);
243 void setptr(FILE *, off_t);
244 void setscreensize(void);
245 int shell(void *);
246 int show(void *);
247 void sigchild(int);
248 void sort(char **);
249 int source(void *);
250 void spreserve(void);
251 void sreset(void);
252 int start_command(const char *, sigset_t *, int, int, ...);
253 void statusput(struct message *, FILE *, const char *);
254 void stop(int);
255 int stouch(void *);
256 int swrite(void *);
257 void tinit(void);
258 int top(void *);
259 void touch(struct message *);
260 void ttyint(int);
261 void ttystop(int);
262 int type(void *);
263 #ifdef MIME_SUPPORT
264 int view(void *);
265 int View(void *);
266 int page(void *);
267 int Page(void *);
268 int print(void *);
269 int Print(void *);
270 int type1(int *, int, int, int);
271 #else
272 int type1(int *, int, int);
273 #endif
274 int undeletecmd(void *);
275 void unmark(int);
276 const char **unpack(struct name *);
277 int unread(void *);
278 void unregister_file(FILE *);
279 int unset(void *);
280 int unstack(void);
281 void v_free(char *);
282 int visual(void *);
283 int wait_child(int);
284 int wait_command(int);
285 int writeback(FILE *);
286
287 #ifdef MIME_SUPPORT
288 FILE *last_registered_file(int);
289 void close_top_files(FILE *);
290 void flush_files(FILE *, int);
291 #endif
292
293 extern const char *version;
294 extern char *tmpdir;
295 extern const struct cmd cmdtab[];
296 extern int wait_status;
297