drop the horrible list2_t for good.
[apps/madmutt.git] / imap / imap.c
index da965d9..fe99c06 100644 (file)
 
 /* Support for IMAP4rev1, with the occasional nod to IMAP 4. */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <unistd.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include "mutt.h"
@@ -68,7 +57,7 @@ int imap_access (const char *path, int flags __attribute__ ((unused)))
   imap_fix_path (idata, mx.mbox, mailbox, sizeof (mailbox));
 
   /* we may already be in the folder we're checking */
-  if (!ascii_strcmp(idata->mailbox, mx.mbox)) {
+  if (!m_strcmp(idata->mailbox, mx.mbox)) {
     p_delete(&mx.mbox);
     return 0;
   }
@@ -1445,10 +1434,10 @@ static int imap_complete_hosts (char *dest, ssize_t len) {
   int i = 0;
 
   matchlen = m_strlen(dest);
-  if (list_empty (Incoming))
+  if (!Incoming.len)
     return (-1);
-  for (i = 0; i < Incoming->length; i++) {
-    mailbox = (BUFFY*) Incoming->data[i];
+  for (i = 0; i < Incoming.len; i++) {
+    mailbox = Incoming.arr[i];
     if (!m_strncmp(dest, mailbox->path, matchlen)) {
       if (rc) {
         m_strcpy(dest, len, mailbox->path);
@@ -1554,7 +1543,7 @@ int imap_complete (char *dest, size_t dlen, char *path) {
       completions++;
     }
   }
-  while (ascii_strncmp (idata->cmd.seq, idata->cmd.buf, SEQLEN));
+  while (m_strncmp(idata->cmd.seq, idata->cmd.buf, SEQLEN));
 
   if (completions) {
     /* reformat output */