/* We may be called on to expunge at any time. We can't rely on the caller
* to always know to rethread */
- mx_update_tables(idata->ctx, 0);
+ mx_update_tables(idata->ctx, false);
Sort = old_sort;
mutt_sort_headers(idata->ctx, 1);
}
* out a fake header structure generated by lazy maildir parsing.
*/
struct Header *maildir_parse_stream(int magic, FILE *f, const char *fname,
- int is_old, struct Header *_h)
+ bool is_old, struct Header *_h)
{
struct Header *h = _h;
struct stat st;
* This may also be used to fill out a fake header structure generated by lazy
* maildir parsing.
*/
-struct Header *maildir_parse_message(int magic, const char *fname, int is_old,
+struct Header *maildir_parse_message(int magic, const char *fname, bool is_old,
struct Header *h)
{
FILE *f = NULL;
ctx->hdrs[i]->index = j++;
}
- mx_update_tables(ctx, 0);
+ mx_update_tables(ctx, false);
mutt_clear_threads(ctx);
}
mx_alloc_memory(ctx);
}
if (access(path, F_OK) == 0)
- h = maildir_parse_message(MUTT_MAILDIR, path, 0, NULL);
+ h = maildir_parse_message(MUTT_MAILDIR, path, false, NULL);
else
{
/* maybe moved try find it... */
FILE *f = maildir_open_find_message(folder, path, &newpath);
if (f)
{
- h = maildir_parse_stream(MUTT_MAILDIR, f, newpath, 0, NULL);
+ h = maildir_parse_stream(MUTT_MAILDIR, f, newpath, false, NULL);
fclose(f);
mutt_debug(1, "nm: not up-to-date: %s -> %s\n", path, newpath);
/**
* mx_update_tables - Update a Context structure's internal tables
*/
-void mx_update_tables(struct Context *ctx, int committing)
+void mx_update_tables(struct Context *ctx, bool committing)
{
int i, j;
/* IMAP does this automatically after handling EXPUNGE */
if (ctx->magic != MUTT_IMAP)
{
- mx_update_tables(ctx, 1);
+ mx_update_tables(ctx, true);
mutt_sort_headers(ctx, 1); /* rethread from scratch */
}
}
/**
* mx_tags_is_supported - return true if mailbox support tagging
*/
-int mx_tags_is_supported(struct Context *ctx)
+bool mx_tags_is_supported(struct Context *ctx)
{
return ctx->mx_ops->commit_msg_tags && ctx->mx_ops->edit_msg_tags;
}
int maildir_check_empty(const char *path);
-struct Header *maildir_parse_message(int magic, const char *fname, int is_old, struct Header *h);
-struct Header *maildir_parse_stream(int magic, FILE *f, const char *fname, int is_old, struct Header *_h);
+struct Header *maildir_parse_message(int magic, const char *fname, bool is_old, struct Header *h);
+struct Header *maildir_parse_stream(int magic, FILE *f, const char *fname, bool is_old, struct Header *_h);
void maildir_parse_flags(struct Header *h, const char *path);
bool maildir_update_flags(struct Context *ctx, struct Header *o, struct Header *n);
void maildir_flags(char *dest, size_t destlen, struct Header *hdr);
int mx_tags_editor(struct Context *ctx, const char *tags, char *buf, size_t buflen);
int mx_tags_commit(struct Context *ctx, struct Header *h, char *tags);
-int mx_tags_is_supported(struct Context *ctx);
+bool mx_tags_is_supported(struct Context *ctx);
FILE *maildir_open_find_message(const char *folder, const char *msg, char **newname);
void mx_alloc_memory(struct Context *ctx);
void mx_update_context(struct Context *ctx, int new_messages);
-void mx_update_tables(struct Context *ctx, int committing);
+void mx_update_tables(struct Context *ctx, bool committing);
struct MxOps *mx_get_ops(int magic);
extern struct MxOps mx_maildir_ops;