diff options
author | Jim Meyering <jim@meyering.net> | 1999-04-04 15:44:26 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-04-04 15:44:26 +0000 |
commit | d815c152dfb4d796fce6debeaaf14f2ae5534337 (patch) | |
tree | bd7ddbcf36af5d84e3485faeaeb8ea38c8d58579 /src/wc.c | |
parent | 25abb410d417faa40faa7833c55e19ee2819f804 (diff) | |
download | coreutils-d815c152dfb4d796fce6debeaaf14f2ae5534337.tar.xz |
Standardize --help and --version processing.
Diffstat (limited to 'src/wc.c')
-rw-r--r-- | src/wc.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -29,7 +29,6 @@ #include "system.h" #include "error.h" #include "human.h" -#include "long-options.h" #include "safe-read.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -66,6 +65,8 @@ static struct option const longopts[] = {"lines", no_argument, NULL, 'l'}, {"words", no_argument, NULL, 'w'}, {"max-line-length", no_argument, NULL, 'L'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -302,9 +303,6 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, - AUTHORS, usage); - exit_status = 0; print_lines = print_words = print_chars = print_linelength = 0; total_lines = total_words = total_chars = max_line_length = 0; @@ -331,6 +329,10 @@ main (int argc, char **argv) print_linelength = 1; break; + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: usage (1); } |