extern.h revision 1.21 1 /* $NetBSD: extern.h,v 1.21 2005/07/19 23:07:10 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.21 2005/07/19 23:07:10 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 *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, const char *);
49 FILE *Fopen(const char *, const char *);
50 FILE *Popen(const char *, const char *);
51 FILE *collect(struct header *, int);
52 char *copy(char *, char *);
53 char *copyin(char *, char **);
54 char *detract(struct name *, int);
55 const char *expand(const char *);
56 const char *getdeadletter(void);
57 const char *getname(uid_t);
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(const char [], char []);
66 char *reedit(char *);
67 FILE *run_editor(FILE *, off_t, int, int);
68 void *salloc(size_t);
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(const char []);
76 char *vcopy(const 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(const char [], const 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(const 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(const char [], FILE *, int);
123 void fail(char [], const char []);
124 int file(void *);
125 struct grouphead *
126 findgroup(char []);
127 void findmail(const char *, char *);
128 int first(int, int);
129 void fixhead(struct header *, struct name *);
130 void fmt(const 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(const char [], char **, int);
140 int getuserid(char []);
141 int grabh(struct header *, int);
142 int group(void *);
143 void hangup(int);
144 int hash(const 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 *, const char *);
153 int igshow(struct ignoretab *, const char *);
154 void intr(int);
155 int inc(void *);
156 int incfile(void);
157 int isdate(const char []);
158 int isdir(const char []);
159 int isfileaddr(char *);
160 int ishead(char []);
161 int isign(const char *, struct ignoretab []);
162 int isprefix(char *, const char *);
163 void istrcpy(char *, const char *);
164 const struct cmd *
165 lex(char []);
166 void load(const char *);
167 struct var *
168 lookup(const 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 *, const 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(const char *, sigset_t *, int, int, ...);
211 int save(void *);
212 int Save(void *);
213 int save1(char [], int, const char *, struct ignoretab *);
214 void savedeadletter(FILE *);
215 int saveigfield(void *);
216 int savemail(const 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 *,
224 const char *);
225 int sendmail(void *);
226 int set(void *);
227 int setfile(const char *);
228 void setmsize(int);
229 void setptr(FILE *, off_t);
230 void setscreensize(void);
231 int shell(void *);
232 void sigchild(int);
233 void sort(char **);
234 int source(void *);
235 void spreserve(void);
236 void sreset(void);
237 int start_command(const char *, sigset_t *, int, int, ...);
238 void statusput(struct message *, FILE *, const char *);
239 void stop(int);
240 int stouch(void *);
241 int swrite(void *);
242 void tinit(void);
243 int top(void *);
244 void touch(struct message *);
245 void ttyint(int);
246 void ttystop(int);
247 int type(void *);
248 int type1(int *, int, int);
249 int undeletecmd(void *);
250 void unmark(int);
251 const char **unpack(struct name *);
252 int unread(void *);
253 void unregister_file(FILE *);
254 int unset(void *);
255 int unstack(void);
256 void v_free(char *);
257 int visual(void *);
258 int wait_child(int);
259 int wait_command(int);
260 int writeback(FILE *);
261
262 extern const char *version;
263 extern char *tmpdir;
264 extern const struct cmd cmdtab[];
265 extern int wait_status;
266