X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhlist.c;h=e8f8163b63ad0a83ba1f9a0f392ca05265fd4141;hb=55b8f7b6a738adb4dc9833233fc6111f3cd56969;hp=1de53e33aa29d83b541f94c95ea9f92710f0b7bb;hpb=0569d6d1631dc90d4f2f2df6bdd0599c7ecc7814;p=mmh diff --git a/uip/mhlist.c b/uip/mhlist.c index 1de53e3..e8f8163 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -93,9 +93,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 +109,8 @@ void list_all_messages (CT *, int, int, int, int); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int); /* * static prototypes @@ -131,6 +130,8 @@ main (int argc, char **argv) struct msgs *mp = NULL; CT ct, *ctp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -372,7 +373,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -389,17 +391,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 */ -}