summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-04-30 15:05:15 +0100
committerPádraig Brady <P@draigBrady.com>2014-05-02 01:59:31 +0100
commit10a96524355775e6d8533555f185656c7f29075c (patch)
tree67c8aa976f39add33397afdeeaae67800d1bb55f /src/fold.c
parent59eacf2764a522f017c8289be94162b6f5163e8f (diff)
downloadcoreutils-10a96524355775e6d8533555f185656c7f29075c.tar.xz
numfmt: support zero padding using --format="%010f"
* src/numfmt.c (setup_padding_buffer): Simplify the code by not explicitly dealing with heap exhaustion. (parse_format_string): Likewise. Handle multiple grouping modifiers as does the standard printf. Handle the new leading zero --format modifier. (double_to_human): Use more defensive coding against overwriting stack buffers. Honor the leading zeros width. (usage): Mention the leading zero --format modifier. (main): Allow --padding in combo with a --format (width), as the number of leading zeros are useful independent of the main field width. * doc/coreutils.texi (numfmt invocation): Likewise. * tests/misc/numfmt.pl: Add new test cases. * NEWS: Mention the improvement.
Diffstat (limited to 'src/fold.c')
0 files changed, 0 insertions, 0 deletions