Annotation of src/usr.bin/mail/extern.h, Revision 1.29
1.29 ! millert 1: /* $OpenBSD: extern.h,v 1.28 2015/01/20 16:59:07 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.29 ! millert 33: * $OpenBSD: extern.h,v 1.28 2015/01/20 16:59:07 millert Exp $
1.1 deraadt 34: */
35:
1.3 deraadt 36: struct name;
1.19 millert 37: struct name *cat(struct name *, struct name *);
1.29 ! millert 38: struct name *delname(struct name *, const char *);
1.19 millert 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);
1.3 deraadt 58: struct message;
1.19 millert 59: char *hfield(char *, struct message *);
60: FILE *infix(struct header *, FILE *);
61: char *ishfield(char *, char *, 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);
1.29 ! millert 69: char *savestr(const char *);
1.19 millert 70: FILE *setinput(struct message *);
71: char *skin(char *);
72: char *skip_comment(char *);
73: char *snarf(char *, int *);
1.29 ! millert 74: const char
! 75: *username(void);
1.19 millert 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 count(struct name *);
1.23 deraadt 103: int deletecmd(void *);
1.19 millert 104: int delm(int *);
105: int deltype(void *);
106: void demail(void);
107: void dointr(void);
108: int dosh(void *);
109: int echo(void *);
110: int edit1(int *, int);
111: int editor(void *);
112: int edstop(void);
113: int elsecmd(void *);
114: int endifcmd(void *);
115: int evalcol(int);
116: int execute(char *, int);
117: int exwrite(char *, FILE *, int);
118: void fail(char *, char *);
119: int file(void *);
1.1 deraadt 120: struct grouphead *
1.19 millert 121: findgroup(char *);
1.29 ! millert 122: void findmail(const char *, char *, int);
1.19 millert 123: void fioint(int);
124: int first(int, int);
125: void fixhead(struct header *, struct name *);
126: void fmt(char *, struct name *, FILE *, int);
127: int folders(void *);
128: int forward(char *, FILE *, char *, int);
129: void free_child(pid_t);
130: int from(void *);
131: off_t fsize(FILE *);
132: int getfold(char *, int);
133: int gethfield(FILE *, char *, int, char **);
134: int gethfromtty(struct header *, int);
135: int getmsglist(char *, int *, int);
136: int getrawlist(char *, char **, int);
137: int grabh(struct header *, int);
138: int group(void *);
139: int hash(char *);
140: void hdrint(int);
141: int headers(void *);
142: int help(void *);
143: void holdsigs(void);
144: int ifcmd(void *);
145: int igfield(void *);
1.3 deraadt 146: struct ignoretab;
1.19 millert 147: int ignore1(char **, struct ignoretab *, char *);
148: int ignoresig(int, struct sigaction *, sigset_t *);
149: int igshow(struct ignoretab *, char *);
150: void intr(int);
151: int inc(void *);
152: int incfile(void);
153: int isdate(char *);
154: int isdir(char *);
155: int isfileaddr(char *);
156: int ishead(char *);
157: int isign(char *, struct ignoretab *);
158: int isprefix(char *, char *);
159: size_t istrlcpy(char *, const char *, size_t);
1.2 niklas 160: const struct cmd *
1.19 millert 161: lex(char *);
162: void load(char *);
1.1 deraadt 163: struct var *
1.19 millert 164: lookup(char *);
1.28 millert 165: int mail(struct name *, struct name *, struct name *, struct name *,
166: char *, char *);
1.19 millert 167: void mail1(struct header *, int);
168: void makemessage(FILE *, int);
169: void mark(int);
170: int markall(char *, int);
171: int marknew(void *);
172: int matchsender(char *, int);
173: int matchsubj(char *, int);
174: int mboxit(void *);
175: int member(char *, struct ignoretab *);
176: void mesedit(FILE *, int);
177: void mespipe(FILE *, char *);
178: int messize(void *);
179: int metamess(int, int);
180: int more(void *);
181: int newfileinfo(int);
182: int next(void *);
183: int null(void *);
1.3 deraadt 184: struct headline;
1.19 millert 185: void parse(char *, struct headline *, char *);
186: int pcmdlist(void *);
187: int pdot(void *);
188: int pipeit(void *, void *);
189: void prepare_child(sigset_t *, int, int);
190: int preserve(void *);
191: void prettyprint(struct name *);
192: void printgroup(char *);
193: void printhead(int);
194: int puthead(struct header *, FILE *, int);
195: int putline(FILE *, char *, int);
196: int pversion(void *);
197: int quit(void);
198: int quitcmd(void *);
199: int readline(FILE *, char *, int, int *);
200: void register_file(FILE *, int, pid_t);
201: void regret(int);
202: void relsesigs(void);
203: int respond(void *);
204: int retfield(void *);
205: int rexit(void *);
206: int rm(char *);
207: int run_command(char *cmd, sigset_t *nset, int infd, int outfd, ...);
208: int save(void *);
209: int save1(char *, int, char *, struct ignoretab *);
210: void savedeadletter(FILE *);
211: int saveigfield(void *);
212: int savemail(char *, FILE *);
213: int saveretfield(void *);
214: int scan(char **);
215: void scaninit(void);
216: int schdir(void *);
217: int screensize(void);
218: int scroll(void *);
1.20 millert 219: void sendint(int);
1.19 millert 220: int sendmessage(struct message *, FILE *, struct ignoretab *, char *);
221: int sendmail(void *);
222: int set(void *);
223: int setfile(char *);
224: void setmsize(int);
225: void setptr(FILE *, off_t);
226: void setscreensize(void);
227: int shell(void *);
228: void sigchild(int);
229: void sort(char **);
230: int source(void *);
231: int spool_lock(void);
232: int spool_unlock(void);
233: void spreserve(void);
234: void sreset(void);
235: pid_t start_command(char *cmd, sigset_t *nset, int infd, int outfd, ...);
1.24 millert 236: pid_t start_commandv(char *, sigset_t *, int, int, __va_list);
1.20 millert 237: int statusput(struct message *, FILE *, char *);
1.19 millert 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 *, char *, int, int);
248: int undeletecmd(void *);
249: void unmark(int);
250: char **unpack(struct name *, struct name *);
251: int unread(void *);
252: void unregister_file(FILE *);
253: int unset(void *);
254: int unstack(void);
255: void vfree(char *);
256: int visual(void *);
257: int wait_child(pid_t);
258: int wait_command(int);
259: int writeback(FILE *);
1.6 millert 260:
261: extern char *__progname;
1.8 millert 262: extern char *tmpdir;
1.16 millert 263: extern const struct cmd *com; /* command we are running */