X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=headers.c;h=f158c1282cff67e5f1ff0bccc45cf59fb1735356;hp=193a122b5757704b84fe7b13c0b7b5b860605731;hb=6790552986464d9ad4be03f361a332441b0f08eb;hpb=ac813896ca32d850febc2d95065ac4fa040f11f9 diff --git a/headers.c b/headers.c index 193a122..f158c12 100644 --- a/headers.c +++ b/headers.c @@ -7,20 +7,11 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include - -#include -#include -#include -#include +#include +#include #include "mutt.h" +#include "alias.h" #include #include "mutt_idna.h" @@ -38,8 +29,8 @@ void mutt_edit_headers (const char *editor, struct stat st; string_list_t *cur, **last = NULL, *tmp; - mutt_mktemp (path); - if ((ofp = safe_fopen (path, "w")) == NULL) { + ofp = m_tempfile(path, sizeof(path), NONULL(Tempdir), NULL); + if (!ofp) { mutt_perror (path); return; } @@ -69,7 +60,6 @@ void mutt_edit_headers (const char *editor, mutt_edit_file (editor, path); stat (path, &st); if (mtime == st.st_mtime) { - debug_print (1, ("temp file was not modified.\n")); /* the file has not changed! */ mutt_unlink (path); return;