From fdd07e3d2b4113a076cbb862115c43c9285e8b55 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 31 Mar 1999 05:52:46 +0000 Subject: 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. --- src/who.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/who.c') diff --git a/src/who.c b/src/who.c index 88088f313..e5fd094ef 100644 --- a/src/who.c +++ b/src/who.c @@ -29,7 +29,6 @@ #include #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); } -- cgit v1.2.3-54-g00ecf