X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mx.c;h=760b1dc38050e8e3caccfc4e1037eeec465f4aa3;hp=05f0552b6419a0b5bd4d33c58329509d322e1321;hb=3cb53df6efcb6b137bbab53c16da4eddbc5a1b2b;hpb=df7c0ef298343ef5523ad0be5af9fd629f901738 diff --git a/mx.c b/mx.c index 05f0552..760b1dc 100644 --- a/mx.c +++ b/mx.c @@ -31,10 +31,7 @@ #include "keymap.h" #include "url.h" #include "sidebar.h" - -#ifdef USE_COMPRESSED #include "compress.h" -#endif #ifdef USE_IMAP #include "imap/imap.h" @@ -385,12 +382,10 @@ static int mx_open_mailbox_append (CONTEXT * ctx, int flags) { struct stat sb; -#ifdef USE_COMPRESSED /* special case for appending to compressed folders - * even if we can not open them for reading */ if (mutt_can_append_compressed (ctx->path)) mutt_open_append_compressed (ctx); -#endif ctx->append = 1; @@ -540,10 +535,8 @@ CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT * pctx) if (!MX_IDX(ctx->magic-1)) ctx->magic = mx_get_magic (path); -#ifdef USE_COMPRESSED if (ctx->magic == M_COMPRESSED) mutt_open_read_compressed (ctx); -#endif if (ctx->magic == 0) mutt_error (_("%s is not a mailbox."), path); @@ -610,10 +603,10 @@ void mx_fastclose_mailbox (CONTEXT * ctx) mutt_free_header (&ctx->hdrs[i]); p_delete(&ctx->hdrs); p_delete(&ctx->v2r); -#ifdef USE_COMPRESSED + if (ctx->compressinfo) mutt_fast_close_compressed (ctx); -#endif + p_delete(&ctx->path); p_delete(&ctx->pattern); if (ctx->limit_pattern) @@ -634,10 +627,8 @@ static int sync_mailbox (CONTEXT * ctx, int *index_hint) /* the 1 is only of interest for IMAP and means EXPUNGE */ rc = MX_COMMAND(ctx->magic-1,mx_sync_mailbox(ctx,1,index_hint)); -#ifdef USE_COMPRESSED if (rc == 0 && ctx->compressinfo) return mutt_sync_compressed (ctx); -#endif return rc; } @@ -884,10 +875,8 @@ static int _mx_close_mailbox (CONTEXT * ctx, int *index_hint) !mutt_is_spool (ctx->path) && !option (OPTSAVEEMPTY)) mx_unlink_empty (ctx->path); -#ifdef USE_COMPRESSED if (ctx->compressinfo && mutt_slow_close_compressed (ctx)) return (-1); -#endif mx_fastclose_mailbox (ctx); @@ -1162,10 +1151,8 @@ MESSAGE *mx_open_new_message (CONTEXT * dest, HEADER * hdr, int flags) /* check for new mail */ int mx_check_mailbox (CONTEXT * ctx, int *index_hint, int lock) { -#ifdef USE_COMPRESSED if (ctx->compressinfo) return mutt_check_mailbox_compressed (ctx); -#endif if (ctx) { if (ctx->locked) @@ -1421,9 +1408,7 @@ void mx_init (void) { #ifdef USE_NNTP list_push_back (&MailboxFormats, (void*) nntp_reg_mx ()); #endif -#ifdef USE_COMPRESSED list_push_back (&MailboxFormats, (void*) compress_reg_mx ()); -#endif #ifdef DEBUG /* check module registration for completeness with debug versions */ #define EXITWITHERR(m) do { fprintf(stderr, "error: incomplete mx module: %s is missing for type %i\n",m,i);exit(1); } while (0)