]> diplodocus.org Git - nmh/blobdiff - uip/prompter.c
Support for selectable Content-Transfer-Encoding.
[nmh] / uip / prompter.c
index 0aedc8c1d13417abee8ea92249f27cda3cf7f937..37f5960b0c322a622af6775c38d62361bc1420ce 100644 (file)
@@ -78,13 +78,7 @@ main (int argc, char **argv)
     char *tmpfil;
     m_getfld_state_t gstate = 0;
 
-#ifdef LOCALE
-    setlocale(LC_ALL, "");
-#endif
-    invo_name = r1bindex (argv[0], '/');
-
-    /* read user profile/context */
-    context_read();
+    if (nmh_init(argv[0], 1)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
@@ -233,7 +227,7 @@ abort:
                        if (killp || erasep) {
                            tcsetattr(0, TCSADRAIN, &tio);
                        }
-                       unlink (tmpfil);
+                       (void) m_unlink (tmpfil);
                        done (1);
                    }
                    if (i != 0 || (field[0] != '\n' && field[0] != 0)) {
@@ -322,7 +316,7 @@ abort:
     cpydata (fdi, fdo, tmpfil, drft);
     close (fdi);
     close (fdo);
-    unlink (tmpfil);
+    (void) m_unlink (tmpfil);
 
     context_save ();   /* save the context file */
     done (0);