diff options
author | Jim Meyering <jim@meyering.net> | 1999-11-07 20:00:54 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-11-07 20:00:54 +0000 |
commit | 1645ace5e752e258b4916e45d1ef1796625a3480 (patch) | |
tree | 931d2681108f76841cfa028811e357c4393047fa | |
parent | 0af22e4bb20a40bdb5496e0ac2d23f9d01d8886b (diff) | |
download | coreutils-1645ace5e752e258b4916e45d1ef1796625a3480.tar.xz |
Use REFERENCE_FILE_OPTION instead of bare `CHAR_MAX + 1'.
-rw-r--r-- | src/chmod.c | 11 |
1 files changed, 9 insertions, 2 deletions
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': |