Bump to m4 1.4.19
[platform/upstream/m4.git] / lib / version-etc.c
index a9a0fdb..525691d 100644 (file)
@@ -1,5 +1,5 @@
 /* Print --version and bug-reporting information in a consistent format.
-   Copyright (C) 1999-2016 Free Software Foundation, Inc.
+   Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering. */
 
@@ -23,7 +23,6 @@
 
 #include <stdarg.h>
 #include <stdio.h>
-#include <stdlib.h>
 
 #if USE_UNLOCKED_IO
 # include "unlocked-io.h"
@@ -38,7 +37,7 @@
 # define PACKAGE PACKAGE_TARNAME
 #endif
 
-enum { COPYRIGHT_YEAR = 2016 };
+enum { COPYRIGHT_YEAR = 2021 };
 
 /* The three functions below display the --version information the
    standard way.
@@ -83,20 +82,24 @@ version_etc_arn (FILE *stream,
      locale.  Otherwise, do not translate "(C)"; leave it as-is.  */
   fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR);
 
-  fputs (_("\
-\n\
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n\
+  fputs ("\n", stream);
+
+  /* TRANSLATORS: The %s placeholder is the web address of the GPL license.  */
+  fprintf (stream, _("\
+License GPLv3+: GNU GPL version 3 or later <%s>.\n\
 This is free software: you are free to change and redistribute it.\n\
 There is NO WARRANTY, to the extent permitted by law.\n\
-\n\
 "),
-         stream);
+           "https://gnu.org/licenses/gpl.html");
+
+  fputs ("\n", stream);
 
   switch (n_authors)
     {
     case 0:
-      /* The caller must provide at least one author name.  */
-      abort ();
+      /* No authors are given.  The caller should output authorship
+         info after calling this function.  */
+      break;
     case 1:
       /* TRANSLATORS: %s denotes an author name.  */
       fprintf (stream, _("Written by %s.\n"), authors[0]);
@@ -238,11 +241,12 @@ version_etc (FILE *stream,
 void
 emit_bug_reporting_address (void)
 {
+  fputs ("\n", stdout);
   /* TRANSLATORS: The placeholder indicates the bug-reporting address
      for this package.  Please add _another line_ saying
      "Report translation bugs to <...>\n" with the address for translation
      bugs (typically your translation team's web or email address).  */
-  printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT);
+  printf (_("Report bugs to: %s\n"), PACKAGE_BUGREPORT);
 #ifdef PACKAGE_PACKAGER_BUG_REPORTS
   printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
           PACKAGE_PACKAGER_BUG_REPORTS);
@@ -250,9 +254,9 @@ emit_bug_reporting_address (void)
 #ifdef PACKAGE_URL
   printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
 #else
-  printf (_("%s home page: <http://www.gnu.org/software/%s/>\n"),
-          PACKAGE_NAME, PACKAGE);
+  printf (_("%s home page: <%s>\n"),
+          PACKAGE_NAME, "https://www.gnu.org/software/" PACKAGE "/");
 #endif
-  fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),
-         stdout);
+  printf (_("General help using GNU software: <%s>\n"),
+          "https://www.gnu.org/gethelp/");
 }