1 /* Exit with a status code indicating success.
2 Copyright (C) 1999-2003, 2005 Free Software Foundation, Inc.
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 2, or (at your option)
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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
20 #include <sys/types.h>
23 /* Act like "true" by default; false.c overrides this. */
25 # define EXIT_STATUS EXIT_SUCCESS
28 #if EXIT_STATUS == EXIT_SUCCESS
29 # define PROGRAM_NAME "true"
31 # define PROGRAM_NAME "false"
34 #define AUTHORS "Jim Meyering"
36 /* The name this program was run with. */
43 Usage: %s [ignored command line arguments]\n\
46 program_name, program_name);
48 _(EXIT_STATUS == EXIT_SUCCESS
49 ? "Exit with a status code indicating success."
50 : "Exit with a status code indicating failure."));
51 fputs (HELP_OPTION_DESCRIPTION, stdout);
52 fputs (VERSION_OPTION_DESCRIPTION, stdout);
53 printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME);
54 printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
59 main (int argc, char **argv)
61 initialize_main (&argc, &argv);
62 program_name = argv[0];
63 setlocale (LC_ALL, "");
64 bindtextdomain (PACKAGE, LOCALEDIR);
67 atexit (close_stdout);
69 /* Recognize --help or --version only if it's the only command-line
73 if (STREQ (argv[1], "--help"))
76 if (STREQ (argv[1], "--version"))
77 version_etc (stdout, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS,