<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/misc/numfmt.pl, branch v8.26</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.26</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2016-01-13T11:11:36Z</updated>
<entry>
<title>numfmt: add the -z,--zero-terminated option</title>
<updated>2016-01-13T11:11:36Z</updated>
<author>
<name>Assaf Gordon</name>
<email>assafgordon@gmail.com</email>
</author>
<published>2016-01-08T18:55:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=672663e1b0afd68a10d991527fd5021c40c99acc'/>
<id>urn:sha1:672663e1b0afd68a10d991527fd5021c40c99acc</id>
<content type='text'>
* doc/coreutils.texi (numfmt invocation): Reference the description.
* src/numfmt.c: Parameterize '\n' references.
* tests/misc/numfmt.pl: Add tests for character and field processing.
* NEWS: Mention the new feature.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2016-01-01T14:10:41Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-01-01T14:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b16e999f553b682e74e0a56750f649da05130c4f'/>
<id>urn:sha1:b16e999f553b682e74e0a56750f649da05130c4f</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>numfmt: use new set-fields module to parse --field</title>
<updated>2015-09-12T02:27:32Z</updated>
<author>
<name>Assaf Gordon</name>
<email>assafgordon@gmail.com</email>
</author>
<published>2015-07-18T03:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ba24c42e139095888dbf83255e6481fb4b1503a6'/>
<id>urn:sha1:ba24c42e139095888dbf83255e6481fb4b1503a6</id>
<content type='text'>
numfmt --field=LIST can accept the same options as cut.

* bootstrap.conf: remove xlist, linked-list
* src/local.mk: link numfmt with set-fields
* src/numfmt.c: use set-fields.c instead of custom field parsing code.
  (include_field): adapt to new code.
* tests/misc/numfmt.pl: add new tests, adapt current tests to new
  error message wording from set-fields.c
</content>
</entry>
<entry>
<title>tests: avoid false failures on OpenBSD 5.7</title>
<updated>2015-07-02T18:15:08Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-07-02T12:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=970b89170206779e028fce6a28f0924c7e47bfd1'/>
<id>urn:sha1:970b89170206779e028fce6a28f0924c7e47bfd1</id>
<content type='text'>
* tests/du/threshold.sh: Homogenize getopt error messages.
* tests/misc/numfmt.pl: Likewise.
* tests/mv/i-3.sh: Skip on *BSD not just FreeBSD.
</content>
</entry>
<entry>
<title>numfmt: don't hardcode floating point limits</title>
<updated>2015-06-22T16:22:04Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-06-22T03:19:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4f824b3f3658a941187a32c6d52ee758e4db5896'/>
<id>urn:sha1:4f824b3f3658a941187a32c6d52ee758e4db5896</id>
<content type='text'>
* src/numfmt.c (MAX_UNSCALED_DIGITS): Set this to LDBL_DIG
rather than hardcoding at 18 for better portability.
* tests/misc/numfmt.pl: Restrict limit tests to supported platforms.
</content>
</entry>
<entry>
<title>numfmt: handle leading zeros correctly</title>
<updated>2015-06-22T01:21:02Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-06-22T01:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bc9d16b79f4e8c25e13be63f846cfd7152b65da1'/>
<id>urn:sha1:bc9d16b79f4e8c25e13be63f846cfd7152b65da1</id>
<content type='text'>
* src/numfmt.c (simple_strtod_int): Don't count leading zeros
as significant digits.  Also have leading zeros as optional
for floating point numbers.
* tests/misc/numfmt.pl: Add test cases.
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>numfmt: avoid integer overflow when rounding</title>
<updated>2015-06-22T01:02:05Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-06-21T03:04:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a3c3e1e9e6d2d953692f1eb24efa9ac7c7448044'/>
<id>urn:sha1:a3c3e1e9e6d2d953692f1eb24efa9ac7c7448044</id>
<content type='text'>
Due to existing limits this is usually triggered
with an increased precision.  We also add further
restrictions to the output of increased precision numbers.

* src/numfmt.c (simple_round): Avoid intmax_t overflow.
(simple_strtod_int): Count digits consistently
for precision loss and overflow detection.
(prepare_padded_number): Include the precision
when excluding numbers to output, since the precision
determines the ultimate values used in the rounding scheme
in double_to_human().
* tests/misc/numfmt.pl: Add previously failing test cases.
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>numfmt: support user specified output precision</title>
<updated>2015-06-21T03:16:29Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-06-19T18:18:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0a279f619055cc165bb3cfa3bb737cdd28ed4d70'/>
<id>urn:sha1:0a279f619055cc165bb3cfa3bb737cdd28ed4d70</id>
<content type='text'>
* src/numfmt.c (usage): Update the --format description
to indicate precision is allowed.
(parse_format_string): Parse a precision specification
like the standard printf does.
(double_to_human): Honor the precision in --to mode.
* tests/misc/numfmt.pl: New tests.
* doc/coreutils.texi (numfmt invocation): Mention the new feature.
* NEWS: Likewise.
</content>
</entry>
<entry>
<title>numfmt: implement support for field ranges</title>
<updated>2015-06-19T18:59:21Z</updated>
<author>
<name>Dylan Cali</name>
<email>calid1984@gmail.com</email>
</author>
<published>2014-09-05T09:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=71063bc858cd927e3622b511297e66b3e13f7453'/>
<id>urn:sha1:71063bc858cd927e3622b511297e66b3e13f7453</id>
<content type='text'>
* src/numfmt.c: Replace field handling code with logic that understands
field range specifiers.  Instead of processing a single field and
printing line prefix/suffix around it, process each field in the line
checking whether it has been included for conversion.  If so convert and
print, otherwise just print the unaltered field.
(extract_fields): Removed.
(skip_fields): Removed.
(process_line): Gutted and heavily reworked.
(process_suffixed_number): FIELD is now passed as an arg instead of
using a global.
(parse_field_arg): New function that parses field range specifiers.
(next_field): New function that returns pointers to the next field in
a line.
(process_field): New function that wraps the field conversion logic
(include_field): New function that checks whether a field should be
converted
(compare_field): New function used for field value comparisons in a
gl_list.
(free_field): New function used for freeing field values in a gl_list.
Global variable FIELD removed.
New global variable all_fields indicates whether all fields should be
processed.
New global variable all_fields_after stores the first field of a N-
style range.
New global variable all_fields_before stores the last field of a -M
style range.
New global variable field_list stores explicitly specified fields to
process (N N,M or N-M style specifiers).
(usage): Document newly supported field range specifiers.
* bootstrap.conf: Include xlist and linked-list modules.  numfmt now
uses the gl_linked_list implementation to store the field ranges.
* tests/misc/numfmt.pl: Add tests for 'cut style' field ranges.
Adjust existing tests as partial output can occur before an error
Remove test for the 'invalid' field -5.. this is now a valid range.
* gnulib: update to avoid compiler warnings in linked-list.
* NEWS: Mention the new feature.
</content>
</entry>
<entry>
<title>numfmt: handle suffixes consistently with --{from,to}-unit</title>
<updated>2015-06-19T13:50:34Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2015-06-15T02:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6fadd46acd5b813b545b58014ddd591ffdb5a41c'/>
<id>urn:sha1:6fadd46acd5b813b545b58014ddd591ffdb5a41c</id>
<content type='text'>
* src/numfmt.c (unit_to_umax): Support SI (power of 10) suffixes
with the --from-unit and --to-unit options.  Treat suffixes like
is done with --from=auto, which for example will change the meaning
of --to-unit=G to that of --to-unit=Gi.  The suffix support was
previously undocumented and it's better to avoid the traditional
coreutils suffix handling in numfmt by default.
* doc/coreutils.texi: Document the new behavior.  Also fix a typo
mentioning {from,to}=units=.
* tests/misc/numfmt.pl: Adjust accordingly.
* NEWS: Mention the change in behavior.
</content>
</entry>
</feed>
