From 1ccaf98c8c63a98be1f83f13520c9843da105533 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 21 Sep 2004 22:12:13 +0000 Subject: [PATCH] (longopts): Add --help, --version. (main): Use longopts rather than parse_long_options. Don't include "long-options.h". --- src/stty.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/stty.c b/src/stty.c index 7c67419265..2aeb4dacb9 100644 --- a/src/stty.c +++ b/src/stty.c @@ -55,7 +55,6 @@ #include #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; -- 2.47.2