X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgpkey.c;h=009955d38007daaa43e96e071b3b37f764ae5338;hp=68ca6ffcb6a611da1662968b75560a0626a292ac;hb=9a1efcc01ddeca4106847f8eb28a704aca2dcf0b;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258 diff --git a/pgpkey.c b/pgpkey.c index 68ca6ff..009955d 100644 --- a/pgpkey.c +++ b/pgpkey.c @@ -12,7 +12,13 @@ # include "config.h" #endif +#include +#include + #include "mutt.h" +#include "enter.h" +#include "ascii.h" +#include "recvattach.h" #include "mutt_curses.h" #include "mutt_menu.h" #include "mime.h" @@ -20,8 +26,6 @@ #include "pager.h" #include "sort.h" -#include "lib/mem.h" -#include "lib/intl.h" #include "lib/str.h" #include "lib/debug.h" @@ -450,7 +454,7 @@ static pgp_key_t pgp_select_key (pgp_key_t keys, ADDRESS * p, const char *s) if (i == keymax) { keymax += 5; - mem_realloc (&KeyTable, sizeof (pgp_uid_t *) * keymax); + p_realloc(&KeyTable, keymax); } KeyTable[i++] = a; @@ -578,7 +582,7 @@ static pgp_key_t pgp_select_key (pgp_key_t keys, ADDRESS * p, const char *s) if (option (OPTPGPCHECKTRUST) && (!pgp_id_is_valid (KeyTable[menu->current]) || !pgp_id_is_strong (KeyTable[menu->current]))) { - char *s = ""; + const char *s = ""; char buff[LONG_STRING]; if (KeyTable[menu->current]->flags & KEYFLAG_CANTUSE) @@ -622,7 +626,7 @@ static pgp_key_t pgp_select_key (pgp_key_t keys, ADDRESS * p, const char *s) } mutt_menuDestroy (&menu); - mem_free (&KeyTable); + p_delete(&KeyTable); set_option (OPTNEEDREDRAW); @@ -658,7 +662,7 @@ pgp_key_t pgp_ask_for_key (char *tag, char *whatfor, if (l) str_replace (&l->dflt, resp); else { - l = mem_malloc (sizeof (struct pgp_cache)); + l = p_new(struct pgp_cache, 1); l->next = id_defaults; id_defaults = l; l->what = str_dup (whatfor); @@ -767,7 +771,7 @@ static LIST *pgp_add_string_to_hints (LIST * hints, const char *str) hints = mutt_add_list (hints, t); } - mem_free (&scratch); + p_delete(&scratch); return hints; }