X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhshow.c;h=191eeff84961bb2b4fb2f9d63e664d9c57bb0a73;hb=a01a41d031c796b526329a4170eb23f0ac93b949;hp=3e7e3a5f24537f15c88c3a56eef5edf19c0c308d;hpb=0569d6d1631dc90d4f2f2df6bdd0599c7ecc7814;p=mmh diff --git a/uip/mhshow.c b/uip/mhshow.c index 3e7e3a5..191eeff 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -2,8 +2,6 @@ /* * mhshow.c -- display 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. @@ -82,7 +80,6 @@ static struct swit switches[] = { /* mhparse.c */ -extern int checksw; extern char *tmp; /* directory to place temp files */ /* mhcachesbr.c */ @@ -109,9 +106,6 @@ extern int userrs; int debugsw = 0; int verbosw = 0; -/* The list of top-level contents to display */ -CT *cts = NULL; - #define quitser pipeser /* mhparse.c */ @@ -128,6 +122,8 @@ void show_all_messages (CT *); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int) NORETURN; /* * static prototypes @@ -147,6 +143,8 @@ main (int argc, char **argv) CT ct, *ctp; FILE *fp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -452,7 +450,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -469,17 +468,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 */ -}