Return the number of postponed messages.
71{
72 struct stat st = { 0 };
73
74 static time_t LastModify = 0;
75 static char *OldPostponed = NULL;
76
78 {
80 force = true;
81 }
82
85 {
88 LastModify = 0;
89 force = true;
90 }
91
92 if (!c_postponed)
93 return 0;
94
95
97 {
100 }
101
102
104 {
105 if (force)
106 {
107 short newpc;
108
110 if (newpc >= 0)
111 {
114 }
115 else
116 {
118 }
119 }
121 }
122
123 if (stat(c_postponed, &st) == -1)
124 {
126 LastModify = 0;
127 return 0;
128 }
129
130 if (S_ISDIR(st.st_mode))
131 {
132
134
137 {
139 LastModify = 0;
141 return 0;
142 }
144 }
145
146 if (LastModify < st.st_mtime)
147 {
149 LastModify = st.st_mtime;
150
151 if (access(c_postponed, R_OK | F_OK) != 0)
153 if (optnews)
157 {
160 }
161 else
162 {
164 }
166
167 if (optnews)
169 }
170
172}
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.