X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhn.c;h=45358e7eb633fdfbdac3b38b1c6e74c69a6b2f55;hp=809568c5c675edbc80ac0c79ef5a8f38055c5ec3;hb=d8916ff5d389de5ab225cd6f40aeda1b285d0f28;hpb=0569d6d1631dc90d4f2f2df6bdd0599c7ecc7814 diff --git a/uip/mhn.c b/uip/mhn.c index 809568c..45358e7 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -126,7 +126,6 @@ static struct swit switches[] = { /* mhparse.c */ -extern int checksw; extern char *tmp; /* directory to place temp files */ /* mhcachesbr.c */ @@ -157,9 +156,6 @@ extern int userrs; int debugsw = 0; int verbosw = 0; -/* The list of top-level contents to display */ -CT *cts = NULL; - /* * variables for mhbuild (mhn -build) */ @@ -200,6 +196,8 @@ void cache_all_messages (CT *); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int) NORETURN; /* * static prototypes @@ -220,6 +218,8 @@ main (int argc, char **argv) CT ct, *ctp; FILE *fp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -685,7 +685,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -702,17 +703,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 */ -}