2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * @(#)extern.h 8.2 (Berkeley) 4/20/95
35 * $FreeBSD: src/usr.bin/mail/extern.h,v 1.3.6.3 2003/01/06 05:46:03 mikeh Exp $
36 * $DragonFly: src/usr.bin/mail/extern.h,v 1.6 2004/09/07 22:42:26 joerg Exp $
39 struct name
*cat(struct name
*, struct name
*);
40 struct name
*delname(struct name
*, char []);
41 struct name
*elide(struct name
*);
42 struct name
*extract(char [], int);
43 struct name
*gexpand(struct name
*, struct grouphead
*, int, int);
44 struct name
*nalloc(char [], int);
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(char *, const char *);
52 FILE *collect(struct header
*, int);
53 char *copyin(char *, char **);
54 char *detract(struct name
*, int);
56 char *getdeadletter(void);
58 char *hfield(const char *, struct message
*);
59 FILE *infix(struct header
*, FILE *);
60 char *ishfield(char [], char *, const char *);
61 char *name1(struct message
*, int);
62 char *nameof(struct message
*, int);
63 char *nextword(char *, char *);
64 char *readtty(const char *, char []);
66 FILE *run_editor(FILE *, off_t
, int, int);
68 char *savestr(char *);
69 FILE *setinput(struct message
*);
71 char *skip_comment(char *);
72 char *snarf(char [], int *);
74 char *value(const char *);
75 char *vcopy(const char *);
76 char *yankword(char *, char []);
77 char *yanklogin(char *, char []);
83 int doRespond(int []);
86 int alternates(char **);
88 int append(struct message
*, FILE *);
89 int argcount(char **);
90 void assign(const char *, const char *);
91 int bangexp(char *, size_t);
93 int charcount(char *, int);
97 void close_all_files(void);
98 int cmatch(char *, char *);
103 int copycmd(char []);
105 int count(struct name
*);
110 int diction(const void *, const void *);
113 int edit1(int *, int);
118 int execute(char [], int);
119 int exwrite(char [], FILE *, int);
120 void fail(const char *, const char *);
124 void findmail(char *, char *, int);
126 void fixhead(struct header
*, struct name
*);
127 void fmt(const char *, struct name
*, FILE *, int);
129 int forward(char [], FILE *, char *, int);
130 void free_child(int);
133 int getfold(char *, int);
134 int gethfield(FILE *, char [], int, char **);
135 int getmsglist(char *, int *, int);
136 int getrawlist(char [], char **, int);
137 int getuserid(char []);
138 int grabh(struct header
*, int);
141 int hash(const char *);
147 int igcomp(const void *, const void *);
148 int igfield(char *[]);
149 int ignore1(char *[], struct ignoretab
*, const char *);
150 int igshow(struct ignoretab
*, const char *);
156 int isfileaddr(char *);
158 int isign(const char *, struct ignoretab
[]);
159 int isprefix(const char *, const char *);
160 void istrncpy(char *, const char *, size_t);
165 lookup(const char *);
166 int mail(struct name
*,
167 struct name
*, struct name
*, struct name
*, char *, char *);
168 void mail1(struct header
*, int);
169 void makemessage(FILE *, int);
170 int markall(char [], int);
171 int matchsender(char *, int);
172 int matchfield(char *, int);
174 int member(char *, struct ignoretab
*);
175 void mesedit(FILE *, int);
176 void mespipe(FILE *, char []);
178 int metamess(int, int);
180 int newfileinfo(int);
183 void parse(char [], struct headline
*, char []);
186 void prepare_child(sigset_t
*, int, int);
188 void prettyprint(struct name
*);
189 void printgroup(char []);
191 int puthead(struct header
*, FILE *, int);
192 int putline(FILE *, char *, int);
196 int readline(FILE *, char *, int);
197 void register_file(FILE *, int, int);
199 void relsesigs(void);
201 int retfield(char *[]);
204 int run_command(char *, sigset_t
*, int, int, char *, char *, char *);
206 int save1(char [], int, const char *, struct ignoretab
*);
207 void savedeadletter(FILE *);
208 int saveigfield(char *[]);
209 int savemail(char [], FILE *);
210 int saveretfield(char *[]);
214 int screensize(void);
216 int sendmessage(struct message
*, FILE *, struct ignoretab
*, char *);
217 int sendmail(char *);
221 void setptr(FILE *, off_t
);
222 void setscreensize(void);
227 void spreserve(void);
229 int start_command(char *, sigset_t
*, int, int, char *, char *, char *);
230 void statusput(struct message
*, FILE *, char *);
236 void touch(struct message
*);
240 int type1(int *, int, int);
241 int undelete_messages(int *);
242 char **unpack(struct name
*);
244 void unregister_file(FILE *);
250 int wait_command(int);