diff options
author | Jim Meyering <jim@meyering.net> | 2000-01-08 18:02:09 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-01-08 18:02:09 +0000 |
commit | 299882b8a4b21bf803b88c2ffcda6538e233902c (patch) | |
tree | 31cb842741c3271d8ffe846d402114b564c592f9 /src | |
parent | fee7991cbce344da6e09eca959a22da3492b4333 (diff) | |
download | coreutils-299882b8a4b21bf803b88c2ffcda6538e233902c.tar.xz |
(OUTPUT_DELIMITER_OPTION): Define this and use it instead of `CHAR_MAX + n'.
Diffstat (limited to 'src')
-rw-r--r-- | src/cut.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -171,6 +171,13 @@ static char *output_delimiter_string; /* Nonzero if we have ever read standard input. */ static int have_read_stdin; +/* For long options that have no equivalent short option, use a + non-character as a pseudo short option, starting with CHAR_MAX + 1. */ +enum +{ + OUTPUT_DELIMITER_OPTION = CHAR_MAX + 1 +}; + static struct option const longopts[] = { {"bytes", required_argument, 0, 'b'}, @@ -178,7 +185,7 @@ static struct option const longopts[] = {"fields", required_argument, 0, 'f'}, {"delimiter", required_argument, 0, 'd'}, {"only-delimited", no_argument, 0, 's'}, - {"output-delimiter", required_argument, 0, CHAR_MAX + 1}, + {"output-delimiter", required_argument, 0, OUTPUT_DELIMITER_OPTION}, {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, {0, 0, 0, 0} @@ -736,7 +743,7 @@ main (int argc, char **argv) delim_specified = 1; break; - case CHAR_MAX + 1: + case OUTPUT_DELIMITER_OPTION: /* Interpret --output-delimiter='' to mean `use the NUL byte as the delimiter.' */ output_delimiter_length = (optarg[0] == '\0' |