Add support for POSIX 1003.1-2001, which requires removal for
authorJim Meyering <jim@meyering.net>
Wed, 16 Jan 2002 22:59:14 +0000 (22:59 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 16 Jan 2002 22:59:14 +0000 (22:59 +0000)
support of obsolete "+" option syntax in sort, tail, and uniq.

(usage, main): Implement this.

src/uniq.c

index 4fa3341..0690a1e 100644 (file)
@@ -158,7 +158,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
      fputs (_("\
   -w, --check-chars=N   compare no more than N characters in lines\n\
   -N                    same as -f N\n\
-  +N                    same as -s N (obsolescent; will be withdrawn)\n\
+"), stdout);
+     if (POSIX2_VERSION < 200112)
+       fputs (_("\
+  +N                    same as -s N (obsolete; will be withdrawn)\n\
 "), stdout);
      fputs (HELP_OPTION_DESCRIPTION, stdout);
      fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -436,7 +439,8 @@ main (int argc, char **argv)
        case 1:
          {
            unsigned long int size;
-           if (optarg[0] == '+'
+           if (POSIX2_VERSION < 200112
+               && optarg[0] == '+'
                && xstrtoul (optarg, NULL, 10, &size, "") == LONGINT_OK
                && size <= SIZE_MAX)
              skip_chars = size;