From 94615d2acfdccbbeb8eb6f8931d0e252b05e1484 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 2 Aug 2010 19:18:01 -0700 Subject: 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 | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 4e2cb3de1..46621735e 100644 --- a/NEWS +++ b/NEWS @@ -39,15 +39,9 @@ GNU coreutils NEWS -*- outline -*- sort -g now uses long doubles for greater range and precision. - sort -h no longer mishandles comparisons such as 5MiB vs 5MB, or - 6000K vs 5M. It uses floating-point arithmetic for these cases, - though, which means that the comparisons are not exact. This is not - a problem when sorting the output of df, du, and ls because this - output contains so few digits before suffixes. - - sort -h no longer rejects numbers ending in trailing "." or having - leading ".". It no longer accepts numbers with multiple "." or - numbers with thousands separators. + sort -h no longer rejects numbers with leading or trailing ".", and + no longer accepts numbers with multiple ".". It now considers all + zeros to be equal. sort now uses the number of available processors to parallelize the sorting operation. The number of sorts run concurrently can be -- cgit v1.2.3-70-g09d2