#ifdef USE_IMAP
BuffyCount += imap_buffy_check (force);
-
- if (!Context || Context->magic != M_IMAP)
-#endif
-#ifdef USE_POP
- if (!Context || Context->magic != M_POP)
#endif
+
/* check device ID and serial number instead of comparing paths */
- if (!Context || !Context->path || stat (Context->path, &contex_sb) != 0)
+ if (!Context || Context->magic != M_IMAP || Context->magic != M_POP
+ || stat (Context->path, &contex_sb) != 0)
{
contex_sb.st_dev=0;
contex_sb.st_ino=0;
for (tmp = Incoming; tmp; tmp = tmp->next)
{
-#ifdef USE_IMAP
if (tmp->magic != M_IMAP)
-#endif
- tmp->new = 0;
+ tmp->new = 0;
-#ifdef USE_IMAP
if (tmp->magic != M_IMAP)
{
-#endif
#ifdef USE_POP
- if (mx_is_pop (tmp->path))
- tmp->magic = M_POP;
- else
+ if (mx_is_pop (tmp->path))
+ tmp->magic = M_POP;
+ else
#endif
- if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
- (!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0))
- {
- /* if the mailbox still doesn't exist, set the newly created flag to
- * be ready for when it does. */
- tmp->newly_created = 1;
- tmp->magic = 0;
- tmp->size = 0;
- continue;
- }
-#ifdef USE_IMAP
+ if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
+ (!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0))
+ {
+ /* if the mailbox still doesn't exist, set the newly created flag to
+ * be ready for when it does. */
+ tmp->newly_created = 1;
+ tmp->magic = 0;
+ tmp->size = 0;
+ continue;
+ }
}
-#endif
/* check to see if the folder is the currently selected folder
* before polling */
if (!Context || !Context->path ||
-#if defined USE_IMAP || defined USE_POP
- ((
-#ifdef USE_IMAP
- tmp->magic == M_IMAP
-#endif
-#ifdef USE_POP
-#ifdef USE_IMAP
- ||
-#endif
- tmp->magic == M_POP
-#endif
- ) ? mutt_strcmp (tmp->path, Context->path) :
-#endif
- (sb.st_dev != contex_sb.st_dev || sb.st_ino != contex_sb.st_ino)
-#if defined USE_IMAP || defined USE_POP
- )
-#endif
- )
-
+ (( tmp->magic == M_IMAP || tmp->magic == M_POP )
+ ? mutt_strcmp (tmp->path, Context->path) :
+ (sb.st_dev != contex_sb.st_dev || sb.st_ino != contex_sb.st_ino)))
{
switch (tmp->magic)
{
{
if (!ctx->changed)
return 0; /* nothing to do! */
-#ifdef USE_IMAP
/* let IMAP servers hold on to D flags */
if (ctx->magic != M_IMAP)
-#endif
{
for (i = 0 ; i < ctx->msgcount ; i++)
ctx->hdrs[i]->deleted = 0;
*/
if (purge || (ctx->magic != M_MAILDIR && ctx->magic != M_MH))
{
-#ifdef USE_IMAP
/* IMAP does this automatically after handling EXPUNGE */
if (ctx->magic != M_IMAP)
-#endif
{
mx_update_tables (ctx, 1);
mutt_sort_headers (ctx, 1); /* rethread from scratch */
int r = 0;
if ((*msg)->magic == M_MH || (*msg)->magic == M_MAILDIR
-#ifdef USE_IMAP
- || (*msg)->magic == M_IMAP
-#endif
-#ifdef USE_POP
- || (*msg)->magic == M_POP
-#endif
- )
+ || (*msg)->magic == M_IMAP || (*msg)->magic == M_POP)
{
r = safe_fclose (&(*msg)->fp);
}
if (Context)
{
i = option(OPTATTACHMSG) ? 3 : ((Context->readonly ||
- Context->dontwrite) ? 2 : (Context->changed || (
-#ifdef USE_IMAP
- /* deleted doesn't necessarily mean changed in IMAP */
- Context->magic != M_IMAP &&
-#endif
- Context->deleted)) ? 1 : 0);
+ Context->dontwrite) ? 2 : (Context->changed ||
+ /* deleted doesn't necessarily mean changed in IMAP */
+ (Context->magic != M_IMAP &&
+ Context->deleted)) ? 1 : 0);
}
if (!StChars)