34#include <sys/utsname.h>
43#ifdef CRYPT_BACKEND_GPGME
50#include <openssl/opensslv.h>
53#include <gnutls/gnutls.h>
56#define PCRE2_CODE_UNIT_WIDTH 8
72 "Copyright (C) 2015-2024 Richard Russon <rich@flatcap.org>\n"
73 "Copyright (C) 2016-2023 Pietro Cerutti <gahr@gahr.ch>\n"
74 "Copyright (C) 2017-2019 Mehdi Abaakouk <sileht@sileht.net>\n"
75 "Copyright (C) 2018-2020 Federico Kircheis <federico.kircheis@gmail.com>\n"
76 "Copyright (C) 2017-2022 Austin Ray <austin@austinray.io>\n"
77 "Copyright (C) 2023-2024 Dennis Schön <mail@dennis-schoen.de>\n"
78 "Copyright (C) 2016-2017 Damien Riegel <damien.riegel@gmail.com>\n"
79 "Copyright (C) 2023 Rayford Shireman\n"
80 "Copyright (C) 2021-2023 David Purton <dcpurton@marshwiggle.net>\n"
81 "Copyright (C) 2020-2023 наб <nabijaczleweli@nabijaczleweli.xyz>\n";
85 "Many others not mentioned here contributed code, fixes and suggestions.\n");
89 "This program is free software; you can redistribute it and/or modify\n"
90 "it under the terms of the GNU General Public License as published by\n"
91 "the Free Software Foundation; either version 2 of the License, or\n"
92 "(at your option) any later version.\n"
94 "This program is distributed in the hope that it will be useful,\n"
95 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
96 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
97 "GNU General Public License for more details.\n"
99 "You should have received a copy of the GNU General Public License\n"
100 "along with this program; if not, write to the Free Software\n"
101 "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n");
104static const char *
ReachingUs =
N_(
"To learn more about NeoMutt, visit: https://neomutt.org\n"
105 "If you find a bug in NeoMutt, please raise an issue at:\n"
106 " https://github.com/neomutt/neomutt/issues\n"
107 "or send an email to: <neomutt-devel@neomutt.org>\n");
112 N_(
"Copyright (C) 2015-2024 Richard Russon and friends\n"
113 "NeoMutt comes with ABSOLUTELY NO WARRANTY; for details type 'neomutt -vv'.\n"
114 "NeoMutt is free software, and you are welcome to redistribute it\n"
115 "under certain conditions; type 'neomutt -vv' for details.\n");
156#ifdef HAVE_GETADDRINFO
157 {
"getaddrinfo", 1 },
159 {
"getaddrinfo", 0 },
166#ifdef CRYPT_BACKEND_GPGME
202 {
"locales_hack", 1 },
204 {
"locales_hack", 0 },
221#ifdef USE_SSL_OPENSSL
229#ifdef CRYPT_BACKEND_CLASSIC_PGP
242#ifdef CRYPT_BACKEND_CLASSIC_SMIME
252#ifdef NEOMUTT_DIRECT_COLORS
265#ifdef USE_DEBUG_BACKTRACE
268#ifdef USE_DEBUG_COLOR
271#ifdef USE_DEBUG_EMAIL
274#ifdef USE_DEBUG_GRAPHVIZ
277#ifdef USE_DEBUG_KEYMAP
280#ifdef USE_DEBUG_LOGGING
283#ifdef USE_DEBUG_NAMES
286#ifdef USE_DEBUG_NOTIFY
289#ifdef QUEUE_MACRO_DEBUG_TRACE
295#ifdef USE_DEBUG_WINDOW
320 bool tty = isatty(fileno(fp));
323 for (
int i = 0; co[i].
name; i++)
325 const size_t len = strlen(co[i].
name) + 2;
332 const char *fmt =
"?%s ";
337 fmt =
"\033[1;31m-%s\033[0m ";
343 fmt =
"\033[1;32m+%s\033[0m ";
349 fmt =
"\033[1;36m%s\033[0m ";
354 fprintf(fp, fmt, co[i].
name);
371 char *p = &s[strlen(s)];
375 while ((p >= s) && ((*p ==
'\n') || (*p ==
'\r')))
393 struct utsname uts = { 0 };
394 bool tty = isatty(fileno(fp));
396 const char *col_cyan =
"";
397 const char *col_bold =
"";
398 const char *col_end =
"";
402 col_cyan =
"\033[1;36m";
403 col_bold =
"\033[1m";
408 fprintf(fp,
"%s\n",
_(
Notice));
412 fprintf(fp,
"%sSystem:%s ", col_bold, col_end);
414 fprintf(fp,
"SCO %s", uts.release);
416 fprintf(fp,
"%s %s", uts.sysname, uts.release);
419 fprintf(fp,
" (%s)", uts.machine);
421 fprintf(fp,
"\n%sncurses:%s %s", col_bold, col_end, curses_version());
422#ifdef NCURSES_VERSION
423 fprintf(fp,
" (compiled with %s.%d)", NCURSES_VERSION, NCURSES_VERSION_PATCH);
426#ifdef _LIBICONV_VERSION
427 fprintf(fp,
"\n%slibiconv:%s %d.%d", col_bold, col_end,
428 _LIBICONV_VERSION >> 8, _LIBICONV_VERSION & 0xff);
435#ifdef CRYPT_BACKEND_GPGME
439#ifdef USE_SSL_OPENSSL
440#ifdef LIBRESSL_VERSION_TEXT
441 fprintf(fp,
"\n%sLibreSSL:%s %s", col_bold, col_end, LIBRESSL_VERSION_TEXT);
443#ifdef OPENSSL_VERSION_TEXT
444 fprintf(fp,
"\n%sOpenSSL:%s %s", col_bold, col_end, OPENSSL_VERSION_TEXT);
449 fprintf(fp,
"\n%sGnuTLS:%s %s", col_bold, col_end, GNUTLS_VERSION);
453 fprintf(fp,
"\n%slibnotmuch:%s %d.%d.%d", col_bold, col_end, LIBNOTMUCH_MAJOR_VERSION,
454 LIBNOTMUCH_MINOR_VERSION, LIBNOTMUCH_MICRO_VERSION);
459 char version[24] = { 0 };
460 pcre2_config(PCRE2_CONFIG_VERSION, version);
461 fprintf(fp,
"\n%sPCRE2:%s %s", col_bold, col_end, version);
467 fprintf(fp,
"\n%sstorage:%s %s", col_bold, col_end, backends);
469#ifdef USE_HCACHE_COMPRESSION
471 fprintf(fp,
"\n%scompression:%s %s", col_bold, col_end, backends);
477 fprintf(fp,
"\n\n%sConfigure options:%s %s\n", col_bold, col_end, (
char *)
configure_options);
480 fprintf(fp,
"\n%sCompilation CFLAGS:%s %s\n", col_bold, col_end, (
char *)
cc_cflags);
482 fprintf(fp,
"\n%s%s%s\n", col_bold,
_(
"Compile options:"), col_end);
487 fprintf(fp,
"\n%s%s%s\n", col_bold,
_(
"Devel options:"), col_end);
493 fprintf(fp,
"DOMAIN=\"%s\"\n", DOMAIN);
496 fprintf(fp,
"ISPELL=\"%s\"\n",
ISPELL);
498 fprintf(fp,
"MAILPATH=\"%s\"\n", MAILPATH);
499 fprintf(fp,
"PKGDATADIR=\"%s\"\n", PKGDATADIR);
500 fprintf(fp,
"SENDMAIL=\"%s\"\n", SENDMAIL);
501 fprintf(fp,
"SYSCONFDIR=\"%s\"\n", SYSCONFDIR);
526 return !ferror(stdout);
const char * compress_list(void)
Get a list of compression backend names.
API for the header cache compression.
const char * mutt_gpgme_print_version(void)
Get version of GPGME.
Convenience wrapper for the gui headers.
const char * mutt_idna_print_version(void)
Create an IDN version string.
Convenience wrapper for the library headers.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
API for encryption/signing of emails.
List of built-in capabilities.
const char * name
Option name.
int enabled
0 Disabled, 1 Enabled, 2 Devel only
static void print_compile_options(const struct CompileOptions *co, FILE *fp)
Print a list of enabled/disabled features.
static const char * Thanks
CLI Version: Thanks.
static const char * License
CLI Version: License.
static const char * Copyright
CLI Version: Authors' copyrights.
static const int SCREEN_WIDTH
CLI: Width to wrap version info.
static const char * ReachingUs
CLI Version: How to reach the NeoMutt Team.
const char * mutt_make_version(void)
Generate the NeoMutt version string.
bool print_copyright(void)
Print copyright message.
static const struct CompileOptions CompOpts[]
Compile options strings for neomutt -v output.
unsigned char configure_options[]
static const struct CompileOptions DebugOpts[]
Debug options strings for neomutt -v output.
bool print_version(FILE *fp)
Print system and compile info to a file.
unsigned char cc_cflags[]
static char * rstrip_in_place(char *s)
Strip a trailing carriage return.
static const char * Notice
CLI Version: Warranty notice.
bool feature_enabled(const char *name)
Test if a compile-time feature is enabled.
const char * store_compress_list(void)
const char * store_backend_list(void)
Get a list of backend names.
Display version and copyright about NeoMutt.