X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhlist.c;h=cb6a3cf607136986551c56b2db8d8be669ea1c68;hb=f480c03187724e54e5391ee61b810827da319a6c;hp=1de53e33aa29d83b541f94c95ea9f92710f0b7bb;hpb=0569d6d1631dc90d4f2f2df6bdd0599c7ecc7814;p=mmh diff --git a/uip/mhlist.c b/uip/mhlist.c index 1de53e3..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,6 +106,8 @@ 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 @@ -131,6 +127,8 @@ main (int argc, char **argv) struct msgs *mp = NULL; CT ct, *ctp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -372,7 +370,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -389,17 +388,3 @@ pipeser (int i) done (1); /* NOTREACHED */ } - - -int -done (int status) -{ - CT *ctp; - - if ((ctp = cts)) - for (; *ctp; ctp++) - free_content (*ctp); - - exit (status); - return 1; /* dead code to satisfy the compiler */ -}