X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=main.c;h=2d2a78976971421cc51dadf08f276e28e4b73781;hp=b3d7e66a37de76f50764b6b6003301108b9aab0a;hb=f3cbb9f51357972f6e74244494236a41dc4d84cd;hpb=5444b60629a8e4d01a78f5999615a084dd6cbd8a diff --git a/main.c b/main.c index b3d7e66..2d2a789 100644 --- a/main.c +++ b/main.c @@ -370,11 +370,7 @@ static void show_version (void) printf (" +PKGDATADIR=\"%s\"\n", PKGDATADIR); printf (" +PKGDOCDIR=\"%s\"\n", PKGDOCDIR); printf (" +SYSCONFDIR=\"%s\"\n", SYSCONFDIR); -#ifdef MIXMASTER printf (" +MIXMASTER=\"%s\"\n\n", MIXMASTER); -#else - puts (" -MIXMASTER\n"); -#endif puts (_("MadMutt is based on Madmutt wich was based on Mutt before\n")); @@ -672,6 +668,7 @@ int main (int argc, char **argv) char buf[LONG_STRING]; char *tempfile = NULL, *infile = NULL; char *bodytext = NULL; + FILE *fout; if (!option (OPTNOCURSES)) mutt_flushinp (); @@ -726,18 +723,16 @@ int main (int argc, char **argv) else fin = NULL; - mutt_mktemp (buf); - tempfile = m_strdup(buf); - if (draftFile) msg->env = mutt_read_rfc822_header (fin, NULL, 1, 0); /* is the following if still needed? */ - if (tempfile) { - FILE *fout; + fout = m_tempfile(buf, sizeof(buf), NONULL(Tempdir), NULL); + tempfile = m_strdup(buf); - if ((fout = safe_fopen (tempfile, "w")) == NULL) { + if (tempfile) { + if (!fout) { if (!option (OPTNOCURSES)) mutt_endwin (NULL); perror (tempfile);