Hello,

Attached is an updated version of 'numfmt' .
(The patch should be compatible with "git am").

Most of the previously raised issues have been addressed, except handling 
locale'd grouping in the input numbers (locale'd decimal-point is handled 
correctly).

Added support for header, auto-whitespace-padding, floating-point input .
Internally, all values are now stored as "long double" (instead of previously 
uintmax_t) - enables working with Yotta-scale values.

The following should now 'just work' :
    df | ./src/numfmt --header --field 2 --to=si
    ls -l | ./src/numfmt --header --field 5 --to=iec
    ls -lh | ./src/numfmt --header --field 5 --from=iec --padding=10

The "--debug" option now behaves more like sort's "--debug": prints messages to 
STDERR about possible bad combinations and inputs (which are not fatal errors):

    $./src/numfmt --debug 60000
    ./src/numfmt: no conversion option specified
    60000

The "--devdebug" option can be used to show internal states (perhaps will be 
removed once the program is finalized?).

The test file 'tests/misc/numfmt.pl' contains many more tests and details about 
possible inputs/outputs.

If the functionality is acceptable, the next steps are cleaner code and better 
documentations.

Comments are welcomed,
  -gordon

Attachment: numfmt.7.patch.gz
Description: GNU Zip compressed data

Reply via email to