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