mbox-list.c revision 3f1eb142cec7c5c990646bebd93f457e105b01d1
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen/* Copyright (C) 2002-2003 Timo Sirainen */
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen#include "subscription-file/subscription-file.h"
863f2bc9983c33221f5936421fc9c06caf21639aTimo Sirainen/* atime < mtime is a reliable way to know that something changed in the file.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen atime >= mtime is not however reliable, especially because atime gets
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen updated whenever we open the mbox file, and STATUS/EXAMINE shouldn't change
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen \Marked mailbox to \Unmarked.. */
cd18d7bb3e8d5921c3c852bd0a27fbeff9a9babbTimo Sirainen (st).st_atime < (st).st_mtime ? MAILBOX_MARKED : 0)
cd18d7bb3e8d5921c3c852bd0a27fbeff9a9babbTimo Sirainen struct mailbox_list *(*next)(struct mbox_list_context *ctx);
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenstatic struct mailbox_list *mbox_list_subs(struct mbox_list_context *ctx);
1358e2c58ce29231485a5cfa454756d429ad3d2cTimo Sirainenstatic struct mailbox_list *mbox_list_inbox(struct mbox_list_context *ctx);
c1847a38dfbc8bad29547d96432ef9d707dbd345Timo Sirainenstatic struct mailbox_list *mbox_list_path(struct mbox_list_context *ctx);
1e535244304ef4342379b6ef50dbf9f0106873eeTimo Sirainenstatic struct mailbox_list *mbox_list_next(struct mbox_list_context *ctx);
c1847a38dfbc8bad29547d96432ef9d707dbd345Timo Sirainenstatic struct mailbox_list *mbox_list_none(struct mbox_list_context *ctx);
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenstatic const char *mask_get_dir(struct mail_storage *storage, const char *mask)
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen const char *p, *last_dir;
return NULL;
last_dir = p;
if (!root) {
struct mailbox_list_context *
return NULL;
return NULL;
return NULL;
return ret;
if (match > 0)
else if (match2 > 0)
if (ret > 0) {
} else if (ret < 0)
} else if (match > 0 &&
*p = sep;
return NULL;
i_unreached();
t_push();
t_pop();
struct dirent *d;
int ret;
t_push();
t_pop();
if (ret > 0)
if (ret < 0) {
return NULL;
return NULL;
static struct mailbox_list *
return NULL;