diff options
author | Jim Meyering <jim@meyering.net> | 1999-03-26 14:05:40 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-03-26 14:05:40 +0000 |
commit | c227e4a167030ad25722f23112579da0cc654cbb (patch) | |
tree | ddc6f57b5bdd6c54a916c4ff6b7eb928a6104044 | |
parent | c92de17d2f18759bb33a4e5e23a9b8cb11f82152 (diff) | |
download | coreutils-c227e4a167030ad25722f23112579da0cc654cbb.tar.xz |
(PROGRAM_NAME, AUTHORS): Define
(long_options): Remove unused struct.
(scanargs): Remove useless loop.
(main): Use PROGRAM_NAME and AUTHORS in call to parse_long_options.
-rw-r--r-- | src/dd.c | 27 |
1 files changed, 7 insertions, 20 deletions
@@ -36,6 +36,11 @@ #include "long-options.h" #include "safe-read.h" +/* The official name of this program (e.g., no `g' prefix). */ +#define PROGRAM_NAME "dd" + +#define AUTHORS "Paul Rubin, David MacKenzie, and Stuart Kemp" + #ifndef SIGINFO # define SIGINFO SIGUSR1 #endif @@ -267,11 +272,6 @@ static unsigned char const ebcdic_to_ascii[] = 070, 071, 0372, 0373, 0374, 0375, 0376, 0377 }; -static struct option const long_options[] = -{ - {0, 0, 0, 0} -}; - void usage (int status) { @@ -584,19 +584,6 @@ static void scanargs (int argc, char **argv) { int i; - int c; - - while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1) - { - switch (c) - { - case 0: - break; - - default: - usage (1); - } - } for (i = optind; i < argc; i++) { @@ -1104,8 +1091,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - parse_long_options (argc, argv, "dd", GNU_PACKAGE, VERSION, - "Paul Rubin, David MacKenzie, and Stuart Kemp", usage); + parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, + AUTHORS, usage); /* Initialize translation table to identity translation. */ for (i = 0; i < 256; i++) |