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/cat.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/cat.c') diff --git a/src/cat.c b/src/cat.c index 2f49d3726..0899cb79f 100644 --- a/src/cat.c +++ b/src/cat.c @@ -32,7 +32,6 @@ #endif #include "system.h" #include "error.h" -#include "long-options.h" #include "safe-read.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -528,6 +527,8 @@ main (int argc, char **argv) #if O_BINARY {"binary", no_argument, NULL, 'B'}, #endif + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -536,9 +537,6 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, - AUTHORS, usage); - /* Parse command line options. */ while ((c = getopt_long (argc, argv, @@ -615,6 +613,10 @@ main (int argc, char **argv) output_tabs = 0; break; + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: usage (EXIT_FAILURE); } -- cgit v1.2.3-54-g00ecf