Return the number of postponed messages.
64{
65 struct stat st = { 0 };
67
68 static time_t LastModify = 0;
69 static char *OldPostponed = NULL;
70
72 {
74 force = true;
75 }
76
79 {
82 LastModify = 0;
83 force = true;
84 }
85
86 if (!c_postponed)
87 return 0;
88
89
91 {
94 }
95
96
98 {
99 if (force)
100 {
101 short newpc;
102
104 if (newpc >= 0)
105 {
108 }
109 else
110 {
112 }
113 }
115 }
116
117 if (stat(c_postponed, &st) == -1)
118 {
120 LastModify = 0;
121 return 0;
122 }
123
124 if (S_ISDIR(st.st_mode))
125 {
126
128
131 {
133 LastModify = 0;
135 return 0;
136 }
138 }
139
140 if (LastModify < st.st_mtime)
141 {
143 LastModify = st.st_mtime;
144
145 if (access(c_postponed, R_OK | F_OK) != 0)
147 if (optnews)
151 {
154 }
155 else
156 {
158 }
160
161 if (optnews)
163 }
164
166}
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?
int imap_path_status(const char *path, bool queue)
Refresh the number of total and new messages.
@ LL_DEBUG3
Log at debug level 3.
#define FREE(x)
Free memory and set the pointer to NULL.
@ MODULE_ID_POSTPONE
ModulePostpone, Postponed Emails
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.
@ MUTT_QUIET
Do not print any messages.
@ MUTT_NOSORT
Do not sort the mailbox after opening it.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
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.
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.
Postpone private Module data.
short post_count
Number of postponed (draft) emails.
bool update_num_postponed
When true, force recount of drafts.