From: Pierre Habouzit Date: Wed, 15 Aug 2007 09:00:57 +0000 (+0200) Subject: Even less options. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=15aeb79a9b30f4037ec0898452090e90da28f7f1 Even less options. Signed-off-by: Pierre Habouzit --- diff --git a/compose.c b/compose.c index 7c7517a..42fef17 100644 --- a/compose.c +++ b/compose.c @@ -442,8 +442,6 @@ int mutt_compose_menu (HEADER * msg, /* structure for new message */ menu->tag = mutt_tag_attach; menu->data = idx; - if (option (OPTMBOXPANE)) - buffy_check (0); while (loop) { #ifdef USE_NNTP unset_option (OPTNEWS); /* for any case */ diff --git a/globals.h b/globals.h index 36bab26..5c574b9 100644 --- a/globals.h +++ b/globals.h @@ -46,11 +46,6 @@ WHERE char *Inbox; WHERE char *Locale; WHERE char *Maildir; -#ifdef USE_HCACHE -#if defined(HAVE_GDBM) -WHERE char *HeaderCachePageSize; -#endif /* HAVE_GDBM */ -#endif /* USE_HCACHE */ WHERE char *MhFlagged; WHERE char *MhReplied; WHERE char *MhUnseen; diff --git a/init.h b/init.h index fdad666..1bbea8f 100644 --- a/init.h +++ b/init.h @@ -845,33 +845,6 @@ struct option_t MuttVars[] = { ** to this length. A value of 0 (which is also the default) means that the ** maximum line length is determined by the terminal width and $$wrapmargin. */ -#ifdef USE_HCACHE -#if defined(HAVE_GDBM) - {"header_cache_pagesize", DT_STR, R_NONE, UL &HeaderCachePageSize, "16384"}, - /* - ** .pp - ** Availability: Header Cache - ** - ** .pp - ** Change the maildir header cache database page size. - ** .pp - ** Too large - ** or too small of a page size for the common header can waste - ** space, memory effectiveness, or CPU time. The default should be more or - ** less the best you can get. For details google for mutt header - ** cache (first hit). - */ -#endif /* HAVE_GDBM */ -#ifdef HAVE_QDBM - { "header_cache_compress", DT_BOOL, R_NONE, OPTHCACHECOMPRESS, "no" }, - /* - ** .pp - ** If enabled the header cache will be compressed. So only one fifth of the usual - ** diskspace is used, but the uncompression can result in a slower open of the - ** cached folder. - */ -#endif /* HAVE_QDBM */ -#endif /* USE_HCACHE */ {"maildir_trash", DT_BOOL, R_NONE, OPTMAILDIRTRASH, "no" }, /* ** .pp diff --git a/lib-mx/hcache.c b/lib-mx/hcache.c index c3ab701..1b781d2 100644 --- a/lib-mx/hcache.c +++ b/lib-mx/hcache.c @@ -391,15 +391,9 @@ hcache_t *mutt_hcache_open(const char *folder) { #if defined(HAVE_QDBM) - int flags = VL_OWRITER | VL_OCREAT; - if (option(OPTHCACHECOMPRESS)) - flags |= VL_OZCOMP; - - h->db = vlopen(path, flags, VL_CMPLEX); + h->db = vlopen(path, VL_OWRITER | VL_OCREAT, VL_CMPLEX); #elif defined(HAVE_GDBM) - int pagesize = atoi(HeaderCachePageSize) ?: 16384; - - h->db = gdbm_open((char *) path, pagesize, GDBM_WRCREAT, 00600, NULL); + h->db = gdbm_open((char *) path, 16384, GDBM_WRCREAT, 00600, NULL); #endif } diff --git a/mutt.h b/mutt.h index bc599d2..5830c09 100644 --- a/mutt.h +++ b/mutt.h @@ -224,9 +224,6 @@ enum { OPTFORCENAME, OPTFORWDECODE, OPTFORWQUOTE, -#ifdef HAVE_QDBM - OPTHCACHECOMPRESS, -#endif OPTHEADER, OPTHIDDENHOST, OPTHIDELIMITED, @@ -245,6 +242,8 @@ enum { OPTMARKERS, OPTMARKOLD, OPTMBOXPANE, + OPTSHORTENHIERARCHY, /* set when to shorten "hierarchies" in the sidebar */ + OPTSIDEBARNEWMAILONLY, OPTMETOO, OPTMHPURGE, OPTMIMEFORWDECODE, @@ -274,9 +273,7 @@ enum { OPTTILDE, OPTUNCOLLAPSEJUMP, OPTUSEFROM, -#ifdef HAVE_LIBIDN OPTUSEIDN, -#endif OPTWAITKEY, OPTWEED, OPTWRAP, @@ -287,18 +284,14 @@ enum { OPTXTERMSETTITLES, /* PGP options */ - OPTPGPRETAINABLESIG, OPTFORWDECRYPT, OPTPGPSHOWUNUSABLE, /* news options */ - -#ifdef USE_NNTP OPTSHOWNEWNEWS, OPTSHOWONLYUNREAD, OPTLOADDESC, -#endif /* USE_NNTP */ /* pseudo options */ @@ -328,25 +321,20 @@ enum { OPTREDRAWTREE, /* (pseudo) redraw the thread tree */ OPTPGPCHECKTRUST, /* (pseudo) used by pgp_select_key () */ OPTUNBUFFEREDINPUT, /* (pseudo) don't use key buffer */ - -#ifdef USE_NNTP OPTNEWS, /* (pseudo) used to change reader mode */ OPTNEWSSEND, /* (pseudo) used to change behavior when posting */ -#endif - OPTSHORTENHIERARCHY, /* set when to shorten "hierarchies" in the sidebar */ - OPTSIDEBARNEWMAILONLY, OPTMAX }; -#define mutt_bit_set(v,n) (v[n/8] |= (1 << (n % 8))) -#define mutt_bit_unset(v,n) (v[n/8] &= ~(1 << (n % 8))) -#define mutt_bit_toggle(v,n) (v[n/8] ^= (1 << (n % 8))) -#define mutt_bit_isset(v,n) (v[n/8] & (1 << (n % 8))) +#define mutt_bit_set(v,n) (v[n / 8] |= (1 << (n & 7))) +#define mutt_bit_unset(v,n) (v[n / 8] &= ~(1 << (n & 7))) +#define mutt_bit_toggle(v,n) (v[n / 8] ^= (1 << (n & 7))) +#define mutt_bit_isset(v,n) (v[n / 8] & (1 << (n & 7))) -#define set_option(x) mutt_bit_set(Options,x) -#define unset_option(x) mutt_bit_unset(Options,x) -#define toggle_option(x) mutt_bit_toggle(Options,x) -#define option(x) mutt_bit_isset(Options,x) +#define set_option(x) mutt_bit_set(Options, x) +#define unset_option(x) mutt_bit_unset(Options, x) +#define toggle_option(x) mutt_bit_toggle(Options, x) +#define option(x) mutt_bit_isset(Options, x) void mutt_init (int, string_list_t *);