X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/64e8827c5d5def0325ab7181fe939623c77e807c..475fef2edee9db3c63fc089df76f8e93e3d598cd:/uip/burst.c?ds=inline diff --git a/uip/burst.c b/uip/burst.c index e838422b..71b226c1 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -42,7 +42,6 @@ struct smsg { */ int debugsw = 0; -pid_t xpid = 0; /* * static prototypes @@ -75,11 +74,7 @@ main (int argc, char **argv) struct smsg *smsgs; struct msgs *mp; - setlocale(LC_ALL, ""); - 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; @@ -462,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--) { + 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 (f2, m_mktemp(invo_name, NULL, &out), sizeof(f2)); if (verbosw && i != msgnum) printf ("message %d of digest %d becomes message %d\n", j, msgnum, i);