Geoff Kuenning <[EMAIL PROTECTED]> writes:
| In:
|
| uniq (GNU textutils) 2.0
| Written by Richard Stallman and David MacKenzie.
|
| The "+n" option doesn't work, even though it is documented and is
| needed for backwards compatibility. Example:
|
| % uniq +6
| uniq: +6: No such file or directory
Thanks for the report.
Here's a patch.
Index: uniq.c
===================================================================
RCS file: /fetish/textutils/src/uniq.c,v
retrieving revision 1.70
diff -u -p -r1.70 uniq.c
--- uniq.c 2000/05/20 22:06:39 1.70
+++ uniq.c 2000/06/20 06:41:18
@@ -428,7 +428,7 @@ main (int argc, char **argv)
}
}
- if (optind >= 2 && !STREQ (argv[optind - 1], "--"))
+ if (argc - optind >= 2 && !STREQ (argv[optind - 1], "--"))
{
/* Interpret non-option arguments with leading `+' only
if we haven't seen `--'. */