diff options
author | Jim Meyering <jim@meyering.net> | 1999-03-04 05:36:10 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-03-04 05:36:10 +0000 |
commit | 88cbad981787d34f3dc8118bde16416c12a50421 (patch) | |
tree | 1a8993c9e22726767a534efd76dd619bfc80752d /src/split.c | |
parent | 0ae96f236175101ddc6c8f0eaf46d08f88173486 (diff) | |
download | coreutils-88cbad981787d34f3dc8118bde16416c12a50421.tar.xz |
Include long-options.h
[long_options]: Remove the "help" and "version" entries.
Remove declarations of show_help and show_version.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
Diffstat (limited to 'src/split.c')
-rw-r--r-- | src/split.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/split.c b/src/split.c index fbf332bfc..10bcd1770 100644 --- a/src/split.c +++ b/src/split.c @@ -29,8 +29,9 @@ #include "system.h" #include "error.h" -#include "xstrtol.h" +#include "long-options.h" #include "safe-read.h" +#include "xstrtol.h" int full_write (); @@ -56,12 +57,6 @@ static int input_desc; /* Descriptor on which output file is open. */ static int output_desc; -/* If nonzero, display usage information and exit. */ -static int show_help; - -/* If nonzero, print the version on standard output then exit. */ -static int show_version; - /* If nonzero, print a diagnostic on standard error just before each output file is opened. */ static int verbose; @@ -72,8 +67,6 @@ static struct option const longopts[] = {"lines", required_argument, NULL, 'l'}, {"line-bytes", required_argument, NULL, 'C'}, {"verbose", no_argument, NULL, 2}, - {"help", no_argument, &show_help, 1}, - {"version", no_argument, &show_version, 1}, {NULL, 0, NULL, 0} }; @@ -349,6 +342,9 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + parse_long_options (argc, argv, "split", GNU_PACKAGE, VERSION, + "Torbjorn Granlund and Richard M. Stallman", usage); + /* Parse command line options. */ infile = "-"; @@ -449,15 +445,6 @@ main (int argc, char **argv) } } - if (show_version) - { - printf ("split (%s) %s\n", GNU_PACKAGE, VERSION); - exit (EXIT_SUCCESS); - } - - if (show_help) - usage (0); - /* Handle default case. */ if (split_type == type_undef) { |