]> git.ipfire.org Git - thirdparty/coreutils.git/commit
numfmt: add support for new SI prefixes
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Jan 2023 19:42:51 +0000 (11:42 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Jan 2023 20:47:41 +0000 (12:47 -0800)
commite1ff4ee0f6d7490610ecc39d57c855818f6fd1f4
treebe1fff168d783507b9a5a816647b51ae00fda2b7
parent26bac321370acba2f651349dcc14beb37474a396
numfmt: add support for new SI prefixes

* src/dd, src/head.c, src/od.c, src/sort.c, src/stdbuf.c, src/tail.c:
(usage):
* src/system.h (emit_size_note):
Mention new SI prefixes.
* src/du.c (main):
* src/head.c (head_file):
* src/numfmt.c (suffix_power, suffix_power_char, prepare_padded_number):
* src/shred.c (main):
* src/sort.c (unit_order):
* src/tail.c (parse_options):
Support new SI prefixes.
* src/numfmt.c (MAX_ACCEPTABLE_DIGITS): Increase to 33.
(zero_and_valid_suffixes, valid_suffixes): New constants,
with new SI prefixes.
(valid_suffix, unit_to_umax): Use them.
(prepare_padded_number): Diagnose "999Q" instead of "999Y".
* tests/misc/numfmt.pl, tests/misc/sort.pl:
Adjust tests to match new max.
14 files changed:
NEWS
doc/coreutils.texi
src/dd.c
src/du.c
src/head.c
src/numfmt.c
src/od.c
src/shred.c
src/sort.c
src/stdbuf.c
src/system.h
src/tail.c
tests/misc/numfmt.pl
tests/misc/sort.pl