projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move buffer.[hc] into lib-lib/
[apps/madmutt.git]
/
attach.c
diff --git
a/attach.c
b/attach.c
index
6cbaa6b
..
5480710
100644
(file)
--- a/
attach.c
+++ b/
attach.c
@@
-13,11
+13,11
@@
#endif
#include <lib-lib/mem.h>
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include "mutt.h"
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include "mutt.h"
-#include "ascii.h"
#include "handler.h"
#include "recvattach.h"
#include "mutt_menu.h"
#include "handler.h"
#include "recvattach.h"
#include "mutt_menu.h"
@@
-566,18
+566,18
@@
int mutt_view_attachment (FILE * fp, BODY * a, int flag, HEADER * hdr,
if (use_pager) {
pager_t info;
if (use_pager) {
pager_t info;
+ p_clear(&info, 1);
- memset (&info, 0, sizeof (info));
- info.fp = fp;
+ info.fp = fp;
info.bdy = a;
info.ctx = Context;
info.idx = idx;
info.idxlen = idxlen;
info.hdr = hdr;
info.bdy = a;
info.ctx = Context;
info.idx = idx;
info.idxlen = idxlen;
info.hdr = hdr;
- rc = mutt_do_pager
(descrip, pagerfile,
- M_PAGER_ATTACHMENT | (is_message ? M_PAGER_MESSAGE :
-
0),
&info);
+ rc = mutt_do_pager(descrip, pagerfile,
+ M_PAGER_ATTACHMENT | (is_message ? M_PAGER_MESSAGE : 0),
+ &info);
*pagerfile = '\0';
}
else
*pagerfile = '\0';
}
else
@@
-616,16
+616,13
@@
int mutt_pipe_attachment (FILE * fp, BODY * b, const char *path,
if (fp) {
/* recv case */
if (fp) {
/* recv case */
-
STATE s;
STATE s;
-
- memset (&s, 0, sizeof (STATE));
+ p_clear(&s, 1);
if (outfile && *outfile)
if (outfile && *outfile)
- thepid =
- mutt_create_filter_fd (path, &s.fpout, NULL, NULL, -1, out, -1);
+ thepid = mutt_create_filter_fd(path, &s.fpout, NULL, NULL, -1, out, -1);
else
else
- thepid = mutt_create_filter
(path, &s.fpout, NULL, NULL);
+ thepid = mutt_create_filter(path, &s.fpout, NULL, NULL);
if (thepid < 0) {
mutt_perror (_("Can't create filter"));
if (thepid < 0) {
mutt_perror (_("Can't create filter"));
@@
-754,8
+751,8
@@
int mutt_save_attachment (FILE * fp, BODY * m, char *path, int flags,
/* In recv mode, extract from folder and decode */
STATE s;
/* In recv mode, extract from folder and decode */
STATE s;
+ p_clear(&s, 1);
- memset (&s, 0, sizeof (s));
if ((s.fpout = mutt_save_attachment_open (path, flags)) == NULL) {
mutt_perror ("fopen");
return (-1);
if ((s.fpout = mutt_save_attachment_open (path, flags)) == NULL) {
mutt_perror ("fopen");
return (-1);
@@
-808,7
+805,7
@@
int mutt_decode_save_attachment (FILE * fp, BODY * m, char *path,
BODY *saved_parts = NULL;
HEADER *saved_hdr = NULL;
BODY *saved_parts = NULL;
HEADER *saved_hdr = NULL;
-
memset (&s, 0, sizeof (s)
);
+
p_clear(&s, 1
);
s.flags = displaying;
if (flags == M_SAVE_APPEND)
s.flags = displaying;
if (flags == M_SAVE_APPEND)