/* Mutt browser support routines */
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <ctype.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/debug.h>
+#include <lib-lib/lib-lib.h>
#include <lib-ui/enter.h>
-
#include "mutt.h"
#include "imap_private.h"
m_strcpy(mbox, sizeof(mbox), buf);
n = m_strlen(mbox);
- debug_print (3, ("mbox: %s\n", mbox));
-
/* if our target exists and has inferiors, enter it if we
* aren't already going to */
if (mbox[n - 1] != idata->delim) {
mbox[n] = '\0';
}
}
- }
- while (ascii_strncmp (idata->cmd.buf, idata->cmd.seq, SEQLEN));
+ } while (m_strncmp(idata->cmd.buf, idata->cmd.seq, SEQLEN));
}
/* if we're descending a folder, mark it as current in browser_state */
mbox[n] = '\0';
if (showparents) {
- debug_print (3, ("adding parent %s\n", mbox));
imap_add_folder (idata->delim, mbox, 1, 0, state, 1);
}
/* Listing the home namespace, so INBOX should be included. Home
* namespace is not "", so we have to list it explicitly. We ask the
* server to see if it has descendants. */
- debug_print (3, ("adding INBOX\n"));
if (browse_add_list_result (idata, "string_list_t \"\" \"INBOX\"", state, 0))
goto fail;
}
nsup = state->entrylen;
- debug_print (3, ("Quoting mailbox scan: %s:\n", mbox));
snprintf (buf, sizeof (buf), "%s%%", mbox);
imap_quote_string (buf2, sizeof (buf2), buf);
- debug_print (3, ("%s\n", buf2));
snprintf (buf, sizeof (buf), "%s \"\" %s", list_cmd, buf2);
if (browse_add_list_result (idata, buf, state, 0))
goto fail;
if (nsi[i].listable && !nsi[i].home_namespace) {
imap_add_folder (nsi[i].delim, nsi[i].prefix, nsi[i].noselect,
nsi[i].noinferiors, state, 0);
- debug_print (3, ("adding namespace: %s\n", nsi[i].prefix));
}
}
short n;
if (imap_parse_path (folder, &mx) < 0) {
- debug_print (1, ("Bad starting path %s\n", folder));
return -1;
}
if (!(idata = imap_conn_find (&mx.account, M_IMAP_CONN_NONEW))) {
- debug_print (1, ("Couldn't find open connection to %s\n", mx.account.host));
goto fail;
}
char newname[SHORT_STRING];
if (imap_parse_path (mailbox, &mx) < 0) {
- debug_print (1, ("Bad source mailbox %s\n", mailbox));
return -1;
}
if (!(idata = imap_conn_find (&mx.account, M_IMAP_CONN_NONEW))) {
- debug_print (1, ("Couldn't find open connection to %s\n", mx.account.host));
goto fail;
}
IMAP_MBOX mx;
if (imap_parse_path (state->folder, &mx)) {
- debug_print (2, ("current folder %s makes no sense\n", state->folder));
return -1;
}
imap_add_folder (idata->delim, name, noselect, noinferiors, state,
isparent);
}
- }
- while ((ascii_strncmp (idata->cmd.buf, idata->cmd.seq, SEQLEN) != 0));
+ } while ((m_strncmp(idata->cmd.buf, idata->cmd.seq, SEQLEN) != 0));
p_delete(&mx.mbox);
return 0;
}
/* skip "" namespaces, they are already listed at the root */
if ((ns[0] != '\0') && (nsbused < nsblen) && (*nns < nsilen)) {
- debug_print (3, ("adding %s\n", ns));
nsi->type = type;
/* Cyrus doesn't append the delimiter to the namespace,
* but UW-IMAP does. We'll strip it here and add it back
&nsi->noinferiors, &delim) != 0)
return -1;
nsi->listable |= (name != NULL);
- }
- while ((ascii_strncmp (idata->cmd.buf, idata->cmd.seq, SEQLEN) != 0));
+ } while ((m_strncmp(idata->cmd.buf, idata->cmd.seq, SEQLEN) != 0));
}
return 0;