rationalize list handling in mutt a bit.
[apps/madmutt.git] / imap / auth.c
index 7c6293d..74aee4c 100644 (file)
 # include "config.h"
 #endif
 
-#include "lib/mem.h"
-#include "lib/intl.h"
-#include "lib/debug.h"
+#include <lib-lib/mem.h>
+#include <lib-lib/debug.h>
+
+#include <lib-lib/macros.h>
+#include <lib-lib/ascii.h>
 
 #include "mutt.h"
-#include "ascii.h"
 #include "imap_private.h"
 #include "auth.h"
 
@@ -54,7 +55,7 @@ int imap_authenticate (IMAP_DATA * idata)
 
   if (ImapAuthenticators && *ImapAuthenticators) {
     /* Try user-specified list of authentication methods */
-    methods = str_dup (ImapAuthenticators);
+    methods = m_strdup(ImapAuthenticators);
 
     for (method = methods; method; method = delim) {
       delim = strchr (method, ':');
@@ -71,7 +72,7 @@ int imap_authenticate (IMAP_DATA * idata)
             !ascii_strcasecmp (authenticator->method, method))
           if ((r = authenticator->authenticate (idata, method)) !=
               IMAP_AUTH_UNAVAIL) {
-            mem_free (&methods);
+            p_delete(&methods);
             return r;
           }
 
@@ -79,7 +80,7 @@ int imap_authenticate (IMAP_DATA * idata)
       }
     }
 
-    mem_free (&methods);
+    p_delete(&methods);
   }
   else {
     /* Fall back to default: any authenticator */