projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
damn, cflags were silent, fixing many bugs they now show.
[apps/madmutt.git]
/
editmsg.c
diff --git
a/editmsg.c
b/editmsg.c
index
347b6ae
..
c66f5ee
100644
(file)
--- a/
editmsg.c
+++ b/
editmsg.c
@@
-9,22
+9,12
@@
/* simple, editor-based message editing */
/* simple, editor-based message editing */
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <lib-lib/macros.h>
-#include <lib-lib/str.h>
+#include <lib-lib/lib-lib.h>
+#include <lib-ui/curses.h>
+#include <lib-mx/mx.h>
#include "mutt.h"
#include "copy.h"
#include "mutt.h"
#include "copy.h"
-#include "mx.h"
-
-
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <time.h>
/*
* return value:
/*
* return value:
@@
-54,7
+44,7
@@
static int edit_one_message (CONTEXT * ctx, HEADER * cur)
struct stat sb;
time_t mtime = 0;
struct stat sb;
time_t mtime = 0;
- size_t size = 0;
+ s
s
ize_t size = 0;
mutt_mktemp (tmp);
mutt_mktemp (tmp);
@@
-102,7
+92,7
@@
static int edit_one_message (CONTEXT * ctx, HEADER * cur)
goto bail;
}
goto bail;
}
- mutt_edit_file
(NONULL (Editor),
tmp);
+ mutt_edit_file
(
tmp);
if ((rc = stat (tmp, &sb)) == -1) {
mutt_error (_("Can't stat %s: %s"), tmp, strerror (errno));
if ((rc = stat (tmp, &sb)) == -1) {
mutt_error (_("Can't stat %s: %s"), tmp, strerror (errno));
@@
-175,8
+165,7
@@
static int edit_one_message (CONTEXT * ctx, HEADER * cur)
mx_close_mailbox (&tmpctx, NULL);
bail:
mx_close_mailbox (&tmpctx, NULL);
bail:
- if (fp)
- fclose (fp);
+ m_fclose(&fp);
if (rc >= 0)
unlink (tmp);
if (rc >= 0)
unlink (tmp);