X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=flags.c;h=cbfb2311d08465f76541b86dfe3ecc0aaaa5667a;hp=37dca384fa3f8f7aea079e6fdc4a5eb49819347a;hb=05a3bbbe420e4afc76e0eea24ce32f859405dc4a;hpb=9a1efcc01ddeca4106847f8eb28a704aca2dcf0b diff --git a/flags.c b/flags.c index 37dca38..cbfb231 100644 --- a/flags.c +++ b/flags.c @@ -13,16 +13,15 @@ #include +#include +#include + #include "mutt.h" -#include "mutt_curses.h" -#include "mutt_menu.h" #include "sort.h" #include "mx.h" #include "sidebar.h" -#ifdef USE_IMAP -#include "imap_private.h" -#endif +#include void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx) @@ -46,7 +45,6 @@ void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx) h->deleted = 1; if (upd_ctx) ctx->deleted++; -#ifdef USE_IMAP /* deleted messages aren't treated as changed elsewhere so that the * purge-on-sync option works correctly. This isn't applicable here */ if (ctx && ctx->magic == M_IMAP) { @@ -54,7 +52,6 @@ void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx) if (upd_ctx) ctx->changed = 1; } -#endif } } else if (h->deleted) { @@ -65,14 +62,12 @@ void _mutt_set_flag (CONTEXT * ctx, HEADER * h, int flag, int bf, int upd_ctx) ctx->appended--; } h->appended = 0; /* when undeleting, also reset the appended flag */ -#ifdef USE_IMAP /* see my comment above */ if (ctx->magic == M_IMAP) { h->changed = 1; if (upd_ctx) ctx->changed = 1; } -#endif /* * If the user undeletes a message which is marked as * "trash" in the maildir folder on disk, the folder has @@ -307,7 +302,7 @@ int mutt_thread_set_flag (HEADER * hdr, int flag, int bf, int subthread) if ((cur = cur->child) == NULL) return (0); - FOREVER { + for (;;) { if (cur->message) mutt_set_flag (Context, cur->message, flag, bf);