]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Don't assume ASCII.
authorJim Meyering <jim@meyering.net>
Sun, 30 Aug 1998 03:08:21 +0000 (03:08 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 30 Aug 1998 03:08:21 +0000 (03:08 +0000)
src/pr.c
src/tail.c

index eee128e47c493b5dcb55cde25db37ed991b390d1..8541a2fa633559493370a290536dc66563fd668a 100644 (file)
--- 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
index 981ed6f5a79e8f714fab3951910da5e7c1c8ca2c..bce47a3a8c60c0807d617d4bbf99918c96998b92 100644 (file)
@@ -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;