<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/sort.c, branch v6.8</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v6.8</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2007-02-24T11:24:27Z</updated>
<entry>
<title>* NEWS: sort no longer compresses temporaries by default.</title>
<updated>2007-02-24T11:24:27Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2007-02-24T11:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3ea177e3fa5a42dfe01b63b4c854c3478a1ea60d'/>
<id>urn:sha1:3ea177e3fa5a42dfe01b63b4c854c3478a1ea60d</id>
<content type='text'>
* bootstrap.conf: Remove findprog.
* doc/coreutils.texi (sort invocation): The default is to not
compress.  Don't treat "" specially.
* src/sort.c: Don't include findprog.h.
(create_temp): Compress only if the user specified --compress-program.
* tests/misc/sort-compress: Adjusts tests to match new behavior.
</content>
</entry>
<entry>
<title>* NEWS: sort now uses a --compress-program option rather than</title>
<updated>2007-02-19T21:11:18Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2007-02-19T21:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c363fcb9f06cec38040cf4294521096aa70179d9'/>
<id>urn:sha1:c363fcb9f06cec38040cf4294521096aa70179d9</id>
<content type='text'>
an environment variable.
* doc/coreutils.texi (sort invocation): Document this.
* src/sort.c (usage): Likewise.
(COMPRESS_PROGRAM_OPTION): New const.
(long_options, create_temp, main): Support new option.
* tests/misc/sort-compress: Test it.
</content>
</entry>
<entry>
<title>* src/sort.c (create_temp): Remove superfluous access-X_OK</title>
<updated>2007-01-25T20:56:32Z</updated>
<author>
<name>Dan Hipschman</name>
<email>dsh@linux.ucla.edu</email>
</author>
<published>2007-01-25T20:56:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2d2a0c83116316f438ec8ca63f6860a0f4622b40'/>
<id>urn:sha1:2d2a0c83116316f438ec8ca63f6860a0f4622b40</id>
<content type='text'>
check.  find_in_path does this for us.
</content>
</entry>
<entry>
<title>Pass "make distcheck" again.</title>
<updated>2007-01-24T08:32:56Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2007-01-24T08:32:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a16f807d7ee7fe3e2fca65ce63f5e1889e9fbfb4'/>
<id>urn:sha1:a16f807d7ee7fe3e2fca65ce63f5e1889e9fbfb4</id>
<content type='text'>
* src/sort.c (usage): Split a diagnostic that had grown to be
longer than the C89 maximum of 509 bytes.
* .x-sc_cast_of_argument_to_free: New file.  Allow a cast in sort.c.
FIXME: this is just temporary, while we wait to remove the offending
access-calling code.
* Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
* Makefile.maint (sc_cast_of_argument_to_free): Use the
canonical, $$($(CVS_LIST_EXCEPT)).
* m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
</content>
</entry>
<entry>
<title>* NEWS: New option sort -C, proposed by XCU ERN 127, which looks</title>
<updated>2007-01-24T08:06:57Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2007-01-24T08:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a0b2bc8de7c1363f2fe85dd11d28d2b1e68c9d32'/>
<id>urn:sha1:a0b2bc8de7c1363f2fe85dd11d28d2b1e68c9d32</id>
<content type='text'>
like it will be approved.  Also add --check=quiet, --check=silent
as long aliases, and --check=diagnose-first as an alias for -c.
* doc/coreutils.texi (sort invocation): Document this.
Also, mention that sort -c can take at most one file.
* src/sort.c: Implement this.
Include argmatch.h.
(usage): Document the change.
(CHECK_OPTION): New constant.
(long_options): --check now takes an optional argument, and is now
treated differently from 'c'.
(check_args, check_types): New constant arrays.
(check): New arg CHECKONLY, which suppresses diagnostic if -C.
(main): Parse the new options.
* tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
New tests for -C.
</content>
</entry>
<entry>
<title>* NEWS: sort temp file compression: tweak wording.</title>
<updated>2007-01-23T23:22:45Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2007-01-23T23:22:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1f7d56fda5db9c5bd62eb9cc3ae543c00499a68f'/>
<id>urn:sha1:1f7d56fda5db9c5bd62eb9cc3ae543c00499a68f</id>
<content type='text'>
* src/sort.c (struct sortfile) [name]: Declare member to be const.
</content>
</entry>
<entry>
<title>* src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):</title>
<updated>2007-01-23T23:00:21Z</updated>
<author>
<name>Dan Hipschman</name>
<email>dsh@linux.ucla.edu</email>
</author>
<published>2007-01-23T23:00:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f33168da952e13e4ee99e1531ac41643b78addd4'/>
<id>urn:sha1:f33168da952e13e4ee99e1531ac41643b78addd4</id>
<content type='text'>
In pipe_fork callers, use these named constants, not "2" and "8".
(proctab, nprocs): Declare to be "static".
(pipe_fork) [lint]: Initialize local, pid,
to avoid unwarranted may-be-used-uninitialized warning.
(create_temp): Use the active voice.  Describe parameters, too.

2007-01-21  James Youngman  &lt;jay@gnu.org&gt;

Centralize all the uses of sigprocmask().  Don't restore an invalid
saved mask.
* src/sort.c (enter_cs, leave_cs): New functions for protecting
code sequences against signal delivery.
* (exit_cleanup): Use enter_cs and leave_cs instead of
calling sigprocmask directly.
(create_temp_file, pipe_fork, zaptemp): Likewise

2007-01-21  Dan Hipschman  &lt;dsh@linux.ucla.edu&gt;

Add compression of temp files to sort.
* NEWS: Mention this.
* bootstrap.conf: Import findprog.
* configure.ac: Add AC_FUNC_FORK.
* doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
variable.
* src/sort.c (compress_program): New global, holds the name of the
external compression program.
(struct sortfile): New type used by mergepfs and friends instead
of filenames to hold PIDs of compressor processes.
(proctab): New global, holds compressor PIDs on which to wait.
(enum procstate, struct procnode): New types used by proctab.
(proctab_hasher, proctab_comparator): New functions for proctab.
(nprocs): New global, number of forked but unreaped children.
(reap, reap_some): New function, wait for/cleanup forked processes.
(register_proc, update_proc, wait_proc): New functions for adding,
modifying and removing proctab entries.
(create_temp_file): Change parameter type to pointer to file
descriptor, and return type to pointer to struct tempnode.
(dup2_or_die): New function used in create_temp and open_temp.
(pipe_fork): New function, creates a pipe and child process.
(create_temp): Creates a temp file and possibly a compression
program to which we filter output.
(open_temp): Opens a compressed temp file and creates a
decompression process through which to filter the input.
(mergefps): Change FILES parameter type to struct sortfile array
and update access accordingly.  Use open_temp and reap_some.
(avoid_trashing_input, merge): Change FILES parameter like
mergefps and call create_temp instead of create_temp_file.
(sort): Call create_temp instead of create_temp_file.
Use reap_some.
(avoid_trashing_input, merge, sort, main): Adapt to mergefps.
</content>
</entry>
<entry>
<title>Standardize on list of signals when an app catches signals.</title>
<updated>2007-01-20T08:54:20Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2007-01-20T08:54:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bdbd5d31f810a33f4922d63b1852ab96a5fc4a01'/>
<id>urn:sha1:bdbd5d31f810a33f4922d63b1852ab96a5fc4a01</id>
<content type='text'>
* src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
* src/ls.c (main): Likewise (except SIGPIPE was already caught).
Note that ls.c is special, as it also catches SIGTSTP.
* src/sort.c (main): Likewise.  Also catch SIGQUIT.  More details in
&lt;http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510&gt;.
</content>
</entry>
<entry>
<title>* src/sort.c (cleanup): Clear temphead at the end.</title>
<updated>2007-01-19T22:03:18Z</updated>
<author>
<name>Dan Hipschman</name>
<email>dsh@linux.ucla.edu</email>
</author>
<published>2007-01-19T22:03:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e175f0d5b2fe8e46409a60472a90fc9ee3ec605b'/>
<id>urn:sha1:e175f0d5b2fe8e46409a60472a90fc9ee3ec605b</id>
<content type='text'>
(exit_cleanup): New function.
(main): Don't invoke atexit until we're ready.
Invoke it with exit_cleanup, not with cleanup and close_stdout,
to avoid a race condition with cleanup and signal handling.  More
details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
</content>
</entry>
<entry>
<title>Remove some arbitrary restrictions on size fields,</title>
<updated>2006-12-13T21:03:54Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-12-13T21:03:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ec95137cc376119f634610a7683a296fc7b78ea4'/>
<id>urn:sha1:ec95137cc376119f634610a7683a296fc7b78ea4</id>
<content type='text'>
so that commands like "sort -k 18446744073709551616" no longer fail merely
because 18446744073709551616 doesn't fit in uintmax_t.  The trick is that
these fields can all be treated as effectively infinity;  their exact
values don't matter, since no internal buffer can be that long.
* src/join.c (string_to_join_field): Verify that SIZE_MAX &lt;= ULONG_MAX
if the code assumes this.  Silently truncate too-large values to SIZE_MAX,
as the remaining code will do the right thing in this case.
* src/sort.c (parse_field_count): Likewise.
* src/uniq.c (size_opt, main): Likewise.
* tests/join/Test.pm (bigfield): New test.
* tests/sort/Test.pm (bigfield): New test.
* tests/uniq/Test.pm (121): New test.
Signed-off-by: Jim Meyering &lt;jim@meyering.net&gt;
</content>
</entry>
</feed>
