]> diplodocus.org Git - nmh/blobdiff - uip/mhtest.c
Calculate "characters to use in for current line" based on starting a new
[nmh] / uip / mhtest.c
index 49d2a981a08c6c3c6747834f92184eaa83164f4b..b85a91ea782730c15780ce12812f0be1f741821e 100644 (file)
@@ -42,9 +42,6 @@ DEFINE_SWITCH_ARRAY(MHTEST, switches);
 #undef X
 
 
 #undef X
 
 
-/* mhparse.c */
-extern char *tmp;      /* directory to place temp files */
-
 /* mhcachesbr.c */
 extern int rcachesw;
 extern int wcachesw;
 /* mhcachesbr.c */
 extern int rcachesw;
 extern int wcachesw;
@@ -102,15 +99,9 @@ main (int argc, char **argv)
     struct msgs *mp = NULL;
     CT ct, *ctp;
 
     struct msgs *mp = NULL;
     CT ct, *ctp;
 
-    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;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
@@ -228,16 +219,6 @@ do_cache:
        cache_private = ".cache";
     cache_private = getcpy (m_maildir (cache_private));
 
        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));
 
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
 
@@ -362,7 +343,6 @@ static void
 pipeser (int i)
 {
     if (i == SIGQUIT) {
 pipeser (int i)
 {
     if (i == SIGQUIT) {
-       unlink ("core");
        fflush (stdout);
        fprintf (stderr, "\n");
        fflush (stderr);
        fflush (stdout);
        fprintf (stderr, "\n");
        fflush (stderr);