mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-07 09:11:11 +02:00
Add support for POSIX 1003.1-2001, which requires removal for
support of obsolete "+" option syntax in sort, tail, and uniq. (usage, main): Implement this.
This commit is contained in:
+6
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user