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/who.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/who.c')
-rw-r--r-- | src/who.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -29,7 +29,6 @@ #include <stdio.h> #include "error.h" -#include "long-options.h" #include "readutmp.h" #include "system.h" @@ -81,6 +80,8 @@ static struct option const longopts[] = {"message", no_argument, NULL, 'T'}, {"mesg", no_argument, NULL, 'T'}, {"writable", no_argument, NULL, 'T'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -388,9 +389,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, "ilmqsuwHT", longopts, &longind)) != -1) { @@ -428,6 +426,10 @@ main (int argc, char **argv) include_mesg = 1; break; + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: usage (1); } |