else if (mutt_bit_isset (idata->capabilities, STATUS))
snprintf (buf, sizeof (buf), "STATUS %s (UID-VALIDITY)", mbox);
else {
else if (mutt_bit_isset (idata->capabilities, STATUS))
snprintf (buf, sizeof (buf), "STATUS %s (UID-VALIDITY)", mbox);
else {
- dprint (1, (debugfile, "imap_access: Can't check STATUS of %s\n", mbox));
+ debug_print (1, ("Can't check STATUS of %s\n", mbox));
- dprint (2, (debugfile, "imap_read_literal: reading %ld bytes\n", bytes));
+ debug_print (2, ("reading %ld bytes\n", bytes));
for (pos = 0; pos < bytes; pos++) {
if (mutt_socket_readchar (idata->conn, &c) != 1) {
for (pos = 0; pos < bytes; pos++) {
if (mutt_socket_readchar (idata->conn, &c) != 1) {
- dprint (1,
- (debugfile,
- "imap_read_literal: error during read, %ld bytes read\n",
- pos));
+ debug_print (1, ("error during read, %ld bytes read\n", pos));
- dprint (2,
- (debugfile, "Expunging message UID %d.\n",
- HEADER_DATA (h)->uid));
+ debug_print (2, ("Expunging message UID %d.\n", HEADER_DATA (h)->uid));
- dprint (2, (debugfile, "Delimiter: %c\n", idata->delim));
+ debug_print (2, ("Delimiter: %c\n", idata->delim));
- dprint (2, (debugfile, "Communication encrypted at %d bits\n",
- idata->conn->ssf));
+ debug_print (2, ("Communication encrypted at %d bits\n", idata->conn->ssf));
/* sanity-check string */
if (ascii_strncasecmp ("FLAGS", s, 5) != 0) {
/* sanity-check string */
if (ascii_strncasecmp ("FLAGS", s, 5) != 0) {
- dprint (1, (debugfile, "imap_get_flags: not a FLAGS response: %s\n", s));
+ debug_print (1, ("not a FLAGS response: %s\n", s));
- dprint (1, (debugfile, "imap_get_flags: bogus FLAGS response: %s\n", s));
+ debug_print (1, ("bogus FLAGS response: %s\n", s));
if (ascii_strncasecmp ("FLAGS", pc, 5) == 0) {
/* don't override PERMANENTFLAGS */
if (!idata->flags) {
if (ascii_strncasecmp ("FLAGS", pc, 5) == 0) {
/* don't override PERMANENTFLAGS */
if (!idata->flags) {
if ((pc = imap_get_flags (&(idata->flags), pc)) == NULL)
goto fail;
}
}
/* PERMANENTFLAGS are massaged to look like FLAGS, then override FLAGS */
else if (ascii_strncasecmp ("OK [PERMANENTFLAGS", pc, 18) == 0) {
if ((pc = imap_get_flags (&(idata->flags), pc)) == NULL)
goto fail;
}
}
/* PERMANENTFLAGS are massaged to look like FLAGS, then override FLAGS */
else if (ascii_strncasecmp ("OK [PERMANENTFLAGS", pc, 18) == 0) {
/* safe to call on NULL */
mutt_free_list (&(idata->flags));
/* skip "OK [PERMANENT" so syntax is the same as FLAGS */
/* safe to call on NULL */
mutt_free_list (&(idata->flags));
/* skip "OK [PERMANENT" so syntax is the same as FLAGS */
#ifdef USE_HCACHE
/* save UIDVALIDITY for the header cache */
else if (ascii_strncasecmp ("OK [UIDVALIDITY", pc, 14) == 0) {
#ifdef USE_HCACHE
/* save UIDVALIDITY for the header cache */
else if (ascii_strncasecmp ("OK [UIDVALIDITY", pc, 14) == 0) {
if (!ascii_strncasecmp
(imap_get_qualifier (idata->cmd.buf), "[READ-ONLY]", 11)
&& !mutt_bit_isset (idata->capabilities, ACL)) {
if (!ascii_strncasecmp
(imap_get_qualifier (idata->cmd.buf), "[READ-ONLY]", 11)
&& !mutt_bit_isset (idata->capabilities, ACL)) {
if (mutt_bit_isset (idata->rights, ACL_WRITE))
imap_add_keywords (flags, hdr, idata->flags, sizeof (flags));
if (mutt_bit_isset (idata->rights, ACL_WRITE))
imap_add_keywords (flags, hdr, idata->flags, sizeof (flags));
/* UW-IMAP is OK with null flags, Cyrus isn't. The only solution is to
* explicitly revoke all system flags (if we have permission) */
/* UW-IMAP is OK with null flags, Cyrus isn't. The only solution is to
* explicitly revoke all system flags (if we have permission) */
imap_set_flag (idata, ACL_WRITE, 1, "\\Answered ", flags, sizeof (flags));
imap_set_flag (idata, ACL_DELETE, 1, "\\Deleted ", flags, sizeof (flags));
imap_set_flag (idata, ACL_WRITE, 1, "\\Answered ", flags, sizeof (flags));
imap_set_flag (idata, ACL_DELETE, 1, "\\Deleted ", flags, sizeof (flags));
/* if the message has been rethreaded or attachments have been deleted
* we delete the message and reupload it.
* This works better if we're expunging, of course. */
/* if the message has been rethreaded or attachments have been deleted
* we delete the message and reupload it.
* This works better if we're expunging, of course. */
}
else
_mutt_save_message (ctx->hdrs[n], appendctx, 1, 0, 0);
}
else
_mutt_save_message (ctx->hdrs[n], appendctx, 1, 0, 0);
idata->reopen |= IMAP_EXPUNGE_EXPECTED;
if (imap_exec (idata, "EXPUNGE", 0) != 0) {
imap_error (_("imap_sync_mailbox: EXPUNGE failed"), idata->cmd.buf);
idata->reopen |= IMAP_EXPUNGE_EXPECTED;
if (imap_exec (idata, "EXPUNGE", 0) != 0) {
imap_error (_("imap_sync_mailbox: EXPUNGE failed"), idata->cmd.buf);
|| (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0
&& safe_strcasecmp (mbox_unquoted, idata->mailbox) == 0)) {
strfcpy (buf, "NOOP", sizeof (buf));
|| (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0
&& safe_strcasecmp (mbox_unquoted, idata->mailbox) == 0)) {
strfcpy (buf, "NOOP", sizeof (buf));
/* The mailbox name may or may not be quoted here. We could try to
* munge the server response and compare with quoted (or vise versa)
* but it is probably more efficient to just strncmp against both. */
/* The mailbox name may or may not be quoted here. We could try to
* munge the server response and compare with quoted (or vise versa)
* but it is probably more efficient to just strncmp against both. */
- if (safe_strncmp (mbox_unquoted, s, safe_strlen (mbox_unquoted)) == 0
- || safe_strncmp (mbox, s, safe_strlen (mbox)) == 0) {
+ if (safe_strncmp (mbox_unquoted, s, mutt_strlen (mbox_unquoted)) == 0
+ || safe_strncmp (mbox, s, mutt_strlen (mbox)) == 0) {
- dprint (2,
- (debugfile, "%d new messages in %s\n", msgcount, path));
+ debug_print (2, ("%d new messages in %s\n", msgcount, path));
/* verify passed in path is an IMAP path */
if (imap_parse_path (path, &mx)) {
/* verify passed in path is an IMAP path */
if (imap_parse_path (path, &mx)) {
- dprint (2, (debugfile, "imap_complete: bad path %s\n", path));
+ debug_print (2, ("bad path %s\n", path));
/* if the folder isn't selectable, append delimiter to force browse
* to enter it on second tab. */
if (noselect) {
/* if the folder isn't selectable, append delimiter to force browse
* to enter it on second tab. */
if (noselect) {
list_word[clen++] = delim;
list_word[clen] = '\0';
}
/* copy in first word */
if (!completions) {
strfcpy (completion, list_word, sizeof (completion));
list_word[clen++] = delim;
list_word[clen] = '\0';
}
/* copy in first word */
if (!completions) {
strfcpy (completion, list_word, sizeof (completion));