X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=rfc822.c;h=d7946cd1762def170382441259410eee03b0e57c;hb=9a1efcc01ddeca4106847f8eb28a704aca2dcf0b;hp=32dcd7b1edbd6898f8c5c82e50d1458f556b3dce;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258;p=apps%2Fmadmutt.git diff --git a/rfc822.c b/rfc822.c index 32dcd7b..d7946cd 100644 --- a/rfc822.c +++ b/rfc822.c @@ -15,11 +15,13 @@ #include #include +#include +#include + #include "mutt.h" +#include "ascii.h" #include "mutt_idna.h" -#include "lib/mem.h" -#include "lib/intl.h" #include "lib/str.h" #define terminate_string(a, b, c) do { if ((b) < (c)) a[(b)] = 0; else \ @@ -70,9 +72,9 @@ void rfc822_free_address (ADDRESS ** p) while (*p) { t = *p; *p = (*p)->next; - mem_free (&t->personal); - mem_free (&t->mailbox); - mem_free (&t); + p_delete(&t->personal); + p_delete(&t->mailbox); + p_delete(&t); } } @@ -389,7 +391,7 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS * top, const char *s) cur = rfc822_new_address (); if (phraselen) { if (cur->personal) - mem_free (&cur->personal); + p_delete(&cur->personal); /* if we get something like "Michael R. Elkins" remove the quotes */ rfc822_dequote_comment (phrase); cur->personal = str_dup (phrase); @@ -446,9 +448,9 @@ void rfc822_qualify (ADDRESS * addr, const char *host) for (; addr; addr = addr->next) if (!addr->group && addr->mailbox && strchr (addr->mailbox, '@') == NULL) { - p = mem_malloc (str_len (addr->mailbox) + str_len (host) + 2); + p = p_new(char, str_len(addr->mailbox) + str_len(host) + 2); sprintf (p, "%s@%s", addr->mailbox, host); /* __SPRINTF_CHECKED__ */ - mem_free (&addr->mailbox); + p_delete(&addr->mailbox); addr->mailbox = p; } }