From d815c152dfb4d796fce6debeaaf14f2ae5534337 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 4 Apr 1999 15:44:26 +0000 Subject: Standardize --help and --version processing. --- src/uniq.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/uniq.c') diff --git a/src/uniq.c b/src/uniq.c index 26c6753bd..822a5389d 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -25,7 +25,6 @@ #include "system.h" #include "linebuffer.h" -#include "long-options.h" #include "error.h" #include "xstrtol.h" #include "memcasecmp.h" @@ -85,6 +84,8 @@ static struct option const longopts[] = {"skip-fields", required_argument, NULL, 'f'}, {"skip-chars", required_argument, NULL, 's'}, {"check-chars", required_argument, NULL, 'w'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -289,9 +290,6 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, - AUTHORS, usage); - skip_chars = 0; skip_fields = 0; check_chars = 0; @@ -375,6 +373,10 @@ main (int argc, char **argv) } break; + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: usage (1); } -- cgit v1.2.3-54-g00ecf