From: Jim Meyering Date: Mon, 8 Feb 1993 05:13:43 +0000 (+0000) Subject: Add long options. X-Git-Tag: FILEUTILS-3_8_3b~117 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ae407c53936ecfa904c476e62343ff73bfd5de1;p=thirdparty%2Fcoreutils.git Add long options. --- diff --git a/src/chmod.c b/src/chmod.c index 4e04dfc644..3df4b99aba 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -57,6 +57,16 @@ static int verbose; /* If nonzero, describe only modes that change. */ static int changes_only; +static struct option const long_options[] = +{ + {"recursive", no_argument, 0, 'R'}, + {"changes", no_argument, 0, 'c'}, + {"silent", no_argument, 0, 'f'}, + {"quiet", no_argument, 0, 'f'}, + {"verbose", no_argument, 0, 'v'}, + {0, 0, 0, 0} +}; + /* Parse the ASCII mode given on the command line into a linked list of `struct mode_change' and apply that to each file argument. */ @@ -78,7 +88,8 @@ main (argc, argv) { thisind = optind ? optind : 1; - c = getopt (argc, argv, "RcfvrwxXstugoa,+-="); + c = getopt_long (argc, argv, "RcfvrwxXstugoa,+-=", long_options, + (int *) 0); if (c == EOF) break;