diff options
author | Jim Meyering <jim@meyering.net> | 1999-03-31 05:52:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-03-31 05:52:46 +0000 |
commit | fdd07e3d2b4113a076cbb862115c43c9285e8b55 (patch) | |
tree | 7639c6587c2472b375e7175b32b1ca6114be0f9d /src/pinky.c | |
parent | 419aa421810a797b42eabc72dd767d26941bc17b (diff) | |
download | coreutils-fdd07e3d2b4113a076cbb862115c43c9285e8b55.tar.xz |
No longer include long-options.h.
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
Diffstat (limited to 'src/pinky.c')
-rw-r--r-- | src/pinky.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pinky.c b/src/pinky.c index 4bf6f7e23..ac15f7e1d 100644 --- a/src/pinky.c +++ b/src/pinky.c @@ -24,7 +24,6 @@ #include "system.h" #include "error.h" -#include "long-options.h" #include "readutmp.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -77,6 +76,8 @@ static int include_where = 1; static struct option const longopts[] = { + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -440,9 +441,6 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, - AUTHORS, usage); - while ((optc = getopt_long (argc, argv, "sfwiqbhlp", longopts, &longind)) != -1) { @@ -494,6 +492,10 @@ main (int argc, char **argv) include_home_and_shell = 0; break; + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: usage (1); } |