#include "mutt.h"
-#ifdef USE_COMPRESSED
-
#include "mx.h"
#include "mbox.h"
#include "mutt_curses.h"
fmt->mx_open_mailbox = mutt_open_read_compressed;
return (fmt);
}
-
-#endif /* USE_COMPRESSED */
if (Context) {
int check;
-#ifdef USE_COMPRESSED
if (Context->compressinfo && Context->realpath)
m_strreplace(&LastFolder, Context->realpath);
else
-#endif
-
m_strreplace(&LastFolder, Context->path);
oldcount = Context ? Context->msgcount : 0;
./autogen.sh
-./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-sharedir=/usr/share/mutt-ng --with-docdir=/usr/share/doc/mutt-ng --with-mailpath=/var/mail --enable-fcntl --enable-pop --enable-imap --with-mixmaster --with-sasl2 --with-idn --with-curses --enable-nntp --enable-debug --enable-compressed --with-gnutls --enable-gpgme
+./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-sharedir=/usr/share/mutt-ng --with-docdir=/usr/share/doc/mutt-ng --with-mailpath=/var/mail --enable-fcntl --enable-pop --enable-imap --with-mixmaster --with-sasl2 --with-idn --with-curses --enable-nntp --enable-debug --with-gnutls --enable-gpgme
#include "mutt.h"
#include "mx.h"
#include "mutt_crypt.h"
-
-#ifdef USE_COMPRESSED
#include "compress.h"
-#endif
#include "lib/rx.h"
p_clear(&pattern, 1);
pattern.data = m_strdup(path);
}
-#ifdef USE_COMPRESSED
else if (data & (M_APPENDHOOK | M_OPENHOOK | M_CLOSEHOOK)) {
if (mutt_test_compress_command (command.data)) {
m_strcpy(err->data, err->dsize, _("bad formatted command string"));
return (-1);
}
}
-#endif
else if (DefaultHook && !(data & (M_CHARSETHOOK | M_ACCOUNTHOOK))
&& !(data & M_CRYPTHOOK))
{
#ifdef USE_LIBESMTP
"libesmtp",
#endif
-#ifdef USE_COMPRESSED
- "compessed",
-#endif
#ifdef HAVE_COLOR
"color",
#endif
{"fcc-hook", mutt_parse_hook, M_FCCHOOK},
{"fcc-save-hook", mutt_parse_hook, M_FCCHOOK|M_SAVEHOOK},
{"folder-hook", mutt_parse_hook, M_FOLDERHOOK},
-#ifdef USE_COMPRESSED
{"open-hook", mutt_parse_hook, M_OPENHOOK},
{"close-hook", mutt_parse_hook, M_CLOSEHOOK},
{"append-hook", mutt_parse_hook, M_APPENDHOOK},
-#endif
{"hdr_order", parse_list, UL &HeaderOrderList},
{"ifdef", parse_ifdef, 1},
{"ifndef", parse_ifdef, 0},
"+USE_GNU_REGEX "
#else
"-USE_GNU_REGEX "
-#endif
-#ifdef USE_COMPRESSED
- "+COMPRESSED "
-#else
- "-COMPRESSED "
#endif
"\n "
#ifdef HAVE_COLOR
#include "sort.h"
#include "thread.h"
#include "copy.h"
-
-#ifdef USE_COMPRESSED
#include "compress.h"
-#endif
#include "lib/debug.h"
{
mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
-#ifdef USE_COMPRESSED
if (ctx->compressinfo)
mutt_slow_close_compressed (ctx);
-#endif
mutt_unblock_signals ();
mx_fastclose_mailbox (ctx);
return (-1); /* fopen failed */
}
-#ifdef USE_COMPRESSED
if (magic == -1 && mutt_can_read_compressed (path))
return (M_COMPRESSED);
-#endif
return (magic);
}
#define M_REPLYHOOK (1<<10)
#define M_SEND2HOOK (1<<11)
-#ifdef USE_COMPRESSED
#define M_OPENHOOK (1<<12)
#define M_APPENDHOOK (1<<13)
#define M_CLOSEHOOK (1<<14)
-#endif
/* tree characters for linearize_tree and print_enriched_string */
#define M_TREE_LLCORNER 1
short magic; /* mailbox type */
-#ifdef USE_COMPRESSED
void *compressinfo; /* compressed mbox module private data */
char *realpath; /* path to compressed mailbox */
-#endif /* USE_COMPRESSED */
unsigned int locked:1; /* is the mailbox locked? */
unsigned int changed:1; /* mailbox has been modified */
#include "keymap.h"
#include "url.h"
#include "sidebar.h"
-
-#ifdef USE_COMPRESSED
#include "compress.h"
-#endif
#ifdef USE_IMAP
#include "imap/imap.h"
{
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;
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);
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)
/* 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;
}
!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);
/* 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)
#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)
* in mx_init() the registration order must be exactly as given here!!!1!
*/
enum {
- M_MBOX = 1,
- M_MMDF,
- M_MH,
- M_MAILDIR
+ M_MBOX = 1,
+ M_MMDF,
+ M_MH,
+ M_MAILDIR,
#ifdef USE_IMAP
- , M_IMAP
+ M_IMAP,
#endif
#ifdef USE_POP
- , M_POP
+ M_POP,
#endif
#ifdef USE_NNTP
- , M_NNTP
-#endif
-#ifdef USE_COMPRESSED
- , M_COMPRESSED
+ M_NNTP,
#endif
+ M_COMPRESSED
};
enum {
case 'B':
snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
-#ifdef USE_COMPRESSED
if (Context && Context->compressinfo && Context->realpath) {
if ((p = strrchr (Context->realpath, '/')))
m_strcpy(tmp, sizeof(tmp), p + 1);
m_strcpy(tmp, sizeof(tmp), Context->realpath);
}
else
-#endif
if (Context && Context->path) {
if ((p = strrchr (Context->path, '/')))
m_strcpy(tmp, sizeof(tmp), p + 1);
case 'f':
snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
-#ifdef USE_COMPRESSED
if (Context && Context->compressinfo && Context->realpath) {
m_strcpy(tmp, sizeof(tmp), Context->realpath);
mutt_pretty_mailbox (tmp);
}
else
-#endif
if (Context && Context->path) {
m_strcpy(tmp, sizeof(tmp), Context->path);
mutt_pretty_mailbox (tmp);