X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0bfb53a23531bea3aaeadcd1a6f6c372eef96612..be6c3984:/uip/mhshow.c?ds=inline diff --git a/uip/mhshow.c b/uip/mhshow.c index 8e1a9003..f83236b7 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include @@ -58,9 +56,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; @@ -71,7 +66,6 @@ extern char *cache_private; extern int pausesw; extern int serialsw; extern char *progsw; -extern int nolist; extern int nomore; /* flags for moreproc/header display */ extern char *formsw; @@ -99,7 +93,6 @@ void flush_errors (void); void show_all_messages (CT *); /* mhfree.c */ -void free_content (CT); extern CT *cts; void freects_done (int) NORETURN; @@ -121,15 +114,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; @@ -297,16 +284,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)); @@ -337,7 +314,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 */ @@ -430,7 +407,6 @@ static void pipeser (int i) { if (i == SIGQUIT) { - unlink ("core"); fflush (stdout); fprintf (stderr, "\n"); fflush (stderr);