summaryrefslogtreecommitdiffstats
path: root/buffy.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-06-17 10:30:30 -0700
committerKevin McCarthy <kevin@8t8.us>2016-06-17 10:30:30 -0700
commit4bf01a885fcb080bc99db3399aa5ea0f75f42aca (patch)
tree4855cbfc350c14fa6634b7105277db68496a05de /buffy.h
parent8dd2e11ab2341039d5c26b8725b8444a1565d5e1 (diff)
Combine the basic and extended buffy functions.
Add a check_stats parameter to the mbox, maildir, and mh buffy functions. Use that parameter to determine whether to also count total, new, and flagged messages. This makes the functions a bit more complicated, but improves efficiency (for maildir and mh). Also includes the following cleanup/fixes: * Move the orig-value counter reset to the beginnining of the loop, (before tmp->new is set to 0). * Change trashed maildir messages to not be counted in msg_count * Remove an incorrect setting of mailbox->new based on msg_count in maildir. (I missed this one for 1f840760e6e0) * Change mbox to use the context->mtime for stats_last_checked, removing a race condition. * Fix mh to actually count the messages in order to generate msg_count. mh_sequences only covers the range of messages with some sort of flag.
Diffstat (limited to 'buffy.h')
-rw-r--r--buffy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/buffy.h b/buffy.h
index d3f5454a..61e4d434 100644
--- a/buffy.h
+++ b/buffy.h
@@ -48,7 +48,7 @@ typedef struct buffy_t
short magic; /* mailbox type */
short newly_created; /* mbox or mmdf just popped into existence */
time_t last_visited; /* time of last exit from this mailbox */
- time_t stats_last_checked; /* time of last mail_check_stats calculation */
+ time_t stats_last_checked; /* mtime of mailbox the last time stats where checked. */
}
BUFFY;
@@ -68,6 +68,6 @@ void mutt_buffy_cleanup (const char *buf, struct stat *st);
/* mark mailbox just left as already notified */
void mutt_buffy_setnotified (const char *path);
-void mh_buffy (BUFFY *);
+int mh_buffy (BUFFY *, int);
#endif /* _BUFFY_H */