summaryrefslogtreecommitdiff
path: root/src/tail.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-04-26 16:43:18 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-04-26 16:43:18 +0000
commit369458974f33defb16c1841349ed69d75ea0b68f (patch)
tree677c455a1e2cf1e897d9eafbba5a2becf3ffac57 /src/tail.c
parent1e63d9354def113ef5ca3c1f7558eebf26fd22ea (diff)
downloadcoreutils-369458974f33defb16c1841349ed69d75ea0b68f.tar.xz
(parse_obsolete_option): Don't complain about -NUM.
Diffstat (limited to 'src/tail.c')
-rw-r--r--src/tail.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/tail.c b/src/tail.c
index 38b57ff58..2a8c6eb07 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -1411,8 +1411,8 @@ parse_obsolete_option (int argc, char * const *argv, uintmax_t *n_units)
case '-':
/* In the non-obsolete form, "-" is standard input and "-c"
requires an option-argument. The obsolete multidigit options
- are diagnosed more nicely below than they would be if we
- simply returned false here. */
+ are supported as a GNU extension even when conforming to
+ POSIX 1003.1-2001, so don't complain about them. */
if (!obsolete_usage && !p[p[0] == 'c'])
return false;
@@ -1443,21 +1443,10 @@ parse_obsolete_option (int argc, char * const *argv, uintmax_t *n_units)
if (n_string == n_string_end)
*n_units = default_count;
- else
- {
- if ((xstrtoumax (n_string, NULL, 10, n_units, "b")
- & ~LONGINT_INVALID_SUFFIX_CHAR)
- != LONGINT_OK)
- error (EXIT_FAILURE, 0, _("number in `%s' is too large"), argv[1]);
-
- if (!obsolete_usage)
- {
- error (0, 0, _("`%s' option is obsolete; use `%s-%c %"PRIuMAX"'"),
- argv[1], t_forever ? "-f " : "", t_count_lines ? 'n' : 'c',
- *n_units);
- usage (EXIT_FAILURE);
- }
- }
+ else if ((xstrtoumax (n_string, NULL, 10, n_units, "b")
+ & ~LONGINT_INVALID_SUFFIX_CHAR)
+ != LONGINT_OK)
+ error (EXIT_FAILURE, 0, _("number in `%s' is too large"), argv[1]);
/* Set globals. */
from_start = t_from_start;