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/od.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/od.c') diff --git a/src/od.c b/src/od.c index 3280dd516..b6906f413 100644 --- a/src/od.c +++ b/src/od.c @@ -25,7 +25,6 @@ #include #include "system.h" #include "error.h" -#include "long-options.h" #include "xstrtoul.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -258,6 +257,9 @@ static struct option const long_options[] = {"strings", optional_argument, NULL, 's'}, {"traditional", no_argument, NULL, 'B'}, {"width", optional_argument, NULL, 'w'}, + + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -1598,9 +1600,6 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, - AUTHORS, usage); - err = 0; for (i = 0; i <= MAX_INTEGRAL_TYPE_SIZE; i++) @@ -1761,6 +1760,10 @@ the maximum\nrepresentable value of type `long'"), optarg); } break; + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: usage (1); break; -- cgit v1.2.3-54-g00ecf