X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mbox.c;h=1485ad7c8e3dd79ea2d47aa1e615271032f0b6a3;hp=030b55b507ff6435e7946031213d11793aeb276e;hb=9274cbe8e6410ddb95ddc667faa678a29da85420;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a diff --git a/mbox.c b/mbox.c index 030b55b..1485ad7 100644 --- a/mbox.c +++ b/mbox.c @@ -14,6 +14,8 @@ #endif #include +#include +#include #include "mutt.h" #include "mx.h" @@ -27,9 +29,6 @@ #include "compress.h" #endif -#include "lib/mem.h" -#include "lib/intl.h" -#include "lib/str.h" #include "lib/debug.h" #include @@ -646,8 +645,8 @@ static int _mbox_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint) offset -= (sizeof MMDF_SEP - 1); /* allocate space for the new offsets */ - newOffset = mem_calloc (ctx->msgcount - first, sizeof (struct m_update_t)); - oldOffset = mem_calloc (ctx->msgcount - first, sizeof (struct m_update_t)); + newOffset = p_new(struct m_update_t, ctx->msgcount - first); + oldOffset = p_new(struct m_update_t, ctx->msgcount - first); for (i = first, j = 0; i < ctx->msgcount; i++) { /* @@ -1140,7 +1139,7 @@ static int mmdf_commit_message (MESSAGE* msg, CONTEXT* ctx) { } static mx_t* reg_mx (void) { - mx_t* fmt = mem_calloc (1, sizeof (mx_t)); + mx_t* fmt = p_new(mx_t, 1); fmt->local = 1; fmt->mx_check_empty = mbox_check_empty; fmt->mx_is_magic = mbox_is_magic;