#include <string.h>
#include <ctype.h>
+#include <lib-lib/mem.h>
+
#include "lib/mem.h"
#include "lib/intl.h"
#include "lib/str.h"
#include "lib/debug.h"
#include "mutt.h"
+#include "enter.h"
+#include "ascii.h"
#include "mutt_curses.h"
#include "mutt_idna.h"
#include "mutt_menu.h"
{N_("Undel"), OP_UNDELETE},
{N_("Select"), OP_GENERIC_SELECT_ENTRY},
{N_("Help"), OP_HELP},
- {NULL}
+ {NULL, OP_NULL}
};
ADDRESS *mutt_lookup_alias (const char *s)
}
if (!i) {
- u = mem_malloc (sizeof (LIST));
+ u = p_new(LIST, 1);
u->data = str_dup (a->mailbox);
u->next = *expn;
*expn = u;
}
}
-ADDRESS *mutt_get_address (ENVELOPE * env, char **pfxp)
+ADDRESS *mutt_get_address (ENVELOPE * env, const char **pfxp)
{
ADDRESS *adr;
- char *pfx = NULL;
+ const char *pfx = NULL;
if (mutt_addr_is_user (env->from)) {
if (env->to && !mutt_is_mail_list (env->to)) {
}
}
- new = mem_calloc (1, sizeof (ALIAS));
+ new = p_new(ALIAS, 1);
new->self = new;
new->name = str_dup (buf);
while (a) {
if (a->name && (strstr (a->name, s) == a->name)) {
if (!a_list) /* init */
- a_cur = a_list = (ALIAS *) mem_malloc (sizeof (ALIAS));
+ a_cur = a_list = p_new(ALIAS, 1);
else {
- a_cur->next = (ALIAS *) mem_malloc (sizeof (ALIAS));
+ a_cur->next = p_new(ALIAS, 1);
a_cur = a_cur->next;
}
memcpy (a_cur, a, sizeof (ALIAS));
while (a_list) {
a_cur = a_list;
a_list = a_list->next;
- mem_free (&a_cur);
+ p_delete(&a_cur);
}
/* remove any aliases marked for deletion */
}
mutt_menuDestroy (&menu);
- mem_free (&AliasTable);
+ p_delete(&AliasTable);
}