X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhlist.c;h=cb6a3cf607136986551c56b2db8d8be669ea1c68;hb=a01a41d031c796b526329a4170eb23f0ac93b949;hp=bcc4dd2b7b83f980893d8703b1dc4ec55821d848;hpb=56a805299de35d8924969138aef4d0f1580daa6d;p=mmh diff --git a/uip/mhlist.c b/uip/mhlist.c index bcc4dd2..cb6a3cf 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -2,8 +2,6 @@ /* * mhlist.c -- list 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. @@ -68,7 +66,6 @@ static struct swit switches[] = { /* mhparse.c */ -extern int checksw; extern char *tmp; /* directory to place temp files */ /* mhcachesbr.c */ @@ -93,9 +90,6 @@ pid_t xpid = 0; int debugsw = 0; int verbosw = 0; -/* The list of top-level contents to display */ -CT *cts = NULL; - #define quitser pipeser /* mhparse.c */ @@ -112,12 +106,13 @@ void list_all_messages (CT *, int, int, int, int); /* 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); int @@ -132,7 +127,7 @@ main (int argc, char **argv) struct msgs *mp = NULL; CT ct, *ctp; - done=freectp_done; + done=freects_done; #ifdef LOCALE setlocale(LC_ALL, ""); @@ -375,7 +370,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -392,17 +388,3 @@ pipeser (int i) 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 */ -}