summaryrefslogtreecommitdiff
path: root/src/mkfifo.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-04 05:09:05 +0000
committerJim Meyering <jim@meyering.net>1999-03-04 05:09:05 +0000
commit61fa70ac19d9202f6509e97e4bda1f4ab8f5d1fd (patch)
tree1fb89b9b511548ea40a899b6c60f1371cf6123f4 /src/mkfifo.c
parentd0bdbe00ba72224915a61589a399bc0e86d74d80 (diff)
downloadcoreutils-61fa70ac19d9202f6509e97e4bda1f4ab8f5d1fd.tar.xz
Include long-options.h
[long_options]: Remove the "help" and "version" entries. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
Diffstat (limited to 'src/mkfifo.c')
-rw-r--r--src/mkfifo.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/mkfifo.c b/src/mkfifo.c
index 3b09a55c8..09c05e372 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -28,24 +28,17 @@
#include <sys/types.h>
#include "system.h"
-#include "modechange.h"
#include "closeout.h"
#include "error.h"
+#include "long-options.h"
+#include "modechange.h"
/* The name 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 longopts[] =
{
{"mode", required_argument, NULL, 'm'},
- {"help", no_argument, &show_help, 1},
- {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -87,6 +80,9 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ parse_long_options (argc, argv, "mkfifo", GNU_PACKAGE, VERSION,
+ "David MacKenzie", usage);
+
symbolic_mode = NULL;
#ifndef S_ISFIFO
@@ -106,16 +102,6 @@ main (int argc, char **argv)
}
}
- if (show_version)
- {
- printf ("mkfifo (%s) %s\n", GNU_PACKAGE, VERSION);
- close_stdout ();
- exit (0);
- }
-
- if (show_help)
- usage (0);
-
if (optind == argc)
{
error (0, 0, _("too few arguments"));