summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-02-08 05:13:43 +0000
committerJim Meyering <jim@meyering.net>1993-02-08 05:13:43 +0000
commit8ae407c53936ecfa904c476e62343ff73bfd5de1 (patch)
tree3ec566db96d24b77b1cb72a1602e227660ad0d95
parent2694667b8df009082bdf526f4c78e3572759e86c (diff)
downloadcoreutils-8ae407c53936ecfa904c476e62343ff73bfd5de1.tar.xz
Add long options.
-rw-r--r--src/chmod.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/chmod.c b/src/chmod.c
index 4e04dfc64..3df4b99ab 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;