From 03f6f32c416e4bca1cfe66fe85834a91636f499d Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 11 May 2010 18:46:21 +0100 Subject: sort: --debug: output data independent warnings and info * src/sort.c (usage): Mention --debug can output warnings to stderr. Also split the translatable string to aid translation. (default_key_compare): A new function refactored from main(), and now also called from the new key_warnings() function. (key_to_opts): A new function refactored from incompatible_options(), and now also called from the new key_warnings() function. (key_numeric): A new function refactored to test if key is numeric. (key_warnings): A new function to output warnings to stderr, about questionable use of various options. Currently it warns about zero length keys and ineffective global options. (incompatible_options): Refactor out key_to_opts() (main): Use key_init() to initialize gkey. Refactor out default_key_compare(). Call key_warnings() in debug mode. * doc/coreutils.texi (sort invocation): Mention that warnings are output by --debug. * tests/misc/sort-debug-warn: A new test for debug warnings. * tests/Makefile.am: Reference the new test. * NEWS: Mention the new feature --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 4c2da67f1..5d7b81f97 100644 --- a/NEWS +++ b/NEWS @@ -5,7 +5,7 @@ GNU coreutils NEWS -*- outline -*- ** New features sort now accepts the --debug option, to highlight the part of the - line significant in the sort. + line significant in the sort, and warn about questionable options. ** Changes in behavior -- cgit v1.2.3-70-g09d2