]> diplodocus.org Git - nmh/blobdiff - uip/burst.c
Added mention of "Reply to <address>?" prompt to repl(1) man
[nmh] / uip / burst.c
index 9b893cfea3b68fa10ddf32d94e7bc1c0a28bfc93..71b226c116761165021f66f44e33e9e9d1a070a1 100644 (file)
@@ -42,7 +42,6 @@ struct smsg {
  */
 
 int debugsw = 0;
  */
 
 int debugsw = 0;
-pid_t xpid = 0;
 
 /*
  * static prototypes
 
 /*
  * static prototypes
@@ -75,13 +74,7 @@ main (int argc, char **argv)
     struct smsg *smsgs;
     struct msgs *mp;
 
     struct smsg *smsgs;
     struct msgs *mp;
 
-#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;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
@@ -464,8 +457,14 @@ burst (struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst,
 
     i = inplace ? msgnum + numburst : mp->hghmsg;
     for (j = numburst; j >= (inplace ? 0 : 1); i--, j--) {
 
     i = inplace ? msgnum + numburst : mp->hghmsg;
     for (j = numburst; j >= (inplace ? 0 : 1); i--, j--) {
+        char *tempfile;
+
+       if ((tempfile = m_mktemp2(NULL, invo_name, NULL, &out)) == NULL) {
+           adios(NULL, "unable to create temporary file in %s",
+                 get_temp_dir());
+       }
+       strncpy (f2, tempfile, sizeof(f2));
        strncpy (f1, m_name (i), sizeof(f1));
        strncpy (f1, m_name (i), sizeof(f1));
-       strncpy (f2, m_mktemp2(NULL, invo_name, NULL, &out), sizeof(f2));
 
        if (verbosw && i != msgnum)
            printf ("message %d of digest %d becomes message %d\n", j, msgnum, i);
 
        if (verbosw && i != msgnum)
            printf ("message %d of digest %d becomes message %d\n", j, msgnum, i);