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