1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Print --version and bug-reporting information in a consistent format.
4 Copyright (C) 1999-2010 Free Software Foundation, Inc.
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 /* Written by Jim Meyering. */
24 #include "version-etc.h"
31 # include "unlocked-io.h"
35 #define _(msgid) gettext (msgid)
37 /* If you use AM_INIT_AUTOMAKE's no-define option,
38 PACKAGE is not defined. Use PACKAGE_TARNAME instead. */
39 #if ! defined PACKAGE && defined PACKAGE_TARNAME
40 # define PACKAGE PACKAGE_TARNAME
43 enum { COPYRIGHT_YEAR = 2010 };
45 /* The three functions below display the --version information the
48 If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
49 the program. The formats are therefore:
55 COMMAND_NAME (PACKAGE) VERSION.
57 The functions differ in the way they are passed author names. */
59 /* Display the --version information the standard way.
61 Author names are given in the array AUTHORS. N_AUTHORS is the
62 number of elements in the array. */
64 version_etc_arn (FILE *stream,
65 const char *command_name, const char *package,
67 const char * const * authors, size_t n_authors)
70 fprintf (stream, "%s (%s) %s\n", command_name, package, version);
72 fprintf (stream, "%s %s\n", package, version);
74 #ifdef PACKAGE_PACKAGER
75 # ifdef PACKAGE_PACKAGER_VERSION
76 fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER,
77 PACKAGE_PACKAGER_VERSION);
79 fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER);
83 /* TRANSLATORS: Translate "(C)" to the copyright symbol
84 (C-in-a-circle), if this symbol is available in the user's
85 locale. Otherwise, do not translate "(C)"; leave it as-is. */
86 fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR);
90 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n\
91 This is free software: you are free to change and redistribute it.\n\
92 There is NO WARRANTY, to the extent permitted by law.\n\
100 /* The caller must provide at least one author name. */
103 /* TRANSLATORS: %s denotes an author name. */
104 fprintf (stream, _("Written by %s.\n"), authors[0]);
107 /* TRANSLATORS: Each %s denotes an author name. */
108 fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]);
111 /* TRANSLATORS: Each %s denotes an author name. */
112 fprintf (stream, _("Written by %s, %s, and %s.\n"),
113 authors[0], authors[1], authors[2]);
116 /* TRANSLATORS: Each %s denotes an author name.
117 You can use line breaks, estimating that each author name occupies
118 ca. 16 screen columns and that a screen line has ca. 80 columns. */
119 fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"),
120 authors[0], authors[1], authors[2], authors[3]);
123 /* TRANSLATORS: Each %s denotes an author name.
124 You can use line breaks, estimating that each author name occupies
125 ca. 16 screen columns and that a screen line has ca. 80 columns. */
126 fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"),
127 authors[0], authors[1], authors[2], authors[3], authors[4]);
130 /* TRANSLATORS: Each %s denotes an author name.
131 You can use line breaks, estimating that each author name occupies
132 ca. 16 screen columns and that a screen line has ca. 80 columns. */
133 fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"),
134 authors[0], authors[1], authors[2], authors[3], authors[4],
138 /* TRANSLATORS: Each %s denotes an author name.
139 You can use line breaks, estimating that each author name occupies
140 ca. 16 screen columns and that a screen line has ca. 80 columns. */
141 fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"),
142 authors[0], authors[1], authors[2], authors[3], authors[4],
143 authors[5], authors[6]);
146 /* TRANSLATORS: Each %s denotes an author name.
147 You can use line breaks, estimating that each author name occupies
148 ca. 16 screen columns and that a screen line has ca. 80 columns. */
149 fprintf (stream, _("\
150 Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"),
151 authors[0], authors[1], authors[2], authors[3], authors[4],
152 authors[5], authors[6], authors[7]);
155 /* TRANSLATORS: Each %s denotes an author name.
156 You can use line breaks, estimating that each author name occupies
157 ca. 16 screen columns and that a screen line has ca. 80 columns. */
158 fprintf (stream, _("\
159 Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"),
160 authors[0], authors[1], authors[2], authors[3], authors[4],
161 authors[5], authors[6], authors[7], authors[8]);
164 /* 10 or more authors. Use an abbreviation, since the human reader
165 will probably not want to read the entire list anyway. */
166 /* TRANSLATORS: Each %s denotes an author name.
167 You can use line breaks, estimating that each author name occupies
168 ca. 16 screen columns and that a screen line has ca. 80 columns. */
169 fprintf (stream, _("\
170 Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"),
171 authors[0], authors[1], authors[2], authors[3], authors[4],
172 authors[5], authors[6], authors[7], authors[8]);
177 /* Display the --version information the standard way. See the initial
178 comment to this module, for more information.
180 Author names are given in the NULL-terminated array AUTHORS. */
182 version_etc_ar (FILE *stream,
183 const char *command_name, const char *package,
184 const char *version, const char * const * authors)
188 for (n_authors = 0; authors[n_authors]; n_authors++)
190 version_etc_arn (stream, command_name, package, version, authors, n_authors);
193 /* Display the --version information the standard way. See the initial
194 comment to this module, for more information.
196 Author names are given in the NULL-terminated va_list AUTHORS. */
198 version_etc_va (FILE *stream,
199 const char *command_name, const char *package,
200 const char *version, va_list authors)
203 const char *authtab[10];
207 && (authtab[n_authors] = va_arg (authors, const char *)) != NULL;
210 version_etc_arn (stream, command_name, package, version,
215 /* Display the --version information the standard way.
217 If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
218 the program. The formats are therefore:
224 COMMAND_NAME (PACKAGE) VERSION.
226 The authors names are passed as separate arguments, with an additional
227 NULL argument at the end. */
229 version_etc (FILE *stream,
230 const char *command_name, const char *package,
231 const char *version, /* const char *author1, ...*/ ...)
235 va_start (authors, version);
236 version_etc_va (stream, command_name, package, version, authors);
241 emit_bug_reporting_address (void)
243 /* TRANSLATORS: The placeholder indicates the bug-reporting address
244 for this package. Please add _another line_ saying
245 "Report translation bugs to <...>\n" with the address for translation
246 bugs (typically your translation team's web or email address). */
247 printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT);
248 #ifdef PACKAGE_PACKAGER_BUG_REPORTS
249 printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
250 PACKAGE_PACKAGER_BUG_REPORTS);
253 printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
255 printf (_("%s home page: <http://www.gnu.org/software/%s/>\n"),
256 PACKAGE_NAME, PACKAGE);
258 fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),