From: David Levine Date: Tue, 21 Jan 2014 03:07:08 +0000 (-0600) Subject: Removed remaining occurrences of char *tmp from uip/mh* programs. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/294ef4a95bc276d138ca68d269adc66bf2314123?ds=sidebyside;hp=-c Removed remaining occurrences of char *tmp from uip/mh* programs. --- 294ef4a95bc276d138ca68d269adc66bf2314123 diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index df9bf5b7..ea47bf0b 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -42,12 +42,6 @@ extern int contentidsw; extern int rcachesw; /* mhcachesbr.c */ extern int wcachesw; /* mhcachesbr.c */ -/* - * Directory to place tmp files. This must - * be set before these routines are called. - */ -char *tmp; - pid_t xpid = 0; static char prefix[] = "----- =_aaaaaaaaaa"; diff --git a/uip/mhparse.c b/uip/mhparse.c index 5e35cbbf..e15296e5 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -28,12 +28,6 @@ extern int wcachesw; /* mhcachesbr.c */ int checksw = 0; /* check Content-MD5 field */ -/* - * Directory to place temp files. This must - * be set before these routines are called. - */ -char *tmp; - /* * These are for mhfixmsg to: * 1) Instruct parser not to detect invalid Content-Transfer-Encoding @@ -1652,7 +1646,7 @@ openBase64 (CT ct, char **file) } if (*file == NULL) { - ce->ce_file = add (m_mktemp(tmp, NULL, NULL), NULL); + ce->ce_file = add (m_mktemp2(NULL, invo_name, NULL, NULL), NULL); ce->ce_unlink = 1; } else { ce->ce_file = add (*file, NULL); @@ -1886,7 +1880,7 @@ openQuoted (CT ct, char **file) } if (*file == NULL) { - ce->ce_file = add (m_mktemp(tmp, NULL, NULL), NULL); + ce->ce_file = add (m_mktemp2(NULL, invo_name, NULL, NULL), NULL); ce->ce_unlink = 1; } else { ce->ce_file = add (*file, NULL); @@ -2110,7 +2104,7 @@ open7Bit (CT ct, char **file) } if (*file == NULL) { - ce->ce_file = add (m_mktemp(tmp, NULL, NULL), NULL); + ce->ce_file = add (m_mktemp2(NULL, invo_name, NULL, NULL), NULL); ce->ce_unlink = 1; } else { ce->ce_file = add (*file, NULL); @@ -2500,7 +2494,7 @@ openFTP (CT ct, char **file) else if (caching) ce->ce_file = add (cachefile, NULL); else - ce->ce_file = add (m_mktemp(tmp, NULL, NULL), NULL); + ce->ce_file = add (m_mktemp2(NULL, invo_name, NULL, NULL), NULL); if ((ce->ce_fp = fopen (ce->ce_file, "w+")) == NULL) { content_error (ce->ce_file, ct, "unable to fopen for reading/writing"); @@ -2688,7 +2682,7 @@ openMail (CT ct, char **file) } if (*file == NULL) { - ce->ce_file = add (m_mktemp(tmp, NULL, NULL), NULL); + ce->ce_file = add (m_mktemp2(NULL, invo_name, NULL, NULL), NULL); ce->ce_unlink = 1; } else { ce->ce_file = add (*file, NULL); @@ -2782,7 +2776,7 @@ openURL (CT ct, char **file) else if (caching) ce->ce_file = add(cachefile, NULL); else - ce->ce_file = add(m_mktemp(tmp, NULL, NULL), NULL); + ce->ce_file = add(m_mktemp2(NULL, invo_name, NULL, NULL), NULL); if ((ce->ce_fp = fopen(ce->ce_file, "w+")) == NULL) { content_error(ce->ce_file, ct, "unable to fopen for read/writing"); diff --git a/uip/mhtest.c b/uip/mhtest.c index 49d2a981..abdfdadf 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -42,9 +42,6 @@ DEFINE_SWITCH_ARRAY(MHTEST, switches); #undef X -/* mhparse.c */ -extern char *tmp; /* directory to place temp files */ - /* mhcachesbr.c */ extern int rcachesw; extern int wcachesw; @@ -228,16 +225,6 @@ do_cache: 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));