comm: ensure that input files are sorted
authorBo Borgerson <gigabo@gmail.com>
Mon, 21 Apr 2008 01:24:16 +0000 (21:24 -0400)
committerJim Meyering <meyering@redhat.com>
Thu, 12 Jun 2008 17:38:43 +0000 (19:38 +0200)
commit98a96822d9dac92de719fa340fe326e1fe0427fe
treeb34410f3fa4b6053fae1d1934d666aeb8b63b06e
parent5f47278372465f15b13803cd5a1702c264a95fdf
comm: ensure that input files are sorted

* NEWS: List new behavior.
* doc/coreutils.texi (checkOrderOption) New macro for
describing `--check-order' and `--nocheck-order', used in
both join and comm.
* src/comm.c (main): Initialize new options.
(usage): Describe new options.
(compare_files): Keep an extra pair of buffers for the previous
line from each file to check the internal order.
(check_order): If an order-check is required, compare and handle
the result appropriately.
(copylinebuffer): Copy a linebuffer; used for copy before read.
* tests/misc/Makefile.am: List new test.
* tests/misc/comm: Tests for the comm program, including the
new order-checking functionality and attendant command-line options.
NEWS
doc/coreutils.texi
src/comm.c
tests/Makefile.am
tests/misc/comm [new file with mode: 0755]