projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move intl.h into lib-lib/macros.h
[apps/madmutt.git]
/
mx.c
diff --git
a/mx.c
b/mx.c
index
e173aad
..
bbaf57d
100644
(file)
--- a/
mx.c
+++ b/
mx.c
@@
-13,6
+13,7
@@
#endif
#include <lib-lib/mem.h>
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/macros.h>
#include "mutt.h"
#include "buffy.h"
#include "mutt.h"
#include "buffy.h"
@@
-53,8
+54,6
@@
#include "mutt_crypt.h"
#include "mutt_crypt.h"
-#include "lib/mem.h"
-#include "lib/intl.h"
#include "lib/str.h"
#include "lib/list.h"
#include "lib/debug.h"
#include "lib/str.h"
#include "lib/list.h"
#include "lib/debug.h"
@@
-1130,7
+1129,7
@@
MESSAGE *mx_open_new_message (CONTEXT * dest, HEADER * hdr, int flags)
return (NULL);
}
return (NULL);
}
- msg =
mem_calloc (1, sizeof (MESSAGE)
);
+ msg =
p_new(MESSAGE, 1
);
msg->magic = dest->magic;
msg->write = 1;
msg->magic = dest->magic;
msg->write = 1;
@@
-1192,7
+1191,7
@@
MESSAGE *mx_open_message (CONTEXT * ctx, int msgno)
{
MESSAGE *msg;
{
MESSAGE *msg;
- msg =
mem_calloc (1, sizeof (MESSAGE)
);
+ msg =
p_new(MESSAGE, 1
);
switch (msg->magic = ctx->magic) {
case M_MBOX:
case M_MMDF:
switch (msg->magic = ctx->magic) {
case M_MBOX:
case M_MMDF:
@@
-1310,12
+1309,12
@@
void mx_alloc_memory (CONTEXT * ctx)
}
if (ctx->hdrs) {
}
if (ctx->hdrs) {
-
mem_realloc (&ctx->hdrs, sizeof (HEADER *) * (ctx->hdrmax += 25)
);
-
mem_realloc (&ctx->v2r, sizeof (int) *
ctx->hdrmax);
+
p_realloc(&ctx->hdrs, ctx->hdrmax += 25
);
+
p_realloc(&ctx->v2r,
ctx->hdrmax);
}
else {
}
else {
- ctx->hdrs =
mem_calloc ((ctx->hdrmax += 25), sizeof (HEADER *
));
- ctx->v2r =
mem_calloc (ctx->hdrmax, sizeof (int)
);
+ ctx->hdrs =
p_new(HEADER *, (ctx->hdrmax += 25
));
+ ctx->v2r =
p_new(int, ctx->hdrmax
);
}
for (i = ctx->msgcount; i < ctx->hdrmax; i++) {
ctx->hdrs[i] = NULL;
}
for (i = ctx->msgcount; i < ctx->hdrmax; i++) {
ctx->hdrs[i] = NULL;