aboutsummaryrefslogtreecommitdiffstats
path: root/src/tee.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-06 15:28:54 +0000
committerJim Meyering <jim@meyering.net>1999-03-06 15:28:54 +0000
commit5b2aa1846bc8dc6d8ffce7d523cebc1ab45a17d7 (patch)
tree84329e3e3519feb76d3835f81928c4b657c495cf /src/tee.c
parent*** empty log message *** (diff)
downloadcoreutils-5b2aa1846bc8dc6d8ffce7d523cebc1ab45a17d7.tar.gz
coreutils-5b2aa1846bc8dc6d8ffce7d523cebc1ab45a17d7.zip
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/tee.c')
-rw-r--r--src/tee.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/tee.c b/src/tee.c
index b4b355368..f0d3aad0e 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -26,6 +26,7 @@
#include "system.h"
#include "closeout.h"
#include "error.h"
+#include "long-options.h"
int full_write ();
@@ -40,18 +41,10 @@ static int ignore_interrupts;
/* The name that this program was run with. */
char *program_name;
-/* If nonzero, display usage information and exit. */
-static int show_help;
-
-/* If nonzero, print the version on standard output and exit. */
-static int show_version;
-
static struct option const long_options[] =
{
{"append", no_argument, NULL, 'a'},
- {"help", no_argument, &show_help, 1},
{"ignore-interrupts", no_argument, NULL, 'i'},
- {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -88,6 +81,10 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ parse_long_options (argc, argv, "tee", GNU_PACKAGE, VERSION,
+ "Mike Parker, Richard M. Stallman, and David MacKenzie",
+ usage);
+
append = 0;
ignore_interrupts = 0;
@@ -111,15 +108,6 @@ main (int argc, char **argv)
}
}
- if (show_version)
- {
- printf ("tee (%s) %s\n", GNU_PACKAGE, VERSION);
- exit (0);
- }
-
- if (show_help)
- usage (0);
-
if (ignore_interrupts)
{
#ifdef _POSIX_SOURCE