Return the number of postponed messages.
72{
73 struct stat st = { 0 };
74
75 static time_t LastModify = 0;
76 static char *OldPostponed = NULL;
77
79 {
81 force = true;
82 }
83
86 {
89 LastModify = 0;
90 force = true;
91 }
92
93 if (!c_postponed)
94 return 0;
95
96
98 {
101 }
102
103
105 {
106 if (force)
107 {
108 short newpc;
109
111 if (newpc >= 0)
112 {
115 }
116 else
117 {
119 }
120 }
122 }
123
124 if (stat(c_postponed, &st) == -1)
125 {
127 LastModify = 0;
128 return 0;
129 }
130
131 if (S_ISDIR(st.st_mode))
132 {
133
135
138 {
140 LastModify = 0;
142 return 0;
143 }
145 }
146
147 if (LastModify < st.st_mtime)
148 {
150 LastModify = st.st_mtime;
151
152 if (access(c_postponed, R_OK | F_OK) != 0)
154 if (optnews)
158 {
161 }
162 else
163 {
165 }
167
168 if (optnews)
170 }
171
173}
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
@ MUTT_IMAP
'IMAP' Mailbox type
bool OptNews
(pseudo) used to change reader mode
#define mutt_debug(LEVEL,...)
enum MailboxType imap_path_probe(const char *path, const struct stat *st)
Is this an IMAP Mailbox? - Implements MxOps::path_probe() -.
int imap_path_status(const char *path, bool queue)
Refresh the number of total and new messages.
@ LL_DEBUG3
Log at debug level 3.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void mx_fastclose_mailbox(struct Mailbox *m, bool keep_account)
Free up memory associated with the Mailbox.
bool mx_mbox_open(struct Mailbox *m, OpenMailboxFlags flags)
Open a mailbox and parse it.
struct Mailbox * mx_path_resolve(const char *path)
Get a Mailbox for a path.
#define MUTT_QUIET
Do not print any messages.
#define MUTT_NOSORT
Do not sort the mailbox after opening it.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
short PostCount
Number of postponed (draft) emails.
static bool UpdateNumPostponed
When true, force a recount of the postponed (draft) emails.
String manipulation buffer.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
int msg_count
Total number of messages.
int msg_deleted
Number of deleted messages.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.