X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/174d375bb4b9bcaa0c3f28c422216f68703494a8..419ccf0da01ec9f0b0700a6bea7ac5f216cd28d8:/uip/mhshow.c diff --git a/uip/mhshow.c b/uip/mhshow.c index df4cf512..1383388d 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -109,9 +109,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 */ @@ -128,6 +125,8 @@ void show_all_messages (CT *); /* mhfree.c */ void free_content (CT); +extern CT *cts; +void freects_done (int); /* * static prototypes @@ -147,6 +146,8 @@ main (int argc, char **argv) CT ct, *ctp; FILE *fp; + done=freects_done; + #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -283,7 +284,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); } @@ -452,7 +453,8 @@ do_cache: context_save (); /* save the context file */ } - return done (0); + done (0); + return 1; } @@ -469,17 +471,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 */ -}