X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhstore.c;h=7b44a96504494a1f799b861dac0f5d125ada2c51;hb=f6aa95b724fd8c791164abe7ee5468bf5c34f226;hp=08891f53016830e4ac1d54238cec009f48bc0771;hpb=174d375bb4b9bcaa0c3f28c422216f68703494a8;p=mmh diff --git a/uip/mhstore.c b/uip/mhstore.c index 08891f5..7b44a96 100644 --- a/uip/mhstore.c +++ b/uip/mhstore.c @@ -2,8 +2,6 @@ /* * mhstore.c -- store the contents of MIME messages * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -64,7 +62,6 @@ static struct swit switches[] = { /* mhparse.c */ -extern int checksw; extern char *tmp; /* directory to place temp files */ /* mhcachesbr.c */ @@ -87,9 +84,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 +100,8 @@ void store_all_messages (CT *); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int) NORETURN; /* * static prototypes @@ -125,6 +121,8 @@ main (int argc, char **argv) CT ct, *ctp; FILE *fp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -229,7 +227,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 +382,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -401,17 +400,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 */ -}