summaryrefslogtreecommitdiff
path: root/src/nl.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/nl.c
parent25abb410d417faa40faa7833c55e19ee2819f804 (diff)
downloadcoreutils-d815c152dfb4d796fce6debeaaf14f2ae5534337.tar.xz
Standardize --help and --version processing.
Diffstat (limited to 'src/nl.c')
-rw-r--r--src/nl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nl.c b/src/nl.c
index c2ba80af0..79394ff65 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -30,7 +30,6 @@
#include "error.h"
#include "linebuffer.h"
-#include "long-options.h"
#include "xstrtol.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -158,6 +157,8 @@ static struct option const longopts[] =
{"number-width", required_argument, NULL, 'w'},
{"number-format", required_argument, NULL, 'n'},
{"section-delimiter", required_argument, NULL, 'd'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
@@ -450,9 +451,6 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
have_read_stdin = 0;
while ((c = getopt_long (argc, argv, "h:b:f:v:i:pl:s:w:n:d:", longopts,
@@ -554,6 +552,8 @@ main (int argc, char **argv)
case 'd':
section_del = optarg;
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (2);
break;