summaryrefslogtreecommitdiff
path: root/src/cat.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-04 15:44:26 +0000
committerJim Meyering <jim@meyering.net>1999-04-04 15:44:26 +0000
commitd815c152dfb4d796fce6debeaaf14f2ae5534337 (patch)
treebd7ddbcf36af5d84e3485faeaeb8ea38c8d58579 /src/cat.c
parent25abb410d417faa40faa7833c55e19ee2819f804 (diff)
downloadcoreutils-d815c152dfb4d796fce6debeaaf14f2ae5534337.tar.xz
Standardize --help and --version processing.
Diffstat (limited to 'src/cat.c')
-rw-r--r--src/cat.c10
1 files changed, 6 insertions, 4 deletions
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);
}