summaryrefslogtreecommitdiff
path: root/src/od.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-04 15:44:26 +0000
committerJim Meyering <jim@meyering.net>1999-04-04 15:44:26 +0000
commitd815c152dfb4d796fce6debeaaf14f2ae5534337 (patch)
treebd7ddbcf36af5d84e3485faeaeb8ea38c8d58579 /src/od.c
parent25abb410d417faa40faa7833c55e19ee2819f804 (diff)
downloadcoreutils-d815c152dfb4d796fce6debeaaf14f2ae5534337.tar.xz
Standardize --help and --version processing.
Diffstat (limited to 'src/od.c')
-rw-r--r--src/od.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/od.c b/src/od.c
index 3280dd516..b6906f413 100644
--- a/src/od.c
+++ b/src/od.c
@@ -25,7 +25,6 @@
#include <sys/types.h>
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "xstrtoul.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -258,6 +257,9 @@ static struct option const long_options[] =
{"strings", optional_argument, NULL, 's'},
{"traditional", no_argument, NULL, 'B'},
{"width", optional_argument, NULL, 'w'},
+
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
@@ -1598,9 +1600,6 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
err = 0;
for (i = 0; i <= MAX_INTEGRAL_TYPE_SIZE; i++)
@@ -1761,6 +1760,10 @@ the maximum\nrepresentable value of type `long'"), optarg);
}
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
break;