}
return (-1);
}
- fseek (ctx->fp, 0, 2);
+ fseeko (ctx->fp, 0, 2);
break;
case M_MH:
}
/* save changes and close mailbox */
-int mx_close_mailbox (CONTEXT * ctx, int *index_hint)
+static int _mx_close_mailbox (CONTEXT * ctx, int *index_hint)
{
int i, move_messages = 0, purge = 1, read_msgs = 0;
int check;
return 0;
}
+int mx_close_mailbox (CONTEXT * ctx, int *index_hint) {
+ int ret = 0;
+ if (!ctx)
+ return (0);
+ ret = _mx_close_mailbox (ctx, index_hint);
+ sidebar_set_buffystats (ctx);
+ return (ret);
+}
/* update a Context structure's internal tables. */
* 0 success
* -1 error
*/
-int mx_sync_mailbox (CONTEXT * ctx, int *index_hint)
+static int _mx_sync_mailbox (CONTEXT * ctx, int *index_hint)
{
int rc, i;
int purge = 1;
return 0;
}
- /* update sidebar counts */
- sidebar_set_buffystats (ctx);
-
/* if we haven't deleted any messages, we don't need to resort */
/* ... except for certain folder formats which need "unsorted"
* sort order in order to synchronize folders.
return (rc);
}
+int mx_sync_mailbox (CONTEXT* ctx, int* index_hint) {
+ int ret = _mx_sync_mailbox (ctx, index_hint);
+ sidebar_set_buffystats (ctx);
+ return (ret);
+}
+
/* args:
* dest destintation mailbox
* hdr message being copied (required for maildir support, because
mutt_error (_("Support for header caching was not build in."));
return (1);
#else
- int i = 0, magic = 0, imap = 0;
+ int i = 0, magic = 0;
CONTEXT* ctx = NULL;
- char* buf = NULL;
BUFFY* b = NULL;
if (list_empty(Incoming)) {
return (1);
}
- ReadInc = 0;
-
for (i = 0; i < Incoming->length; i++) {
b = (BUFFY*) Incoming->data[i];
magic = mx_get_magic (b->path);
- if (magic != M_MAILDIR && magic != M_MH && magic != M_IMAP)
+ if (magic != M_MAILDIR && magic != M_MH
+#ifdef USE_IMAP
+ && magic != M_IMAP
+#endif
+ )
continue;
- if (magic == M_IMAP)
- imap = 1;
- buf = str_dup (b->path);
- mutt_pretty_mailbox (buf);
- mutt_message (_("Rebuilding cache for %s..."), buf);
if ((ctx = mx_open_mailbox (b->path,
- M_READONLY | M_QUIET | M_NOSORT | M_COUNT,
+ M_READONLY | M_NOSORT | M_COUNT,
NULL)) != NULL)
mx_close_mailbox (ctx, 0);
- mem_free (&buf);
}
-
- if (imap)
- imap_logout_all ();
-
mutt_clear_error ();
return (0);