From 8ae407c53936ecfa904c476e62343ff73bfd5de1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 8 Feb 1993 05:13:43 +0000 Subject: [PATCH] Add long options. --- src/chmod.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/chmod.c b/src/chmod.c index 4e04dfc..3df4b99 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; -- 2.7.4