X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=pop%2Fpop.c;h=058fe1de61ef2bf6f366aa093d780cff95bce220;hb=d4483b5add8d25008c305b51729f4a53bccfaab8;hp=b8e9e064f4d500bf780bdd693ca5fa9d78858999;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a;p=apps%2Fmadmutt.git diff --git a/pop/pop.c b/pop/pop.c index b8e9e06..058fe1d 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -12,6 +12,8 @@ #endif #include +#include +#include #include "mutt.h" #include "mx.h" @@ -19,9 +21,6 @@ #include "mutt_crypt.h" #include "mutt_curses.h" -#include "lib/mem.h" -#include "lib/str.h" -#include "lib/intl.h" #include "lib/debug.h" #include @@ -143,7 +142,7 @@ static int fetch_uidl (char *line, void *data) ctx->msgcount++; ctx->hdrs[i] = mutt_new_header (); - ctx->hdrs[i]->data = str_dup (line); + ctx->hdrs[i]->data = m_strdup(line); } else if (ctx->hdrs[i]->index != index - 1) pop_data->clear_cache = 1; @@ -249,9 +248,9 @@ int pop_open_mailbox (CONTEXT * ctx) return -1; p_delete(&ctx->path); - ctx->path = str_dup (buf); + ctx->path = m_strdup(buf); - pop_data = mem_calloc (1, sizeof (POP_DATA)); + pop_data = p_new(POP_DATA, 1); pop_data->conn = conn; ctx->data = pop_data; @@ -406,7 +405,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) * portion of the headers, those required for the main display. */ cache->index = h->index; - cache->path = str_dup (path); + cache->path = m_strdup(path); rewind (msg->fp); uidl = h->data; mutt_free_envelope (&h->env); @@ -526,7 +525,7 @@ void pop_fetch_mail (void) return; } - url = p = mem_calloc (strlen (PopHost) + 7, sizeof (char)); + url = p = p_new(char, strlen (PopHost) + 7); if (url_check_scheme (PopHost) == U_UNKNOWN) { strcpy (url, "pop://"); /* __STRCPY_CHECKED__ */ p = strchr (url, '\0'); @@ -544,7 +543,7 @@ void pop_fetch_mail (void) if (!conn) return; - pop_data = mem_calloc (1, sizeof (POP_DATA)); + pop_data = p_new(POP_DATA, 1); pop_data->conn = conn; if (pop_open_connection (pop_data) < 0) {