diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-21 22:12:13 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-21 22:12:13 +0000 |
commit | 1ccaf98c8c63a98be1f83f13520c9843da105533 (patch) | |
tree | d2e50682f57c0c9c28f9b8c6e82fb63a2431a883 /src/stty.c | |
parent | 288994697f3ae979c5d7f4d781b7ab637addcf0a (diff) | |
download | coreutils-1ccaf98c8c63a98be1f83f13520c9843da105533.tar.xz |
(longopts): Add --help, --version.
(main): Use longopts rather than parse_long_options.
Don't include "long-options.h".
Diffstat (limited to 'src/stty.c')
-rw-r--r-- | src/stty.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/stty.c b/src/stty.c index 7c6741926..2aeb4dacb 100644 --- a/src/stty.c +++ b/src/stty.c @@ -55,7 +55,6 @@ #include <stdarg.h> #include "system.h" -#include "long-options.h" #include "error.h" #include "xstrtol.h" @@ -440,6 +439,8 @@ static struct option longopts[] = {"all", no_argument, NULL, 'a'}, {"save", no_argument, NULL, 'g'}, {"file", required_argument, NULL, 'F'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {NULL, 0, NULL, 0} }; @@ -738,9 +739,6 @@ main (int argc, char **argv) atexit (close_stdout); - parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, - usage, AUTHORS, (char const *) NULL); - output_type = changed; verbose_output = false; recoverable_output = false; @@ -777,6 +775,10 @@ main (int argc, char **argv) file_name = optarg; break; + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: noargs = false; |