X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/de4636bb664106d9932ae7acb517e471b848f1f3..9b706433f:/uip/mhn.c diff --git a/uip/mhn.c b/uip/mhn.c index 5ce76222..08405d4d 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include @@ -79,9 +77,6 @@ DEFINE_SWITCH_ARRAY(MHN, switches); #undef X -/* mhparse.c */ -extern char *tmp; /* directory to place temp files */ - /* mhcachesbr.c */ extern int rcachesw; extern int wcachesw; @@ -147,7 +142,6 @@ void store_all_messages (CT *); void cache_all_messages (CT *); /* mhfree.c */ -void free_content (CT); extern CT *cts; void freects_done (int) NORETURN; @@ -170,15 +164,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; @@ -416,16 +404,6 @@ do_cache: */ cwd = getcpy (pwd()); - /* - * 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)); @@ -513,7 +491,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 */ @@ -622,7 +600,6 @@ static void pipeser (int i) { if (i == SIGQUIT) { - unlink ("core"); fflush (stdout); fprintf (stderr, "\n"); fflush (stderr);