Home | History | Annotate | Line # | Download | only in mail
extern.h revision 1.25
      1  1.25  christos /*	$NetBSD: extern.h,v 1.25 2006/10/21 21:37:20 christos Exp $	*/
      2   1.4  christos 
      3   1.1   deraadt /*-
      4   1.1   deraadt  * Copyright (c) 1992, 1993
      5   1.1   deraadt  *	The Regents of the University of California.  All rights reserved.
      6   1.1   deraadt  *
      7   1.1   deraadt  * Redistribution and use in source and binary forms, with or without
      8   1.1   deraadt  * modification, are permitted provided that the following conditions
      9   1.1   deraadt  * are met:
     10   1.1   deraadt  * 1. Redistributions of source code must retain the above copyright
     11   1.1   deraadt  *    notice, this list of conditions and the following disclaimer.
     12   1.1   deraadt  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1   deraadt  *    notice, this list of conditions and the following disclaimer in the
     14   1.1   deraadt  *    documentation and/or other materials provided with the distribution.
     15  1.18       agc  * 3. Neither the name of the University nor the names of its contributors
     16   1.1   deraadt  *    may be used to endorse or promote products derived from this software
     17   1.1   deraadt  *    without specific prior written permission.
     18   1.1   deraadt  *
     19   1.1   deraadt  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     20   1.1   deraadt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21   1.1   deraadt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22   1.1   deraadt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     23   1.1   deraadt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24   1.1   deraadt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     25   1.1   deraadt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     26   1.1   deraadt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27   1.1   deraadt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28   1.1   deraadt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     29   1.1   deraadt  * SUCH DAMAGE.
     30   1.1   deraadt  *
     31   1.5       tls  *	@(#)extern.h	8.2 (Berkeley) 4/20/95
     32  1.25  christos  *	$NetBSD: extern.h,v 1.25 2006/10/21 21:37:20 christos Exp $
     33   1.1   deraadt  */
     34   1.1   deraadt 
     35   1.4  christos struct name;
     36  1.13       wiz struct name *cat(struct name *, struct name *);
     37  1.13       wiz struct name *delname(struct name *, char []);
     38  1.13       wiz struct name *elide(struct name *);
     39  1.13       wiz struct name *extract(char [], int);
     40   1.4  christos struct grouphead;
     41  1.13       wiz struct name *gexpand(struct name *, struct grouphead *, int, int);
     42  1.24  christos struct name *lexpand(char *, int);
     43  1.13       wiz struct name *nalloc(char [], int);
     44   1.4  christos struct header;
     45  1.13       wiz struct name *outof(struct name *, FILE *, struct header *);
     46  1.13       wiz struct name *put(struct name *, struct name *);
     47  1.13       wiz struct name *tailof(struct name *);
     48  1.13       wiz struct name *usermap(struct name *);
     49  1.20  christos FILE	*Fdopen(int, const char *);
     50  1.20  christos FILE	*Fopen(const char *, const char *);
     51  1.20  christos FILE	*Popen(const char *, const char *);
     52  1.13       wiz FILE	*collect(struct header *, int);
     53  1.13       wiz char	*copy(char *, char *);
     54  1.22  christos char	*copyin(const char *, char **);
     55  1.25  christos void	*csalloc(size_t, size_t);
     56  1.13       wiz char	*detract(struct name *, int);
     57  1.20  christos const char *expand(const char *);
     58  1.20  christos const char *getdeadletter(void);
     59  1.21  christos const	char *getname(uid_t);
     60   1.4  christos struct message;
     61  1.19      ross char	*hfield(const char [], const struct message *);
     62  1.13       wiz FILE	*infix(struct header *, FILE *);
     63  1.19      ross char	*ishfield(const char [], char[], const char *);
     64  1.13       wiz char	*name1(struct message *, int);
     65  1.13       wiz char	*nameof(struct message *, int);
     66  1.22  christos const char	*nextword(const char *, char *);
     67  1.20  christos char	*readtty(const char [], char []);
     68  1.13       wiz char 	*reedit(char *);
     69  1.13       wiz FILE	*run_editor(FILE *, off_t, int, int);
     70  1.21  christos void	*salloc(size_t);
     71  1.13       wiz char	*savestr(const char *);
     72  1.19      ross FILE	*setinput(const struct message *);
     73  1.13       wiz char	*skin(char *);
     74  1.13       wiz char	*skip_comment(char *);
     75  1.13       wiz char	*snarf(char [], int *);
     76  1.13       wiz const	char *username(void);
     77  1.20  christos char	*value(const char []);
     78  1.20  christos char	*vcopy(const char []);
     79  1.13       wiz char	*yankword(char *, char []);
     80  1.13       wiz int	 Fclose(FILE *);
     81  1.13       wiz int	 More(void *);
     82  1.13       wiz int	 Pclose(FILE *);
     83  1.13       wiz int	 Respond(void *);
     84  1.13       wiz int	 Type(void *);
     85  1.13       wiz int	 _Respond(int []);
     86  1.13       wiz int	 _respond(int *);
     87  1.13       wiz void	 alter(char *);
     88  1.13       wiz int	 alternates(void *);
     89  1.13       wiz void	 announce(void);
     90  1.13       wiz int	 append(struct message *, FILE *);
     91  1.13       wiz int	 argcount(char **);
     92  1.20  christos void	 assign(const char [], const char []);
     93  1.13       wiz int	 bangexp(char *);
     94  1.13       wiz int	 blankline(char []);
     95  1.13       wiz void	 brokpipe(int);
     96  1.13       wiz int	 charcount(char *, int);
     97  1.13       wiz int	 check(int, int);
     98  1.13       wiz void	 clob1(int);
     99  1.13       wiz int	 clobber(void *);
    100  1.13       wiz void	 close_all_files(void);
    101  1.20  christos int	 cmatch(const char *, char *);
    102  1.13       wiz void	 collhup(int);
    103  1.13       wiz void	 collint(int);
    104  1.13       wiz void	 collstop(int);
    105  1.13       wiz void	 commands(void);
    106  1.13       wiz int	 copycmd(void *);
    107  1.13       wiz int	 core(void *);
    108  1.13       wiz int	 count(struct name *);
    109  1.13       wiz int	 delete(void *);
    110  1.13       wiz int	 delm(int []);
    111  1.13       wiz int	 deltype(void *);
    112  1.13       wiz void	 demail(void);
    113  1.13       wiz int	 dosh(void *);
    114  1.13       wiz int	 dot_lock(const char *, int, FILE *, const char *);
    115  1.13       wiz void	 dot_unlock(const char *);
    116  1.13       wiz int	 echo(void *);
    117  1.13       wiz int	 edit1(int *, int);
    118  1.13       wiz int	 editor(void *);
    119  1.13       wiz void	 edstop(void);
    120  1.13       wiz int	 elsecmd(void *);
    121  1.13       wiz int	 endifcmd(void *);
    122  1.13       wiz int	 evalcol(int);
    123  1.13       wiz int	 execute(char [], int);
    124  1.20  christos int	 exwrite(const char [], FILE *, int);
    125  1.22  christos void	 fail(const char [], const char []);
    126  1.13       wiz int	 file(void *);
    127   1.1   deraadt struct grouphead *
    128  1.13       wiz 	 findgroup(char []);
    129  1.20  christos void	 findmail(const char *, char *);
    130  1.13       wiz int	 first(int, int);
    131  1.13       wiz void	 fixhead(struct header *, struct name *);
    132  1.20  christos void	 fmt(const char *, struct name *, FILE *, int);
    133  1.13       wiz int	 folders(void *);
    134  1.15       wiz int	 forward(char [], FILE *, char *, int);
    135  1.13       wiz void	 free_child(int);
    136  1.13       wiz int	 from(void *);
    137  1.13       wiz off_t	 fsize(FILE *);
    138  1.13       wiz int	 getfold(char *);
    139  1.13       wiz int	 getmsglist(char *, int *, int);
    140  1.20  christos int	 getrawlist(const char [], char **, int);
    141  1.13       wiz int	 getuserid(char []);
    142  1.13       wiz int	 grabh(struct header *, int);
    143  1.13       wiz int	 group(void *);
    144  1.13       wiz void	 hangup(int);
    145  1.20  christos int	 hash(const char *);
    146  1.13       wiz void	 hdrstop(int);
    147  1.13       wiz int	 headers(void *);
    148  1.13       wiz int	 help(void *);
    149  1.13       wiz void	 holdsigs(void);
    150  1.13       wiz int	 ifcmd(void *);
    151  1.13       wiz int	 igfield(void *);
    152  1.23  christos int	 unalias(void *);
    153   1.4  christos struct ignoretab;
    154  1.20  christos int	 ignore1(char *[], struct ignoretab *, const char *);
    155  1.20  christos int	 igshow(struct ignoretab *, const char *);
    156  1.13       wiz void	 intr(int);
    157  1.13       wiz int	 inc(void *);
    158  1.13       wiz int	 incfile(void);
    159  1.20  christos int	 isdate(const char []);
    160  1.20  christos int	 isdir(const char []);
    161  1.13       wiz int	 isfileaddr(char *);
    162  1.22  christos int	 ishead(const char []);
    163  1.20  christos int	 isign(const char *, struct ignoretab []);
    164  1.20  christos int	 isprefix(char *, const char *);
    165  1.20  christos void	 istrcpy(char *, const char *);
    166   1.3       jtc const struct cmd *
    167  1.13       wiz 	 lex(char []);
    168  1.20  christos void	 load(const char *);
    169   1.1   deraadt struct var *
    170  1.20  christos 	 lookup(const char []);
    171  1.25  christos #ifdef MIME_SUPPORT
    172  1.25  christos int	 mail(struct name *,
    173  1.25  christos 	      struct name *, struct name *, struct name *, char *,
    174  1.25  christos 	      struct attachment *);
    175  1.25  christos #else
    176  1.13       wiz int	 mail(struct name *,
    177  1.13       wiz 	      struct name *, struct name *, struct name *, char *);
    178  1.25  christos #endif
    179  1.13       wiz void	 mail1(struct header *, int);
    180  1.13       wiz void	 makemessage(FILE *, int);
    181  1.13       wiz void	 mark(int);
    182  1.13       wiz int	 markall(char [], int);
    183  1.13       wiz int	 matchsender(char *, int);
    184  1.13       wiz int	 matchsubj(char *, int);
    185  1.13       wiz int	 mboxit(void *);
    186  1.13       wiz int	 member(char *, struct ignoretab *);
    187  1.13       wiz void	 mesedit(FILE *, int);
    188  1.13       wiz void	 mespipe(FILE *, char []);
    189  1.13       wiz int	 messize(void *);
    190  1.13       wiz int	 metamess(int, int);
    191  1.13       wiz int	 more(void *);
    192  1.13       wiz int	 newfileinfo(int);
    193  1.13       wiz int	 next(void *);
    194  1.13       wiz int	 null(void *);
    195   1.4  christos struct headline;
    196  1.22  christos void	 parse(const char [], struct headline *, char []);
    197  1.13       wiz int	 pcmdlist(void *);
    198  1.13       wiz int	 pdot(void *);
    199  1.24  christos int	 pipecmd(void *);
    200  1.13       wiz void	 prepare_child(sigset_t *, int, int);
    201  1.13       wiz int	 preserve(void *);
    202  1.13       wiz void	 prettyprint(struct name *);
    203  1.13       wiz void	 printgroup(char []);
    204  1.13       wiz void	 printhead(int);
    205  1.13       wiz int	 puthead(struct header *, FILE *, int);
    206  1.20  christos int	 putline(FILE *, const char *, int);
    207  1.13       wiz int	 pversion(void *);
    208  1.13       wiz void	 quit(void);
    209  1.13       wiz int	 quitcmd(void *);
    210  1.13       wiz int	 upcase(int);
    211  1.25  christos int	 mail_readline(FILE *, char *, int);
    212  1.13       wiz void	 register_file(FILE *, int, int);
    213  1.13       wiz void	 regret(int);
    214  1.13       wiz void	 relsesigs(void);
    215  1.13       wiz int	 respond(void *);
    216  1.13       wiz int	 retfield(void *);
    217  1.13       wiz int	 rexit(void *);
    218  1.13       wiz int	 rm(char *);
    219  1.20  christos int	 run_command(const char *, sigset_t *, int, int, ...);
    220  1.13       wiz int	 save(void *);
    221  1.25  christos // int	 Save(void *);
    222  1.20  christos int	 save1(char [], int, const char *, struct ignoretab *);
    223  1.13       wiz void	 savedeadletter(FILE *);
    224  1.13       wiz int	 saveigfield(void *);
    225  1.24  christos int	 savemail(const char [], FILE *, struct name *);
    226  1.13       wiz int	 saveretfield(void *);
    227  1.13       wiz int	 scan(char **);
    228  1.13       wiz void	 scaninit(void);
    229  1.13       wiz int	 schdir(void *);
    230  1.13       wiz int	 screensize(void);
    231  1.13       wiz int	 scroll(void *);
    232  1.25  christos #ifdef MIME_SUPPORT
    233  1.25  christos int	 sendmessage(struct message *, FILE *, struct ignoretab *,
    234  1.25  christos     const char *, struct mime_info *);
    235  1.25  christos #else
    236  1.20  christos int	 sendmessage(struct message *, FILE *, struct ignoretab *,
    237  1.20  christos     const char *);
    238  1.25  christos #endif
    239  1.13       wiz int	 sendmail(void *);
    240  1.13       wiz int	 set(void *);
    241  1.20  christos int	 setfile(const char *);
    242  1.13       wiz void	 setmsize(int);
    243  1.13       wiz void	 setptr(FILE *, off_t);
    244  1.13       wiz void	 setscreensize(void);
    245  1.13       wiz int	 shell(void *);
    246  1.24  christos int	 show(void *);
    247  1.13       wiz void	 sigchild(int);
    248  1.13       wiz void	 sort(char **);
    249  1.13       wiz int	 source(void *);
    250  1.13       wiz void	 spreserve(void);
    251  1.13       wiz void	 sreset(void);
    252  1.20  christos int	 start_command(const char *, sigset_t *, int, int, ...);
    253  1.20  christos void	 statusput(struct message *, FILE *, const char *);
    254  1.13       wiz void	 stop(int);
    255  1.13       wiz int	 stouch(void *);
    256  1.13       wiz int	 swrite(void *);
    257  1.13       wiz void	 tinit(void);
    258  1.13       wiz int	 top(void *);
    259  1.13       wiz void	 touch(struct message *);
    260  1.13       wiz void	 ttyint(int);
    261  1.13       wiz void	 ttystop(int);
    262  1.13       wiz int	 type(void *);
    263  1.25  christos #ifdef MIME_SUPPORT
    264  1.25  christos int	 view(void *);
    265  1.25  christos int	 View(void *);
    266  1.25  christos int	 page(void *);
    267  1.25  christos int	 Page(void *);
    268  1.25  christos int	 print(void *);
    269  1.25  christos int	 Print(void *);
    270  1.25  christos int	 type1(int *, int, int, int);
    271  1.25  christos #else
    272  1.13       wiz int	 type1(int *, int, int);
    273  1.25  christos #endif
    274  1.13       wiz int	 undeletecmd(void *);
    275  1.13       wiz void	 unmark(int);
    276  1.20  christos const char **unpack(struct name *);
    277  1.13       wiz int	 unread(void *);
    278  1.13       wiz void	 unregister_file(FILE *);
    279  1.13       wiz int	 unset(void *);
    280  1.13       wiz int	 unstack(void);
    281  1.13       wiz void	 v_free(char *);
    282  1.13       wiz int	 visual(void *);
    283  1.13       wiz int	 wait_child(int);
    284  1.13       wiz int	 wait_command(int);
    285  1.13       wiz int	 writeback(FILE *);
    286  1.21  christos 
    287  1.25  christos #ifdef MIME_SUPPORT
    288  1.25  christos FILE	*last_registered_file(int);
    289  1.25  christos void	close_top_files(FILE *);
    290  1.25  christos void	flush_files(FILE *, int);
    291  1.25  christos #endif
    292  1.25  christos 
    293  1.21  christos extern const char *version;
    294  1.21  christos extern char *tmpdir;
    295  1.21  christos extern const struct cmd cmdtab[];
    296  1.21  christos extern int wait_status;
    297