From 9e9d7be7062fe64f05638bdb8f407c3d0ce2423f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 30 Aug 1998 03:08:21 +0000 Subject: Don't assume ASCII. --- src/pr.c | 8 ++++---- src/tail.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pr.c b/src/pr.c index eee128e47..8541a2fa6 100644 --- a/src/pr.c +++ b/src/pr.c @@ -580,8 +580,8 @@ static struct option const long_options[] = {"help", no_argument, &show_help, 1}, {"version", no_argument, &show_version, 1}, {"test", no_argument, &test_suite, 1}, - {"pages", required_argument, NULL, 128}, - {"columns", required_argument, NULL, 129}, + {"pages", required_argument, NULL, CHAR_MAX + 1}, + {"columns", required_argument, NULL, CHAR_MAX + 2}, {"across", no_argument, NULL, 'a'}, {"show-control-chars", no_argument, NULL, 'c'}, {"double-space", no_argument, NULL, 'd'}, @@ -743,11 +743,11 @@ main (int argc, char **argv) case 0: /* getopt long option */ break; - case 128: /* --pages=FIRST_PAGE[:LAST_PAGE] */ + case CHAR_MAX + 1: /* --pages=FIRST_PAGE[:LAST_PAGE] */ first_last_page (optarg); break; - case 129: /* --columns=COLUMN */ + case CHAR_MAX + 2: /* --columns=COLUMN */ { long int tmp_long; if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK diff --git a/src/tail.c b/src/tail.c index 981ed6f5a..bce47a3a8 100644 --- a/src/tail.c +++ b/src/tail.c @@ -132,11 +132,11 @@ static int show_version; static struct option const long_options[] = { - {"allow-missing", required_argument, NULL, 11}, + {"allow-missing", required_argument, NULL, CHAR_MAX + 1}, {"bytes", required_argument, NULL, 'c'}, {"follow", no_argument, NULL, 'f'}, - {"follow-descriptor", no_argument, NULL, 12}, - {"follow-name", no_argument, NULL, 13}, + {"follow-descriptor", no_argument, NULL, CHAR_MAX + 2}, + {"follow-name", no_argument, NULL, CHAR_MAX + 3}, {"lines", required_argument, NULL, 'n'}, {"quiet", no_argument, NULL, 'q'}, {"silent", no_argument, NULL, 'q'}, @@ -1168,15 +1168,15 @@ parse_options (int argc, char **argv, forever = 1; break; - case 11: + case CHAR_MAX + 1: allow_missing = 1; break; - case 12: + case CHAR_MAX + 2: follow_mode = follow_descriptor; break; - case 13: + case CHAR_MAX + 3: follow_mode = follow_name; break; -- cgit v1.2.3-70-g09d2