Commit Graph

47 Commits

Author SHA1 Message Date
Paul Eggert b78d6f6d92 Include <getopt.h>.
(main): Use getopt where it suffices, not getopt_long.
2004-09-21 22:04:31 +00:00
Paul Eggert 77f80f747e (main): Usage failure is EXIT_FAIL, not EXIT_FAILURE. 2004-09-19 01:07:46 +00:00
Paul Eggert b1d33bd46d Fix typo in previous change. 2004-09-19 01:02:30 +00:00
Paul Eggert 9f5c2a8415 (main): Reject unknown options instead of
interpreting them as a directory to chroot to.
2004-09-19 00:58:47 +00:00
Jim Meyering 1ce7b61d0e (main): Standardize on the diagnostics given when someone gives
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-21 15:03:35 +00:00
Jim Meyering 7870fa1081 (main): Handle "--". 2004-06-17 13:09:21 +00:00
Jim Meyering 918fbb3810 (usage): Use EXIT_SUCCESS, not 0, for clarity.
(CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE): Remove.
(main): Initialize exit_failure to EXIT_FAIL.

(main): Exit with status 1 rather than 127
if chroot itself fails, as per documentation.

(main): Use EXIT_ENOENT and EXIT_CANNOT_INVOKE
rather than roll-your-own symbols or integers.
2004-01-21 22:47:09 +00:00
Jim Meyering e8d314a5ec revert last change 2004-01-04 20:45:45 +00:00
Jim Meyering 81ba476a28 Include "exitfail.h".
(main): Set exit_failure.
2004-01-04 20:30:00 +00:00
Jim Meyering fd1e65f0a1 Include "quote.h".
(CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE): Define.
(main): Exit with status of 127, not 1, for too-few-args,
chroot failure, or chdir failure.
Give a better diagnostic upon execvp failure.
2004-01-04 20:25:46 +00:00
Jim Meyering df81ab2911 Cast NULL to `(char *)' in call to variadic function,
parse_long_options, so that it works even on systems for which
sizeof char* != sizeof int.
2003-11-05 03:53:19 +00:00
Jim Meyering cf4fdf373f Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
of 2003-09-19.  Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.

* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-10-18 10:05:47 +00:00
Jim Meyering bafd927f03 (WRITTEN_BY): Rename from AUTHORS.
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
2003-09-18 22:19:03 +00:00
Jim Meyering c6ec144494 revert previous change 2003-09-18 19:39:12 +00:00
Jim Meyering 3280bf4b55 Update AUTHORS definition to be a comma-separated list of strings and/or update
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-09-18 18:22:23 +00:00
Jim Meyering 4f4e9aa8e1 Don't include headers already included by system.h:
Don't include closeout.h.
2003-07-23 07:29:54 +00:00
Jim Meyering 6bcd4b08ba (main): Call initialize_main. 2003-06-17 18:13:23 +00:00
Jim Meyering 9b652d0790 Handle argc < optind. 2003-05-10 14:59:04 +00:00
Jim Meyering 4006f4e672 Change exit (0)' to exit (EXIT_SUCCESS)',
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-31 08:52:10 +00:00
Jim Meyering 7488703199 Change error (1, ...' to error (EXIT_FAILURE, ...'. 2002-08-30 23:04:53 +00:00
Jim Meyering a6005c2ba4 (main): Exit with status 126 or 127 when execvp or
execv fails, for consistency with POSIX commands like env and nice.
2002-08-01 08:50:19 +00:00
Jim Meyering 2ee11887cd (usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it. 2002-07-02 09:09:10 +00:00
Jim Meyering 2fae9e5d26 Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.
2001-12-15 20:46:30 +00:00
Jim Meyering 73ed5ed51e Include "closeout.h".
(main): Call atexit with close_stdout.
2000-05-07 14:49:06 +00:00
Jim Meyering 2a0b67dc3b (usage): Correct --help message. 1999-08-30 14:35:20 +00:00
Jim Meyering 39090114f0 (PROGRAM_NAME, AUTHORS): Define and use. 1999-03-31 04:11:35 +00:00
Jim Meyering ff743d5451 (main): Include author name argument in call to parse_long_options. 1999-03-04 14:02:14 +00:00
Jim Meyering 2f07328f17 (main): Call chdir ("/") after chroot.
Suggestion from James Youngman.
1999-01-31 17:50:53 +00:00
Jim Meyering 276d118b10 (usage): Remove static attribute. 1999-01-25 14:33:38 +00:00
Jim Meyering 24a8bf2d3e update bug-reporting address 1998-09-19 17:32:35 +00:00
Jim Meyering 5db3c9bdb4 update bug-reporting address 1997-10-07 23:51:39 +00:00
Jim Meyering 7eb03c4372 update copyrights for 1997 1997-02-09 04:54:16 +00:00
Jim Meyering 899a90bfd9 bracket bug address with <> and append a period 1997-02-01 04:23:31 +00:00
Jim Meyering 0ce61713d5 (usage): Remove one space in message to make colons line up. 1997-01-28 03:44:27 +00:00
Jim Meyering acc8601b65 (main): Call setlocale, bindtextdomain, and textdomain.
From Michel Robitaille.
1996-12-08 04:24:35 +00:00
Jim Meyering 5582e6dad3 change bug-reporting address 1996-11-03 03:16:27 +00:00
Jim Meyering b8e689dc67 change bug-reporting address 1996-11-02 20:44:15 +00:00
Jim Meyering f04044ed86 (main): update --version output to conform to coding standard 1996-10-05 16:37:57 +00:00
Jim Meyering e9d17da073 (usage): Tell where to report bugs. 1996-09-02 15:52:45 +00:00
Jim Meyering 6efc03fd41 Include <sys/types.h> before system.h. 1996-07-18 04:13:52 +00:00
Jim Meyering c58cd08bf9 (usage): Add a \' after \n' in usage message.
Otherwise, SunOS's /bin/cc chokes.
1996-07-14 04:11:17 +00:00
Jim Meyering a3c143bd82 Mark translatable strings. 1996-04-30 03:20:38 +00:00
Jim Meyering deeb3e0c49 (usage): Add missing close paren and open paren. 1996-04-24 03:23:37 +00:00
Jim Meyering 1d2c0959c9 (usage): Improve help message.
Enclose message strings in _().
From Karl Berry.
1996-04-21 03:24:47 +00:00
Jim Meyering c2efd628df . 1996-03-29 04:53:57 +00:00
Jim Meyering fee163dd57 Move usage to precede main.
Say `too few arguments' if that's why we display usage.
Protoize.
Include error.h.
Update copyright.
1996-03-28 06:17:34 +00:00
Jim Meyering 0271d97259 from Roland 1996-03-28 05:42:56 +00:00