<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/sort.c, branch v8.26</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.26</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2016-10-16T18:28:39Z</updated>
<entry>
<title>maint: we use die; remove now-unnecessary uses of abort</title>
<updated>2016-10-16T18:28:39Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@fb.com</email>
</author>
<published>2016-10-16T18:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f8b8bbc1b97c9cb7a56aae79451bf87ab7307cd2'/>
<id>urn:sha1:f8b8bbc1b97c9cb7a56aae79451bf87ab7307cd2</id>
<content type='text'>
* src/expr.c (integer_overflow): Remove an abort-after-die.
* src/paste.c (write_error): Likewise.
* src/sort.c (badfieldspec): Likewise.
* src/tr.c (string2_extend): Likewise. Also remove a few
break statements, each after an abort.
</content>
</entry>
<entry>
<title>all: use die() rather than error(EXIT_FAILURE)</title>
<updated>2016-10-16T11:23:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-10-15T22:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=492dcb2eb191b844a2fd5e51db3eed85289bea1f'/>
<id>urn:sha1:492dcb2eb191b844a2fd5e51db3eed85289bea1f</id>
<content type='text'>
die() has the advantage of being apparent to the compiler
that it doesn't return, which will avoid warnings in some cases,
and possibly generate better code.
* cfg.mk (sc_die_EXIT_FAILURE): A new syntax check rule to
catch any new uses of error (CONSTANT, ...);
</content>
</entry>
<entry>
<title>sort: port to strict C + valgrind</title>
<updated>2016-09-08T02:51:12Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2016-09-08T02:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d47090d964d31bb4af9872525275372efd3bfdce'/>
<id>urn:sha1:d47090d964d31bb4af9872525275372efd3bfdce</id>
<content type='text'>
* bootstrap.conf (gnulib_modules): Add flexmember.
* src/sort.c: Include flexmember.h.
(struct tempnode): Make the last member flexible.
(create_temp_file): Port to strict C11/C99 rules for
allocation alignment with flexible array members.
</content>
</entry>
<entry>
<title>sort: with -h, disallow thousands separator between number and unit</title>
<updated>2016-07-18T21:24:26Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2016-07-18T17:04:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0f9fc7b3b9aee1d001ca60de1125e6e714e70ac7'/>
<id>urn:sha1:0f9fc7b3b9aee1d001ca60de1125e6e714e70ac7</id>
<content type='text'>
* src/sort.c (traverse_raw_number): Accept thousands separator only
if it is immediately followed by a digit.
* tests/misc/sort-h-thousands-sep.sh: Cover the fix for this bug.

Suggested by Pádraig Brady in http://bugs.gnu.org/24015
</content>
</entry>
<entry>
<title>sort: make -h work with -k and blank used as thousands separator</title>
<updated>2016-07-18T21:12:32Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2016-07-18T17:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dfbc945a562f870f6647672374c00d4f1ffb6097'/>
<id>urn:sha1:dfbc945a562f870f6647672374c00d4f1ffb6097</id>
<content type='text'>
* src/sort.c (traverse_raw_number): Allow to skip only one occurrence
of thousands_sep to avoid finding the unit in the next column in case
thousands_sep matches as blank and is used as column delimiter.
* tests/misc/sort-h-thousands-sep.sh: Add regression test for this bug.
* tests/local.mk: Reference the test.
* NEWS: Mention the bug fix.
Reported at https://bugzilla.redhat.com/1355780
Fixes http://bugs.gnu.org/24015
</content>
</entry>
<entry>
<title>maint: sort.c: deduplicate code for traversing numbers</title>
<updated>2016-07-18T21:09:07Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2016-07-18T17:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5cc804337b06d46a2fe34f018e26e8bb8148b117'/>
<id>urn:sha1:5cc804337b06d46a2fe34f018e26e8bb8148b117</id>
<content type='text'>
* src/sort.c (traverse_raw_number): New function for traversing numbers.
(find_unit_order): Use traverse_raw_number() instead of open-coding it.
(debug_key): Likewise.
</content>
</entry>
<entry>
<title>sort: modify 'leading spaces' debug warning scenarios</title>
<updated>2016-06-01T01:29:52Z</updated>
<author>
<name>Assaf Gordon</name>
<email>assafgordon@gmail.com</email>
</author>
<published>2016-06-01T00:19:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6223bf94bfeac75fb4252095864a80545ba00a0d'/>
<id>urn:sha1:6223bf94bfeac75fb4252095864a80545ba00a0d</id>
<content type='text'>
Print warning regardless of locale, avoid warning if key is zero width.
Problem reported by Karl Berry in http://bugs.gnu.org/23665 .

* src/sort.c: (key_warnings): change conditions for 'leading spaces'
warning.
* tests/misc/sort-debug-warn.sh: adjust tests accordingly.
</content>
</entry>
<entry>
<title>all: be less strict about usage if POSIX 2008</title>
<updated>2016-02-23T09:05:10Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2016-02-23T09:03:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a7f5d3d6d671bb4e9117b1f72971a19eed135fed'/>
<id>urn:sha1:a7f5d3d6d671bb4e9117b1f72971a19eed135fed</id>
<content type='text'>
sort, tail, and uniq now support traditional usage like 'sort +2'
and 'tail +10' on systems conforming to POSIX 1003.1-2008 and later.
* NEWS: Document this.
* doc/coreutils.texi (Standards conformance, tail invocation)
(sort invocation, uniq invocation, touch invocation):
Document new behavior, or behavior's dependence on POSIX 1003.1-2001.
* src/sort.c (struct keyfield.traditional_used):
Rename from obsolete_used, since implementations are now allowed
to support it.  All uses changed.
(main): Allow traditional usage if _POSIX2_VERSION is 200809.
* src/tail.c (parse_obsolete_option): Distinguish between
traditional usage (which POSIX 2008 and later allows) and obsolete
(which it still does not).
* src/uniq.c (strict_posix2): New function.
(main): Allow traditional usage if _POSIX2_VERSION is 200809.
* tests/misc/tail.pl: Test for new behavior.
</content>
</entry>
<entry>
<title>sort: with --debug, flag setlocale() failures on OpenBSD</title>
<updated>2016-01-14T01:26:00Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-01-14T01:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=611e7e02bff8898e622d6ad582a92f2de746b614'/>
<id>urn:sha1:611e7e02bff8898e622d6ad582a92f2de746b614</id>
<content type='text'>
Locale categories are not equivalent on OpenBSD,
and LC_COLLATE only supports "C" for example.
Now LC_ALL is supported to set multiple other categories
on OpenBSD, so setlocale(LC_ALL, "") returns a string
indicating which categories were updated and which ignored.
Therefore...

* src/sort.c (main): ...Call setlocale(LC_COLLATE, "")
to explicitly check whether a specified LC_ALL or
LC_COLLATE environment variable value is supported
for the LC_COLLATE category.  Also use !! to explicitly
convert to bool to support c89 systems where bool is an int,
and thus would get values &gt; 1.
Reported by Assaf Gordon.
</content>
</entry>
<entry>
<title>join,sort,uniq: with -z, treat '\n' as a field separator</title>
<updated>2016-01-13T10:59:18Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-01-12T16:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b2eadd109c3a508011705761dfe24a35180d925d'/>
<id>urn:sha1:b2eadd109c3a508011705761dfe24a35180d925d</id>
<content type='text'>
* NEWS: Mention the change in behavior.
* doc/coreutils.texi (newlineFieldSeparator): A new description,
referenced from ({join,sort,uniq} invocation).
* src/system.h (field_sep): A new inline function to determine
if a character is a field separator.
* src/join.c (usage): s/whitespace/blank/ to be more accurate
wrt which characters are field separators.
(xfields): s/isblank/field_sep/.
* src/sort.c (inittables): Likewise.
* src/uniq.c (find_field): Likewise.
* tests/misc/join.pl: Adjust -z test, and add a test/example
for processing the whole record with field processing.
* tests/misc/sort.pl: Add -z test cases, including case with '\n'.
* tests/misc/uniq.pl: Add -z -f test case with \n.
</content>
</entry>
</feed>
