summaryrefslogtreecommitdiff
path: root/src/env.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-31 05:52:46 +0000
committerJim Meyering <jim@meyering.net>1999-03-31 05:52:46 +0000
commitfdd07e3d2b4113a076cbb862115c43c9285e8b55 (patch)
tree7639c6587c2472b375e7175b32b1ca6114be0f9d /src/env.c
parent419aa421810a797b42eabc72dd767d26941bc17b (diff)
downloadcoreutils-fdd07e3d2b4113a076cbb862115c43c9285e8b55.tar.xz
No longer include long-options.h.
[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/env.c')
-rw-r--r--src/env.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/env.c b/src/env.c
index dda5c119d..7d83b572f 100644
--- a/src/env.c
+++ b/src/env.c
@@ -85,7 +85,6 @@
#include "system.h"
#include "error.h"
-#include "long-options.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "env"
@@ -103,6 +102,8 @@ static struct option const longopts[] =
{
{"ignore-environment", no_argument, NULL, 'i'},
{"unset", required_argument, NULL, 'u'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
@@ -144,9 +145,6 @@ main (register int argc, register char **argv, char **envp)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
while ((optc = getopt_long (argc, argv, "+iu:", longopts, NULL)) != -1)
{
switch (optc)
@@ -158,6 +156,8 @@ main (register int argc, register char **argv, char **envp)
break;
case 'u':
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (2);
}