sort: revert recent -h changes and use a more-conservative approach
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2010 02:18:01 +0000 (19:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2010 02:21:02 +0000 (19:21 -0700)
commit94615d2acfdccbbeb8eb6f8931d0e252b05e1484
treebc4695eb84b4a2d66e2347f65a3fb9343ae658b4
parentabd040180e210e74448c42f094aab1769ca6c636
sort: revert recent -h changes and use a more-conservative approach

* NEWS: Document changes to sort -h, which are now minor with
respect to the pre-July-30th version.
* doc/coreutils.texi (sort invocation): Likewise.  The
documentation now describes how -h comparison is done rather than
being vague with border cases.
* src/sort.c (long_double, strtold): Move back to general_numcompare.
(LD, compute_human): Remove.
(find_unit_order): Remove THOU_SEP parameter, since thousands
separators are now allowed by all callers.  Revert to previous
behavior of sorting by suffix, and returning the order rather than
2 * order + binary, since we no longer care whether binary powers
are being used.  However, treat all zeros the same, instead of
sorting 0M before 0G; this is more consistent with the desired
behavior of sorting -1G before -1M.
* tests/misc/sort (h1, h3, h6): Adjust to match mostly-reverted
behavior.  However, check that all zeros sort together.
* tests/misc/sort-debug-keys: Omit a "_", since the trailing "i"
in "1234Gi" is no longer part of the key.
NEWS
doc/coreutils.texi
src/sort.c
tests/misc/sort
tests/misc/sort-debug-keys