Home | History | Annotate | Line # | Download | only in mail
extern.h revision 1.26
      1  1.25  christos /*	$NetBSD: extern.h,v 1.26 2006/10/31 20:07:32 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.26 2006/10/31 20:07:32 christos Exp $
     33   1.1   deraadt  */
     34   1.1   deraadt 
     35  1.26  christos #ifndef __EXTERN_H__
     36  1.26  christos #define __EXTERN_H__
     37  1.26  christos 
     38   1.4  christos struct name;
     39  1.13       wiz struct name *cat(struct name *, struct name *);
     40  1.13       wiz struct name *delname(struct name *, char []);
     41  1.13       wiz struct name *elide(struct name *);
     42  1.13       wiz struct name *extract(char [], int);
     43   1.4  christos struct grouphead;
     44  1.13       wiz struct name *gexpand(struct name *, struct grouphead *, int, int);
     45  1.24  christos struct name *lexpand(char *, int);
     46  1.13       wiz struct name *nalloc(char [], int);
     47   1.4  christos struct header;
     48  1.13       wiz struct name *outof(struct name *, FILE *, struct header *);
     49  1.13       wiz struct name *put(struct name *, struct name *);
     50  1.13       wiz struct name *tailof(struct name *);
     51  1.13       wiz struct name *usermap(struct name *);
     52  1.20  christos FILE	*Fdopen(int, const char *);
     53  1.20  christos FILE	*Fopen(const char *, const char *);
     54  1.20  christos FILE	*Popen(const char *, const char *);
     55  1.13       wiz FILE	*collect(struct header *, int);
     56  1.13       wiz char	*copy(char *, char *);
     57  1.22  christos char	*copyin(const char *, char **);
     58  1.25  christos void	*csalloc(size_t, size_t);
     59  1.13       wiz char	*detract(struct name *, int);
     60  1.20  christos const char *expand(const char *);
     61  1.20  christos const char *getdeadletter(void);
     62  1.21  christos const	char *getname(uid_t);
     63   1.4  christos struct message;
     64  1.19      ross char	*hfield(const char [], const struct message *);
     65  1.13       wiz FILE	*infix(struct header *, FILE *);
     66  1.19      ross char	*ishfield(const char [], char[], const char *);
     67  1.13       wiz char	*name1(struct message *, int);
     68  1.13       wiz char	*nameof(struct message *, int);
     69  1.22  christos const char	*nextword(const char *, char *);
     70  1.20  christos char	*readtty(const char [], char []);
     71  1.13       wiz char 	*reedit(char *);
     72  1.13       wiz FILE	*run_editor(FILE *, off_t, int, int);
     73  1.21  christos void	*salloc(size_t);
     74  1.13       wiz char	*savestr(const char *);
     75  1.19      ross FILE	*setinput(const struct message *);
     76  1.13       wiz char	*skin(char *);
     77  1.13       wiz char	*skip_comment(char *);
     78  1.13       wiz char	*snarf(char [], int *);
     79  1.13       wiz const	char *username(void);
     80  1.20  christos char	*value(const char []);
     81  1.20  christos char	*vcopy(const char []);
     82  1.13       wiz char	*yankword(char *, char []);
     83  1.13       wiz int	 Fclose(FILE *);
     84  1.13       wiz int	 More(void *);
     85  1.13       wiz int	 Pclose(FILE *);
     86  1.13       wiz int	 Respond(void *);
     87  1.13       wiz int	 Type(void *);
     88  1.13       wiz int	 _Respond(int []);
     89  1.13       wiz int	 _respond(int *);
     90  1.13       wiz void	 alter(char *);
     91  1.13       wiz int	 alternates(void *);
     92  1.13       wiz void	 announce(void);
     93  1.13       wiz int	 append(struct message *, FILE *);
     94  1.13       wiz int	 argcount(char **);
     95  1.20  christos void	 assign(const char [], const char []);
     96  1.13       wiz int	 bangexp(char *);
     97  1.13       wiz int	 blankline(char []);
     98  1.13       wiz void	 brokpipe(int);
     99  1.13       wiz int	 charcount(char *, int);
    100  1.13       wiz int	 check(int, int);
    101  1.13       wiz void	 clob1(int);
    102  1.13       wiz int	 clobber(void *);
    103  1.13       wiz void	 close_all_files(void);
    104  1.20  christos int	 cmatch(const char *, char *);
    105  1.13       wiz void	 collhup(int);
    106  1.13       wiz void	 collint(int);
    107  1.13       wiz void	 collstop(int);
    108  1.13       wiz void	 commands(void);
    109  1.13       wiz int	 copycmd(void *);
    110  1.13       wiz int	 core(void *);
    111  1.13       wiz int	 count(struct name *);
    112  1.13       wiz int	 delete(void *);
    113  1.13       wiz int	 delm(int []);
    114  1.13       wiz int	 deltype(void *);
    115  1.13       wiz void	 demail(void);
    116  1.13       wiz int	 dosh(void *);
    117  1.13       wiz int	 dot_lock(const char *, int, FILE *, const char *);
    118  1.13       wiz void	 dot_unlock(const char *);
    119  1.13       wiz int	 echo(void *);
    120  1.13       wiz int	 edit1(int *, int);
    121  1.13       wiz int	 editor(void *);
    122  1.13       wiz void	 edstop(void);
    123  1.13       wiz int	 elsecmd(void *);
    124  1.13       wiz int	 endifcmd(void *);
    125  1.13       wiz int	 execute(char [], int);
    126  1.20  christos int	 exwrite(const char [], FILE *, int);
    127  1.22  christos void	 fail(const char [], const char []);
    128  1.13       wiz int	 file(void *);
    129   1.1   deraadt struct grouphead *
    130  1.13       wiz 	 findgroup(char []);
    131  1.20  christos void	 findmail(const char *, char *);
    132  1.13       wiz int	 first(int, int);
    133  1.13       wiz void	 fixhead(struct header *, struct name *);
    134  1.20  christos void	 fmt(const char *, struct name *, FILE *, int);
    135  1.13       wiz int	 folders(void *);
    136  1.15       wiz int	 forward(char [], FILE *, char *, int);
    137  1.13       wiz void	 free_child(int);
    138  1.13       wiz int	 from(void *);
    139  1.13       wiz off_t	 fsize(FILE *);
    140  1.13       wiz int	 getfold(char *);
    141  1.13       wiz int	 getmsglist(char *, int *, int);
    142  1.20  christos int	 getrawlist(const char [], char **, int);
    143  1.13       wiz int	 getuserid(char []);
    144  1.13       wiz int	 grabh(struct header *, int);
    145  1.13       wiz int	 group(void *);
    146  1.13       wiz void	 hangup(int);
    147  1.20  christos int	 hash(const char *);
    148  1.13       wiz void	 hdrstop(int);
    149  1.13       wiz int	 headers(void *);
    150  1.13       wiz int	 help(void *);
    151  1.13       wiz void	 holdsigs(void);
    152  1.13       wiz int	 ifcmd(void *);
    153  1.13       wiz int	 igfield(void *);
    154  1.23  christos int	 unalias(void *);
    155   1.4  christos struct ignoretab;
    156  1.20  christos int	 ignore1(char *[], struct ignoretab *, const char *);
    157  1.20  christos int	 igshow(struct ignoretab *, const char *);
    158  1.13       wiz void	 intr(int);
    159  1.13       wiz int	 inc(void *);
    160  1.13       wiz int	 incfile(void);
    161  1.20  christos int	 isdate(const char []);
    162  1.20  christos int	 isdir(const char []);
    163  1.13       wiz int	 isfileaddr(char *);
    164  1.22  christos int	 ishead(const char []);
    165  1.20  christos int	 isign(const char *, struct ignoretab []);
    166  1.20  christos int	 isprefix(char *, const char *);
    167  1.20  christos void	 istrcpy(char *, const char *);
    168   1.3       jtc const struct cmd *
    169  1.13       wiz 	 lex(char []);
    170  1.20  christos void	 load(const char *);
    171   1.1   deraadt struct var *
    172  1.20  christos 	 lookup(const char []);
    173  1.25  christos #ifdef MIME_SUPPORT
    174  1.25  christos int	 mail(struct name *,
    175  1.25  christos 	      struct name *, struct name *, struct name *, char *,
    176  1.25  christos 	      struct attachment *);
    177  1.25  christos #else
    178  1.13       wiz int	 mail(struct name *,
    179  1.13       wiz 	      struct name *, struct name *, struct name *, char *);
    180  1.25  christos #endif
    181  1.13       wiz void	 mail1(struct header *, int);
    182  1.13       wiz void	 makemessage(FILE *, int);
    183  1.13       wiz void	 mark(int);
    184  1.13       wiz int	 markall(char [], int);
    185  1.13       wiz int	 matchsender(char *, int);
    186  1.13       wiz int	 matchsubj(char *, int);
    187  1.13       wiz int	 mboxit(void *);
    188  1.13       wiz int	 member(char *, struct ignoretab *);
    189  1.13       wiz void	 mesedit(FILE *, int);
    190  1.13       wiz void	 mespipe(FILE *, char []);
    191  1.13       wiz int	 messize(void *);
    192  1.13       wiz int	 metamess(int, int);
    193  1.13       wiz int	 more(void *);
    194  1.13       wiz int	 newfileinfo(int);
    195  1.13       wiz int	 next(void *);
    196  1.13       wiz int	 null(void *);
    197   1.4  christos struct headline;
    198  1.22  christos void	 parse(const char [], struct headline *, char []);
    199  1.13       wiz int	 pcmdlist(void *);
    200  1.13       wiz int	 pdot(void *);
    201  1.24  christos int	 pipecmd(void *);
    202  1.13       wiz void	 prepare_child(sigset_t *, int, int);
    203  1.13       wiz int	 preserve(void *);
    204  1.13       wiz void	 prettyprint(struct name *);
    205  1.13       wiz void	 printgroup(char []);
    206  1.13       wiz void	 printhead(int);
    207  1.13       wiz int	 puthead(struct header *, FILE *, int);
    208  1.20  christos int	 putline(FILE *, const char *, int);
    209  1.13       wiz int	 pversion(void *);
    210  1.13       wiz void	 quit(void);
    211  1.13       wiz int	 quitcmd(void *);
    212  1.13       wiz int	 upcase(int);
    213  1.25  christos int	 mail_readline(FILE *, char *, int);
    214  1.13       wiz void	 register_file(FILE *, int, int);
    215  1.13       wiz void	 regret(int);
    216  1.13       wiz void	 relsesigs(void);
    217  1.13       wiz int	 respond(void *);
    218  1.13       wiz int	 retfield(void *);
    219  1.13       wiz int	 rexit(void *);
    220  1.13       wiz int	 rm(char *);
    221  1.20  christos int	 run_command(const char *, sigset_t *, int, int, ...);
    222  1.13       wiz int	 save(void *);
    223  1.26  christos int	 Save(void *);
    224  1.20  christos int	 save1(char [], int, const char *, struct ignoretab *);
    225  1.13       wiz void	 savedeadletter(FILE *);
    226  1.13       wiz int	 saveigfield(void *);
    227  1.26  christos int	 savemail(const char [], FILE *);
    228  1.13       wiz int	 saveretfield(void *);
    229  1.13       wiz int	 scan(char **);
    230  1.13       wiz void	 scaninit(void);
    231  1.13       wiz int	 schdir(void *);
    232  1.13       wiz int	 screensize(void);
    233  1.13       wiz int	 scroll(void *);
    234  1.25  christos #ifdef MIME_SUPPORT
    235  1.25  christos int	 sendmessage(struct message *, FILE *, struct ignoretab *,
    236  1.25  christos     const char *, struct mime_info *);
    237  1.25  christos #else
    238  1.20  christos int	 sendmessage(struct message *, FILE *, struct ignoretab *,
    239  1.20  christos     const char *);
    240  1.25  christos #endif
    241  1.13       wiz int	 sendmail(void *);
    242  1.13       wiz int	 set(void *);
    243  1.20  christos int	 setfile(const char *);
    244  1.13       wiz void	 setmsize(int);
    245  1.13       wiz void	 setptr(FILE *, off_t);
    246  1.13       wiz void	 setscreensize(void);
    247  1.13       wiz int	 shell(void *);
    248  1.24  christos int	 show(void *);
    249  1.13       wiz void	 sigchild(int);
    250  1.13       wiz void	 sort(char **);
    251  1.13       wiz int	 source(void *);
    252  1.13       wiz void	 spreserve(void);
    253  1.13       wiz void	 sreset(void);
    254  1.20  christos int	 start_command(const char *, sigset_t *, int, int, ...);
    255  1.20  christos void	 statusput(struct message *, FILE *, const char *);
    256  1.13       wiz void	 stop(int);
    257  1.13       wiz int	 stouch(void *);
    258  1.13       wiz int	 swrite(void *);
    259  1.13       wiz void	 tinit(void);
    260  1.13       wiz int	 top(void *);
    261  1.13       wiz void	 touch(struct message *);
    262  1.13       wiz void	 ttyint(int);
    263  1.13       wiz void	 ttystop(int);
    264  1.13       wiz int	 type(void *);
    265  1.25  christos #ifdef MIME_SUPPORT
    266  1.25  christos int	 view(void *);
    267  1.25  christos int	 View(void *);
    268  1.25  christos int	 page(void *);
    269  1.25  christos int	 Page(void *);
    270  1.25  christos int	 print(void *);
    271  1.25  christos int	 Print(void *);
    272  1.25  christos int	 type1(int *, int, int, int);
    273  1.25  christos #else
    274  1.13       wiz int	 type1(int *, int, int);
    275  1.25  christos #endif
    276  1.13       wiz int	 undeletecmd(void *);
    277  1.13       wiz void	 unmark(int);
    278  1.20  christos const char **unpack(struct name *);
    279  1.13       wiz int	 unread(void *);
    280  1.13       wiz void	 unregister_file(FILE *);
    281  1.13       wiz int	 unset(void *);
    282  1.13       wiz int	 unstack(void);
    283  1.13       wiz void	 v_free(char *);
    284  1.13       wiz int	 visual(void *);
    285  1.13       wiz int	 wait_child(int);
    286  1.13       wiz int	 wait_command(int);
    287  1.13       wiz int	 writeback(FILE *);
    288  1.21  christos 
    289  1.25  christos #ifdef MIME_SUPPORT
    290  1.25  christos FILE	*last_registered_file(int);
    291  1.25  christos void	close_top_files(FILE *);
    292  1.25  christos void	flush_files(FILE *, int);
    293  1.25  christos #endif
    294  1.25  christos 
    295  1.26  christos #ifdef SMOPTS_CMD
    296  1.26  christos int	smoptscmd(void *);
    297  1.26  christos int	unsmopts(void *);
    298  1.26  christos struct smopts_s *findsmopts(const char *, int);
    299  1.26  christos #endif
    300  1.26  christos 
    301  1.26  christos int	get_Hflag(char **);
    302  1.26  christos int	show_headers(int) __attribute__((__noreturn__));
    303  1.26  christos int	markread(void *);
    304  1.26  christos 
    305  1.21  christos extern const char *version;
    306  1.21  christos extern char *tmpdir;
    307  1.21  christos extern const struct cmd cmdtab[];
    308  1.21  christos extern int wait_status;
    309  1.26  christos 
    310  1.26  christos #endif /* __EXTERN_H__ */
    311