X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhtest.c;h=d8c025fa04a56113982dc350b2464fd08b04418c;hp=140c7d90092b812abeeee927e04a7d62c68b2596;hb=25c0bc3f1c034964421f8007e5802c647c5dc908;hpb=174d375bb4b9bcaa0c3f28c422216f68703494a8 diff --git a/uip/mhtest.c b/uip/mhtest.c index 140c7d9..d8c025f 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -89,9 +89,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 */ @@ -108,6 +105,8 @@ void flush_errors (void); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int) NORETURN; /* * static prototypes @@ -127,6 +126,8 @@ main (int argc, char **argv) struct msgs *mp = NULL; CT ct, *ctp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -230,7 +231,7 @@ do_cache: if (folder) adios (NULL, "only one folder at a time!"); else - folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF); + folder = pluspath (cp); } else app_msgarg(&msgs, cp); } @@ -363,7 +364,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -395,17 +397,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 */ -}