1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-11 06:34:40 +02:00

(main): Issue a warning for obsolete usage, unless POSIXLY_CORRECT.

This commit is contained in:
Jim Meyering
2002-01-18 23:40:06 +00:00
parent 8a755a3d27
commit c8aa23a9cc

View File

@@ -443,7 +443,13 @@ main (int argc, char **argv)
&& optarg[0] == '+'
&& xstrtoul (optarg, NULL, 10, &size, "") == LONGINT_OK
&& size <= SIZE_MAX)
skip_chars = size;
{
if (! posixly_correct)
error (0, 0,
_("warning: `uniq %s' is obsolete; use `uniq -s %s' instead"),
optarg, optarg + 1);
skip_chars = size;
}
else if (nfiles == 2)
{
error (0, 0, _("extra operand `%s'"), optarg);