projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use m_strdup and m_strlen that are inlined for efficiency
[apps/madmutt.git]
/
recvattach.c
diff --git
a/recvattach.c
b/recvattach.c
index
e71d85b
..
dd7ef8e
100644
(file)
--- a/
recvattach.c
+++ b/
recvattach.c
@@
-13,6
+13,8
@@
#endif
#include <lib-lib/mem.h>
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
#include "mutt.h"
#include "ascii.h"
#include "mutt.h"
#include "ascii.h"
@@
-29,9
+31,6
@@
#include "copy.h"
#include "mutt_crypt.h"
#include "copy.h"
#include "mutt_crypt.h"
-#include "lib/mem.h"
-#include "lib/intl.h"
-#include "lib/str.h"
#include <ctype.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdlib.h>
@@
-107,7
+106,7
@@
void mutt_update_tree (ATTACHPTR ** idx, short idxlen)
str_replace (&idx[x]->tree, buf);
}
else
str_replace (&idx[x]->tree, buf);
}
else
- idx[x]->tree =
str_dup
(buf);
+ idx[x]->tree =
m_strdup
(buf);
if (2 * (idx[x]->level + 2) < sizeof (buf) && idx[x]->level) {
s = buf + 2 * (idx[x]->level - 1);
if (2 * (idx[x]->level + 2) < sizeof (buf) && idx[x]->level) {
s = buf + 2 * (idx[x]->level - 1);
@@
-128,7
+127,7
@@
ATTACHPTR **mutt_gen_attach_list (BODY * m,
for (; m; m = m->next) {
if (*idxlen == *idxmax) {
for (; m; m = m->next) {
if (*idxlen == *idxmax) {
-
mem_realloc (&idx, sizeof (ATTACHPTR *) * ((*idxmax) += 5)
);
+
p_realloc(&idx, (*idxmax) += 5
);
for (i = *idxlen; i < *idxmax; i++)
idx[i] = NULL;
}
for (i = *idxlen; i < *idxmax; i++)
idx[i] = NULL;
}