Home | History | Annotate | Line # | Download | only in mail
extern.h revision 1.24
      1 /*	$NetBSD: extern.h,v 1.24 2006/09/18 19:46:21 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.24 2006/09/18 19:46:21 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 *lexpand(char *, int);
     43 struct name *nalloc(char [], int);
     44 struct header;
     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(const char *, const char *);
     52 FILE	*collect(struct header *, int);
     53 char	*copy(char *, char *);
     54 char	*copyin(const char *, char **);
     55 char	*detract(struct name *, int);
     56 const char *expand(const char *);
     57 const char *getdeadletter(void);
     58 const	char *getname(uid_t);
     59 struct message;
     60 char	*hfield(const char [], const struct message *);
     61 FILE	*infix(struct header *, FILE *);
     62 char	*ishfield(const char [], char[], const char *);
     63 char	*name1(struct message *, int);
     64 char	*nameof(struct message *, int);
     65 const char	*nextword(const char *, char *);
     66 char	*readtty(const char [], char []);
     67 char 	*reedit(char *);
     68 FILE	*run_editor(FILE *, off_t, int, int);
     69 void	*salloc(size_t);
     70 char	*savestr(const char *);
     71 FILE	*setinput(const struct message *);
     72 char	*skin(char *);
     73 char	*skip_comment(char *);
     74 char	*snarf(char [], int *);
     75 const	char *username(void);
     76 char	*value(const char []);
     77 char	*vcopy(const 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(const char [], const char []);
     92 int	 bangexp(char *);
     93 int	 blankline(char []);
     94 void	 brokpipe(int);
     95 int	 charcount(char *, int);
     96 int	 check(int, int);
     97 void	 clob1(int);
     98 int	 clobber(void *);
     99 void	 close_all_files(void);
    100 int	 cmatch(const char *, char *);
    101 void	 collhup(int);
    102 void	 collint(int);
    103 void	 collstop(int);
    104 void	 commands(void);
    105 int	 copycmd(void *);
    106 int	 core(void *);
    107 int	 count(struct name *);
    108 int	 delete(void *);
    109 int	 delm(int []);
    110 int	 deltype(void *);
    111 void	 demail(void);
    112 int	 dosh(void *);
    113 int	 dot_lock(const char *, int, FILE *, const char *);
    114 void	 dot_unlock(const char *);
    115 int	 echo(void *);
    116 int	 edit1(int *, int);
    117 int	 editor(void *);
    118 void	 edstop(void);
    119 int	 elsecmd(void *);
    120 int	 endifcmd(void *);
    121 int	 evalcol(int);
    122 int	 execute(char [], int);
    123 int	 exwrite(const char [], FILE *, int);
    124 void	 fail(const char [], const char []);
    125 int	 file(void *);
    126 struct grouphead *
    127 	 findgroup(char []);
    128 void	 findmail(const char *, char *);
    129 int	 first(int, int);
    130 void	 fixhead(struct header *, struct name *);
    131 void	 fmt(const char *, struct name *, FILE *, int);
    132 int	 folders(void *);
    133 int	 forward(char [], FILE *, char *, int);
    134 void	 free_child(int);
    135 int	 from(void *);
    136 off_t	 fsize(FILE *);
    137 int	 getfold(char *);
    138 int	 gethfield(FILE *, char [], int, char **);
    139 int	 getmsglist(char *, int *, int);
    140 int	 getrawlist(const char [], char **, int);
    141 int	 getuserid(char []);
    142 int	 grabh(struct header *, int);
    143 int	 group(void *);
    144 void	 hangup(int);
    145 int	 hash(const char *);
    146 void	 hdrstop(int);
    147 int	 headers(void *);
    148 int	 help(void *);
    149 void	 holdsigs(void);
    150 int	 ifcmd(void *);
    151 int	 igfield(void *);
    152 int	 unalias(void *);
    153 struct ignoretab;
    154 int	 ignore1(char *[], struct ignoretab *, const char *);
    155 int	 igshow(struct ignoretab *, const char *);
    156 void	 intr(int);
    157 int	 inc(void *);
    158 int	 incfile(void);
    159 int	 isdate(const char []);
    160 int	 isdir(const char []);
    161 int	 isfileaddr(char *);
    162 int	 ishead(const char []);
    163 int	 isign(const char *, struct ignoretab []);
    164 int	 isprefix(char *, const char *);
    165 void	 istrcpy(char *, const char *);
    166 const struct cmd *
    167 	 lex(char []);
    168 void	 load(const char *);
    169 struct var *
    170 	 lookup(const char []);
    171 int	 mail(struct name *,
    172 	      struct name *, struct name *, struct name *, char *);
    173 void	 mail1(struct header *, int);
    174 void	 makemessage(FILE *, int);
    175 void	 mark(int);
    176 int	 markall(char [], int);
    177 int	 matchsender(char *, int);
    178 int	 matchsubj(char *, int);
    179 int	 mboxit(void *);
    180 int	 member(char *, struct ignoretab *);
    181 void	 mesedit(FILE *, int);
    182 void	 mespipe(FILE *, char []);
    183 int	 messize(void *);
    184 int	 metamess(int, int);
    185 int	 more(void *);
    186 int	 newfileinfo(int);
    187 int	 next(void *);
    188 int	 null(void *);
    189 struct headline;
    190 void	 parse(const char [], struct headline *, char []);
    191 int	 pcmdlist(void *);
    192 int	 pdot(void *);
    193 int	 pipecmd(void *);
    194 void	 prepare_child(sigset_t *, int, int);
    195 int	 preserve(void *);
    196 void	 prettyprint(struct name *);
    197 void	 printgroup(char []);
    198 void	 printhead(int);
    199 int	 puthead(struct header *, FILE *, int);
    200 int	 putline(FILE *, const char *, int);
    201 int	 pversion(void *);
    202 void	 quit(void);
    203 int	 quitcmd(void *);
    204 int	 upcase(int);
    205 int	 readline(FILE *, char *, int);
    206 void	 register_file(FILE *, int, int);
    207 void	 regret(int);
    208 void	 relsesigs(void);
    209 int	 respond(void *);
    210 int	 retfield(void *);
    211 int	 rexit(void *);
    212 int	 rm(char *);
    213 int	 run_command(const char *, sigset_t *, int, int, ...);
    214 int	 save(void *);
    215 int	 Save(void *);
    216 int	 save1(char [], int, const char *, struct ignoretab *);
    217 void	 savedeadletter(FILE *);
    218 int	 saveigfield(void *);
    219 int	 savemail(const char [], FILE *, struct name *);
    220 int	 saveretfield(void *);
    221 int	 scan(char **);
    222 void	 scaninit(void);
    223 int	 schdir(void *);
    224 int	 screensize(void);
    225 int	 scroll(void *);
    226 int	 sendmessage(struct message *, FILE *, struct ignoretab *,
    227     const char *);
    228 int	 sendmail(void *);
    229 int	 set(void *);
    230 int	 setfile(const char *);
    231 void	 setmsize(int);
    232 void	 setptr(FILE *, off_t);
    233 void	 setscreensize(void);
    234 int	 shell(void *);
    235 int	 show(void *);
    236 void	 sigchild(int);
    237 void	 sort(char **);
    238 int	 source(void *);
    239 void	 spreserve(void);
    240 void	 sreset(void);
    241 int	 start_command(const char *, sigset_t *, int, int, ...);
    242 void	 statusput(struct message *, FILE *, const char *);
    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 *, int, int);
    253 int	 undeletecmd(void *);
    254 void	 unmark(int);
    255 const char **unpack(struct name *);
    256 int	 unread(void *);
    257 void	 unregister_file(FILE *);
    258 int	 unset(void *);
    259 int	 unstack(void);
    260 void	 v_free(char *);
    261 int	 visual(void *);
    262 int	 wait_child(int);
    263 int	 wait_command(int);
    264 int	 writeback(FILE *);
    265 
    266 extern const char *version;
    267 extern char *tmpdir;
    268 extern const struct cmd cmdtab[];
    269 extern int wait_status;
    270