X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2e768e3cc0ce768373d3320eca4cdd08b8cf646a..d6e398f9c:/uip/mhshow.c?ds=inline diff --git a/uip/mhshow.c b/uip/mhshow.c index f5666b07..e897f2b6 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include @@ -23,10 +21,6 @@ #define MHSHOW_SWITCHES \ X("check", 0, CHECKSW) \ X("nocheck", 0, NCHECKSW) \ - X("pause", 0, PAUSESW) \ - X("nopause", 0, NPAUSESW) \ - X("serialonly", 0, SERIALSW) \ - X("noserialonly", 0, NSERIALSW) \ X("verbose", 0, VERBSW) \ X("noverbose", 0, NVERBSW) \ X("file file", 0, FILESW) \ @@ -58,9 +52,6 @@ DEFINE_SWITCH_ARRAY(MHSHOW, switches); #undef X -/* mhparse.c */ -extern char *tmp; /* directory to place temp files */ - /* mhcachesbr.c */ extern int rcachesw; extern int wcachesw; @@ -68,10 +59,7 @@ extern char *cache_public; extern char *cache_private; /* mhshowsbr.c */ -extern int pausesw; -extern int serialsw; extern char *progsw; -extern int nolist; extern int nomore; /* flags for moreproc/header display */ extern char *formsw; @@ -120,15 +108,9 @@ main (int argc, char **argv) CT ct, *ctp; FILE *fp; - done=freects_done; - -#ifdef LOCALE - setlocale(LC_ALL, ""); -#endif - invo_name = r1bindex (argv[0], '/'); + if (nmh_init(argv[0], 1)) { return 1; } - /* read user profile/context */ - context_read(); + done=freects_done; arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -180,20 +162,6 @@ do_cache: checksw = 0; continue; - case PAUSESW: - pausesw = 1; - continue; - case NPAUSESW: - pausesw = 0; - continue; - - case SERIALSW: - serialsw = 1; - continue; - case NSERIALSW: - serialsw = 0; - continue; - case PARTSW: if (!(cp = *argp++) || *cp == '-') adios (NULL, "missing argument to %s", argp[-2]); @@ -296,16 +264,6 @@ do_cache: cache_private = ".cache"; cache_private = getcpy (m_maildir (cache_private)); - /* - * Check for storage directory. If specified, - * then store temporary files there. Else we - * store them in standard nmh directory. - */ - if ((cp = context_find (nmhstorage)) && *cp) - tmp = concat (cp, "/", invo_name, NULL); - else - tmp = add (m_maildir (invo_name), NULL); - if (!context_find ("path")) free (path ("./", TFOLDER)); @@ -336,7 +294,7 @@ do_cache: adios (maildir, "unable to change directory to"); /* read folder and create message structure */ - if (!(mp = folder_read (folder))) + if (!(mp = folder_read (folder, 1))) adios (NULL, "unable to read folder %s", folder); /* check for empty folder */