extern char *whatnowproc;
extern char *whomproc;
+extern int (*done) (int);
+
#include <h/prototypes.h>
void cpydgst (int, int, char *, char *);
int decode_rfc2047 (char *, char *, size_t);
void discard (FILE *);
-int done (int);
+int default_done (int);
int ext_hook(char *, char *, char *);
int fdcompare (int, int);
int folder_addmsg (struct msgs **, char *, int, int, int, int, char *);
#include <h/mh.h>
+int (*done) (int) = default_done;
+
int
-done (int status)
+default_done (int status)
{
exit (status);
return 1; /* dead code to satisfy the compiler */
*/
char *map_name(char *);
+static int inc_done(int);
#ifdef POP
-int done(int);
static int pop_action(char *);
static int pop_pack(char *);
static int map_count(void);
struct hes_postoffice *po;
#endif
+ done=inc_done;
+
/* absolutely the first thing we do is save our privileges,
* and drop them if we can.
*/
#endif /* if 0 */
-int
-done (int status)
+static int
+inc_done (int status)
{
#ifdef POP
if (packfile && pd != NOTOK)
static char outfile[BUFSIZ];
static int unlink_outfile = 0;
+static int unlink_done (int);
/* mhbuildsbr.c */
CT build_mime (char *);
CT ct, cts[2];
FILE *fp;
+ done=unlink_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+unlink_done (int status)
{
/*
* Check if we need to remove stray
* static prototypes
*/
static RETSIGTYPE pipeser (int);
+static int freectp_done (int);
int
struct msgs *mp = NULL;
CT ct, *ctp;
+ done=freectp_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+freectp_done (int status)
{
CT *ctp;
* static prototypes
*/
static RETSIGTYPE pipeser (int);
+static int freectp_done (int);
int
CT ct, *ctp;
FILE *fp;
+ done=freectp_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+freectp_done (int status)
{
CT *ctp;
* static prototypes
*/
static RETSIGTYPE pipeser (int);
+static int freectp_done (int);
int
CT ct, *ctp;
FILE *fp;
+ done=freectp_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+freectp_done (int status)
{
CT *ctp;
* static prototypes
*/
static RETSIGTYPE pipeser (int);
+static int freectp_done (int);
int
CT ct, *ctp;
FILE *fp;
+ done=freectp_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+freectp_done (int status)
{
CT *ctp;
*/
static int write_content (CT *, char *);
static RETSIGTYPE pipeser (int);
+static int freectp_done (int);
int
struct msgs *mp = NULL;
CT ct, *ctp;
+ done=freectp_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+freectp_done (int status)
{
CT *ctp;
static int mbx_style = MBOX_FORMAT;
static int mapping = 0;
+static int mbxclose_done(int);
+
char *file = NULL;
struct msgs *mp;
struct stat st;
+ done=mbxclose_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
return done (0);
}
-int
-done (int status)
+static int
+mbxclose_done (int status)
{
mbx_close (file, md);
exit (status);
static int listsw = -1;
+static int putzero_done (int);
int
main (int argc, char **argv)
struct msgs *mp;
register FILE *fp;
+ done=putzero_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+putzero_done (int status)
{
if (listsw && status && !isatty (fileno (stdout)))
printf ("0\n");
* prototypes
*/
static void rcvdistout (FILE *, char *, char *);
-int done (int);
+static int unlink_done (int);
int
char **argp, **arguments, *vec[MAXARGS];
register FILE *fp;
+ done=unlink_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
}
-int
-done (int status)
+static int
+unlink_done (int status)
{
if (backup[0])
unlink (backup);
*/
static char *tmpfilenam = NULL;
+static int unlink_done(int);
int
main (int argc, char **argv)
struct msgs *mp;
struct stat st;
+ done=unlink_done;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
/*
* Clean up and exit
*/
-int
-done(int status)
+static int
+unlink_done(int status)
{
if (tmpfilenam && *tmpfilenam)
unlink (tmpfilenam);
char *annotext = NULL;
char *distfile = NULL;
-static int armed = 0;
static jmp_buf env;
static char body_file_name[MAXPATHLEN + 1]; /* name of temporary file for body content */
* external prototypes
*/
int sendsbr (char **, int, char *, struct stat *, int, char *, int);
-int done (int);
char *getusername (void);
/*
* static prototypes
*/
+static int armed_done (int);
static void alert (char *, int);
static int tmp_fd (void);
static void anno (int, struct stat *);
}
}
- armed++;
+ done=armed_done;
switch (setjmp (env)) {
case OK:
/*
break;
}
- armed = 0;
+ done=default_done;
if (distfile)
unlink (distfile);
}
-int
-done (int status)
+static int
+armed_done (int status)
{
- if (armed)
- longjmp (env, status ? status : NOTOK);
+ longjmp (env, status ? status : NOTOK);
exit (status);
return 1; /* dead code to satisfy the compiler */