From: Richard Russon Date: Wed, 25 Jul 2018 13:42:18 +0000 (+0100) Subject: reduce number of versions X-Git-Tag: 2019-10-25~732^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93aa4563ea5e6f0a2aa09cfbefe80ea23b30e9d1;p=neomutt reduce number of versions --- diff --git a/commands.c b/commands.c index 9254b4424..d6b77d005 100644 --- a/commands.c +++ b/commands.c @@ -1071,14 +1071,6 @@ int mutt_save_message(struct Header *h, bool delete, bool decode, bool decrypt) return -1; } -/** - * mutt_version - Generate the NeoMutt version string - */ -void mutt_version(void) -{ - mutt_message("NeoMutt %s%s", PACKAGE_VERSION, GitVer); -} - /** * mutt_edit_content_type - Edit the content type of an attachment * @param h Header of email diff --git a/commands.h b/commands.h index 9f78ba44d..d1018949b 100644 --- a/commands.h +++ b/commands.h @@ -54,6 +54,5 @@ int mutt_save_message_ctx(struct Header *h, bool delete, bool decode, bool decr int mutt_save_message(struct Header *h, bool delete, bool decode, bool decrypt); int mutt_select_sort(int reverse); void mutt_shell_escape(void); -void mutt_version(void); #endif /* MUTT_COMMANDS_H */ diff --git a/compose.c b/compose.c index 5ca933ae3..d698f9436 100644 --- a/compose.c +++ b/compose.c @@ -848,7 +848,7 @@ static const char *compose_format_str(char *buf, size_t buflen, size_t col, int break; case 'v': - snprintf(buf, buflen, "NeoMutt %s%s", PACKAGE_VERSION, GitVer); + snprintf(buf, buflen, "%s", mutt_make_version()); break; case 0: diff --git a/curs_main.c b/curs_main.c index c58d13653..991a2dd91 100644 --- a/curs_main.c +++ b/curs_main.c @@ -3354,7 +3354,7 @@ int mutt_index_menu(void) break; case OP_VERSION: - mutt_version(); + mutt_message(mutt_make_version()); break; case OP_BUFFY_LIST: diff --git a/pager.c b/pager.c index c759377a7..0d8e40c0a 100644 --- a/pager.c +++ b/pager.c @@ -55,6 +55,7 @@ #include "mutt_header.h" #include "mutt_logging.h" #include "mutt_window.h" +#include "muttlib.h" #include "mx.h" #include "ncrypt/ncrypt.h" #include "opcodes.h" @@ -3353,7 +3354,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e break; case OP_VERSION: - mutt_version(); + mutt_message(mutt_make_version()); break; case OP_BUFFY_LIST: diff --git a/status.c b/status.c index fab85dd5a..b221d0b0a 100644 --- a/status.c +++ b/status.c @@ -345,8 +345,7 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c break; case 'v': - snprintf(fmt, sizeof(fmt), "NeoMutt %%s%%s"); - snprintf(buf, buflen, fmt, PACKAGE_VERSION, GitVer); + snprintf(buf, buflen, "%s", mutt_make_version()); break; case 'V':