numfmt: don't hardcode floating point limits
commit4f824b3f3658a941187a32c6d52ee758e4db5896
authorPádraig Brady <P@draigBrady.com>
Mon, 22 Jun 2015 03:19:48 +0000 (22 04:19 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 22 Jun 2015 16:22:04 +0000 (22 17:22 +0100)
treef2e2a0c1d852a5d74fe276a225d3a5e87717f2bd
parentbc9d16b79f4e8c25e13be63f846cfd7152b65da1
numfmt: don't hardcode floating point limits

* 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.
src/numfmt.c
tests/misc/numfmt.pl