summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-26 14:22:51 +0000
committerJim Meyering <jim@meyering.net>1999-03-26 14:22:51 +0000
commitf42367c3e7f266dce685aed7a6629d13ba5a324c (patch)
treed3afe8acc5effc50e33eee1d571e763180f219cf /src/install.c
parent0aa9923d96b671490bc0a44e99c1e9cae526681e (diff)
downloadcoreutils-f42367c3e7f266dce685aed7a6629d13ba5a324c.tar.xz
No longer include long-options.h.
Include version-etc.h instead. (PROGRAM_NAME, AUTHORS): Define. [long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/install.c b/src/install.c
index 71de8e41b..140a9d966 100644
--- a/src/install.c
+++ b/src/install.c
@@ -78,12 +78,17 @@
#include "cp-hash.h"
#include "copy.h"
#include "dirname.h"
-#include "long-options.h"
#include "makepath.h"
#include "modechange.h"
#include "path-concat.h"
+#include "version-etc.h"
#include "xstrtol.h"
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "install"
+
+#define AUTHORS "David MacKenzie"
+
#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
@@ -178,6 +183,8 @@ static struct option const long_options[] =
{"suffix", required_argument, NULL, 'S'},
{"version-control", required_argument, NULL, 'V'},
{"verbose", no_argument, NULL, 'v'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
@@ -235,9 +242,6 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, "install", GNU_PACKAGE, VERSION,
- "David MacKenzie", usage);
-
cp_option_init (&x);
owner_name = NULL;
@@ -295,6 +299,8 @@ main (int argc, char **argv)
case 'V':
version = optarg;
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (1);
}