]>
git.cameronkatri.com Git - apple_cmds.git/blob - mail_cmds/mail/extern.h
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.9 2004/02/29 20:44:44 mikeh Exp $
41 struct name
*cat(struct name
*, struct name
*);
42 struct name
*delname(struct name
*, char []);
43 struct name
*elide(struct name
*);
44 struct name
*extract(char [], int);
45 struct name
*gexpand(struct name
*, struct grouphead
*, int, int);
46 struct name
*nalloc(char [], int);
47 struct name
*outof(struct name
*, FILE *, struct header
*);
48 struct name
*put(struct name
*, struct name
*);
49 struct name
*tailof(struct name
*);
50 struct name
*usermap(struct name
*);
51 FILE *Fdopen(int, const char *);
52 FILE *Fopen(const char *, const char *);
53 FILE *Popen(char *, const char *);
54 FILE *collect(struct header
*, int);
55 char *copyin(char *, char **);
56 char *detract(struct name
*, int);
58 char *getauthor(char *);
59 char *getdeadletter(void);
61 char *hfield(const char *, struct message
*);
62 FILE *infix(struct header
*, FILE *);
63 char *ishfield(char [], char *, const char *);
64 char *name1(struct message
*, int);
65 char *nameof(struct message
*, int);
66 char *nextword(char *, char *);
67 char *readtty(const char *, char []);
69 FILE *run_editor(FILE *, off_t
, int, int);
71 char *savestr(char *);
72 FILE *setinput(struct message
*);
74 char *skip_comment(char *);
75 char *snarf(char [], int *, int);
77 char *value(const char *);
78 char *vcopy(const char *);
79 char *yankword(char *, char []);
80 char *yanklogin(char *, char []);
86 int doRespond(int []);
89 int alternates(char **);
91 int append(struct message
*, FILE *);
92 int argcount(char **);
93 void assign(const char *, const char *);
94 int bangexp(char *, size_t);
96 int charcount(char *, int);
100 void close_all_files(void);
101 int cmatch(char *, char *);
106 int copycmd(char []);
107 int Capcopycmd(char []);
109 int count(struct name
*);
114 int diction(const void *, const void *);
117 int edit1(int *, int);
123 int execute(char [], int);
124 int exwrite(char [], FILE *, int);
125 void fail(const char *, const char *);
129 void findmail(char *, char *, int);
131 void fixhead(struct header
*, struct name
*);
132 void fmt(const char *, struct name
*, FILE *, int);
135 int Capfollowup(int *);
136 int forward(char [], FILE *, char *, int);
137 void free_child(int);
140 int getfold(char *, int);
141 int gethfield(FILE *, char [], int, char **);
142 int getmsglist(char *, int *, int);
143 int getrawlist(char [], char **, int);
144 int getuserid(char []);
145 int grabh(struct header
*, int);
148 int hash(const char *);
154 int igcomp(const void *, const void *);
155 int igfield(char *[]);
156 int ignore1(char *[], struct ignoretab
*, const char *);
157 int igshow(struct ignoretab
*, const char *);
163 int isfileaddr(char *);
165 int isign(const char *, struct ignoretab
[]);
166 int isprefix(const char *, const char *);
167 void istrncpy(char *, const char *, size_t);
172 lookup(const char *);
173 int mail(struct name
*,
174 struct name
*, struct name
*, struct name
*, char *, char *);
175 void mail1(struct header
*, int);
176 int mailpipe(char []);
177 void makemessage(FILE *, int);
179 int markall(char [], int);
180 int matchsender(char *, int);
181 int matchfield(char *, int);
183 int member(char *, struct ignoretab
*);
184 void mesedit(FILE *, int);
185 void mespipe(FILE *, char []);
187 int metamess(int, int);
189 int newfileinfo(int);
192 void parse(char [], struct headline
*, char []);
195 void prepare_child(sigset_t
*, int, int);
197 void prettyprint(struct name
*);
198 void printgroup(char []);
200 int puthead(struct header
*, FILE *, int);
201 int putline(FILE *, char *, int);
205 int readline(FILE *, char *, int);
206 void register_file(FILE *, int, int);
208 void relsesigs(void);
210 int retfield(char *[]);
213 int run_command(char *, sigset_t
*, int, int, char *, char *, char *);
215 int Capsave(char []);
216 int save1(char [], int, const char *, struct ignoretab
*);
217 void savedeadletter(FILE *);
218 int saveigfield(char *[]);
219 int savemail(char [], FILE *);
220 int saveretfield(char *[]);
224 int screensize(void);
226 int sendmessage(struct message
*, FILE *, struct ignoretab
*, char *);
227 int sendmail(char *);
231 void setptr(FILE *, off_t
);
232 void setscreensize(void);
237 void spreserve(void);
239 int start_command(char *, sigset_t
*, int, int, char *, char *, char *);
240 void statusput(struct message
*, FILE *, char *);
246 void touch(struct message
*);
250 int type1(int *, int, int);
251 int undelete_messages(int *);
253 char **unpack(struct name
*);
255 void unregister_file(FILE *);
261 int wait_command(int);
262 int writeback(FILE *);
264 extern char *__progname
;
267 #endif /* EXTERN_H */