Imported Upstream version 4.5.14
[platform/upstream/findutils.git] / lib / findutils-version.c
1 /* findutils-version.c -- show version information for findutils
2    Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 /* config.h must be included first. */
19 #include <config.h>
20
21 /* system headers would go here if we needed any. */
22
23 /* gnulib headers. */
24 #include "gettext.h"
25 #include "version-etc.h"
26
27 /* find headers. */
28 #include "findutils-version.h"
29
30 #if ENABLE_NLS
31 # include <libintl.h>
32 # define _(Text) gettext (Text)
33 #else
34 # define _(Text) Text
35 #endif
36
37 #ifdef _LIBC
38 /* In the GNU C library, there is a predefined variable for this.  */
39 # define program_name program_invocation_name
40 #endif
41
42 extern char *program_name;
43 const char *version_string = VERSION;
44
45 void
46 display_findutils_version (const char *official_name)
47 {
48   /* We use official_name rather than program name in the version
49    * information.  This is deliberate, it is specified by the
50    * GNU coding standard.
51    */
52   fflush (stderr);
53   version_etc (stdout,
54                official_name, PACKAGE_NAME, version_string,
55                _("Eric B. Decker"),
56                _("James Youngman"),
57                _("Kevin Dalley"),
58                (const char*) NULL);
59 }