1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-18 17:56:54 +02:00

(parse_obsolescent_option): Accept a b suffix.

This commit is contained in:
Jim Meyering
2001-05-20 18:46:09 +00:00
parent 67785d9d82
commit b85edfac45

View File

@@ -1253,7 +1253,7 @@ parse_obsolescent_option (int argc, const char *const *argv,
n_string_end = p;
t_count_lines = 1;
if (*p == 'c')
if (*p == 'c' || *p == 'b')
{
t_count_lines = 0;
++p;
@@ -1296,7 +1296,9 @@ parse_obsolescent_option (int argc, const char *const *argv,
strtol_error s_err;
unsigned long int tmp_ulong;
char *end;
s_err = xstrtoul (n_string, &end, 10, &tmp_ulong, NULL);
s_err = xstrtoul (n_string, &end, 10, &tmp_ulong,
*n_string_end == 'b' ? "b" : NULL);
if (s_err == LONGINT_OK && tmp_ulong <= OFF_T_MAX)
*n_units = (off_t) tmp_ulong;
else