(main): Remove unused "case 0".

(verbose): Now bool, not int.
(VERBOSE_OPTION): New enum.
(longopts, main): Use it.
This commit is contained in:
Paul Eggert committed 2004-09-21 22:13:53 +00:00
1 parent 26877d8d31
commit 9873bd7eb6
1 file changed
+14 -6
+14 -6
View File
@@ -74,9 +74,16 @@ static int input_desc;
/* Descriptor on which output file is open. */
static int output_desc;
/* If nonzero, print a diagnostic on standard error just before each
/* If true, print a diagnostic on standard error just before each
output file is opened. */
static int verbose;
static bool verbose;
/* For long options that have no equivalent short option, use a
non-character as a pseudo short option, starting with CHAR_MAX + 1. */
enum
{
VERBOSE_OPTION = CHAR_MAX + 1
};
static struct option const longopts[] =
{
@@ -85,7 +92,7 @@ static struct option const longopts[] =
{"line-bytes", required_argument, NULL, 'C'},
{"suffix-length", required_argument, NULL, 'a'},
{"numeric-suffixes", no_argument, NULL, 'd'},
{"verbose", no_argument, &verbose, 1},
{"verbose", no_argument, NULL, VERBOSE_OPTION},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
@@ -404,9 +411,6 @@ main (int argc, char **argv)
switch (c)
{
case 0:
break;
case 'a':
{
unsigned long tmp;
@@ -491,6 +495,10 @@ main (int argc, char **argv)
suffix_alphabet = "0123456789";
break;
case VERBOSE_OPTION:
verbose = true;
break;
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);