/*
* mhstore.c -- store the contents of MIME messages
*
- * $Id$
- *
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
#include <h/mhcachesbr.h>
#include <h/utils.h>
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
static struct swit switches[] = {
#define AUTOSW 0
{ "auto", 0 },
/* mhparse.c */
-extern int checksw;
extern char *tmp; /* directory to place temp files */
/* mhcachesbr.c */
int debugsw = 0;
int verbosw = 0;
-/* The list of top-level contents to display */
-CT *cts = NULL;
-
#define quitser pipeser
/* mhparse.c */
/* mhfree.c */
void free_content (CT);
+extern CT *cts;
+void freects_done (int) NORETURN;
/*
* static prototypes
*/
-static RETSIGTYPE pipeser (int);
-static int freectp_done (int);
+static void pipeser (int);
int
CT ct, *ctp;
FILE *fp;
- done=freectp_done;
+ done=freects_done;
#ifdef LOCALE
setlocale(LC_ALL, "");
adios (NULL, "out of memory");
ctp = cts;
- if ((ct = parse_mime (file)));
+ if ((ct = parse_mime (file)))
*ctp++ = ct;
} else {
/*
context_save (); /* save the context file */
}
- return done (0);
+ done (0);
+ return 1;
}
-static RETSIGTYPE
+static void
pipeser (int i)
{
if (i == SIGQUIT) {
done (1);
/* NOTREACHED */
}
-
-
-static int
-freectp_done (int status)
-{
- CT *ctp;
-
- if ((ctp = cts))
- for (; *ctp; ctp++)
- free_content (*ctp);
-
- exit (status);
- return 1; /* dead code to satisfy the compiler */
-}