projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a755a3
)
(main): Issue a warning for obsolete usage, unless POSIXLY_CORRECT.
author
Jim Meyering
<jim@meyering.net>
Fri, 18 Jan 2002 23:40:06 +0000
(23:40 +0000)
committer
Jim Meyering
<jim@meyering.net>
Fri, 18 Jan 2002 23:40:06 +0000
(23:40 +0000)
src/uniq.c
patch
|
blob
|
history
diff --git
a/src/uniq.c
b/src/uniq.c
index
c61468c
..
b3b16ff
100644
(file)
--- a/
src/uniq.c
+++ b/
src/uniq.c
@@
-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);