path: root/libmailutils
diff options
authorSergey Poznyakoff <>2021-01-05 15:27:51 +0200
committerSergey Poznyakoff <>2021-01-05 15:27:51 +0200
commit4032f49b54897cd3bbcfaa2a213002c921ef5f16 (patch)
tree193e629ec106087ffbf3a2eb87a2c8d1519266e0 /libmailutils
parentfa03ad4aed00d6df8c2bf556e378177b97c0c0c7 (diff)
Fix version output
* include/mailutils/cli.h (mu_copyright_year): New extern. (mu_version_print): New proto. * libmailutils/cli/cli.c (mu_copyright_year): New variable. Should be updated once a year. (mu_version_print): New function. (mu_version_hook): Use mu_version_print. * mail/mail.c (mail_warranty): Use mu_version_print.
Diffstat (limited to 'libmailutils')
1 files changed, 10 insertions, 3 deletions
diff --git a/libmailutils/cli/cli.c b/libmailutils/cli/cli.c
index 948826891..cad717ecd 100644
--- a/libmailutils/cli/cli.c
+++ b/libmailutils/cli/cli.c
@@ -55,10 +55,11 @@ const char mu_version_copyright[] =
/* Do *not* mark this string for translation. %s is a copyright
symbol suitable for this locale, and %d is the copyright
year. */
- "Copyright %s 2007-2019 Free Software Foundation, inc.";
+ "Copyright %s 2007-%d Free Software Foundation, inc.";
+int mu_copyright_year = 2021;
-mu_version_hook (struct mu_parseopt *po, mu_stream_t stream)
+mu_version_print (mu_stream_t stream)
mu_stream_printf (stream, "%s (%s) %s-%d [%s]\n",
@@ -72,7 +73,7 @@ mu_version_hook (struct mu_parseopt *po, mu_stream_t stream)
/* TRANSLATORS: Translate "(C)" to the copyright symbol
(C-in-a-circle), if this symbol is available in the user's
locale. Otherwise, do not translate "(C)"; leave it as-is. */
- mu_stream_printf (stream, mu_version_copyright, _("(C)"));
+ mu_stream_printf (stream, mu_version_copyright, _("(C)"), mu_copyright_year);
mu_stream_printf (stream, _("\
License GPLv3+: GNU GPL version 3 or later <>\nThis is free software: you are free to change and redistribute it.\n\
@@ -81,6 +82,12 @@ There is NO WARRANTY, to the extent permitted by law.\n\
+mu_version_hook (struct mu_parseopt *po, mu_stream_t stream)
+ mu_version_print (stream);
const char mu_general_help_text[] =
N_("General help using GNU software: <>");

Return to:

Send suggestions and report system problems to the System administrator.