From 1645ace5e752e258b4916e45d1ef1796625a3480 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 7 Nov 1999 20:00:54 +0000 Subject: Use REFERENCE_FILE_OPTION instead of bare `CHAR_MAX + 1'. --- src/chmod.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/chmod.c b/src/chmod.c index 7febb63dc..14ad4d5cd 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -74,13 +74,20 @@ static enum Verbosity verbosity = V_off; of this file. This file must exist. */ static char *reference_file; +/* For long options that have no equivalent short option, use a + non-character as a pseudo short option, starting with CHAR_MAX + 1. */ +enum +{ + REFERENCE_FILE_OPTION = CHAR_MAX + 1 +}; + 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'}, - {"reference", required_argument, 0, CHAR_MAX + 1}, + {"reference", required_argument, 0, REFERENCE_FILE_OPTION}, {"verbose", no_argument, 0, 'v'}, {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, @@ -310,7 +317,7 @@ main (int argc, char **argv) error (1, 0, _("invalid mode")); modeind = thisind; break; - case CHAR_MAX + 1: + case REFERENCE_FILE_OPTION: reference_file = optarg; break; case 'R': -- cgit v1.2.3-70-g09d2