X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhstore.c;h=91c57a22ac56a3688fd28230ddd604db15058c9b;hp=dc627247351f47bba65f10b2f9591b7381bf8749;hb=25c0bc3f1c034964421f8007e5802c647c5dc908;hpb=0569d6d1631dc90d4f2f2df6bdd0599c7ecc7814 diff --git a/uip/mhstore.c b/uip/mhstore.c index dc62724..91c57a2 100644 --- a/uip/mhstore.c +++ b/uip/mhstore.c @@ -87,9 +87,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 */ @@ -106,6 +103,8 @@ void store_all_messages (CT *); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int) NORETURN; /* * static prototypes @@ -125,6 +124,8 @@ main (int argc, char **argv) CT ct, *ctp; FILE *fp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -384,7 +385,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -401,17 +403,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 */ -}