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/ptx.c | |
parent | 25abb410d417faa40faa7833c55e19ee2819f804 (diff) | |
download | coreutils-d815c152dfb4d796fce6debeaaf14f2ae5534337.tar.xz |
Standardize --help and --version processing.
Diffstat (limited to 'src/ptx.c')
-rw-r--r-- | src/ptx.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -28,7 +28,6 @@ #include "bumpalloc.h" #include "diacrit.h" #include "error.h" -#include "long-options.h" #include "regex.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -1938,6 +1937,8 @@ static const struct option long_options[] = {"typeset-mode", no_argument, NULL, 't'}, {"width", required_argument, NULL, 'w'}, {"word-regexp", required_argument, NULL, 'W'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, {0, 0, 0, 0}, }; @@ -1968,9 +1969,6 @@ main (int argc, char **argv) setchrclass (NULL); #endif - parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, - AUTHORS, usage); - while (optchar = getopt_long (argc, argv, "ACF:GM:ORS:TW:b:i:fg:o:trw:", long_options, NULL), optchar != EOF) @@ -2073,6 +2071,9 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"), case 10: output_format = XARGMATCH ("--format", optarg, format_args, format_vals); + case_GETOPT_HELP_CHAR; + + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); } } |