#ifndef __EXTERN_H__
#define __EXTERN_H__
int More(void *);
int Type(void *);
int folders(void *);
int from(void *);
int headers(void *);
int inc(void *);
int mboxit(void *);
int more(void *);
int pcmdlist(void *);
int pdot(void *);
int pipecmd(void *);
int scroll(void *);
int stouch(void *);
int top(void *);
int type(void *);
#ifdef MIME_SUPPORT
int page(void *);
int Page(void *);
int print(void *);
int Print(void *);
int view(void *);
int View(void *);
#endif
void printhead(int);
char * sget_msgnum(struct message *, struct message *);
void show_msgnum(FILE *, struct message *, struct message *);
int Detach(void *);
int Save(void *);
int clobber(void *);
int copycmd(void *);
int core(void *);
int delete(void *);
int deltype(void *);
int detach(void *);
int igfield(void *);
int next(void *);
int retfield(void *);
int save(void *);
int saveigfield(void *);
int saveretfield(void *);
int swrite(void *);
int undeletecmd(void *);
int Respond(void *);
int alternates(void *);
int bounce(void *);
int dosh(void *);
int echo(void *);
int elsecmd(void *);
int endifcmd(void *);
int file(void *);
int bounce(void *);
int forward(void *);
int group(void *);
int help(void *);
int ifcmd(void *);
int ifdefcmd(void *v);
int ifndefcmd(void *v);
int markread(void *);
int messize(void *);
int null(void *);
int preserve(void *);
int respond(void *);
int rexit(void *);
int schdir(void *);
int set(void *);
int shell(void *);
int show(void *);
int unalias(void *);
int unread(void *);
int unset(void *);
void sort(const char **);
struct smopts_s *findsmopts(const char *, int);
int smoptscmd(void *);
int unsmoptscmd(void *);
int Header(void *);
extern const struct cmd cmdtab[];
FILE * collect(struct header *, int);
void savedeadletter(FILE *);
int dot_lock(const char *, int, FILE *, const char *);
void dot_unlock(const char *);
int editor(void *);
int visual(void *);
FILE * run_editor(FILE *, off_t, int, int);
const char *expand(const char *);
off_t fsize(FILE *);
const char *getdeadletter(void);
int getfold(char *, size_t);
#ifdef USE_EDITLINE
#define readline xreadline
#endif
int readline(FILE *, char *, int, int);
int putline(FILE *, const char *, int);
int rm(char *);
FILE * setinput(const struct message *);
void setptr(FILE *, off_t);
const char *getname(uid_t);
int getuserid(char []);
int ishead(const char []);
void parse(const char [], struct headline *, char []);
void announce(void);
void commands(void);
enum execute_contxt_e { ec_normal, ec_composing, ec_autoprint };
int execute(char [], enum execute_contxt_e);
int incfile(void);
const struct cmd *lex(char []);
void load(const char *);
int newfileinfo(int);
int pversion(void *);
int setfile(const char *);
char * shellpr(char *);
char * get_cmdname(char *);
int first(int, int);
int get_Hflag(char **);
int getmsglist(char *, int *, int);
int getrawlist(const char [], char **, int);
int show_headers_and_exit(int) __dead;
struct name *lexpand(char *, int);
void setscreensize(void);
struct name *cat(struct name *, struct name *);
int count(struct name *);
struct name *delname(struct name *, char []);
char * detract(struct name *, int);
struct name * elide(struct name *);
struct name * extract(char [], int);
struct name * gexpand(struct name *, struct grouphead *, int, int);
struct name * nalloc(char [], int);
struct name * outof(struct name *, FILE *, struct header *);
const char ** unpack(struct name *, struct name *);
struct name * usermap(struct name *);
#if 0
void prettyprint(struct name *);
#endif
int Fclose(FILE *);
FILE * Fdopen(int, const char *);
FILE * Fopen(const char *, const char *);
int Pclose(FILE *);
FILE * Popen(const char *, const char *);
void close_all_files(void);
void close_top_files(FILE *);
void free_child(int);
void prepare_child(sigset_t *, int, int);
FILE * last_registered_file(int);
void register_file(FILE *, int, int);
int run_command(const char *, sigset_t *, int, int, ...);
void sigchild(int);
int start_command(const char *, sigset_t *, int, int, ...);
int wait_child(int);
#ifdef MIME_SUPPORT
void flush_files(FILE *, int);
#endif
void quit(jmp_buf);
int quitcmd(void *);
#ifndef MIME_SUPPORT
# define sendmessage(a,b,c,d,e) legacy_sendmessage(a,b,c,d)
# define mail(a,b,c,d,e,f) legacy_mail(a,b,c,d,e)
#endif
int sendmessage(struct message *, FILE *, struct ignoretab *, const char *, struct mime_info *);
int mail(struct name *, struct name *, struct name *, struct name *, char *, struct attachment *);
void mail1(struct header *, int);
void mail2(FILE *, const char **);
int puthead(struct header *, FILE *, int);
int sendmail(void *);
void * csalloc(size_t, size_t);
void * salloc(size_t);
void sreset(void);
void spreserve(void);
void add_ignore(const char *, struct ignoretab *);
void alter(char *);
int argcount(char **);
int blankline(char []);
char * copy(char *, char *);
char * hfield(const char [], const struct message *);
int isdir(const char []);
int isign(const char *, struct ignoretab [2]);
void istrcpy(char *, const char *);
int member(char *, struct ignoretab *);
char * nameof(struct message *, int);
int sasprintf(char **ret, const char *format, ...) __printflike(2, 3);
char * savestr(const char *);
struct message *set_m_flag(int, int, int);
char * skin(char *);
int source(void *);
void touch(struct message *);
int unstack(void);
int upcase(int);
void cathelp(const char *);
void tinit(void);
int grabh(struct header *, int);
void assign(const char [], const char []);
struct grouphead * findgroup(const char []);
int hash(const char *);
struct var * lookup(const char []);
void printgroup(const char []);
void v_free(char *);
char * value(const char []);
char * vcopy(const char []);
void demail(void);
void findmail(const char *, char *, size_t);
const char *username(void);
extern const char *version;
#ifndef THREAD_SUPPORT
struct message *next_message(struct message *);
struct message *prev_message(struct message *);
struct message *get_message(int);
int get_msgnum(struct message *);
int get_msgCount(void);
# define get_abs_msgCount get_msgCount
# define get_abs_message(a) get_message(a)
# define next_abs_message(a) next_message(a)
# define do_recursion() 0
# define thread_recursion(mp,fn,args) fn(mp,args)
# define thread_fix_old_links(nmessage,off,omsgCount)
# define thread_fix_new_links(message,omsgCount,msgCount)
#endif
#endif