]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(PROGRAM_NAME, AUTHORS): Define
authorJim Meyering <jim@meyering.net>
Fri, 26 Mar 1999 14:05:40 +0000 (14:05 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 26 Mar 1999 14:05:40 +0000 (14:05 +0000)
(long_options): Remove unused struct.
(scanargs): Remove useless loop.
(main): Use PROGRAM_NAME and AUTHORS in call to parse_long_options.

src/dd.c

index f63688f3a3c817107cceb001749983e0f12b9e81..aee46aafc4cd9d95d18e4cde832593ee2dac9ef1 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
 #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++)