cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
authorJim Meyering <jim@meyering.net>
Tue, 22 May 2007 12:25:19 +0000 (14:25 +0200)
committerJim Meyering <jim@meyering.net>
Tue, 22 May 2007 16:47:17 +0000 (18:47 +0200)
commita6a447fc58a01598682f0914f978d0a3c1cfc4dc
tree381e6cc2fecc1d4244daf27a8d2a67eccaf7c0df
parentae5717158f1b9f31b986b0f4416582684039ec55
cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
give a better diagnostic for a field-number/offset of 0.
* NEWS: Mention the fix.
* src/cut.c (ADD_RANGE_PAIR): Add an explicit check for 0.
Based on a patch from James Youngman.
* tests/misc/cut: Add tests for the above.
ChangeLog
NEWS
src/cut.c
tests/misc/cut