From 044cc65932922c017ecf8913f9b02b2d627d0636 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sun, 4 Jun 2017 00:12:40 +0100 Subject: [PATCH] fix ifdef command Recent changes to the output of `mutt -v` broke the `ifdef` command. Tidy a couple of version strings. Update all the examples in the docs. Closes #607 --- doc/manual.xml.head | 37 ++++++++++++++------------- version.c | 62 ++++++++++++++++++++++----------------------- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/doc/manual.xml.head b/doc/manual.xml.head index be5fb23c1..3349a8213 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -299,7 +299,7 @@ Sidebar muttrc. To check if Mutt supports Sidebar, look for the string - +USE_SIDEBARin the mutt version. + +sidebarin the mutt version. mutt -v Let's turn on the Sidebar: @@ -2898,7 +2898,7 @@ color sidebar_divider color8 default - neomuttrc-20170421 + neomuttrc-20170602 neomuttrc @@ -2942,7 +2942,7 @@ color sidebar_divider color8 default - /etc/xdg/mutt/neomuttrc-20170421 + /etc/xdg/mutt/neomuttrc-20170602 NeoMutt release version @@ -2958,7 +2958,7 @@ color sidebar_divider color8 default Note the case of the filename - /etc/mutt/neomuttrc-20170421 + /etc/mutt/neomuttrc-20170602 NeoMutt release version @@ -2974,7 +2974,7 @@ color sidebar_divider color8 default Note the case of the filename - /usr/share/mutt/neomuttrc-20170421 + /usr/share/mutt/neomuttrc-20170602 NeoMutt release version @@ -3021,7 +3021,7 @@ color sidebar_divider color8 default - ~/.config/mutt/neomuttrc-20170421 + ~/.config/mutt/neomuttrc-20170602 NeoMutt release version @@ -3035,7 +3035,7 @@ color sidebar_divider color8 default ~/.config/mutt/muttrc - ~/.neomuttrc-20170421 + ~/.neomuttrc-20170602 NeoMutt release version @@ -3049,7 +3049,7 @@ color sidebar_divider color8 default ~/.muttrc - ~/.mutt/neomuttrc-20170421 + ~/.mutt/neomuttrc-20170602 NeoMutt release version @@ -9047,7 +9047,7 @@ attachments -I message/external-body -. For example, if Mutt was compiled using GnuTLS for encrypted communication instead of OpenSSL, mutt -vwould contain: - -USE_SSL_OPENSSL +USE_SSL_GNUTLS + -openssl +gnutls @@ -9484,7 +9484,7 @@ folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sen messages. The --enable-exact-addressswitch can be given to configure to build it with write-support for the latter syntax. - EXACT_ADDRESSin the output of + +exact_addressin the output of mutt -vindicates whether it's supported. @@ -10976,13 +10976,16 @@ finish # Finish readin $variable, <function>, commandor compile-time symbol, such as - USE_IMAP. + imap. + A list of compile-time symbols can be seen in the output of the + command mutt -v (in the Compile options + section). finishis particularly useful when combined with ifndef. e.g. # Sidebar config file -ifndef USE_SIDEBAR finish +ifndef sidebar finish @@ -11036,9 +11039,9 @@ ifdef trash 'set trash=~/Mail/trash' ifdef tag-pattern 'bind index <F6> tag-pattern' # If the 'imap-fetch-mail' command exists, read my IMAP config. ifdef imap-fetch-mail 'source ~/.mutt/imap.rc' -# If the compile-time symbol 'USE_SIDEBAR' does not exist, then +# If the compile-time symbol 'sidebar' does not exist, then # stop reading the current config file. -ifndef USE_SIDEBAR finish +ifndef sidebar finish # vim: syntax=muttrc @@ -11644,7 +11647,7 @@ bind index,pager y edit-label - +USE_HCACHEin the compile options + +hcachein the compile options @@ -15046,8 +15049,8 @@ folder-hook ^pop 'set read_inc=1' -d log debugging output to ~/.muttdebug0 if mutt was compiled - with +DEBUG; it can range from 1-5 and affects verbosity (a value - of 2 is recommended) + with +debug; it can range from 1-5 and affects + verbosity (a value of 2 is recommended) -D diff --git a/version.c b/version.c index 99496263d..17ab068f4 100644 --- a/version.c +++ b/version.c @@ -110,21 +110,6 @@ static struct CompileOptions comp_opts[] = { { "compose_to_sender", 1 }, { "compress", 1 }, { "cond_date", 1 }, -#ifdef CRYPT_BACKEND_CLASSIC_PGP - { "crypt_pgp", 1 }, -#else - { "crypt_pgp", 0 }, -#endif -#ifdef CRYPT_BACKEND_CLASSIC_SMIME - { "crypt_smime", 1 }, -#else - { "crypt_smime", 0 }, -#endif -#ifdef CRYPT_BACKEND_GPGME - { "crypt_gpgme", 1 }, -#else - { "crypt_gpgme", 0 }, -#endif #ifdef HAVE_CURS_SET { "curs_set", 1 }, #else @@ -139,11 +124,6 @@ static struct CompileOptions comp_opts[] = { { "dotlock", 1 }, #else { "dotlock", 0 }, -#endif -#ifdef ENABLE_NLS - { "enable_nls", 1 }, -#else - { "enable_nls", 0 }, #endif { "encrypt_to_self", 1 }, #ifdef EXACT_ADDRESS @@ -179,6 +159,16 @@ static struct CompileOptions comp_opts[] = { { "getaddrinfo", 0 }, #endif { "getsid", 1 }, +#ifdef USE_SSL_GNUTLS + { "gnutls", 1 }, +#else + { "gnutls", 0 }, +#endif +#ifdef CRYPT_BACKEND_GPGME + { "gpgme", 1 }, +#else + { "gpgme", 0 }, +#endif #ifdef USE_GSS { "gss", 1 }, #else @@ -234,11 +224,26 @@ static struct CompileOptions comp_opts[] = { { "multiple_fcc", 1 }, { "nested_if", 1 }, { "new_mail", 1 }, +#ifdef ENABLE_NLS + { "nls", 1 }, +#else + { "nls", 0 }, +#endif { "nntp", 1 }, #ifdef USE_NOTMUCH { "notmuch", 1 }, #else { "notmuch", 0 }, +#endif +#ifdef USE_SSL_OPENSSL + { "openssl", 1 }, +#else + { "openssl", 0 }, +#endif +#ifdef CRYPT_BACKEND_CLASSIC_PGP + { "pgp", 1 }, +#else + { "pgp", 0 }, #endif { "pop", 1 }, { "progress", 1 }, @@ -263,17 +268,12 @@ static struct CompileOptions comp_opts[] = { #endif { "sidebar", 1 }, { "skip_quoted", 1 }, - { "smtp", 1 }, -#ifdef USE_SSL_GNUTLS - { "ssl_gnutls", 1 }, -#else - { "ssl_gnutls", 0 }, -#endif -#ifdef USE_SSL_OPENSSL - { "ssl_openssl", 1 }, +#ifdef CRYPT_BACKEND_CLASSIC_SMIME + { "smime", 1 }, #else - { "ssl_openssl", 0 }, + { "smime", 0 }, #endif + { "smtp", 1 }, #ifdef HAVE_START_COLOR { "start_color", 1 }, #else @@ -459,7 +459,7 @@ void print_copyright(void) } /** - * feature_enabled - Test is a compile-time feature is enabled + * feature_enabled - Test if a compile-time feature is enabled * @name: Compile-time symbol of the feature * * Many of the larger features of mutt can be disabled at compile time. @@ -483,7 +483,7 @@ bool feature_enabled(const char *name) { if (mutt_strcmp(name, comp_opts[i].name) == 0) { - return true; + return comp_opts[i].enabled; } } return false; -- 2.40.0