]> diplodocus.org Git - nmh/blobdiff - uip/mhtest.c
mhshow: properly report the name of a failing display program
[nmh] / uip / mhtest.c
index abdfdadfac61aced1eb3b73ee411882700dce6e0..38e33a84ff2fe8ccfdbce523f57b4ffd62ea9443 100644 (file)
@@ -59,8 +59,6 @@ extern int userrs;
  * This is currently needed to keep mhparse happy.
  * This needs to be changed.
  */
-pid_t xpid  = 0;
-
 int debugsw = 0;
 int verbosw = 0;
 
@@ -99,15 +97,9 @@ main (int argc, char **argv)
     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;
@@ -349,7 +341,6 @@ static void
 pipeser (int i)
 {
     if (i == SIGQUIT) {
-       unlink ("core");
        fflush (stdout);
        fprintf (stderr, "\n");
        fflush (stderr);