projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
recvattach.c
diff --git
a/recvattach.c
b/recvattach.c
index
69614ed
..
50bc81d
100644
(file)
--- a/
recvattach.c
+++ b/
recvattach.c
@@
-13,6
+13,10
@@
#endif
#include "mutt.h"
#endif
#include "mutt.h"
+#include "ascii.h"
+#include "enter.h"
+#include "handler.h"
+#include "recvattach.h"
#include "mutt_curses.h"
#include "mutt_menu.h"
#include "rfc1524.h"
#include "mutt_curses.h"
#include "mutt_menu.h"
#include "rfc1524.h"
@@
-54,9
+58,9
@@
static struct mapping_t AttachHelp[] = {
{NULL}
};
{NULL}
};
-int mutt_extract_path (char *filename, char *path)
+
static
int mutt_extract_path (char *filename, char *path)
{
{
- char *tmp =
safe
_malloc (sizeof (char) * _POSIX_PATH_MAX);
+ char *tmp =
mem
_malloc (sizeof (char) * _POSIX_PATH_MAX);
char *help_ptr;
help_ptr = tmp;
char *help_ptr;
help_ptr = tmp;
@@
-70,7
+74,7
@@
int mutt_extract_path (char *filename, char *path)
}
*help_ptr++ = *filename++;
}
}
*help_ptr++ = *filename++;
}
-
FREE
(&tmp);
+
mem_free
(&tmp);
return 0;
}
return 0;
}
@@
-120,7
+124,7
@@
ATTACHPTR **mutt_gen_attach_list (BODY * m,
for (; m; m = m->next) {
if (*idxlen == *idxmax) {
for (; m; m = m->next) {
if (*idxlen == *idxmax) {
-
safe
_realloc (&idx, sizeof (ATTACHPTR *) * ((*idxmax) += 5));
+
mem
_realloc (&idx, sizeof (ATTACHPTR *) * ((*idxmax) += 5));
for (i = *idxlen; i < *idxmax; i++)
idx[i] = NULL;
}
for (i = *idxlen; i < *idxmax; i++)
idx[i] = NULL;
}
@@
-138,7
+142,7
@@
ATTACHPTR **mutt_gen_attach_list (BODY * m,
}
else {
if (!idx[*idxlen])
}
else {
if (!idx[*idxlen])
- idx[*idxlen] = (ATTACHPTR *)
safe
_calloc (1, sizeof (ATTACHPTR));
+ idx[*idxlen] = (ATTACHPTR *)
mem
_calloc (1, sizeof (ATTACHPTR));
new = idx[(*idxlen)++];
new->content = m;
new = idx[(*idxlen)++];
new->content = m;
@@
-345,7
+349,7
@@
const char *mutt_attach_fmt (char *dest,
return (src);
}
return (src);
}
-void attach_entry (char *b, size_t blen, MUTTMENU * menu, int num)
+
static
void attach_entry (char *b, size_t blen, MUTTMENU * menu, int num)
{
mutt_FormatString (b, blen, NONULL (AttachFormat), mutt_attach_fmt,
(unsigned long) (((ATTACHPTR **) menu->data)[num]),
{
mutt_FormatString (b, blen, NONULL (AttachFormat), mutt_attach_fmt,
(unsigned long) (((ATTACHPTR **) menu->data)[num]),
@@
-527,7
+531,7
@@
void mutt_save_attachment_list (FILE * fp, int tag, BODY * top, HEADER * hdr,
break;
}
break;
}
-
FREE
(&directory);
+
mem_free
(&directory);
if (tag && menu) {
menu->oldcurrent = menu->current;
if (tag && menu) {
menu->oldcurrent = menu->current;
@@
-738,7
+742,7
@@
void mutt_print_attachment_list (FILE * fp, int tag, BODY * top)
print_attachment_list (fp, tag, top, &state);
}
print_attachment_list (fp, tag, top, &state);
}
-void
+
static
void
mutt_update_attach_index (BODY * cur, ATTACHPTR *** idxp,
short *idxlen, short *idxmax, MUTTMENU * menu)
{
mutt_update_attach_index (BODY * cur, ATTACHPTR *** idxp,
short *idxlen, short *idxmax, MUTTMENU * menu)
{
@@
-1218,12
+1222,12
@@
void mutt_view_attachments (HEADER * hdr)
hdr->attach_del = 1;
if (idx[idxmax]->content)
idx[idxmax]->content->aptr = NULL;
hdr->attach_del = 1;
if (idx[idxmax]->content)
idx[idxmax]->content->aptr = NULL;
-
FREE
(&idx[idxmax]->tree);
-
FREE
(&idx[idxmax]);
+
mem_free
(&idx[idxmax]->tree);
+
mem_free
(&idx[idxmax]);
}
if (hdr->attach_del)
hdr->changed = 1;
}
if (hdr->attach_del)
hdr->changed = 1;
-
FREE
(&idx);
+
mem_free
(&idx);
idxmax = 0;
if (WithCrypto && need_secured && secured) {
idxmax = 0;
if (WithCrypto && need_secured && secured) {