X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhstore.c;h=bef91224c2245e97a5bdde8ac0688d54d2b3399f;hp=08891f53016830e4ac1d54238cec009f48bc0771;hb=d8916ff5d389de5ab225cd6f40aeda1b285d0f28;hpb=174d375bb4b9bcaa0c3f28c422216f68703494a8 diff --git a/uip/mhstore.c b/uip/mhstore.c index 08891f5..bef9122 100644 --- a/uip/mhstore.c +++ b/uip/mhstore.c @@ -64,7 +64,6 @@ static struct swit switches[] = { /* mhparse.c */ -extern int checksw; extern char *tmp; /* directory to place temp files */ /* mhcachesbr.c */ @@ -87,9 +86,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 +102,8 @@ void store_all_messages (CT *); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int) NORETURN; /* * static prototypes @@ -125,6 +123,8 @@ main (int argc, char **argv) CT ct, *ctp; FILE *fp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -229,7 +229,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); } @@ -384,7 +384,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -401,17 +402,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 */ -}