From: Jim Meyering Date: Fri, 26 Mar 1999 14:05:40 +0000 (+0000) Subject: (PROGRAM_NAME, AUTHORS): Define X-Git-Tag: FILEUTILS-4_0e~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c227e4a167030ad25722f23112579da0cc654cbb;p=thirdparty%2Fcoreutils.git (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. --- diff --git a/src/dd.c b/src/dd.c index f63688f3a3..aee46aafc4 100644 --- a/src/dd.c +++ b/src/dd.c @@ -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++)