head	1.2;
access;
symbols
	RELENG_8_4:1.2.0.2
	RELENG_9_1_0_RELEASE:1.1.1.4
	RELENG_9_1:1.1.1.4.0.48
	RELENG_9_1_BP:1.1.1.4
	RELENG_8_3_0_RELEASE:1.1.1.4
	RELENG_8_3:1.1.1.4.0.46
	RELENG_8_3_BP:1.1.1.4
	RELENG_9_0_0_RELEASE:1.1.1.4
	RELENG_9_0:1.1.1.4.0.44
	RELENG_9_0_BP:1.1.1.4
	RELENG_9:1.1.1.4.0.42
	RELENG_9_BP:1.1.1.4
	RELENG_7_4_0_RELEASE:1.1.1.4
	RELENG_8_2_0_RELEASE:1.1.1.4
	RELENG_7_4:1.1.1.4.0.40
	RELENG_7_4_BP:1.1.1.4
	RELENG_8_2:1.1.1.4.0.38
	RELENG_8_2_BP:1.1.1.4
	RELENG_8_1_0_RELEASE:1.1.1.4
	RELENG_8_1:1.1.1.4.0.36
	RELENG_8_1_BP:1.1.1.4
	RELENG_7_3_0_RELEASE:1.1.1.4
	RELENG_7_3:1.1.1.4.0.34
	RELENG_7_3_BP:1.1.1.4
	RELENG_8_0_0_RELEASE:1.1.1.4
	RELENG_8_0:1.1.1.4.0.32
	RELENG_8_0_BP:1.1.1.4
	RELENG_8:1.1.1.4.0.30
	RELENG_8_BP:1.1.1.4
	RELENG_7_2_0_RELEASE:1.1.1.4
	RELENG_7_2:1.1.1.4.0.28
	RELENG_7_2_BP:1.1.1.4
	RELENG_7_1_0_RELEASE:1.1.1.4
	RELENG_6_4_0_RELEASE:1.1.1.4
	RELENG_7_1:1.1.1.4.0.26
	RELENG_7_1_BP:1.1.1.4
	RELENG_6_4:1.1.1.4.0.24
	RELENG_6_4_BP:1.1.1.4
	RELENG_7_0_0_RELEASE:1.1.1.4
	RELENG_6_3_0_RELEASE:1.1.1.4
	RELENG_7_0:1.1.1.4.0.22
	RELENG_7_0_BP:1.1.1.4
	RELENG_6_3:1.1.1.4.0.20
	RELENG_6_3_BP:1.1.1.4
	RELENG_7:1.1.1.4.0.18
	RELENG_7_BP:1.1.1.4
	RELENG_6_2_0_RELEASE:1.1.1.4
	RELENG_6_2:1.1.1.4.0.16
	RELENG_6_2_BP:1.1.1.4
	RELENG_5_5_0_RELEASE:1.1.1.4
	RELENG_5_5:1.1.1.4.0.14
	RELENG_5_5_BP:1.1.1.4
	RELENG_6_1_0_RELEASE:1.1.1.4
	RELENG_6_1:1.1.1.4.0.12
	RELENG_6_1_BP:1.1.1.4
	RELENG_6_0_0_RELEASE:1.1.1.4
	RELENG_6_0:1.1.1.4.0.10
	RELENG_6_0_BP:1.1.1.4
	RELENG_6:1.1.1.4.0.8
	RELENG_6_BP:1.1.1.4
	RELENG_5_4_0_RELEASE:1.1.1.4
	RELENG_5_4:1.1.1.4.0.6
	RELENG_5_4_BP:1.1.1.4
	RELENG_5_3_0_RELEASE:1.1.1.4
	RELENG_5_3:1.1.1.4.0.4
	RELENG_5_3_BP:1.1.1.4
	RELENG_5:1.1.1.4.0.2
	RELENG_5_BP:1.1.1.4
	SORT_20040812:1.1.1.4
	SORT_v5_2_1:1.1.1.3
	RELENG_5_2_1_RELEASE:1.1.1.2
	RELENG_5_2_0_RELEASE:1.1.1.2
	RELENG_5_2:1.1.1.2.0.2
	RELENG_5_2_BP:1.1.1.2
	SORT_v2_1:1.1.1.2
	RELENG_5_1_0_RELEASE:1.1.1.1
	RELENG_5_1:1.1.1.1.0.4
	RELENG_5_1_BP:1.1.1.1
	RELENG_5_0_0_RELEASE:1.1.1.1
	RELENG_5_0:1.1.1.1.0.2
	RELENG_5_0_BP:1.1.1.1
	SORT_v2_0_21:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2012.10.13.18.40.39;	author gabor;	state dead;
branches
	1.2.2.1;
next	1.1;

1.1
date	2002.06.08.07.47.22;	author ache;	state Exp;
branches
	1.1.1.1;
next	;

1.2.2.1
date	2012.10.13.18.40.39;	author svnexp;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2013.03.28.13.01.11;	author svnexp;	state Exp;
branches;
next	;

1.1.1.1
date	2002.06.08.07.47.22;	author ache;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2003.08.30.14.05.54;	author ache;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2004.07.02.09.18.03;	author tjr;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2004.08.12.05.37.15;	author tjr;	state Exp;
branches;
next	;


desc
@@


1.2
log
@SVN rev 241511 on 2012-10-13 18:40:39Z by gabor

- Remove GNU sort and the WITH_GNU_SORT knob
@
text
@2002-02-18  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.21.

	* tests/tail/Test.pm: For tests matching /^(obs|err-[134])/,
	put _POSIX2_VERSION=199209 in the environment, so the tests succeed
	even when the environment would have contained _POSIX2_VERSION=200112.
	* tests/uniq/Test.pm (test_vector): Rename tests of obsolete usage
	to have prefix of `obs'.  Adjust environment for those tests as above.

	* tests/mk-script: When getting input via a pipe, apply the
	environment settings to the command in question, not to `cat'.
	No longer allow more than one element in the $Test::env or
	$Test::env_default arrays.  No caller used that feature.

2002-02-17  Jim Meyering  <meyering@@lucent.com>

	* tests/head/Test.pm: Accept pre-POSIX 1003.1-2001 options.
	* tests/pr/Test.pm: Likewise.
	* tests/sort/Test.pm: Likewise.

	* Makefile.cfg (wget_files): Reflect new location of these files.

2002-02-16  Jim Meyering  <meyering@@lucent.com>

	* ABOUT-NLS, intl/*: Update to Gettext 0.11.
	* INSTALL: Update to Autoconf 2.52h.

	* src/Makefile.am (datadir): Use `share' in place of @@DATADIRNAME@@,
	per Gettext-0.11.
	(LDADD): Use @@LIBINTL@@ instead of @@INTLLIBS@@, per Gettext-0.11.

	* configure.ac (AC_CONFIG_AUX_DIR): New macro invocation.
	(ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11.

	* config: New subdirectory, containing the following files from .:
	config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs.
	Move the following files here from doc: texinfo.tex, mdate-sh.

2002-02-15  Paul Eggert  <eggert@@twinsun.com>

	Add support for _POSIX2_VERSION, which lets you pick which POSIX
	version you want the utilities to conform to.  Remove warnings about
	failure to conform to a future POSIX version.

	* NEWS, doc/coreutils.texi: Document _POSIX2_VERSION.
	* doc/coreutils.texi (Standards Conformance): New section.

	* src/expand.c: Include posixver.h.
	(usage): Document only the intersection of the old and new behaviors,
	to encourage portability.
	* src/fold.c: Likewise.
	* src/head.c: Likewise.
	* src/od.c: Likewise.
	* src/pr.c: Likewise.
	* src/sort.c: Likewise.
	* src/split.c: Likewise.
	* src/uniq.c: Likewise.
	* src/tail.c: Likewise.
	* src/unexpand.c: Likewise.

	* src/expand.c (shortopts): Remove; no longer needed.
	* src/od.c (short_options): Likewise.
	* src/pr.c (short_options): Likewise.
	* src/sort.c (short_options): Likewise.
	* src/split.c (shortopts): Likewise.
	* src/uniq.c (shortopts): Likewise.
	* src/unexpand.c (shortopts): Likewise.

	* src/od.c (COMMON_SHORT_OPTIONS): New macro.
	* src/pr.c (COMMON_SHORT_OPTIONS): Likewise.
	* src/sort.c (COMMON_SHORT_OPTIONS): Likewise.

	* src/expand.c (main): Revert to previous behavior, except report
	an error and exit if the obsolete syntax is used and if conforming
	to the new standard.
	* src/fold.c (main): Likewise.
	* src/head.c (main): Likewise.
	* src/split.c (main): Likewise.
	* src/uniq.c (main): Likewise.
	* src/tail.c (main, parse_obsolescent_option): Likewise.
	* src/unexpand.c (main): Likewise.

	* src/od.c (STRINGS_OPTION, WIDTH_OPTION): Remove; no longer needed.
	All uses changed back to the corresponding short options.
	* src/pr.c (SEP_STRING_OPTION): Likewise.

	* src/od.c (main): Parse options using POSIX 1003.1-2001 rules if
	conforming to that standard.  Do not warn of obsolete options.
	* src/pr.c (main): Likewise.
	* src/sort.c (main): Likewise.

	* src/system.h (_POSIX2_VERSION, POSIX2_VERSION): Remove definitions.
	(OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): Likewise.

2002-02-16  Jim Meyering  <meyering@@lucent.com>

	* tests/misc/split-a: New test for change of 2002-02-05.
	* tests/misc/Makefile.am (TESTS): Add split-a.

2002-02-12  Jim Meyering  <meyering@@lucent.com>

	* src/split.c (DEFAULT_SUFFIX_LENGTH): Define constant.
	(suffix_length): Use it here.
	(usage): Use it here.

2002-02-05  Paul Eggert  <eggert@@twinsun.com>

	Change 'split' to conform to POSIX.  It now accepts an -a or
	--suffix-length option, and refuses to generate more files
	than there are suffixes.

	* NEWS, doc/coreutils.texi: Document this.
	* src/split.c: Include "dirname.h".
	(outbase): Now a global var.
	(outfile_end): Remove.
	(suffix_length): New var.
	(shortopts, longopts, main): Add -a or --suffix-length.
	(next_file_name): Implement -a.  Do not extend the suffix length.
	Check for file names that are too long.
	(main): Move outfile initialization to next_file_name.

	* src/split.c (shortopts): Remove -v (a typo).

2002-02-11  Jim Meyering  <meyering@@lucent.com>

	* tests/misc/head-pos: New file/test for the change of 2002-02-08.
	* tests/misc/Makefile.am (TESTS): Add head-pos.

	* src/tr.c (unquote): Make comment a little clearer.

2002-02-08  Paul Eggert  <eggert@@twinsun.com>

	* src/head.c (head_lines): If we have read too much data, try
	to seek back to the position we would have gotten to had we
	been reading one byte at a time.  POSIX currently doesn't
	require this, but it's easy to do and some software relies on it.

2002-02-02  Jim Meyering  <meyering@@lucent.com>

	* src/uniq.c (main): Prepend `warning: ' to the diagnostic, so it's
	consistent with all of the other `... is obsolete...' diagnostics.

2002-01-31  Paul Eggert  <eggert@@twinsun.com>

	Add more support for POSIX 1003.1-2001, which requires removal for
	support of obsolete "-N" option syntax in expand, head, fold,
	split, tail, unexpand, uniq, and which prohibits options with
	optional arguments in od and pr.

	* NEWS: Document this.
	* doc/coreutils.texi: Likewise.
	* src/expand.c (usage): Likewise.
	* src/fold.c (usage): Likewise.
	* src/head.c (usage): Likewise.
	* src/od.c (usage): Likewise.
	* src/pr.c (usage): Likewise.
	* src/split.c (usage): Likewise.
	* src/unexpand.c (usage): Likewise.
	* src/uniq.c (usage): Likewise.

	* NEWS: Improve doc for previous fix in this area.

	* src/expand.c (shortopts): New constant.
	* src/od.c (short_options): Likewise.
	* src/pr.c (short_options): Likewise.
	* src/sort.c (short_options): Likewise.
	* src/split.c (shortopts): Likewise.
	* src/unexpand.c (shortopts): Likewise.
	* src/uniq.c (shortopts): Likewise.

	* src/expand.c (main): Check for obsolete options.
	* src/fold.c (main): Likewise.
	* src/head.c (main): Likewise.
	* src/od.c (main): Likewise.
	* src/pr.c (main): Likewise.
	* src/sort.c (main): Likewise.
	* src/split.c (main): Likewise.
	* src/tail.c (parse_obsolescent_option, main): Likewise.
	* src/unexpand.c (main): Likewise.
	* src/uniq.c (main): Likewise.

	* src/head.c (header_mode_option): New constant.

	* src/od.c: New enum for long options.

	* src/pr.c (SEP_STRING_OPTION): New enum value.
	(long_options): Use it.

	* src/split.c (main): Use -1, not EOF, for getopt_long.

	* src/system.h (OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): New macros.

	* src/fold.c (main): Fix bug: -- -N was treated as -N --.

2002-02-01  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (start_lines): Handle the case in which bytes_read is zero.

2002-01-28  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint (ac-check): Remove, now that we no longer have
	to duplicate that information.
	(local-check): Remove ac-check.

	* Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5d.

	* configure.ac (AM_INIT_AUTOMAKE): Use zero-arg form of this macro.
	(ALL_LINGUAS): Add the bokml dialect of Norwegian (nb).

2002-01-27  Jim Meyering  <meyering@@lucent.com>

	tail -n +2 would perform an extra read after encountering EOF
	* src/tail.c (start_lines): Detect EOF, inform caller.
	(tail_lines): Upon EOF in start_lines, return immediately.

2002-01-22  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.20.

2002-01-22  Paul Eggert  <eggert@@twinsun.com>

	* src/od.c (skip): Remove redundant check for overflow.
	fseeko's seek argument is already known to be in range,
	since it is less than the file size.

2002-01-22  Jim Meyering  <meyering@@lucent.com>

	* po/POTFILES.in: Add lib/xmemcoll.c.

2002-01-22  Paul Eggert  <eggert@@twinsun.com>

	* src/tac.c (save_stdin): Report proper errno value after
	fwrite failures.  Do not bother to rewind the temp file, as
	it'll be read backwards anyway.

2002-01-22  Paul Eggert  <eggert@@twinsun.com>

	* src/ptx.c (swallow_file_in_memory): Work even if `open' returns 0.
	Check for `close' error.

2002-01-22  Paul Eggert  <eggert@@twinsun.com>

	Port to glibc 2.2.5, whose mmap stdio positions the underlying
	file descriptor at a nonzero offset after an fopen.

	* m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
	* src/od.c (skip): Use fseeko rather than lseek.
	(Also, check for overflow when converting uintmax_t to off_t.)
	* src/sys2.h (EOVERFLOW, fseeko): New macros.

2001-01-21  Paul Eggert  <eggert@@twinsun.com>

	* src/comm.c: Include xmemcoll.h, not memcoll.h.
	Use xmemcoll instead of memcoll.
	* src/join.c: Likewise.
	* src/sort.c: Likewise.

	* src/sort.c (die): Do not invoke cleanup; atexit does this now.
	(main): Use atexit to invoke cleanup on exit.
	Set xmemcoll_exit_failure to SORT_FAILURE.

2002-01-20  Paul Eggert  <eggert@@twinsun.com>

	* src/comm.c (compare_files): Don't assume that the difference
	between two size_t values can be stored in an int; this doesn't
	work, for example, on 64-bit Solaris.
	* src/sort.c (CMP_WITH_IGNORE): Likewise.
	* src/join.c (keycmp): Likewise.  Also, fix the type of two locals
	to be size_t instead of int.

2002-01-20  Paul Eggert  <eggert@@twinsun.com>

	* src/csplit.c: Don't include "xalloc.h", as system.h already
	does that via sys2.h.
	* src/sort.c: Likewise.

2002-01-19  Jim Meyering  <meyering@@lucent.com>

	* configure.ac: Remove code that set LIBOBJS in support of ansi2knr.
	The latest version of autoconf objected to it, and besides, I don't
	care too much about K&R support these days.

2002-01-18  Jim Meyering  <meyering@@lucent.com>

	Fix tr so it no longer gets a failed assertion for [::] or [==].

	* src/tr.c (xmemdup): Rename from `substr' and rewrite to
	take only pointer/length parameters.
	(build_spec_list): Update sole caller.
	Properly diagnose the invalid specs [::] and [==].
	Pawel Prokop reported that `tr '[::]' x' elicits a failed assertion.
	* tests/tr/Test.pm: Add tests for the above fix.

2002-01-14  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (main):  Issue a warning for obsolete usage, unless
	POSIXLY_CORRECT.
	* src/tail.c (parse_obsolescent_option): Likewise.
	* src/uniq.c (main): Likewise.

2002-01-14  Paul Eggert  <eggert@@twinsun.com>

	Add support for POSIX 1003.1-2001, which requires removal for
	support of obsolete "+" option syntax in sort, tail, and uniq.

	* NEWS: Document this.

	* src/sort.c (usage, main): Implement this.
	* src/tail.c (usage, parse_obsolescent_option): Likewise.
	* src/uniq.c (usage, main): Likewise.
	* src/system.h (_POSIX2_VERSION, POSIX2_VERSION): New macros.

	* src/sys2.h (ISDIGIT, S_ISVTX, S_IXUGO): Comment fix.

2002-01-14  Jim Meyering  <meyering@@lucent.com>

	* tests/misc/sort: New test, for just-fixed bug.
	* tests/misc/Makefile.am (TESTS): Add sort.
	(TESTS_ENVIRONMENT): Add PROG=$$tst.  This is a gross kludge
	that depends on the name of an automake-generated local variable.

2002-01-13  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (mergefps): Fix bug when eliminating empty files.
	Bug reported by James Hutt.

2002-01-13  Jim Meyering  <meyering@@lucent.com>

	* tests/help-version: Tweak to work with the programs in diffutils.

2002-01-09  Jim Meyering  <meyering@@lucent.com>

	* configure.in (ALL_LINGUAS): Add Turkish (tr).

2001-12-18  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (usage, specify_sort_size): Accept 'K' (which is
	now preferred, as it connotes 1024) as well as 'k'.
	* NEWS: Document this change.

2001-12-17  Jim Meyering  <meyering@@lucent.com>

	* src/uniq.c (usage): Remove stray `)' in --help output.
	Reported by Padraig Brady.

	* Makefile.maint (real_dir): Remove unused variable.
	(url_dir_list): Don't set define it here, but...
	* Makefile.cfg (url_dir_list): ...define it here instead.
	(hosts, a_host, b_host): Remove now-unused variables.
	(alpha_subdir, a_url_dir, b_url_dir): Remove now-unused variables.

2001-12-12  Bruno Haible  <bruno@@clisp.org>
            Paul Eggert  <eggert@@twinsun.com>

	* src/wc.c (wc): Use ISSPACE and iswspace in addition to hard-coding
	the ASCII space character.

2001-12-08  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.19.

	* Makefile.cfg (wget_files): Remove ansi2knr.c, since it's
	no longer available at that location.

2001-12-03  Jim Meyering  <meyering@@lucent.com>

	* src/od.c, src/tail.c, src/tr.c (usage): I will not split translatable
	strings in the middle of a sentence.  I will not split translatable
	strings in the middle of a sentence.  I will not split translatable
	strings in the middle of a sentence.  ...
	* src/join.c (usage): Merge lone "\n" into adjacent string.
	* src/md5sum.c (usage): Likewise.
	* src/paste.c (usage): Likewise.
	Reported by Karl Eichwalder.

2001-12-02  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint (emit-upload-commands): Fix typo: s/distdir/PACKAGE/.

2001-12-01  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.18.

	* Makefile.maint (po-check): Check for uses of _() not just in .c
	files, but also in .h files.

	Ideally, there would be just one translation for all --help
	and --version description strings.  Before this change, they
	differed only in the number of blanks between the option name
	and the description.  Someday gettext may be smart enough
	to merge such strings and to reconstruct the proper spacing at
	run time.  In the mean time, now there is one string for each,
	and those descriptions in the --help output are no longer aligned
	with the others.
	* src/sys2.h (HELP_OPTION_DESCRIPTION): New macro.
	(VERSION_OPTION_DESCRIPTION): New macro.
	* src/cat.c, src/cksum.c, src/comm.c, src/csplit.c, src/cut.c:
	* src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/join.c:
	* src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c, src/ptx.c:
	* src/sort.c, src/split.c, src/sum.c, src/sys2.h, src/tac.c:
	* src/tail.c, src/tr.c, src/tsort.c, src/unexpand.c, src/uniq.c:
	* src/wc.c (usage): Use new macros, HELP_OPTION_DESCRIPTION and
      	VERSION_OPTION_DESCRIPTION instead of hard-coding --help and
	--version descriptions.
	* po/POTFILES.in: Add src/sys2.h.

2001-11-27  Jim Meyering  <meyering@@lucent.com>

	* src/system.h (SET_MODE) [O_BINARY]: Call setmode, not set_mode.
	From Matthew Smith.

2001-11-26  Jim Meyering  <meyering@@lucent.com>

	* src/cat.c (cat): Don't test whether the full_write return value
	(of type size_t) is less than 0.  Reported by Nelson H. F. Beebe,
	as a warning from Irix 6.5's C compiler.

2001-11-25  Jim Meyering  <meyering@@lucent.com>

	* src/cksum.c (usage): Indent --help and --version strings to
	start in the 7th column.
	* src/pr.c (usage): Likewise.

2001-11-23  Jim Meyering  <meyering@@lucent.com>

	Factor out some common strings to make translation easier.

	* cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fmt.c, fold.c:
	* head.c, join.c, md5sum.c, nl.c, od.c, paste.c, pr.c, ptx.c:
	* sort.c, split.c, sum.c, tac.c, tail.c, tr.c, tsort.c, unexpand.c:
	* uniq.c, wc.c: Split usage strings so that --help and --version
	descriptions are alone in their own string.
	Likewise for the one that says ``Mandatory arguments to long
	options are mandatory for short options too.''
	Suggestion from Karl Eichwalder.

	* src/ptx.c (main): Don't split copyright string in the middle
	of a sentence.

2001-11-22  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.17.

	csplit could get a failed assertion: printf 'a\n\n'|csplit - '/^$/' 2
	* src/csplit.c: No longer include assert.h.
	(process_line_count): Remove invalid assertion.  The test that caused
	the failure has been in the code since before 1992-11-08, but since
	1996 it's been in an assertion.  That assertion was disabled by default
	until textutils-1.22g (1999-01-10).  Reported by Eric Pemente.

	* tests/misc/csplit: New file.  Test for the above fix and others.
	* tests/misc/Makefile.am (TESTS): Add csplit.
	* tests/Makefile.am (EXTRA_DIST): Add lang-default.

2001-11-19  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (xlseek): New function.
	Call it instead of lseek, in most cases, so any failure is reported.

2001-11-18  Jim Meyering  <meyering@@lucent.com>

	* config.sub: Update from master repository.
	* config.guess: Likewise.

2001-11-17  Jim Meyering  <meyering@@lucent.com>

	* Makefile.cfg ($(srcdir)/m4/jm-glibc-io.m4): Use $(move_if_change),
	not the literal `move-if-change'.

	* src/tail.c (tail_forever): Add a cast.

	Avoid compiler warnings.
	* src/fmt.c: Remove `unsigned' attribute from type of global `prefix'.
	(copy_rest): Cast to (unsigned char *) before dereferencing.
	(get_prefix): Likewise.

	* configure.ac: Replace use of the one-arg form of AC_INIT
	with a use of the 3-arg form and a use of AC_CONFIG_SRCDIR.

2001-11-14  Paul Eggert  <eggert@@twinsun.com>

	* src/tail.c (file_lines): Remove unnecessary cast.
	(tail_lines): Could have called file_lines even though the first
	lseek failed.  Fix that.

2001-11-14  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (file_lines): Add a parameter, start_pos.
	Work properly even when the read pointer is not at beginning of file.
	(tail_lines): Call file_lines for any regular file, as long as lseek
	can be used to seek to its end, not just when the initial read pointer
	is at beginning of file.

2001-11-13  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (tail_lines): Move declaration of local `length'
	into scope where it's used.
	(tail_file): Likewise for local `stats'.

	* tests/tail-2/Makefile.am (TESTS): Add proc-ksyms and start-middle.
	* tests/tail-2/start-middle: New test, for the bug fixed on 1995-07-24.

	`tail /proc/ksyms' would segfault on Linux.
	* src/tail.c (tail_lines): Use status of lseek (...SEEK_END) call
	in deciding whether to call file_lines or pipe_lines.
	From Herbert Xu.
	* tests/tail-2/proc-ksyms: New test, for the above fix.

2001-11-11  Jim Meyering  <meyering@@lucent.com>

	* src/od.c (struct tspec): Declare function pointer with prototype.

	* src/sum.c (main): Declare function pointer with prototype.

	* src/tsort.c (count_items): Mark parameter as unused.

	* src/sort.c (struct_month_cmp): Guard definition with the same
	cpp condition that guards the use.

	* src/tail.c (xwrite): Remove assertion that size_t N >= 0.

	* src/pr.c (struct COLUMN) [print_func]: Declare with a protype.
	(struct COLUMN) [char_func]: Declare with a protype.

	* src/od.c (parse_old_offset): Declare to be static.

	* src/join.c (make_blank): Declare to be static.
	(prfield): Declare local to be of type size_t, not int.

	Some help strings were very long.  Split them so that
	they're no longer than the magic length 509 that ISO C89
	compilers are required to support.  Sorry, translators :-(

	* src/md5sum.c (usage): Split --help output into smaller pieces.
	* src/ptx.c (main, usage): Likewise.
	* src/fmt.c (usage): Likewise.

	* src/wc.c (usage): Split --help output into smaller pieces.
	Use fputs, not printf.
	* src/cat.c (usage): Likewise.
	* src/cut.c (usage): Likewise.
	* src/csplit.c (usage): Likewise.
	* src/expand.c (usage): Likewise.
	* src/head.c (usage): Likewise.
	* src/join.c (usage): Likewise.
	* src/nl.c (usage): Likewise.
	* src/od.c (usage): Likewise.
	* src/pr.c (usage): Likewise.
	* src/sort.c (usage): Likewise.
	* src/split.c (usage): Likewise.
	* src/tac.c (usage): Likewise.
	* src/tr.c (usage): Likewise.
	* src/unexpand.c (usage): Likewise.
	* src/uniq.c (usage): Likewise.
	* src/tail.c (usage): Likewise.

	* src/sys2.h (alloca) [__GNUC__]: Define only if not already defined.

	* src/Makefile.am (sort_LDADD): Reflect spelling change:
	s/POW_LIBM/POW_LIB/.

2001-11-10  Jim Meyering  <meyering@@lucent.com>

	* src/nl.c (proc_text): Use `puts' to output a string of spaces,
	not printf.  This avoids a warning from gcc's -Wformat-security.

2001-11-09  Jim Meyering  <meyering@@lucent.com>

	* configure.ac: Use AC_CONFIG_FILES(...) and call AC_OUTPUT with no
	arguments.

2001-11-05  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (usage): Don't recommend setting LC_COLLATE=C.
	That can cause problems (now documented in coreutils.texi).

2001-11-04  Jim Meyering  <meyering@@lucent.com>

	* uniq.c, unexpand.c, tail.c, tac.c, split.c, sort.c, pr.c, paste.c:
	* od.c, nl.c, head.c, fold.c, expand.c, cut.c, csplit.c (usage):
	Say that ``Mandatory arguments to long options are mandatory for
	short options too.''

	* src/ptx.c (usage): Add one-line description.

2001-10-28  Jim Meyering  <meyering@@lucent.com>

	* tests/sum/sysv: New test for the fix below.
	* tests/sum/Makefile.am (TESTS): Add sysv.

2001-10-27  Paul Eggert  <eggert@@twinsun.com>

	* src/sum.c: Include human.h.
	(ROTATE_RIGHT): Remove; it was slow and the comment was
	misleading anyway.
	(bsd_sum_file): Avoid unsigned and long when they're not needed.
	Compute total input bytes as uintmax_t, not long, so that the
	code works even with files whose size does not fit in 'long'.
	(sysv_sum_file): Likewise.
	(sysv_sum_file): Do not reduce checksum until the end; this is
	what System V does.
	Reported by Nick Lawes.

2001-10-27  Jim Meyering  <meyering@@lucent.com>

	Give an accurate diagnostic when `head --bytes=30M' fails.
	* src/head.c (string_to_integer): Check explicitly for overflow,
	and lump everything else together as `invalid'.

2001-10-04  Jim Meyering  <meyering@@lucent.com>

	Rename --all-repeated argument `precede' to `prepend'.
	* src/uniq.c (enum delimit_method): s/DM_PRECEDE/DM_PREPEND/
	and change all uses.
	(delimit_method_string): s/precede/prepend/
	* tests/uniq/Test.pm: Adjust tests accordingly.
	Patches by Padraig Brady.

	* src/uniq.c (usage): Correct typo in description of --all-repeated.
	Patch by Padraig Brady.

2001-09-30  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.16.

	tail -F would segfault
	* src/tail.c (parse_options): Add missing `break;' from last change.

2001-09-28  Jim Meyering  <meyering@@lucent.com>

	* configure.ac: Tell automake to use the file name `config.hin'
	rather than the two-`.' config.h.in.

2001-09-26  Jim Meyering  <meyering@@lucent.com>

	* man/Makefile.am (common_dep): Define it, so we depend on configure.ac.

	* configure.ac: Renamed from configure.in.

2001-09-25  Jim Meyering  <meyering@@lucent.com>

	* src/Makefile.am (sort_DEPENDENCIES): Remove definition altogether.
	It adds nothing to the existing: $(PROGRAMS): ../lib/libfetish.a.

2001-09-24  Paul Eggert  <eggert@@twinsun.com>

	* src/Makefile.am (sort_DEPENDENCIES): Depend only on
	../lib/libfetish.a, not on $(LDADD), since the latter may
	contain `-lintl'.  This resembles yesterday's patch for the
	`$(PROGRAMS)' rule.

2001-09-23  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.15.

	* src/Makefile.am ($(PROGRAMS)): Depend only on ../lib/libfetish.a,
	not on $(LDADD), since the former may contain `-lintl'.

	* Makefile.am (SUBDIRS): When using newer gettext (in which
	intl/libintl.h is created by rules intl/Makefile)
	`intl' must precede `lib'.

2001-09-22  Jim Meyering  <meyering@@lucent.com>

	* ABOUT-NLS: Upgrade to gettext 0.10.40
	* intl: Upgrade entire directory to gettext 0.10.40
	* po/ChangeLog: New file.

	* Makefile.am (DISTCLEANFILES): Remove definition, since intl/libintl.h
	is no longer created via configure.

	* tests/od/od-N: New test for the 2001-09-19 fix by Ian Bruce.
	* tests/od/Makefile.am: New file.
	* tests/od: New directory.
	* tests/Makefile.am (SUBDIRS): Add od.
	* configure.in (AC_OUTPUT): Add tests/od/Makefile.

2001-09-19  Paul Eggert  <eggert@@twinsun.com>

	* src/od.c (MAX_ADDRESS_LENGTH, pseudo_offset, format_address,
	n_bytes_to_skip, skip, format_address_none,
	format_address_std, format_address_paren,
	format_address_label, write_block, parse_old_offset, dump,
	dump_strings, main):
	Use uintmax_t, not off_t, for file addresses, so that we can
	handle multiple large files even if the sum of their sizes
	exceeds off_t limits.

	(print_s_char, print_char, print_s_short, print_short,
	print_int, print_long, print_long_long, print_float,
	print_double, print_long_double, dump_hexl_mode_trailer,
	print_named_ascii, print_ascii, decode_one_format):
	Use size_t, not off_t, for in-memory byte counts.

	(end_offset): New var.
	(dump, dump_strings): Use it.
	(main): Set it, but check for overflow while doing so.

	(skip): Report an error if an in-range lseek fails on a
	regular file, as something's seriously wrong.  Check for
	negative regular file sizes (possible with some broken NFS
	implementations).

	(parse_old_offset): Now all offsets are valid, so return a
	success boolean and take a pointer to an offset as an argument.
	All callers changed.

	(dump_strings): Check for overflow when computing end_offset -
	string_min.

	(main): Remove OFF_T_MAX checks that are no longer needed.
	Don't bother assigning through temporary when there's no size
	limit to check.

2001-09-19  Jim Meyering  <meyering@@lucent.com>

	* src/od.c (open_next_file): Use SETVBUF, not setbuf.
	(skip): Revert part of last change: use lseek, not fseek.

	When --read-bytes=N (-N N) is used, disable input buffering in
	the standard I/O library.  Otherwise, od would read more input
	than requested.  This could have caused problems when reading
	from pipes, character devices, or open file descriptors inherited
	from a parent process.

	* src/od.c (open_next_file): New function, factored out of...
	(skip): Adapt to use open_next_file.
	(read_char): Likewise.
	(read_block): Likewise.
	(main): Likewise.
	(dump): Fix an off-by-one error that could have made od fail to
	report a read error when reading from a named file (not stdin).
	(check_and_close): Account for the fact that in_stream may now be NULL.
	(usage): Correct descriptions of -j and -N options.
	Patch by Ian Bruce.

2001-09-16  Jim Meyering  <meyering@@lucent.com>

	* Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5.

	* man/Makefile.am: Revamp this file, as for fileutils.

	* src/md5sum.c (digest_check): On systems for which setmode actually
	does something, arrange to read the file containing checksum strings
	in text mode.  Based on a patch from Chris Faylor.
	* src/system.h (SET_MODE): Define.

2001-09-12  Jim Meyering  <meyering@@lucent.com>

	The command `echo a|./fmt -2147483647' would cause fmt to segfault.
	* src/fmt.c (fmt_paragraph): Test for sentinal directly, rather than
	doing arithmetic with it's potentially large (INT_MAX) length.
	* tests/fmt/basic: Add tests for the above.

	tail: accept new option: -F, equivalent to `--follow=name --retry',
	for compatibility with FreeBSD and NetBSD versions of tail.

	* src/tail.c (usage): Describe new option.
	(parse_options): Accept it.
	Patch by Christian Kurz, via Herbert Xu.

	The command `echo foo|fmt -w N' for N>=32K would cause fmt to segfault.

	* src/fmt.c [struct Word]: Declare members length, space, and
	line_length to be of type `int', not short.
	(MAXCOST): Define using TYPE_MAXIMUM.
	Reported by Herbert Xu.

2001-08-31  Jim Meyering  <meyering@@lucent.com>

	* src/fmt.c (bool): Remove typedef, now that it's in system.h.
	(TRUE): Define to `true', not 1.
	(FALSE): Define to `false', not 0.

2001-08-30  Paul Eggert  <eggert@@twinsun.com>

	* src/cat.c: Include full-write.h.
	(full_write): Remove decl; not needed.
	* src/split.c: Likewise.

	* src/cat.c (simple_cat, cat):
	Don't assume read and write size fits in int.

2001-08-28  Jim Meyering  <meyering@@lucent.com>

	* src/fmt.c (main): Correct the diagnostic for invalid argument to -w.
	(main): Diagnose an invalid, old-style width option.

2001-08-27  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint: Undo last change.  Instead, simply remove `N_(',
	since the `Copyright ...' line should not be translated.

2001-08-26  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint (copyright-check): Update to reflect fact that
	the copyright year is now defined separately.

2001-08-08  Charles Randall <crandall@@matchlogic.com>

	* src/sort.c (mergefps): Do not allocate at least sort_size
	bytes for each merge buffer.  Instead, allocate at least
	sort_size bytes total.

2001-08-25  Jim Meyering  <meyering@@lucent.com>

	* tests/uniq/Test.pm: Re-enable some commented-out tests.

2001-08-25  Paul Eggert  <eggert@@twinsun.com>

	* src/uniq.c (main): Fix a typo in the previous patch: missing
	a bounds check for examples like `uniq a b c'.

	* uniq.c (main): Fix some more incompatibilities with POSIX.2,
	(e.g. `uniq +3 --' did not work) by invoking getopt_long with
	leading '-', resembling what was done to 'sort' on 2001-03-20.
	Recognize an +N option only if it is an integer in range, and
	(if POSIXLY_CORRECT) only if a file name argument has not been seen;
	otherwise silently treat it as a file name.

	If the user specifies too many operands, output the first one
	in the error message, as a diagnostic aid.

2001-08-24  Paul Eggert  <eggert@@twinsun.com>

	* src/uniq.c (main): Don't report an error when given the
	valid options `+3 -d'.

2001-08-24  Paul Eggert  <eggert@@twinsun.com>

	* src/uniq.c (different): Don't assume that lengths can fit
	into size_t.  Tune code for the common case where the line
	lengths differ: we avoid comparing them entirely in that case.

2001-08-25  Jim Meyering  <meyering@@lucent.com>

	* tests/uniq/Test.pm: Add tests for -s 0 and -w 0.

2001-08-24  Paul Eggert  <eggert@@twinsun.com>

	Remove arbitrary restrictions on sizes, fixing a bug reported
	by Geoff Whale.

	* src/uniq.c (skip_fields, skip_chars, check_chars): Now size_t,
	not int.
	(size_opt): New function.  Do not arbitrarily reject size zero.
	Change the wording of the error message slightly, for convenience.
	(find_field): Use size_t, not int, to compute sizes.
	(different, main): check_chars==0 is no longer a special case, as
	it defaults to SIZE_MAX.
	(main): Check for overflow with args like -234234234234234.
	Use 'size_opt' to convert optional arguments to sizes.

2001-08-25  Jim Meyering  <meyering@@lucent.com>

	* tests/uniq/Test.pm: Add new test, #54, for the just-fixed bug.

2001-08-24  Paul Eggert  <eggert@@twinsun.com>

	* src/uniq.c (find_field): Don't count trailing newline to be
	part of the field.  This disagrees with POSIX.2, but it's
	gotta be a bug in the standard.  An interpretations request
	has been submitted to PASC.
	Reported by Geoff Whale.

2001-08-18  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint: Merge in changes from autoconf.

	* Makefile.maint ($(v_etc_file)): Define.
	(copyright-check): Use the new variable.
	(my-distcheck): Depend on local-check so those checks are once
	again run by `make distcheck'.

	* src/head.c (head_bytes): Read no more than the specified
	number of bytes.  Patch by Ian Bruce.

	* tests/misc/head-c: New test for the above.
	* tests/misc/Makefile.am: New file.
	* tests/misc: New directory.
	* tests/Makefile.am (SUBDIRS): Add misc.
	* configure.in (AC_OUTPUT): Add tests/misc/Makefile.

2001-08-14  Jim Meyering  <meyering@@lucent.com>

	* src/Makefile.am (INCLUDES): Add -I../lib so sys2.h can include
	the new, generated file, unlocked-io.h.

2001-08-13  Jim Meyering  <meyering@@lucent.com>

	* src/cat.c (AUTHORS): Mark string for translation, since it
	contains the English word `and'.
	* src/comm.c: Likewise
	* src/csplit.c: Likewise
	* src/cut.c: Likewise
	* src/md5sum.c: Likewise
	* src/nl.c: Likewise
	* src/paste.c: Likewise
	* src/pr.c: Likewise
	* src/sort.c: Likewise
	* src/split.c: Likewise
	* src/sum.c: Likewise
	* src/tac.c: Likewise
	* src/uniq.c: Likewise
	* src/wc.c: Likewise

2001-08-12  Jim Meyering  <meyering@@lucent.com>

	* tests/mk-script ($program_name): Define.
	(main): Use $program_name, rather than long-inaccurate `build-script'.
	(main): Iterate over the sorted keys (rather than `while...each...'),
	so this script produces the same output regardless of which version
	of perl (e.g., perl5.6) is used.

2001-08-04  Jim Meyering  <meyering@@lucent.com>

	* Makefile.am (EXTRA_DIST): Add Makefile.cfg.

	* man/Makefile.am (EXTRA_DIST): Remove duplicate definition.

2001-07-08  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (usage): Reformat so help2man generates a properly
	indented man page.  Patch by Herbert Xu.

2001-07-04  Jim Meyering  <meyering@@lucent.com>

	* Makefile.cfg: New file with package-specific definitions.
	* Makefile.am (EXTRA_DIST): Add Makefile.cfg.

2001-07-01  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (usage): Suggest setting LC_COLLATE=C, rather
	than LC_ALL=C.

2001-06-10  Jim Meyering  <meyering@@lucent.com>

	* tests/sort/Test.pm: Add a test based on a report from Herbert Xu.

2001-05-20  Jim Meyering  <meyering@@lucent.com>

	* src/uniq.c: Rename new option values: s/all/precede/ and
	s/minimum/separate/.
	* tests/uniq/Test.pm: Reflect the above renamings.

2001-05-12  Bruno Haible  <haible@@clisp.cons.org>

	* src/tail.c (parse_obsolescent_option): Accept a b suffix.

2001-05-19  Jim Meyering  <meyering@@lucent.com>

	msgmerge-0.10.37 complains about some `invalid multibyte sequences.'
	* po/el.po: Remove the offending entries.
	* po/ko.po: Likewise.
	* po/zh.po: Likewise.

2001-05-19  Jim Meyering  <meyering@@lucent.com>

	Support new modes for uniq's --all-repeated option.
	The default behavior is unchanged.

	* src/uniq.c: Include argmatch.h.
	(usage): Update.
	(check_file): Implement it.
	(main): Handle new, optional arguments.
	* tests/uniq/Test.pm: New tests for the above.
	Patch by Padraig Brady.

2001-05-12  Bruno Haible  <haible@@clisp.cons.org>

	* src/tail.c (parse_obsolescent_option): Use t_count_lines, not
	count_lines, in error message.

2001-05-05  Jim Meyering  <meyering@@lucent.com>

	* src/comm.c (usage): Correct description of -3.
	Reported by Soeren Sonnenburg.

2001-04-22  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.14.

	* configure: Regenerate using a patched copy of autoconf-2.49e to
	work around a bug in its test for a working memcmp function.

2001-03-28  Paul Eggert  <eggert@@twinsun.com>

	* src/cksum.c: Fix bugs when computing length of large files.
	Add overflow and write error checks.  Use uint_fast32_t, not
	unsigned long, to do checksum calculation, as C99 says
	uint_fast32_t should be no slower and might be faster.

	Include <stdio.h> and "system.h" even if CRCTAB is defined,
	so that the code will compile if CRCTAB is defined.
	Include "human.h" if CRCTAB is not defined.
	(uint_fast32_t): Define if it appears that stdint.h didn't.
	(BIT, remainder, main, crctab): Use uint_fast32_t, not unsigned long,
	for checksums.
	(fill_r, remainder, main): Use ANSI prototypes.
	(fill_r, remainder, main): Omit duplicate code.
	(main): Use uintmax_t, not unsigned long, for file lengths.
	Use size_t, not long, for result of fread.
	Check for overflow when computing file lengths.
	Check for write error immediately after printing a line, so that
	we don't write to stdout indefinitely after an error.

2001-04-14  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (default_sort_size): Leave a 1/16 margin for RSS.
	Suggestion from Solar Designer.

2001-04-14  Jim Meyering  <meyering@@lucent.com>

	* src/wc.c (usage): Tweak --help output: s/line,/newline,/

2001-04-13  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (main): Add a comment justifying the use of
	`multi-character' rather than `multibyte' in a diagnostic.
	From Paul Eggert.

2001-04-12  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (RLIMIT_AS): Do not define; just use conditional
	code, since RLIMIT_RSS is similar (and is not standardized).
	(default_sort_size): Don't allocate more than the RSS limit,
	if this host has such a limit.

2001-03-20  Paul Eggert  <eggert@@twinsun.com>

	* NEWS, doc/textutils.texi: sort now accepts long options and
        checks POSIX option syntax.

	* doc/textutils.texi: Document --, -, sort long options, and
	sort -o after files.

	* src/sort.c: Include <getopt.h>.
	(usage, main): Add support for long options, and check option
	syntax as POSIX requires, though (as usual for GNU apps)
	options can follow file names unless POSIXLY_CORRECT is set.
	Many diagnostic revamped.
	(long_options): New constant.
	(badfieldspec): New arg MSGID.  Mark as noreturn.
	(parse_field_count): New arg MSGID; if null, just return null on error.
	(new_key): Renamed from key_init.  All callers changed.  Now allocates
	the new key.

2001-03-18  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.13.

	* tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL
	to $DJDIR/bin/bash.exe.  Patch from Richard Dawe, based on a
	suggestion from Eli Zaretskii.

2001-03-17  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c, src/tail.c, src/uniq.c (usage):
	Warn that the +N form will be withdrawn.
	* doc/textutils.texi: Likewise.

2001-03-08  Paul Eggert  <eggert@@twinsun.com>

	* NEWS, doc/textutils.texi: Document pr changes.

	* src/pr.c: Include mbswidth.h.
	(standard_header, header, test_suite): Remove.
	(date_format, date_text, file_text, header_width_available): New vars.
	(long_options, main, init_header, usage):
	Add new -D or --date-format option.
	(CHARS_FOR_DATE_AND_PAGE, T_BUF_FMT, T_BUF_SIZE, NO_DATE): Remove.
	(init_header): Allow arbitrary width for date format.  Change
	"Page %5d" to "Page %d", since the code no longer assumes fixed width.
	Do not assume that localtime succeeds.
	(init_header, print_header, usage): Do not truncate headers.
	(init_header, print_header): Defer width calculations until
	page is printed, since "Page 100000" is wider than "Page 1".
	Count columns, not bytes, in page headers.
	Custom headers take up only the center, not the whole header.
	(print_header): Use printf rather than fprintf(stdout).

	* po/Makefile.in.in (install-data-yes): Install LC_TIME locale
	for all packages, not just for fileutils.
	(uninstall): Remove LC_TIME locale too.

	* src/sys2.h (INT_STRLEN_BOUND): New macro.

	* tests/pr/0F, tests/pr/0FF, tests/pr/2-S_f-t_notab,
          tests/pr/2-Sf-t_notab, tests/pr/2f-t_notab,
          tests/pr/2s_f-t_notab, tests/pr/2s_w60f-t_nota,
          tests/pr/2sf-t_notab, tests/pr/2sw60f-t_notab,
          tests/pr/2w60f-t_notab, tests/pr/3-0F, tests/pr/3-5l17f-t,
          tests/pr/3-FF, tests/pr/3a2l17-FF, tests/pr/3a3f-0F,
          tests/pr/3a3l15-t, tests/pr/3a3l8f-t, tests/pr/3b2l17-FF,
          tests/pr/3b3f-0F, tests/pr/3b3f-0FF, tests/pr/3b3f-FF,
          tests/pr/3b3l15-t, tests/pr/3b3l8f-t, tests/pr/3f-0F,
          tests/pr/3f-FF, tests/pr/3l17f-t, tests/pr/3l24-t,
          tests/pr/3ml17f-t, tests/pr/3ml24-FF, tests/pr/3ml24-t,
          tests/pr/3ml24-t-FF, tests/pr/4-7l24-FF, tests/pr/4l24-FF,
          tests/pr/a2l15-FF, tests/pr/a2l17-FF, tests/pr/a3-0F,
          tests/pr/a3f-0F, tests/pr/a3f-0FF, tests/pr/a3f-FF,
          tests/pr/a3l15-t, tests/pr/a3l17f-lm, tests/pr/a3l8f-t,
          tests/pr/b2l15-FF, tests/pr/b2l17-FF, tests/pr/b3-0F,
          tests/pr/b3f-0F, tests/pr/b3f-0FF, tests/pr/b3f-FF,
          tests/pr/b3l15-t, tests/pr/b3l17f-lm, tests/pr/b3l8f-t,
          tests/pr/FF, tests/pr/Ja3l17f-lm, tests/pr/Jb3l17f-lm,
          tests/pr/Jml17f-lm-lo, tests/pr/l17f-t, tests/pr/l24-FF,
          tests/pr/l24-t, tests/pr/ml17f-0F, tests/pr/ml17f-lm-lo,
          tests/pr/ml17f-t, tests/pr/ml17f-t-0F, tests/pr/ml20-FF-t,
          tests/pr/ml24-FF, tests/pr/ml24-t, tests/pr/ml24-t-FF,
          tests/pr/n+2-5l17f-0FF, tests/pr/n+2l17f-0FF,
          tests/pr/n+2l17f-bl, tests/pr/n+3-7l24-FF,
          tests/pr/n+3l17f-0FF, tests/pr/n+3l17f-bl,
          tests/pr/n+3ml13f-bl-FF, tests/pr/n+3ml17f-bl-tn,
          tests/pr/n+3ml17f-tn-bl, tests/pr/n+4-8a2l17-FF,
          tests/pr/n+4b2l10f-0FF, tests/pr/n+5-8b3l10f-FF,
          tests/pr/n+5a3l6f-0FF, tests/pr/n+6a2l17-FF,
          tests/pr/n+6b3l6f-FF, tests/pr/n+7l24-FF,
          tests/pr/n+8l20-FF, tests/pr/nJml17f-lmlmlo,
          tests/pr/nJml17f-lmlolm, tests/pr/nl17f-bl,
          tests/pr/nN1+3l17f-bl, tests/pr/nN15l17f-bl,
          tests/pr/nSml13-bl-FF, tests/pr/nSml13-t-t-FF,
          tests/pr/nSml13-t-tFFFF, tests/pr/nSml17-bl-FF,
          tests/pr/nSml17-t-t-FF, tests/pr/nSml17-t-tFFFF,
          tests/pr/o3a3l17f-tn, tests/pr/o3a3Sl17f-tn,
          tests/pr/o3a3Snl17f-tn, tests/pr/o3b3l17f-tn,
          tests/pr/o3b3Sl17f-tn, tests/pr/o3b3Snl17f-tn,
          tests/pr/o3Jml17f-lm-lo, tests/pr/o3ml17f-bl-tn,
          tests/pr/o3mSl17f-bl-tn, tests/pr/o3mSnl17fbltn,
          tests/pr/Test.pm, tests/pr/W-72l17f-ll, tests/pr/W20l17f-ll,
          tests/pr/W26l17f-ll, tests/pr/W27l17f-ll,
          tests/pr/W28l17f-ll, tests/pr/W35a3l17f-lm,
          tests/pr/W35b3l17f-lm, tests/pr/W35Ja3l17f-lm,
          tests/pr/W35Jb3l17f-lm, tests/pr/W35Jml17f-lmlo,
          tests/pr/W35ml17f-lm-lo, tests/pr/W72Jl17f-ll,
          tests/pr/w72l17f-ll:
	Adjust to minor spacing changes in pr headers.

2001-03-11  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (die): New message arg, to describe failures
	better.  All callers changed.

2001-03-11  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c: Decrease buffer size when only merging or checking.
	(sort_size): Now the user-specified sort size.
	(MIN_MERGE_BUFFER_SIZE): New macro.
	(MIN_SORT_SIZE): Use it.
	(merge_buffer_size): New variable.
	(fillbuf): Increase merge_buffer_size if a longer line is encountered.
	(checkfp, mergefps): Do not allocate a buffer smaller than
	merge_buffer_size.
	(sort): Use the default_sort_size if sort_size is zero.
	(main): Do not set sort_size to default_sort_size.

2001-03-06  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (sort): If all the input files are empty, create
	an empty output file.
	* tests/sort/Test.pm: Test for this.

2001-03-13  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (merge): Move declarations of local variables into
	the inner scope where they're used.
	(sort): Likewise.

2001-03-06  Paul Eggert  <eggert@@sic.twinsun.com>

	Avoid the need for a copy of the input file when the input and
	output overlap, e.g. 'sort F -o F'.  With -m, though, a copy
	is still needed sometimes.

	* doc/textutils.texi: 'sort F -o F' no longer needs to copy F.

	* src/sort.c: Do not include closeout.h.
	(xfopen): Use stdout if *how != 'r'.
	(mergefps): Remove FPS arg.
	Open all input files, and close all files when done.
	If OFP is null, open the output file (but after opening input files).
	All callers changed.
	(first_same_file): New function.
	(sort, merge): Remove arg OFP; we now open the output file as needed.
	All callers changed.
	(merge): New arg MAX_MERGE.  All callers changed.
	(sort):	For "sort F -o F", close the input before opening the output.
	(main): Do not use close_stdout; 'sort' and 'merge' now close stdout.
	(This also fixes a close-stdout-twice bug.)
	Remove test for overlapping input and output files, as 'sort' no longer
	needs to worry about overlap, and 'merge' checks for overlap itself.
	Use first_same_file to inform 'merge' about how much to merge at
	the top level, to avoid overlap.

2001-03-12  Jim Meyering  <meyering@@lucent.com>

	`fmt --prefix=S' would not work properly for any string S containing
	a byte with the high bit set.
	* src/fmt.c (prefix): Declare to be of type unsigned char, not `char'.
	(get_prefix): Likewise for local, `p'.
	Reported by Franois Pinard.

	Add a test for the above-fixed problem.
	* tests/fmt: New directory/files.
	* configure.in (AC_OUTPUT): Add tests/fmt/Makefile.
	* tests/Makefile.am (SUBDIRS): Add fmt.

2001-03-05  Andreas Schwab  <schwab@@suse.de>

	* src/tac.c (save_stdin): Use mkstemp to create temporary file.

2001-03-09  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint (my_distdir): Define new variable, and use this
	in place of most old uses of $(distdir).

	* tests/help-version: Ensure that /dev/full is a character device
	(using test -c) as well as being writable, before trying to write to it.
	Otherwise, the test could mistakenly append a newline to an existing,
	regular, writable, /dev/full file.
	Suggested by Ulrich Drepper.

2001-03-08  Jim Meyering  <meyering@@lucent.com>

	* tests/sha1sum/sample-vec: Insert the `--text' argument for each test.
	Reported by Matthew Smith.

2001-03-04  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint (my_distdir): Define.
	Use it in place of $(distdir) almost everywhere.

	* Version 2.0.12.

	* Makefile.maint (alpha): Use $(PACKAGE)-$(VERSION), not $(distdir),
	since the latter now has a `$(top_distdir)/' prefix.

2001-03-01  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (die): New function.
	(create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size,
	fillbuf, main): Use it to regularize error messages.  The only change
	in behavior is that write_bytes and the final close used to say "write
	error" but now give just the output file name, which should be enough.

2001-03-01  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (xfclose): Add FILE arg, and report the file name
	on error.  All callers changed.

2001-03-01  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (main): When fclose (stdin) fails, do not mention
	the output file in the error message; mention "-" instead.

2001-02-28  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (xfopen): Set have_read_stdin to 1 only if file is "-".
	Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns
	stdin, stdout, or stderr.
	(xfclose): stdout is no longer a special case.
	(main): Close output file, don't just flush it; there might be
	an error on the close.

2001-02-27  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (initbuf): If the desired size cannot be
	allocated, repeatedly halve it until allocation succeeds.
	Reported by Solar Designer.

2001-02-26  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (parse_field_count): Comment fix.

2001-02-25  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c: Tune allocation and comparison of nodes
	representing temp files.  This improved CPU performance of
	'sort -S 1 *.[ch]' by 17% on my host.

	(struct tempnode): name member now uses struct hack.
	(temphead): Now a pointer, not a structure.  All uses changed.
	(create_temp_file): Allocate node using struct hack.
	(zaptemp): Free node using struct hack.  Use pointer comparison, not
	string comparison.

2001-02-25  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (eolchar, trim_trailing_blanks): Now static.

2001-02-25  Paul Eggert  <eggert@@twinsun.com>

	'sort' race condition fixes.

	Defend against a DoS attack where someone else creates a
	temporary file with the same name as ours.  Use mkstemp to do
	this, supplying our own mkstemp if the system doesn't have one.

	Also, fix a race condition during cleanup on hosts without
	sigaction.

	* src/sort.c (NAME_MAX_IN_DIR): Remove.
	(sigprocmask, sigset_t): New macros, defined only on older hosts.
	(caught_signals): New var.
	(xtmpfopen, tempname): Removed.
	(create_temp_file): New function, combining the functions of the old
	xtmpfopen and tempname.  All callers changed.
	Use mkstemp to create the file.
	(sighandler): On hosts without sigaction, ignore signals while
	cleaning up, instead of letting them interrupt cleanup.
	(main): Initialize caught_signals.  On hosts with sigaction, block all
	caught signals while handling one.  Remove duplicate code.

2001-02-22  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (keycompare): Move declarations of locals, lena and lenb,
	into the inner scope where they are used.

2001-02-19  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (AUTHORS): Add Paul Eggert.

	* src/wc.c (wc): Rename innermost `buf' to avoid shadowing warning.
	(wc): Rename local `wc' to avoid shadowing function name.

2001-02-18  Paul Eggert  <eggert@@twinsun.com>

	Fix a race condition: freed storage accessed during a signal handler.

	* src/sort.c (struct tempnode.next): Now volatile.
	(zaptemp): Free the file name after removing it from the temp list,
	not before, because a signal can arrive between the two actions
	and cleanup () traverses the list.

2001-02-18  Paul Eggert  <eggert@@twinsun.com>

	Check for input size, and do not overallocate memory.
	Also check for memory quotas.

	Revamp storage management so that line tables and character data are
	taken from the same buffer.  Line tables are now in reverse order,
	since they grow down while the character data grow up.

	* src/sort.c:
	(<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H.
	(struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA
	is not defined.
	(RLIMIT_AS): Define to RLIMIT_DATA if not defined.
	(struct lines): Remove.
	(struct buffer): New members nlines, line_bytes, eof.
	Remove member newline_free; no longer needed, since the code no longer
	runs out of line table space.
	(SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove.
	(sort_size): Renamed from sortalloc; now applies to the sum of the
	character data and the line table, not just the character data.
	(MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros.
	(linelength): remove.
	(specify_sort_size): Don't worry about the distinction between the
	character data and the line table; that is now the caller's
	responsibility.
	(default_sort_size): Return the value, instead of being executed for
	side effect.  Return half of available memory, or 1/16 of total memory,
	whichever is greater; except do not exceed 1/2 of quota.
	(sort_buffer_size): New function.
	(initbuf): New arg LINE_BYTES.  Ensure that the line array is properly
	aligned.  Initialize the new set of struct buffer members.
	(buffer_linelim): New function.
	(fillbuf): Return int, not size_t, since the callers merely care
	whether the result is nonzero.  New arg FILE so that error messages
	can report the file name.  Keep track of eof.  Initialize the line
	table too, taking its memory from the input buffer's memory; this
	subsumes the old findlines function and removes the need for worrying
	about running out of line table entries.
	(checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage
	management regime, in particular the fact that line tables are now
	filled in by fillbuf and are in reverse order.
	(checkfp): Now takes char *, not const char *, since subroutines
	require that now.  Rewrite to avoid lint and duplicate code.
	If line length alloc calculation overflows,
	simply allocate enough memory to hold the line.
	(mergefps): New arg FILES, used for buffer size calculation and error
	messages.  Rewrite to avoid lint.  Do not loop if savealloc*2
	overflows.
	(mergefps, merge): Zap temporary files eagerly rather than lazily;
	this is needed because we now pass FILES to mergefps.
	(sortlines): Args now point at end of arrays, not at beginnings.
	(sort): Do not allocate temporary line array for sortlines;
	instead, take the space from the same buffer.
	(main): Adjust to sort_size and default_sort_size changes.

2001-02-18  Jim Meyering  <meyering@@lucent.com>

	Rename test input files to avoid conflicts on case-insensitive
	file systems.
	* tests/pr/2-Sf-t_notab: Rename from 2Sf-t_notab.
	* tests/pr/2-S_f-t_notab: Rename from 2S_f-t_notab.
	* tests/pr/W-72l17f-ll: Rename from W72l17f-ll.
	* tests/pr/Test.pm: Update file names to reflect renamings.
	Reported by Matthew Smith.

2001-01-20  Jim Meyering  <meyering@@lucent.com>

	* configure.in: Remove jm_CHECK_ALL_TYPES.
	Now it's invoked by jm_MACROS.

2001-01-17  Jim Meyering  <meyering@@lucent.com>

	* src/cksum.c (main): Use PACKAGE, not GNU_PACKAGE.
	* src/tsort.c (main): Likewise.
	* src/sort.c (main): Likewise.
	(usage): Convert each TAB in --help output to a sequence of 8 spaces.

2001-01-07  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (usage): Split a string that was longer than 2048 bytes.

2001-01-03  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (main): Remove embedded \n from diagnostic.

2001-01-02  Jim Meyering  <meyering@@lucent.com>

	* src/od.c (ulonglong_t): Define place-holder type to avoid some #if
	directives.
	(LONGEST_INTEGRAL_TYPE): Remove definition.
	(MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of
	LONGEST_INTEGRAL_TYPE.
	(print_long_long): Compile this function even on systems without
	long long support.
	(decode_one_format): Remove #if directive.

	* src/od.c (decode_one_format): Guard use of print_long_long with
	`#if HAVE_UNSIGNED_LONG_LONG'.  From Darren Salt.
	Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead.

2000-12-23  Jim Meyering  <meyering@@lucent.com>

	* src/sys2.h [HAVE_INTTYPES_H]: Include <inttypes.h>.

2000-12-19  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.11.

2000-12-18  Paul Eggert  <eggert@@twinsun.com>

	* NEWS, doc/textutils.texi: New "sort" option -S SIZE.

	* src/sys2.h (UINTMAX_MAX): New macro, taken from C99.

	* src/sort.c: Include physmem.h.
	(SORTALLOC, mergealloc, LINEALLOC): Remove.
	(sortalloc): Default to zero at program startup.
	(SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): New macros.
	(usage, main): Add support for new -S SIZE option.
	(specify_sort_size, default_sort_size): New functions.
	(initlines): Do not let alloc exceed limit.
	(findlines): Likewise.
	(checkfp, mergefps, sort): Use sortalloc to size everything
	else, instead of relying on precomputed sizes.

2000-12-17  Jim Meyering  <meyering@@lucent.com>

	* doc/texinfo.tex: Update from master repository.
	* config.sub: Likewise.
	* config.guess: Likewise.

2000-12-11  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.10.

2000-12-07  Jim Meyering  <meyering@@lucent.com>

	* src/od.c (address_base): Declare to be static.

2000-12-06  Paul Eggert  <eggert@@twinsun.com>

	* src/od.c (address_base, address_pad_len): New var.
	(output_address_fmt_string, address_fmt_buffer, address_pad): Remove.
	(flag_pseudo_start): Now int, not long int.
	(pseudo_offset): Now off_t, not long int.
	(n_specs, n_specs_allocated): Now size_t, not unsigned int.
	(format_address, format_address_none, format_address_std,
	format_address_label): Now accepts an extra char argument (an extra
	char to print if nonzero), and prints instead of returning a string.
	All callers changed.
	(bytes_per_block): Now size_t, not int.
	(format_address_none): Do not even print the extra char argument.
	This simplifies the callers.
	(format_address_std, format_address_label): Print off_t ourself
	instead of trying to use autoconfigured format.  This is faster and
	more portable.
	(format_address_paren): New function.
	(dump): Remove unnecessary cast.
	(expand_address_fmt): Remove.
	(main): Use size_t, off_t, etc. instead of builtin types where this is
	advisable.  Adjust to above changes.  Remove unnecessary cast.

2000-12-03  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (tail_file): Initialize ignore, dev, and ino members,
	when tailing forever and the open failed.  Otherwise, we could get
	uninitialized memory references of those fields in recheck.
	* tests/tail-2/Makefile.am (TESTS): Add assert-2.
	* tests/tail-2/assert-2: New file.

	* Version 2.0.9.

	Make od print valid addresses for offsets of 2^32 and larger, and
	allow byte offset (-j) and byte count (-N) to be 2^32 and larger.

	* src/od.c (MAX_ADDRESS_LENGTH): Don't hard-code as a literal.
	Rather, define in terms of the type, off_t.
	(string_min): Declare to be of type size_t.
	(flag_dump_strings): Declare to be of type int.
	(print_s_char): Declare the n_bytes parameter and the local, `i',
	to be of type off_t.
	(print_char): Likewise.
	(print_s_short): Likewise.
	(print_short): Likewise.
	(print_int): Likewise.
	(print_long): Likewise.
	(print_long_long): Likewise.
	(print_float): Likewise.
	(print_double): Likewise.
	(print_long_double): Likewise.
	(dump_hexl_mode_trailer): Likewise.
	(print_named_ascii): Likewise.
	(print_ascii): Likewise.
	(write_block): Likewise.
	(print_ascii): Declare local, `print_function' with a prototype.
	Change a few `>' comparisons to the equivalent `<' form.
	(parse_options): Declare `tmp' to be of type uintmax_t.
	Use xstrtoumax, not xstrtoul.
	Fail if the specified offset if larger than OFF_T_MAX.
	(dump_strings): Declare local `i' to be of type size_t.
	Remove the now-unnecessary cast-to-off_t.
	(main) [IF_LINT]: Initialize desired_width to avoid a warning.
	Declare `tmp' to be of type uintmax_t.
	Use xstrtoumax, not xstrtoul.
	Fail if minimum string length is larger than SIZE_MAX.
	Fail if specified width is larger than ULONG_MAX.

	* src/od.c (format_address): Use off_t, not long unsigned_int as the
	parameter type.
	(format_address_none): Likewise.  Mark parameter as unused.
	(format_address_std): Likewise.
	(format_address_label): Likewise.
	(print_ascii): Mark format string parameter as unused.
	(write_block): Use off_t, not long unsigned_int as offset type.
	(expand_address_fmt): New function.
	(main): Use it to expand each address format string template.
	Reported by Mark Nudelman, via Andreas Jaeger.

	* src/sys2.h (OFF_T_MIN): Define here instead.
	(OFF_T_MAX): Likewise.
	(CHAR_BIT): Define.

	* src/tail.c (parse_options): Use xstrtoumax to parse the byte and line
	offset.  Give a better diagnostic when the requested offset is still
	representable but larger than OFF_T_MAX.
	(OFF_T_MIN): Remove definition.
	(OFF_T_MAX): Likewise.

2000-12-02  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (checkfp): Rename local `buf' to avoid shadowing previous
	declaration.

	* src/sort.c (NONZERO): Define and use it to make the code a tiny
	bit more readable.

	* doc/textutils.texi (sort invocation): Clarify how -t works
	when a sort key specifies a range of fields.  From Karl O. Pinc.

2000-11-26  Paul Eggert  <eggert@@twinsun.com>

	* src/od.c (skip): Use lseek instead of worrying about fseeko or fseek.
	This should be portable, as we seek before doing any I/O.
	(fseeko): Remove; no longer used.

2000-11-30  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c: s/SIZE_T_MAX/SIZE_MAX/.

2000-11-30  Paul Eggert  <eggert@@twinsun.com>

	* src/sys2.h: Include <stdint.h> if HAVE_STDINT_H.
	(SIZE_MAX): Renamed from SIZE_T_MAX, as C99 uses SIZE_MAX.
	All uses changed.

2000-11-30  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c: SIZE_MAX is not defined, so s/SIZE_MAX/SIZE_T_MAX/, and...
	* src/sys2.h (SIZE_T_MAX): ... define.

2000-11-29  Paul Eggert  <eggert@@twinsun.com>

	Port GNU "sort" to hosts where sizes don't fit in "int",
	e.g. 64-bit Solaris (sparc).

	* src/sort.c ("human.h", "xstrtol.h"): Include.
	(struct line): length member is now size_t, not int.
	(struct lines): Likewise for used, alloc, limit members.
	(struct buffer): Likewise for used, alloc, left, newline_free members.
	(struct keyfield): Likewise for sword, schar, eword, echar members.
	(sortalloc, mergealloc, linelength): Now size_t, not int.

	(initbuf, fillbuf, initlines, begfield, limfield, findlines,
	numcompare, getmonth, keycompare, compare, checkfp, mergefps,
	sortlines, sort): Accept, return, and use size_t for sizes, not int.

	(fillbuf, initlines, findlines, checkfp, sort): Check for overflow
	when computing buffer sizes.

	(begfield, limfield): Do not index past end of array.

	(checkfp): Return a boolean, not a line number, as the line
	number may not fit in int.  All callers changed.  Use
	uintmax_t for line numbers, not int.

	(sort): Don't allocate tmp until we need it (and know the right size).

	(parse_field_count): New function.

	(main): Use it to check for overflow in field counts.
	"outfile" is now a pointer to const.

2000-11-27  Jim Meyering  <meyering@@lucent.com>

	* src/checksum.h: Don't include system.h here.
	* src/md5.c: Include config.h, stdio.h, sys/types.h. and system.h here
	instead.
	* src/sha1sum.c: Likewise.

2000-11-18  Paul Eggert  <eggert@@twinsun.com>

	* src/pr.c (main): Do not assume EOF == -1.
	Handle the case correctly when digits options immediately precede a
	non-option.

2000-11-18  Jim Meyering  <meyering@@lucent.com>

	* doc/textutils.texi: Change GNU to @@sc{gnu} in many places.
	Update to use the Free Documentation Licence.

	* configure, config.h.in, Makefile.in, etc.: Regenerate using the
	very latest version (in CVS) of autoconf.

2000-11-17  Jim Meyering  <meyering@@lucent.com>

	* GNUmakefile (.NOTPARALLEL): New target.  Prevent unwanted parallelism.
	Suggestion from Ulrich Drepper.

2000-11-16  John David Anglin  <dave@@hiauly1.hia.nrc.ca>

	* tsort.c: Include sys/types.h before system.h.

2000-11-16  Jim Meyering  <meyering@@lucent.com>

	* src/join.c: Declare global `tab' to be of type *unsigned* char,
	so join works with 8-bit delimiter characters.
	Reported by Antonio Rendas.
	* tests/join/Test.pm (8-bit-t): New test for the above fix.

2000-11-13  Paul Eggert  <eggert@@twinsun.com>

	* src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should
	be tested with #ifdef, not with #if.

2000-11-11  Jim Meyering  <meyering@@lucent.com>

	* doc/textutils.texi: More minor rewording and grammar correction.
	From Brian Youmans.

2000-11-06  Paul Eggert  <eggert@@twinsun.com>

	* src/od.c (skip): st_size is not defined for directories.

2000-11-03  Jim Meyering  <meyering@@lucent.com>

	* tests/sha1sum/sample-vec: New file, with tests derived from
	http://csrc.nist.gov/cryptval/shs/sha1-vectors.zip
	* tests/sha1sum/Makefile.am (TESTS): Add sample-vec.

2000-10-30  Jim Meyering  <meyering@@lucent.com>

	* configure, config.h.in, Makefile.in, etc.: Regenerate using the
	very latest version (in CVS) of autoconf.

	* src/wc.c: Include "system.h" after wctype.h (not before)
	to avoid a compilation error on Solaris 5.5.1 systems.
	Reported by Vin Shelton.

2000-10-23  Jim Meyering  <meyering@@lucent.com>

	* Makefile.maint: Clean up version-related variables.

	* Version 2.0.8.

	* Makefile.am (EXTRA_DIST): Add .prev-version.

2000-10-22  Jim Meyering  <meyering@@lucent.com>

	* tests/Makefile.am (SUBDIRS): Add sha1sum.
	* tests/sha1sum/basic-1: New file.
	* configure.in (AC_OUTPUT): Add tests/sha1sum/Makefile.

	* src/Makefile.am (bin_PROGRAMS): Add sha1sum.
	(md5sum_SOURCES): Define.
	(sha1sum_SOURCES): Define.
	(noinst_HEADERS): Add checksum.h.

	* src/md5sum.c: Factor out the differences between MD5 and SHA1,
	and parameterize so this code may be used by both md5sum and the new
	program, sha1sum.  Loosely based on a patch from Scott Miller.
	* src/checksum.h: New file.
	* src/md5.c: New file that simply defines `algorithm'.
	* src/sha1sum.c: Likewise.

	* man/Makefile.am (man_MANS): Add sha1sum.1.
	* man/sha1sum.x: New file.

	Support 8-byte integers, assuming they're printable with e.g., %lld.
	* src/od.c: Add support for printing data as unsigned
	long long integers.

2000-10-21  Jim Meyering  <meyering@@lucent.com>

	The command, `yes ''|./cat -n' would stop printing after INT_MAX lines.
	* src/cat.c (cat): Never let `newlines' exceed 3.

2000-10-21  Jim Meyering  <meyering@@lucent.com>

	Prevent a counter buffer overrun when numbering lines and when
	processing 100 billion lines (or more) of input.
	* src/cat.c (LINE_COUNTER_BUF_LEN): Define to allow numbering as
	many as 10^18 - 1 lines (the old limit was 10^11 - 1, and could
	be exceeded without too much trouble).	Use this symbol rather
	than hard-coding the constant everywhere.
	(next_line_num): Rather than overrunning for input with more lines,
	mark the line number by putting a `>' in the leftmost slot.
	Patch by Jan Nieuwenhuizen.

	* src/sort.c (SORT_OUT_OF_ORDER): Define.
	(main): Use it instead of hard-coding the `1'.

2000-10-10  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (main): Use EXIT_SUCCESS rather than 0.
	Fail when checking (-c) with more than one file argument,
	rather than simply ignoring the extra arguments.

2000-09-07  Jim Meyering  <meyering@@lucent.com>

	* src/cut.c: Remove obsolete comment block.
	(usage): Note that when using -f, lines with no delimiters are
	also printed.
	* doc/textutils.texi (cut invocation): Likewise.

2000-08-23  Jim Meyering  <meyering@@lucent.com>

	* src/md5sum.c: Include <config.h> unconditionally, to be consistent
	with all the other programs in this directory.
	* src/tsort.c: Likewise.

2000-08-19  Jim Meyering  <meyering@@lucent.com>

	* src/comm.c (writeline): Correct comments.  From Bruno Haible.

2000-08-11  Paul Eggert  <eggert@@twinsun.com>

	* doc/textutils.texi:

	Portable shell scripts should specify global options before
	key fields.

	Move global LC_CTYPE remark to each sort option that depends
	on LC_CTYPE.

	sort -g depends on LC_NUMERIC.

	Add @@vindex where it's missing.

	"radix character" -> "decimal-point character", to match Standard C
	terminology, which is easier for most people to follow.

	"comm" does not consider trailing newlines to be significant.

2000-08-10  Paul Eggert  <eggert@@twinsun.com>

	* doc/textutils.texi: Recommend against the System V syntax
	for tr ranges, and don't use it in examples.  Use POSIX
	classes rather than ranges, for portability.
	* src/tr.c (usage): Don't describe System V syntax, as it
	doesn't always work.

	* src/sort.c (usage): Describe -d and -i in a locale-independent way.

	* doc/Makefile.am (constants.texi): Use the C locale so that
	[A-Z] works as expected.

2000-08-07  Paul Eggert  <eggert@@twinsun.com>

	* src/cut.c (cut_fields): Invoke xalloc_die instead of printing
	our own message.
	(cut_fields): Check for I/O error as well as end-of-file

2000-08-06  Bruno Haible  <haible@@clisp.cons.org>

	* src/wc.c: Add support for multi-byte locales.
	(iswprint, mbrtowc, wcwidth): Provide default definitions.
	(total_bytes): New variable.
	(print_bytes): New variable.
	(longopts): Change abbreviation for --chars from 'c' to 'm'.
	(usage): Update.
	(write_counts): Add `bytes' argument.
	(wc): New variables `bytes', `count_bytes', `count_chars',
	`count_complicated'. The old code determines `bytes', not `chars'.
	New case for MB_CUR_MAX > 1. A non-printable non-space character does
	not increment the line position or start a word. Update `total_bytes'.
	(main): Initialize `print_bytes' and `total_bytes' to 0. Accept 'm'
	option. Pass `total_bytes' to write_counts.
	* doc/textutils.texi (wc invocation): Update accordingly.

2000-08-06  Bruno Haible  <haible@@clisp.cons.org>

	* src/head.c (head): Call write_header here.
	(head_file): ... not here.

	* src/cat.c (closeout_func): Remove variable.
	(close_stdout_wrapper): Remove unused function.
	(main): Remove assignment to closeout_func.

	* src/fold.c (fold_file): Remove ferror(stdout) check, already done
	in close_stdout.

2000-08-06  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (usage): Warn more succinctly about the effects of
	the locale on sort order.

2000-08-06  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0g.

	* src/tail.c (pipe_lines): Declare local `cp' to be const.

2000-08-04  Greg McGary  <greg@@mcgary.org>

	* src/tail.c (pipe_lines): Add variable `nbytes' so we can free
	`tmp' immediately after read loop.  Don't process an empty file.
	[This fixes a buffer-underrun error -- detected thanks to
	bounded pointers -jmm]

2000-08-05  Jim Meyering  <meyering@@lucent.com>

	Fix buffer-overrun error.
	* src/pr.c (init_header): Allocated buffer was sometimes too small.
	Reported by Greg McGary (who found this bug using his
	bounded-pointers-enabled gcc).
	(init_header): Move declarations of several variables into the
	inner scope where they are used.
	* tests/pr/Test.pm (narrow-1): New test, for the above.

	* src/csplit.c (MAX): Remove definition (It's in sys2.h).

2000-08-04  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (main): Rename local `t' to `tmp_dir' to avoid shadowing
	a previous local by that name.
	(usage): Warn that GNU sort is now locale-aware, and suggest
	people put LC_ALL=POSIX in their environment.

	* src/pr.c (store_columns): Remove conjunct that would dereference
	an out-of-bounds pointer.  Reported by Greg McGary (who found this
	bug using his bounded-pointers-enabled gcc).

2000-08-03  Jim Meyering  <meyering@@lucent.com>

	* tests/Makefile.am.in ($(srcdir)/$x-tests): Use -I$(srcdir), not `-I.'.
	(Makefile.am): Likewise.  Reported by Greg McGary.

2000-08-01  Jim Meyering  <meyering@@lucent.com>

	* doc/textutils.texi (tr invocation): Note that ranges are not portable.
	Update examples not to use ranges.

2000-07-31  Jim Meyering  <meyering@@lucent.com>

	* src/cut.c (cut_fields): Use `virtual memory exhausted',
	not `Memory exhausted'.

2000-07-30  Jim Meyering  <meyering@@lucent.com>

	* src/help-version: Remove file.  Move it to ...
	* tests/help-version: ...here
	* tests/Makefile.am (TESTS): Set to help-version.
	(TESTS_ENVIRONMENT): Define.
	(EXTRA_DIST): Add $(TESTS).
	* src/Makefile.am (EXTRA_DIST): Remove help-version.
	(TESTS): Remove definition.
	(TESTS_ENVIRONMENT): Remove definition.

2000-07-28  Paul Eggert  <eggert@@twinsun.com>

	sort's -T option can now appear multiple times.
	Thanks to Charles Randall for suggesting this idea.

	* doc/textutils.texi, NEWS: Document this.

	* src/sort.c (temp_dir): Remove.
	(temp_dirs, temp_dir_count, temp_dir_alloc): New vars.
	(process_id): New var.
	(usage): Describe new use of -T.
	(add_temp_dir): New function.
	(tempname): Use new temp_dirs array.
	Do not discard information from the process-id or sequence
	number, unless we have short file names.
	(sighandle): Use process_id instead of getpid.
	(main): Initialize process_id.
	Add support for the new use of -T.

2000-07-23  Jim Meyering  <meyering@@lucent.com>

	* tests/head/Test.pm: Rename tests (and hence files) to have a short
	enough prefix so that they're not truncated on 8+3 file systems.
	Reported by Eli Zaretskii.

2000-07-09  Jim Meyering  <meyering@@lucent.com>

	* config.guess: Update from FSF.
	* config.sub: Likewise.

2000-07-02  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0f.

2000-07-01  Jim Meyering  <meyering@@lucent.com>

	* src/cut.c: Change type of global, field_1_bufsize, from int to size_t.

2000-06-29  Jim Meyering  <meyering@@lucent.com>

	* src/tr.c (find_bracketed_repeat): Add a cast to suppress a warning.
	Reported by Gerhard Poul.

	* src/tail.c (enum): Remove comma from end of enumerator list.
	From Gerhard Poul.

2000-06-25  Jim Meyering  <meyering@@lucent.com>

	* configure.in (ALL_LINGUAS): Add Danish (da).

2000-06-24  Jim Meyering  <meyering@@lucent.com>

	* doc/textutils.texi: Lots of minor rewording and grammar correction.
	From Brian Youmans.

	* tests/sum/basic-1: New file.
	* tests/sum/Makefile.am: New file.
	* configure.in (AC_OUTPUT): Add tests/md5sum/Makefile.
	* tests/Makefile.am (SUBDIRS): Add sum.

2000-06-22  Bruno Haible  <haible@@clisp.cons.org>

	* src/sum.c (sysv_sum_file): Avoid overflowing 32-bit accumulator
	on files whose bytes sum to 2^32 or larger.  The smallest such file
	contains 16,843,010 bytes, nearly all of which have the value 0xff.

2000-06-22  Bruno Haible  <haible@@clisp.cons.org>

	* src/cat.c (main): Correct a comment.

2000-06-21  Jim Meyering  <meyering@@lucent.com>

	* src/cut.c (getstr): Remove private (and out of date) version of
	this function.
	(cut_fields): Adjust caller to use the just-extended one in ../lib.
	Reported by Paul Sauer.

2000-06-20  Jim Meyering  <meyering@@lucent.com>

	* src/uniq.c (main): Fix off-by-argc test, so +N-style options are
	recognized once again.  Reported by Geoff Keunning.
	Fix typo in diagnostic: s/compare/skip/.

2000-05-27  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c: Arrange to call close_stdout upon exit.
	Don't close stdout explicitly.
	(usage): Add missing backslash at end of line.
	(write_header): Remove now-unused COMMENT parameter.
	Update all callers.

2000-05-24  Jim Meyering  <meyering@@lucent.com>

	* src/head.c (head_file): Use STDIN_FILENO in place of `0'.
	(main): Likewise.

2000-05-20  Jim Meyering  <meyering@@lucent.com>

	* src/cat.c: Arrange to call close_stdout upon exit.
	Don't close stdout explicitly.  Replace uses of global constant,
	output_desc, with uses of STDOUT_FILENO.

	Arrange to call close_stdout upon exit.  Don't close stdout explicitly.
	* src/cksum.c: Likewise.
	* src/comm.c: Likewise.
	* src/csplit.c: Likewise.
	* src/cut.c: Likewise.
	* src/expand.c: Likewise.
	* src/fmt.c: Likewise.
	* src/fold.c: Likewise.
	* src/head.c: Likewise.
	* src/join.c: Likewise.
	* src/md5sum.c: Likewise.
	* src/nl.c: Likewise.
	* src/od.c: Likewise.
	* src/paste.c: Likewise.
	* src/pr.c: Likewise.
	* src/ptx.c: Likewise.
	* src/sort.c: Likewise. (but set exit status and file name, too)
	* src/split.c: Likewise.
	* src/sum.c: Likewise.
	* src/tac.c: Likewise.
	* src/tr.c: Likewise.
	* src/tsort.c: Likewise.
	* src/unexpand.c: Likewise.
	* src/uniq.c: Likewise.
	* src/wc.c:: Likewise.

2000-05-13  Jim Meyering  <meyering@@lucent.com>

	* src/help-version: Run each program successfully at least once.

2000-05-12  Jim Meyering  <meyering@@lucent.com>

	* src/head.c (string_to_integer): Restrict base to 10.
	Reported by Joseph S. Myers.
	* tests/head/Test.pm: Add a few tests for this.

	New option: --first-only
	* src/unexpand.c (anonymous enum) [CONVERT_FIRST_ONLY_OPTION]: Define.
	(long_options): Add `first-only'.
	(main): Handle new option.

2000-05-11  Jim Meyering  <meyering@@lucent.com>

	* tests/unexpand/basic-1: New tests.

2000-04-17  Bruno Haible  <haible@@clisp.cons.org>

	* src/system.h [__BEOS__]: Ignore O_BINARY and O_TEXT.

2000-04-16  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c: Prepare to remove option: --max-consecutive-size-changes.
	Doesn't seem useful.
	(usage): Remove description.
	* doc/textutils.texi (tail invocation): Remove description.

2000-04-12  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (usage): Tweak --help output.  Suggestions from Karl Berry.

	Move some macros into m4/.
	* configure.in (_GNU_SOURCE): Don't define here.
	(AC_SYS_LARGEFILE): Don't use here.
	(AM_C_PROTOTYPES): Don't use here.
	* acconfig.h: Remove now-unused file.

2000-04-09  Jim Meyering  <meyering@@lucent.com>

	* doc/textutils.texi: Include constants.texi.
	(tail invocation): Use `@@value's instead of referring to the
	output of `tail --help' for defaults.
	* doc/Makefile.am (constants.texi): New rule.
	(EXTRA_DIST): Add constants.texi.
	(MAINTAINERCLEANFILES): Add it here, too.
	(textutils.dvi, textutils.info): Depend on constants.texi.

	* src/tail.c (usage): Clarify descriptions of the --max-* options.
	From Karl Berry.

2000-04-03  Jim Meyering  <meyering@@lucent.com>

	* configure.in (AC_CHECK_HEADERS): Remove langinfo.h.  Now it's in m4/.
	(AC_CHECK_FUNCS): Remove nl_langinfo.  Now it's in m4/.

2000-03-17  Jim Meyering  <meyering@@lucent.com>

	* configure.in (ALL_LINGUAS): Add Slovenian (sl).

2000-03-12  Jim Meyering  <meyering@@lucent.com>

	Merge from fileutils.
	* src/system.h "pathmax.h": Include.
	<sys/time.h>: Include if appropriate.
	<time.h>: Likewise.
	<sys/mkdev.h>: Likewise.
	<sys/sysmacros.h>: Likewise.
	<utime.h>: Likewise.
	(major, minor, makedev): Define if needed.
	(struct utimbuf): Declare if missing.
	(ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): Define.

	* src/cksum.c (usage): Correct --help output.
	Prompted by a report from Gregory Leblanc.

2000-03-05  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (struct buffer.newline_free): New member.
	(initbuf, findlines): Set it.
	(fillbuf): Do not double the size of a full buffer to append a newline
	unless the buffer is known to be newline free.

2000-03-05  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0e.

2000-03-04  Jim Meyering  <meyering@@lucent.com>

	Don't get failed assertion for `tail -f directory'.
	* src/tail.c: Revert most of 1999-10-20 change.  Instead, ...
	(IS_TAILABLE_FILE_TYPE): Define to produce similar result.
	(recheck): Use it here.
	(tail_file): Use it here.
	Reported by Franois Pinard.

	Once we encounter a file that is not of IS_TAILABLE_FILE_TYPE,
	marke it as such and ignore it forever after.
	* src/tail.c (struct File_spec): New member.
	(recheck): Initialize new member.
	(tail_file): Likewise.
	(tail_forever): Skip the file if it's marked as ignorable.

2000-03-03  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (fillbuf): Move declaration of local, cc, into scope of
	`while' loop where it's used.

2000-03-02  Paul Eggert  <eggert@@set.twinsun.com>

	Big performance improvement when sorting many small files,
	building on a suggestion by Charles Randall.

	* src/sort.c (fillbuf): Skip memmove if it would be a no-op,
	as many memmove implementations are slow in that case.
	Don't examine leftover bytes for eolchar, since they may be left
	over from a previous file, and we want to read from this file.

	(sort): At end of file, if there is more input and buffer room,
	concatenate the next input file.

2000-02-29  Jim Meyering  <meyering@@lucent.com>

	* src/join.c (make_blank): Add an explicit cast to `unsigned char *'
	to placate HPUX's C compiler.  Reported by Bob Proulx.

2000-01-30  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0d.

	* Makefile.maint (my-distcheck): Depend on po-check, so I'll be warned
	about any required changes at `make distcheck' time rather than at
	`make alpha' time.
	(writable-files): New target.
	(my-distcheck): Depend on it.
	(alpha): Likewise.

	* po/POTFILES.in: Add these: lib/makepath.c, lib/rpmatch.c,
	and lib/same.c

2000-01-29  Jim Meyering  <meyering@@lucent.com>

	* configure.in: Remove lib-check for cposix now that we use
	m4/isc-posix.m4.
	(jm_LIB_CHECK): Use this even though the library checks aren't
	required for this patchage (so all three lib/Makefile.in files
	will be the same).

2000-01-24  Mark Kettenis  <kettenis@@gnu.org>

	* src/tsort.c (exit_status): New variable.
	(loop): New varibale.
	(count_items, scan_zeroes): Change return type to int.
	(detect_loop): Complete rewrite to correctly implement detection
	of loops.  Also change return type to int.
	(recurse_tree): Stop if ACTION returns non-zero.  This involves
	changing the return type of this function and ACTION to int.
	(walk_tree): Change return type of ACTION to int.
	(tsort): Continue sort after a loop has been detected (and
	broken).  Set exit_status to 1 if a loop was detected.
	(main): Use exit_status to determine exit code.
	* tests/tsort/basic-1: Change expected output for cycle-1 and
	cycle-2 tests.

2000-01-23  Jim Meyering  <meyering@@lucent.com>

	* configure.in (AM_FUNC_STRTOD): Move to m4/.
	(AC_SUBST(POW_LIBM)): Likewise.

2000-01-22  Jim Meyering  <meyering@@lucent.com>

	* src/sort.c (keycompare): Use global, hard_LC_COLLATE in place of
	local that is sometimes undeclared.

	* configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR).
	(AC_CHECK_HEADERS): Move these checks into m4/.

	* src/tr.c ("xstrtol.h"): Include.
	(Filter): Rename from PFL.
	(non_neg_strtol): Remove function.
	(find_bracketed_repeat): Use xstrtoul instead of non_neg_strtol.
	(squeeze_filter, set_initialize, main): Use size_t and ssize_t in
	place of long and int in several decls.
	(read_and_delete, read_and_xlate): Likewise, and remove assertion.
	* tests/tr/Test.pm (o-rep-1, o-rep-2): New tests.

	* src/cut.c: Correct copying notice to use GPL, per author's request.
	* src/paste.c: Likewise.
	(AUTHORS): Add djm.

1999-09-19  Bruno Haible  <haible@@clisp.cons.org>

	* src/tr.c (PFI): Return `long', not `int'.
	(PFL): Rename from PFI now that it returns long.
	(squeeze_filter): Declare as `long': i, nr, out_len.

2000-01-17  Paul Eggert  <eggert@@twinsun.com>

	Tweak sort performance.

	* src/sort.c (hard_LC_CTYPE): Remove.
	(keylist): Renamed from keyhead.  Now a pointer, not a
	mostly-unused struct.  All uses changed.
	(findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps,
	sort): Tune and use a more consistent style for reallocation.
	(keycompare, main): Don't worry about LC_CTYPE;
	it's buggy with multibyte chars anyway.
	(compare): Invoke alloca (0) after each call to keycompare,
	not just the ones that return nonzero.  This avoids a memory
	leak on architectures without builtin alloca that occurs
	sometimes when a file contains all duplicate lines.

2000-01-17  Paul Eggert  <eggert@@twinsun.com>

	* src/csplit.c (interrupt_handler, main):
	Don't use SA_INTERRUPT to decide whether to call sigaction, as
	POSIX.1 doesn't require SA_INTERRUPT and some systems
	(e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
	it's been part of POSIX.1 since day 1 (in 1988).
	* src/sort.c (sighandler, main): Likewise.

2000-01-16  Jim Meyering  <meyering@@lucent.com>

	* lib/Makefile.am: Merge with fileutils/lib/Makefile.am.

	* configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_STRFTIME,
	AC_FUNC_VPRINTF, and AC_FUNC_ALLOCA.  Now they're in m4/.

2000-01-15  Jim Meyering  <meyering@@lucent.com>

	* configure.in (AC_REPLACE_FUNCS): Remove these: memcpy memset stpcpy
	strpbrk strtol strtoul.  Now that's in m4/.

	unexpand could infloop
	* src/unexpand.c (TAB_STOP_SENTINEL): Define.
	(unexpand): Use it instead of INT_MAX.
	Declare column and pending to be `unsigned'.
	Increment pending and column counters only if column is smaller
	than TAB_STOP_SENTINEL.
	* tests/Makefile.am (SUBDIRS): Add unexpand.
	* tests/unexpand/basic-1: New tests for the above-fixed bug.
	* configure.in (AC_OUTPUT): Add tests/unexpand/Makefile.
	Reported by John Kodis.

2000-01-12  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (fillbuf): Avoid quadratic behavior with long lines.
	Also, stop worrying about ancient memchr bug (misbehavior when
	size is zero), since other code doesn't worry either.

2000-01-11  Jim Meyering  <meyering@@lucent.com>

	Sync lib/ directories of sh-utils, and textutils.

	* lib/Makefile.am (libfetish_a_SOURCES): Add getdate.y, posixtm.c,
	basename.c, canon-host.c, readutmp.c, stripslash.c, xgetcwd.c,
	xgethostname.c.
	(noinst_HEADERS): Add getdate.h, group-member.h, posixtm.h,
	pathmax.h, readutmp.h

	* lib/Makefile.am: s/tu/fetish/
	* src/Makefile.am: s/libtu/libfetish/

2000-01-10  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0c.

	* Makefile.maint (announcement): Include URLs for xdelta files.
	(alpha): Use scp, not ncftp.

	* lib/Makefile.am (noinst_HEADERS): Add nanosleep.h.

2000-01-08  Jim Meyering  <meyering@@ascend.com>

	* Version 2.0b.

	More nits.
	* src/cut.c (OUTPUT_DELIMITER_OPTION): Define this and use it
	instead of `CHAR_MAX + n'.
	* src/pr.c (PAGES_OPTION, COLUMNS_OPTION): Likewise.

2000-01-07  Jim Meyering  <meyering@@ascend.com>

	* tests/tsort/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix
	to exported PATH value (though not strictly necessary, here).
	* tests/md5sum/Makefile.am: Likewise.

	Nits.
	* lib/memcasecmp.c: Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
	Capitalize all macro parameters.
	(memcasecmp): Ansideclify.
	Don't cast away `const'ness of parameters.
	* lib/strpbrk.c (strpbrk): Ansideclify.
	Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
	Suggestions from Franois Pinard.

2000-01-06  Jim Meyering  <meyering@@ascend.com>

	* tests/tail-2/assert: Tell the user just before sleeping for 7 seconds.

	* tests/tail-2/Makefile.am (TESTS): Remove fflush test.  It didn't
	test the losing behavior, and left a stray tail process to boot.

2000-01-01  Jim Meyering  <meyering@@ascend.com>

	* Version 2.0a.

	* lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in.

1999-12-12  Jim Meyering  <meyering@@ascend.com>

	Move 120+ lines of stat.h-related macros from system.h (not shared)
	to sys2.h, which is shared between fileutils, sh-utils, textutils.
	* src/system.h: Move them from here...
	* src/sys2.h: ... to here.

1999-12-09  Jim Meyering  <meyering@@ascend.com>

	* configure.in (ALL_LINGUAS): Add Galician (gl).

1999-12-06  Jim Meyering  <meyering@@ascend.com>

	* tests/tail-2/fflush: New test for latest change.
	* tests/tail-2/Makefile.am (TESTS): Add fflush.

1999-10-26  Marc Boucher  <marc@@mbsi.ca>

	* src/tail.c (main): Flush stdout before switching to unbuffered mode
	and calling tail_forever.  Required only on Solaris2.7 -- on other
	systems, using setvbuf to switch to unbufferd mode does the flush.

1999-11-22  Jim Meyering  <meyering@@ascend.com>

	* lib/Makefile.am (DISTCLEANFILES): Put $(BUILT_SOURCES) here rather
	than in $(MAINTAINERCLEANFILES).

	* src/tail.c (recheck): Handle a race condition (including <dev,inode>
	reuse) that would lead to a failed assertion.
	Reported by Ken Pizzini.
	(tail_forever): Record errno before using it in call to `error'
	which might change it.
	(tail_file): Likewise.

	New test for the above.
	* tests/tail-2/assert: New file.
	* tests/tail-2/Makefile.am: New file.
	* tests/tail-2: New directory.
	* tests/Makefile.am (SUBDIRS): Add tail-2.
	* configure.in (AC_OUTPUT): Add tests/tail-2/Makefile.

1999-11-05  Jim Meyering  <meyering@@ascend.com>

	* src/system.h: Use HAVE_STRUCT_STAT_ST_BLKSIZE not HAVE_ST_BLKSIZE.

	* configure.in: Move some type/header/member tests into
	m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of
	fileutils, textutils, and sh-utils.

1999-11-04  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (SORTALLOC): New macro.
	(sortalloc, mergealloc, LINEALLOC): Use it.
	(sortalloc, mergealloc, linelength): Now const.
	(sortalloc): Increase from 0.5 to 8 MB.
	(mergealloc): Increase from 16 to 256 kB.
	(LINEALLOC): Increase from 0.25 to 4 MB.

1999-11-03  Paul Eggert  <eggert@@twinsun.com>

	* NEWS, doc/textutils.texi:
	Do not consider newline to be part of a line when comparing lines
	in `sort' and `comm'.  POSIX.2 requires that we consider newline,
	but this is a bug in the spec and the bug will likely be fixed.
	* src/comm.c (compare_files): Likewise.
	* src/sort.c (begfield, limfield, findlines, keycompare, compare):
	Likewise.
	* tests/sort/Test.pm:  Update tests `use-nl' and `11d' to reflect
	this change.

	* lib/linebuffer.c (readline): Do not leave room for an extra
	byte after the newline; it's no longer needed.
	* src/sort.c (sortalloc, mergealloc, fillbuf, checkfp, mergefps):
	Likewise.

	* lib/memcoll.c (memcoll): The two arguments cannot be
	adjacent any more, so remove the alloca/copy workaround for
	that case.

1999-11-03  Jim Meyering  <meyering@@ascend.com>

	Fix so that `tail -fn 2 file' works again.
	* src/tail.c (anonymous enum) [LONG_FOLLOW_OPTION]: Define.
	(long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'.
	(main): Remove the `::' after the `f' in getopt_long string.
	Add `case LONG_FOLLOW_OPTION' after `case 'f':'.
	Based on a patch from Tim Waugh.

	* src/tail.c (anonymous enum) [RETRY_OPTION]: Define.
	[MAX_UNCHANGED_STATS_OPTION]: Likewise.
	[MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise.
	[PID_OPTION]: Likewise.
	(long_options): Use *_OPTION instead of CHAR_MAX + N.
	(main): Likewise.

1999-11-02  Jim Meyering  <meyering@@ascend.com>

	* man/help2man: Import version 1.018.
	* man/Makefile.maint ($(man_MANS)): Remove use of --name=... option.
	* man/*.x: Include one-line summary in [NAME] section.
	* man/Makefile.summ (cat-summary): Remove now-unused file.
	* man/Makefile.am (EXTRA_DIST): Remove Makefile.summ.
	* man/Makefile.maint: Include Makefile.summ with leading `-'.
	This file is shared by fileutils and sh-utils, both of which still
	have the file (albeit nearly empty now).
	Suggestion for clean-up from Akim Demaille.

1999-11-01  Jim Meyering  <meyering@@ascend.com>

	* lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).

1999-10-20  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (recheck): Don't refuse to tail a non-regular, non-pipe.
	(tail_file): Likewise.

1999-10-07  Jim Meyering  <meyering@@ascend.com>

	* configure.in (ALL_LINGUAS): Add Japanese (ja).

1999-10-04  Jim Meyering  <meyering@@ascend.com>

	* depcomp: New file, for automake's new dependency support.
	* missing: New version, from automake's user-dep-gen-branch.

1999-09-28  Jim Meyering  <meyering@@ascend.com>

	* src/system.h: Update from the system.h from fileutils.

	* lib/error.c (error_at_line): Use strerror portably here, too,
	just as was done in error.

1999-09-02  Jim Meyering  <meyering@@ascend.com>

	* src/cut.c: Remove xstrdup declaration.
	* src/sort.c: Likewise.
	* src/tsort.c: Likewise.

1999-08-22  Jim Meyering  <meyering@@ascend.com>

	* src/tsort.c (detect_loop): There's no loop if k->top is NULL.
	Niklas Edmundsson showed how to make tsort segfault.

	* tests/tsort/Makefile.am: Rewrite to use Fetish.pm-based framework.
	* tests/tsort/basic-1: New file.
	Add a few more tests.
	* tests/tsort/Test.pm: Remove.

	* man/help2man: Escape backslashes so tr's manual comes out right.
	Reported by Andreas Schwab.

	* src/tsort.c (usage): Correct address for bug reports.
	(tsort): Remove trailing `\n' in error format.

	* src/md5sum.c (md5_check): Remove trailing `\n' in error format.

	* src/sys2.h (IF_LINT): Define new macro.
	* src/od.c (dump): Use IF_LINT macro instead of #ifdef lint...
	(main): Likewise.
	* src/paste.c (paste_parallel): Likewise.
	* src/pr.c (read_line): Likewise.
	* src/sort.c (checkfp): Likewise.
	(mergefps): Likewise.

	* src/cksum.c (cksum): Constify a char*.
	* src/comm.c (writeline): Likewise.

	* src/uniq.c (check_file): Move declarations of local variables
	into the scopes where they're used.
	(min): Remove macro definition.
	(different): Use MIN, not min.
	(SWAP_LINES): New macro.
	(check_file): Use it here.

	* src/uniq.c (check_file): Generate each line of output earlier,
	when possible.  It is possible when using none of these options:
	--count, -repeated, --all-repeated, --unique.
	Based on a patch from Ian Turner.

1999-08-15  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (ENOSYS): Define to a bogus value if not already defined.

1999-08-13  Eli Zaretskii  <eliz@@is.elta.co.il>

	* src/tail.c (parse_options): Warn if --pid=PID is used and kill()
	returns ENOSYS (e.g. when compiled with DJGPP).

1999-08-13  Jim Meyering  <meyering@@ascend.com>

	* src/tsort.c (usage): Use consistent bug-reporting address.

	* tests/tsort/Test.pm: New file.
	* tests/tsort/Makefile.am: New file.
	* tests/tsort: New directory.
	* tests/Makefile.am (SUBDIRS): Add tsort.
	* configure.in (AC_OUTPUT): Add tests/tsort/Makefile.

1999-08-11  Paul Eggert  <eggert@@twinsun.com>

	* doc/textutils.texi: Document how to ignore newline during sort.

1999-08-07  Jim Meyering  <meyering@@ascend.com>

	* po/POTFILES.in: Add lots of lib/*.c files.  Remove src/system.h.

1999-08-06  Jim Meyering  <meyering@@ascend.com>

	* Version 2.0.

	* src/sort.c: Include file name in `write error' diagnostics.
	(write_bytes): Add output_file parameter and use it.  Update callers.
	(mergefps): Likewise.
	(merge): Likewise.
	(sort): Likewise.
	Reported by John Summerfield.

1999-08-05  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (Follow_mode): Remove comma at end of enumerator list.
	Reported by Kaveh Ghazi.

	* config.sub: Update from autoconf.
	* config.guess: Update from autoconf.

1999-08-04  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22q.

	* configure.in: Remove inadequate getline-testing code.  md5sum would
	segfault on HPUX because of the getline function in their C library.
	Use the AM_FUNC_GETLINE test in m4/ instead.

1999-08-03  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (tail_forever): When following by name and calling recheck
	because of exceeding max_n_consecutive_size_changes_between_opens,
	`continue' so we don't fall through and (assuming the file finally grew)
	get the erroneous `file truncated' message.  This was hard to reproduce.

1999-08-01  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22p.

	* configure.in (AM_C_PROTOTYPES): Move test to precede a few
	header tests -- merely on principle.

1999-08-01  Paul Eggert  <eggert@@twinsun.com>

	* configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS.

1999-07-16  Paul Eggert  <eggert@@twinsun.com>

	* lib/quotearg.c (quotearg_buffer):
	Don't quote spaces if C quoting style.

1999-07-31  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (tail_forever): Don't call kill if pid is 0.
	Detect when `writer_is_dead' also when the writer is some other user.
	From Karl Heuer.

	* src/tail.c (parse_options): Warn if --pid=PID is used without -f.

1999-07-30  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22o.

	* src/tail.c: New option: --pid=PID.
	Include signal.h for kill prototype.
	(pid): New global.
	(long_options): Add `pid'.
	(usage): Describe it.
	(tail_forever): Implement it.
	(parse_options): Handle the new option and required arg.
	Suggestion and pseudo-code from Karl Heuer.

1999-07-27  Jim Meyering  <meyering@@ascend.com>

	* lib/linebuffer.c: Include <sys/types.h> now that linebuffer.h uses
	size_t.  This is required on at least SunOS4.  From Kaveh Ghazi.

1999-07-26  Jim Meyering  <meyering@@ascend.com>

	* src/sys2.h (PID_T_MAX): Define.

	* src/tail.c (struct File_spec) [n_stat_calls]: Remove unused member.

1999-07-25  Jim Meyering  <meyering@@ascend.com>

	* src/pr.c (usage): Remove `NEWS'-style paragraph (sorry to have
	let that in, translators).

	* Version 1.22n.

1999-06-01  Volker Borchert  <bt@@teknon.de>

	* tests/Makefile.am: Make envvar-check depend on check-recursive rather
	than on `check' so that its tests are performed before any real tests.

1999-07-20  Jim Meyering  <meyering@@ascend.com>

	* configure.in (AC_REPLACE_FUNCS) Remove memmove, now that it's
	AC_REPLACE...'d in m4/jm-macros.m4.

	* src/wc.c (posixly_correct): Declare global.
	(write_counts): Use it to select printf formats.
	(main): Set posixly_correct from the POSIXLY_CORRECT envvar.
	From Peter Moulder.

1999-07-15  Jim Meyering  <meyering@@ascend.com>

	* tests/md5sum/Makefile.am: Revert the 1999-02-15 change.
	* tests/md5sum/basic-1, newine-1: Add --text for each individual test.
	Reported by Eli Zaretskii.

1999-07-12  Jim Meyering  <meyering@@ascend.com>

	* configure.in (ALL_LINGUAS): Add Slovak (sk).

1999-07-11  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (recheck): Use assert instead of unnecessary close_fd.
	Remove a couple of unnecessary FIXME comments.

1999-07-10  Jim Meyering  <meyering@@ascend.com>

	* doc/textutils.texi: Document new tail options.

	* src/tail.c (struct File_spec) [tailable]: Rename from `missing' and
	document.  Change all uses and locals like was_missing to was_tailable.
	Invert expressions as appropriate.
	(reopen_inaccessible_files): Rename from allow_missing.
	(sleep_interval): Describe.
	(--allow-missing): Deprecate.
	(--retry): New option, equivalent to --allow-missing.
	(usage): Document name vs. descriptor differences.
	Refer to manual for descriptions of --max-unchanged-stats=N
	and --max-consecutive-size-changes=N.
	(valid_file_spec): New function.
	(recheck): Assert valid_file_spec.
	Remove dead else-if block (suggestion from Eli Zaretskii).
	Adjust stmts that set f->tailable -- unlike for `missing', tailable
	doesn't depend on errno == ENOENT.
	(parse_options): Give a warning if --retry is used when not following
	by name.

	* tests/join/Test.pm: New test case (but commented out) for
	Paul's 1999-06-01 fix.

1999-07-09  Jim Meyering  <meyering@@ascend.com>

	* configure.in (ALL_LINGUAS): Add Greek (el).

1999-07-04  Jim Meyering  <meyering@@ascend.com>

	* tests/join/Test.pm: New test case for Paul's 1999-06-03 fix.

1999-07-03  Eli Zaretskii  <eliz@@is.elta.co.il>

	* src/tail.c (struct File_spec): New member, errnum.
	(recheck): Record the new value of errno in f->errnum.  Don't
	output an error message unless the new value of errno differs from
	the old one.  Output a message if previously-inaccessible file
	becomes accessible.
	(tail_forever): Always recheck files whose fd is negative.  If the
	file cannot be fstat'ed, record the errno value in f[i].errnum.
	(tail_file): If the file cannot be open, record the errno value in
	f->errnum.  If it can be opened, initialize f->errnum to zero.  If
	it's a non-regular non-fifo file, initialize f->errnum to -1.

1999-06-21  Jim Meyering  <meyering@@ascend.com>

	* doc/textutils.texi: Use lower case characters in sc{} context.
	Reported by Eli Zaretskii.

1999-06-03  Paul Eggert  <eggert@@shade.twinsun.com>

	* src/join.c (xfields): Only <blank>s separate fields, not <space>s.

1999-06-01  Paul Eggert  <eggert@@twinsun.com>

	* lib/linebuffer.c (readline): Leave room for an extra byte
	after the newline; comm needs this for memcoll.

1999-06-01  Paul Eggert  <eggert@@twinsun.com>

	Add LC_COLLATE support to `join'.

	* doc/textutils.texi: Describe join and LC_COLLATE.

	* src/join.c: Add support for LC_COLLATE locale.
	Include hard-locale.h, linebuffer.h, memcoll.h.
	(struct line): New member `buf', replacing `beg' and `lim'.
	All uses changed.
	(hard_LC_COLLATE): New var.
	(main): Initialize it.
	(get_line): Use readline to read the line,
	instead of doing it by hand.
	That way, we get a buffer that we can pass to memcoll.
	(keycmp): Use memcoll to compare lines if hard_LC_COLLATE is nonzero.

1999-05-27  Volker Borchert  <bt@@teknon.de>

	* tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix.

1999-05-25  Paul Eggert  <eggert@@twinsun.com>

	Add LC_COLLATE support to `comm', so that `comm' is compatible
	with `sort' in nontrivial locales.

	* doc/textutils.texi: Document locale-specific mode for comm.

	* lib/Makefile.am (libtu_a_SOURCES): Add hard-locale.c, memcoll.c.
	(noinst_HEADERS): Add hard-locale.h, memcoll.h.

	* src/comm.c: Include hard-locale.h, memcoll.h.
	(hard_LC_COLLATE): New variable.
	(compare_files): Use memcoll to compare if hard_LC_COLLATE.
	(main): Initialize hard_LC_COLLATE from locale.

	* src/sort.c: Include hard-locale.h, memcoll.h.
	(hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables,
	replacing `need_locale'.
	(memcoll): Move to lib/memcoll.c.
	(keycompare): No need to alloc (0), since our caller now does it.
	(compare): alloca (0) before returning.
	(my_setlocale): Remove; hard_locale now dows this.
	(main): Invoke setlocale, bindtextdomain, and textdomain before
	invoking anything that might print an error.
	Use hard_locale to determine which locales are hard.

	* lib/hard-locale.c, lib/hard-locale.h, lib/memcoll.c, lib/memcoll.h:
	New files.

1999-05-25  Paul Eggert  <eggert@@shade.twinsun.com>

	* lib/linebuffer.c (readline):
	Append trailing newline to line.
	* lib/linebuffer.h
	[struct linebuffer] (size): Declare to be of type size_t, not long.
	[struct linebuffer] (length): Likewise.
	* src/comm.c, (writeline): Lines now contain trailing newline.
	* src/uniq.c (find_field, different): Use size_t, not int, for lengths.
	(writeline): Lines now contain trailing newline.
	(check_file): Use size_t, not int, for lengths.
	* src/nl.c (proc_text, check_section, main): More of the same.

	* lib/linebuffer.h (struct linebuffer): Use size_t for sizes.
	src/nl.c (header_del_len, body_del_len, footer_del_len, main):
	Likewise.
	src/uniq.c (find_field, different, check_file): Likewise.

	* lib/linebuffer.c (readline): Silently append trailing
	newline if needed.  Do not bother setting buffer length to 0
	at EOF, since it's not part of the spec and nobody relies on
	it.  Do not compute the difference between unrelated pointers.

1999-05-25  Paul Eggert  <eggert@@twinsun.com>

	* src/tac.c (memrchr): Ifdef out this unused function.

1999-05-25  Jim Meyering  <meyering@@ascend.com>

	* doc/textutils.texi (Squeezing): Remove misleading square brackets
	from SET1 in the one-word-per-line example.

1999-05-22  Jim Meyering  <meyering@@ascend.com>

	* lib/Makefile.am (libtu_a_SOURCES): Remove memchr.c.
	From Ulrich Drepper.

	* Version 1.22m.

1999-05-22  Paul Eggert  <eggert@@twinsun.com>

	* doc/textutils.texi: Document locale-specific changes to `sort',
	as well as the new, POSIX-compliant definition of line comparison,
	and -g's more careful treatment of NaNs, infinities and zeros.

	* src/sort.c (general_numcompare): Put exceptional cases
	first, not last, to be consistent with -M.

1999-05-21  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (strtod): Declare if STDC_HEADERS is not defined.
	(general_numcompare): Use strtod, not xstrtod.
	Do not consider partial conversions to be errors.
	Put -infinity at the start, and +infinity at the end;
	follow +infinity with NaNs (sorted by bit pattern),
	and finally by conversion errors.

1999-05-21  Jim Meyering  <meyering@@ascend.com>

	* tests/sort/Test.pm (11d): Reverse lines in expected output
	to reflect latest change.
	(use-nl): New test from Paul Eggert.

1999-05-20  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c: Treat the trailing newline as part of the line,
	as required by POSIX.2.

	(struct line, findlines, compare, checkfp, mergefps, sort):
	A line now includes its trailing newline.
	(findlines): Do not replace newline with NUL.
	(memcoll, keycompare): Work even if the data to be compared are
	adjacent strings; this is possible now that lines contain the
	trailing newline.
	(fillbuf): Always have an unused byte at the end of the	buffer,
	since memcoll and keycompare want to modify a byte after the last line.
	(sortalloc, mergealloc): Increase by 1, for trailing byte.

1999-05-20  Jim Meyering  <meyering@@ascend.com>

	* tests/sort/Test.pm: Add test case from Paul Eggert.

1999-05-20  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (keycompare): Ignore any length difference if the
	localized comparison says the strings are equal.

	* src/sort.c (memcoll, keycompare, compare): Handle NUL
	characters properly when comparing with LC_COLLATE semantics.
	(NLS_MEMCMP): Remove.
	(memcoll): Renamed from strncoll.
	Take separate lengths for each string.
	This function is now invoked only when need_locale.
	(keycompare): Don't copy strings when ignore and translate
	are both NULL.

1999-05-18  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (MONTHTAB_CONST): Renamed from NLS_CONST; the use
	is also changed.  Define to const also if !HAVE_NL_LANGINFO.

	(usage): `,' -> `;' (English typo).

1999-05-17  Eli Zaretskii  <eliz@@is.elta.co.il>

	* src/cat.c (main): When stdout is in binary mode, make sure all
	input files are also read in binary mode.

1999-05-16  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22l.

1999-05-11  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c: Don't autodetect the locale of numbers and
	months, as this conflicts with POSIX.2 and is tricky to boot.

	(FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS,
	NLS_ONE_CHARACTER_STRING): Remove macros no longer used.

	(nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab,
	nls_months_collide, nls_keyhead, us_monthtab): Remove variables no
	longer used.

	(struct nls_keyfield): Remove types no longer used.

	(strncoll_s2_readonly, nls_set_fraction, look_for_fraction,
	nls_month_is_either_locale, nls_numeric_format): Remove functions no
	longer used.

	(monthtab): Now has the role that us_monthtab had, but it's const only
	if ENABLE_NLS is not defined.

	(C_DECIMAL_POINT): Renamed from FLOATING_POINT.  All uses changed.
	(MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS.  All uses changed.
	(struct_month_cmp): Renamed from nls_sort_month_comp.  All uses changed.
	Use strcmp, not strcoll, since the user doesn't care about collating
	here.

	(inittables): Read locale data into monthtab, rather than modifying a
	separate month table and futzing with indirection.  Do not worry about
	colliding months, since we no longer autodetect month locale.

	(fraccompare): Don't set no-longer-used variable nls_fraction_found.

	(getmonth): Use strncmp to compare months, since user doesn't care
	about collating here.  Fix bug where code incorrectly assumed that
	strlen (monthtab[lo].name) == strlen (monthtab[ix].name).

	(keycompare, main): Don't autodetect month locale.

	(compare): Don't use NLS_MEMCP in code that can't be executed if
	need_locale is false, as NLS_MEMCP is equivalent to memcmp in that
	case.

	(sort, insertkey, main): Don't autodetect numeric locale.

1999-05-15  Jim Meyering  <meyering@@ascend.com>

	* tests/join/Test.pm (trailing-sp): New test for this fix.
	* src/join.c (xfields): Don't interpret a trailing blank as a
	delimiter when e.g. -t: was specified.  From Tim Smithers.

1999-05-12  Jim Meyering  <meyering@@ascend.com>

	* tests/Makefile.am (envvar-check): Renamed from check-local.
	(check): Depend on envvar-check so the envvar check is performed
	before all other tests.  Reported by Volker Borchert.
	* tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects,
	so CDPATH is mentioned in the message.  Reported by Volker Borchert.

1999-05-11  Jim Meyering  <meyering@@ascend.com>

	* src/sort.c (usage): Split the --help message into two pieces so that
	neither is longer than 2048.  For Irix4's cc.  Reported by Kaveh Ghazi.

1999-05-09  Jim Meyering  <meyering@@ascend.com>

	* lib/regex.c: Update from libc.

	* Version 1.22k.

	* Makefile.maint (alpha): Put the announcement in
	/tmp/announce-$(distdir)

	* tests/sort/Test.pm (neg-nls): New test.

1999-05-08  Jim Meyering  <meyering@@ascend.com>

	* src/system.h (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM,
	and all the *_MIN and *_MAX symbols): Remove definitions.
	* src/sys2.h: Put the definitions here instead (this file is shared
	between all three *utils packages, while system.h is not).

1999-05-06  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (fraccompare, numcompare): Merge the NLS and
	non-NLS versions into a single function.

	(decimal_point): Now char, since we no longer convert to unsigned
	char.
	(th_sep): Now int, since we use a value out of char range to denote
	the absence of a thousands separator.
	(IS_THOUSANDS_SEP): New macro.
	(USE_NEW_FRAC_COMPARE): Remove.
	(nls_set_fraction): Arg is now char, not unsigned char.
	Set th_sep to CHAR_MAX + 1 if there is no thousands separator.
	(numcompare): Don't convert to unsigned char unless necessary.
	(main): Turn off decimal points and thousand separators if they
	are multibyte characters, as we don't support that yet.

1999-05-06  Paul Eggert  <eggert@@twinsun.com>

	* src/system.h (CHAR_MIN, CHAR_MAX): New macros.
	(SCHAR_MIN, SCHAR_MAX): Don't assume that char is signed.

1999-05-06  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (numcompare): Handle comparison of two negative
	numbers correctly in the ENABLE_NLS case.

1999-05-04  Jim Meyering  <meyering@@ascend.com>

	* src/pr.c (usage): Break the usage message into 3 pieces instead of
	only 2.  The strings had grown to be longer than 2048, which evokes
	errors when compiling with Irix4's cc.  Reported by Kaveh Ghazi.

	* src/tsort.c (search_item): Use `1' instead of `+1'.  The latter
	elicits a syntax error from SunOS4's cc.  From Kaveh Ghazi.

1999-05-03  Jim Meyering  <meyering@@ascend.com>

	* src/ptx.c <ctype.h>: Don't include.
	[!STDC_HEADERS]: Remove definitions of ctype macros.
	Convert e.g., isspace to ISSPACE to use definitions from sys2.h.
	Reported by Kaveh Ghazi.

	* src/sys2.h (TOLOWER): Define.
	(TOUPPER): Define.
	* src/join.c (TOLOWER): Remove definition.
	* src/md5sum.c (TOLOWER): Remove definition.

1999-04-30  Jim Meyering  <meyering@@ascend.com>

	* src/sort.c (usage): Document the differences between the
	obsolescent, +POS1[-POS2] form, and the POSIX -k option.

1999-04-24  Jim Meyering  <meyering@@ascend.com>

	* configure.in: Use AC_CANONICAL_HOST.

	* lib/Makefile.am (libtu_a_SOURCES): Add xstrtoumax.c
	(noinst_HEADERS): Remove xstrtoul.h.

	* src/csplit.c: Include new "xstrtol.h", not "xstrtoul.h".
	(struct control) [repeat]: Declare as uintmax_t, not int.
	(struct control) [lines_required]: Likewise.
	(handle_line_error): Use human_readable to print lines_required.
	(parse_repeat_count): Parse a uintmax_t.
	(parse_patterns): Parse a uintmax_t.

	* src/tail.c: Include new "xstrtol.h", not "xstrtoul.h".
	* src/od.c: Likewise.

	* src/head.c: Include new "xstrtol.h", not "xstrtoul.h".
	Change all U_LONG_LONG to uintmax_t.
	(head_lines): Move a couple dcls into an inner scope.
	(string_to_integer): Rename from string_to_ull.

1999-04-19  Jim Meyering  <meyering@@ascend.com>

	* Makefile.maint (b_host): Remove /pub suffix.

1999-04-18  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22j.

	* Makefile.maint (my-distcheck): Use AMTAR, not TAR.

	* src/sort.c (usage): s/DIRECT/DIRECTORY/g
	Rename global: s/temp_file_prefix/temp_dir/.
	(NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR.  Use _POSIX_NAME_MAX,
	not _POSIX_PATH_MAX.  Guard with #if HAVE_PATHCONF rather than
	#if HAVE_UNISTD_H.
	(tempname): Wrap after 99999 only for length-impaired file systems.

1999-04-17  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (file_lines): Fix serious bug introduced with last changes.
	From Andreas Schwab.

1999-04-15  Jim Meyering  <meyering@@ascend.com>

	* tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn.
	(check-local): Warn about CDPATH in the same way
	we warn about POSIXLY_CORRECT, since the cp/same-file test fails at
	least when using bash with CDPATH set.  Reported by Mark Hewitt.

	* src/pr.c Add comments.
	(init_header): Tweak white space in Date/Time header.
	* tests/pr/Test.pm: Updated all tests to reflect the big
	1999-02-13 change.  From Roland Huebner.

1999-04-12  Jim Meyering  <meyering@@ascend.com>

	* src/cat.c (main): Declare out_dev to be of type dev_t, not `int'.
	Declare out_ino to be of type ino_t, not `int'.
	From John Bley.

	* src/od.c (MIN, MAX): Remove definitions.
	* src/sys2.h (MIN, MAX): Define here instead.
	Reported by John Bley.

1999-04-11  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22i.

	* tests/pr/Test.pm (test_vector): Disable all tests while I wait for
	an updated suite.

	Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop.
	* src/tail.c (COPY_TO_EOF): Define.
	(dump_remainder): Add parameter, n_bytes, and rewrite to use it.
	Update callers.
	(file_lines): Rename parameter.
	(tail_bytes): Remove obsolete comment.

	Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop.
	* src/tail.c (dump_remainder): Move this function to precede the
	new use in file_lines.
	(tail_lines): Don't call dump_remainder here.
	(file_lines): Call dump_remainder here instead.
	Reported by Lehti Rami.

	* lib/readtokens.c (readtoken, readtokens): Protoize.

1999-04-10  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'.

1999-04-04  Jim Meyering  <meyering@@ascend.com>

	* src/cat.c: Standardize --help and --version processing.
	* src/comm.c: Likewise.
	* src/csplit.c: Likewise.
	* src/cut.c: Likewise.
	* src/expand.c: Likewise.
	* src/fmt.c: Likewise.
	* src/fold.c: Likewise.
	* src/head.c: Likewise.
	* src/join.c: Likewise.
	* src/md5sum.c: Likewise.
	* src/nl.c: Likewise.
	* src/od.c: Likewise.
	* src/paste.c: Likewise.
	* src/pr.c: Likewise.
	* src/ptx.c: Likewise.
	* src/split.c: Likewise.
	* src/sum.c: Likewise.
	* src/tac.c: Likewise.
	* src/tail.c: Likewise.
	* src/tr.c: Likewise.
	* src/unexpand.c: Likewise.
	* src/uniq.c: Likewise.
	* src/wc.c: Likewise.

1999-03-29  Jim Meyering  <meyering@@ascend.com>

	* configure.in (GNU_PACKAGE): Remove related code -- now it's in
	the catch-all for shared autoconf code, m4/jm-macros.m4.
	(jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use
	this instead.

1999-03-26  Jim Meyering  <meyering@@ascend.com>

	* lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c.
	(noinst_HEADERS): Add version-etc.h.

1999-03-25  Jim Meyering  <meyering@@ascend.com>

	* src/tail.c (recheck): Factor out a block of duplicated code.
	Set f->size to 0 upon encountering a new file so we read it from
	the beginning rather than from the end of the first line or
	block.  Otherwise, after a log rotation, tail would omit the first
	line or block of the new file.  Reported by Ed Avis.

1999-03-20  Jim Meyering  <meyering@@ascend.com>

	* tests/Makefile.am (SUBDIRS): Temporarily remove pr.

1999-03-13  Jim Meyering  <meyering@@ascend.com>

	* src/tac.c (tac_mem): `#if-0'-out this unused function.
	(tac_stdin_to_mem): Likewise.

	* doc/textutils.texi (cut invocation): Describe --output-delimiter.

1999-03-12  Jim Meyering  <meyering@@ascend.com>

	* src/sys2.h (SETVBUF): Define new macro.
	* src/tail.c (dump_remainder): Don't fflush stdout here.
	(main) [if forever]: Make stdout unbuffered, instead.
	Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' ,
	the file `a' didn't grow longer than two lines.  Now it grows
	without bound.

1999-03-07  Jim Meyering  <meyering@@ascend.com>

	* tests/md5sum/newline-1: Test for the actual feature.
	With help from Eli Zaretskii.

	* src/pr.c (usage): Add missing \n\.

	The newline test would always fail on MSDOS/Windows systems --
	so move it to a separate file where we can test for that.
	* tests/md5sum/basic-1: Remove newline test.
	* tests/md5sum/newline-1: New file.
	* tests/md5sum/Makefile.am (TESTS): Add newline-1.
	Pointed out by Eli Zaretskii.

	1999-02-13  Roland Huebner  <rh@@pelikan.cologne.de>
	* src/pr.c
	(main): Redefine options -s, -w to be POSIX compliant; introduce
	new options -J, -S, -W to disentangle -s and -w when used together
	with the three column options;
	(add_line_number): Make POSIX compliant; use default number
	separator TAB with single column output.
	(add_line_number): Make POSIX compliant; with multicolumn output
	now prefer `text columns of equal width' rather than a consequent
	use of `default n-separator TAB'.
	(add_line_number): Change line number cut-off from lower-oder to
	higher-oder digit to avoid loss of information; no consequent
	handling exists in different utilities and other UNIXes.
	(char_to_clump): Expand input text tabs to 8 spaces, if
	input_tab_char doesn't equal TAB (adapted to other UNIXes).
	(usage): Update POSIX compliant options -s, -w; add new options -J,
	-S, -W.
	(main): Update the source internal documentation.
	Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page,
	reset_status, print_header).

	* tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we
	don't tramp on root directory in MSDOS/Windows.
	Suggestion from Eli Zaretskii.

	1999-02-15  Eli Zaretskii  <eliz@@is.elta.co.il>

	* tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the
	--text option (for MSDOS).

1999-03-06  Jim Meyering  <meyering@@ascend.com>

	* src/cut.c (getstr): Change type of `delim' parameter from char to int.
	(cut_fields): Cast to `unsigned char' before comparing.
	(main): Cast to `unsigned char' before assigning.
	From Arne Juul.
	* tests/cut/Test.pm: Add a test to exercise the bug.

	* src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call,
	in case the argument string contains a `%'.
	(main): Likewise.
	* src/fmt.c (main): Likewise.
	* src/sort.c (main): Likewise.

	1999-02-13  Eli Zaretskii  <eliz@@is.elta.co.il>

	* src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>.

	* src/ptx.c (swallow_file_in_memory): Slurp up the whole file at
	once on MSDOS as well, but we have to relax the test for whether
	reading it succeeded.

1999-03-03  Jim Meyering  <meyering@@ascend.com>

	* src/cat.c: Include long-options.h
	[long_options]: Remove the "help" and "version" entries.
	Remove declarations of show_help and show_version.
	(main): Use parse_long_options, including author name(s).
	Remove the show_version and show_help blocks.
	* src/cksum.c: Likewise.
	* src/comm.c: Likewise.
	* src/csplit.c: Likewise.
	* src/cut.c: Likewise.
	* src/expand.c: Likewise.
	* src/fmt.c: Likewise.
	* src/fold.c: Likewise.
	* src/head.c: Likewise.
	* src/nl.c: Likewise.
	* src/od.c: Likewise.
	* src/paste.c: Likewise.
	* src/pr.c: Likewise.
	* src/split.c: Likewise.
	* src/sum.c: Likewise.
	* src/tac.c: Likewise.
	* src/tail.c: Likewise.
	* src/tr.c: Likewise.
	* src/unexpand.c: Likewise.
	* src/uniq.c: Likewise.
	* src/wc.c: Likewise.

	* src/ptx.c: Include long-options.h
	[long_options]: Remove the "help" and "version" entries.
	Remove declarations of show_help and show_version.
	(main): Remove `const' attribute from dcl of argv parameter.
	Call bindtextdomain and textdomain.
	Use parse_long_options, including author name(s).
	Remove the show_version and show_help blocks.

	* src/join.c (main): Include author name argument in call to
	parse_long_options.
	* src/md5sum.c (main): Likewise.
	* src/sort.c (main): Likewise.
	* src/tsort.c (main): Likewise.

1999-02-07  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22h.

	* Makefile.maint (my-distcheck): Don't depend on dist, now that this
	is hooked up to the distcheck rule.
	* Makefile.am (distcheck-hook): New target and rule -- link to shared
	rule, my-distcheck, in Makefile.maint.

1999-01-31  Jim Meyering  <meyering@@ascend.com>

	* doc/textutils.texi: Wrap the @@top node in @@ifnottex instead of
	@@ifinfo so `makeinfo --html ...' works.  From Karl Berry.

1999-01-30  Jim Meyering  <meyering@@ascend.com>

	* acconfig.h: Remove lots of `#undef's, now that we use the
	3-argument forms of AC_DEFINE* macros.

	* configure.in: Require autoconf 2.13.
	Use 3-argument form of AC_DEFINE*.

1999-01-24  Jim Meyering  <meyering@@ascend.com>

	* src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.

	* lib/quotearg.c (quotearg_n_options): Revert type of parameter `n'
	(and hence that of the local `n1', too) to `int' at Paul's request.

1999-01-18  Akim Demaille  <demaille@@inf.enst.fr>

	* doc/textutils.texi: Harmonization of @@samp use for options.

1999-01-17  Jim Meyering  <meyering@@ascend.com>

	* Makefile.am (SUBDIRS): Add djgpp.
	* configure.in (AC_OUTPUT): Add djgpp/Makefile.
	* djgpp/: New directory.

	* man/Makefile.maint ($(man_MANS)): Don't remove the target (the
	man page) until after we've created its replacement.

1999-01-16  Eli Zaretskii  <eliz@@is.elta.co.il>

	* GNUmakefile: Add SHELL = /bin/sh.
	* man/GNUmakefile: Likewise.

1999-01-16  Jim Meyering  <meyering@@ascend.com>

	* acconfig.h: Remove @@BOTTOM@@ section.
	Instead, add the define and decl via m4/jm-macros.m4.

	* lib/argmatch.h (XARGMATCH): Define to return a value once again.
	(XARGCASEMATCH): Likewise.

	* lib/argmatch.c (EXIT_FAILURE): Define.
	(ARGMATCH_DIE): Provide default.
	(__xargmatch_internal): New function.
	s/rogram_name/program_name.
	From Akim Demaille.

1999-01-14  Jim Meyering  <meyering@@ascend.com>

	* tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid
	warnings from perl5.004.
	Reported by Volker Borchert.

	* lib/long-options.c (parse_long_options): Rename `usage' parameter
	to avoid shadowing globally scoped function.

1999-01-14  Akim Demaille  <demaille@@inf.enst.fr>

	* acconfig.h: Add a @@BOTTOM@@ section.
	(ARGMATCH_DIE) [@@BOTTOM@@]: Define to usage(1).
	Declare usage.
	* src/*.c: Don't prototype usage as static.

1999-01-10  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22g.

	All of the following new code is protected by
	`#if DONT_UNLINK_WHILE_OPEN'
	* src/tac.c (file_to_remove): New global.
	(fp_to_close): New global.
	(unlink_tempfile): New function.
	(record_tempfile): New function.
	(save_stdin): Call record_tempfile.
	Use SET_BINARY.
	(main): Use SET_BINARY and SET_BINARY2.
	From Eli Zaretskii.

1999-01-09  Jim Meyering  <meyering@@ascend.com>

	* tests/uniq/Test.pm: Add tests from Jochen Hein.
	* src/uniq.c: New option: --all-repeated (-D).
	(output_all_repeated) [output_mode]: New enum value.
	(usage): Describe it.
	(writeline): Test for new mode.
	(check_file): Likewise.
	Based on patches from Jochen Hein and Florin Iucha.
	(main): Diagnose `too many arguments'.

	* tests/head/Test.pm (null-1): Add test from Jochen Hein.

	* src/tail.c (parse_obsolescent_option): Interpret `number' as decimal.
	(parse_options): Likewise.
	Reported by Kamal Paul Nigam.

	* src/tail.c: New option: --max-unchanged-stats=N.
	New option: --max-n-consecutive-size-changes=N.

1999-01-03  Jim Meyering  <meyering@@ascend.com>

	* src/md5sum.c (usage): Remove third program_name argument -- there
	were only two `%s' in the format string.

1999-01-02  Jim Meyering  <meyering@@ascend.com>

	* src/tsort.c (tsort): Use a single call to error instead of two
	to fprintf.
	(main): Remove `%s: ' prefix on format string.

	* src/tail.c (parse_options): Use XARGMATCH in place of argmatch.

	* src/ptx.c (format_vals): New array.
	(main): Use XARGMATCH in place of argmatch.

	* lib/argmatch.h (XARGMATCH): Don't return a value;  instead,
	modify a parameter.  Add a `Die_stmt' parameter.
	Add parentheses.
	* lib/argmatch.c (__xargmatch_internal): Remove now-unused function.
	(argmatch_to_argument): Add `const' attribute to first parameter.

1999-01-01  Jim Meyering  <meyering@@ascend.com>

	* src/tsort.c: Move inclusion of assert.h to follow that of stdio.h.
	Some losing systems require this.
	Use STREQ macro instead of strcmp in a few places.

	* po/POTFILES.in: Add tsort.c.

	* man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man,
	chmod, or mv fails.  Otherwise, the failure could go unnoticed.

	* man/Makefile.summ: Add entries for ptx and tsort.

	* src/tsort.c: Include readtokens.h.
	(zeros): Rename global from `rr'.
	(getstr): Remove function.
	(tsort) Use readtoken instead of getstr.

	* lib/readtokens.c: New file.
	* lib/readtokens.h: New file.
	* lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c.
	(noinst_HEADERS): Add readtokens.h.

	* man/Makefile.am (man_MANS): Add ptx.1.
	* man/ptx.x: New file.

	* src/tail.c (parse_options): Use XARGMATCH in place of argmatch.

	* man/Makefile.am (man_MANS): Add tsort.1.
	* man/tsort.x: New (essentially empty) file.

	* src/tsort.c: Rename globals N and R so they don't shadow locals.
	(tsort): Rename from `sort'.

	1998-11-07  Mark Kettenis  <kettenis@@phys.uva.nl>
	* src/Makefile.am (bin_PROGRAMS): Add tsort.
	* src/tsort.c: New program.

	* lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c.
	(noinst_HEADERS): Add quotearg.h.

	============================
	All of the following are from:
	1998-04-17  Eli Zaretskii  <eliz@@is.elta.co.il>

	* src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New
	macros.

	* src/cat.c (usage) [O_BINARY]: Describe -B,--binary option.
	(main) [O_BINARY]: binary_files, binary_output, file_open_mode:
	new variables. 	Add --binary to long_options[].  Switch stdin and
	stdout to binary mode unless file contents are not important
	anyway.  Open files in binary mode when required.

	* src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary
	mode.

	* src/expand.c (expand): Use binary I/O where appropriate.

	* src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O.

	* src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero
	argument.
	(md5_file) [O_BINARY]: Switch redirected stdin to binary mode.
	(main) [O_BINARY]: Use binary reads by default on those systems
	which care about the difference.

	* src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input
	stream to binary mode.

	* src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max
	file name characters in a given directory.
	(tempname): Make sure the temp file name is unique even if long
	file names aren't supported.

	* src/split.c (cwrite) [O_BINARY]: Write output in binary mode.
	(main) [O_BINARY]: Read input in binary mode.

	* src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input
	in binary mode.

	* src/tac.c (record_tempfile, unlink_tempfile)
	[DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file
	cannot be removed before it is closed.
	(save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file,
	to be removed before exit.
	(tac_file, save_stdin, main): Use binary I/O when appropriate.

	* src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O
	when appropriate.

	* src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate.

	* src/unexpand.c (unexpand): Use binary I/O where appropriate.

	* src/wc.c (wc): Use binary mode for input.

	* doc/textutil.texi: Add comments about peculiarities of Textutils
	operation on MS-DOS/MS-Windows.

1998-12-22  Jim Meyering  <meyering@@ascend.com>

	* configure.in (ALL_LINGUAS): Add chinese (zh).

1998-12-17  Jim Meyering  <meyering@@ascend.com>

	New options for tail:
	--follow=name, --follow=descriptor, --allow-missing
	* src/tail.c (Follow_mode): New enum.
	(n_live_files): New function.
	(tail_forever): Avoid starvation with --follow=name and a
	continually-growing unlinked or renamed file.

1998-12-13  Jim Meyering  <meyering@@ascend.com>

	* tests/uniq/Test.pm: New file.
	* tests/uniq/Makefile.am: New file.
	* tests/uniq: New directory.
	* tests/Makefile.am (SUBDIRS): Add uniq.
	* configure.in (AC_OUTPUT): Add tests/uniq/Makefile.
	From Jochen Hein.

	* lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in.
	(stat.c): Likewise.
	(EXTRA_DIST): Add xstat.in.
	* lib/stat.c: Remove file.
	* lib/lstat.c: Remove file.
	* lib/xstat.in (xstat@@): New file.

	* configure.in (ALL_LINGUAS): Add Russian (ru).

1998-10-31  Jim Meyering  <meyering@@ascend.com>

	* acconfig.h (stat): New #undef.

1998-10-22  Jim Meyering  <meyering@@ascend.com>

	* src/fold.c (usage): Add mention of --version and --help.
	Reported by Matej Vela <mvela@@public.srce.hr>.

1998-10-04  Jim Meyering  <meyering@@ascend.com>

	* lib/fnmatch.h: New file. (unused)
	* lib/fnmatch.c: New file. (unused)
	* lib/Makefile.am (noinst_HEADERS): Add fnmatch.h.

1998-10-03  Jim Meyering  <meyering@@ascend.com>

	* man/Makefile.am: Switch to using help2man.
	(EXTRA_DIST): Add Makefile.summ.

	* man/help2man: Invoke program with --manhelp option only if
	--name=STRING not specified.  Otherwise, this would fail with `yes'.
	* man/Makefile.summ: New file.
	* man/Makefile.maint: Include it.
	* man/help2man: New file.
	* man/GNUmakefile: New file.
	* man/Makefile.maint: New file.
	* man/*.x: New files.
	* man/*.1: Remove files.

	* src/md5sum.c (split_3): Rename local variable, to `escaped_filename'.
	(main): Output the leading backslash not just when there's a newline
	in the file name, but also when there's a backslash.
	Reported by Jim Dennis.

	* tests/md5sum/basic-1: Add tests with filenames containing newline
	and backslash characters.  (for the bug fixed above)

	* tests/Makefile.am (EXTRA_DIST): Add Fetish.pm.
	* tests/Fetish.pm: New file.

	* tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm.
	* tests/md5sum/Test.pm: Remove file.
	* tests/md5sum/Makefile.am: Rewrite.

1998-09-19  Jim Meyering  <meyering@@ascend.com>

	* src/ptx.c (program_name): Declare *not* to be const.

1998-08-29  Jim Meyering  <meyering@@ascend.com>

	* src/cut.c: Don't assume ASCII.
	* src/pr.c: Likewise.
	* src/tail.c: Likewise.

1998-08-15  Jim Meyering  <meyering@@ascend.com>

	* src/pr.c (usage): Reformat.

	* src/ptx.c: Add braces to suppress warning about ambiguous `else'.
	* lib/bumpalloc.h: Likewise.

1998-08-13  Franois Pinard  <pinard@@iro.umontreal.ca>

	* src/ptx.c: New file.
	* src/Makefile.am (bin_PROGRAMS): Add ptx.
	* lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files.
	* lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c.
	(noinst_HEADERS): Add bumpalloc.h and diacrit.h.

1998-08-09  Andreas Schwab  <schwab@@issan.informatik.uni-dortmund.de>

	* src/pr.c (long_options): Add long names for all options.
	(usage): Update help string.
	(main): Handle the special options --pages and --columns.

1998-08-02  Jim Meyering  <meyering@@ascend.com>

	* lib/linebuffer.c (readline): Return zero upon error as well as upon
	end of file.  From James Youngman.
	Ansideclify.

1998-08-01  Jim Meyering  <meyering@@ascend.com>

	* src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS.
	From Manfred Hollstein.

1998-07-30  Jim Meyering  <meyering@@ascend.com>

	* tests/cut/Test.pm: Avoid broken pipe message for tests that fail
	with usage errors.

	* src/sort.c (usage): Add angle brackets to make `Report bugs...'
	message consistent with all the rest.

1998-07-28  Andreas Schwab  <schwab@@issan.informatik.uni-dortmund.de>

	* tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests.

	* src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid
	clash with <langinfo.h>.  All uses changed.

1998-07-26  Jim Meyering  <meyering@@ascend.com>

	* intl/localealias.c (read_alias_file): Avoid mixing `char*' and
	`unsigned char*' variables.  Again for irix4.
	Mostly from Kaveh Ghazi.

	* src/join.c: Convert some char* dcls to `unsigned char*' and remove
	a cast -- to placate irix4's cc.
	* src/fmt.c (check_punctuation): Add cast to placate irix4's cc.
	Reported by Kaveh Ghazi.

	* src/md5sum.c (split_3): Add cast to placate irix4's cc.
	From Kaveh Ghazi.

1998-07-25  Jim Meyering  <meyering@@ascend.com>

	* Version 1.22f.

	* tests/cut/Test.pm: Add tests for new --output-delimiter option,
	as well as for NUL input delimiter (--delimiter='').
	* src/cut.c (cut_fields): Honor new --output-delimiter option.
	(main): Fix handling of --delimiter='' (-d '').  Until now, it has
	never worked as advertised.  I guess no one tried it.

	* tests/sort/Test.pm: Add two tests relating to this.
	* src/sort.c (main): Stat all non-`-' input file files (and fail if a
	stat fails) when an output file is specified by `-o' but doesn't exist.
	Reported by Will Edgington.

	* tests/sort/Test.pm: New tests of -o.

1998-07-16  Jim Meyering  <meyering@@ascend.com>

	* lib/Makefile.am (noinst_HEADERS): Add lchown.h.
	* lib/lchown.h: New file, just to define ENOSYS on systems that lack it.
	* lib/lchown.c: Include lchown.h.

1998-07-04  Jim Meyering  <meyering@@ascend.com>

	* configure.in (AM_WITH_REGEX): Remove.  Now the replacement
	macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS.
	* acconfig.h (WITH_REGEX): Remove undef.
	* src/csplit.c: Remove #ifdef around <regex.h> inclusion.
	* src/nl.c: Likewise.
	* src/tac.c: Likewise.
	* src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block.
	* lib/Makefile.am (noinst_HEADERS): Remove rx.h.
	* lib/rx.c: Remove file.
	* lib/rx.h: Remove file.

1998-06-29  Jim Meyering  <meyering@@ascend.com>

	* src/wc.c: Update calls to human_readable -- now there's one fewer arg.

	* lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c.
	(noinst_HEADERS): Add argmatch.h.

1998-06-28  Jim Meyering  <meyering@@ascend.com>

	* src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers.

1998-06-27  Jim Meyering  <meyering@@ascend.com>

	* tests/pr/Test.pm: Add two tests for double spacing.
	* src/pr.c (print_page): If cols_ready_to_print is zero,
	break out of loop just before the double-space test.
	Reported by Michael Stutz.

1998-06-18  Jim Meyering  <meyering@@ascend.com>

	* tests/Makefile.am.in (check): Depend on $(maint_gen) so
	`make maintainer-clean; ./configure; make check' works.

1998-05-25  Jim Meyering  <meyering@@ascend.com>

	* configure.in (_GNU_SOURCE): AC_DEFINE it here.
	* acconfig.h (_GNU_SOURCE): Remove definition from @@TOP@@ section.
	[!_GNU_SOURCE]: Add #undef instead.

1998-05-16  Jim Meyering  <meyering@@ascend.com>

	* configure.in (jm_MACROS): New wrapper macro.
	Remove uses of most jm_* macros.

	* src/tac.c (tac_seekable): Fix error in handling regex separators.
	* tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests.
	(opt_br): New test -- exercises above-fixed bug.

	* lib/Makefile.am (EXTRA_DIST): Remove.  Automake groks the `LIBOBJS='
	lines from the m4/*.m4 macros, so the hack of including some
	custom-replaced C source file names here is no longer needed.

	* acconfig.h (chown): Add undef.
	(D_INO_IN_DIRENT): Likewise.
	(D_TYPE_IN_DIRENT): Likewise.
	(ssize_t): Likewise.

1998-05-09  Jim Meyering  <meyering@@ascend.com>

	* src/tac.c (tac_seekable): Rename from tac_stream.
	Change `FILE *in' parameter to `int input_fd'.  Adjust callers.

1998-05-03  Jim Meyering  <meyering@@ascend.com>

	* po/: Update from gettext-0.10.35.
	* intl/: Likewise.
	* configure.in: Remove use of AC_LINK_FILES.
	(AC_OUTPUT): Remove po/Makefile-generating sed command.

1998-04-26  Jim Meyering  <meyering@@ascend.com>

	* tests/tail/Test.pm: Disable test f-1, now that it fails.

	* src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside
	the keyspec-iterating loop.  With this change, test 22a passes.
	Reported by Zvi Har'El.
	(strncoll): Remove bogus assertion.
	* tests/sort/Test.pm: Add tests for the above fix.

	* configure.in: Use jm_ASSERT.
	* acconfig.h: Add NDEBUG.

	* src/cut.c: Don't define NDEBUG.
	* src/csplit.c: Likewise.
	* src/join.c: Likewise.
	* src/sort.c: Likewise.
	* src/tr.c: Likewise.

	* src/cut.c: Don't define _GNU_SOURCE (now it's in config.h).
	* src/expand.c: Likewise.
	* src/fold.c: Likewise.
	* src/join.c: Likewise.
	* src/sort.c: Likewise.
	* src/tr.c: Likewise.
	* src/unexpand.c: Likewise.
	* src/uniq.c: Likewise.

	* src/tail.c (close_fd): New function -- converted from macro.
	[struct File_spec] (n_stat_calls): New member.
	[struct File_spec] (n_unchanged_stats): New member.
	(max_n_unchanged_stats): New global.
	Initialize new members.
	(xwrite): New function -- converted from macro.
	[struct File_spec] (pretty_name): Remove member.
	(pretty_name): New function.

	* src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*.
	(hex_digits): Declare parameter `s' as _unsigned_ char*.
	(split_3): Declare parameter `u' as _unsigned_ char**.

1998-04-17  Jim Meyering  <meyering@@ascend.com>

	* src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid
	new warning.
	* src/join.c (xfields): Likewise.

1998-04-12  Jim Meyering  <meyering@@ascend.com>

	* src/cat.c: Use STREQ macro rather than strcmp.
	* src/cksum.c: Likewise.
	* src/comm.c: Likewise.
	* src/csplit.c: Likewise.
	* src/cut.c: Likewise.
	* src/fmt.c: Likewise.
	* src/fold.c: Likewise.
	* src/head.c: Likewise.
	* src/join.c: Likewise.
	* src/md5sum.c: Likewise.
	* src/nl.c: Likewise.
	* src/paste.c: Likewise.
	* src/pr.c: Likewise.
	* src/split.c: Likewise.
	* src/sum.c: Likewise.
	* src/tac.c: Likewise.
	* src/uniq.c: Likewise.
	* src/wc.c: Likewise.

1998-04-11  Jim Meyering  <meyering@@ascend.com>

	* lib/safe-read.h: New file.
	* lib/safe-read.c: Include it.
	* src/cat.c: Include it instead of merely declaring safe_read.
	* src/csplit.c: Likewise.
	* src/head.c: Likewise.
	* src/split.c: Likewise.
	* src/sum.c: Likewise.
	* src/tac.c: Likewise.
	* src/tail.c: Likewise.
	* src/tr.c: Likewise.
	* src/wc.c: Likewise.

	* lib/Makefile.am (noinst_HEADERS): Add safe-read.h.

	* src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h.
	Declare counters to be of type uintmax_t.
	(write_counts): Use human_readable to format potentially-long-long
	numbers.  Suggestion from Rogier Wolff.
	(wc): Declare per-file counters to be of type uintmax_t.
	Declare bytes_read to be ssize_t.
	* lib/Makefile.am (libtu_a_SOURCES): Add human.c.
	(noinst_HEADERS): Add human.h.

	* lib/human.c: New file.
	* lib/human.h: New file.

1998-04-04  Jim Meyering  <meyering@@eng.ascend.com>

	* configure.in (jm_AC_HEADER_INTTYPES_H): Use it.
	(jm_AC_TYPE_UINTMAX_T): Use it.
	(jm_PREREQ): Use it.

	* Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal
	know about the m4/ subdirectory.
	* Makefile.maint (aclocal-files): Remove now-unnecessary (with
	automake-1.2h and the above change) aclocal-related rules and includes.

1998-04-03  Jim Meyering  <meyering@@eng.ascend.com>

	* lib/closeout.c: New file.
	* lib/closeout.h: New file.
	* lib/Makefile.am (libtu_a_SOURCES): Add closeout.c.
	(noinst_HEADERS): Add closeout.h.

1998-03-31  Jim Meyering  <meyering@@eng.ascend.com>

	* lib/xstrtol.c: Merge with the version from fileutils.

1998-03-27  Jim Meyering  <meyering@@eng.ascend.com>

	* Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h.

1998-03-23  Jim Meyering  <meyering@@eng.ascend.com>

	* acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4
	automatically handles it.

1998-03-19  Jim Meyering  <meyering@@eng.ascend.com>

	* src/system.h (SCHAR_MIN): Define.
	(SHRT_MIN): Define.
	od.c needs these when compiling with NCR's R2.0c C compiler.
	(TYPE_MAXIMUM): Cast result to `(t)' so this macro works with
	`unsigned char'.
	From Greg Wooledge.

1998-03-15  Jim Meyering  <meyering@@eng.ascend.com>

	* src/tail.c (tail_file): Merge largely-duplicated blocks of code.

1998-03-03  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c (xtmpfopen): Open temporary file exclusively, to
	foil a common denial-of-service attack.
	* src/tac.c (save_stdin): Likewise.

1998-02-16  Jim Meyering  <meyering@@eng.ascend.com>

	* configure.in (jm_FUNC_LSTAT): Use it.
	(jm_FUNC_STAT): Use it.
	* lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c.

1998-02-06  Jim Meyering  <meyering@@eng.ascend.com>

	* configure.in: Don't use AM_MAINTAINER_MODE or
	AC_PATH_PROG(PERL, perl).
	(jm_PERL): Use this.

1998-02-04  Jim Meyering  <meyering@@eng.ascend.com>

	* tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl.
	(mk_script): Set to ../mk-script.
	(x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script.
	Remove @@MAINT@@ cruft.
	(Makefile.am): Likewise.
	Remove @@MAINT@@ cruft.  Now `missing' will explain the failure
	when people don't have Perl yet modify a file whose rebuilding
	would lead to the use of Perl.

	* tests/Makefile.am (EXTRA_DIST): Add mk-script.
	* tests/*/mk-script.pl: Remove files.

	* GNUmakefile: New file.
	* Makefile.am (EXTRA_DIST): Add GNUmakefile.
	Don't include Makefile.maint from here.  It's included from GNUmakefile.

1998-01-30  Paul Eggert  <eggert@@twinsun.com>

	* configure.in (AC_LFS): Put before anything that can affect or use
	CPPFLAGS, LDFLAGS, or LIBS.

1998-01-25  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Makefile.maint: New file.
	* Makefile.am: Move rules common to textutils, fileutils, sh-utils
	into Makefile.maint.
	Include Makefile.maint.
	(EXTRA_DIST): Add Makefile.maint.

	* src/cat.c (cat): Convert comma-expressions to pairs of
	semicolon-terminated stmts.
	Add braces around compound if/else stmts.

1998-01-24  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...'
	as obsolescent options.
	Accept new option: --sleep-interval=SECONDS (-s).
	(parse_options): Recognize it.
	(usage): Describe it.
	(tail_forever): Use it.
	(dump_remainder): Use it.
	* tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'.

	* tests/cut/: Rename directory to remove `-test' suffix.
	* tests/join/: Likewise.
	* tests/md5sum/: Likewise.
	* tests/pr/: Likewise.
	* tests/sort/: Likewise.
	* tests/tr/: Likewise.
	* configure.in (AC_OUTPUT): Reflect renamings in tests/.
	* tests/Makefile.am (SUBDIRS): Reflect renamings in tests/.

	* src/system.h (TYPE_MINIMUM): Add extra outer cast to work around
	bug in Cray C 5.0.3.0 when T == time_t.

1998-01-18  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction,
	numcompare): Remove the `unsigned' from some `unsigned char*'
	parameter types.  Add casts via UCHAR where necessary to avoid
	problems with unwanted sign extension.  Based on a patch from
	Kaveh Ghazi to appease Irix4's cc compiler.

1998-01-17  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/split.c (next_file_name): Rewrite.  This removes an artificial
	limit (albeit already high, at INT_MAX :-) on the number of files
	split could create.  Reported by Ralf W. Stephan.

1998-01-16  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (mergefps): Add braces to avoid ambiguous `else' stmt.
	(nls_set_fraction): Likewise.

	* src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H,
	for Irix-4.0.5.  From Kaveh Ghazi.
	* configure.in: Check for langinfo.h.

	* lib/getline.c: Make PARAMS-defining conditionals consistent.
	* lib/linebuffer.h: Likewise.
	* lib/long-options.h: Likewise.
	* lib/memcasecmp.h: Likewise.
	* lib/xstrtod.h: Likewise.
	* lib/xstrtol.h: Likewise.
	Suggestion from Kaveh Ghazi.

	* tests/head/Test.pm (fail-0): Disable test.  It depends on
	sizeof(long) being 32 bits.  Reported by Kaveh Ghazi.

1998-01-10  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.22d.

	* src/system.h [HAVE_LIMITS_H]: Include limits.h
	(TYPE_SIGNED): Define.
	(TYPE_MINIMUM): Define.
	(TYPE_MAXIMUM): Define.
	(CHAR_BIT): Define.
	(SCHAR_MAX): Define.
	(UCHAR_MAX): Define.
	(SHRT_MAX): Define.
	(INT_MAX): Define.
	(UINT_MAX): Define.
	(LONG_MAX): Define.
	(ULONG_MAX): Define.
	* src/*.c: Remove definitions of those symbols.

	* src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h
	since it now includes limit.h which defines RE_DUP_MAX.
	* src/nl.c: Likewise.
	* src/tac.c: Likewise.

	* lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE.
	Rewrite macro as function.  Return a value.  Update caller.
	Cast __ZLONG_MAX `__unsigned long int' before casting to double to
	avoid SunOS /bin/cc compiler bug.

1998-01-08  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tac-pipe.c: New file.  But not yet used.
	* src/Makefile.am (EXTRA_DIST): Add tac-pipe.c.

	* src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer
	result of xrealloc (until recently it was char*).

	* configure.in (AC_CHECK_FUNCS): Add nl_langinfo.
	* src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test
	guarding the nls month-checking code.
	(nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc)
	`unsigned' from dcls of text and lim.
	(main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc.

1998-01-03  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.

	* configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
	those files will be built via the ANSI2KNR-filtering rules if necessary.

1997-12-25  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in: Remove AC_DEFINE of _GNU_SOURCE.
	* acconfig.h (_GNU_SOURCE): Define if not already defined.
	Put this code in @@TOP@@ section.
	(_GNU_SOURCE): Remove #undef.

1997-12-22  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in: AC_DEFINE _GNU_SOURCE.
	* acconfig.h: Add _GNU_SOURCE.

1997-12-21  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (AC_CHECK_HEADERS): Add stdlib.h.

	* src/system.h: Merge in things from fileutils' version of this file.
	* src/csplit.c: s/__P/PARAMS/.
	* src/fmt.c: s/__P/PARAMS/.
	* src/od.c: s/__P/PARAMS/.
	* src/pr.c: s/__P/PARAMS/.

1997-12-14  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g.

1997-12-13  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/fmt.c (main): Add some braces.
	Check return code from fclose of each input file.
	Close stdout and check for errors.

	* src/csplit.c (close_output_file): Check ferror before calling fclose.
	(main): Close stdout and check for errors.

1997-11-15  Jim Meyering  <meyering@@na-net.ornl.gov>

	* acconfig.h: Add mktime.
	* configure.in (jm_FUNC_MKTIME): Use it.
	* lib/mktime.c: New file.
	* lib/Makefile.am (EXTRA_DIST): Add mktime.c

	* intl/Makefile.in (distclean): Don't remove libintl.h here.
	* Makefile.am (DISTCLEANFILES): Remove it here instead.

1997-11-13  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/strftime.c: Update from FSF.
	* m4/strftime.m4: Check for POSIX.2's %f format spec.

1997-11-12  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/system.h [!HAVE_MEMPCPY] (mempcpy): Define.
	* configure.in (AC_CHECK_FUNCS): Add mempcpy.

1997-11-09  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (jm_FUNC_STRFTIME): Use it.
	* m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r.
	* m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r.
	(jm_FUNC_GNU_STRFTIME): Use new macro.
	(jm_FUNC_STRFTIME): New macro.  Likewise.
	Reported by Noel Cragg.

1997-11-08  Jim Meyering  <meyering@@na-net.ornl.gov>

	* m4/lfs.m4 (AC_LFS): New file/macro.
	* m4/Makefile.am (EXTRA_DIST): Add lfs.m4.
	* configure.in (AC_LFS): Use it.
	(AC_CHECK_FUNCS): Add fseeko.
	* src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO.
	(skip): Use fseeko if available.  Don't use lseek; it causes
	the stdio stream to become out of sync with respect to the
	underyling file descriptor.
	From Paul Eggert.

1997-10-16  Paul Eggert  <eggert@@twinsun.com>

	* configure.in (AC_CHECK_FUNCS): Add fseeko.

	* src/od.c (skip): Use fseeko.  Don't use lseek; it causes
	the stdio stream to become out of sync with respect to the
	underyling file descriptor.

1997-11-06  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs.
	We always have alloca.
	(keycompare): Don't use variable size arrays (it's a gcc-extension).
	Rewrite code that increments new lengths when not `ignoring'.

1997-11-02  Jim Meyering  <meyering@@na-net.ornl.gov>

	* acconfig.h: Add malloc and realloc.

	* src/wc.c (main): New option, --max-line-length (-L).
	(wc, write_counts): Implement it.
	From Bruno Haible.

1997-10-26  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/memcasecmp.c: Convert to upper case before comparing.
	This makes join -i work with sort -f.
	Reported by Arthur Pool.

1997-10-25  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc.
	(xcalloc): #ifdef-out unused function.
	(xrealloc): Remove code to work around deficient versions of realloc.
	Now we have an autoconf-enabled replacement version.
	(xmalloc): Remove code to work around deficient versions of malloc.
	Now we have an autoconf-enabled replacement version.

	* lib/memcmp.c (rpl_memcmp): Rename from memcmp.

	* src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/.

	* lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL.

	* configure.in (jm_FUNC_MALLOC): Use it.
	(jm_FUNC_REALLOC): Use it.

	* lib/Makefile.am (EXTRA_DIST): Add malloc.c.
	* lib/malloc.c: New file.
	* m4/malloc.m4: New file.
	* m4/Makefile.am (EXTRA_DIST): Add malloc.m4.

	* lib/Makefile.am (noinst_HEADERS): Add xalloc.h.
	(EXTRA_DIST): Add realloc.c.
	(EXTRA_DIST): Add malloc.c.

	* src/system.h: Include xalloc.h.
	Remove dcls of xmalloc, xcalloc and xrealloc.

	* lib/xalloc.h: New file.

	* lib/xmalloc.c: Include xalloc.h.
	Change VOID to void.
	(xalloc_exit_failure): Renamed extern.
	(xalloc_msg_memory_exhausted): New extern.
	(xalloc_fail_func): New extern.
	(fixup_null_alloc): Use new variables.

1997-10-24  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/unexpand.c: Remove old-style xmalloc and xrealloc decls.
	(add_tabstop): Cast first arg of xrealloc to char*.

	* src/sort.c: Include xalloc.h.
	(xmalloc): Remove function.
	(xrealloc): Remove function.
	(main): Set xalloc_fail_func to cleanup.
	Set xalloc_exit_failure SORT_FAILURE.

	* src/paste.c: Remove old-style xmalloc and xrealloc decls.
	(paste_parallel): Cast first arg of xrealloc to char*.

	* src/od.c: Remove old-style xmalloc and xrealloc decls.
	(decode_format_string): Cast first arg of xrealloc to char*.

	* src/expand.c: Remove old-style xmalloc and xrealloc decls.
	(add_tabstop): Cast first arg of xrealloc to char*.

	* lib/xalloc.h: New file.

	* src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
	(getstr): Cast xmalloc return value to char*.

	* src/csplit.c: Include xalloc.h.
	(xmalloc): Remove function.
	(xrealloc): Remove function.
	(main): Set xalloc_fail_func to cleanup.

	* src/*.c: Remove old-style xmalloc and xrealloc decls.
	* src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls.
	Suggestion from Achim Blumensath.

1997-10-23  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Makefile.am (aclocal-files): Also depend on m4/Makefile.am.

	* src/system.h [!HAVE_DECLARATION_FREE]: Declare free.
	[!HAVE_DECLARATION_MALLOC]: Declare malloc.
	[!HAVE_DECLARATION_REALLOC]: Declare realloc.
	[!HAVE_DECLARATION_STPCPY]: Declare stpcpy.
	[!HAVE_DECLARATION_STRSTR]: Declare strstr.
	* src/cat.c: Remove stpcpy dcl.
	* src/csplit.c: Remove malloc and realloc dcls.
	* src/sort.c: Remove free, malloc, and realloc dcls.
	* src/tac.c: Remove malloc, and realloc dcls.
	* src/tr.c: Remove stpcpy dcl.
	On some systems, strstr and stpcpy are macros, so declaring them
	unconditionally gets syntax errors.
	Reported by Mark M. Kettenis.

	* configure.in: Use jm_CHECK_DECLS.
	* m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4.

1997-10-22  Jim Meyering  <meyering@@na-net.ornl.gov>

	* m4/decl.m4: New file.
	* m4/check-decl.m4: New file.  New macro, jm_CHECK_DECLS.

1997-10-16  Paul Eggert  <eggert@@twinsun.com>

	* src/od.c (LONG_MAX): Define if not defined.

1997-10-16  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (look_for_fraction): Patch from rn Hansen.
	(getmonth): Compare the two month names only to the length of the
	string in the month table.  Patch from rn Hansen.
	(NLS_STRNCMP): New macro.
	(strncoll_s2_readonly): New function.
	(inittables): Don't use temporary `comp' to hide type of
	comparator function.
	(nls_sort_month_comp): Declare parameters to be void* to match
	comparator function type required for qsort.
	(getmonth): Use NLS_STRNCMP rather than #ifdef.
	Use do-while, rather than while-loop.

1997-10-14  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (_NL_ITEM) [!defined]: Define.
	From from rn E. Hansen.

	* src/sort.c: Use STREQ in place of most uses of strcmp.
	(NLS_STRCMP): Define.
	(getmonth): Remove ifdef and use NLS_STRCMP instead.
	Use HAVE_ALLOCA, not _HAVE_ALLOCA.
	(zaptemp): Make parameter `const'.

	* tests/sort-test/Test.pm: Add tests to exercise new fraccompare.

	* src/sort.c (CHARS_IN_ABM): Remove definition
	(inittables): Remove assumption that all abbreviated month names have
	length 3.
	(getmonth): Likewise.
	(main): Add #if's for more efficient code when using the GNU C library.
	From Ulrich Drepper.

	* src/sort.c (strncoll): Rename parameter to LEN.
	(keycompare): Move assignment out of if-expression.

	* lib/xstrdup.c: New file.
	* lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c

	* src/sort.c: Declare xstrdup.
	(my_setlocale): New function.
	(main): Guard against failure of strdup (use xstrdup) and setlocale.

	* src/system.h (STREQ): Define.
	* src/od.c (STREQ): Remove definition.

	* src/sort.c (look_for_fraction): Eliminate arbitrary limit on
	number of `groups'.  Declare as void, not int.
	Patch from rn E. Hansen.
	(main): When determining whether we're in the C or POSIX locale,
	don't rely on the form of the string returned by setlocale.
	Suggestion from Ulrich Drepper.

1997-10-12  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c: Apply big patch from rn E. Hansen.
	Clean up, indent.
	(NLS_MEMCMP): Define.
	(keycompare): Use it instead of open-coded #ifdefs.
	(compare): Likewise.
	(NLS_MAP): Remove unused definitions.
	Replace with uses of UCHAR.
	(nls_locale_map): Remove dcl of unused file-scope array.

1997-10-10  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/sort-test/Test.pm: Add a test.
	From William Lewis.

1997-10-07  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/*.c: Update bug-reporting address.
	* src/cat.c: Indent cpp directives to reflect nesting.
	* src/cksum.c: Likewise.
	* src/csplit.c: Likewise.
	* src/fmt.c: Likewise.
	* src/nl.c: Likewise.
	* src/paste.c: Likewise.

1997-09-27  Jim Meyering  <meyering@@na-net.ornl.gov>

	* m4/memcmp.m4: Integrate test to detect bug in memcmp from the
	Next x86 OpenStep C library.  Test program from William Lewis.

1997-09-21  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.'
	(dump_hexl_mode_trailer): Rename from dump_string_trailer.
	Use fputs and putchar instead of trivial or %-less printfs.
	(decode_one_format): Parenthesize each field_width assignment in an
	argument list to make the side effect a little more apparent.
	(write_block): Use fputs and putchar instead of trivial or %-less
	printfs.
	(dump_strings): Cast string_min to off_t to avoid long-standing warning.

	* src/od.c: Implement new `z' (hexl-mode) modifier.
	[struct tspec] (trailer): New field.
	(field_width): Likewise.
	(dump_string_trailer): New function.
	(decode_one_format): Save each field_width in the tspec.
	Patch from John Kodis.

1997-09-14  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/od.c (main) [--traditional]: Don't give diagnostic about there
	being more than three arguments if there are *no* arguments specified.
	Reported by Jochen Hein.

1997-09-13  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/sort-test/Test.pm: Add tests 19a and 19b.

1997-07-21  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tail.c (parse_obsolescent_option): #ifdef-out portability warning.

1997-07-19  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (checkfp): Print the `disorder' message.  Include both
	the number and the contents of the first out-of-order line, in addition
	to the file name.  Change meaning of return value.
	(check): Don't print disorder message here.
	Adjust test of checkfp's return value.
	Feature suggestion from Karl Heuer.

1997-07-13  Jim Meyering  <meyering@@na-net.ornl.gov>

	* doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi.
	Now, automake includes it automatically.

	* src/head.c: Include xstrtoul.h.
	Remove global variable, unit_size.
	(atou): Remove now-unused function.
	(parse_unit): Likewise.
	(string_to_ull): New function.
	(head): Take new parameter, count_lines.  Use it instead of unit_size.
	Update callers.
	(head_file): Likewise.
	(main): Use string_to_ull, not atou/parse_unit.
	The problem was that overflow wasn't detected, so `head -c 4096m'
	was treated just like `head -c 0'.
	Reported by Jerome Abela.

	* tests/wc: New directory.
	* tests/head: New directory.
	* tests/Makefile.am (SUBDIRS): Add head and wc.
	* configure.in (AC_OUTPUT): Add tests/head/Makefile and
	tests/wc/Makefile.

1997-07-05  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give
	a diagnostic and fail when there are two or more non-option arguments.

1997-07-04  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/tac/mk-script.pl: Redirect output of cmp to /dev/null.

	* configure.in (ALL_LINGUAS): Add Norwegian (no).

	* Makefile.am (aclocal-files): Look in source directory, not build dir.
	From Andreas Schwab.

Sun Jun 15 06:36:41 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the
	2-digit abbreviation) in each page header.  Reported by Noah Friedman.

Sat Jun 14 12:29:12 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/cut.c (cut_fields): Detect when the input is empty and handle
	that special case.  Before `cut -f1 < /dev/null' would improperly
	output a single newline.  Reported by Phil Richards.

Sun Apr 27 15:10:58 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* man/Makefile.am (DISTFILES): Add $(man_MANS).

	* configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv).

Thu Apr  3 21:14:02 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* m4/Makefile.am (EXTRA_DIST): Update file list.

	* tests/cut-test/Test.pm: Add test from Phil Richards.

Sat Mar 22 20:29:10 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* missing: New file -- from the automake-1.1m distribution.

Fri Mar 21 23:56:41 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l.
	(aclocal.m4): Use aclocal's new -I option.

Thu Mar 13 21:46:04 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tr.c (main): Make sure c1 is not -1 before using it as an
	array index.  Patch from Greg McGary.  Although this is truly a
	bug, I believe it would not cause tr to misbehave on most systems.
	I could not construct a test case with which this bug causes tr
	to generate invalid output.

	* tests/pr-test/Test.pm: Add test that -o 0 works.

	* src/pr.c (main): Allow use of 0 (zero) as the margin offset
	argument to the -o option.  Patch from Gary Anderson.

Fri Feb 28 22:32:51 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/uniq.c (usage): Fix typo in --help output.  From Andreas Schwab.

Tue Feb 25 20:34:51 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/Makefile.am (noinst_HEADERS): Add obstack.h.
	(libtu_a_SOURCES): Add obstack.c.

Sun Feb 16 08:30:29 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/Makefile.am (SUBDIRS): Add tac.
	* tests/tac: New directory.
	* configure.in (AC_OUTPUT): Add tests/tac/Makefile.

	* tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t,
	tta3-FF, ttb3-FF}: New files.  Renamed (s/T/tt/) to avoid name clashes
	on case-independent filesystems.
	* tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming.

	* src/tail.c (parse_obsolescent_option): Reverse order of args in
	diagnostic.  Remove `' quotes in diagnostic.
	(parse_options): Remove `' quotes in diagnostic.

Sat Feb  8 22:43:45 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tail.c (parse_obsolescent_option): Give warning diagnostic for
	(but now accept) obsolescent usage with more than one file argument.

Sun Feb  2 23:06:59 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/join.c: Move alloca-related preprocessor code into system.h.
	* src/od.c: Remove alloca-related preprocessor code.
	* src/system.h: Add alloca-related preprocessor code.

Sat Feb  1 07:21:43 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/pr-test/*: Rename files to avoid exceeding 14-character limit.
	* tests/pr-test/Test.pm: Reflect renamings.

	* tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames
	that exceed max-length before dying.

	* src/pr.c (init_parameters): For compatibility: use default
	separator `TAB' with full length lines.  From Roland Huebner.

Fri Jan 31 19:53:54 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tac.c: Rename globals buffer and buffer_size to have G_ prefix
	to avoid shadowing local variables.

	* lib/long-options.c (parse_long_options): Compare getopt_long return
	value against -1, not EOF.  Use NULL, not `(int *) 0' as last parameter
	in getopt_long call.

	* src/pr.c (add_line_number): Rename from `number' to avoid shadowing
	local variables.

	* src/*.c: Compare getopt_long return value against -1, not EOF.
	Use NULL, not `(int *) 0' as last parameter in getopt_long call.
	(usage): Bracket bug-reporting address with <> and append a period.

Wed Jan 29 20:54:24 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/tr-test/Test.pm: Do each test twice: get input via REDIR
	and PIPE.

	* tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring)
	test three times.

	* tests/pr-test/Test.pm: Remove common_option_prefix flag.
	(test_vector): Prepend the common option here instead.

	* tests/md5sum-test/Test.pm: Remove input_via_stdin flag.
	Do each test twice: get input via REDIR and PIPE.

	* tests/cut-test/Test.pm: Do each test three times.

	* tests/cut-test/mk-script.pl: Allow each test to be run any or all
	of three different ways.  Program input may be specified via a file
	or files listed on the command line, via input redirection (if there's
	only one file), or via a pipe.

Tue Jan 28 20:54:06 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/cut-test/mk-script.pl: Remove `t' prefix on all generated
	test file names.
	Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E).
	Ensure that no test file (generated or maintainer-supplied) has a
	name longer than 14 characters.

Sun Jan 26 12:49:50 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.22.

	* src/tail.c (parse_options): Add quotes to make messages identical.

Sat Jan 25 00:12:29 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tail.c (parse_obsolescent_option): Comment.
	(parse_options): Remove unnecessary goto and label.

	* tests/sort-test/mk-script.pl: Interpret `input arg is a hash
	reference' as meaning that the tested program will read no input.
	Most of the tests for the date program use this feature.
	Also for date, the generated script now reflects specification
	(in Test.pm) of default and per-test environment settings.

	* src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces.
	* src/fold.c: Likewise.
	* src/head.c: Likewise.
	* src/join.c: Likewise.
	* src/nl.c: Likewise.
	* src/od.c: Likewise.
	* src/pr.c: Likewise.
	* src/uniq.c: Likewise.

	* lib/xstrtoul.h (XSTRTOL_H): Undefine it.

	* lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error'
	only if it hasn't already been defined.
	(_STRTOL_ERROR): Undefine.

	* lib/xstrtol.c (__xstrtol): Change interpretation of
	VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "".  Use the former
	when any suffix is valid, the later when no suffix is allowed.

Fri Jan 24 23:36:00 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/long-options.c (parse_long_options): Reset optind to zero
	before just returning so that getopt internals get initialized from
	the probably-new parameters when/if getopt is called later.
	From Ulrich Drepper.

Thu Jan 23 19:17:03 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tail.c (parse_obsolescent_option): Recognize and fail for
	more malformed obsolescent options.  Makes for better diagnostics.

Wed Jan 22 21:34:50 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/Makefile.am (SUBDIRS): Add tail.
	* tests/tail: New directory.
	* configure.in (AC_OUTPUT): Add tests/tail/Makefile.

	* src/tail.c (parse_options): New function.
	(parse_obsolescent_option): New function.
	(main): Use the new functions instead of open-coding them.
	This better fixes the bug in handling obsolescent `+Nc' options.
	General cleanup.

Tue Jan 21 22:49:00 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tail.c (main): Properly handle what the POSIX spec calls
	the `obsolescent' usage (e.g., tail +2c).  It didn't work.
	Reported by Karl Heuer.

Sun Jan 12 22:13:27 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/tr-test/Test.pm: Rename tests so that the associated files
	have names that are distinct even on filesystems on which file
	names are case insensitive.
	Reported by Fred Fish.
	* tests/cut-test/Test.pm: Likewise.

	* tests/tr-test/Makefile.am: Regenerated to reflect renamed tests.
	* tests/cut-test/Makefile.am: Likewise.

Wed Jan  8 16:38:24 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.21.

	* lib/getopt.c (_getopt_internal): Use `_', rather than the
	(sometimes-)expansion `gettext'.

Tue Jan  7 22:50:13 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/getopt.c: New (more POSIX compliant) version from GNU libc.
	[_]: Define to gettext also if ENABLE_NLS is defined.
	This is temporary.

Thu Jan  2 21:17:50 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/pr.c (init_fps): Initialize lines_stored field in three places.
	This avoids uninitialized memory reads in close_file.

Wed Jan  1 17:32:18 1997  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (AC_ARG_PROGRAM): Remove explicit use.
	It's implicit in AM_INIT_AUTOMAKE.  From Wayne Stewart.

Sun Dec 29 23:42:57 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/pr.c (init_header): Plug a small memory leak by using stack
	rather than heap for a 15-byte temporary buffer.

Sat Dec 28 00:03:23 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed
	from tab_width.
	(POS_AFTER_TAB): Renamed from pos_after_tab.  Define in terms of
	TAB_WIDTH rather than duplicating the expression.

Fri Dec 27 17:29:02 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/join-test/mk-script.pl: Fix a couple of thinkos and typos.
	Now it works with pr's tests, too.

	* tests/pr-test/Makefile.am (explicit): Regenerate list of files,
	this time with duplicates removed.

	* src/pr.c (usage): Break long string literal into two separate
	printf statements to accomodate default maximum of 2048 characters
	for Irix-4.0.5.  Reported by Kaveh Ghazi.

	* Makefile.am (aclocal.m4): No longer depend on acinclude.m4.

	* tests/Makefile.am (SUBDIRS): Add pr-test.

	* configure.in: AC_REQUIRE version 2.12 of autoconf.
	AC_OUTPUT: Add tests/pr-test/Makefile.

Sun Dec 22 08:11:27 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* acinclude.m4: Move macros to individual files in new directory, m4/.
	See ChangeLog entries in sh-utils for the details.

	* configure.in: Increment version to 1.20a.

	* tests/md5sum-test/Makefile.am: Use same framework as other tests.
	* tests/md5sum-test/Test.pm: New file.

Sat Dec 21 20:32:58 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in.

	* tests/Makefile.am.in: New file.

	* tests/sort-test/Makefile.am: Clone the Makefile.am from join-test.
	Replace only the definition of $x and the auto-generated lists of
	test files.
	* tests/cut-test/Makefile.am: Likewise.
	* tests/tr-test/Makefile.am: Likewise.

	* tests/join-test/Makefile.am: Add @@MAINT@@-protected rule for
	verifying that Makefile.am is consistent with Test.pm.

Fri Dec 20 00:08:36 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1)
	and $(in2), not $(in).

	* tests/join-test/mk-script.pl: New option: --list.
	Generate lists of files used/generated.

Thu Dec 19 23:28:41 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/join-test/mk-script.pl: Rewrite to be more general -- so
	it can be used for join, cut, sort, tr, and soon, pr test suites.
	* tests/tr-test/mk-script.pl: Symlink through CVS repo to join's
	mk-script.pl.
	* tests/sort-test/mk-script.pl: Likewise.
	* tests/cut-test/mk-script.pl: Likewise.

	* tests/tr-test/Test.pm: Adapted for new mk-script.pl.
	* tests/join-test/Test.pm: Likewise.

Tue Dec 17 16:48:51 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/join-test/Makefile.am (.pl): Make generated file read-only so
	I don't accidentally modify it instead of the one with the .pl suffix.

	* acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than
	now-obsolete AC_C_CROSS.
	(jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one
	since there's nothing GNU-specific about the replacement.  Contrast
	with gnu_ prefix added to strftime.
	(jm_FUNC_MEMCMP): New macro.
	* configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP.
	* acconfig.h: Add memcmp.
	* README: Remove warning about memcmp.  The new macro handles it.

Mon Dec 16 23:03:27 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment.
	From Eric Backus.
	(AUTOMAKE_OPTIONS): Likewise.

Sat Dec 14 14:51:50 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable
	name for cross compiling.
	Remove definitions of gettext-related macros.  The gettext
	installation procedure installs corresponding .m4 files so that
	aclocal will use them.

1996-12-12  Paul Eggert  <eggert@@twinsun.com>

	* system.h (ISDIGIT): Replace with smaller, faster edition
	that yields nonzero only on ASCII digits.
	(ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT
	used to have.

	* tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of
	ISDIGIT to test for characters in CC_DIGIT class.

	* sort.c (digits): Remove; subsumed by new ISDIGIT.
	(inittables): Remove initialization of `digits'.
	(fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x].
	(fraccompare, numcompare): Avoid casts to unsigned char that are no
	longer needed.

	* csplit.c (get_format_width, get_format_prec): Avoid
	unnecessary comparison of digit to '\0'.

Thu Dec 12 23:42:51 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (usage): Clarify description of -u option.
	From Karl Berry.

Wed Dec 11 19:32:18 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.20.

Tue Dec 10 00:15:50 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	The file name, `build-script.pl' is longer than 14 characters.
	Rename it.
	* tests/cut-test/mk-script.pl: Rename from build-script.pl.
	* tests/cut-test/Makefile.am: Reflect renaming.
	* tests/tr-test/mk-script.pl: Rename from build-script.pl.
	* tests/tr-test/Makefile.am: Reflect renaming.
	* tests/sort-test/mk-script.pl: Rename from build-script.pl.
	* tests/sort-test/Makefile.am: Reflect renaming.
	* tests/join-test/mk-script.pl: Rename from build-script.pl.
	* tests/join-test/Makefile.am: Reflect renaming.
	Reported by Karl Heuer.

	* configure.in (VERSION): Bump to 1.19r.
	(AC_ISC_POSIX): Remove kludgy macro.
	Use this test instead:
	(LIBS): Add -lcposix if it contains strerror.
	Patch from Karl Heuer.

Sun Dec  8 07:22:38 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	=========== Update for automake-1.1k.
	* Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k.
	* configure.in (AM_CONFIG_HEADER): Use it.
	(AC_OUTPUT): Remove stamp-h timestamping statement.
	Now, AM_CONFIG_HEADER does it automatically.
	* lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per
	new automake requirement.
	Rename tu_* variables to libtu_a_*.

Wed Dec  4 21:03:18 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/pr.c: Apply big patch from Roland Huebner.

	* src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings:
	[:upper:] to [:upper:] and [:lower:] to [:lower:].
	(main) [POSIXLY_CORRECT]: Give a more specific diagnostic for
	the invalid identity mappings [:upper:] to [:upper:] and [:lower:]
	to [:lower:].
	(class_ok): Update table to reflect that tr now allows these
	identity mappings.  Suggestion from Risto Kankkunen.

Thu Nov 28 00:31:18 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT
	for gettext-0.10.25.

Tue Nov 26 23:05:14 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (fraccompare): Add explicit `int' in `register' dcls,
	to avoid new warning from gcc.

Sun Nov 24 21:02:15 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/sort-test/Makefile.am (t): Add names of those 5 tests.

	* tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code.

	* src/sort.c (set_ordering): Revert 1994-05-04 change to this function
	so that blanks are not unconditionally ignored when computing start
	and end positions for numeric keys with explicit character offsets.
	Reported by Markus Demleitner.

Sat Nov 23 16:07:08 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* cat.c (usage): Alphabetize option descriptions the way sort -f would.
	* fmt.c (usage): Likewise.
	* join.c (usage): Likewise.
	* md5sum.c (usage): Likewise.
	* od.c (usage): Likewise.
	* pr.c (usage): Likewise.
	* sort.c (usage): Likewise.
	* split.c (usage): Likewise.
	* wc.c (usage): Likewise.
	From Karl Berry.

Fri Nov 22 20:20:37 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/csplit.c (process_regexp): Update CURRENT_LINE only if
	the new value would be larger.  This avoids the infinite loop
	otherwise provoked by situations like this:
	printf "\na\n" | csplit - '/a/-1' '{*}'
	From Jens Schmidt.

Tue Nov 19 23:16:57 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (AM_SANITY_CHECK_CC): Remove it.  Autoconf-2.11
	has this built-in.

Sat Nov  2 08:50:01 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split.
	Otherwise, the generated info files have names longer than
	the 14-byte max of some old systems.
	Reported by Karl Heuer.

Fri Nov  1 21:33:16 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/strtol.c: Update from GNU libc.

	* tests/sort-test/Test.pm: Add a test to exercize this fix.

	* src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition.
	(checkfp): Fix off-by-one error that resulted in writing one byte
	beyond the end of a malloc'd buffer.  It caused `sort -c' to segfault
	on Linux systems having a relatively recent libc.  Before, running
	the command, perl -e "print 'x' x 30, \"\n\";"|sort -c
	would provoke the memory overrun (though not necessarily the failure).
	Add an assertion.
	Reported by Risto Kankkunen.

Thu Oct 31 17:48:24 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (key_init): New function.
	(main): Use key_init in the two places where it was open-coded.
	This fixes a UMR of the general_numeric field.

	* src/join.c (decode_field_spec): Always give FIELD_INDEX a value.
	This avoids a spurious UMR report from purify.
	(prjoin): Add an assertion.
	(add_field): Update assertion.

	* src/tr.c (es_free): New function.
	(parse_str): Use it to plug a small memory leak.

Wed Oct 23 22:02:24 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/md5.c: Update from GNU libc.
	* lib/md5.h: Update from GNU libc.

Mon Oct 21 16:48:12 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tr.c (validate): Remove TAB from diagnostic, for consistency.

Sun Oct 20 13:44:07 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/Makefile.am (INCLUDES): Add -I../intl.  Reported by Eric Backus.

	* Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'
	(EXTRA_DIST): Remove.

	* configure.in: Remove README_ALPHA related code.  Automake takes
	care of it automatically now when in gnits mode.

	* lib/md5.c (md5_process_bytes): Cast void* pointer to char* before
	doing arithmetic with it.

Sat Oct 19 23:13:54 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/md5.c: Update from GNU libc.
	* lib/md5.h: Update from GNU libc.

Fri Oct 18 00:08:04 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (AC_OUTPUT): Add tests/join-test/Makefile.

	* tests/Makefile.am (SUBDIRS): Add join-test.

Tue Oct 15 23:25:31 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/tr.c (get_next): Rewrite to treat lower/upper mapping as a
	special case.
	(main): Write separate loops to initialize mapping for lower->upper
	and upper->lower conversion.
	Reported by Arne Henrik Juul.

Sun Oct 13 12:52:42 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/xstrtol.c (__xstrtol): Return an error for invalid suffix.
	Before, e.g., `split -b 1M' would be silently accepted and treated
	like `split -b 1'.  Reported by Franc,ois.

	* src/split.c (usage): Remove parameter, REASON.
	(main): Update callers to use combination of error (0, 0, ... and
	usage (EXIT_FAILURE).
	(main): When a string operand cannot be converted to a number of
	bytes or lines, include that string in the diagnostic.

Sat Oct 12 00:05:11 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol.

	* lib/Makefile.am (EXTRA_DIST): Remove.

Thu Oct 10 23:41:36 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/md5.c (md5_stream): Apply fix from Ralph Loader
	<loader@@maths.ox.ac.uk> via Ulrich Drepper.

Wed Oct  9 07:26:40 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD).

Tue Oct  8 21:32:17 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/error.c: Include error.h to align with libit --
	under protest, Franois :-).

Sun Oct  6 08:02:28 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME,
	AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions.
	They're included in automake-1.1f.

	* configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of
	open-coding it.

Sat Oct  5 12:40:22 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/memcpy.c [HAVE_CONFIG_H]: Include config.h.
	From Karl Berry.

Fri Oct  4 07:20:37 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (GNU_PACKAGE): New variable.
	(PACKAGE_VERSION): Remove it.

	* acconfig.h (GNU_PACKAGE): New variable.
	(PACKAGE_VERSION): Remove now-unused variable.

	* lib/long-options.c (parse_long_options): Separate package name
	and version number to accomodate new --version output requirement.
	* lib/long-options.h: Update prototype.

Thu Oct  3 23:27:31 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/md5sum.c (main): Remove dead code that used to print --version
	output.

Tue Oct  1 06:54:22 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM.
	* src/Makefile.am (sort_LDADD): Use any library (-lm) that
	gets substituted for @@POW_LIBM@@.

	* tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum.

Mon Sep 30 23:35:46 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum.

	* acinclude.m4: Update definitions from gettext-0.24.

Sun Sep 29 20:04:53 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/sort-test/build-script.pl: Die if close fails.
	* tests/tr-test/build-script.pl: Likewise.

	* configure.in (AC_OUTPUT): Add tests/cut-test/Makefile.
	* tests/Makefile.am (SUBDIRS): Add cut-test.
	* tests/cut-test: New directory.

Fri Sep 27 22:22:09 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (ALL_LINGUAS): Add spanish (es).

Thu Sep 26 21:02:54 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/md5sum.c (usage): Remove references in --help output to
	the now-deprecated --string option.  Support for it will be
	removed soon.  Using this option can provoke a memory access
	violation on some systems because of (unavoidable in an efficient
	implementation) alignment assumptions made by functions in md5.c.
	md5sum.c could leave the option in and accomodate the alignment
	restriction, but this option was intended solely for testing, and
	the tests are now all file-oriented, so it's not necessary.

	* tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option.

Wed Sep 25 21:43:10 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/sort-test/Makefile.am (t): Factor out .in suffix.
	Include new test: t16a.
	* tests/tr-test/Makefile.am (t): Likewise.

	* src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc.

Mon Sep 23 10:00:50 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS).

Sun Sep 22 09:24:22 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/sort.c (keycompare): Declare translate to be unsigned char *.
	Otherwise, sign extension caused misordering when using e.g. -f.
	Reported by Erick Branderhorst.
	* tests/sort-test/Test.pm: Add Erick's test for that fix.

	* tests/Makefile.am (SUBDIRS): Add md5sum-test.

Sat Sep 21 13:34:59 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/Makefile.am (check): Remove tests for md5sum.
	* tests/md5sum-test: New directory.  Put them here instead.
	* configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile.

Thu Sep 19 08:54:05 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* tests/: Rename from checks.
	* Makefile.am (SUBDIRS): Change `checks' to `tests'.
	* configure.in (AC_OUTPUT): Likewise.

	* configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these.
	AM_INIT_AUTOMAKE now does it (as of automake-1.1e).

Sun Sep 15 23:08:48 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Makefile.am (EXTRA_DIST): Remove acinclude.m4.

Thu Sep 12 17:05:23 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* lib/Makefile.am (EXTRA_DIST): Add getline.c.
	(tu_SOURCES): Remove getline.c
	From Kaveh Ghazi.

Sun Sep  8 13:55:18 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* checks/sort-test/build-script.pl: Prefix $in with \$srcdir/
	so make check works with VPATH build.  From Uli Drepper.

Sat Sep  7 12:25:42 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/system.h: Add comments justifying IS* versions of ctype.h macros.

	* src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct.
	(get_line): Use ISSPACE instead of isspace.  From Bruno Haible.

Mon Sep  2 10:34:46 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/*.c (usage): Tell where to report bugs.

Sun Aug 25 22:50:47 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests.
	($x-tests): Guard dependencies with @@MAINT@@.
	* checks/tr-test/Makefile.am: Likewise.

Sat Aug 24 14:25:41 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings.

Wed Aug 21 22:28:26 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (ALL_LINGUAS): Add polish (pl).

Sun Aug 18 09:34:42 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (AC_OUTPUT): Add checks/sort-test/Makefile.
	* checks/Makefile.am (SUBDIRS): Add sort-test.

Sat Aug 17 18:57:17 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Makefile.am (EXTRA_DIST): Add acinclude.m4.

Tue Aug 13 21:47:23 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c.
	Automake includes them automatically.

	* configure.in (AM_INIT_AUTOMAKE): Use it.
	(AM_PROG_INSTALL): Remove.  AM_INIT_AUTOMAKE does this.
	(AC_PROG_MAKE_SET): Likewise.

Sun Aug 11 20:49:21 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in: Rename a few macros for automake-1.1c.
	(AC_REPLACE_GNU_GETOPT): Remove.
	(AC_PATH_PROG): Find perl -- needed only for checks if you
	change or remove things with e.g. make maintainerclean.


	* lib/Makefile.am (tu_LIBADD): Remove @@REGEXOBJ@@.  New AM_WITH_REGEX
	adds .o files to @@LIBOBJ@@.
	(tu_SOURCES): Add getopt.c and getopt1.c.
	(EXTRA_DIST): Remove getopt.c and getopt1.c.

	* acinclude.m4: New file -- derived from aclocal.m4.
	* aclocal.m4: This file is now generated by the aclocal program
	(which comes with the automake package.)

Sun Aug  4 10:50:46 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* checks/: New directory.
	* checks/Makefile.am: New file.
	* configure.in (AC_OUTPUT): Add new directories: checks,
	checks/tr-test.
	* Makefile.am (SUBDIRS): Likewise.

Sat Jul 27 17:22:14 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid
	redefinition warnings on solaris.
	(textdomain) [!ENABLE_NLS]: Likewise.

Thu Jul 25 23:06:35 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/unexpand.c (unexpand): Move EOF check to follow code that
	processes and generates output for pending spaces.  Before
	`printf '  ' |unexpand -t 1,2' generated no output.

	* src/md5sum.c (md5_check): Remove parameter, BINARY.
	Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode
	from the input stream rather than the one from the command line.
	(main): Fail with a diagnostic if --binary or --text is specified
	when verifying checksums.
	Reported by Eli Zaretskii <eliz@@is.elta.co.il>.

Sun Jul 21 11:58:48 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in: Add check for error_at_line so systems with
	GNU libc don't compile and link with distributed error.c.
	* lib/Makefile.am (tu_SOURCES): Remove error.c.
	(EXTRA_DIST): Add error.c.

	* configure.in (AC_REPLACE_FUNCS): Replace getline.c.
	Add related check for the getdelim function.
	From Ulrich Drepper -- as done in gettext.

Sat Jul 20 15:59:36 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (PACKAGE_VERSION): Use space instead of hyphen to
	separate PACKAGE and VERSION.

	* aclocal.m4 (AM_SANITY_CHECK_CC): New macro.  Derived from
	macros from Bruno Haible and from Cygnus.
	* configure.in (AM_SANITY_CHECK_CC): Use it.

Wed Jul 17 00:30:28 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* install-sh: Get version with MIT copyright.

Tue Jul 16 00:09:37 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* aclocal.m4 (fp_C_PROTOTYPES): Improved version from
	Franois Pinard.
	Update all other macros to reference $fp_cv_prog_cc_stdc, rather
	than $ac_cv_prog_cc_stdc.

	* src/od.c (OFF_T_MAX): Remove definition.
	(main): Compare against LONG_MAX rather than OFF_T_MAX.

Mon Jul 15 23:42:57 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Many files: Update FSF address.

Sun Jul 14 16:53:50 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/unexpand.c (unexpand): Fix bug that contributed to endless loop
	when invoking `echo '  ' |unexpand -t 1,2': use print_tab_index, not
	tab_index in inner flush_pend: while loop.  From Keith Owens
	<kaos@@audio.apana.org.au>.

	* src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX.
	[!INT_MAX]: Define it.
	(main): Append INT_MAX to command-line-specified tab list to
	ensure termination in unexpand's inner loop.
	Derived from a patch from Keith Owens.

Thu Jul 11 22:04:36 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.19.

	* configure.in (VERSION): Bump to 1.19.

Wed Jul 10 22:57:29 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program
	so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with
	those options on that system, sys/stat.h gets compile errors.
	With help from Marcus Daniels.

	* getopt.c: Update from gettext-0.10.23.
	* getopt1.c: Likewise.
	* getopt.h: Likewise.

Tue Jul  9 18:07:23 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
	so the left operand of the << isn't signed.
	From Kjetil Torgrim Homme.

	* po/Makefile.in.in (install-data): Don't install NLS files when
	they're not requested.  From Ulrich Drepper.  Reported by
	Kjetil Torgrim Homme <kjetilho@@ifi.uio.no>.

Fri Jul  5 21:55:58 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23.
	* ABOUT-NLS: Likewise.
	* intl/*: Likewise.
	* aclocal.m4: Likewise.

Thu Jul  4 07:24:54 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/uniq.c (usage): Remove space before newline in usage message.

	* src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro.
	[NEWLINE_REPLACEMENT_STRING*]: Remove macros.
	(main): Output a leading backslash for a line describing a file
	whose name contains a newline.  Then translate each NEWLINE byte
	in the file name to the string, "\\n", and each backslash to "\\\\".
	File names that don't contain NEWLINE aren't translated.
	(split_3): Rewrite to handle file names with embedded newlines.
	Miles Bader and Jim Blandy suggested this new encoding scheme.

	* src/md5sum.c (md5_file): Replace obsolete comment with a description
	of the function.
	(md5_check): Don't use "s"-adding trick to form the plural of
	`checksum.'  That doesn't work well with translation.
	Suggestions from Ulrich Drepper.
	(split_3): Add missing semicolon so it compiles.  From Jim Blandy.

Wed Jul  3 23:21:09 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/md5sum.c (split_3): Correct test for 35-byte line to accomodate
	fact that leading blanks may be stripped.

Tue Jul  2 21:51:40 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (ALL_LINGUAS): Add dutch (nl).

Mon Jul  1 23:50:19 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define.
	(split_3): Translate NL bytes not to NUL, but to
	NEWLINE_REPLACEMENT_STRING.
	Suggested by Ulrich Drepper.
	(main): Translate back to NL-containing filename.

Sun Jun 30 22:42:17 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/md5sum.c (split_3): Take an additional parameter, S_LEN.
	Adapt caller.
	Map translated NEWLINE-containing filename back into the original
	NEWLINE-containing name.
	(md5_check): Translate NEWLINE bytes to NUL bytes in filename.

Sat Jun 29 18:59:07 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it
	appears in the output of --version.  Reported by RMS.

Wed Jun 26 21:35:10 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* src/Makefile.am (LDADD): Remove sort-specific hack to link
	with -lm.
	* aclocal.m4 (AM_FUNC_STRTOD): New macro.
	* configure.in (AM_FUNC_STRTOD): Use it.
	(AC_REPLACE_FUNCS): Remove strtod.
	Suggested by Tom Tromey.

	* po/Makefile.in.in (install-data): Add `else true;' to avoid
	letting failing if-condition cause make failure.
	From Fred Fish (fnf@@ninemoons.com).

Tue Jun 25 21:55:18 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.18a.

Tue Jun 18 20:43:20 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* aclocal.m4: Update from gettext-0.10.20.
	* ABOUT-NLS: Likewise.
	* intl/*: Likewise.

Thu Jun 13 22:31:39 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (VERSION): Bump to 1.18a.

	* po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30.
	Depend on POTFILES only when using maintainer mode.

	* intl/*: Update from gettext-0.10.18.

Tue Jun 11 23:32:10 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.18.

	* po/Makefile.in.in: Update from gettext-0.10.17.
	* intl/*: Likewise.
	* ABOUT-NLS: Likewise.

Mon Jun 10 18:22:29 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Makefile.am (cvs-dist): Use -c option in cvs tag command.

Fri Jun  7 22:06:46 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* configure.in (VERSION): Set to 1.18.

	* src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using
	the strtod supplied with this package.  Otherwise, linking failed on
	Solaris-2.4 systems.  Reported by Wayne Stewart <wstewa@@atl.com>.

Thu Jun  6 21:57:08 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* po/Makefile.in.in: Update from gettext-0.10.16.
	* intl/*: Likewise.
	* ABOUT-NLS: Likewise.
	* aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede
	gettext-related ones.
	Update from gettext-0.10.16.

Fri May 31 22:04:51 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.17.

	* Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is
	distributed.

Thu May 30 00:07:48 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* Version 1.16.

	* tail.c (main): Interpret the old-style +VALUE and -VALUE options
	like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm]
	suffix multipliers.  This makes the code consistent with --help
	output.  Reported by Karl Heuer.

	* sort.c (limfield): #ifdef-out a block of code that makes
	GNU sort incompatible with Unix sort when a key-end spec refers
	to the N'th character in a field that has fewer than N characters.
	The POSIX spec doesn't appear to specify behavior for this case.
	From Karl Heuer.

	* po/Makefile.in.in (stamp-cat-id): Avoid using temp filename
	longer than 14 characters.
	(mostlyclean): Likewise.
	From Karl Heuer.

	* po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only
	when using maintainer mode.  Reported by Karl Heuer.

	* po/Makefile.in.in (.po.mo): Reenable dependency and rule.
	It is required when using native NLS, e.g. on Solaris.
	From Marcus Daniels.

	* od.c (decode_one_format): Use %lu (not %d) printf format
	corresponding to unsigned long, SIZE.

	* Version 1.15.

	* intl/Makefile.in (installcheck): New target.
	* po/Makefile.in.in (installcheck): New target.

	* od.c (decode_one_format): Take another parameter.
	Give a specific diagnostic for invalid format spec here rather
	than an overly general one from caller's caller.
	(decode_format_string): Update caller.
	(main): Don't give diagnostic here when decode_format_string fails.
	Remove assertions that could fail on some Crays because they don't
	have a two-byte type.
	Johan Danielsson (joda@@pdc.kth.se) reported the failed assertions.

Mon May 27 17:43:31 1996  Jim Meyering  <meyering@@na-net.ornl.gov>

	* cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of
	less portable fileno (stdin) and fileno (stdout).
	* sort.c (main): Use STDIN_FILENO instead of less portable
	fileno (stdin).

Mon May 20 21:50:23 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* Makefile.am (distcheck): Remove target and rule -- automake-0.33
	adds it automatically.

Sun May 19 13:15:49 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* configure.in (LINGUAS): Add ko.
	* Makefile.am (distcheck): Remove @@MAINT@@ prefix from first command.

Thu May 16 22:18:41 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* Makefile.am (distcheck): New target.  From Gord Matzigkeit.

Fri May 10 20:46:13 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* po/Makefile.in.in (all-yes): Always depend on CATALOGS.  Otherwise
	they won't be built and install could fail.  From Ulrich Drepper.
	(.po.mo): Disable dependency and rule when not in maintainer mode.

	* aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend
	on whether we're using GNU gettext.  From Ulrich Drepper.

Wed May  8 21:10:43 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* intl/Makefile.in (distdir): Renamed from dist. For compatibility
	with automake-0.32.
	* po/Makefile.in.in (distdir): Likewise.

	* po/Makefile.in.in (all-yes): Depend on GMOFILES.
	Depend on CATALOGS and GMOFILES files only in maintainer mode.

Tue May  7 22:10:20 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* configure.in: Require autoconf-2.10.

	* aclocal.m4 (jm_MAINTAINER_MODE): New macro.
	* configure.in (jm_MAINTAINER_MODE): Use it.

Sat May  4 20:40:01 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* configure.in (LINGUAS): Add de.
	* po/de.po: New file.

	* memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII.
	* regex.c [IN_CTYPE_DOMAIN]: Likewise.
	* system.h [IN_CTYPE_DOMAIN]: Likewise.

Sun Apr 28 17:10:03 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* fmt.c (copy_rest): Don't copy past end of prefix.  Output
	trailing spaces if the prefix had any.  Before, fmt would
	improperly output NUL bytes.  The command
	perl -e 'print "| S";' |fmt -p' |  '|tr '\0' @@
	output `|@@S'.  Reported by Franois Pinard.

	* sort.c (main): Give a better diagnostic for `sort -0'.
	Reported by Karl Berry.

	* configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE.
	Otherwise, some systems lose because the value AC_C_INLINE choses
	with plain `cc' is different from that chosen when using the ANSI-mode
	C compiler.  From Kaveh Ghazi.

Tue Apr 23 22:05:35 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro.
	* configure.in: Use it.
	* lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c.
	(EXTRA_DIST): Add getopt.c and getopt1.c

	* src/*.c, src/*.h: Update Copyright years to include 1996.

Sun Apr 21 08:04:51 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* getline.c: New version from gettext-0.10.12.
	* getline.h: Likewise.
	* configure.in (AC_CHECK_FUNCS): Add getdelim.
	Suggested by Ulrich Drepper.

	* md5sum.c (md5_check): Remove spurious newline at end of error
	format string.

	* od.c (decode_one_format): Use printf's L modifier for long doubles,
	not `l'.  From Eric Backus.

	* Makefile.am (LDADD): Put @@INTLLIBS@@ before package library.

	* od.c: Include <values.h>.
	[!BITSPERBYTE]: Define.
	[OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t.
	* configure.in (AC_CHECK_HEADERS): Add values.h.

Fri Apr 19 23:48:53 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* Makefile.am (cvs-dist): New rule.  Based on the one from
	Tom Tromey's automake.

Thu Apr 18 22:13:14 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* tail.c (main): Make code clearer:  use new variable `n_files' in
	place of `argc - optind'.  Use `file' instead of `argv + optind'.

Sat Apr 13 13:08:29 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h,
	not memcasecmp.c.

	* memcasecmp.c: Unprotoize.
	[ISASCII]: Define.
	[ISUPPER]: Define.

	* join.c (decode_field_spec): Rename local variable `valid'
	to invalid (and reverse sense) to avoid conflict with the
	macro definition in /usr/include/locale.h on SunOS 4.1.3.

Tue Apr  9 22:43:57 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* uniq.c: Add new option --ignore-case (-i).
	Include memcasecmp.h.
	(different): Compare with memcasecmp if ignoring case.
	(main): Handle 'i'.

	* join.c (memcasecmp): Remove static definition of function.
	Include memcasecmp.h instead.

	* memcasecmp.c: New file.
	* memcasecmp.h: New file.
	* lib/Makefile.am (tu_SOURCES): Add memcasecmp.c.
	(noinst_HEADERS): Add memcasecmp.h.

Thu Apr  4 17:05:33 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* tr.c: The following commands all failed unnecessarily.
	tr -cs '[:upper:]' '[X*]'
	tr -dcs '[:lower:]' n-rs-z
	tr -ds '[:xdigit:]' [:alnum:]'
	tr -dcs '[:alnum:]' [:digit:]'
	tr -dc '[:upper:]'
	Reported by Ross Ridge (ross@@worf.mks.com).
	(validate): Add missing conjunct (translating) in test for
	`translating and complementing character classes' error.  Before,
	valid uses of tr could fail.  E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''.
	(homogeneous_spec_list): New function.
	(validate): Use it to relax the old (overly restrictive) restriction
	that prohibited use of complemented character classes when translating.
	Now, that is allowed as long as the translation maps many to one.
	(get_spec_stats): Rename and redefine global has_char_class from
	has_upper_or_lower.

Wed Apr  3 07:08:57 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* aclocal.m4: Update NLS macros from gettext-0.10.11.

	* src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h
	when srcdir != builddir.  From Kaveh Ghazi.

Wed Mar 27 23:33:36 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld")
	to be POSIX compliant.  From Stephen Gildea <gildea@@x.org>.

Sun Mar 24 08:47:40 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call.
	* od.c (skip, main): Likewise.
	* tr.c (main): Likewise.

	* cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c
	join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c
	tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or
	EXIT_FAILURE, rather than 0 or 1.

Sat Mar 23 23:14:40 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* system.h [EXIT_FAILURE]: Undefine and define to 1 also if it
	is defined to zero.  Suggested by Paul Eggert.

	* sort.c [SORT_FAILURE]: New macro.
	Be careful to exit with 1 only when -c is used and the
	input is not properly sorted.  In all other cases, use
	SORT_FAILURE as required by POSIX.
	(main): Change some `error (1, ...' to use SORT_FAILURE.
	Upon successful termination, exit with EXIT_SUCCESS instead of `0'.
	Replace all uses of `2' (as exit code) with SORT_FAILURE.

Thu Mar 21 22:47:50 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* csplit.c: Include assert.h, but disable assertions.
	(process_line_count): Replace if-abort with a slightly relaxed
	assertion.  Before, `echo |csplit - 1 1' would abort.
	Reported by Samuli.Karkkainen@@hut.fi.
	(parse_patterns): Disallow uses like `csplit FILE 0' with zero
	line number, `csplit FILE 2 1' with decreasing line numbers, and
	warn about uses like `csplit FILE 3 3' that have equal line numbers.

	* sort.c (main): Declare to be of type int, not void.
	From Peter Seebach <seebs@@taniemarie.solon.com>.
	* cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c
	nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c
	wc.c (main): Likewise.

Sat Mar 16 16:30:07 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* configure.in (PACKAGE_VERSION): New macro.
	* acconfig.h (PACKAGE_VERSION): Add it.
	* src/Makefile.am: Remove rules for generating version.c.
	Remove references to version.o, version.h, and stamp-v.
	* version.c: Remove file.
	* version.h: Remove file.
	* cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c
	head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c
	sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include
	version.h.
	(main): Use PACKAGE_VERSION instead of version_string.

Mon Mar 11 16:07:08 CST 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* sort.c (write_bytes): Renamed from xfwrite.
	Remove SIZE parameter.  It was always 1. Update all callers.
	Rename NELEM parameter to N_BYTES and change its type to size_t.

Sat Mar  9 13:30:12 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c
	fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c
	split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main):
	Initialize for internationalized message support: call setlocale,
	bindtextdomain, and textdomain.
	* system.h: Add definitions and includes for NLS.
	* Makefile.am (SUBDIRS): Add intl and po.
	* src/Makefile.am (datadir): Define.
	(localedir): Define.
	(DEFS): Add LOCALEDIR definition.
	(LDADD): Add @@INTLLIBS@@.
	* aclocal.m4: Add NLS-related macro definitions from
	gettext distribution.
	* acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES,
	HAVE_STPCPY): New macros.
	Add PACKAGE and VERSION.
	* configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED.
	(VERSION): Likewise.
	(ALL_LINGUAS): Define.
	(AC_CHECK_HEADERS): Add float.h.
	(ud_GNU_GETTEXT): Use it.
	Link an nls file.
	(AC_OUTPUT): Reflect addition of two new directories, intl and po.
	Create po/Makefile.
	From Franois Pinard.

	* tr.c (star_digits_closebracket): Declare formal param, IDX,
	and local I to be of type size_t (rather than int) to avoid
	warnings from gcc -Wall.

Wed Feb 28 20:32:48 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* src/Makefile.am: Adapt for automake-0.30.
	(noinst_HEADERS): Rename from HEADERS.
	(INCLUDES): Remove -I.. and -I$(srcdir).  automake-0.30 adds these
	to DEFS automatically.
	* lib/Makefile.am (noinst_HEADERS): Rename from HEADERS.

Wed Feb 21 18:56:27 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* join.c (xfields) [without -t]: Ignore leading blanks.
	From David Dyck	(dcd@@tc.fluke.COM).

Sun Feb 18 12:07:27 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* join.c [TOLOWER]: Define.
	(usage): Briefly describe new --ignore-case (-i) option.
	(memcasecmp): New function.
	(main): Set IGNORE_CASE for -i.
	(keycmp): Compare with memcasecmp if IGNORE_CASE is set.
	Suggestion and an initial patch from Alberto Accomazzi
	<alberto@@cfa0.harvard.edu>.

Sat Feb 17 18:54:40 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* sort.c: Add -z option.  Change all occurrences of '\n' to `eolchar'.
	(usage): Describe it.
	(main): Set eolchar to 0 for -z.
	From Mark W. Eichin <eichin@@cygnus.com>.

Fri Feb 16 21:44:14 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* join.c (main): Mark two strings for translation.
	* md5sum.c (md5_check): Mark a string for translation.
	From Franois Pinard.

Mon Feb 12 21:12:28 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	Update for automake-0.29.
	* Makefile.am (CONFIG_HEADER): Don't define.  Automake now does it.
	* src/Makefile.am: Likewise.
	* lib/Makefile.am: Likewise.
	* doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS.
	* man/Makefile.am (man_MANS): Renamed from MANS.

	* fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT.
	[FALSE]: Likewise.
	From Derek Clegg (dclegg@@next.com).

Sat Feb  3 16:20:40 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* Version 1.14.

Wed Jan 31 23:26:13 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* tail.c (dump_remainder): Flush stdout when tailing-forever on
	multiple files.  From Carlos Canau <Carlos.Canau@@relay.puug.pt>.

Fri Jan  5 18:30:28  1996 Jim Meyering  (meyering@@na-net.ornl.gov)

	* aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS,
	not just -Xc.  From Franois Pinard.

	* doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh.  mdate-sh is
	distributed automatically.  From Tom Tromey.

Thu Jan  4 20:32:52 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* nl.c: Include rx.h after limit.h (not before) to avoid warning
	about the redeclaration of RE_DUP_MAX in limit.h.  rx.h protects
	its definition.  From Kaveh Ghazi.

	* src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check
	works again.  Reported by Franois Pinard and Kaveh Ghazi.

	* rx.c [SYNTAX]: Rename from SYNTAX_TABLE.
	[SYNTAX_TABLE]: Remove extern dcl of re_syntax_table.
	(RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type
	mismatch errors from e.g. SunOS's /bin/cc.
	Reported by Kaveh Ghazi.

Wed Jan  3 23:34:39 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* configure.in (VERSION): Set variable directly rather than from
	a separate file.
	* Makefile.am (DIST_OTHER): Remove VERSION.
	* src/Makefile.am (version.c): Depend on Makefile, not ../VERSION.
	(stamp-v): New target; depend on Makefile.
	(DISTCLEANFILES): Add stamp-v, version.c.

Tue Jan  2 00:08:08 1996  Jim Meyering  (meyering@@na-net.ornl.gov)

	* sort.c (keycompare): Rewrite cases handling ignored characters
	so that they really are ignored.  Reported by Carl Johnson
	<carlj@@cjlinux.home.org>.

Fri Dec 22 21:34:55 1995  Andreas Schwab  <schwab@@issan.informatik.uni-dortmund.de>

	* configure.in: Touch stamp-h only if config.h is remade.

	* csplit.c (extract_regexp) [!WITH_REGEX]: Intialize
	syntax_parens field.

Mon Dec 18 21:42:44 1995  Jim Meyering  (meyering@@comco.com)

	Use automake to generate Makefile.in files.
	* Makefile.am: New file.
	* doc/Makefile.am: New file.
	* lib/Makefile.am: New file.
	* man/Makefile.am: New file.
	* src/Makefile.am: New file.

Thu Dec 14 21:13:22 1995  Jim Meyering  (meyering@@comco.com)

	* fmt.c (main): Use xstrtol instead of atoi.

	* fold.c (main): Use xstrtol instead of atoi.
	(fold_file): Make a couple locals `int', not size_t, and cast
	fwrite's third parameter to size_t.

	* nl.c (main): Use xstrtol instead of atoi.
	Rename misleading --first-page=N option to --starting-line-number=N.
	(usage): Update.

	* uniq.c (main): Use xstrtol instead of atoi.

Fri Dec  8 20:48:00 1995  Jim Meyering  (meyering@@comco.com)

	* aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr.

Thu Dec  7 19:55:03 1995  Jim Meyering  (meyering@@comco.com)

	* aclocal.m4 (ud_WITH_REGEX): New macro.
	* configure.in: Use it.
	* rx.c, rx.h: New files.
	* lib/Makefile.in (REGEX): Set to @@REGEXOBJ@@, not regex.o.
	(SOURCES, DISTFILES): Add rx.c, rx.h.
	* acconfig.h (WITH_REGEX): Add it.
	* csplit.c [!WITH_REGEX]: Include rx.h.
	* nl.c [!WITH_REGEX]: Likewise.
	* tac.c [!WITH_REGEX]: Likewise.
	From Ulrich Drepper and Franois Pinard.

Tue Dec  5 17:49:53 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (main): Diagnose invalid arguments to -k, then fail.

	* sort.c (numcompare): Properly handle all cases in which signs differ.
	From Karl Heuer.

	* Makefile.in (mandir): @@mandir@@ is just $(prefix)/man.
	Append `/man1'.  Reported by Karl Heuer.

	* sum.c (bsd_sum_file): Remove misleading comment.  From Karl Heuer.

	* src/Makefile.in [.c._o]: Don't create $<-tmp.  From Kaveh Ghazi.

Fri Dec  1 01:02:36 1995  Jim Meyering  (meyering@@comco.com)

	* lib/Makefile.in (default): New target.

	* sort.c (numcompare): Properly order `-' and valid integers;
	treat `-' as if it were zero.  Reported by Ross Alexander
	<r.alexander@@auckland.ac.nz>.

	* Makefile.in (DISTFILES): Remove unused mkdep-Makefile.
	(.PHONY): Depend on default.

Wed Nov 29 21:50:53 1995  Jim Meyering  (meyering@@comco.com)

	* aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now.
	(jm_AUTODEPS): Likewise.
	(jm_WITH_GNU_MAKE): Likewise.
	* configure.in (jm_AUTODEPS): Remove.

	* sort.c (begfield): Replace loop with equivalent if-else.
	(limfield): Fix bug that made field specs like -k1.5 return a
	pointer into LINE beyond the first field.
	Don't try to trim trailing blanks here; it's not
	possible because we don't know where the field begins.
	Replace loop with equivalent if-else.
	(trim_trailing_blanks): New function.
	(findlines): Call it.
	(keycompare): Likewise.
	(main): Don't decrement T2 corresponding to `x' in field
	specs like -ku.v,w.x.

Sun Nov 26 15:50:23 1995  Jim Meyering  (meyering@@comco.com)

	* csplit.c [!UINT_MAX]: Define.
	[!INT_MAX]: Define.
	Include xstrtoul.h.
	(string_to_number): Remove function.
	(check_for_offset): Use xstrtoul instead of string_to_number.
	(parse_repeat_count): Likewise.
	(parse_patterns): Likewise.
	(main): Likewise.

Wed Nov 22 23:12:47 1995  Jim Meyering  (meyering@@comco.com)

	* Makefile.in (all et. al.): If make was invoked with -k and a
	sub-make fails, fail after the loop rather than exiting right away.
	Otherwise, make's -k option could be ineffective.

Sat Nov 18 12:04:30 1995  Jim Meyering  (meyering@@comco.com)

	* src/Makefile.in (version.c): Depend on ../VERSION, not Makefile.

	Update for autoconf-2.5:
	* src/Makefile.in (libdir): Set to @@libdir@@.
	(bindir): Set to @@bindir@@.
	* doc/Makefile.in (infodir): Set to @@infodir@@.
	* man/Makefile.in (exec_prefix): Remove it.
	(mandir): Set to @@mandir@@.
	(bindir): Remove it.

Thu Nov 16 21:25:45 1995  Jim Meyering  (meyering@@comco.com)

	* Makefile.in (default): New default target.  Depend on `all' to
	work around bug in AIX-3.2.5's /bin/make.  Reported by Andreas Luik
	<luik@@isa.de>.

Wed Nov 15 23:48:31 1995  Jim Meyering  (meyering@@comco.com)

	* mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS.

	* aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP.
	* src/Makefile.in (C_MKDEP): Rename from MKDEP.
	* lib/Makefile.in (C_MKDEP): Likewise.
	* mkdep-Makefile (C_MKDEP): Likewise.
	Add comments.

	* csplit.c [__P]: Don't define it here.
	* pr.c [__P]: Don't define it here.
	* fmt.c [__P]: Don't define it here.
	* system.h [__P]: Define it here.

	* aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS.
	Revamp, with suggestions from Franc,ois Pinard.
	(jm_WITH_GNU_MAKE): New macro.
	(jm_PROG_MKDEP): New macro.
	* configure.in (jm_PROG_MKDEP): Use it.
	* src/Makefile.in (MKDEP): Set it.
	* lib/Makefile.in (MKDEP): Likewise.
	* mkdep-Makefile: Use MKDEP, not DEP_CC.
	(DEP_CFLAGS): Remove it.

Tue Nov 14 23:10:54 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c: Add support for sorting numbers in scientific notation.
	Include xstrtod.h.
	(struct keyfield): Add field: general_numeric.
	(usage): Describe -g option.
	(general_numcompare): New function.
	(keycompare): Use new comparison function when general_numeric
	flag is set.
	(set_ordering): Honor `g' flag.
	(main): Initialize and use new field.
	From Marcus Daniels <marcus@@sysc.pdx.edu>.

	* configure.in (AC_REPLACE_FUNCS): Add strtod.
	* lib/Makefile.in (SOURCES): Add xstrtod.c.
	(OBJECTS): Add xstrtod.o.
	(DISTFILES): Add xstrtod.h.

	* csplit.c (cleanup): Don't exit.
	(interrupt_handler): Rewrite to reset default signal handler
	then repost caught signal.
	(xmalloc, xrealloc, read_input, write_to_file, handle_line_error,
	process_line_count, process_regexp, create_output_file,
	close_output_file): Call cleanup_fatal, not cleanup.
	Add const attribute to lots of parameters.
	(cleanup_fatal): Renamed from cleanup.  Call cleanup, then exit.
	Update callers.

	* tac.c (cleanup): Don't exit.
	(cleanup_fatal): New function.  Call cleanup, then exit.
	(sighandler): New function.
	(cleanup_fatal): Renamed from cleanup.  Call cleanup, then exit.
	Update callers.
	(tac_stdin): Set up sighandler as signal handler, not `cleanup'.

Sat Nov 11 15:46:02 1995  Jim Meyering  (meyering@@comco.com)

	* od.c (skip): Cast fseek's offset argument to `long'.
	Erik Bennett <bennett@@cvo.oneworld.com> reported that this is
	necessary on BSDI systems.  And if offset doesn't fit in a long,
	then try using lseek instead.

	* sort.c (xmalloc): Declare static.
	(xrealloc): Likewise.

	* tac.c (cleanup): Add signal number parameter.
	Update callers.

	* cat.c (main): Don't die when dev/ino of input and output are
	the same and the file descriptors correspond to stdin and stdout.
	This is necessary on at least Digital UNIX (aka OSF1) 3.2C.
	Otherwise, running `cat << X > $$' would fail with `cat: -: input
	file is output file'.  From Jarkko Hietaniemi <jhi@@epsilon.hut.fi>.

	* Makefile.in (DISTFILES): Add @@README_ALPHA@@.
	(config.status) Depend on VERSION.
	* configure.in: Set README_ALPHA if the version number ends in [a-z].

Fri Nov 10 21:13:42 1995  Jim Meyering  (meyering@@comco.com)

	* fold.c (usage): Clarify meaning of --spaces.  From Karl Berry.

	src/Makefile.in (.c._c): Don't redirect directly to $@@.
	(._c._o, .c._o): Remove temporary src file.

Tue Nov  7 23:55:24 1995  Jim Meyering  (meyering@@comco.com)

	* VERSION: New file.
	* configure.in (VERSION): New variable.
	(PACKAGE): New variable.

	* Makefile.in (DISTFILES): Add VERSION.
	(distdir): Use @@PACKAGE@@-@@VERSION@@, not distname.
	Remove all references to distname.
	* src/Makefile.in (version.c): Generate it.
	(SOURCES): Remove now-generated version.c.
	(distclean): Delete version.c.
	* doc/Makefile.in (version.texi): Use @@PACKAGE@@-@@VERSION@@,
	not version.c

	* */Makefile.in (distdir): Use @@PACKAGE@@-@@VERSION@@, not distname.
	Remove all references to distname.

	* split.c: New option: --verbose.
	(main): Recognize it.
	(usage): Document it.
	From Marty Leisner <leisner@@sdsp.mc.xerox.com>.

Sun Nov  5 06:59:27 1995  Jim Meyering  (meyering@@comco.com)

	* src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c,
	and unexpand.c.

	* pr.c: Protoize.
	(store_columns): Remove spurious 2nd argument in call to read_line.
	[__P]: Define.  Use it in prototyped forward decls.

	* csplit.c: Move prototypes after struct declarations.
	Remove prototypes for xmalloc, xrealloc.
	Protect prototypes with __P.
	(new_control_record): Cast arg 1 to realloc.

	* fmt.c [__P]: Test PROTOTYPES, not __STDC__.
	Protoize.

Sat Nov  4 23:51:30 1995  Jim Meyering  (meyering@@comco.com)

	* csplit.c (close_output_file): Set output_stream to NULL so we
	don't recurse endlessly between this function and cleanup.

	* unexpand.c: Reorder functions to obviate forward dcls.  Remove
	forward dcls.  Protoize.  Add `const' attribute to some parameters.

Mon Oct 30 23:15:56 1995  Jim Meyering  (meyering@@comco.com)

	* wc.c: Reorder functions to obviate forward dcls.  Remove
	forward dcls.  Protoize.  Add `const' attribute to some parameters.
	* uniq.c: Likewise.
	* split.c: Likewise.

	* split.c (isdigits, convint): Remove these.
	(main): Use xstrtol instead.

Sun Oct 29 14:04:36 1995  Jim Meyering  (meyering@@comco.com)

	* paste.c (main): Move function body to end of file.
	Remove forward dcls and protoize.
	* sum.c (main): Likewise.
	* nl.c: Protoize.  Reorder functions to obviate forward dcls.
	Remove forward dcls.
	* tac.c: Likewise.
	* src/Makefile.in (OBJECTS): Reflect that all of the above
	now use prototypes.

	* sum.c (bsd_sum_file): Give file name parameter const attribute.
	(sysv_sum_file): Likewise.

	* tac.c (xwrite): Give output buffer parameter const attribute.
	(output): Likewise for both parameters.
	(tac): Likewise for file name parameter.
	(tac_file): Likewise.

Sat Oct 28 16:02:39 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c (md5_check): Use the same message format when there is
	a single file and it gets a read error or checksum mismatch as when
	there are more.  Write that warning to standard error, not standard
	output.  Suggestions from Greg Troxel (gdt@@b-sgi.bbn.com).

Thu Oct 26 00:11:35 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (xtmpfopen): New function to set proper permissions on
	temporary files.  Use it instead of xfopen. Reported by Erik Corry
	(erik@@kroete2.freinet.de).

Mon Oct 23 23:17:04 1995  Jim Meyering  (meyering@@comco.com)

	* aclocal.m4 (jm_WITH_AUTODEPS): New directive.
	* configure.in: Use it.

	* lib/Makefile.in (INCLUDE, COMPILE): New variables.
	(.c.o): Rewrite to be more like src/Makefile.in.

	* src/Makefile.in (distclean): Remove .deps.
	Include @@top_srcdir@@/mkdep-Makefile.

	* mkdep.Makefile: New file.
	* Makefile.in (DISTFILES): Add mkdep-Makefile.
	* doc/Makefile.in (mostlyclean): Also remove *.info.

Thu Oct 19 17:38:28 1995  Jim Meyering  (meyering@@comco.com)

	* od.c: Indent cpp directives.

	* tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere
	with large repeat counts.
	(struct E_string): New struct.
	(find_closing_delim): Take E_string arg rather than char* and length.
	(find_bracketed_repeat): Likewise.
	(star_digits_closebracket): New function.
	(append_char_class): No longer give diagnostic.
	(append_equiv_class): Likewise.
	(build_spec_list): Give them here instead, allowing string1 like
	[:*][:upper:] that got errors before.
	Take E_string arg rather than char*.
	Convert switch stmts into if-then so as to use ES_MATCH.

Tue Oct 17 22:48:00 1995  Jim Meyering  (meyering@@comco.com)

	* cat.c: Protoize.  Reorder functions to obviate forward dcls.
	Remove forward dcls.
	* expand.c: Likewise.
	* fold.c: Likewise.
	* head.c: Likewise.
	* od.c: Likewise.
	* sort.c: Likewise.
	* tail.c: Likewise.

	* src/Makefile.in (OBJECTS): Reflect that all of the above
	now use prototypes.

	* head.c: Add `const' attribute to dcls of lots of formals.

	* sort.c: Add `const' attribute to dcls of lots of formals.
	Move struct dcls to precede dcls of file-scope variables.
	(monthtab, keyhead): Separate variable dcls from type dcls.

Fri Oct 13 20:38:39 1995  Jim Meyering  (meyering@@comco.com)

	* join.c (add_field_list): Allow SPACE and TAB as well as `,' as
	list item separators, per POSIX spec.
	(prjoin): Rewrite loop that iterates over field specs.
	Handle case in which file spec is 0.

Sun Oct  8 22:41:15 1995  Jim Meyering  (meyering@@comco.com)

	* strpbrk.c: New file.
	* lib/Makefile.in (SOURCES): Add strpbrk.c.
	Remove bcopy.c.

Sat Oct  7 22:27:01 1995  Jim Meyering  (meyering@@comco.com)

	* join.c (add_field): No longer return a value.
	(decode_field_spec): New function.
	(add_field_list): Rewrite to be more strict.
	Before, `,1.2' was accepted as valid.
	(main): Use xstrtol instead atoi.
	Combine nearly identical -a and -v cases.
	Close input files.

Fri Oct  6 23:10:01 1995  Jim Meyering  (meyering@@comco.com)

	* join.c (main): Report `too few/many non-option arguments'
	then print --help output rather than just the latter.
	Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'.
	(usage): Describe POSIX -1, -2 options and deprecate -j* ones

	* join.c (usage): Move to precede all other functions.

	* join.c: Protoize.

Tue Oct  3 22:44:05 1995  Jim Meyering  (meyering@@comco.com)

	* csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION,
	to determine whether `sigaction' functions are available.
	Reported by Paul Nevai <nevai@@ops.mps.ohio-state.edu>.
	Fix suggested by Karl Berry.

	* md5sum.c (main): Declare counter, N_STRINGS, to be an integral
	type, not `char'.

	* cut.c: Convert many declarations using `int' to use `unsigned int'
	to avoid warnings from `gcc -Wall' about comparing signed and
	unsigned types.
	(set_fields): Use memset (not open coded loop) to initialize array.

Thu Sep 28 23:16:05 1995  Jim Meyering  (meyering@@comco.com)

	* Version 1.13.

	* Makefile.in (DISTFILES): Remove README.alpha for major release.

	* od.c (decode_one_format): Remove spurious semicolon.
	From John Kodis.

Tue Sep 26 23:05:01 1995  Jim Meyering  (meyering@@comco.com)

	* man/Makefile.in (install-data, uninstall): Use sed not basename.
	The GNU Coding Standard suggests that only a select set of
	relatively standard utilities be used in Makefiles.  basename is
	not among them.  Suggested by Ulrich Drepper.

Sun Sep 24 08:36:47 1995  Jim Meyering  (meyering@@comco.com)

	* cksum.c: Protoize.
	* cut.c: Protoize.

	* src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use
	prototypes.
	(cksum): Depend on cksum$O.
	(cut): Depend on cut$O.

Sat Sep 23 15:43:46 1995  Jim Meyering  (meyering@@comco.com)

	* Version 1.12.2.

	* Makefile.in (DISTFILES): Add README.alpha.

	* lib/Makfile.in (GETOPT, MEMCHR, REGEX): New variables.
	(OBJECTS): Use them instead of hard-coding object file names.
	Suggested by Ulrich Drepper.

	* md5sum.c (md5_check): Distinguish between open/read failure
	and checksum mismatch.

Mon Sep 18 23:15:05 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c: Protoize.
	* src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O.
	(join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h.
	(md5sum): Depend on md5sum$O.

	* md5sum.c (main, usage): Remove -h, -s, -v short options.
	Rename --verbose to --warn, --quiet to --status.
	(main): Handle --help and --version using parse_long_options.
	(md5_check): Check ferror.

	* sort.c (tempname): Replace `16' with a more readable expansion.
	Make sure that counter never exceeds 99999.
	(checkfp): Rearrange loop to avoid duplicate test.
	Move a couple dcls from function scope into inner block.

Tue Aug  8 21:49:27 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c (main): Fail if either --verbose or --quiet is specified
	when not verifying checksums.

	* md5sum.c (md5_check): Fail if no valid line is found.
	Don't use the word `fail' unless there were failures --
	instead, say `all N tests passed.'

	* md5sum.c (main) [handling --string option]: Don't output
	nonstandard `b' binary flag.  From Greg Troxel (gdt@@bbn.com).
	* md5-test.rfc: Remove now-inconsistant `b' marker.
	(usage): Clarify help message.  With suggestions from Greg Troxel.

Mon Aug  7 23:27:54 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious
	compiler warning.  From Ulrich Drepper.

	* pr.c (read_line) [lint]: Initialize CHARS to avoid spurious
	compiler warning.  From Ulrich Drepper.

	* Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB.
	From Franc,ois.

Mon Aug  7 00:02:59 1995  Jim Meyering  (meyering@@comco.com)

	* system.h (_): Define macro -- as empty for now.
	* src/*.c: Annotate localizable strings with _(...).  From Franc,ois.

Sat Aug  5 23:51:25 1995  Jim Meyering  (meyering@@comco.com)

	* Version 1.12.1.

	* configure.in: Add fp_C_PROTOTYPES.

Fri Aug  4 23:21:46 1995  Jim Meyering  (meyering@@comco.com)

	* src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1.
	Add suffixes, dependencies, and rules to convert ANSI source to K&R
	when required.  Mark tr.o and comm.o as the only such files (for now).

	* tr.c: Protoize.
	* comm.c: Protoize.

	* Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h.
	(configure): Depend on aclocal.m4.
	(stamp.h.in): Depend on aclocal.m4 and acconfig.h.

Sun Jul 30 00:01:58 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c (md5_check): Use getline instead of fgets.

	* lib/Makefile.in (SOURCES): Add getline.c.
	(OBJECTS): Add getline.o.
	(DISTFILES): Add getline.h.
	(getline.o): Depend on getline.h.

	* md5.c [memcpy]: Define to bcopy if needed.
	(md5_buffer): Explicitely cast SWAP expressions to unsigned
	to avoid warning.

	* lib/Makefile.in (strtoul.o): Depend on strtol.c.

	* sort.c (check): Print `disorder on...' message on standard error,
	not stdout.  This is a minor concession to POSIX which says
	`no output shall be produced...'.

	* sort.c (main): Fix -k so it works. -k 2,3 was being treated
	like -k 2.  Reported by Marcus Daniels <marcus@@sysc.pdx.edu>.

Wed Jul 26 22:54:48 1995  Jim Meyering  (meyering@@comco.com)

	* man/Makefile.in (install, uninstall): Strip off `.1', not just `1'
	before applying $(transform) to manual name.  From Karl Berry.

	* md5sum.c (have_read_stdin): New global variable.
	(md5_file, md5_check): Set it.
	(main): Use it.

	* md5sum.c [OPENOPTS]: Depend explicitly on BINARY.
	(md5_file): Take a new parameter, MD5_RESULT, and no longer
	generate output.
	(md5_check): Invoke md5_file instead of calling fopen directly.
	When giving a diagnostic for a line with invalid format, also report
	the line number.
	(main): Generate output after a successful md5_file call.
	[in many places]: Upon detection of an error, rather than exiting
	immediately, issue a diagnostic, note that an error occurred and
	exit later.

Mon Jul 24 21:48:26 1995  Jim Meyering  (meyering@@comco.com)

	* tail.c (tail_bytes) [from_start]: For regular files, seek
	relative to the initial input file pointer position, not
	necessarily from the beginning of the file.
	[!from_start]: Don't back up past the initial position of the
	input file pointer.
	(tail_lines): Call file_lines only if FD refers to a regular file
	with its file pointer positioned at beginning of file.  Otherwise,
	call pipe_lines.  This is a kludge.  Once there's a decent test
	suite, fix this properly.
	Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k
	would output both lines of the input file even though the first had
	already been read.  Reported by John Roll (john@@panic.harvard.edu).

	* md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower.

	* csplit.c (main): When too few arguments are given, don't just
	issue the usage message; also report why.

Sat Jul 22 00:16:01 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c (md5_check): New function -- extracted from main.

Fri Jul 21 01:21:49 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c (md5_file): New function -- extracted from main.
	(main): Call the new function instead of doing all that in an
	if-stmt. Always use "%s" format rather than raw filename as
	format argument in printf-style functions like error.  Otherwise,
	filenames containing `%' are likely to lose.
	Remove all mention of `old format'.
	(split_3): No longer parse the `new format.'  There is only one
	valid format now: the compatible one.

	* lib/Makefile.in (SOURCES): Add md5.c.
	(OBJECTS): Add md5.o.
	(DISTFILES): Add md5.h.
	(md5.o): Depend on md5.h.

	* system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them.
	* lib/md5.c (md5_stream): Check for read failure and return
	indication of success rather than second argument.
	* lib/md5.h (md5_stream): Update prototype.
	[__P]: Define macro.
	* md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS.
	(main): Report an error if md5_stream fails.  Otherwise, running
	`md5sum dir-on-mounted-filesystem' always reported the checksum
	for an empty file.  Now it gets the `is a directory' error.
	Greg McGary (gkm@@magilla.cichlid.com) reported that the released
	version got stuck in an infinite loop with such arguments.

	* lib/md5.c: New file.
	* lib/md5.h: New file.
	* md5sum.c: Rewritten to use library interface.
	From Ulrich Drepper.

Sun Jul 16 18:42:34 1995  Jim Meyering  (meyering@@comco.com)

	* configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword.

Tue Jul 11 21:56:02 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c Add #else block after #ifdef VMS.
	(main): Rename local variable.
	Detect and report failed fclose calls on stdout and checkfile_stream.

	* tr.c (unqote): Comment out unreachable break stmts.
	(append_range): Declare FIRST and LAST parameters to be unsigned int,
	not size_t.
	(find_closing_delim): Clean up interface, separating boolean success
	indicator and index.
	(find_bracketed_repeat): Likewise.
	(build_spec_list): Adapt to use new interfaces.
	Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of
	type size_t, not int.
	(main): Declare NR and CHARS_READ to be of type long, not int.

	* sort.c (main): Comment out unreachable break stmt.

	* tail.c (tail): Explicitly cast to long the N_UNITS argumennt in
	call to tail_lines.  Otherwise, NetBSD lost because N_UNITS (of type
	off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
	long.  Reported by Dan Hagerty (hag@@gnu.ai.it.edu).

	* comm.c: Reorder functions so main is last, so no forward dcls
	are needed.

Sun Jul  9 11:41:15 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (main): When using obsolescent +pos -pos syntax, allow
	omission of field spec only when character offset is specified.
	Otherwise, -. +. would be accepted.

Sat Jul  8 13:48:06 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N
	position specification.  For compatibility with existing practice
	(what vendors?), omitting M is now equivalent to specifying `0' for M,
	but only when using the +pos -pos syntax, not with the -k option.
	From Rick Sladkey (jrs@@world.std.com).

Thu Jul  6 23:44:20 1995  Jim Meyering  (meyering@@comco.com)

	* od.c (dump): Correct loop-termination criterion.
	Before, running `printf 1234| ./od --width=4 --read-bytes=4'
	printed output for 8 bytes -- the last four were garbage.
	This happened only when the dump limit, N, was specified (with
	--read-bytes=N) and N was a multiple of bytes_per_block
	(usually 16, but 4 in this example).  From Andreas Schwab.

Sun Jul  2 22:12:40 1995  Jim Meyering  (meyering@@comco.com)

	* lib/Makefile.in (check): Depend on libtu.a.

	* md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well.
	(main): Print each sum line in (de facto) standard Plumb/Lankester
	format.
	New option: --quiet.
	Check option no longer takes an argument.
	When checking, exit status reflects success.

Sat Jun 24 16:18:01 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c [__GNUC__]: Don't conditionalize use of "inline".
	Autoconf (via config.h) defines it away for compilers that don't
	grok it.

	* cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before
	defining to avoid redefinition warning on some systems.

	* csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES.
	This avoids potential conflict with max macro from some system's
	header files when using bad pre-ANSI compilers.

	* uniq.c (usage): Fix typo in text of --help output.
	From Steve McConnel <steve@@acadcomp.sil.org>

	* md5sum.c [uint32]: When testing for 32-bit arithmetic type,
	also check `unsigned long', as a concession to systems with
	int's smaller than 32 bits.

	* configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since
	AC_FUNC_MEMCMP already handles it.  This avoids warnings from
	ranlib on nextstep systems.  From Kaveh Ghazi.

	* csplit.c (interrupt_handler): Declare to have a single integer
	parameter.  Otherwise, some compilers fail with a type mismatch
	error in sa_handler assignment.

	* fmt.c [word]: Redefine.  Otherwise, systems (Unicos for one) with
	headers that typedef `word' get syntax errors because of the
	variable by the same name.

	* join.c [join]: Redefine to avoid conflict with prototype in some
	system header file.  Also for Unicos.

	* md5sum.c (main): Remove spurious colon in getopt spec string.
	From Ken Pizzini <kenp@@spry.com>.

Tue Jun 20 06:59:16 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c (md5_file): Initialize two elements of LEN portably,
	rather than with ANSI aggregate initialization.  Reported by
	Edzer Pebesma <Edzer.Pebesma@@rivm.nl>.

Sun Jun 18 09:15:57 1995  Jim Meyering  (meyering@@comco.com)

	* Version 1.12.

	* md5sum.c (process_buffer): Copy values from struct into
	individual local variables before performing computation on them,
	then copy results back into returned struct.  Solely for better
	optimization by compilers that can't keep struct members in
	registers.  From Ulrich Drepper.

Thu Jun 15 22:09:14 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c: Remove unnecessary uses of `defined' in #if* tests.
	Don't use #elif.  Some older compilers don't grok it.
	(split_3): New function to parse out sum, flag, and filename
	when reading check file.
	(hex_digits): Remove length parameter since string parameter is
	now nul-terminated.
	(main): Don't allocate separate arrays for filename and sum
	when checking.  Get pointers into line buffer with split_3 instead
	of using sscanf.
	(main): Treat `no file args' just like `-' when not checking
	or using strings.
	(hex_digits): Unprotoize.

	* md5sum.c (main): Don't use a separate loop to convert to lower
	case.  Suggested by Ulrich Drepper.
	(CLOSE): New macro.
	(md5_file): Use it.
	From Ulrich Drepper.

	* md5sum.c: Don't include values.h.
	[__P]: Undefine it.

	* md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__,
	and _POSIX_VERSION.  Reported by Arne H. Juul.

Tue Jun 13 21:20:10 1995  Jim Meyering  (meyering@@comco.com)

	* tr.c [NDEBUG]: Define it to disable assertions.  Some systems
	have a broken <assert.h> header.
	(is_char_class_member): Set a variable in each branch of switch
	stmt and return that value after the switch (rather than returning
	directly from every branch).
	(unquote): More int->size_t changes.
	(build_spec_list): More int->size_t changes.
	Be very careful about comparison now that variables are unsigned:
	Use i + 2 < len rather than i < len - 2.  The latter didn't work
	for len < 2.  Caught early thanks to a thorough regression test
	suite.

Mon Jun 12 23:07:59 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (xfclose): Don't try to flush stdin, only stdout.
	Otherwise, at least Ultrix-4.3's fflush would return EOF.
	Reported by Jim Blandy (jimb@@cyclic.com).

	* tr.c (non_neg_strtol): Don't compare signed and unsigned.
	[struct Spec_list] (indefinite_repeat_element): New member.
	Use size_t rather than int or unsigned long where reasonable.
	(get_spec_status): Make interface cleaner.
	(get_s1_spec_status): New function.
	(get_s2_spec_status): New function.
	(validate): Use new functions instead of get_spec_status.

Sun Jun 11 00:39:50 1995  Jim Meyering  (meyering@@comco.com)

	* md5sum.c: New file.  From Ulrich Drepper.
	* md5-test.rfc: New file.
	* Makefile.in (PROGS): Add md5sum.
	(check): Run a recursive make in each subdirectory.
	* man/Makefile.in (MANFILES): Add md5sum.1.
	* src/Makefile.in (SOURCES): Add md5sum.c.
	(OBJECTS): Add md5sum.o.
	(PROGS): Add md5sum.
	(check): Add basic checks for md5sum.
	(md5sum): Add dependency and link rule.
	(DISTFILES): Add md5-test.rfc.

	* tr.c (look_up_char_class, append_char_class, append_equiv_class):
	Use const attribute when appropriate.

Sun May 28 14:48:58 1995  Jim Meyering  (meyering@@comco.com)

	* join.c: Overhauled to make -a1 and -a2 options work.
	Passed all tests in a fairly thorough test suite.
	Reported by Michael Hasselberg (mikelh@@zonta.ping.de).

Sat May 27 00:35:47 1995  Jim Meyering  (meyering@@comco.com)

	* tail.c (main): Remove dcl of and statements that set now-unused
	variable.

	* system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h.
	Without this, SunOS doesn't get type for memchr.
	Reported by Kaveh Ghazi.

Thu May 25 00:06:50 1995  Jim Meyering  (meyering@@comco.com)

	* tail.c (tail_lines): Change one more `long' to `off_t'.
	Otherwise, tail didn't work on NetBSD.  From Arne H. Juul.

	* csplit.c [struct control]: Change type of `repeat' to unsigned
	long to avoid conversion warning.

Sun May 21 07:50:00 1995  Jim Meyering  (meyering@@comco.com)

	* Makefile.in (.PHONY): TAGS is not a phony target.  From Franc,ois.

	* xstrtol.c (__strtol): Remove prototype altogether.
	Move inclusion of xstrtol.h back so that it follows system headers.

	* Version 1.11.2.

Sat May 20 06:44:14 1995  Jim Meyering  (meyering@@comco.com)

	* join.c (ADD_FIELD): Declare in K&R style, not ANSI.
	From Kaveh Ghazi.

	* xstrtol.c: Define NDEBUG for systems with losing assert.h.
	(__strtol): Add __unsigned to prototype and use __P.
	Move inclusion of xstrtol.h to precede prototype.
	From Kaveh Ghazi.

	* memmove.c: Include config.h for definition of const.
	From Kaveh Ghazi.

	* All Makefile.in (install-exec, install-exec): New targets.
	From Karl Berry.

	* tr.c (look_up_char_class): Take a string length argument -- required
	because the argument is a string that is *not* NUL-terminated.
	Use strncmp, not strcmp and add string lengths comparison.
	(append_char_class): Update caller.  Before this change,
	tr '[:upper:]' '[:lower:]' read one uninitialized byte.
	From Andreas Schwab.

	* split.c (next_file_name): Move dcls of file-scope variables into
	this function.  Don't rely on arithmetic being two's complement.

	* paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers.
	Instead, declare two FILE structs and use their addresses.

	* csplit.c (record_line_starts): Remove set-but-not-used,
	file-scope variable.

Sat May 13 08:57:20 1995  Jim Meyering  (meyering@@comco.com)

	* all source files (usage): Include one- or two-line synopsis
	in --help output.  From Karl Berry.

	* lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no
	longer used.

Wed May 10 22:26:35 1995  Jim Meyering  (meyering@@comco.com)

	* Version 1.11.1

Sun May  7 13:35:49 1995  Jim Meyering  (meyering@@comco.com)

	* all Makefile.in (maintainer-clean): Renamed from realclean
	per GNU Standards.

Thu May  4 23:15:58 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (main): Use stat, not safe_stat.  The latter was unnecessary.
	Don't include safe-stat.h.

	* lib/Makefile.in (DISTFILES): Remove safe-xstat.hin.
	Remove all associated rules.  safe-l?stat.h are no longer used.

	* sort.c Don't hard-code /tmp.
	[DEFAULT_TMPDIR]: Use this instead.
	* tac.c (save_stdin): Likewise.

	* sort.c (set_ordering): Properly parse arguments like `+x.yn'.
	Reported by John Salmon (johns@@mullet.anu.edu.au).
	Patch from Mike Haertel.

Wed Apr 26 23:48:13 1995  Jim Meyering  (meyering@@comco.com)

	* sort.c (tempname): AND-off high bits of pid so that its decimal
	string representation is no longer than five digits.
	From Hans Verkuil (hans@@wyst.hobby.nl).

Thu Apr 20 23:09:33 1995  Jim Meyering  (meyering@@comco.com)

	* expand.c (add_tabstop): Give correct size when reallocating
	tab_list buffer.  From Geoff Odhner (geoff@@franklin.com).
	Reproduce with expand --t=`perl -e "print join (',', (1..300));"`.

Tue Apr 18 22:57:43 1995  Jim Meyering  (meyering@@comco.com)

	* configure.in (AC_OUTPUT): Use echo, not date, to avoid creating
	unnecessary conflicts for people using version control software
	like RCS and CVS.
	(AC_ARG_PROGRAM): Use it.

Thu Apr 13 23:22:57 1995  Jim Meyering  (meyering@@comco.com)

	* head.c: Remove block of redundant comments describing options.
	(usage): Remove reference to -l option.  It's not valid.

	* od.c (write_block): Declare index I as unsigned int, not int.
	(get_lcm): Likewise.
	(dump_strings): Likewise.
	(main): Likewise.
	(dump): Cast BYTES_PER_BLOCK to off_t in MIN expression.
	(dump_strings): Declare bufsize to be of type size_t, not int.

	* split.c (next_file_name): Don't reuse X as an index.
	Declare new variable I instead.

Sat Mar 25 15:07:23 1995  Jim Meyering  (meyering@@comco.com)

	* csplit.c: Declare as `unsigned int' all variables that were
	just `unsigned'.
	(make_filename): Change type of arg to unsigned int.
	(split_file): Change type of indices to unsigned int.

Thu Mar 16 22:05:05 1995  Jim Meyering  (meyering@@comco.com)

	* od.c (main): Detect and fail when argument to -N is too large
	to fit in an off_t.

Sun Mar 12 12:02:39 1995  Jim Meyering  (meyering@@comco.com)

	* configure.in (AC_REPLACE_FUNCS): Add memcmp.c.
	Remove check for sizeof long.

	* linebuffer.h: Undefine __P before defining it.
	* long-options.h: Likewise.
	* xstrtol.h: Likewise.

	* memcpy.c: New file.
	* lib/Makefile.in (SOURCES): Add memcpy.c.

Fri Mar 10 21:14:11 1995  Jim Meyering  (meyering@@comco.com)

	* src/*.c: Update Copyright dates.

Sat Feb 11 07:31:08 1995  Jim Meyering  (meyering@@comco.com)

	* system.h: Remove index/rindex and bcmp/bcopy/bzero references.
	Separate errno declaration from STDC_HEADERS.

	* wc.c (wc): For efficiency, handle separately the cases in which
	words need not be counted.  Suggested by Karl Heuer.

	* wc.c (wc): Don't overcount the number of bytes when reading
	from a regular file on stdin with file pointer not at BOF.
	From Karl Heuer <karl@@gnu.ai.mit.edu>.  Before, the command
	`(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output
	the size of the file.  Now it outputs `0'.

Sat Jan 28 07:07:23 1995  Jim Meyering  (meyering@@comco.com)

	* cat.c (cat): Use memmove rather than bcopy.
	* csplit.c (load_buffer): Use memcpy rather than bcopy.
	(extract_regexp): Use strrchr, not rindex.
	* fmt.c (isopen, isclose, isperiod): Use strchr, not index.
	(flush_paragraph): Use memmove instead of bcopy.
	* fold.c (fold_file): Use memmove instead of bcopy.
	* od.c (decode_format_string): Use memmove instead of bcopy.
	[EQUAL_BLOCKS]: Use memcmp, not bcmp.
	(parse_old_offset): Use strchr, not index.
	(dump): Use memset, not bzero.
	* sort.c (checkfp, mergefps): Use memcpy instead of bcopy.
	(fillbuf): Use memmove instead of bcopy.
	* split.c (main): Use memset, not bzero.
	(line_bytes_split): Use memmove instead of bcopy.
	* tac.c (tac): Use memmove instead of bcopy.
	(output): Use memcpy instead of bcopy.
	* tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy.
	* tr.c (substr): Use memcpy instead of bcopy.
	(card_of_complement, set_initialize): Use memset, not bzero.

	* tr.c (substr): Don't allocate a byte for trailing NUL in result
	since the result needn't be NUL-terminated.  Don't NUL terminate it.

	* configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy,
	not bcopy.
	(AC_CHECK_FUNCS): Add strchr and strrchr.

	* lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c.
	* memmove.c: New file.
	* memcpy.c: New file.

Tue Jan 24 22:18:19 1995  Jim Meyering  (meyering@@comco.com)

	* fmt.c (copy_rest): Replace `||' with `&&'.  Before, a paragraph
	not followed by a newline would be followed by data copied from
	uninitialized storage.  Repeat by `printf abc|fmt|od -ac'.
	Reported by Franc,ois Pinard.

	* od.c: Rename macros with FP_ prefix.  Use FLOAT_ instead.
	AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted.
	Be careful to use off_t instead of explicit `unsigned long'.
	Otherwise, systems like 4.4BSD lose on calls to fseek that
	expect off_t (which is long long on that system).
	(parse_old_offset): Use xstrtoul
	(main): Likewise.

	* src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h.

Mon Dec 19 22:13:55 1994  Jim Meyering  (meyering@@comco.com)

	* tail.c (numerous functions): Give char* filename arguments the
	const attribute.

	* lib/Makefile.in (SOURCES): Remove xwrite.c.  It was no longer used.
	Add xstrtol.c and xstrtoul.c.
	(OBJECTS): Likewise for .o files.
	(DISTFILES): Add error.h and xstrtol.h and xstrtoul.h.

	* lib/Makefile.in (DISTFILES): Remove safe-xstat.cin.
	(distclean): Remove references to safe-l?stat.c.
	Remove all related rules and dependencies.

	* src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h.

Thu Dec 15 23:14:04 1994  Jim Meyering  (meyering@@comco.com)

	* tail.c (tail_file): Fix call to error with %s in format, but
	no corresponding argument.

	* src/*.c: Include "error.h" instead of simply declaring
	`void error ();'.
	* od.c (main): Use %lu, not %d for unsigned long.
	(my_strtoul, uint_fatal_error): Remove functions.  Use xstrtoul
	and STRTOL_FATAL_ERROR instead.

Sun Dec 11 17:24:09 1994  Jim Meyering  (meyering@@comco.com)

	* sort.c (main): Fix interpretation of field offsets when specified
	via -k option.  They were being interpreted as zero-indexed.  POSIX
	says they are 1-based indices.  From Rik Faith <faith@@cs.unc.edu>.
	(keycompare): Don't ignore characters at the end of words when
	otherwise they would compare equal.  From Rik Faith.

	* tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes
	to off_t because n_bytes is used as the option to fseek and off_t may
	be long long (e.g. on BSD4.4).  The only place where a 32-bit limit is
	imposed is in the string-to-integer converstion of xstrtol.
	(main): Use xstrtol instead of manual string to integer conversion.

	* csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of
	comparisons against '0' and '9'.

	* tr.c [!ULONGMAX]: Define it.
	[!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant.

	* full-write.c: Declare (or not) errno based on definedness or
	errno, not STDC_HEADERS.
	* safe-read.c: Likewise.
	* xwrite.c: Likewise.

Thu Nov 17 06:37:33 1994  Jim Meyering  (meyering@@comco.com)

	* tail.c (dump_remainder): Flush standard output just before
	sleeping so that `tail -f' will output partial lines sooner.
	This applies only when following the end of a single file.
	From Leonard N. Zubkoff <lnz@@dandelion.com>.

	* tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes,
	start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in
	XWRITE calls.
	* tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call.
	* system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if
	not already defined.

Wed Nov 16 07:01:38 1994  Jim Meyering  (meyering@@comco.com)

	* tr.c: Include <getopt.h> instead of "getopt.h".

	* sort.c (tempname): Merge two very similar sprintf stmts into one.

	* tail.c: Use BUFSIZ instead of BUFSIZE.

	* cut.c: Declare DELIM to be `int' rather than unsigned char.

	* fmt.c: Use index, not strchr -- per GNU Standards.
	Reported by Kaveh Ghazi.
	Always include <config.h>.
	(main): Include program name in --version output.

Sun Nov 06 00:17:21 1994  Jim Meyering  (meyering@@comco.com)

	* Version 1.11.

Sat Nov 05 15:14:44 1994  Jim Meyering  (meyering@@comco.com)

	* memcmp.c, srtoul.c: Use up-to-date versions.
	Reported by Franc,ois Pinard.

	* src/Makefile.in (DEFS): Remove -Dlint... again.

	* src/Makefile.in (PROGS): Add fmt!
	Reported by Andreas Stolcke (stolcke@@ICSI.Berkeley.EDU).

Fri Nov 04 17:26:16 1994  Jim Meyering  (meyering@@comco.com)

	* Version 1.10.

Thu Nov 03 23:23:08 1994  Jim Meyering  (meyering@@comco.com)

	* linebuffer.h: Use __P instead of _P since the latter conflicts
	with a definition in some <ctype.h>.  From Kaveh Ghazi.

Wed Nov 02 17:36:34 1994  Jim Meyering  (meyering@@comco.com)

	* tr.c: Add const attribute where appropriate.

	* tail.c (BUFSIZ): Use definition from <stdio.h>.

Tue Nov 01 23:54:09 1994  Jim Meyering  (meyering@@comco.com)

	* tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if
	n_bytes is positive.  Turn off assertions.  `tail /dev/null' was
	getting a failed assertion.  Reported by Doug McLaren
	(dougmc@@comco.com).

	* cut.c (cut_bytes): Print at least a newline for every line of input.
	(cut_fields): Print a newline even for lines whose only selected
	field is empty.  But print nothing when using -s without -f1.
	And print nothing for empty input.  Reported by
	Richard_Sharman@@software.mitel.com.

Tue Nov 01 06:05:23 1994  Jim Meyering  (meyering@@comco.com)

	* fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__.
	* linebuffer.h: Likewise.

Mon Oct 31 06:53:32 1994  Jim Meyering  (meyering@@comco.com)

	* configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP
	already handles it.  From Kaveh Ghazi.

	* {lib,src}/Makefile.in (DEFS): Don't use -Dlint.  Some systems
	get failures when it's defined.  From Kaveh Ghazi.

	* cat.c (cat): Conditionalize test for errno == ENOSYS.  It's not
	defined on some Next and Alliant systems.  From Kaveh Ghazi.

	* sort.c join.c (main): Include version.h and call parse_long_options
	with the proper number of arguments.  Reported by Franc,ois Pinard.

Sun Oct 30 01:30:41 1994  Jim Meyering  (meyering@@comco.com)

	* (configure.in): Add AC_OFF_T and rearrange by type along the
	same lines as autoscan.

	* fmt.c, fmt.1: New files.
	Both from Ross Paterson (rap@@doc.ic.ac.uk).

	* Makefile.in (PROGS): Add fmt.
	* src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively.
	(fmt): Add a link rule.
	* man/Makefile.in (MANFILES): Add fmt.1.

Sat Oct 08 10:44:30 1994  Jim Meyering  (meyering@@comco.com)

	* Makefile.in (All of them): Update from the ones in sh-utils.
	From now on, rules and definitions that are comon to the fileutils,
	textutils, and sh-utils will get ChangeLog entries only in the
	sh-utils.

Tue Oct 04 20:42:46 1994  Jim Meyering  (meyering@@comco.com)

	* od.c (my_strtoul): Set errno to zero before calling strtoul.
	Otherwise, od can fail complaining about a valid integer argument.
	From Andreas Schwab.

Sun Oct 02 17:57:09 1994  Jim Meyering  (meyering@@comco.com)

	* tr.c (main): Give an error and fail when squeezing repeats
	and no non-options are given.  Reported by Tony Robinson
	(ajr@@eng.cam.ac.uk).

	* sort.c (main): Temporarily copy each input file that might be
	another name for the output file.  When in doubt (e.g. a pipe),
	copy.  This allows the dangerous (historical -- in cnews) idiom
	`cat file | sort -o file' to work properly.  Don't rely on this
	behavior in new shell scripts.  From Paul Eggert (eggert@@twinsun.com).

Mon Sep 26 18:01:47 1994  David J. MacKenzie  (djm@@churchy.gnu.ai.mit.edu)

	* lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c:
	Remove CONFIG_BROKETS ifdef.
	* src/Makefile.in lib/Makefile.in: Don't define it.

Sat Sep 24 21:26:27 1994  Jim Meyering  (meyering@@comco.com)

	* full-write.c (full_write): Declare argument LEN to be size_t.

Mon Sep 12 13:35:27 1994  Jim Meyering  (meyering@@comco.com)

	* tail.c (tail_file): [For multiple files only]: Report truncation
	of monitored file and reset current file size.  From Franc,ois Pinard.

Sat Aug 27 16:57:20 1994  Jim Meyering  (meyering@@comco.com)

	* system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's.
	From Franc,ois Pinard.

Tue Jul 26 11:33:53 1994  Jim Meyering  (meyering@@comco.com)

	* system.h: Remove `|| defined(_POSIX_VERSION)' from test that
	decides whether to include <fcntl.h>.  From Francois Pinard.

Wed Jul 13 12:33:34 1994  Jim Meyering  (meyering@@comco.com)

	* tr.c (substr): Fix off-by-one allocation error.

Wed Jun 22 01:02:50 1994  Jim Meyering  (meyering@@comco.com)

	* tac.c (tac_file): Use O_RDONLY instead of zero in call to open.
	(tac): Fix typo that had `1' as arg #2 of error after failed read.
	Use errno instead.  From Michael I Bushnell <mib@@gnu.ai.mit.edu>.

Thu May 26 08:46:32 1994  Jim Meyering  (meyering@@comco.com)

	* configure.in [INSTALL]: Revert change of March 25.  autoconf
	has been fixed.

Mon Apr 11 17:25:43 1994  Jim Meyering  (meyering@@comco.com)

	* join.c (prline): Remove unused function.  Indent.

Fri May  6 05:44:24 1994  Jim Meyering  (meyering@@comco.com)

	* tail.c (tail_forever): Don't print headers when asked not to.
	From Karsten Thygesen <karthy@@kom.auc.dk>.

	* wc.c (wc): Optimize for the case when only bytes are being counted
	and the input is not a regular file.  From Jeff Moore <jbm@@mordor.com>.

Sun Apr 24 10:54:08 1994  Jim Meyering  (meyering@@comco.com)

	* configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9.
	* memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS.

Mon Apr 11 17:55:52 1994  Jim Meyering  (meyering@@comco.com)

	* csplit.c (struct control): Add new field, repeat_forever.
	Remove now-unneeded definition of INT_MAX.
	(process_regexp): Test repeat_forever instead of comparing `repeat'
	to INT_MAX.
	(split_file): Don't even reference `repeat' count if repeat_forever
	is set.
	(new_control_record): Initialize repeat_forever field.
	(parse_repeat_count): Set it instead of setting repeat count to
	INT_MAX.
	(process_line_count): Abort for internal error instead of calling
	handle_line_error.

	* long-options.c (parse_long_options): Take a new argument indicating
	the utility name (e.g. "join", not "gjoin") for version output.
	Print both the utility and the package names, e.g. `join - GNU
	textutils-1.9.1' instead of just the package name.

	* join.c (main): Call parse_long_options with program name arg.
	* sort.c (main): Ditto.

	* All source except sort.c and join.c (main): Change --version output
	to include utility name as well as package name and version info.

Wed Mar 30 08:53:21 1994  Jim Meyering  (meyering@@comco.com)

	* configure.in: Use AC_SET_MAKE.
	* Makefile.in: Edit MAKE assignments into @@SET_MAKE@@.

Mon Mar 28 09:55:05 1994  Jim Meyering  (meyering@@comco.com)

	* tr.c (main): In addition to the --help usage pointer, give an
	explicit error message for too many arguments.

Fri Mar 25 18:11:19 1994  Jim Meyering  (meyering@@comco.com)

	* configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead
	of explicit echo commands.
	[INSTALL]: When AC_PROG_INSTALL resorts to setting this to
	`./install.sh', make it `../install.sh' instead since that
	script will be invoked only from subdirectories.
	[AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS.

	* cat.c (cat): The command `:|cat -s' failed on Irix5 because
	ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4
	it returned EINVAL.  Detect this.
	(main) [lint]: Initialize variables to suppress `used before
	initialized' warnings.

	* csplit.c: Change long option name from --suffix to --suffix-format.

	* od.c (skip): Correct a comment.
	(main): Don't output anything to stdout if the sole input file
	doesn't exist.  Reported by Bauke Jan Douma <bjd@@dds.hacktic.nl>.

	* od.c (dump) [lint]: Initialize a variable to suppress `used before
	initialized' warning.
	(main) [lint]: Ditto.
	* paste.c (paste_parallel) [lint]: Ditto.

Fri Jan 28 11:02:21 1994  Jim Meyering  (meyering@@comco.com)

	* configure.in: Don't set LDFLAGS since linking now uses both
	LDFLAGS and CFLAGS.

Wed Jan 18 16:14:00 1994  Jim Meyering  (meyering@@comco.com)

	* unexpand.c (unexpand): Don't segfault when given a name of a
	nonexistent file.
	* expand.c (expand): Ditto.
	Both from Bauke Jan Douma <bjd@@dds.hacktic.nl>.

Thu Jan 13 17:27:38 1994  Jim Meyering  (meyering@@comco.com)

	* src/Makefile.in: Change all link commands to use both $(CFLAGS)
	and $(LDFLAGS).

	* csplit.c (load_buffer): Rather than incrementing buffer size,
	double it each time we fail to find a newline.  Otherwise, csplit
	would run out of memory when processing files with very long lines.

Mon Jan 10 01:20:38 1994  Jim Meyering  (meyering@@comco.com)

	* man/Makefile.in (manprefix): Use binprefix as the default.

Sat Jan 08 22:22:45 1994  Jim Meyering  (meyering@@comco.com)

	* cat.c: Use full_write and safe_read instead of write and read resp.
	* csplit.c: Ditto.
	* head.c: Ditto.
	* split.c: Ditto.
	* tac.c: Ditto.

	* sum.c: Use safe_read instead of read.
	* tr.c: Ditto.
	* wc.c: Ditto.

	* tail.c: Replace calls to xwrite with calls to fwrite.
	Use fopen/fclose instead of open/close.
	(write_header): Use a single call to printf instead of four to xwrite.
	Use safe_read instead of read.
	* head.c: Ditto.

Tue Dec 28 15:49:32 1993  Jim Meyering  (meyering@@comco.com)

	* install.sh: New file.
	Makefile.in [DISTFILES]: Add it.

Wed Dec 22 18:52:44 1993  Jim Meyering  (meyering@@comco.com)

	* memcmp.c: Use the latest version from the GNU C library.

	* cut.c [ADD_RANGE_PAIR]: New macro.
	(set_fields): Collect the list of all selected ranges before
	allocating and initializing the boolean lookup table.
	(cut_bytes, cut_fields): Complete rewrite.  Avoid copying
	into buffer whenever possible.  Properly handle input without
	trailing newline.
	(getstr): New function.  Copied from getline.c, but with minor changes.

	* sort.c (main): Properly handle -Tdir.
	Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''.
	Reported by Kristoffer Rose (kris@@diku.dk).

	* cut.c (main): Give separate errors for `-s without -f'
	and `-d without -f'.
	(main): Now -d '' means `use the NUL byte as the delimiter'.
	Before, it got an error.

Mon Dec 20 23:29:30 1993  Jim Meyering  (meyering@@comco.com)

	* configure.in [test for 8-bit clean memcmp]: Add a test to detect
	losing memcmp from SunOS4.1.x.  From Robert H. de Vries
	<robert@@and.nl>.

Sat Dec 18 01:12:24 1993  Jim Meyering  (meyering@@comco.com)

	* configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg
	so it goes in config.status.  This eliminates unnecessary second run
	of configure.

Thu Dec 02 23:53:03 1993  Jim Meyering  (meyering@@comco.com)

	* configure.in (AC_HAVE_FUNCS): Add isascii.
	* system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed
	on AIX PS/2 1.3 systems because isascii is a function and it is used
	in definitions (with the necessary side effect of assigning to a
	global variable) of the is* macros.  Also test HAVE_ISASCII and
	redefine ISASCII(c) instead of isascii.
	Reported by Minh Tran-Le (tranle@@intellicorp.com).

Fri Nov 19 22:41:48 1993  Jim Meyering  (meyering@@comco.com)

	 * configure.in: Don't run the test for 8-bit clean memcmp if we
	 already know we'll be using our replacement.

Fri Nov 12 00:44:49 1993  Jim Meyering  (meyering@@comco.com)

	* Version 1.9.1.

	* tac.c (usage): Fix typo in long usage.
	* sort.c (usage): Likewise.
	From Philippe.Schnoebelen@@imag.fr.

	* cut.c [FATAL_ERROR]: New macro.
	(main): Call both error and usage (2) through FATAL_ERROR in
	many places.  Before, only `error (2...' was called.
	(invalid_list): Removed.  This function is subsumed by FATAL_ERROR.

	* cut.c (cut_fields): Properly handle input lacking a terminating
	newline.  Before, the command  `printf "a\tb" |cut -f 1' generated
	no output.

Tue Nov 09 17:26:25 1993  Jim Meyering  (meyering@@comco.com)

	od.c (usage): Change --backward-compatible to --traditional in
	the long usage message.

Sun Nov 07 00:50:05 1993  Jim Meyering  (meyering@@comco.com)

	* Version 1.9.

Sat Nov 06 22:51:31 1993  Jim Meyering  (meyering@@comco.com)

	* cut.c (cut_fields): Revert July 27 change.  Instead, strip off
	trailing delimiter unless given a range of fields like `3-' that
	extends to end of line.
	(set_fields): Moved local `eol_range_start' to file-scope.
	Reported by Arne H. Juul (arnej@@solan.unit.no).

Tue Nov 02 00:53:41 1993  Jim Meyering  (meyering@@comco.com)

	* fold.c (fold_file): Don't get stuck in an endless loop when
	width is smaller than 8 and there are TABs in the input.

Sat Oct 30 15:31:28 1993  Jim Meyering  (meyering@@comco.com)

	* join.c: Remove now-unused dcls of show_help and show_version.

Fri Oct 29 13:58:50 1993  Jim Meyering  (meyering@@comco.com)

	* csplit.c [INT_MAX]: Make sure it's defined.
	[not HAVE_LIMITS_H]: Don't include limits.h.
	From Kaveh R. Ghazi (ghazi@@noc.rutgers.edu).

Wed Oct 27 01:13:52 1993  Jim Meyering  (meyering@@comco.com)

	* Version 1.8.1.

Mon Oct 25 20:16:33 1993  Jim Meyering  (meyering@@comco.com)

	* sort.c: Accept but ignore -y0 for compatibility with Solaris 2.
	From Chuck Hedrick (hedrick@@klinzhai.rutgers.edu).

	* sort.c (main): Handle --help and --version options.
	* Makefile.in (sort.o): Depend on long-options.h.

Sun Oct 24 00:31:02 1993  Jim Meyering  (meyering@@comco.com)

	* csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c,
	split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred
	`--longopt=arg' syntax in --help message rather than `--longopt arg'.
	From Francois Pinard.

	* tail.c: Don't include <signal.h>.  It hasn't been necessary
	since the Dec 12, 1992 change.

	* join.c (main): Accept `-v 1' again.  Adding the --version
	long option had broken it, although -v1 still worked.  Call
	parse_long_options instead of adding "help" and "version"
	to join's longopt strct.
	* Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c
	and long-options.h.
	* (join): Depend on and link with long-options.o.
	* (join.o): Depend on long-options.h.

	* od.c: Change --compatible (-C) to --backward-compatible (-B).

	* csplit.c: Change --abandon-null-files to --elide-empty-files.

Sat Oct 23 01:00:12 1993  Jim Meyering  (meyering@@comco.com)

	* tr.c (get_next, string2_extend): Add default: label to switch stmt.

	* cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
	join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c,
	tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help.
	Exit successfully for --help, non-zero for usage error.
	From Francois Pinard.

	* configure.in: Add AC_STAT_MACROS_BROKEN.
	* system.h [AC_STAT_MACROS_BROKEN]: Test it.

Fri Oct 22 23:26:17 1993  Jim Meyering  (meyering@@comco.com)

	* linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include
	<config.h> or "config.h".
	* cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c,
	join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c,
	tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto.

	* configure.in: Use AC_CONFIG_HEADER.
	* Makefile.in [DIST]: Add config.h.in.

	* Makefile.in: Convert so make may be run from subdirectories.
	Add dependencies on config.h.
	* src/Makefile.in: Ditto.
	* lib/Makefile.in: Ditto.
	* man/Makefile.in: Ditto.

Wed Oct 20 20:05:48 1993  Jim Meyering  (meyering@@comco.com)

	* memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS.
	In the 64-bit assignment, be careful to cast the shift operand to
	long.
	Abort if sizeof (unsigned long) > 8.

Tue Oct 19 22:37:58 1993  Jim Meyering  (meyering@@comco.com)

	* csplit.c: Allow repeat counts to be specified via `{*}'.
	New option --suffix=format.  Supercedes --digits option.
	New option --abandon-null-files.
	From Ronald F. Guilmette (rfg@@netcom.com).

	* csplit.1: Updated.
	From Ronald F. Guilmette.

	* csplit.c: Remove register keyword (replace with `int' in two cases).

	* csplit.c: [MAX]: Macro renamed from max and moved to top of file.
	(bytes_to_octal_digits): New static array.
	(get_format_flags): Combine '+' and ' ' cases of switch stmt.
	Return count if for loop terminates.
	(get_format_width): Use `bytes_to_octal_digits' instead of just 11.
	(get_format_prec): Make sure is_negative is defined before used.
	(get_format_conv_type): Give a different error message if there
	is no conversion specifier.
	Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''.
	(max_out): Use `%%' rather than `%' in format string.

Sat Oct 16 10:45:17 1993  Jim Meyering  (meyering@@comco.com)

	* pr.c (main): When argc == 1, don't try to xmalloc (0).

Tue Oct 12 00:53:26 1993  Jim Meyering  (meyering@@comco.com)

	* xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h>
	or "config.h".

Sat Oct 09 23:37:43 1993  Jim Meyering  (meyering@@comco.com)

	* configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS.

Thu Sep  9 21:52:10 1993  Jim Meyering  (meyering@@comco.com)

	* src/*.c: Print version on standard output, not stderr.

	* configure.in: Add AC_LONG_64_BITS.
	* memchr.c: Use #ifdef LONG_64_BITS instead of
	`if (sizeof(longword) > 4)'.

Tue Jul 27 22:19:39 1993  Jim Meyering  (meyering@@comco.com)

	* cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't
	always handle devices.  Ignore errno == EINVAL and errno == ENODEV.
	`cat -v /dev/null' was failing on many systems.

	* cut.c (cut_fields): Don't strip off trailing delimiter e.g.
	`echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'.
	From William Dowling <will@@franklin.com>.

Thu May 27 01:37:51 1993  Jim Meyering  (meyering@@comco.com)

	* Version 1.8.

	* memchr.c: De-ansify the fixed version from glibc.
	It is supposed to work on systems with 64-bit long ints.

Mon May 24 00:32:43 1993  Jim Meyering  (meyering@@comco.com)

	* Version 1.7.

Sat May 22 02:13:12 1993  Jim Meyering  (meyering@@comco.com)

	* Version 1.6.

Fri May 21 22:57:53 1993  Jim Meyering  (meyering@@comco.com)

	* pr.c (cols_ready_to_print): New function.  It replaces a global
	variable by the same name and computes on the fly the value that
	was supposed to be maintained through that variable.  This should
	put to rest the `pr -2a' bug.
	(main): Don't let getopt_long reorder arguments so we can
	distinguish between `pr -1 -2' and `pr -12'.  Rework handling of
	-n and +n options.

	* fold.c: Declare xmalloc.

Wed May 19 19:12:18 1993  Karl Berry  (karl@@owl.hq.ileaf.com)

	* sort.c (main): fflush before exit, so a closed stdout doesn't lose.

Tue May 18 23:49:26 1993  Jim Meyering (meyering@@comco.com)

	* mkinstalldirs: New file.
	* Makefile.in (installdirs): Use it to create installation directories.

Fri May 14 23:45:52 1993  Jim Meyering  (meyering@@comco.com)

	* all source: With --version, print version and exit immediately.

Thu May 13 01:03:16 1993  Jim Meyering  (meyering@@comco.com)

	* Makefile.in (installdirs): New rules for creating installation
	directories. (install): depend on it.

	* tail.c (main): Remove --compatible since `+1f' may be used
	to get the BSD `-0f' behavior portably.

	* fold.c (main): Turn -N arguments, where N is a digit, into -wN.
	From Ian Lance Taylor (ian@@cygnus.com).

Mon May 10 22:33:44 1993  Jim Meyering  (meyering@@comco.com)

	* tail.c (main): New option -C, --compatible to make `tail -0f'
	work like `tail +1f' for compatibility with BSD tail.

Thu May  6 23:28:56 1993  Jim Meyering  (meyering@@comco.com)

	* pr.c (print_page): Decrement cols_ready_to_print even when
	lines_to_print == 0.  The command `echo |pr -2ta' *still* didn't
	terminate.  Add parentheses for clarity.

Mon May  3 23:57:47 1993  Jim Meyering  (meyering@@comco.com)

	* Version 1.5.

	* od.c (main): Remove set-but-not-used variable, `usage_error'.

	* split.c (main): Call usage with an argument.

Sun May  2 16:05:04 1993  Jim Meyering  (meyering@@comco.com)

	* configure.in: Reverse if-else branches in AC_TEST_PROGRAM test
	for 8-bit clean memcmp.

	* cat.c (usage, main): Remove unused argument.

	* csplit.c (remove_line): Remove set-but-not-used variable, `line_got.'
	(check_for_offset): Remove unused argument `argnum.'

	* configure.in: Add AC_SIZE_T.

Sat May  1 09:03:19 1993  Jim Meyering  (meyering@@comco.com)

	* uniq.c (main): Interpret non-option arguments with a leading `+'
	only if we haven't seen `--'.

	* tr.c (main): Change variable name to avoid shadowed dcl.
	* wc.c (write_counts): Ditto.

	* sum.1: Make documentation agree with the code.

	* od.c: Depend only on HAVE_LONG_DOUBLE for long double support.

Fri Apr 30 20:16:03 1993  Jim Meyering  (meyering@@comco.com)

	* configure.in [AC_HAVE_HEADERS]: Add limits.h.

	* configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults.

	* od.c (parse_old_offset): Don't use prototype in function
	definition.  Remove unnecessary conjunct from test for hexadecimal
	prefix.

	* od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__
	for long double support;  there are compilers (Stardent Vistra svr4)
	without long double but still define __STDC__.

Thu Apr 29 02:01:27 1993  Jim Meyering  (meyering@@comco.com)

	* src/*.c and man/*.c except for sort: Add --help and --version
	options.

	* pr.c: Convert to use getopt_long.

	* lib/memcmp.c: Use version from glibc.
	[WORDS_BIGENDIAN]: Test this instead of the using glibc's
	__BYTE_ORDER macro.
	* configure.in: Use AC_WORDS_BIGENDIAN to set it.

	* od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to
	indicate hex.

	* Makefile.in (dist): Depend on Makefile so that changes to
	Makefile.in (like adding new files to DISTRIB) are reflected
	in the new distribution.

Fri Apr 23 21:53:47 1993  Jim Meyering  (meyering@@comco.com)

	* {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow
	other options so users can use them to override DEFS.
	* src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h.

	* Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely;
	configure's AC_SUBST will set these.

	* Makefile.in [Makefile]: Add dependencies and a rule to remake it.
	[targets that cd then run make in subdirectories]: Don't depend
	on `cd ..';  use a subshell instead.

	* Makefile.in [info, install-info, dvi, check, installcheck]:
	New targets but no rules; comply with standards.

	* configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user
	hasn't specified CFLAGS.
	[LDFLAGS]: Substitute into Makefile.

Tue Mar 30 21:36:11 1993  Jim Meyering  (meyering@@comco.com)

	* od.c: New option --compatible, -C.
	(parse_old_offset): New function.
	* od.1: Document new option.

Mon Mar 29 21:27:56 1993  Jim Meyering  (meyering@@comco.com)

	* cut.c, expand.c, join.c, nl.c: Always call error with errno
	(not zero) after failed fclose or non-zero ferror.

Sun Mar 28 16:59:31 1993  Mike Haertel  (mike@@cs.uoregon.edu)

	* configure.in: Add check for working memcmp; use GNU's if
	the system's doesn't grok the 8th bit.
	* memcmp.c: Fix it so it groks the 8th bit.
	TODO: We really need to provide a fast memcmp, since most
	machines will have a broken memcmp.  Probably should get
	the one from glibc.
	* sort.c (mergefps): Maintain keybeg and keylim when copying
	the current line to `saved'.
	(numcompare): Skip white space here since -n no longer implies -b.
	(getmonth): Skip white space here since -M no longer implies -b.
	(compare): Completely overhauled to make the 8th bit work right,
	also to properly handle the global reverse option.
	(set_ordering): -n no longer implies -b, according to Posix.
	For consistency, -M also no longer implies -b.
	(main): Correct treatment of -r and global keys.
	(findlines): Clear keybeg and keylim if no keys are used.
	(sort): Avoid overwriting tempfiles[] array bounds.

Sun Mar 21 22:29:29 1993  Jim Meyering  (meyering@@comco.com)

	* pr.c (close_file): Reverse May 13, '92 change, but add the condition
	that cols_ready_to_print not be decremented when printing across.
	The command `echo |pr -2ta' didn't terminate.
	(print_page): Rewrite conditional (that had side effects in second
	conjunct) using nested if statements to make it clear that we do
	indeed want those semantics.

Tue Jan 19 13:35:24 1993  David J. MacKenzie  (djm@@kropotkin.gnu.ai.mit.edu)

	* Version 1.4.

	* system.h: Try BBSIZE if BSIZE isn't defined.
	From Tony Robinson <ajr@@eng.cam.ac.uk>.

Sat Dec 12 12:37:00 1992  David J. MacKenzie  (djm@@kropotkin.gnu.ai.mit.edu)

	* tail.c (tail_forever): Use an array of file descriptors
	instead of forking processes.
	(dump_remainder): Return number of bytes read.
	(tail_file): Fill in the new array.
	From Ian Lance Taylor.

Fri Dec 11 17:18:16 1992  David J. MacKenzie  (djm@@kropotkin.gnu.ai.mit.edu)

	* system.h: Only define index, bcmp, etc. if not already defined.

Tue Dec  8 10:31:14 1992  Jim Meyering  (meyering@@idefix.comco.com)

	* tr.c (is_char_class_member): Remove unreached return after abort.

Sun Dec  6 22:34:52 1992  Jim Meyering  (meyering@@idefix.comco.com)

	* csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c,
	sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c:  Remove inclusion
	of <ctype.h> and definitions of is* ctype macros to system.h.
	Change a few more uses of is* ctype macros to (protected) upper
	case versions.

	* system.h: Add isascii-protected ctype IS* macros.

Wed Dec  2 12:28:10 1992  Jim Meyering  (meyering@@idefix.comco.com)

	* all files using getopt.h: Convert static declarations of
	struct option to use new macros from getopt.h: no_argument,
	required_argument, and optional_argument.

Tue Dec 01 10:57:24 1992  Jim Meyering  (meyering@@idefix.comco.com)

	* od.c, pr.c, sort.c: Make uses of ctype.h macros consistent.

	* tr.c (main): Close stdin and stdout and check return status.

Tue Nov 24 09:26:08 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H
	instead of USG.

Tue Nov 24 08:42:30 1992  Jim Meyering  (meyering@@idefix.comco.com)

	* tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that
	use isascii if it is defined.
	(is_char_class_member, make_printable_char, make_printable_str,
	non_neg_strtol): Use new macros instead of lower case ones
	from <ctype.h>.

	* od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT
	macros like pr.c.  Suggested by David J. MacKenzie.

	* od.c (print_ascii, dump_strings): Check for isascii before isprint.
	(dump_strings): Free malloc'd buffer before returning.
	(skip): Return non-zero if an error occurred, zero otherwise.
	Exit only if asked to skip beyond end of combined input.
	(check_and_close): New function.
	(skip, read_block, read_char): Call check_and_close when done
	processing the file associated with in_stream.
	(skip, read_block, read_char): Set have_read_stdin.
	(main): Close stdin (if it was ever read) and check for errors
	just before exiting.
	(write_block, dump_strings, dump): Don't test return value from
	functions that operate on streams.  Rely on later ferror tests.

Sat Nov 21 12:41:49 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* sort.c (main, usage): Add -T option.

Thu Nov 19 14:33:40 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* tail.c (tail_forever, sigusr1, kill_kids): New functions to
	do -f on multiple files.
	(main): Call tail_forever.
	From Ian Lance Taylor.

Tue Nov 10 14:29:11 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* cut.c (cut_fields): Add cast.

	* od.c (decode_one_format): Remove '#' from pre_fmt_string;
	many systems don't support it.
	Conditionalize long double support on __STDC__, not __GNUC__.
	From Ian Lance Taylor.

Mon Nov  9 00:24:41 1992  Jim Meyering  (meyering@@idefix.comco.com)

	* sort.c (numcompare, keycompare): Add parentheses suggested
	by gcc -Wall.  Put braces around individual monthtab initializers.

	* cksum.c: Declare error.  Make checksum table `const.'

	* pr.c: Remove comment and dcl of unused variable, `print_a_number'.

	* split.c (main): Add `default: abort();' to enumeration switch.

	* All files: Make all functions and extern variables static.
	Make all longopts arrays const as well as static.
	Make a couple statically initialized aggregates `const.'

Sun Nov  8 19:46:59 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* od.c (main): Make old-style format options accumulate.
	From Jim Meyering.

Sat Nov  7 00:26:14 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* tr.c (look_up_char_class): Add cast.

	* nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main):
	Add `const' to variable receiving value from re_compile_pattern.

	* wc.c (wc): If doing only -c, use st_size for regular files.

	* fold.c (fold_file): Was folding 1 column too early.
	From Eric Backus <ericb@@lsid.hp.com>.

	* memset.c: New file.

Fri Nov  6 20:14:51 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* cksum.c: New file.

Tue Oct 13 16:24:06 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* tac.c (tac_stdin): Handle SIGPIPE.
	* sort.c (main): Handle SIGTERM.

	* od.c: New file.

	* system.h [USG || STDC_HEADERS]: Define bcmp.

Sat Oct  3 20:41:24 1992  David J. MacKenzie  (djm@@goldman.gnu.ai.mit.edu)

	* sort.c (main): Handle SIGPIPE.  From trq@@dionysos.thphys.ox.ac.uk.

Tue Sep 29 01:10:05 1992  David J. MacKenzie  (djm@@nutrimat.gnu.ai.mit.edu)

	* paste.c (main): Don't write on a string constant.

Mon Aug 24 00:02:45 1992  Jim Meyering  (meyering@@churchy.gnu.ai.mit.edu)

	* tr.c: Minor cleanup.  Replaced some assert(0) with abort().

Tue Jul  7 02:14:19 1992  David J. MacKenzie  (djm@@nutrimat.gnu.ai.mit.edu)

	* cmp.c, cmp.1: Move to diff distribution.

Fri Jul  3 16:37:59 1992  David J. MacKenzie  (djm@@nutrimat.gnu.ai.mit.edu)

	* system.h: Change FOO_MISSING to HAVE_FOO.

Wed May 13 20:05:41 1992  David J. MacKenzie  (djm@@churchy.gnu.ai.mit.edu)

	* pr.c (COLUMN): Add structure member to remember filename.
	(main, init_fps, open_file, close_file): Use it.

	(close_file): Don't decrement cols_ready_to_print when closing
	a file.  From cdl@@mpl.UCSD.EDU (Carl Lowenstein).

Mon May 11 19:17:33 1992  David J. MacKenzie  (djm@@churchy.gnu.ai.mit.edu)

	* cmp.c: --show-chars -> --print-chars.

	* pr.c: Rename some variables.

Sat May  9 18:39:47 1992  David J. MacKenzie  (djm@@wookumz.gnu.ai.mit.edu)

	* system.h: Define DEV_BSIZE if not defined.

Wed Apr 22 02:15:09 1992  David J. MacKenzie  (djm@@churchy.gnu.ai.mit.edu)

	* system.h, tac.c: SIGTYPE -> RETSIGTYPE.

Fri Apr 17 10:42:23 1992  David J. MacKenzie  (djm@@wookumz.gnu.ai.mit.edu)

	* sort.c (main): Don't stop processing args when we hit "-";
	treat it like a regular filename.
	From ian@@airs.com (Ian Lance Taylor).

	* pr.c (print_page): Fix off by one line count when ^L is in input.
	From Andreas Schwab (schwab@@ls5.informatik.uni-dortmund.de).

Mon Apr  6 20:52:29 1992  Jim Meyering  (meyering@@churchy.gnu.ai.mit.edu)

	* tr.c (validate): Change error message so it doesn't mention
	actual name of --truncate-set1 option.  From David MacKenzie.

Sun Apr  5 14:22:42 1992  Jim Meyering  (meyering@@hal.gnu.ai.mit.edu)

	* tr.c (string2_extend, validate): Give an error message when
	translating without --truncate-set1, with empty string2, and
	with non-empty string1.  "tr 1 ''" produced a failed assertion.

Mon Mar 30 02:20:56 1992  David J. MacKenzie  (djm@@wookumz.gnu.ai.mit.edu)

	* system.h: Change how ST_BLKSIZE is calculated to allow for
	non-POSIX systems that don't define BSIZE in sys/param.h.

Sat Mar 28 11:18:01 1992  David J. MacKenzie  (djm@@wookumz.gnu.ai.mit.edu)

	* sum.c (main, bsd_sum_file): Don't print filename if BSD
	algorithm is used and only one file was given.

Wed Mar 25 11:34:41 1992  Jim Meyering  (meyering@@wombat.gnu.ai.mit.edu)

	* tr.c (get_spec_stats): Fix assertion to allow ranges like a-a
	with starting character equal to ending character.  This is
	contrary to the POSIX spec, but what is already implemented
	in find_closing_delim.

Mon Mar 16 00:15:11 1992  David J. MacKenzie  (djm@@wookumz.gnu.ai.mit.edu)

	* Version 1.3.

	* sort.c (numcompare, checkfp): Add parens to placate gcc2.

	* sort.c (mergefps): For -u, output the first, not last, of
	the lines that compare equal.  From Mike Haertel.

Tue Mar 10 10:51:38 1992  David J. MacKenzie  (djm@@nutrimat.gnu.ai.mit.edu)

	* tr.c: Remove initial capitals and periods from error messages.

Sun Mar  8 22:03:45 1992  David J. MacKenzie  (djm@@nutrimat.gnu.ai.mit.edu)

	* sum.c (main): Add -r option for SYSV compat.

Thu Feb 27 22:26:25 1992  David J. MacKenzie  (djm@@wookumz.gnu.ai.mit.edu)

	* sort.c (compare): If -s given, leave lines in their original order.
	(main): Recognize -s.
	(usage): Document -s.
	From Mike Haertel.

Tue Feb 18 20:29:45 1992  Randall Smith  (randy at geech.gnu.ai.mit.edu)

	* sort.c (sort): Check for complete parsing of buffer into
	lines before nixing temp files.

Mon Feb 17 10:35:58 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* sum.c (sysv_sum_file): Use %lu instead of %u to print a
	long.  Not that it matters for GNU . . .

	* tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a.
	(append_normal_char, append_range, append_char_class,
	append_repeated_char, append_equiv_class, spec_init):
	Initialize `next' field of new `struct List_element'.
	From rommel@@informatik.tu-muenchen.de (Kai-Uwe Rommel).

Sat Feb  8 17:16:49 1992  David J. MacKenzie  (djm at apple-gunkies.gnu.ai.mit.edu)

	* join.c (get_line): Renamed from getline to avoid GNU libc conflict.

Sun Feb  2 21:22:01 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* Version 1.2.

	* nl.c: Support multiple files and "-" for stdin.
	(main): Check for read and write errors.
	(nl_file): New function.

Wed Jan 29 10:09:10 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* tr.c (main): -t option was called -b in getopt spec.
	(validate): Don't warn that set1 is longer than set2.

	* tr.c: Rename --sysv-string2-truncate to --truncate-string1.

Fri Jan 17 16:29:05 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* nl.c: New program from bin-src.

	* nl.c (main): Use a struct linebuffer for line_buf.
	(process_file): Use readline instead of fgets, to preserve NULs.
	(check_section): Use memcmp instead of strncmp.
	(proc_text): Print line_buf with fwrite instead of printf.

	* nl.c (main): Usage message if too many args given.  Check
	for error in closing input file.  Lengths of section delimiter
	strings were 1 too large.  Take separator_str into account in
	length of print_no_line_fmt.
	(build_print_fmt): Allocate space for print_fmt, in case
	separator_str is long.
	(proc_text): A blank line is one that contains nothing, not
	even nonprinting characters.

Fri Jan 17 01:04:22 1992  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* All programs: Document `--' instead of `+' to introduce
	long-named options, in usage messages.

	* sum.c (bsd_sum_file): Renamed from sum_file.
	(sysv_sum_file): New function.
	(main): Recognize an option to select between the algorithms.

Sun Jan  5 17:41:18 1992  Jim Meyering (meyering at churchy.gnu.ai.mit.edu)

	* pr.c (close_file, print_page): Fixed bug that had the command
	yes |head |pr -t printing "yyyyyyyyyy".
	* (print_page): Fixed bug that had pr -3 -a printing two too few
	trailer lines per page.
	* (main): Added restriction that -a and -m are incompatible.
	Although the POSIX spec doesn't explicitly say they shouldn't
	be used together, it says -a modifies the -column option and
	that -column shouldn't be used with -m.

Thu Jan  2 15:23:59 1992  David J. MacKenzie  (djm at albert.gnu.ai.mit.edu)

	* nl.c: Include regex.h after, not before, sys/types.h.

Thu Jan  2 12:18:10 1992  Tom Lord  (lord at geech.gnu.ai.mit.edu)

	* sort.c (fillbuf) return bytes buffered instead of bytes read.

Fri Dec 27 22:53:36 1991  Jim Kingdon  (kingdon at geech.gnu.ai.mit.edu)

	* sort.c (LINEALLOC): New #define.
	(struct lines): New field ``limit''.
	(initlines): Set it from new arg ``limit''.
	(sort, mergefps, checkfp): Pass new arg to initlines().
	(findlines): Don't realloc past lines->limit.

Tue Dec 24 01:24:03 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to
	HAVE_UNISTD_H and _POSIX_VERSION.

	* xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H.

Sat 14 Dec 1991 11:46:42  Jim Meyering  (meyering at wombat)

	* tr.c: Fixed an inaccurate comment on posix_pedantic.

Thu 12 Dec 1991 21:15:20  Jim Meyering  (meyering at hal)

	* tr.c: Changed underscores to hyphens in long option name
	"sysv_string2_truncate".

Wed Dec 11 13:33:34 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* tac.c (main): Set obscure_syntax to tell re_search to
	allocate memory for the group registers.

Fri Dec  6 18:26:27 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* tac.c, sort.c, csplit.c [POSIX]:  Use sigaction instead of
	signal, which POSIX doesn't have.
	* sort.c: Replace inthandler and huphandler with sighandler.
	* csplit.c (main): Only handle signals if they were not being
	ignored.

	* tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT.

Wed Dec  4 00:47:47 1991  Jim Meyering  (meyering at wombat)

	* tr.c (unquote): Reformat code so it doesn't go beyond column 80.
	* tr.c (squeeze_filter): Comment a little on why it's better
	to step through the input by two.
	* tr.c (set_initialize): Write a comment describing the function.
	* tr.c: Eliminated the variable `portability_warnings' and replaced
	references to it by references to `!posix_pedantic'.  One of the
	uses of portability_warnings had been wrong.

Tue Dec  3 14:03:35 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* tr.c: New program.

Sun Dec  1 15:07:35 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* linebuffer.[ch] (freebuffer): New function (used by cron).

Thu Oct 17 22:30:22 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* system.h, configure, Makefile.in: Don't include memory.h if
	STDC_HEADERS, removing need for MEMORY_H_MISSING.

Thu 17 Oct 1991 16:53:07  Jim Meyering  (meyering at wombat)

	* pr.c (print_page): REALLY fixed `extra newline at EOF' problem.
	Somehow, part of my patch didn't make it last time.

Sat Oct 12 12:04:47 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)

	* tail.c (pipe_lines, pipe_bytes): Initialize `first->next'.

	* cmp.c (cmp): Print EOF message to stderr, not stdout, for
	POSIX 1003.2.11.2.

	* sort.c (xfwrite): fwrite never returns < 0, so check if
	number written is number we asked to write.
	(fillbuf, main): fread never returns < 0, so check ferror instead.
	From Rainer Orth.

Tue Oct  8 18:07:08 1991  Jim Meyering  (meyering at churchy)

	* pr.c (print_page): Really fixed `extra newline at EOF' problem.
	* (store_columns): Fixed bug that caused `pr -b -2' to coredump
	on files of certain lengths.

Fri Oct  4 22:30:25 1991  Jim Meyering  (meyering at churchy)

	* pr.c (print_page): Fixed to not add single spurious newline
	at EOF when using -t.

Wed Oct  2 01:02:05 1991  David J. MacKenzie  (djm at apple-gunkies)

	* pr.c (print_page): Don't pad the page if -t given.

	* csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy.

Thu Sep 26 12:35:00 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)

	* Version 1.1.

	* configure, system.h: Include memory.h if it works.

	* split.c: Allow `b' unit as well as `k' and `m'.

	* head.c, tail.c: Replace -b +blocks option with specifying
	units (b, k, or m) after the number.
	(parse_unit): New function.

	* fold.c (main): Check that -w arg is a number.

	* cut.c: +delimiter takes an arg.

Mon Sep 16 14:52:38 1991  David J. MacKenzie  (djm at churchy.gnu.ai.mit.edu)

	* pr.c (close_file): Don't close an already closed file.

Thu Sep 12 00:14:43 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* memchr.c: New file.
	* configure: Check if it's needed.

	* csplit.c, gcsplit.1: New program.

	* pr.c (cleanup): Only free buffers if they were allocated.

	* sort.c [!USG && !STDC_HEADERS]: Declare memchr.

Wed Sep 11 20:54:16 1991  Jim Meyering  (meyering at churchy)

	* pr.c: The following 3 bugs appeared (at least) when printing
	a  single file with the options `-3 -f'.
	* (print_white_space): Single spaces were being replaced
	with tabs.
	* (print_page): Some lines were getting too much white space
	at the beginning because spaces_not_printed wasn't being reset
	to 0.
	* (read_line): The single space between a truncated column
	on its left and the column on its right was omitted.  Fixed
	so that previous value of input_position is restored before
	returning FALSE.

Sat Sep  7 03:22:18 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* configure: Only remove /etc from PATH when it's not part of
	a larger name.

Wed Sep  4 17:09:24 1991  David J. MacKenzie  (djm at apple-gunkies)

	* linebuffer.c (readline): Fix incorrect recalculation of `end'.

	* head.c, tail.c: Replace `mode' variables and bitmasks with
	separate variables for each option.

Mon Sep  2 04:00:37 1991  David J. MacKenzie  (djm at apple-gunkies)

	* wc.c: New program.

Sun Sep  1 01:18:38 1991  David J. MacKenzie  (djm at apple-gunkies)

	* fold.c (fold_file): Read in an int, not a char, for EOF
	comparison.

	* configure: Check whether st_blksize is missing.

	* tac.c (save_stdin): Put copy of pipe input in TMPDIR if
	defined, instead of /tmp.

Thu Aug 29 14:48:15 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* xwrite.c [POSIX]: unistd.h might require sys/types.h.

Wed Aug 28 11:57:39 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* paste.c (main): Consider -d "" to be like -d "\0",
	for POSIX (if I read it right).

	* sort.c, join.c: New programs.

	* cut.c (set_field): Allow blanks as well as commas to
	separate numbers in ranges.

Sun Aug 25 19:57:40 1991  Jim Meyering  (meyering at apple-gunkies)

	* pr.c: Failure to open an input file is no longer a fatal error.
	A message is printed for each failed open.  When printing
	in parallel, each failed open results in one fewer output column.
	Added POSIX -r option to suppress the message.
	* pr.c: Added variables: failed_opens, ignore_failed_opens.
	These changes were based in part on work by David MacKenzie.

Sat Aug 24 15:27:39 1991  Jim Meyering  (meyering at pogo)

	* pr.c: Complain if user gives both -m and -[0-9]+ options.

Wed Aug 21 22:04:57 1991  David J. MacKenzie  (djm at apple-gunkies)

	* Version 1.0.

Mon Aug 19 00:16:51 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* expand.c: Rename some variables.
	(expand): Don't access value off end of array.
	* unexpand.c: Rename some variables.
	(unexpand): Don't access value off end of array.
	Instead of copying tabs verbatim and flushing pending spaces
	when one is reached, count them as the proper number of
	pending spaces.  Instead of changing tabs to single spaces if
	the tabstop list is exhausted, print the rest of the line
	unchanged (for POSIX).

Sat Aug 17 01:49:41 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* cut.c (cut_file), paste.c (paste_parallel, paste_serial):
	Clear EOF and error conditions on stdin so it can be reused.

	* expand.c, unexpand.c (parse_tabstops): Allow blanks as well
	as commas to separate tabstops, for POSIX.
	* expand.c (expand), unexpand.c (unexpand): Don't line-buffer
	the output; send it directly to stdout.
	* unexpand.c (main): Make -t stupidly imply -a for POSIX.
	(unexpand): If a tab stop list was given and we move past its end,
	copy the rest of the line verbatim.

	* split.c (convint): New function to allow 'm' and 'k' after
	byte counts.
	(main): Use it.  Change -c option to -b for POSIX.

Fri Aug  9 02:47:02 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* pr.c: Protect isdigit with isascii, if required.

Tue Aug  6 21:42:25 1991  David J. MacKenzie  (djm at wheat-chex)

	Most of the following is from Paul Eggert:
	* cat.c (main): If stdin is read, check close at end.
	* cmp.c (main): Check for stdin being closed.
	Check for close errors on stdin and stdout.
	(cmp): Return a value instead of exiting.
	* cut.c (cut_file): New function, from code in main.
	Check for read errors.
	(main): Check for close errors.
	* expand.c, unexpand.c (main): Check for close errors.
	(next_file): Go to next file if one can't be opened.
	Check for close errors.
	* head.c (main), tail.c (main): If stdin was read, check for
	close errors.
	* head.c (head_file), tail.c (tail_file): Check for close errors.
	* paste.c (main, paste_parallel, paste_serial), tac.c (main):
	Check for close errors.  Close stdin if it was read.
	* split.c (main): Check for close errors.

	* configure, Makefile.in's: Support +srcdir option.
	Make config.status.  Fix up clean targets.

Wed Jul 31 01:32:59 1991  David J. MacKenzie  (djm at hal)

	* linebuffer.h (struct linebuffer): Add a field to indicate
	the number of valid chars in the line.
	* linebuffer.c (initbuffer, readline): Fill it in.
	* uniq.c, comm.c: Use it.

	* pr.c (main): Check stdin and stdout fclose for errors.
	(init_parameters): If there's no room for header and footer,
	omit them rather than dying (for POSIX).
	(init_header): Take a file descriptor as additional arg.
	(init_fps): Change callers.  Note when stdin is read.
	(open_file): For filename "-" use stdin.
	(close_file): Don't close stdin.  Check close for errors.
	(print_char, char_to_clump): Use isprint instead of explicit
	comparisons.

	* memcmp.c: New file (needed for comm).
	* bcopy.c: New file (needed for fold).
	* system.h: Don't define bcopy as memcpy.
	* configure: Check for bcopy and memcmp.

	* uniq.c (main): Use "-" instead of NULL to mean stdin or
	stdout.
	(check_file): Use "-" instead of NULL to mean stdin or stdout.
	Check readline return instead of for NUL character to
	detect eof.
	Check fclose for errors.
	(find_field): Use linebuffer length, not NULs, to detect end
	of line.
	(different): New function, replaces compare.  Uses memcmp
	instead of strncmp.
	(writeline): Use fwrite instead of fputs so NULs are preserved.

	* comm.c (compare_files): Return an error indication.
	Don't take a filename of NULL to mean stdin.
	Use memcmp instead of strcmp to allow for NULs.
	Check fclose for errors.
	(writeline): Use fwrite instead of fputs so NULs are preserved.

	* sum.c (sum_file): Take an arg indicating whether to print
	the filename, and don't take NULL meaning stdin.  Set a flag
	when we read stdin.  Check fclose return for errors.
	(main): If stdin was read, check fclose return for errors.
	Use filename of "-" if no args given.

Thu Jul 25 15:17:10 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* fold.c: Rewritten from scratch for POSIX.

Wed Jul 24 01:55:41 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* split.c (line_bytes_split): Use xmalloc instead of alloca.
	* system.h: Don't declare alloca.

	* tac.c, tail.c: Use SEEK_ instead of L_ for lseek.
	* system.h: Define SEEK_ macros if not defined.

	* pr.c: Rename variable `truncate' to avoid library function conflict.

Tue Jul 23 13:21:48 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* linebuffer.c, linebuffer.h: New files.
	* comm.c, uniq.c (initbuffer, readline): Functions
	removed (use versions in linebuffer.c).

Mon Jul 22 13:23:53 1991  David J. MacKenzie  (djm at wookumz.gnu.ai.mit.edu)

	* sum.c (sumfile): Always print 5 digits for second number, too.
	Interpret "-" to mean stdin.

Sat Jul 20 14:24:40 1991  David J. MacKenzie  (djm at bleen)

	* uniq.c: Use isblank instead of isspace, to support POSIX.2.
	* comm.c, pr.c, uniq.c (concat, fatal, error,
	pfatal_with_name, xmalloc, xrealloc): Functions removed.

Sat Jul 13 02:04:53 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)

	* nl.c: Add long-named options.  Doc fixes.

Sat Jul  6 02:19:09 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)

	* expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h.

	* xwrite.c [POSIX]: Include unistd.h.
	[STDC_HEADERS]: Don't declare errno.

Sun Jun 30 23:35:16 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)

	* uniq.c: Add long-named options.  Remove marginally useful -z
	option (zero padded repeat counts).

Thu Jun 27 16:31:45 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)

	* tail.c (tail_file), tac.c (save_stdin, tac_file), split.c
	(cwrite), head.c (head_file), cat.c (main): Check close return
	value for delayed error report due to NFS.

Tue Jun 11 00:12:15 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)

	* cat.c: Replace "uchar" with "unsigned char", to avoid
	problems with various systems' typedefs.

Thu Jun  6 12:54:26 1991  David J. MacKenzie  (djm at geech.gnu.ai.mit.edu)

	* cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean
	operation is unsupported, for HP-UX 7.0.

Sun Apr 14 21:49:17 1991  Richard Stallman  (rms at mole.gnu.ai.mit.edu)

	* sum.c: Always print five digits for first number.

Fri Mar 15 16:16:54 1991  David J. MacKenzie  (djm at geech.ai.mit.edu)

	* cat.c, cmp.c: Don't use fileno(); not needed.

Thu Jan 10 02:16:55 1991  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* tac.c, tail.c: Change _POSIX_SOURCE to POSIX.

Thu Dec 27 00:06:45 1990  David J. MacKenzie  (djm at egypt)

	* cut.c (cut_file_bytes, cut_file_fields): Make inbufp and
	outbufp global.
	(enlarge_line): Adjust inbufp and outbufp.

Sun Sep  9 16:54:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cat.c: Declare free returning void, not int, so it
	doesn't bomb on Xenix.

Mon Sep  3 22:23:57 1990  David J. MacKenzie  (djm at coke)

	* tac.c: Print error messages before calling cleanup, not after.

Tue Aug 28 18:05:24 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* tac.c (cleanup): Return SIGTYPE, not int.

Tue Aug  7 12:51:18 1990  David J. MacKenzie  (djm at apple-gunkies)

	* cut.c (main, usage): Add -b and -n options for POSIX.
	(set_fields): Don't allow SPC or TAB as number separators.

	* paste.c (paste_parallel): If open of any file fails, quit
	(for POSIX).

Mon Aug  6 22:14:13 1990  David J. MacKenzie  (djm at apple-gunkies)

	* pr.c: Add POSIX -F option (same as -f).

	* uniq.c (check_file): Allow '-' to mean stdin or stdout.

Mon Aug  6 14:43:30 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)

	* head.c, tail.c: Change `chars' to `bytes' globally.
	(main, usage): Use POSIX.2 draft 10 option syntax.

Sun Aug  5 11:51:12 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)

	* cat.c (main): Don't delay error messages, so they appear
	where expected.
	(main, simple_cat, cat): Make errors in input files nonfatal.

Sat Aug  4 10:11:30 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)

	* cat.c: Remove -c option added for POSIX draft 9, since POSIX
	draft 10 removed it.

	* tac.c (tac_stdin): Use fstat instead of lseek to determine
	whether stdin is seekable, because lseek silently fails on
	some special files, like tty's.
	tail.c (tail_chars, tail_lines): Use fstat instead of lseek;
	don't turn off -f for non-regular files (assume the user knows
	what he's doing; it might work for fifo's and sockets).

	* paste.c (main): If no files given, use stdin.
	Don't let collapse_escapes write on string constant (delim default).
	(paste_parallel): Don't close stdin.

	* cut.c (main): Use standard input for filename of "-".

	* comm.c (compare_files): Allow '-' to mean stdin.

Fri Aug  3 13:38:28 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)

	* cut.c (enlarge_line): Take an arg giving the required amount
	of space.  Change callers.
	(main): Don't allow -t'<TAB>' without -f.
	Make `delim' unsigned to fix sign extension problem in comparison.

Tue Jul 17 12:36:11 EDT 1990  Jay Fenlason (hack@@ai.mit.edu)

	* pr.c  Deleted excess whitespace from ends of lines.
		Modified to work with current version of getopt, which
		returns 1 instead of 0 for non-options.
		Reversed the meaning of the -f option, to be compatable
		with real pr.

Sun Jul  8 00:39:31 1990  David J. MacKenzie  (djm at apple-gunkies)

	* cmp.c (main, usage): Rename -L option to -c and don't have
	it imply -l.
	(printc): Take an arg to specify number of chars to pad to,
	for column alignment.
	(cmp): Respect flag_print_chars in default output format.
	Align columns for cmp -cl.

Sat Jul  7 17:23:30 1990  David J. MacKenzie  (djm at apple-gunkies)

	* cmp.c: For +show-chars, have getopt return 'L' so
	`flag_print_chars' gets set.

Fri Jun 29 01:04:19 1990  David J. MacKenzie  (djm at apple-gunkies)

	* tac.c (main): Initialize fastmap and translate fields of
	regex before compiling it.

Fri Jun 22 00:38:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* tac.c: Change +regexp to +regex for consistency with GNU find.

Wed Jun 20 01:46:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cat.c (cat): If FIONREAD is available, only use it if it is
	supported by the filesystem that the file is on.

Sun Jun  3 20:26:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cat.c (main): Add a variable to control whether the check
	for input file == output file is made, because no values of
	st_dev and st_ino should be assumed to be available for this
	purpose.  Only do the check for regular files.

	* tac.c: Use bcopy instead of memcpy.

Thu May 31 00:55:36 1990  David J. MacKenzie  (djm at apple-gunkies)

	* head.c: Use longs instead of ints for file offsets, for 16
	bit machines.

Tue May 22 00:56:51 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cmp.c: Change some ints to longs for 16 bit machines.
	(bcmp_cnt): Make char-pointer counting slightly simpler.

Sat May 12 01:16:42 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cat.c (main): Allow input file to be output file for devices
	(ttys, etc.).  Check whether input file is output file when
	reading standard input.  Print any error messages for standard
	input.

	* cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
	machines as well as 32 bit ones.
	* cmp.c, tail.c: Use longs instead of ints for file offsets.

Fri May 11 02:11:03 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cmp.c: Fix some exit statuses for POSIX.

Tue May  8 03:41:42 1990  David J. MacKenzie  (djm at abyss)

	* tac.c: Use regular expressions as the record boundaries.
	Give better error messages.
	Reformat code and make it more readable.
	(main): Use getopt_long to parse options.
	(tac_stdin): Do not make a temporary file if standard input
	is a file.
	(tac_file): New function.
	(tac): Take an open file desc as an arg.
	(output): Rewrite to use its own efficient buffering.
	(xmalloc, xrealloc, xwrite): New functions.

Sun Apr  8 20:33:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* head.c, tail.c: Use `error' instead of `fatal_perror' and
	`nonfatal_perror'.  Remove some unnecessary info from messages.

Wed Mar 21 09:30:18 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)

	* comm.c (main): Pass the list of files to compare_files as a
	char ** instead of a char *.
	(compare_files): Make arg a char **.

	* uniq.c: Declare some functions as void.
	Change global vars `countmode' and `mode' from ints to enums.
	(main): Use getopt to parse options and support POSIX options.
	Don't use integer_arg to parse numbers, since `-#' can't be
	parsed that way using getopt.
	(find_field): Use isspace for finding fields boundaries.

Tue Mar 20 14:28:25 1990  David J. MacKenzie  (djm at pogo.ai.mit.edu)

	* comm.c (main): Call usage if given bad option or wrong
	number of args.  Exit with 0 status normally.
	(usage): New function.
	Declare some other functions as void.

Wed Mar 14 10:48:40 1990  David J. MacKenzie  (djm at rice-chex)

	* cmp.c (main, cmp, usage): Replace -q +quick option with -L
	+show-chars option to add ASCII representation of bytes to -l format.

Tue Mar 13 00:50:14 1990  David J. MacKenzie  (djm at rice-chex)

	* cmp.c (cmp): Change EOF message for POSIX compatibility.
	For -l format, clear bits > FF.

Mon Mar  5 17:21:00 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* tail.c: Move global `errors' into main instead of having
	nonfatal_perror set it.
	(tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
	Return an error status.
	(file_lines, start_chars, start_lines): Reverse the meaning of
	the return value.
	(tail_lines, tail_chars): Account for that reversal.

Mon Mar  5 00:34:36 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* head.c: Move global `errors' into main and have the various
	functions return an error status instead of setting it in
	nonfatal_perror.

Sat Mar  3 11:27:27 1990  Torbj|rn Granlund  (tege at echnaton)

	* cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
	  options specified), to compare the two blocks and count
	  newlines simultaneously.
	* cmp.c New function: bcmp_cnt.

	* cmp.c (main): Test if output is redirected to /dev/null, and
	  assume `-s' if this is so.

Tue Feb 20 17:09:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cat.c: Change `argbad' from a char to a short, so it will
	work on machines with unsigned chars.

Sat Feb 10 02:16:40 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)

	* cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
	Remove unneccessary variable `c1'.  If -l was given, increase
	`char_number' by the number of bytes read, after producing output,
	rather than by the offset of the first differing bytes, before
	producing output.
	Replace if-else-if constructions with case statements for clarity.
	(bcmp2): Rename `n' to `nread'.

Wed Dec 20 01:32:06 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)

	* nl.c (proc_text): Use re_search instead of re_match.

Tue Dec 19 01:26:34 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)

	* nl.c: Indent.  Un-nest statements.  Use GNU regexp functions
	instead of System V ones.  Move function declarations together.
	(quit): Remove useless function.
	(program_name): New variable for error messages.
	(main): Use perror in error message.
	(xmalloc): New function to replace myalloc.
	(myalloc): Function removed.
	Global: use program_name and xmalloc.

Sun Dec 17 00:36:36 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)

	* uniq.c: Declare some functions.
	(main): Initialize infile and outfile.  Call usage if given
	invalid args.  Normally exit with 0 status instead of garbage.
	(usage): New function to print usage message and exit.
	(check_file): Remove unused variable.
	(readline): Compare against EOF, not < 0.
	(xmalloc, xrealloc): Return char *, not int.
	Ok to return 0 if 0 bytes requested.
	(lb1, lb2): Remove unused global vars.
	(concat): Remove unused function.

Sat Dec 16 15:15:50 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)

	* comm.c: Remove unused global variables lb1, lb2.
	(main): Remove unneeded variable.
	(compare_files): Remove unused arg.
	(readline): un-nest assignment.  Test against EOF instead of < 0.
	(error): Print to stderr, not stdout.
	(xmalloc, xrealloc): Return char * instead of int.
	Returning 0 is ok if 0 bytes requested (ANSI C).


Local Variables:
version-control: never
End:
@


1.2.2.1
log
@file ChangeLog was added on branch RELENG_8_4 on 2013-03-28 13:01:11 +0000
@
text
@d1 8574
@


1.2.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 7511
2004-08-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* tests/install/basic-1: Test for the -d regression.

2004-08-11  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/install.c (main): Fix -d regression introduced with
	--target-directory support at 2004-06-25.

2004-08-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/copy.c (copy_internal): When preserving links, unlink
	a destination with link count greater than one.  This is so
	that commands like "cp -a" don't get confused when copying into
	a destination that already contains many hard links.  Problem
	reported by Tim Waugh in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00053.html

2004-08-10  Paul Eggert  <eggert@@cs.ucla.edu>

	Convert all files to UTF-8.
	* tests/fmt/basic (8-bit-pfx): Use UTF-8, not Latin-1.
	* tests/sort/Test.pm (16a): Likewise.
	* tests/uniq/Test.pm (8): Likewise.
	* tests/misc/printf-hex: Use ASCII, not Latin-1.

	* NEWS: Document "sort -o -" and "tee -" POSIX-conformance fixes.
	* src/shred.c (usage): "-" is an operand, not an option.
	* src/sort.c (die, xfopen, mergefps, first_same_file, merge):
	A null file arg means standard output.
	(main): "-o -" means to write to a file named "-",
	not to standard output.
	* src/tee.c (usage, tee): "tee -" writes to standard output, not
	to a file named "-".

2004-08-10  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/install.c (change_timestamps): Fix int->bool conversion
	bugs introduced on 2004-07-29.

2004-08-09  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (wipename): Work even if the directory is writeable
	and not readable.  Prefer write access, since this should work
	better with fdatasync.

	* src/csplit.c (xalloc_die): New function.
	(main): Remove now-obsolete initialization of xalloc_fail_func.

	* src/md5sum.c: Adjust to sha->sha1 renaming.

2004-08-08  Dmitry V. Levin  <ldv@@altlinux.org>

	Minor code cleanup.
	* src/readlink.c (canonicalize_fname): Remove unneeded proxy function.
	(can_mode): Make variable local.

2004-08-07  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/system.h (O_BINARY) [!O_BINARY && defined O_BINARY]:
	Do not define, to avoid annoying compiler messages on QNX 6.3.
	Problem reported by Johan in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00050.html

2004-08-04  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/system.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX):
	Define to a concatenation of string literals, not to an expression;
	needed for concatenation contexts.
	(INTMAX_MAX, INTMAX_MIN): New macros.

	* src/stat.c (print_stat): Don't assume st_ino / st_dev fits in
	unsigned long; this isn't true for st_ino on Solaris 9.

2004-08-03  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uname.c: Do not depend on HAVE_SYSCTL when deciding
	whether to include files.  Include <sys/param.h> if
	HAVE_SYS_PARAM_H (not HAVE_SYSCTL).
	(main) [defined __POWERPC__]: Add a kludge to work around a
	Mac OS X bug, so that uname -p defaults to "powerpc" if
	sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
	fails.  Problem reported by Petter Reinholdtsen in:
	http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html

	* src/uniq.c (hard_LC_COLLATE, ignore_case, different, check_file,
	main): Use bool for booleans.
	(writeline, check_file): Use uintmax_t for line counts.
	(check_file): Check for and report line number overflow,
	when that matters.
	* src/wc.c (iswspace, wc): Use to_uchar rather than a cast.
	(print_lines, print_words, print_chars, print_bytes, print_linelength,
	have_read_stdin, wc, wc_file, main):
	Use bool for booleans.
	(exit_status): Remove.
	(wc, wc_file): Return bool status.  All callers changed.
	* src/who.c (scan_entries): 0 -> STDIN_FILENO.
	* src/whoami.c (main): Print uids using unsigned long int, not
	unsigned int.

	* src/unexpand.c: Int cleanup and minor reorganization to be more
	like src/expand.c.
	Include quote.h, xstrndup.h.
	(TAB_STOP_SENTINEL): Increase from INT_MAX to INTMAX_MAX.
	(convert_entire_line, have_read_stdin, parse_tabstops, next_file,
	unexpand, main):
	Use bool for booleans.
	(tab_size, tab_list, add_tabstop, validate_tabstops, unexpand):
	Use uintmax_t for column counts.
	(first_free_tab, validate_tabstops, unexpand): Use size_t for sizes.
	(add_tabstop, parse_tabstops, main): Don't reserve UINTMAX_MAX
	as a tab stop.
	(parse_tabstops): Don't use ISBLANK on possibly-signed char.
	Detect overflow in tab stop string.
	(next_file, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0.
	(unexpand): Concatenate input files the same way expand does.

	* src/touch.c (no_create, use_ref, posix_date, amtime_now,
	touch, main): Use bool for booleans.
	(main): Avoid integer overflow when given more than INT_MAX
	options.
	* src/tsort.c (struct item, n_strings): Use size_t for sizes.
	(have_read_stdin, count_items, scan_zeros, detect_loop,
	recurse_tree, walk_tree, tsort, main):
	Use bool for booleans.
	(exit_status): Remove.
	(tsort): Return a success flag instead of storing into a global.
	(main): Use it.
	* src/tty.c (silent, main): Use bool for booleans.
	(main): 0 -> STDIN_FILENO.
	* src/uname.c (print_element): Use bool for booleans.

	* src/test.c (TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND):
	Remove.  All uses replaced by C99 boolean primitives.
	(TEST_TRUE, TEST_FALSE): New constants, for readability.
	(test_unop, binop, unary_operator, binary_operator, two_arguments,
	three_arguments, posixtest, expr, term, and, or, is_int, age_of,
	one_argument, main): Use bool for booleans.
	(advance, unary_advance): Now inline procedures rather than a macros.
	(is_int): Renamed from isint, to avoid namespace clash with ctype.h.
	(term, and, or): When it's easy, loop instead of recursing.
	(term): Avoid integer overflow if there are INT_MAX-3 args (!).
	(binary_operator, unary_operator): Simplify by systematically rewriting
	true==FOO to FOO (where FOO is a boolean).
	(unary_operator): Don't consider a file to be a regular file
	merely because its mode&S_IFMT is zero.  Just use S_ISREG.
	Remove unnecessary casts.  Remove ifdefs for things like
	S_ISSOCK that are no longer needed, since stat-macros.h always
	defines them now.

	* src/tac-pipe.c (buf_init_from_stdin, find_bol, tac_mem):
	Use bool for booleans.
	(buf_init_from_stdin, buf_free, find_bol, print_line):
	Use size_t for sizes.
	* src/tac.c (separator_ends_record, tac_seekable, tac_file,
	tac_stdin, tac_stdin_to_mem, main): Use bool for booleans.
	(match_length, G_buffer_size, tac_seekable, main): Use size_t for sizes.
	(tac_seekable): Use ptrdiff_t for pointer subtraction.
	Report an error if the result is out of range.
	(tac_seekable, main): Check for integer overflow in buffer size
	calculations.
	(main): Remove unnecessary casts.

	* src/su.c (run_shell): Pass a new n_additional_args arg, so that
	the callee doesn't have to count 'em.  All callers changed.
	Don't allocate more space for the arg vector than we'll need.
	Use memcpy to copy the args rather than rolling our own loop.
	Use size_t for sizes.
	(fast_startup, simulate_login, change_environment, log_su,
	correct_password, restricted_shell, main): Use bool for booleans.
	(longopts): Don't assume change_environment is an int.
	Use NULL, not 0, for pointers.
	(xsetenv): New function, replacing xputenv and concat.
	All callers changed.
	(elements): Remove; no longer needed.
	(log_su, correct_passwd, main): Prefer !x to x==NULL.
	(log_su): 2 -> STDERR_FILENO.
	(modify_environment, main): Don't assume that getenv's returned value
	has an indefinite lifetime.
	(modify_environment): Allocate a larger environ.
	(main): Remove an impossible 'case 0'; if it happens now, it'll
	get diagnosed.  Don't assume getpwnam results outlive endpwent.
	Check for null or empty pw_name, pw_dir and for null pw_passwd.

	* src/stty.c (VA_START): Remove.  All callers now use va_start.
	(_POSIX_VDISABLE): Remove unnecessary cast.
	(struct control_info, visible): Use cc_t for control chars.
	(struct control_info): Use size_t for sizes.
	(recover_mode, set_mode, display_speed, display_window_size,
	valid_options, main, display_changed):
	Use bool for booleans.
	(integer_arg): Return unsigned long int, not long int.
	Accept new max arg; all callers changed, to specify a maximum
	value for integer parameters instead of silently overflowing.
	(wrap): Do not overrun the stack buffer if the output contains
	more than 1024 bytes.  Instead, malloc a buffer.
	(main): Remove a "what is this?!?" FIXME.  Nobody knows what it is.
	Remove unnecessary casts.
	(set_control_char): Allow int values only up to cc_t range.
	(screen_columns): Don't reject INT_MAX.
	(display_changed, display_all, display_speed, recover_mode):
	Don't assume cc_t fits in int.

	* src/remove.h: Add copyright notice.
	(struct rm_options): Use bool for booleans.
	* src/rmdir.c (empty_paths, ignore_fail_on_non_empty, verbose,
	errno_rmdir_non_empty, remove_parents, main): Likewise.
	* src/sum.c (have_read_stdin, bsd_sum_file, sysv_sum_file,
	main): Likewise.
	(main): Don't dump core if invoked with argv[0]==NULL.
	* src/tee.c (tee, append, ignore_interrupts, main, tee):
	Use bool for booleans.
	(tee): Use ssize_t for read returns.

	* src/ptx.c: Add a FIXME mentioning that there are many
	unchecked integer overflows in this file.
	(gnu_extensions, auto_reference, input_reference, right_reference,
	ignore_case, initialize_regex, fix_output_parameters,
	output_one_roff_line, output_one_text_line, output_one_dumb_line, main):
	Use bool for booleans.
	(SKIP_SOMETHING, compare_words, digest_break_file,
	find_occurs_in_text, fix_output_parameters):
	Use to_uchar instead of a caset.
	(print_field): Rewrite to avoid cast.

	* src/printf.c (posixly_correct): Use bool for booleans.
	(verify, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0.
	(STRTOX): Rewrite to avoid casts.
	(print_esc_char): Arg is char, not int.
	* src/readlink.c (canonicalize): Remove.  All uses now merely inspect
	can_mode.
	(no_newline, verbose): Use bool for booleans.
	(can_mode): Now of type int; use -1 to denote otherwise-uninitialized.
	* src/shred.c (struct Options, main): Use bool for booleans.
	(isaac_seed_data, fillpattern, wipefile): Rewrite to avoid casts.
	* src/split.c (cwrite, bytes_split, lines_split, line_bytes_split):
	Use bool for booleans.
	* src/stat.c (G_fail): Remove.
	(print_statfs): Print various gotta-be-nonnegative values using
	unsigned long int, not long int or int.
	(do_statfs, do_stat): Return a boolean success flag.
	(do_stat, main): Use bool for booleans.

	* src/pr.c: Add a FIXME mentioning that there are many
	unchecked integer overflows in this file.
	(TRUE, FALSE): Remove.  All uses replaced by true and false.
	(struct COLUMN, read_line, print_page, print_stored, open_file,
	skip_to_page, init_fps, parallel_files, align_empty_cols,
	empty_line, FF_only, explicit_columns, extremities, keep_FF,
	print_a_FF, print_a_header, use_form_feed, have_read_stdin,
	print_across_flag, storing_columns, balance_columns,
	truncate_lines, join_lines, untabify_input, failed_opens,
	numbered_lines, skip_count, use_esc_sequence, use_cntrl_prefix,
	double_space, ignore_failed_opens, use_col_separator,
	pad_vertically, last_line, main, init_parameters, skip_read,
	read_line, print_stored):
	Use bool for booleans.
	(struct COLUMN, char_to_clump, store_char, print_char):
	Use char for chars.
	(clump_buff, print_clump): Use char[], not int[], for an array whose
	elements are always chars.
	(first_last_page, main, getoptarg, balance, add_line_number,
	char_to_uclump): Remove unnecessary casts.
	(init_parameters): Allocate chars, not ints, for clump_buff.
	(print_char): Use to_uchar before invoking ISPRINT.
	(char_to_clump): Convert to unsigned char before invoking ISPRINT.

	* src/nohup.c (main): Use bool for booleans.
	* src/paste.c (paste_parallel, paste_serial, main): Likewise.
	* src/pathchk.c (validate-path, main, portable_chars_only): Likewise.
	(portable_chars_only): Use to_uchar rather than a cast.
	* src/printenv.c (main): Use bool for booleans.
	Do not assume that the environ has at most one matching entry
	for each option (integer overflow was possible otherwise).

	* src/od.c (FMT_BYTES_ALLOCATED): Now an enum, not a decimal
	constant.  Do not assume PRIdMAX etc. are strings of length 3 or
	less.
	(struct tspec): Use it.  fmt_string is now an array, not
	a pointer, as there's little point to the indirection here.
	(struct tspec, flag_dump_strings,
	traditional, flag_pseudo_start, limit_bytes_to_format,
	abbreviate_duplicate_blocks, have_read_stdin, simple_strtoul,
	decode_one_format, open_next_file, check_and_close,
	decode_format_string, skip, write_block, read_char, read_block,
	parse_old_offset, dump, dump_strings, main):
	Use bool for booleans.
	(struct tspec): Use void *, not char *, for generic pointers.
	(bytes_to_oct_digits, bytes_to_signed_dec_digits,
	bytes_to_unsigned_dec_digits, bytes_to_hex_digits):
	Use char, not unsigned int, since char suffices.
	(print_s_char, print_char, print_s_short, print_short,
	print_int, print_long, print_long_long, print_float,
	print_double, print_long_double): Rewrite to avoid casts.
	These now take void * arguments, instead of char *.
	Use the same body for all functions, except for the choice
	of type.  Assume C89 to simplify handling of signed char.
	(dump_hexl_mode_trailer, print_named_ascii, print_ascii):
	Rewrite to avoid casts.
	(print_named_ascii, print_ascii): Now takes void *, not char *.
	(decode_one_format): Use int for printf field widths, not
	unsigned int.  Pass void * to subsidiary printers,
	not char *.  Simplify handling of floating-point formats
	by factoring out common code dealing with precision and field width.
	(decode_format_string): Avoid need for temporary copy of
	each decoded struct tspec.
	(get_lcm): Remove unnecessary cast.
	(main): Fix bug where more than INT_MAX failed decodes were ignored.

2004-08-02  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/nl.c (TRUE, FALSE): Remove; all uses changed to true, false.
	(enum number_format): Remove.
	(FORMAT_RIGHT_NOLZ, FORMAT_RIGHT_LZ, FORMAT_LEFT): Now strings,
	not enum values.
	(DEFAULT_SECTION_DELIMITERS): Now an array constant, not a macro.
	(section_del): Now const.
	(print_fmt): Remove.
	(starting_line_number, page_incr, blank_join, line_no,
	print_lineno, proc_text, main):
	Use intmax_t for line numbers.
	(reset_numbers, have_read_stdin, build_type_arg, nl_file, main):
	Use bool for booleans.
	(lineno_format): Now a string, not an enum value.
	(build_print_fmt): Remove.  All calls removed.  This work is
	now done within print_lineno.
	(build_type_arg): Use size_t for sizes.
	(print_lineno): Check for line number overflow.
	(proc_text, main): Remove unnecessary cast.

	* src/ln.c (symbolic_link, interactive, remove_existing_files,
	verbose, hard_dir_link, dereference_dest_dir_symlinks,
	do_link, main): Use bool for booleans.

	* src/ls.c (struct fileinfo, file_interesting,
	extract_dirs_from_files, color_symlink_as_referent,
	FILE_OR_LINK_MODE, sort_reverse, print_owner, print_group,
	numeric_ids, print_block_size, dired, print_with_color,
	check_symlink_color, print_inode, recursive, immediate_dirs,
	all_files, really_all_files, qmark_funny_chars,
	print_dir_name, format_needs_stat, format_needs_type, visit_dir,
	main, decode_switches, parse_ls_color, print_dir, file_interesting,
	gobble_file, make_link_path, basename_is_dot_or_dotdot,
	extract_dirs_from_files, print_long_format):
	Use bool for booleans.
	(dir_defaulted): Remove; no longer needed.
	(main): Use int to count files, since it suffices for argv.
	Rewrite to avoid need for dir_defaulted.
	(main, print_dir, gobble_file, get_link_name,
	xstrcoll):
	Set exit status to EXIT_SUCCES/EXIT_FAILURE rather than 0/1.
	(decode_switches): Put back check for ws.ws_col <= SIZE_MAX.
	Remove unnecessary cast to int.  Use int instead of unsigned
	int to count from 0 to 1.
	(get_funky_string, print_type_indicator): Use char for bytes, not int.
	(make_link_path): Use NULL for null pointers.
	(quote_name): Use to_uchar instead of cast.

	* src/id.c (use_name, main, print_user, xgetgroups, print_group_list,
	print_full_info): Use bool for booleans.
	(problems): Remove, replacing with....
	(ok): New var (inverted from old sense).
	(print_user, print_group, print_full_info):
	Print uids/gids with %lu, not %u.
	(xgetgroups): Don't run out of memory if getgroups or getugroups
	returns -1.
	* src/setuidgid.c (main): Print uids/gids with %lu, not %ld.

	* src/factor.c (wheel_tab): Use unsigned char instead of unsigned
	int, since it suffices.
	(factor, print_factors): Use size_t for sizes.
	(print_factors, do_stdin, main): Use bool for booleans.
	* src/fold.c (TAB_WIDTH): New macro; use it instead of "8".
	(fold_file, main): Use bool for booleans.
	(fold_file, main): Use size_t for sizes.
	(main): Allow -w options up to SIZE_MAX - TAB_WIDTH - 1, instead
	of prohibiting widths greater than INT_MAX.
	* src/head.c (presume_input_pipe, print_headers, have_read_stdin,
	write_header, elide_tail_bytes_pipe, elide_tail_bytes_file,
	elide_tail_lines_pipe, elide_tail_lines_seekable,
	elide_tail_lines_file, head_bytes, head_lines, head, head_file,
	string_to_integer, main):
	Use bool for booleans.
	(main): Rewrite to avoid cast.

	* src/csplit.c (struct line): Use size_t for sizes.
	(main): Remove unnecessary cast.
	* src/cut.c (cut_fields): Use to_uchar rather than a cast.
	* src/cut.c (cut_file, main): Use bool for booleans.
	* src/date.c (show_date, rfc_format, batch_convert, main): Likewise.
	* src/env.c (main): Likewise.
	* src/expr.c (nextarg): Likewise.
	* src/env.c (main): Remove unused and nonstandard envp arg.

	* src/fmt.c (COST, MAXWORDS): Add a comment describing some of
	fmt's arbitrary limits.
	(TRUE, FALSE): Remove; all uses changed to (true, false).
	(main): Use bool for booleans.
	Limit maximum width to MAXCHARS / 2.  Use xstrtoul, not xstrtol,
	to parse width.
	(copy_rest): Remove unnecessary cast.
	(get_prefix): Rewrite to avoid cast.
	(check_punctuation): Use char *, not unsigned char *; C89 requires
	this.  Avoid off-by-one buffer read overrun when line is empty.
	(flush_paragraph): Don't assume wptr-parabuf is <= INT_MAX.
	Remove unnecessary casts.
	* tests/fmt/basic (wide-1, wide-2, bad-suffix): Adjust to above
	changes.

	* src/expand.c (convert_entire_line, have_read_stdin, parse_tabstops,
	next_file, expand, main):
	Use bool for booleans.
	(tab_size, tab_list, add_tabstop, parse_tabstops, validate_tabstops,
	expand, main):
	Use uintmax_t for column counts.
	(add_tabstop): Don't reserve -1 (now UINTMAX_MAX) as a special value.
	All callers changed.
	(parse_tabstops): Don't pass a negative char to isblank.
	Avoid memory leak with large tab stops.
	(validate_tabstops, expand): Don't assume number of tab stops is
	<= INT_MAX.
	(next_file, main): Use EXIT_SUCCESS/EXIT_FAILURE rather than 0/1 when
	storing values into exit_status.
	(expand): Use same pattern as unexpand for reading chars.
	Report an error when input line is too long, instead of silently
	screwing up.  Do not mishandle tab stops when backspacing left
	over start of line.

	* src/dircolors.c (have_read_stdin, append_quoted,
	dc_parse_stream, dc_parse_file, main): Use bool for booleans.
	(dc_parse_stream): Use enum for state, rather than int.
	Use ssize_t to store getline result.

	* src/dd.c (translation_needed, parse_integer, scanargs,
	apply_translations, char_is_saved, swab_buffer, skip_via_lseek):
	Use bool for booleans.
	(translate_buffer): Use to_uchar rather than a cast.
	(swab_buffer, copy_simple, copy_with_unblock):
	Use size_t for sizes.

	* src/seq.c (equal_width, valid_format, main): Use bool for booleans.
	* src/sleep.c (apply_suffix): Likewise.
	* src/tail.c (struct File_spec, reopen_inaccessible_files, count_lines,
	forever, from_start, print_headers, have_read_stdin, valid_file_spec,
	write_header, file_lines, pipe_lines, pipe_bytes, recheck,
	tail_forever, tail_bytes, tail_lines, tail, tail_file,
	parse_obsolescent_option, parse_options, main): Likewise.
	* src/sleep.c (apply_suffix): Invert sense of result.
	Use int (not unsigned int) for multiplier, as this generates better
	code with some compilers.  Simplify code a bit.
	* src/tail.c (struct File_spec, max_n_unchanged_stats_between_opens,
	parse_options): Use uintmax_t, not unsigned int or unsigned long int,
	for state counters.
	(tail_bytes, tail_lines): Redo test of return value (-1, 0, 1) to
	make it a bit clearer.

	* src/hostname.c: Include "xgethostname.h".
	(xgethostname): Remove decl; xgethostname.h has it.
	(sethostname) [!defined(HAVE_SETHOSTNAME) && defined(HAVE_SYSINFO)
	&& defined (HAVE_SYS_SYSTEMINFO_H) && defined(HAVE_LIMITS_H)]: Use
	prototypes rather than K&R form.  Assume any negative value from
	sysinfo denotes failure, not just -1.
	(main): Simplify use of sethostname.

	* src/pinky.c (include_idle, include_heading, include_fullname,
	include_project, include_plan, include_home_and_shell, do_short_format,
	include_where, main): Use bool for booleans.
	(count_ampersands, create_fullname, scan_entries, short_pinky):
	Use size_t for sizes.
	(create_fullname): Check for overflow in size calculations.
	(idle_string): Don't assume that the number of idle days
	is less than 10**8 and/or INT_MAX/(24*60*60).
	(main): No need to pass a non-NULL last arg to getopt_long.
	* src/uptime.c (print_uptime, uptime): Use size_t for sizes.
	(print_uptime): Remove unused local variable.
	(main): No need to pass a non-NULL last arg to getopt_long.
	* src/users.c (list_entries_users, users): Use size_t for sizes.
	(list_entries_users): Use char for bytes.
	(main): No need to pass a non-NULL last arg to getopt_long.
	* src/who.c (do_lookup, short_list, short_output, include_idle,
	include_heading, include_mesg, include_exit, need_boottime,
	need_deadprocs, need_login, need_initspawn, need_clockchange,
	need_runlevel, need_users, my_line_only, main): Use bool for booleans.
	(print_runlevel): Use unsigned char for bytes.
	(list_entries_who, scan_entries, who): Use size_t for sizes.
	(main): No need to pass a non-NULL last arg to getopt_long.

	* src/install.c (isdir): Remove decl.
	(install_file_to_path): Rely on make_path to fail if the destination
	is not a directory, by passing preserve_existing==true to it.
	Hence we no longer need to call isdir.
	Free dest_dir immediately when it's no longer needed, rather than
	waiting until the end of the function.
	(copy_file): Don't bother calling isdir, as copy will do the
	right thing if the destination is a directory.

	* src/du.c (fts_debug, opt_all, apparent_size, opt_count_all,
	print_grand_total, opt_separate_dirs, hash_ins, process_file, main):
	Use bool for booleans.
	(max_depth): Now size_t, not int, to avoid an arbitrary limit
	of INT_MAX on depth.
	(G_fail): Remove: no longer needed, now that the relevant
	functions return bool.
	(process_file): Use return value to signal success rather than
	setting a global.  Remove first_call static var; not needed, since
	we can look at n_alloc.  Use size_t for depths.  Remove FIXME
	about size_t casts, as it's now fixed.  Use xnrealloc rather
	than the obsolescent XREALLOC.  Don't bother to check whether
	reallocation is needed unless level > prev_level.
	(du_files): Invert sense of result, for consistency with
	other coreutils code.  All callers changed.
	(main): Allow --max-depth values up to SIZE_MAX.

	* src/df.c (inode_format, show_all_fs, show_local_fs,
	show_listed_fs, posix_format, require_sync, print_type,
	selected_fstype, excluded_fstype, show_dev, show_point, main):
	Use bool for booleans.
	(df_readable, show_dev): Use UINTMAX_MAX instead of -1.
	(show_dev, show_point, main):
	Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
	Don't assume disk name lengths are <= INT_MAX.
	Rewrite pct calculation to avoid cast.
	(show_point): Don't assume resolved length is <= SSIZE_MAX.

	* src/cut.c (hash_int) [!defined UINTPTR_MAX]: Use size_t
	instead of uintptr_t.
	* src/shred.c (UINT_MAX_32_BITS): Remove.
	(word32): Remove.  All uses changed to uint32_t.
	(isaac_seed_data): Remove unnecessary cast.
	* src/system.h (ptr_align): Use size_t; in practice, this is just as
	good as uintptr_t in checking for alignments, and has fewer
	configuration hassles.

	* src/Makefile.am (localedir.h): Make it readonly; this
	undoes part of the 2004-07-27 patch.

2004-07-30  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/sort.c (UCHAR): Remove; all uses changed to to_uchar.
	(IS_THOUSANDS_SEP): Use bool when appropriate.
	(numcompare, main): Use char, not int, when the value is always a char.
	(numcompare): Remove "register"; compilers are smart enough these days.
	* src/system.h (errno, CHAR_BIT): Remove decls;
	no longer needed now we assume C89 or better.
	Include <inttypes.h> before <stdint.h>, as it's the
	Autoconf-recommended pattern.
	(to_uchar): New inline function, moved here from tr.c.
	Use full names for int types, e.g. "long int" rather than "long".
	* src/tr.c (to_uchar): Remove; now in system.h.
	(is_char_class_member): Use bool when appropriate.

	* src/mkdir.c (create_parents, main): Use bool when appropriate.
	(main): Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.

2004-07-29  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/mkfifo.c (main): Use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1.

	* src/chmod.c (recurse, force_silent, process_file, process_files,
	main): Use bool when appropriate.
	* src/cksum.c (cksum, main): Likewise.
	* src/comm.c (hard_LC_COLLATE, only_file_1, only_file_2, both,
	compare_files, main): Likewise.

	* src/copy.h (struct cp_options): Likewise.
	* src/copy.c (copy_internal, is_ancestor, copy_dir, copy_reg,
	same_file_ok, seen_file, copy_internal, valid_options, copy): Likewise.
	* src/cp-hash.h (remember_created): Likewise.
	* src/cp-hash.c (remember_created): Likewise.
	* src/cp.c (struct dir_attr, flag_path, remove_trailing_slashes,
	re_protect, make_path_private, target_directory_operand, do_copy,
	cp_option_init, decode_preserve_arg, main): Likewise.
	* src/install.c (isdir, change_timestamps, change_attributes,
	copy_file, install_file_to_path, install_file_in_dir,
	install_file_in_file, strip_files, dir_arg, cp_option_init, main,
	change_attributes, change_timestamps): Likewise.
	* src/mv.c (remove_trailing_slashes, rm_option_init,
	cp_option_init, do_move, movefile, main): Likewise.
	* src/remove.c (right_justify), full_filename_, AD_pop_and_chdir,
	AD_push, prompt, remove_dir): Likewise.
	* src/rm.c (rm_option_init, main): Likewise.

	* src/remove.c (top_dir, pop_dir, full_filename_):
	Use size_t for sizes.
	* src/cp.c (target_directory_operand): Do not clear *NEW_DST if stat
	succeeds.  It's not necessary in that case, as *NEW_DST is always
	false already.
	(do_copy): Rewrite slightly to avoid need for "unreachable" comment.
	(main): Use EXIT_SUCCESS, EXIT_FAILURE instead of 0, 1.
	* src/rm.c (main): Likewise.

	md5sum, sha1sum integer cleanups.

	* src/checksum.h: Don't include config.h, sys/types.h, stdio.h:
	not needed.
	(ALG_UNSPECIFIED): Remove.
	(ALG_MDT): Don't make it equal to CHAR_MAX + 1; this isn't necessary.
	* src/md5.c: Don't include any files other than checksum.h.
	* src/sha1sum.c: Likewise.
	* src/md5sum.c (OPENOPTS, have_read_stdin, status_only, warn,
	bsd_split_3, split_3, hex_digits, digest_file, digest_check, main):
	Use bool when appropriate.
	(digest_check): Increase limit of number of input lines to
	UINTMAX_MAX from INT_MAX.  Diagnose any overflows of this counter.
	Use ngettext instead of hard-to-i18nize hardcoded stuff for plurals.

2004-07-28  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/cat.c (exit_status): Remove.  Now done by passing a boolean
	'ok' flag around.
	(simple_cat, cat): Return true if successful.  All callers changed.
	(simple_cat, cat, main): Use bool for booleans.
	(simple_cat): Use size_t for sizes.
	(cat, main): Use the same names for parameters that we use for
	long options, to avoid confusion.  This inverts the sense of the
	show_tabs (formerly output_tabs) and number_nonblank
	(formerly numbers_at_empty_lines) variables.
	(main): Don't mess up (due to integer overflow) if we are given
	INT_MAX - INT_MIN + 1 options.
	[O_BINARY]: Don't invoke isatty unless the other options require it.
	(main): When deciding whether to use simple_cat, don't worry
	about binary option; it's irrelevant.

	* src/dcgen: Remove comments, trailing white space, and empty
	lines from the output strings, to save space.
	Use a narrower type like 'unsigned char' for line lengths, if
	that will do.
	Make the output variables static, not extern.

	* src/chgrp.c (parse_group): Require base 10 when parsing
	groups as integers.
	(main): int -> bool when appropriate.
	* src/chown.c (main): Likewise.
	* src/chown-core.c: Include inttostr.h.
	(UINT_MAX_DECIMAL_DIGITS, uint_to_string): Remove.
	(gid_to_name, uid_to_name): Use imaxtostr/umaxtostr
	instead of uint_to_string).
	(describe_change): Instead of an int flag, use a char *
	auxiliary; this avoids the need for casts.
	Assume free (NULL) works.
	(change_file_owner): Return true/false, not 0/-1, since
	we don't set errno.  All callers changed.
	Use bool when appropriate.
	(chown_files): Likewise.
	* src/chown-core.h (chown_files): Likewise.

	* tests/chown/basic: Test for proper handling of uids like
	"010", which must be parsed as decimal.

	* tests/misc/pwd: Don't assume that Perl's getpwd agrees with our
	pwd when there are multiple names for the working directory
	(which can happen with an automounter, sigh).

	* src/Makefile.am ($(SCRIPTS)): Don't depend on Makefile;
	this causes Solaris 8 'make' to refuse to build "groups".
	(localedir.h): Don't depend on Makefile: this causes Solaris
	8 'make' to build localedir.h unnecessarily.  The dependence
	on Makefile is ineffective anyway, since $(localedir) might
	change even if Makefile hasn't.

	* src/remove.c (remove_dir): If we can't save the state of the
	working directory, pretend we started from "/", not ".".
	This avoids a bug on hosts like Solaris that don't let you
	remove the working directory.

2004-07-27  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/printf.c (strtiomax, strtoumax): Declare if not already
	declared: this fixes a portability bug with Solaris 8 + GCC.
	(STRTOX): Parenthesize use of macro arg as expression.
	(vstrtoimax, vstrtoumax, vstrtold): Remove now-unnecessary
	parentheses.
	* configure.ac: Check for declaration of strtoumax, for
	src/printf.c.

	* src/Makefile.am (cp_LDADD, ginstall_LDADD, mv_LDADD,
	pathchk_LDADD, rm_LDADD, test_LDADD): New vars, for eaccess.

	* tests/readlink/can-e: Don't assume that we can remove the
	working directory: this isn't possible under Solaris 8, say.
	* tests/readlink/can-f: Likewise.
	* tests/readlink/can-m: Likewise.

	* src/copy.c (copy_internal): find_backup_file_name no longer
	returns NULL, so don't bother to check for this.
	* src/cp.c (do_copy): Likewise.
	* src/ln.c (do_link): Likewise.

2004-07-25  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/nice.c (GET_NICE_VALUE): Renamed from GET_PRIORITY.
	All uses changed.
	(NZERO): New macro, if system doesn't define it already.
	(usage): Distinguish priorities from nice values.
	Don't assume NZERO is 20.
	(main): Use bool instead of int where appropriate.
	If user specifies an adjustment out of range, always truncate it
	to an inrange value instead of sometimes giving an error message
	and sometimes not.
	Do not assume that -1 is an error return from "nice" or
	"getpriority", as it might be the current nice value minus NZERO.
	If nice/setpriority fails with errno == EPERM, go ahead and run
	the command anyway; POSIX requires this.

	* src/pathchk.c: Include euidaccess.h.
	(dir_ok): Use euidaccess, not access.
	* src/test.c (R_OK, W_OK, X_OK, FOK): Remove; system.h defines them.
	(eaccess): Remove.  All users changed to use euidaccess instead.

2004-07-24  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uptime.c (print_uptime) [defined BOOT_MSG]:
	Don't assume ut_line is null-terminated.
	* src/who.c (print_line): New arguments USERLEN and LINELEN,
	since USER and LINE might not be null terminated.  All callers
	changed.

2004-07-23  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug with "tail -f" reported by Rob Holland in
	<http://lists.gnu.org/archive/html/bug-coreutils/2004-07/msg00054.html>.
	Also, remove the undocumented and unsupported-since-2000
	--max-consecutive-size-changes options.  Fix another related bug:
	"tail" got confused if stdin, stdout, or stderr were closed.
	Also, use output buffering even with "tail -f".

	* NEWS: Document this, plus yesterday's patch.
	* doc/coreutils.texi (tail invocation): "size has remained the same"
	-> "file has not changed", which is more accurate for fifos.
	* src/tail.c: Include fcntl-safer.h.
	(COPY_TO_EOF): Set to UINTMAX_MAX, not OFF_T_MAX (which was wrong).
	(COPY_A_BUFFER): New macro.
	(struct File_spec): New members mtime, mode, blocking.
	Remove member n_consecutive_size_changes.
	(DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES,
	max_n_consecutive_size_changes_between_opens,
	MAX_CONSECUTIVE_SIZE_CHANGES_OPTION): Remove.
	(long_options, tail_forever, parse_options):
	Remove (non-)support for --max-consecutive-size-changes.
	(record_open_fd): New function.
	(recheck, tail_file): Use it.  Don't assume that stdin is open.
	(dump_remainder): Add support for new COPY_A_BUFFER special value.
	Treat errno==EAGAIN like EOF, since it might be a nonblocking read.
	(recheck): New arg BLOCKING, specifying whether to use blocking reads.
	All uses changed.
	(n_live_files): Remove, replacing with...
	(any_live_files): New function.  All uses changed.
	(tail_forever): Use nonblocking I/O unless we know that blocking I/O
	is safe; this avoids some hangs when reading from a fifo.
	Avoid invoking fstat or sleep when using blocking I/O.
	Do not check for changes to size if the file is not a regular file,
	as the size is undefined in that case.
	Check for changes to mtime or mode, too; this works for non-regular
	files.
	(tail_forever, main): Redo fflush strategy to work even when input
	is nonblocking.  Don't use unbuffered output; just flush when needed.

2004-07-22  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/tail.c (main): Ignore -f if no file operand is specified
	and standard input is a pipe.
	* doc/coreutils.texi (tail invocation): Do not ignore -f for
	all pipes, just for when standard input is a pipe and no
	file operand is specified.
	* tests/tail/Test.pm: Reinstate f-1 test, since we now pass.
	Add a new commented-out f-2 test, which we still fail.
	(test_vector): All f-* tests are special cases, not just f-1.

2004-07-12  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uptime.c: Include c-strtod.h.
	(print_uptime): Use c_strtod instead of setlocale and sscanf.
	Use long int rather than int to count days (for 64-bit hosts),
	and check for arithmetic overflow when converting double to time_t.

2004-07-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/printf.c (vstrtold): Renamed from vstrtod.
	Now returns long double.  All uses changed.
	(print_direc): Use "L" length modifier when printing floating point
	numbers, since we're now printing long double.

2004-07-06  Paul Eggert  <eggert@@cs.ucla.edu>

	* Version 5.3.0.

	printf cleanup, to avoid undefined behavior, to add support for
	formats that Bash supports, and to support wide integers like
	Bash does.

	* NEWS: Document this.
	* src/printf.c (UNSPECIFIED): Remove.  All uses now replaced by
	booleans, so that we don't reserve any values for precision or
	width (like Bash).
	(STRTOX): Use prototype, not K&R-style definition.
	(vstrtoimax): Renamed from xstrtol (to avoid confusion with xstrtol
	in ../lib), with type change to intmax_t.
	All uses changed.
	(vstrtoumax): Renamed from xstrtoul, with type change to uintmax_t.
	All uses changed.
	(vstrtod): Renamed from xstrtod.  All uses changed.
	(print_direc): Use boolean arg instead of special value to indicate
	a missing precision or width.  LENGTH no longer includes
	length modifiers or conversion character.  New arg CONVERSION
	now specifies conversion character.
	Use intmax_t-width formatting for integers (like Bash).
	Add support for C99 %a, %A, %F (like Bash).
	Add support for field width with %c (POSIX requires this).
	Add a FIXME for lack of support for field width and precision
	for %b.
	Add support for '\'', '0' flags.
	Check for invalid combinations of flags, field width, precision,
	and conversion, to prevent use of undefined behavior.
	Allow multiple length modifiers, for formats like "%lld" (like Bash).
	Add support for C99 'j', 't', 'z' length modifiers (like Bash).
	In error message, output entire invalid conversion specification,
	instead of merely outputting % followed by the conversion char.
	* tests/misc/printf: Add tests for the above.

2004-04-03  Dmitry V. Levin  <ldv@@altlinux.org>

	Change "readlink -f" to be more compatible with prior implementations.
	Add more canonicalize options, -e and -m.
	Add comprehensive tests for all readlink modes.

	* m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
	Do not add canonicalize.c here.

	* src/readlink.c (longopts): Add new options.
	(usage): Document them.
	(canonicalize_fname): New proxy function.
	(main): Handle new options.
	* doc/coreutils.texi (readlink invocation): Document new
	"readlink -f" behaviour and new canonicalize options, -e and -m.

	* configure.ac (AC_CONFIG_FILES): Add tests/readlink/Makefile.
	* tests/Makefile.am (SUBDIRS): Add readlink.
	* tests/readlink/Makefile.am: New file.
	* tests/readlink/{rl-1,can-e,can-f,can-m}: New readlink tests.
	* tests/misc/Makefile.am (TESTS): Remove basic readlink test.
	* tests/misc/readlink: Remove file.

2004-07-04  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (copy_internal): Add a FIXME comment.

2004-07-02  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/copy.c (copy_dir): Assume path_concat returns non-NULL.
	* src/cp.c (do_copy): Likewise.
	* src/mv.c (movefile): Likewise.

	* src/cp.c (make_path_private): 2nd arg is now size_t, not int,
	to avoid problem when path_concat dir name is longer than 2 GiB (!).

	* src/nohup.c (main): Don't pass NULL first argument to path_concat.
	This cleans up the semantics a bit, as we no longer try to open the
	same file twice.

2004-07-01  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Add short names -t and -T for --target-directory
	and --no-target-directory options, respectively.

	* src/cp.c (NO_TARGET_DIRECTORY_OPTION, TARGET_DIRECTORY_OPTION):
	Remove.  All uses changed to 'T' and 't', respectively.
	* src/install.c, src/ln.c, src/mv.c: Likewise.

	* src/cp.c (long_opts, usage, do_copy, main): Add -t and -T as
	aliases for --target-directory and --no-target-directory,
	respectively.
	* src/install.c (long_options, main, usage): Likewise.
	* src/ln.c, src/mv.c: Likewise.

2004-07-01  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_file_system): New target.
	(syntax-check-rules): Add it.
	.x-sc_file_system: New file.
	* Makefile.am (EXTRA_DIST): Add it.

	* man/sync.x: Use "file system" rather than "filesystem".
	* man/stat.x, man/df.x: Likewise.

2004-06-30  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/df.c (usage, main): Output "file system" rather than
	"filesystem".
	* src/du.c (usage): Likewise.
	* src/shred.c (usage): Likewise.
	* src/stat.c (usage): Likewise.
	* src/stat.c (long_options, usage): Rename "--filesystem" to
	"--file-system".  But keep the old name around, for compatibility
	reasons.

2004-06-29  Paul Eggert  <eggert@@cs.ucla.edu>

	Add support for --no-target-directory option.

	* NEWS: Document it.
	* doc/coreutils.texi (Common options, Target directory, cp
	invocation, install invocation, mv invocation, ln invocation):
	Likewise.
	(link invocation): Explain how to rewrite link using ln now
	that we have --no-target-directory.
	(ln invocation): Explain that --no-target-directory subsumes
	--no-dereference.
	(unlink invocation): Modify wording to match new wording in
	link invocation.

	* src/cp.c (NO_TARGET_DIRECTORY_OPTION): New constant.
	(long_opts, usage, do_copy, main): Add support for
	--no-target-directory,
	* src/install.c (NO_TARGET_DIRECTORY_OPTION, long_options, main,
	usage): Likewise.
	* src/ln.c (NO_TARGET_DIRECTORY_OPTION, long_options, usage,
	main): Likewise.
	* src/mv.c (NO_TARGET_DIRECTORY_OPTION, long_options, usage,
	main): Likewise.
	* src/mv.c (enum): Sort values.

2004-06-29  Jim Meyering  <jim@@meyering.net>

	Don't let verbose-mode output from a subshell obscure actual differences.
	* tests/rm/inaccessible: Turn off command-echoing just before
	invoking subshell, then turn it back on if VERBOSE=yes afterward.

2004-06-25  Paul Eggert  <eggert@@cs.ucla.edu>

	Add support for 'install --target-directory', an option
	that has been documented for years but not implemented (!).
	* doc/coreutils.texi (install invocation): Document
	--target-directory in synopsis, too.
	* src/install.c (TARGET_DIRECTORY_OPTION): New var.
	(long_options, main, usage): Add --target-directory.
	(target_directory_operand): New function, stolen from mv.c.
	(main): Use it.  Check for -d and --target-directory.
	Alter wording of diagnostics to match other programs.

2004-06-28  Jim Meyering  <jim@@meyering.net>

	* src/cp.c (usage): Fix copy+paste error in description of
	--target-directory: s/move/copy/.  From Paul Jarc.

2004-06-27  Paul Eggert  <eggert@@cs.ucla.edu>

	Use more-consistent rules among cp, ln, and mv when dealing with
	last operands that are (or look like) directories.

	* src/cp.c (target_directory_operand): New, nearly-common function,
	It reports an error if the destination appears to be a directory
	(e.g., because it has a trailing slash) but is not.
	* src/ln.c, src/mv.c: Likewise.
	* src/cp.c (do_copy): Use it.
	* src/ln.c (main): Likewise.
	* src/mv.c (main): Likewise.

	* src/cp.c (do_copy): Don't assume argc is positive.
	Don't bother to lstat dest, since copy() will do that for us.
	Use "const" to avoid the need for cast.

	* src/cp.c (do_copy): Don't output a usage message because of file
	problems (e.g., an operand is not a directory).  Use it only for
	syntax.  Standardize on "target %s is not a directory" for the
	diagnostic.
	* src/ln.c (main): Likewise.
	* src/mv.c (main): Likewise.

	* src/cp.c (do_copy): Remove test for trailing slash, since
	target_directory_operand now does this.
	* src/ln.c (main): Likewise.
	* src/mv.c (movefile): Likewise.

	* src/cp.c (main): Reject multiple target directories.
	Check whether a specified target is a directory when parsing the
	options, using stat.  This gives more-accurate diagnostics.
	* src/ln.c (main): Likewise.

	* src/ln.c (isdir): Remove decl; no longer needed.
	* src/mv.c (isdir, lstat): Likewise.

	* src/ln.c (do_link): New arg dest_is_dir.  All uses changed.
	Don't check the destination ourself; rely on dest_is_dir.
	This way we can avoid lstatting the destination in the
	usual case, and in the worst case we lstat 1, not 3 times.
	Don't bother to unlink unless link failed; this saves a syscall.
	Remove unnecessary backup_succeeded flag;
	it was identical to "dest_backup != NULL".

	* src/ln.c (main): Use int to count to argc, not unsigned int.
	This handles negative operand counts.
	* src/mv.c (main): Likewise.

	* src/mv.c (do_move): Don't call hash_init; expect the caller to
	do it, for consistency with cp.c and ln.c.  All callers changed.
	(movefile): dest_is_dir parameter is now bool, not int.
	(main): Standardize on "missing destination file operand after %s"
	for the diagnostic, for consistency with cp.c.

	* tests/mv/diag: Don't assume "mv --target=nonexistentdir"
	will complain about the arg count.
	Adjust to new (briefer) diagnostics.
	* tests/cp/fail-perm: Add a test to verify that we get the new
	diagnostic when failing to copy through a symlink-to-inaccessible-dir.

2004-06-27  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix a bug: formerly, if d/x was a directory and x a file, "ln x
	d/" incorrectly created a link d/x/x.  It also saves some system
	calls.

	* NEWS: Document the fix.

	* src/ln.c (main): Don't append basename to dest if this
	results in an existing directory name.
	* tests/ln/misc: See whether a trailing slash is followed too far.

2004-06-26  Jim Meyering  <jim@@meyering.net>

	* src/printf.c (main): When given no arguments, print the standard
	"missing operand\nTry printf --help..." message -- to be consistent.

2004-06-26  Jim Meyering  <jim@@meyering.net>

	* src/mknod.c (main): Add \n at the end of message output via fprintf.

2004-06-25  Jim Meyering  <jim@@meyering.net>

	* tests/ln/misc: Add test for ln subscript error.

2004-06-23  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/ln.c (do_link): Remove unnecessary call to lstat.
	(main): Avoid subscript error when the destination is "".

2004-06-23  Jim Meyering  <jim@@meyering.net>

	* tests/*: Replace all occurrences of `(exit N); exit' with
	`(exit N); exit N'.  Otherwise, those many tests could exit with
	improper exit status when exiting via e.g., a trapped interrupt.
	Thanks to a report from Bob Proulx.

2004-06-22  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (idle_string, print_user): New arg boottime,
	specifying the most recent boot time.  All uses changed.
	(idle_string) Consider a line to be "old" if it hasn't been used
	since the last boot time.  Watch out for overflow when computing
	times, and for times in the future.
	(idle_string): Record latest boot time.

2004-06-22  Jim Meyering  <jim@@meyering.net>

	* src/test.c (usage): Correct description of `-t FD'.  The file
	descriptor, FD, is no longer optional.  Reported by Ton Nijkes.

2004-06-21  Paul Eggert  <eggert@@cs.ucla.edu>

	The 2004-06-19 fix for who and pinky was incomplete, as ctime
	has undefined behavior if the year precedes -999 or follows 9999.
	Since we have to stop using ctime anyway, we might as well use
	strftime and fix the FIXME, and support internationalized dates.

	* NEWS: Document the new behavior.
	* src/who.c: Include "hard-locale.h".
	(time_format, time_format_width): New vars.
	(time_string, print_line): Use them.
	(main): Set them.
	(time_string): Use localtime + strftime instead of
	ctime, to avoid problems with years before -999 or after 9999.
	* src/pinky.c: Likewise.

2004-06-21  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug: GNU 'ls' didn't count columns correctly if user or group
	names contained multibyte characters where the column count
	differed from the byte count.  This patch also corrects
	some comments.

	* src/ls.c (format_user_or_group): New function, which counts
	columns correctly.
	(format_user, format_group): Use it.
	(format_user_or_group_width): New function, which counts columns
	correctly.
	(format_user_width, format_group_width): Use it.

2004-06-21  Jim Meyering  <jim@@meyering.net>

	* tests/priv-check: Quote "$PATH" in PATH=$PATH.
	Suggestion from Andreas Schwab.

	* tests/priv-check: When running as root, be sure to propagate
	PATH through to the process we exec as non-root.
	Reported by michael@@aplatform.com.

	* src/mknod.c (main): Don't segfault when calculating the
	expected number of operands for `mknod NAME'.

2004-06-20  Jim Meyering  <jim@@meyering.net>

	* src/dd.c (input_seek_errno): Declare file-scoped variable as static.

2004-06-20  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/basename.c (main):
	Standardize on the diagnostics given when someone gives
	too few operands ("missing operand after `xxx'") or
	too many operands ("extra operand `xxx'").
	Include "quote.h" and/or "error.h" if it wasn't already being included.
	* src/chgrp.c (main): Likewise.
	* src/chmod.c (main): Likewise.
	* src/chown.c (main): Likewise.
	* src/chroot.c (main): Likewise.
	* src/comm.c (main): Likewise.
	* src/cp.c (do_copy): Likewise.
	* src/csplit.c (main): Likewise.
	* src/date.c (main): Likewise.
	* src/dircolors.c (main): Likewise.
	* src/dirname.c (main): Likewise.
	* src/du.c (main): Likewise.
	* src/expr.c (main): Likewise.
	* src/hostid.c (main): Likewise.
	* src/hostname.c (main): Likewise.
	* src/id.c (main): Likewise.
	* src/install.c (main): Likewise.
	* src/join.c (add_file_name, main): Likewise.
	* src/link.c (main): Likewise.
	* src/ln.c (main): Likewise.
	* src/logname.c (main): Likewise.
	* src/md5sum.c (main): Likewise.
	* src/mkdir.c (main): Likewise.
	* src/mkfifo.c (main): Likewise.
	* src/mknod.c (main): Likewise.
	* src/mv.c (main): Likewise.
	* src/nohup.c (main): Likewise.
	* src/od.c (main): Likewise.
	* src/pathchk.c (main): Likewise.
	* src/ptx.c (main): Likewise.
	* src/readlink.c (main): Likewise.
	* src/rm.c (main): Likewise.
	* src/rmdir.c (main): Likewise.
	* src/seq.c (main): Likewise.
	* src/setuidgid.c (main): Likewise.
	* src/shred.c (main): Likewise.
	* src/sleep.c (main): Likewise.
	* src/sort.c (main): Likewise.
	* src/split.c (main): Likewise.
	* src/stat.c (main): Likewise.
	* src/test.c (beyond, main): Likewise.
	* src/touch.c (main): Likewise.
	* src/tr.c (main): Likewise.
	* src/tsort.c (main): Likewise.
	* src/tty.c (main): Likewise.
	* src/uname.c (main): Likewise.
	* src/uniq.c (main): Likewise.
	* src/unlink.c (main): Likewise.
	* src/uptime.c (main): Likewise.
	* src/users.c (main): Likewise.
	* src/who.c (main): Likewise.
	* src/whoami.c (main): Likewise.

	* tests/basename/basic: Adjust to new diagnostics.
	* tests/du/files0-from: Likewise.
	* tests/expr/basic: Likewise.
	* tests/mv/diag: Likewise.
	* tests/tsort/basic-1: Likewise.

2004-06-20  Jim Meyering  <jim@@meyering.net>

	* src/ln.c: Remove declaration of yesno.
	Instead, include yesno.h.
	* src/copy.c: Likewise.

	* src/remove.c: Remove declaration of yesno.
	Instead, include yesno.h.
	(top_dir): Remove now-unnecessary cast of obstack_base.
	(pop_dir): Likewise.
	(full_filename_): Likewise.

2004-06-19  Paul Eggert  <eggert@@cs.ucla.edu>

	Don't dump core if ctime returns NULL; this is possible on
	hosts with 64-bit time_t and 32-bit int.
	* src/who.c: Include "inttostr.h".
	(time_string): If ctime fails, print the raw time as an integer
	instead of dumping core.
	* src/pinky.c: Likewise, as follows:
	Include "inttostr.h".
	(time_string): New function, copied from who.c.
	(print_entry): Use it.

2004-06-19  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (print_line): Don't truncate user names at 8 bytes.
	Problem reported by Guido Leenders in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00056.html
	* NEWS: document this.

2004-06-19  Jim Meyering  <jim@@meyering.net>

	* src/system.h (case_GETOPT_VERSION_CHAR): Switch back to
	using GNU_PACKAGE (from PACKAGE) once again.  This restores
	`GNU' to the parenthesized package name in --version output.
	Before, the first argument from AC_INIT, `GNU coreutils', would
	be propagated to the PACKAGE variable.	Now, `GNU ' is trimmed.
	Reported by Richard Stallman.

2004-06-17  Jim Meyering  <jim@@meyering.net>

	* src/tr.c (to_uchar): Rename function from `uchar'.  The latter
	would clash with a typedef in Tru64's <sys/types.h>.  From Albert Chin.

2004-06-15  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Remove more special cases for POSIXLY_CORRECT when POSIX
	allows the GNU behavior.  "--" is now supported by chroot, hostid,
	hosname, pwd, sync, yes.
	* doc/coreutils.texi (yes invocation, false invocation,
	true invocation): Document this.
	* src/chroot.c (main): Handle "--".
	* src/hostid.c (main): Likewise.
	* src/hostname.c (main): Likewise.
	* src/pwd.c (main): Likewise.
	* src/sync.c (main): Likewise.
	* src/yes.c (main): Likewise.
	* src/true.c (main): Recognize --help and --version even if
	POSIXLY_CORRECT is set.
	* src/yes.c (main): Likewise.

2004-06-09  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Remove special cases for POSIXLY_CORRECT when POSIX allows
	the GNU behavior.
	* doc/coreutils.texi (pr invocation, unlink invocation): Document this.
	* src/ls.c (decode_switches): Pay attention to TABSIZE even if
	POSIXLY_CORRECT is set.  POSIX reserves upper-case environment
	variables to the implementation, so it's OK for ls to depend on
	TABSIZE.
	* src/pr.c: Include "hard-locale.h".
	(main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since
	POSIX specifies the behavior only in the POSIX locale.
	* src/printf.c (print_esc): Support \x, \u, \U even if POSIXLY_CORRECT,
	since POSIX says the behavior is unspecified here.
	* src/tail.c (parse_obsolescent_option): Support multiple file operands
	even if POSIXLY_CORRECT, since POSIX does not require a diagnostic.
	* src/printf.c (main): Recognize --help, --version even if
	POSIXLY_CORRECT.  POSIX does not specify any options, but it
	does not prohibit options either, so "printf" is like "expr" here.
	* src/unlink.c (main): Likewise.
	* tests/misc/printf: Adjust to the new semantics for \x if
	POSIXLY_CORRECT.

2004-06-14  Jim Meyering  <jim@@meyering.net>

	* tests/misc/pwd: New test, for fix of 2004-04-19.
	* tests/misc/Makefile.am (TESTS): Add pwd.
	(BUILD_SRC_DIR): Define BUILD_SRC_DIR.

	* src/copy.c: Remove declaration of euidaccess.
	Instead, include "euidaccess.h".

2004-06-13  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (PIDSTR_DECL_AND_INIT): Don't assume pid_t fits in int.
	(UT_ID) [!HAVE_STRUCT_XTMP_UT_ID]: Remove bogus comment,
	as (sizeof "??") reliably returns 3.
	(print_line): Guard against idle and pid being too long
	(which is possible when printing headers).
	(print_user): Allocate enough bytes for idlestr.  Use IDLESTR_LEN.
	Avoid unnecessary cast of sizeof to int.
	(make_id_equals_comment): Do not assume that UT_ID returns
	a string; it might return a non-null-terminated array.
	Use strncat instead.  It's not very often where strncat is
	exactly what you want, but this is one of those rare cases.

2004-06-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (list_entries_who): Don't output a trailing space.

2004-06-09  Jim Meyering  <jim@@meyering.net>

	* src/touch.c (usage): Improve wording in description of the
	--time=WORD option.  Reported by Dan Jacobson.

	* src/chown-core.c (change_file_owner): Change names of parameters
	old_uid and old_gid to required_uid and required_gid respectively.

	* src/chmod.c (mode_changed): Return false, not 0, now that the
	function returns `bool'.

2004-06-08  Paul Eggert  <eggert@@cs.ucla.edu>

	Adjust chmod and chown to be similar if -c or -v are given.  In
	particular, a no-op chown is no longer reported as a change; this
	reverts to previous behavior.  Also, fix both commands so that -v
	report failures even if the failure is not due to the chmod or
	chown syscalls.

	* src/chmod.c (CH_NOT_APPLIED): New constant.
	(describe_change): Handle it.
	(process_file): Use it, if a symlink wasn't changed.
	(mode_changed): Return bool, not int.  Accept new argument
	NEW_MODE; all callers changed.  This lets us avoid statting the
	file unless the new mode has unusual bits.
	(process_file): Return -1 on error.  With -v, report all errors
	verbosely, not just some.

	* src/chown-core.c (change_file_owner): Return -1 on error, not
	1 sometimes and -1 on others.  Our caller ORs together our results,
	and (-1 | 1) == 0 on ones-complement hosts.
	With -v report all errors verbosely, not just some.
	Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent:
	file_stats wasn't set properly in that case.

	* tests/chgrp/basic: Adjust to above changes.

2004-05-20  Paul Eggert  <eggert@@cs.ucla.edu>

	* tests/chgrp/basic: Test that chgrp -h does not fail on
	symlinks, even on hosts where that's not supported.
	Test that if -R is specified without -H or L, -h is assumed.
	Test that chown() is not optimized away.

2004-05-18  Paul Eggert  <eggert@@cs.ucla.edu>

	Several fixes to chgrp and chown for compatibility with POSIX and BSD:

	  Check for incompatible options.  When -R and --dereference are
	  both used, then either -H or -L must also be used.  When -R and -h
	  are both used, then -P must be in effect.

	  -H, -L, and -P have no effect unless -R is also specified.
	  If -P and -R are both specified, -h is assumed.

	  Do not optimize away the chown() system call when the file's owner
	  and group already have the desired value.  This optimization was
	  incorrect, as it failed to updated the last-changed time and reset
	  special permission bits, as POSIX requires.

	  Do not report an error if the owner or group of a
	  recursively-encountered symbolic link cannot be updated because
	  the file system does not support it.

	* NEWS: Document the above.

	* src/chgrp.c (main): Check for incompatible options.  -R --dereference
	requires either -H or -L, and -R -h requires -P.  If -H, specify
	FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster.  Make this
	file as much like chown.c as possible.
	* src/chown.c (main): Likewise.

	* src/chown-core.c (change_file_owner): Use ent->fts_statp only if
	needed.  Chown a directory only after chowning its children; this
	avoids problems if the new directory ownership doesn't permit
	access to the children.  Dereference symlinks before doing
	ROOT_DEV_INO_CHECK, not after, so that we catch symlinks to /.
	Do not optimize away the chown() system call when the file's owner
	and group already have the desired value.  POSIX does not permit
	this optimization.  Rely on chown and lchown to do the right
	thing with symlinks and/or -1 arguments, now that we have wrappers
	to do this.  Use ENOTSUPP not ENOSYS, and ignore all ENOTSUPP
	errors, not just command-line errors.
	(chown_files): Pass FTS_NOSTAT to xfts_open if we don't need file status.

	* src/system.h (ENOTSUP): Remove.

	* tests/chgrp/basic: Use chown --from to discover whether the
	group changed, since chgrp now changes unconditionally.  This
	complicates the sed script a bit.  Do not specify --dereference,
	since it's the default (and we want to test this).  Adjust output
	to match the fact that chgrp no longer optimizes the case of
	changing a file's group to the same value as before.
	* tests/chgrp/posix-H: Do not attempt to combine -h and -H; these
	options are incompatible, and their behavior is undefined with POSIX.
	(changed, not_changed): Adjust to match the fact that -h is no longer
	specified.  Sort names.
	* tests/chown/deref: Adjust error-diagnostic spelling to match new
	behavior.

2004-06-07  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uname.c (main): Fix typo introduced on 2003-05-10 that
	prevented a diagnostic of any operands.

2004-06-08  Jim Meyering  <jim@@meyering.net>

	* src/shred.c (direct_mode): Turn it on/off with directio, too.

2004-06-07  Jim Meyering  <jim@@meyering.net>

	Enable direct-mode I/O (bypassing the buffer cache), if possible.
	Prompted by a suggestion from Kalle Olavi Niemitalo
	in http://bugs.debian.org/207035.
	* src/shred.c (direct_mode): New function.
	(do_wipefd): Turn on direct-mode I/O.
	(dopass): If a file's first write fails with EINVAL,
	turn off direct-mode I/O and retry the write.

2004-06-05  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/tr.c (main): "tr -d a b" is now a fatal error even if
	POSIXLY_CORRECT is set.  The POSIX SYNOPSIS does not allow this
	option combination.

2004-06-04  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (dopass): Don't subtract 1 from the offset after
	a write error.  Problem reported by Jon Peatfield in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html

2004-06-02  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug reported by Buciuman Adrian in
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00105.html>
	where 'dd' created a file that was too large.  The bug was that dd
	assumed that the input file offset does not advance after a failed
	read; but POSIX says that the input file offset is undefined after
	a failed read.

	* src/dd.c (MAX_BLOCKSIZE): New macro.
	(input_seekable, input_seek_errno, input_offset,
	input_offset_overflow): New vars.
	(scanargs): Reject block sizes greater than MAX_BLOCKSIZE.
	(advance_input_offset): New function.
	(skip_via_lseek): Set errno to zero when reporting our failure,
	so that we don't report based on garbage errno.
	(skip): If fdesc is standard input, advance the input offset.
	Do not quit if reading, and if noerror was specified;
	POSIX seems to require this.
	If read fails on output file, report the earlier lseek failure
	instead; this fixes a FIXME in dd_copy.
	(advance_input_after_read_error): New function.
	(dd_copy): Use it, instead of assuming that failed reads
	do not advance the file pointer.  Advance input offset
	after nonfailed reads.  Advance only a partial block if
	the previous read (before the failed read) succeeded, and
	do not generate an output block of zeros in this case.
	(main): Determine initial input offset, seekability of input,
	and error if it wasn't seekable.

2004-06-02  Jim Meyering  <jim@@meyering.net>

	rm (without -f) could hang unnecessarily when attempting to
	remove a symlink to a file on an off-line NFS-mounted partition.
	Reported by David Howells in https://bugzilla.redhat.com/124699.
	* src/remove.c (write_protected_non_symlink): New function.
	Don't invoke euidaccess on symlinks.
	(prompt): Use write_protected_non_symlink rather than using
	euidaccess directly, being careful not to call lstat twice for a file.

	Fix a bug in how the --output-delimiter=D option works with
	abutting byte or character ranges.  Reported by David Krider in
	http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00132.html
	* src/cut.c (print_kth): Remove special case for open-ended range.
	(set_fields): Record the range start index for an interval even
	when it abuts another interval on its low side.
	Also record the range start index of the longest right-open-interval.
	* tests/cut/Test.pm: Add tests of --output-delimiter=S with
	abutting and overlapping byte ranges.

2004-06-01  Paul Eggert  <eggert@@cs.ucla.edu>

	Some POSIX-conformance cleanups for tr.

	* src/tr.c (posix_pedantic): Remove; no longer needed since
	we need to test this in just one place now.
	(usage): Mention -C.
	(unquote): Note that \055, \n, etc are escaped.
	Do not worry about POSIXLY_CORRECT when warning about ambiguous
	escape sequences.
	\ at end of string stands for itself.
	Do not diagnose invalid backslash escapes: POSIX says the behavior
	is unspecified in this case, so we don't need to diagnose it.
	(main): Add support for -C (currently an alias for -c).
	Do not diagnose 'tr [:upper:] [:upper:], as POSIX does not require
	a diagnostic here.
	* tests/tr/Test.pm: New tests bs-055, bs-at-end, repeat-Compl.
	Fix comment for range-a-a.

2004-05-25  Paul Eggert  <eggert@@cs.ucla.edu>

	Improve the efficiency (and in one case, correctness) of code
	that reads symlinks.

	* src/copy.c (copy_internal): Don't use alloca, as it can mess up
	royally if the link length is long (e.g., GNU/Hurd).  Use
	xreadlink instead, it's safer.  Don't bother to read the link if
	it's the wrong size.  Add a FIXME because this area is a bit murky
	and undocumented.
	* src/ls.c (get_link_name): Update use of xreadlink.
	* src/readlink.c (main): Likewise.
	* src/stat.c (print_stat): Likewise.

2004-06-01  Jim Meyering  <jim@@meyering.net>

	* src/env.c (main): Prefer the notation `STREQ (a, b)'
	over `!strcmp (a, b)'.
	* src/sort.c (main, sort_buffer_size): Prefer the notation
	`STREQ (a, b)' over `strcmp (a, b) == 0'.
	* src/date.c (batch_convert): Likewise.
	* src/expr.c (nextarg): Likewise.
	* src/su.c (correct_password, restricted_shell, main): Likewise.
	* src/ptx.c (swallow_file_in_memory, main): Likewise.
	* src/test.c (binary_operator, and, or, main): Likewise.

2004-05-13  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: echo compatibility cleanup.
	* doc/coreutils.texi (echo invocation): Document the changes.
	* src/echo.c (V9_ECHO): Remove; always enabled.
	(DEFAULT_ECHO_TO_XPG): Renamed from V9_DEFAULT, so that
	we use the same naming convention as bash.  Now an enum,
	not a macro.
	(usage): Reword to mention -e/-E more accurately.
	Mention \0NNN (the POSIX syntax) rather than \NNN (nonstandard).
	(hextobin): New function.
	(main): Use bool rather than int for local vars when appropriate.
	Do not allow options if POSIXLY_CORRECT, unless we are using
	BSD semantics and the first argument is "-n".
	Don't pass unnecessary extra arg to parse_long_options.
	do_v9 now defaults to DEFAULT_ECHO_TO_XPG, not to allow_options.
	Do not look for options if !allow_options.
	Use size_t rather than int when appropriate.
	Open-code option test rather than using strrchr.
	Use faster test for "-".
	Avoid redundant argc test.
	Add support for \x, for Bash compatibility.
	Use e.g. '\a' rather than '\007', for portability to EBCDIC hosts.
	When '\c' is encountered, stop printing immediately, as POSIX
	requires.
	Add support for \xhh syntax.
	Add support for \0ooo syntax; POSIX requires this.

2004-06-01  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.8b.  Regenerate dependent files.

2004-05-31  Jim Meyering  <jim@@meyering.net>

	* tests/Makefile.am.in (TESTS_ENVIRONMENT): Define PATH to include
	the build src/ directory -- at the front.
	($(srcdir)/$x-tests): Depend on Makefile.am.
	Use $x as the program name, except when it would be `test' (test is
	the sole program tested via mk-script that is also a shell built-in).
	In that case, use the old ../../src/$x.

2004-05-30  Jim Meyering  <jim@@meyering.net>

	Work around HPUX /bin/cc compiler bug that is exposed, now that
	sets are arrays of type `bool'.  More details here:
	http://lists.gnu.org/archive/html/bug-gnulib/2004-05/msg00094.html
	FIXME: verify that the above URL points to the right message

	* src/tr.c (card_of_complement): Use cleaner `sizeof in_set'
	rather than `N_CHARS * sizeof(in_set[0])'.  Using HPUX's /bin/cc
	(aC++/ANSI C B3910B A.05.55 [Dec 04 2003]) on an ia64-hp-hpux11.22
	system, those two expressions are not the same (256 vs. 1024).
	The effect of this problem was that `tr -c x y' would fail:
	tr: when not truncating set1, string2 must be non-empty
	(set_initialize): Remove unnecessary initialization of the `in_set'
	buffer; that initialization triggered the same compiler bug as above.

2004-05-29  Paul Eggert  <eggert@@cs.ucla.edu>

	tr cleanup, mostly having to do with integer type ranges.
	Remove all casts.

	* tests/tr/Test.pm: Add a few tests for the below.  Alas, most of
	the test cases wouldn't be portable, or would take too much CPU
	time, or both.

	* src/tr.c (N_CHARS, N_CHAR_CLASSES): Now an enum, not a macro.
	This is safe since the code already assumes N_CHARS fits in int.
	(Filter): Remove: we want to prototype everything.
	(ORD, CHR): Remove.  All uses removed.  Some replaced with:
	(uchar): New function.  All places where a char must be converted
	to an unsigned char are now done this way, not by ad-hoc methods.
	(count): New type.  Use it whenever counts or states are needed.
	(BEGIN_STATE): Increase from INT_MAX - 1 (which was bogus, anyway,
	since we used it in an unsigned int context) to UINTMAX_MAX - 1.
	(REPEAT_COUNT_MAXIMUM): New macro.  Use it in place of BEGIN_STATE
	whenever appropriate.
	(NOT_A_CHAR): Remove global macro; now a local enum.
	(UL_LOWER, UL_UPPER, UL_NONE): No longer specify values, since
	the rest of the code no longer depends on them.
	(class_ok): Remove; all uses changed to use inline comparisons.
	(RE_NO_TYPE): Remove; wasn't used or needed.
	(struct List_element): normal_char and equiv_code are now unsigned
	char, not int.
	first_char, last_char, and the_repeated_char are now unsigned char,
	not unsigned int.  repeat_count is now count, not size_t.
	All uses changed.
	(struct Spec_list): state is now count, not unsigned int.
	lengthis now count, not size_t.
	n_indefinite_repeats is now size_t, not int.
	has_equiv_class, has_char_class, and has_restricted_char_class
	are now bool, not int.  All uses changed.
	(struct E_string): s is now char *, not unsigned char *.
	escaped is now bool *, not int *.  All uses changed.
	(ES_MATCH): Remove macro, replacing with:
	(es_match): New inline function.  All uses changed.
	(squeeze_repeats, complement, posix_pedantic, truncate_set1,
	translating): Now bool, not int.
	(io_buf): Now char array, not unsigned char.
	(SET_TYPE): Remove.  All uses replaced with bool.
	(is_equiv_class_member, unquote, append_range, append_char_class,
	append_equiv_class, find_closing_delim, star_digits_closebracket,
	build_spec_list, parse_str, homogeneous_spec_list):
	Now returns bool, not int.  All uses changed.
	(is_equiv_class_member): Now inline.
	(is_equiv_class_member, is_char_class_member, make_printable_str,
	append_normal_char, append_range, append_repeated_char,
	get_s2_spec_stats):
	Args are now of proper integer type.
	(unquote, look_up_char_class, make_printable_str,
	append_equiv_class, build_spec_list, squeeze_filter):
	Avoid unsigned char *p; gently convert *p to unsigned char instead.
	(unquote, get_spec_stats): Do not jump past declarations and then
	use them; C doesn't allow this in portable programs.
	(make_printable_str): Check for overflow in size calculations.
	(xmemdup): Remove.  All uses rewritten.
	(find_bracketed_repeat): Args are now of proper pointer-to-integer
	type.  Do not reject [c*0].  Use xstrtoumax, not xstrtoul.
	(find_bracketed_repeat, star_digits_closebracket): Check that the
	digits are not escaped.
	(build_spec_list): Don't bother to copy opnd_str; not needed.
	(build_spec_list, get_next): Simplify internal logic a bit.
	(card_of_complement): Fix bug due to char overflow.
	(get_spec_stats): Don't assume len fits into int.
	Check for integer overflow.  Use abort() rather than assert(0).
	(string2_extend): Fix subscript error: is_char_class_member (..., 255)
	was being invoked.
	(squeeze_filter): READER is never null now; simplify code.
	READER arg now has a simpler type.  Remove unnecessary casts.
	(squeeze_filter, main): Calls to fwrite improperly checked result
	against zero, rather than against requested size.
	(plain_read): New function.
	(read_and_delete, read_and_xlate):
	Remove unused filter arg, and don't worry about hit_eof.
	Simplify by using plain_read.
	(set_initialize): Args are bool and bool *, not int and SET_TYPE *.
	(main): Always pass a non-null procedure to squeeze_filter.
	Rewrite so that class_ok isn't needed.

2004-05-29  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (dosync): Ignore EBADF errors, as IRIX 6.5
	fdatasync reports EBADF when syncing (unwritable) directories.
	Problem reported by Albert Chin-A-Young in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00165.html

2004-05-29  Jim Meyering  <jim@@meyering.net>

	* tests/chown/deref: Fix typo: use ls -ldo, not ls -ldg.
	Patch from Albert Chin.

	* src/ptx.c (text_buffer_maxend): Remove declaration of unused variable.

	* src/remove.c (push_dir): Merge declaration and adjacent assignment
	into a single statement.

2004-05-28  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (AD_mark_helper): Eliminate an unnecessary comparison.

2004-05-22  Jim Meyering  <jim@@meyering.net>

	rm -r would get a failed assertion when run from an inaccessible
	directory and with two or more command line arguments including an
	absolute-named directory followed by a relative-named directory.

	* src/remove.h (struct rm_options) [require_restore_cwd]: New member.
	* src/remove.c (struct cwd_state): Define.
	(AD_pop_and_chdir): Redesign interface so that a restore_cwd failure
	can be detected by the caller.  Instead of returning a malloc'd
	directory name, communicate it to caller via a new parameter, and
	return an indication of whether restore_cwd failed.  Update caller.
	Eliminate an unnecessary call to AC_stack_top.
	(remove_dir): Change type of cwd_state parameter to `struct cwd_state'
	so we can now communicate to caller whether/how functions like
	restore_cwd have failed.  Update caller.
	(rm_1): Fail if we've failed to restore the working directory
	and the name of the next file to remove is `.'-relative.
	(rm): Fail if the require_restore_cwd flag is true and we've
	failed to restore the working directory.
	* src/mv.c (rm_option_init): Initialize new member,
	x->require_restore_cwd.
	* src/rm.c (rm_option_init): Likewise.

2004-05-21  Jim Meyering  <jim@@meyering.net>

	* tests/rm/inaccessible: New test for the above fix.
	* tests/rm/Makefile.am (TESTS): Add inaccessible.

	* src/remove.c (rm): Use free rather than XFREE.
	(remove_dir): Use xmalloc, not XMALLOC.
	(ds_init): Likewise.

2004-05-20  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_unmarked_diagnostics): Now that the unmarked
	diagnostics in shred.c have been fixed, don't exempt shred.c from
	this check.

	* src/shred.c: Use translatable diagnostics, e.g.
	change "%s: remove" to _("%s: failed to remove") and
	change "%s: close"  to _("%s: failed to close").

2004-05-17  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (names): Bring back lower-case letters, "_", and
	".".  But continue to omit +, =, %, @@, #, as they're either
	shell metacharacters (for some shells) or are not in some
	character sets, or (in the case of '%') must be a
	metacharacter somewhere.

2004-05-16  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/cut.c (cut_fields): Adjust to new signature of getndelim2.

2004-05-17  Jim Meyering  <jim@@meyering.net>

	* src/shred.c (incname): Decrement `len' only once per loop iteration.

	chgrp and chown now dereference symlinks by default, per POSIX.
	Reported by Michal Politowski as http://bugs.debian.org/249177.

	* src/chown-core.c (chopt_init): Affect each symlink referent by default.
	* src/chown.c (usage): Update to reflect this.
	* src/chgrp.c (usage): Likewise.
	* NEWS: Describe the change.
	Adapt tests accordingly.
	* tests/chgrp/basic: Use -h where necessary to retain semantics.
	* tests/chgrp/deref: Likewise.
	* tests/chgrp/posix-H: Likewise.

2004-05-15  Paul Eggert  <eggert@@cs.ucla.edu>

	In shred, check for errors from fdatasync more carefully.  If
	fdatasync fails with errno==EINVAL, it means this implementation
	does not support synchronized I/O for this file.  Do not report
	this as an error, as (for example) AIX 5.2 fdatasync reports it
	for raw disk devices.  Problem reported by Albert Chin in
	<http://mail.gnu.org/archive/html/bug-gnu-utils/2004-05/msg00028.html>.

	Check for write errors, though: the old code ignored them.
	Improve error checking in a few other cases, too (e.g., close of a
	directory).

	Also, change several 'int' values to 'bool', so that the error
	checking is a bit clearer.  Similarly, change unsigned values
	to size_t where appropriate.

	* src/shred.c: Include "dirname.h".
	(datasync) [!HAVE_FDATASYNC]: Remove.
	(dosync): New function.
	(dopass): Use it.  Return 1 on write error, -1 on other error.
	All callers changed.  Report write error if dosync does.
	(do_wipefd, wipefd, wipename, wipefile): Return bool (true/false),
	not int (0/-1).  All callers changed.  Return false if there's a
	write error.
	(incname): Return bool (true/false), not int (0/1).  Accept
	size_t length, not unsigned.  All callers changed.  Do not
	bother checking for non-digits; it can't happen.  Replace
	recursion with iteration.
	(wipename): Use dir_name, base_name, etc. instead of assuming
	Unix file names.  Use size_t for length, not unsigned.
	Report error if unlink or close fails.
	(wipename, main): Use bool for booleans.

	(names): Use only digits and uppercase letters, for greater
	portability.

2004-05-16  Jim Meyering  <jim@@meyering.net>

	* tests/chown/deref: New test for the yesterday's change.
	* tests/chown/Makefile.am (TESTS): Add deref.

2004-05-15  Jim Meyering  <jim@@meyering.net>

	chown --dereference did nothing when the owner/group of a
	symlink matched the desired owner/group.  Reported by David Malone.
	Also reported in 1999 as http://bugs.debian.org/39642.

	* src/chown-core.c (change_file_owner): When --dereference has
	been specified, and when processing a symlink, stat it to get the
	owner and group of the referent.

2004-05-14  Jim Meyering  <jim@@meyering.net>

	* man/pwd.x, man/echo.x, man/printf.x: Fix typo:
	s/supercede/supersede/ reported by Andrew Fabbro.

2004-05-13  Paul Eggert  <eggert@@cs.ucla.edu>

	Improve performance of `sort -m' on large files, at the cost of
	making some contrived examples unsafe.  POSIX allows this
	optimization.  Performance problem reported by Jonathan Baker in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00071.html>.

	* src/sort.c (first_same_file): Do not treat input pipes
	differently from other files.
	* doc/coreutils.texi (sort invocation): Document that "sort -m -o F"
	might write F before reading all the input.
	* NEWS: Likewise.

2004-05-12  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/od.c (print_ascii, dump_strings): Use e.g. '\a' rather than
	'\007', for portability to EBCDIC hosts.
	* src/printf.c (print_esc_char): Likewise.
	* src/tr.c (unquote, make_printable_str): Likewise.

2004-05-12  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (AD_pop_and_chdir): Move lstat-`.' into if-block
	where the result is used.  This avoids one unnecessary lstat call
	per command line argument.

2004-05-12  Paul Eggert  <eggert@@cs.ucla.edu>

	Don't assume that "make -C" works; Solaris "make" doesn't have -C.

	* src/Makefile.am (all_programs.list): New rule, copied from
	man/Makefile.am and tests/Makefile.am, except that we use the
	system tr rather than ./tr and we don't use tr -s.
	* tests/Makefile.am (all_programs): Use it.
	* man/Makefile.am (all_programs): Likewise.  Renamed from programs,
	for consistency.  All uses changed.

2004-05-11  Jim Meyering  <jim@@meyering.net>

	* tests/rm/unread3: New test, for the above fix and today's
	lib/save-cwd.c improvement.
	* tests/rm/Makefile.am (TESTS): Add unread3.

	* src/rm.c: Don't include "save-cwd.h".  It's no longer used.

2004-05-10  Jim Meyering  <jim@@meyering.net>

	* tests/install/trap: New file.  Test for bug fix of 2004-04-18.
	* tests/install/Makefile.am (TESTS): Add trap.

	* src/remove.c (AD_push): Don't use errno in diagnostic about
	`changed dev/ino'.

	Remove these generated files from CVS.
	* tests/cut/cut-tests, tests/date/date-tests, tests/join/join-tests:
	* tests/ls/ls-tests, tests/pr/pr-tests, tests/tac/tac-tests:
	* tests/tail/tail-tests, tests/test/test-tests, tests/tr/range-tests:
	* tests/tr/tr-tests, tests/wc/wc-tests:

2004-05-09  Jim Meyering  <jim@@meyering.net>

	* src/tr.c (unquote): Use xcalloc rather than xmalloc and
	a loop initializing the just-allocated memory to zero.

2004-05-08  Jim Meyering  <jim@@meyering.net>

	* tests/rm/no-give-up: New file; check for today's fix.
	* tests/rm/Makefile.am (TESTS): Add no-give-up.

2004-05-08  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug where "rm" gave up too easily, reported by Dan Jacobsen in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00013.html>.

	* src/remove.c (remove_entry): Check for errno values like ENOENT
	that show the file cannot be directory, instead of for errno
	values like EPERM that show the file might be a directory.  This
	is necessary because, when a single unlink() call has multiple
	reasons to fail, it can set errno to any of those reasons; it's
	only the rare errno value like ENOENT that excludes all the other
	possible reasons to fail even when the file is a directory.
	(remove_cwd_entries): Don't attempt chdir if the file is known
	to not be a directory.
	(remove_dir): Use the same method that remove_cwd_entries uses
	(for some reason they differed).  Don't assert that saved_errno
	must be EPERM; it might be just about anything.

2004-05-06  Jim Meyering  <jim@@meyering.net>

	* src/id.c (xgetgroups): Use xnmalloc, rather than xmalloc.
	Don't add `1' to the buffer size (it was to protect against malloc
	implementations that fail to allocate a buffer of size zero).
	That is no longer necessary, since we use a malloc wrapper
	on such systems.

	* src/wc.c (get_input_fstatus): Use xnmalloc, rather than xmalloc.
	* src/head.c (elide_tail_bytes_pipe): Likewise.
	* src/df.c (main): Likewise.
	* src/shred.c (do_wipefd): Likewise.
	* src/users.c (list_entries_users): Likewise.
	* src/tail.c (main): Likewise.
	* src/md5sum.c (main): Likewise.

2004-04-29  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/df.c (show_disk, show_point): If several filesystems are
	mounted on the same mount point, prefer the last one, not the first.
	Problem reported by Christian Jones in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-04/msg00200.html>.
	(show_disk): Remove unused statp arg.  Return bool, not int.
	(show_point): Rewrite to avoid gotos.  Use the same algorithm
	for lofs and dummies for each pass through the mount table,
	rather than subtly different algorithms (which are probably
	inadvertent).

2004-05-03  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (EXTRA_DIST): Add m4/ChangeLog, now that we no longer
	have m4/Makefile*.

2004-05-01  Jim Meyering  <jim@@meyering.net>

	When chown or chgrp is modifying the referent of a symlink,
	use the chown(2) function, if possible.
	* src/chown-core.c (change_file_owner): Don't hard-code the
	open/fchown/close kludge here.  Use `chown' instead.
	The chown function works just fine on conforming systems.
	Other systems now go through the new chown wrapper that
	resorts to the old kludge.

	* src/chown-core.c (change_file_owner): Add a comment.

2004-04-27  Jim Meyering  <jim@@meyering.net>

	* src/ptx.c: Make over 40 global extern variables `static'.
	(syntax_table, re_syntax_table): Remove declarations of two unused
	variables (they were exposed by the above change).

	* src/du.c (G_fail, opt_nul_terminate_output): Declare `static'.
	* src/ln.c (backup_type): Likewise.

	* src/remove.c (rm): Add `extern' keyword.
	* src/cp-hash.c (forget_created, remember_created)
	(src_to_dest_lookup, remember_copied, hash_init, forget_all): Likewise.
	* src/copy.c (dest_info_init, src_info_init, copy): Likewise.
	* src/chown-core.c (chopt_init, chopt_free, gid_to_name)
	(uid_to_name, chown_files): Likewise.

	* src/Makefile.am (sc_tight_scope): New rule.
	* Makefile.maint (sc_tight_scope): New rule.
	(syntax-check-rules): Add it.

2004-04-26  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.8.4.  Regenerate dependent files.

	* src/sort.c (limfield): Make a comment clearer.

2004-04-25  Paul Eggert  <eggert@@twinsun.com>

	Fix POSIX-conformance bug: "sort -k 3,3.5b" is supposed to skip
	leading blanks when computing the location of the field end;
	it is not supposed to skip trailing blanks.  Solaris 8 "sort"
	does conform to POSIX.  Also fix the documentation to clarify
	this and related issues.

	* doc/coreutils.texi (sort invocation): Mention -k earlier, so
	that the options are in alphabetical order.  Describe how -b works
	more-accurately; this involves fixing some examples, too.  Mention
	what happens if the start field falls after an end field or after
	a line end.  Warn about using -k without -b, -g, -M, -n, or -t.
	Add an example of how to sort IPv4 addresses and Apache Common
	Log Format dates.  Remove a duplicate example.
	(Putting the tools together): Use separate options rather
	than agglomerating them.
	* src/sort.c (limfield): Use skipeblanks, not skipsblanks, to
	decode whether to skip leading blanks.
	(trailing_blanks): Remove.
	(fillbuf, getmonth, keycompare): Don't trim trailing blanks.

	* tests/pr/Test.pm: Fix typo in env_default comment.
	* tests/sort/Test.pm: Likewise.
	(18c, 18d): Reverse the order of output lines, so that the
	test cases conform to POSIX.

2004-04-22  Paul Eggert  <eggert@@twinsun.com>

	More signal-handling cleanup for ls.c.  Do not allow signals to
	happen between arbitrary output bytes, as the
	restore-default-color sequence can bollix up multibyte chars or
	color-change sequences in the ordinary output.  Instead, process
	signals only between printing a file name and changing the color
	back to non_filename_text color.  That way, if the signal handler
	changes the color (to the default), 'ls' will change it back when
	'ls' continues (after being suspended).

	Also, do not bother with signal-handling unless stdout is a
	controlling terminal; this lets stdio buffer better when "ls
	--color" is piped or sent to a file.

	* src/ls.c (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: New macros.
	Do not include "full-write.h"; no longer needed.
	(tcgetpgrp) [! HAVE_TCGETPGRP]: New macro.
	(put_indicator_direct): Remove.  All callers changed to use
	put_indicator.
	(caught_signals, interrupt_signal, stop_signal_count): New vars.
	(restore_default_color): Don't bother checking for put_indicator
	failure.
	(sighandler): Don't handle SIGTSTP; that's another handler now.
	Simply set interrupt_signal to the signal, then exit.
	(stophandler, process_signals): New functions.
	(main): Don't output any color changes until _after_ the signal
	handlers are set up.  This fixes a race condition where 'ls'
	could be interrupted while initializing colors, and leaving the
	terminal in an undesirable state.
	Don't mess with signal-handling if standard output is not a
	controlling terminal.
	When exiting, restore the default color, then restore the
	default signal handling, then act on any signals that weren't
	acted on yet.
	Do not print //DIRED// etc. in colors; this avoids the need
	to catch signals when printing them.
	(print_name_with_quoting): Process signals just before switching
	color back to non_filename_text.

2004-04-23  Jim Meyering  <jim@@meyering.net>

	Avoid segfault on systems for which SIZE_MAX != (size_t) -1.
	* src/ls.c (quote_name): Use SIZE_MAX, not -1, in calls
	of quotearg_buffer.  Patch by Mikulas Patocka.

2004-04-18  Paul Eggert  <eggert@@twinsun.com>

	tee ignored SIGPIPE, but POSIX doesn't allow this.

	* src/tee.c (main): Do not ignore SIGPIPE, as POSIX 1003.1-2001
	does not allow this.  This undoes the 1996-10-24 patch.

2004-04-18  Paul Eggert  <eggert@@twinsun.com>

	Signal-handling cleanup for coreutils.  Here are the highlights:

	 - csplit sometimes failed to remove files when interrupted.
	 - csplit didn't clean up if two signals arrived nearly simultaneously.
	 - install -s would infloop on System V if SIGCHLD was ignored.
	 - ls could incorrectly restore color if multiple signals
	   arrived nearly simultaneously.

	* src/csplit.c (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]:
	Define.
	(filename_space, prefix, suffix, digits, files_created, remove_files):
	Now volatile.
	(caught_signals): New var.
	(cleanup): Block signals while deleting all files.
	(cleanup_fatal, handle_line_error, regexp_error):
	Mark with ATTRIBUTE_NORETURN.
	(create_output_file, close_output_file, interrupt_handler):
	Block signals while changing the number of output files,
	to fix some race conditions.
	(delete_all_files): Do nothing if remove_files is zero.
	Clear files_created.
	(main): Don't mess with signals until after argument processing
	is done.

	* src/csplit.c (main): Rewrite signal-catching code to make it
	similar to other coreutils programs.  When processing signals,
	block all signals that we catch, but do not block signals that we
	don't catch.  Avoid problems with unsigned int warnings.
	* src/ls.c (main): Likewise.
	* src/sort.c (main): Likewise.

	* src/csplit.c (interrupt_handler):
	Use void, not (obsolete) RETSIGTYPE.
	* src/shred.c (sigill_handler, isaac_seed_machdep): Likewise.

	* src/csplit.c (interrupt_handler) [defined SA_NOCLDSTOP]:
	Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
	* src/ls.c (sighandler) [defined SA_NOCLDSTOP]: Likewise.
	* src/sort.c (sighandler) [defined SA_NOCLDSTOP]: Likewise.
	* src/nohup.c (main) [!defined _POSIX_SOURCE]: Likewise, except
	for SIG_IGN.
	* src/tee.c (main) [!defined _POSIX_SOURCE]: Likewise.

	* src/install.c: Include <signal.h>.
	(main) [defined SIGCHLD]: Set SIGCHLD handler to the default, if -s is
	given, since System V fork+wait does not work if SIGCHLD is ignored.

	* src/ls.c (sighandler) [!defined SA_NOCLDSTOP]: Reset signal
	handler to self, not to SIG_IGN, since SIGTSTP can be received
	more than once.
	(main): Use SA_RESTART, as that is simpler than checking for EINTR
	failures all over the place.

2004-04-20  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (is_empty_dir): Clarify comment.

	* man/help2man: Accept new option: --program-name=NAME, so that we
	can override the one in --version output.  This is needed solely
	so that test.1 doesn't refer to `[' as the program name.
	Reported by Benjamin Cutler as http://bugs.debian.org/205251.
	* man/Makefile.am (.x.1): Use help2man's new --program-name option.

	* src/pwd.c: Don't include pathmax.h; system.h already does it.

	* src/cut.c (cut_fields): Free buffer upon getndelim2 failure.

2004-04-19  Jim Meyering  <jim@@meyering.net>

	* src/shred.c (isaac_seed_start) [AVOID_USED_UNINITIALIZED_WARNINGS]:
	Initialize a buffer to avoid warnings from tools like valgrind.

	* Makefile.maint (sc_trailing_blank): New rule.
	(syntax-check-rules): Add it.
	* .x-sc_trailing_blank: New file.

	Make pwd work even if the resulting name is so long that getcwd fails.
	* src/pwd.c: (path_free, path_init, path_prepend): New functions.
	(nth_parent, find_dir_entry, robust_getcwd): New functions.
	(main): First try getcwd, then, upon failure, robust_getcwd.

2004-04-18  Jim Meyering  <jim@@meyering.net>

	* src/who.c (print_user): Use xrealloc here, rather than
	unchecked realloc.  Remove anachronistic casts.

	* src/remove.c (full_filename_): Don't leak upon failed realloc.

	* src/system.h (readdir_ignoring_dot_and_dotdot): New inline function,
	from remove.c.
	* src/remove.c (readdir_ignoring_dotdirs): Move function to system.h,
	renaming it.  Update uses.

2004-04-17  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Depend on automake-1.8.3.

	* src/join.c (add_file_name): Declare function to be `static'.
	(string_to_join_field): Likewise.
	* src/remove.c (ds_init, ds_free): Likewise.

	* Makefile.maint (sc_prohibit_jm_in_m4): New rule.
	(syntax-check-rules): Add to the list.

2004-04-13  Paul Eggert  <eggert@@twinsun.com>

	Use page-aligned buffers whenever we bother to do I/O using buffer
	sizes that are tailored for the files.

	* src/cat.c: Include getpagesize.h.
	* src/copy.c: Likewise.
	* src/shred.c: Likewise.
	* src/split.c: Likewise.
	* src/cat.c (main): Align I/O buffers to page boundaries.
	* src/copy.c (copy_reg): Likewise.
	* src/shred.c (dopass): Likewise.
	* src/split.c (main): Likewise.
	* src/dd.c (ROUND_UP_OFFSET, PTR_ALIGN): Remove.
	All uses replaced by ptr_align.
	* src/od.c (gcd, lcm): Remove; now in system.h.
	* src/system.h (gcd, lcm, ptr_align): New functions, moved from od.c.

2004-04-14  Jim Meyering  <jim@@meyering.net>

	Remove m4/Makefile.am: it's no longer needed, with newer automake
	* configure.ac (AC_CONFIG_FILES): Remove m4/Makefile.in from the list.
	* Makefile.am (SUBDIRS): Remove `m4' from the list.

2004-04-13  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Change `jm_' in AC_DEFINE'd names to `gl_'.

2004-03-27  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: cp -pu and mv -u (when copying) now take the destination
	file system time stamp resolution into account.
	* doc/coreutils.texi (mv invocation): Document this.
	(cp invocation): Document -u (it was missing!) with new behavior.

	* src/copy.c: Include "utimecmp.h".
	(copy_internal): Compare time stamps using utimecmp rather than
	MTIME_CMP.

2004-04-09  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (.re-list): New rule/file, to replace
	hard-coded list of header file names.
	(sc_system_h_headers): Use the new file.
	Don't look for sys2.h anymore.

	* src/system.h: Include new "stat-macros.h" rather than hard-coding
	all of its macro definitions -- the list was slightly out of date.
	Suggestion from Dmitry V. Levin.

2004-04-08  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Remove noctty flag from dd.  Suggested by Philippe Troin.
	* doc/coreutils.texi (dd invocation): Likewise.
	* src/shred.c (O_NOCTTY): Remove redundant decl.
	* src/dd.c (flags, usage): Remove noctty flag.
	(main): Always use O_NOCTTY when opening files.

2004-04-08  Jim Meyering  <jim@@meyering.net>

	* src/dd.c (dd_copy): Mark two diagnostics for translations.
	(set_fd_flags): Undo part of today's change: it's a little
	cleaner -- and more efficient in the common case -- to go
	ahead and OR in the -1 when fcntl fails.

	* Makefile.maint (sc_dd_max_sym_length): New target.
	(syntax-check-rules): Add it.

	* src/md5sum.c (PROGRAM_NAME) [algorithm == ALG_SHA1]:
	Correct spelling: s/shasum/sha1sum.  Reported by Jesse Kornblum.

	* src/dd.c (set_fd_flags): Don't OR in -1 when fcntl fails.
	Rename parameter, flags, to avoid shadowing global.
	(LONGEST_SYMBOL): Tweak comment.

2004-04-07  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: New dd conv= symbols nocreat, excl, fdatasync, fsync,
	and new dd options iflag= and oflag=.
	* src/dd.c (usage): Likewise.
	* src/Makefile.am (dd_LDADD, shred_LDADD): Add fdatasync's lib.
	* src/dd.c (fdatasync) [!HAVE_FDATASYNC]: New macro.
	(C_NOCREAT, C_EXCL, C_FDATASYNC, C_FSYNC): New macros.
	(input_flags, output_flags): New vars.
	(LONGEST_SYMBOL): New macro.
	(struct symbol_value): Renamed from struct conversion.  Members
	symbol and value renamed from convname and conversion.  The
	symbol value is now an array instead of a pointer; this saves
	a bit of space and time in practice.  All uses changed.
	(conversions): Add nocreat, excl, fdatasync, fsync.  Now const.
	(flags): New constant array.
	(iflag_error_msgid, oflag_error_msgid): New constants.
	(parse_symbols): Renamed from parse_conversion and generalized
	to handle either conversion or flag symbols.
	(scanargs): Adjust uses of parse_symbols accodingly.  Add
	support for iflag= and oflag=.  Reject attempts to use
	both excl and nocreat.
	(set_fd_flags): New function.
	(dd_copy): Just return X rather than calling quit (X), since our
	caller invokes quit with the returned value.  Add support for
	fdatasync and fsync.
	(main): Add support for iflag=, oflag=, and new conv= symbols.
	* src/system.h (O_DIRECT, O_DSYNC, O_NDELAY, O_NOFOLLOW,
	O_RSYNC, O_SYNC): Define to 0 if not already defined.

	* NEWS: Remove duplicate mention of BLOCKSIZE.

2004-04-02  Andreas Schwab  <schwab@@suse.de>

	* src/stty.c: Add support for IUTF8 input flag.

2004-04-06  Jim Meyering  <jim@@meyering.net>

	* src/system.h (makedev) [mkdev && !makedev]: Define in terms of mkdev.
	Interix spells it `mkdev'.  Reported by Mark Funkenhauser.

2004-04-04  Jim Meyering  <jim@@meyering.net>

	A specified format is no longer automatically newline terminated.
	If you want a newline at the end of your format, use `\n'.
	* src/stat.c (print_it): Don't print a newline at the end of
	every format.
	(do_statfs): Add a newline at end of each default format string.

2004-03-30  Paul Eggert  <eggert@@twinsun.com>

	* src/nohup.c (main): Adjust to new calling convention
	for set_cloexec_flag.

2004-03-31  Jim Meyering  <jim@@meyering.net>

	* tests/Fetish.pm (run_tests): Remove `.orig' file.
	Remove debugging diagnostic.

	Specifying an invalid --width=N (-w) or --gap-size=N (-g)
	would not elicit an error.
	* src/ptx.c: Include "xstrtol.h" and "quotearg.h".
	(main): Don't use atoi.  Use xstrtoul instead.

2004-03-30  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_prohibit_atoi_atof): New rule.
	(syntax-check-rules): Add it.
	* .x-sc_prohibit_atoi_atof: New file.

2004-03-29  Jim Meyering  <jim@@meyering.net>

	* tests/du/files0-from: Use new OUT_SUBST directive, so that this
	test is not sensitive to system-dependent block size differences.
	Prompted by a report of Solaris 8 differences from Paul Eggert.

	* tests/Fetish.pm: Accept new directives: OUT_SUBST, ERR_SUBST.
	Rename `%tmp' to `%actual'.  Reverse order of last two args to
	_compare_files (to $actual, $expected) so as to match declaration.

2004-03-28  Paul Eggert  <eggert@@twinsun.com>

	Fix some gotchas encountered when porting to Solaris 8, using
	the Forte 6u2 compiler.

	* src/hostname.c [HAVE_SETHOSTNAME && !defined sethostname]:
	Declare sethostname, since no Solaris header does it.
	* src/who.c: Include "vasprintf.h", for asprintf.

2004-03-28  Jim Meyering  <jim@@meyering.net>

	Minor optimization:
	* src/du.c (process_file): Don't record dev/inode for directories.

	Under some circumstances, without -c, du would mistakenly count the
	space of hard-linked files, not just the first one it encountered.
	Reported by Anthony Thyssen.
	* src/du.c (du_files): Don't ever clear the set of `seen' dev/inodes.

	* src/du.c: Rename global `print_totals' to `print_grand_total'.

	* src/du.c (main): Rearrange filtering loop to be a tiny bit
	more efficient.

	* src/chown-core.c: Don't include savedir.h -- no longer needed.
	* src/chmod.c: Likewise.

2004-03-25  Jim Meyering  <jim@@meyering.net>

	* src/du.c (main): Remove now-unused declaration of `i'.

2004-03-24  Paul Eggert  <eggert@@twinsun.com>

	* src/du.c (main): Filter out file names of length zero before
	invoking fts, so that they don't cause fatal errors.

2004-03-25  Jim Meyering  <jim@@meyering.net>

	* tests/du/files0-from (zero-len): Add a test for the above.

2004-02-25  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: New environment var BLOCKSIZE.
	* lib/human.c (humblock): Support BLOCKSIZE as well as BLOCK_SIZE.
	* tests/envvar-check: Test for it.  Factor the code to simplify it.

2004-03-23  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Shorten the du --files0-from announcement, and say
	"NUL-terminated" rather than "NUL-separated".
	* src/du.c (EXPECTED_BYTES_PER_FILE_NAME, DEFAULT_PROJECTED_N_FILES):
	Remove: not used.
	(usage): Say "NUL-terminated", not "NUL-separated".
	(main): Check for I/O error when istream is closed.
	Allow --files0-from=F even if F is empty; this specifies no files.
	(du_files): Now that we allow the list of files to be empty,
	handle that case.
	* tests/du/files0-from: Adjust to above changes to src/du.c.

2004-03-24  Jim Meyering  <jim@@meyering.net>

	* tests/tail-2/assert: Avoid race condition that could cause
	spurious failure.  Based on a patch from Andreas Schwab.

2004-03-23  Jim Meyering  <jim@@meyering.net>

	* src/du.c (main): Free the hash table, too.

2004-03-22  Jim Meyering  <jim@@meyering.net>

	* man/Makefile.am (.x.1): Remove --info-page= option, reverting
	the change of 2004-01-22.  I can no longer reproduce the problem
	that prompted that change, and `info coreutils pr' would display the
	`printing text' section of the manual, not the one on `pr invocation'.

	* tests/du/files0-from (nul-1, nul-2): Adjust expected diagnostics
	to match corrected output.

	* src/du.c: Include "readtokens0.h" rather than "readtokens.h".
	(main): Use readtoken0 functions rather than readtokens.
	Don't use errno when diagnosing readtokens0 failure.
	Fix off-by-one error in the token number reported in a diagnostic.
	(du_files): Return bool, rather than int.
	(main): Call readtokens0_free.

2004-03-21  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (ds_free): Plug a small leak.

	* tests/Fetish.pm: Fix typo in comment.

2004-03-07  Jim Meyering  <jim@@meyering.net>

	* NEWS: du accepts a new option --files0-from=FILE, where FILE
	contains a list of NUL-separated file names.

	* src/du.c: Include "readtokens.h".
	(usage): Describe the new option, and adjust the `Usage':
	with this option, no FILE may be specified on the command line.
	(main): Handle the new option.

	* tests/du/files0-from: New tests, for the above.
	* tests/du/Makefile.am (TESTS): Add files0-from.

	* src/factor.c (do_stdin): Reflect changes in use of readtoken.
	* src/tsort.c (tsort): Likewise.

2004-02-29  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Add support for a new notation @@N to get_date to represent
	the time stamp with numeric value N.  Improve support for
	fractional time stamps.  date's -d and -f options now accept them.
	Likewise for touch -t.  date has a new option --iso-8601=ns.

	* doc/coreutils.texi (touch invocation):
	Describe use of fractional seconds.
	(date invocation, Options for date): Likewise.
	* doc/getdate.texi (General date syntax, Time of day items): Likewise.
	* doc/coreutils.texi (date invocation): Mention effect of LC_TIME.
	(Options for date): Describe new --iso-8601=ns option.

	* doc/getdate.texi: Add copyright notice.  Change getdate to
	get_date when talking about the function name.
	(Seconds since the Epoch): New section, containing the time_t
	info moved from Date input formats section, along with new
	info about the @@ syntax.  Mention negative time stamps,
	fractional time stamps, and leap seconds.
	(General date syntax): Modernize examples a bit to reflect new
	features.
	(General date syntax, Relative items in date strings):
	Use ' rather than " to quote formats.
	(Time of day items): Add an example with fractional seconds.
	Describe fractional-second syntax.

	* src/Makefile.am (touch_LDADD): New macro, since `touch' now
	needs clock_gettime.

	* src/date.c (enum Time_spec): New enum TIME_SPEC_NS.
	(time_spec_string, time_spec, show_date): Support it.
	(usage): Remove description of -ITIMESPEC, as it's obsolete and
	confusing.  Mention --iso-8601=ns.
	(batch_convert): getline returns ssize_t, not int.

	* src/touch.c (newtime): Now an array of two timespecs, one
	for access and one for modification.
	(ref_stats): Remove.
	(get_reldate): Use get_date's parameter profile.
	(touch, main): Adjust to above changes.
	(main): Work even if tm_year == INT_MAX (so long as long int is wider).
	Use gettime instead of gettimeofday, for new get_date signature.

	* tests/date/Test.pm (test_vector): New tests epoch, ns-10, ns-max32,
	ns-relative.

2004-03-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (alpha beta major): `Make' the emit_upload_commands
	target before updating $(prev_version_file).

	* tests/misc/date-sec: New file, to test for just-fixed bug in date.
	See today's change in lib/getdate.y.
	* tests/misc/Makefile.am (TESTS): Add date-sec.

2004-03-14  Jim Meyering  <jim@@meyering.net>

	* announce-gen (print_changelog_deltas): Use `.sig' suffix for
	signature files, not `.asc'.  Reported by angico@@yahoo.com.

2004-03-13  Jim Meyering  <jim@@meyering.net>

	* src/cp.c (do_copy): Tweak wording in a diagnostic.
	Suggestion from Karl Berry.
	Include "quoatearg.h".
	(do_copy): Use quotearg_colon (not quote) for diagnostics
	that begin with `"%s:'.

	* src/nl.c (usage): Specify that nl uses _basic_ regular expressions.
	Suggestion from Dan Jacobson.

2004-03-12  Jim Meyering  <jim@@meyering.net>

	* Version 5.2.1.

	Sometimes, when source and destination partition are different,
	mv mistakenly fails to preserve a hard link.  Reported by IIDA Yosiaki.

	* src/copy.c: When moving a set of N hard-linked files between
	partitions, via two or more command line arguments where the
	command line argument containing the Nth link contains no other
	link to that same file, mv would mistakenly copy the file, rather
	than hard-linking it to the other(s).  That happens because when the
	final link is processed, its link count has been reduced to 1 since
	the other links have been `copied' to the destination partition
	and the source links have been removed.
	(copy_internal): When in move mode, use the source dev/inode
	pair to look up destination name even when st_nlink == 1.
	* src/cp-hash.c (src_to_dest_lookup): New function.
	* src/cp-hash.h (src_to_dest_lookup): Add prototype.
	* tests/mv/part-hardlink: New file.  Test for the above fix.
	* tests/mv/Makefile.am (TESTS): Add part-hardlink.

	* announce-gen: Sync with autoconf.

	* tests/ls/time-1: Exit 77 (not 1) if we can't set up for the test.
	This was triggered on a Linux-2.2.19 system using a file system
	NFS-mounted from some sort of Sun.

2004-03-11  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.8.3.  Regenerate dependent files.

2004-03-10  Jim Meyering  <jim@@meyering.net>

	* tests/du/deref-args: Also convert sizes in the 70-79 kB range,
	so that this test works with SELinux-enabled systems.
	Based on a patch from Tim Waugh.

	`join -1 x' would give a misleading diagnostic
	* src/join.c (string_to_join_field): Report that a non-numeric field
	number is invalid, rather than `so large that it is not representable'.
	* tests/join/Test.pm (invalid-j): New partial test for the above fix.

2004-03-06  Jim Meyering  <jim@@meyering.net>

	cp --sparse=always sparse-image-file.img /dev/hda1 could
	produce an invalid copy on the destination device.

	* src/copy.c (copy_reg): Even with --sparse=always, try to
	make `holes' only if the destination is a regular file.
	Reported by Szakacsits Szabolcs.

2004-03-03  Paul Eggert  <eggert@@twinsun.com>

	* src/nohup.c (main): Don't invoke set_cloexec_flag with
	a file descriptor of -1.

2004-03-02  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/nohup.c: Include "cloexec.h".
	(main): Set the copy of stderr to close on exec.

2004-03-01  Paul Eggert  <eggert@@twinsun.com>

	* configure.ac: Include <signal.h> when checking for strsignal,
	sys_siglist, and friends.  Problem reported by Tony Leneis in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-02/msg00136.html>.

2004-02-25  Paul Eggert  <eggert@@twinsun.com>

	* tests/du/deref-args, tests/du/exclude, tests/du/slash:
	* tests/du/trailing-slash: Run envvar-check in case BLOCK_SIZE
	etc. are set.

2004-02-23  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Document how chown's USER.GROUP argument is now parsed.

2004-02-23  Jim Meyering  <jim@@meyering.net>

	* src/seq.c (usage): Remove stray space after \n in --help output.

2004-02-22  Jim Meyering  <jim@@meyering.net>

	* src/du.c (usage): Separate -H and --si.  Say that the meaning
	of -H will soon change to that of --dereference-args (-D).

2004-02-21  Jim Meyering  <jim@@meyering.net>

	* src/comm.c (usage): Tell what comm does when there are no options.
	Reword in terms of FILE1 and FILE2 rather than `left file' and
	`right file'.  Suggestion from Dan Jacobson.

2004-02-15  Paul Eggert  <eggert@@twinsun.com>

	Fix some POSIX-conformance bugs in expr.

	* NEWS: document the following changes to src/expr.c.
	* doc/coreutils.texi (expr invocation): Likewise.
	Document what forms integers may take, and say "integer"
	consistently instead of "number".  Warn about operands
	that "expr" can misinterpret, and how to work around the
	problem.
	* src/expr.c (eval, eval7, eval6, eval5, eval4, eval3, eval2, eval1):
	Accept a bool argument specifying whether to evaluate the
	expression.  This is to allow short-circuit evaluation.  All
	callers changed.
	(null): Report that a string is zero even if it has
	a form like "-0" or "00".
	(eval1, eval): Use short-circuit evaluation for | and &.
	(eval): Return 0 if both arguments are null or zero, instead
	of returning the first argument.
	* tests/expr/basic: Add some tests for the above.

2004-02-17  Jim Meyering  <jim@@meyering.net>

	* Version 5.2.0.

	`make check' from a build inside a chroot environment would fail
	* tests/help-version: Specify an argument (`/') for df, in the
	unusual event that there is no valid entry in /etc/mtab.
	Likewise for id: add the -u option, so we don't get spurious
	failures when there are no user or group names.
	Patch by Tim Waugh.

	* src/sort.c (usage) [-u]: Add punctuation so that the description in
	the help2man-generated (line-joined) man page is more readable.
	Reported by Tim Waugh.
	[-T]: Add a semicolon, for the same reason.

2004-02-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (dist-hook): Qualify target with $(srcdir)/ prefix.

2004-02-11  Jim Meyering  <jim@@meyering.net>

	* tests/Makefile.am.in ($(srcdir)/Makefile.am): Use more portable
	$(srcdir)/../Makefile.am.in, rather than $<.
	Suggestion from Michael Elizabeth Chastain.

2004-02-10  Jim Meyering  <jim@@meyering.net>

	* config/install-sh: Make this script executable.
	* Makefile.am (dist-hook): New target, to ensure that config/install-sh
	is executable.  Otherwise, on systems that lack a suitable install
	binary, `make install' would fail, because of the way this script
	is invoked (without `$SHELL ' prefix).
	Reported by Bob Proulx.

2004-02-08  Jim Meyering  <jim@@meyering.net>

	* Version 5.1.3.

	* tests/rm/rm5: Avoid triggering a bug in OSF/Tru64's sed
	that would cause an unwarranted test failure.
	* tests/rm/rm3: Likewise.

2004-02-07  Jim Meyering  <jim@@meyering.net>

	Remove xstat function pointer member.  The way it was used was not
	portable, since some systems (OSF V5.1, Solaris 2.5.1) provide static
	inline `stat' and `lstat' functions, thus making the tests of
	`xstat == lstat' in copy.c always fail.
	* src/copy.h (struct cp_options) [xstat]: Remove member.
	(XSTAT): New macro.
	* src/copy.c (copy_dir): Set `.dereference' member, not .xstat.
	(copy_internal): Use `XSTAT (x, ...)' in place of `*(x->xstat) (...)'.
	Use `x->dereference == DEREF_NEVER' in place of `x->xstat == lstat'.
	(valid_options): Remove now-obsolete FIXME comments.

	* src/cp.c (re_protect): Use `XSTAT (x, ...)' in place of
	`*(x->xstat) (...)'.
	(do_copy): Declare/use local xstat rather than x->xstat.
	(main): Remove code that set x.xstat.
	* src/mv.c (cp_option_init): Don't initialize xstat member.
	* src/install.c (cp_option_init): Likewise.

	* Makefile.cfg (gnu_ftp_host-alpha, etc.): Un-factor .gnu.org suffix,
	so that emit_upload_commands can use these variables, too.

2004-02-06  Jim Meyering  <jim@@meyering.net>

	* tests/rm/deep-1: Remove `du' stack space test.
	Apparently, `ulimit -s N' isn't portable enough.
	This test will be restored (with a guard against losing ulimit)
	in its own file later.

	* tests/rm/deep-1 (deep): Remove progress-style diagnostics,
	since this test doesn't take long enough to merit them.
	Run du on $tmp (the containing dir), not $deep, the full path to leaf.

	* Makefile.maint (signatures): Remove definition.
	Now, automake's gnupload handles this.
	(%.sig: %): Remove now-unused rule.
	(rel-files): Use automake's $(DIST_ARCHIVES), rather than
	`$(distdir).tar.bz2 $(distdir).tar.gz'.
	(emit-upload-commands): Adjust to use gnupload.

2004-02-05  Jim Meyering  <jim@@meyering.net>

	* src/system.h (ST_TIME_CMP_NS, ST_TIME_CMP): Remove definitions.
	(ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
	Now, those are all defined in timespec.h.
	Include timespec.h.

	* src/date.c: Don't include timespec.h, now that system.h does it.

2004-02-02  Paul Eggert  <eggert@@twinsun.com>

	Don't dump core if localtime returns NULL (possible on
	hosts with 64-bit time_t and 32-bit int).
	* src/date.c: Include "inttostr.h".
	(batch_convert, main):
	If time conversion fails, exit with nonzero status.
	(show_date): Return int to report conversion failure.
	Print the time as an int if localtime fails.
	* src/uptime.c: Print "??" if the current clock can't
	be converted by localtime.  This won't happen until the year
	2*31 + 1900, but we don't want to dump core even if the current
	clock has the wrong value.

	* src/stat.c: Include "inttostr.h".
	(human_time): Print the date/time as a number of seconds since the
	epoch if it can't be converted by localtime.  This is better than
	just saying "invalid", and is consistent with what "ls" does.
	Don't dump core if the year has more than 48 digits; this isn't
	possible on any contemporary host, but we might as well do it right.

2004-01-31  Paul Eggert  <eggert@@twinsun.com>

	* src/stat.c (human_time): Accept time rather than
	pointer-to-const-time parameter, for clarity.  All callers changed.

2004-02-02  Jim Meyering  <jim@@meyering.net>

	* src/stat.c (do_stat): Remove extra trailing newline from
	default formats.  Reported by Nelson H. F. Beebe.

	Print actual fractional seconds in time stamps, not just `.00000000'.
	* src/stat.c (human_time): Add and use new parameter, t_ns.
	(print_stat): Update callers.
	* src/ls.c (TIMESPEC_NS): Remove definition.
	* src/system.h (TIMESPEC_NS): Define here, instead, now that stat.c
	also uses this macro.
	Nelson H. F. Beebe noticed that ls --full-time printed nonzero
	fractional seconds for files on an XFS file system, but that stat's
	fractional seconds were always zero.

2004-01-28  Paul Eggert  <eggert@@twinsun.com>

	* src/seq.c (print_numbers): Use 'double' for loop index, not
	'int', to avoid problems with integer overflow.  On almost all
	machines 'double' works in every case where 'int' works, and
	it works on other cases besides.

2004-01-27  Jim Meyering  <jim@@meyering.net>

	* src/seq.c (usage): Mention that if INCREMENT is omitted,
	it defaults to 1, even when FIRST is larger than LAST.
	Reword so as not to exclude the possibility that INCREMENT be zero.

2004-01-25  Jim Meyering  <jim@@meyering.net>

	* Version 5.1.2.

	* Makefile.maint (signatures): Comment out definition.

2004-01-23  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (header_regexp): Add exitfail.

	* man/Makefile.am (EXTRA_DIST): Add help2man.
	Reported by Nelson H. F. Beebe.

	* man/Makefile.am (.x.1): Prefix help2man invocation with `$(PERL) --'
	so it works on systems with Perl installed somewhere other than in
	/usr/bin.

	* src/paste.c (paste_parallel): Declare local, chr, to be of type
	`int', not `char', since it must hold EOF.  This bug would make
	paste infloop on some systems.  Test failures reported by
	Nelson H. F. Beebe and Christian Krackowizer.

2004-01-22  Jim Meyering  <jim@@meyering.net>

	* tests/rmdir/fail-perm: New file.  Test for just-fixed rmdir bug.
	* tests/rmdir/Makefile.am (TESTS): Add fail-perm.

	* man/help2man: Fix it so using --info-page='coreutils PROG' works.
	* man/Makefile.am (.x.1): Invoke our own (tweaked) copy of help2man.
	Use --info-page='coreutils PROG' option.
	Now, readlink.1 refers the user to `info coreutils readlink'
	rather than to `info readlink'.  Reported by Matt Swift.

2004-01-21  Paul Eggert  <eggert@@twinsun.com>

	Exit status cleanup.

	* src/basename.c (usage): Use EXIT_SUCCESS, not 0, for clarity.
	* src/cat.c, src/chgrp.c, src/chmod.c, src/chown.c, src/chroot.c,
	* src/cksum.c, src/comm.c, src/cp.c, src/csplit.c, src/cut.c,
	* src/date.c, src/dd.c, src/df.c, src/dircolors.c, src/dirname.c,
	* src/du.c, src/echo.c, src/env.c, src/expand.c, src/expr.c,
	* src/factor.c, src/fmt.c, src/fold.c, src/head.c, src/hostid.c,
	* src/hostname.c, src/id.c, src/install.c, src/join.c, src/kill.c,
	* src/link.c, src/ln.c, src/logname.c, src/ls.c, src/md5sum.c,
	* src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c, src/nice.c,
	* src/nl.c, src/nohup.c, src/od.c, src/paste.c, src/pathchk.c,
	* src/pinky.c, src/pr.c, src/printenv.c, src/printf.c, src/pwd.c,
	* src/rm.c, src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c,
	* src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c,
	* src/su.c, src/sum.c, src/sync.c, src/tac.c, src/tail.c, src/tee.c,
	* src/test.c, src/touch.c, src/tr.c, src/tsort.c, src/tty.c,
	* src/uname.c, src/unexpand.c, src/uniq.c, src/unlink.c, src/uptime.c,
	* src/users.c, src/wc.c, src/who.c, src/whoami.c, src/yes.c: Likewise.

	* src/cat.c (usage): Don't bother normalizing exit status
	since the arg is already the correct exit status now.
	* src/cksum.c, src/comm.c, src/csplit.c, src/cut.c,
	* src/dircolors.c, src/expand.c, src/fmt.c, src/fold.c, src/head.c,
	* src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c,
	* src/pr.c, src/split.c, src/sum.c, src/tac.c, src/tail.c, src/tr.c,
	* src/tsort.c, unexpand.c, src/src/uniq.c, src/src/wc.c: Likewise.

	* src/chown.c (main): Removed unused local 'fail'.

	* src/chroot.c (CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE):
	Remove.

	* src/chroot.c (main): Initialize exit_failure to EXIT_FAIL.
	* src/env.c, src/nice.c, src/su.c: Likewise.
	* src/nohup.c (main): Likewise, to NOHUP_FAILURE.
	* src/setuidgid.c (main): Likewise, to SETUIDGID_FAILURE.
	* src/expr.c (main): Use initialize_exit_failure rather than
	setting exit_failure directly; this optimizes away redundant
	assignments.
	* src/printenv.c, src/sort.c, src/test.c, src/tty.c: Likewise.

	* src/chroot.c (main): Exit with status 1 rather than 127
	if chroot itself fails, as per documentation.

	* src/chroot.c (main): Use EXIT_ENOENT and EXIT_CANNOT_INVOKE
	rather than roll-your-own symbols or integers.
	* src/env.c (main): Likewise.
	* src/nohup.c (main): Likewise.
	* src/su.c (run_shell): Likewise.

	* src/cp.c (exit_status): Remove static var....
	(main): Making it local here instead.  Use =, not |=, to set it.

	* src/cut.c (FATAL_ERROR, main): Exit with status EXIT_FAILURE,
	not 2, on errors.
	* src/date.c (batch_convert, main): Likewise.
	* src/dd.c (dd_copy): Likewise.
	* src/pr.c (first_last_page, main, getoptarg): Likewise.
	* src/tr.c (main): Likewise.
	* src/date.c (main): Don't assume EXIT_FAILURE == 1, as
	POSIX doesn't require it.
	* src/dd.c (write_output, skip, dd_copy): Likewise.
	* src/df.c (main): Likewise.
	* src/id.c (main): Likewise.
	* src/install.c (main): Likewise.
	* src/ln.c (main): Likewise.
	* src/ls.c (main): Likewise.
	* src/mv.c (main): Likewise.
	* src/shred.c (main): Likewise.

	* src/env.c (main): Exit with status 1, not 2, on errors detected
	by env proper.
	* src/hostname.c (main): Likewise.
	* src/nl.c (main): Likewise.
	* src/stty.c (main): Likewise.

	* src/expr.c (EXPR_FAILURE): Renamed from EXPR_ERROR, for
	consistency with the other programs' naming conventions.
	All uses changed.

	* src/factor.c (main): Do not report a usage error simply
	because stdin has bad numbers.

	* src/id.c (problems): Now a boolean int, not a counter,
	so that we don't have to worry about int overflow.  All uses changed.
	* src/touch.c (err): Likewise.

	* src/md5sum.c (main): Use int, not size_t, to store boolean int.

	* src/mkfifo.c (main): Exit with status 1, not 4, if not implemented.
	* src/mknod.c: Likewise.

	* src/nice.c (main): Exit with status EXIT_FAIL, not EXIT_FAILURE,
	on error; this is in case EXIT_FAILURE is unusual.
	* src/su.c (main): Likewise.

	* src/nohup.c (NOHUP_FOUND_BUT_CANNOT_INVOKE): Remove; all uses
	changed to EXIT_CANNOT_INVOKE.

	* src/printenv.c (PRINTENV_FAILURE): New constant.
	(main): Exit with status PRINTENV_FAILURE, not EXIT_FAILURE, on
	command-line syntax problems.

	* src/rmdir.c (remove_parents): Don't set 'fail' to a negative number.
	(main): Avoid integer overflow when seeing whether errors occurred.

	* src/seq.c (print_numbers): Now returns void, not (zero) int.
	All callers changed.
	(main): Remove unused local variable 'errs'.  Always exit successfully
	if we reach the end.

	* src/setuidgid.c (SETUIDGID_FAILURE): Renamed from FAIL_STATUS,
	for consistency with other programs here.  All uses changed.
	(main): Use 'error' to exit rather than invoking 'exit' here.

	* src/sort.c: Don't include <assert.h>.
	(SORT_OUT_OF_ORDER,  SORT_FAILURE): Now enums, not macros.
	(usage): Don't use 'assert'.
	(main): Remove redundant assignment to exit_failure.

	* src/system.h (EXIT_FAIL, EXIT_CANNOT_INVOKE, EXIT_ENOENT):
	New enum values.
	(initialize_exit_failure): New inline function.
	Include exitfail.h here, since we refer to exit_failure.
	All callers changed to not include exitfail.h.

	* src/tty.c (TTY_FAILURE, TTY_WRITE_ERROR): New enum values;
	substitute them for the corresponding integer constants.

	* tests/help-version (expected_failure_status_date): Remove, as
	'date' is now normal.
	(expected_failure_status_nohup): New var.

2004-01-21  Jim Meyering  <jim@@meyering.net>

	* tests/touch/relative: Remove `command' syntax.
	Thanks to Nelson H. F. Beebe and Paul Eggert.

	* tests/touch/relative: Test only year/month/day, not hours/min/sec,
	so as to avoid problems with systems using TAI clocks.
	Although it's no longer necessary, set TZ=UTC0 also for the
	initial touch command.  Reported by Paul Jarc here:
	http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/1504

2004-01-20  Diego Biurrun  <diego@@biurrun.de>

	* src/dircolors.hin: Add .mov to the list of media files.

2004-01-19  Paul Eggert  <eggert@@twinsun.com>

	* tests/touch/relative: Use TZ=UTC0, not TZ=utc (which isn't
	portable).  Problem reported by Christian Krackowizer.  Also, use
	+0000 rather than +0 to specify a time zone, as the documentation
	requires four digits.

2004-01-19  Jim Meyering  <jim@@meyering.net>

	* tests/mv/hard-4: Run envvar-check in case SIMPLE_BACKUP_SUFFIX is set.
	* tests/mv/backup-is-src: Likewise.
	Problem reported by Peter Horst

2004-01-17  Jim Meyering  <jim@@meyering.net>

	* announce-gen (print_changelog_deltas): Use .sig suffix, not .asc.

	* Version 5.1.1.

2003-12-15  Paul Eggert  <eggert@@twinsun.com>

	* NEWS, doc/coreutils.texi: touch -r and -d can now both be specified,
	with -r specifying the origin for -d.
	* src/touch.c (flexible_date): Remove static var.
	(get_reldate): New function.
	(main): Use it, to implement this new behavior.

2004-01-16  Jim Meyering  <jim@@meyering.net>

	* tests/touch/relative: New test for the above.
	* tests/touch/Makefile.am (TESTS): Add relative.

2004-01-13  Jim Meyering  <jim@@meyering.net>

	* src/system.h: Include contents of sys2.h.
	* src/sys2.h: Remove file.
	* src/Makefile.am (noinst_HEADERS): Remove sys2.h.

	* Use automake-1.8.2.  Regenerate dependent files.

	* Update to gettext-0.13.1.
	* configure.ac: Use gettext-0.13.1.
	* .x-sc_space_tab: Add m4/po.m4 to the list of exceptions.

2004-01-12  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (%.sig): Use .sig suffix rather than .asc.

	* Makefile.maint (po-check): Ensure that cvsu works before using it.
	Reported by Alexandre Duret-Lutz.

	* src/tail.c (main): Warn about following stdin only when it's a tty.

	* configure.ac: Use gl_DEFAULT_POSIX2_VERSION.

2004-01-10  Jim Meyering  <jim@@meyering.net>

	* tests/misc/stat-fmt: Use backticks, not `$()' notation.

2004-01-09  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Quote underquoted `jm_DUMMY_1' to avoid new warning.

2004-01-08  Jim Meyering  <jim@@meyering.net>

	* src/stat.c (human_fstype): Use %lx, not %x format for `unsigned long'.
	From Andreas Schwab.

	* tests/Makefile.am (TESTS_ENVIRONMENT): Remove `/vg' (prerelease test
	remnant) from PATH component.  That would cause tests in this directory
	not to run the just-built binaries, but rather whatever happened
	to be in one's PATH.  Reported by Christian Krackowizer.

2004-01-04  Jim Meyering  <jim@@meyering.net>

	* src/csplit.c (new_control_record): Use x2nrealloc
	rather than xrealloc.

	* src/cp.c (re_protect): Use ASSIGN_STRDUPA rather than
	alloca and strcpy.
	(make_path_private): Likewise.

2004-01-03  Jim Meyering  <jim@@meyering.net>

	* src/paste.c: Use `bool' (not int) as the type for a few
	global variables.
	(collapse_escapes): Rewrite to set globals rather than modifying
	its parameter.
	Use size_t (not int) for all counters and related index variables.
	(paste_parallel): Remove needless complexity of
	using xrealloc in the loop;  just allocate the buffers up front.
	Free the two temporary buffers.
	Move declarations of locals `down' into scope where used.
	(paste_serial): Remove `register' attributes.
	(main): Simplify delim-related code.
	Free `delims', now that it's malloc'd.

2004-01-02  Jim Meyering  <jim@@meyering.net>

	* src/chroot.c: Include "quote.h".
	(CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE): Define.
	(main): Exit with status of 127, not 1, for too-few-args,
	chroot failure, or chdir failure.
	Give a better diagnostic upon execvp failure.

	* src/du.c (usage): Mention that, with its current meaning,
	-H is deprecated.

	* src/tail.c (main): Warn about following stdin when it's a tty.
	Fail when following by name but no names are specified.

2003-12-30  Jim Meyering  <jim@@meyering.net>

	* src/fold.c (main): Use memcpy, not strcpy.

	* src/copy.c (copy_internal): Use ASSIGN_STRDUPA rather than
	alloca and strcpy.

2003-12-28  Jim Meyering  <jim@@meyering.net>

	* src/unexpand.c (n_tabs_allocated): New global.
	(add_tabstop): Use x2nrealloc rather than xrealloc.
	* src/expand.c: Likewise.

	* tests/misc/expand: New file.
	* tests/misc/Makefile.am (TESTS): Add expand.

	* src/sort.c (add_temp_dir): Use x2nrealloc rather than xrealloc.
	(fillbuf): Use x2nrealloc rather than xrealloc.
	(sort): Use xnmalloc rather than xmalloc.
	(main): Likewise.

2003-12-27  Jim Meyering  <jim@@meyering.net>

	* src/tee.c (tee): Use xnmalloc rather than xmalloc.

2003-12-29  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Remove support for join -j1 FIELD, -j2 FIELD, and -o LIST1
	LIST2 in POSIX 1003.1-2001 hosts, as required by POSIX.

	* doc/coreutils.texi (join invocation): Remove documentation
	accordingly.  Document that -t makes all separators significant.

	* src/join.c: Include posixver.h.
	(obsolete_usage): New var.
	(longopts): Put obsolete options first.
	(OBSOLETE_LONG_OPTIONS): New constant.
	(get_option, add_file_name): New functions.
	(main): Use them to support new behavior.
	(usage): Remove documentation for -j1 FIELD and -j2 FIELD.
	Do not mark -j FIELD as obsolescent; it is longstanding
	UNIX tradition and is a valid extension to POSIX.

	* tests/join/Test.pm (tv): Avoid obsolete -o usage.

2003-12-28  Paul Eggert  <eggert@@twinsun.com>

	* src/join.c (add_field_list): Don't use alloca with unbounded
	size; just modify the argument, which is no longer const *.

	Various other minor cleanups, mostly to avoid the need for casts.

	(extract_field): Renamed from ADD_FIELD, as it's now a function.

	(struct field.beg): Now char *, not unsigned char const *.  All
	uses changed.  It shouldn't be const since xmemcoll writes on its
	arguments.
	(extract_field): Likewise, for 2nd arg.
	(keycmp): Remove now-unnecessary cast of xmemcoll args.

	(is_blank): New function, to avoid need to cast arg to unsigned char.
	(extract_field): Use it.

	(xfields): Rewrite pretty much from scratch.

	(hard_LC_COLLATE): Now bool, not int.
	(get_line, getseq, add_field_list): Now returns bool, not int.
	(decode_field_spec, add_field_list): Return true on success (not
	false), for consistency with the rest of the code.  All uses changed.

	(tab): Now char, not unsigned char.  This wasn't 100% necessary
	but is slightly cleaner.
	(prjoin): Hoist (tab ? tab : ' ') expression, to help the compiler.

	(empty_filler): Now const *.

	(make_blank): Remove; wasn't needed.  Remove all calls.
	(main): Don't set uni_blank.nfields; zero is fine.

2003-12-27  Jim Meyering  <jim@@meyering.net>

	* src/join.c: Include "quote.h".
	(min, max): Remove definitions.
	Make a few function parameters and corresponding
	locals `const'.  Use bool for boolean variables.
	Use size_t (not int) for all counters and related index variables.
	(prjoin): Remove now-useless assertion.
	(string_to_join_field): New function.
	(main): Accept join fields as large as SIZE_MAX.
	(keycmp): Rename `min' to MIN and max to MAX.

2003-12-26  Jim Meyering  <jim@@meyering.net>

	fold -s didn't work on e.g., alpha-based systems.
	* src/fold.c (fold_file): Adjust types (int->size_t) so that using
	x2nrealloc works properly on systems with differing sizes for int
	and size_t.  Reported by Nelson Beebe.

	* src/fold.c: Use `bool' (not int) as the type for a few
	global variables.

2003-12-23  Paul Eggert  <eggert@@twinsun.com>

	* src/ls.c (length_of_file_names_and_frills):
	Remove forward decl; not needed.
	(print_file_name_and_frills, length_of_file_name_and_frills):
	With -m, don't output spaces before inum or size.
	(print_with_commas): Don't output space just before newline.

2003-12-24  Jim Meyering  <jim@@meyering.net>

	* tests/ls/Makefile.am (TESTS): Add m-option.
	* tests/ls/m-option: New file.  Test for above fixes.

2003-12-20  Jim Meyering  <jim@@meyering.net>

	* Version 5.1.0.

	* src/pr.c: Change type of global, buff_allocated, to size_t.

	* src/join.c [struct seq]: Change types of members count and alloc
	from `int' to `size_t'.

	* tests/Makefile.am (root-hint): Tweak wording.

	* src/du.c: Accept new option (-0, --null) that makes it so each
	output line is NUL-terminated rather than newline-terminated.

	* src/dd.c (apply_translations): Don't prohibit conv=unblock,sync.
	Reported by Volker Paul.
	* tests/dd/Makefile.am (TESTS): Add unblock-sync.
	* tests/dd/unblock-sync: New test for the above.

2003-12-19  Jim Meyering  <jim@@meyering.net>

	* tests/misc/nohup: Double quote back-ticked expression,
	in case it ends up having an unexpected value.

	* tests/ls/no-arg: Use ls's -1 option in both runs.

	* src/du.c (fts_debug): New global.
	(FTS_CROSS_CHECK, DEBUG_OPT): Define.
	(main): Make fts use FTS_TIGHT_CYCLE_CHECK.
	(main) [DU_DEBUG]: Accept -d option.

2003-12-18  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (format_user): Increment dired_pos via two statements,
	`dired_pos += width; dired_pos++;' rather than one,
	`dired_pos += width + 1;' since the latter could conceivably overflow.
	(format_group): Likewise.
	From Paul Eggert.

	* configure.ac: Require automake-1.8.

2003-12-12  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.8.  Regenerate dependent files.

2003-12-08  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (news-date-check): New rule.
	(alpha beta major): Depend on it.

2003-12-03  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: ls -l (and similar options) now adjust all columns to
	fit the data.  Generalized from a suggestion by Leah Q for file sizes.
	* src/ls.c (INODE_DIGITS, LOGIN_NAME_MAX, ID_LENGTH_MAX): Remove.
	(format_user_width, format_group_width, unsigned_file_size,
	format_group): New functions.
	(block_size_width): Renamed from block_size_size.
	(inode_number_width, nlink_width, owner_width, group_width,
	author_width, major_device_number_width, minor_device_number_width,
	file_size_width): New vars.
	(clear_files): Initialize them.
	(gobble_file): Set them.  Don't ceiling block_size_width to 7.
	(print_long_file): Use them.
	(gobble_file): Use a new local variable 'f' to make the code
	smaller and more consistent with other functions.
	(format_user): Output to stdout, not to a buffer, so that we
	don't have to worry about buffer overrun.  Update dired_pos.
	(print_long_file): Don't put owner, group, author into buffer;
	just print them directly.  Don't assume link counts and
	major and minor numbers fit into unsigned long int.
	* tests/cp/same-file, tests/mv/part-symlink: Don't assume that
	'ls' output is fixed-width.

2003-12-02  Jim Meyering  <jim@@meyering.net>

	* src/md5sum.c: Include sha1.h (reflect renaming: sha.h -> sha1.h.

2003-11-27  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.7f.  Regenerate dependent files.

2003-11-24  Paul Eggert  <eggert@@twinsun.com>

	Parse floating-point operands and options in the C locale.
	POSIX requires this for printf, and we might as well be
	consistent elsewhere (tail, sleep, seq).

	* src/printf.c: Remove decls of strtod, strtol, strtoul; no longer
	needed now that we assume C89.  Include "c-strtod.h".
	(xstrtod): Call c_strtod, not strtod.
	* src/sleep.c: Include "c-strtod.h".
	(main): Update xstrtod call to include new argument, c_strtod.
	* src/seq.c (scan_double_arg): Likewise.
	* src/tail.c (parse_options): Likewise.

2003-11-24  Jim Meyering  <jim@@meyering.net>

	* tests/rm/fail-2eperm: Handle another errno variant (HPUX, EPERM).
	Reported by Mark Conty.

2003-11-22  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_xalloc_h_in_src): Remove rule.  Subsumed by...
	(sc_system_h_headers): Do this test only if sys2.h exists.

2003-11-20  Jim Meyering  <jim@@meyering.net>

	* tests/help-version: Ensure that the bug-reporting address is
	included in the --help output for every program.
	* tests/Makefile.am (TESTS_ENVIRONMENT): Add $PACKAGE_BUGREPORT.

	* src/ptx.c (usage): Output bug-reporting address.
	Reported by Dan Jacobson.

2003-11-19  Jim Meyering  <jim@@meyering.net>

	* src/join.c (usage): Mention that FILE1 and FILE2 must be sorted
	on the join fields.  Suggestion from Bruce Robertson.

2003-11-18  Jim Meyering  <jim@@meyering.net>

	`od -c -w9999999' could segfault
	* src/od.c (dump): Use xnmalloc/free, not alloca.

2003-11-16  Jim Meyering  <jim@@meyering.net>

	* Use autoconf-2.59.  Regenerate dependent files.

	* tests/du/hard-link: Minor tweak: use mkdir -p.

	Fix read-from-free'd-buffer error detected by valgrind.
	* src/csplit.c (remove_line): Don't return a pointer to data in
	a freed buffer.  Instead, arrange to free the buffer on the
	subsequent call.

	* tests/misc/csplit: New test for above fix.

2003-11-11  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (extract_dirs_from_files): Avoid useless copy operations.
	This avoids a warning from valgrind about memcpy with overlapping
	source and destination.

	* configure.ac: Require automake-1.7.8.

2003-11-09  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.7.9.  Regenerate dependent files.

	* src/rm.c: Support new options: --preserve-root and --no-preserve-root.
	* src/chown.c: Likewise.

	* src/chown-core.c: Include "root-dev-ino.h".
	(chopt_init): Initialize new member.
	(change_file_owner): Support rm's new --preserve-root option.

	* src/remove.c: Include "root-dev-ino.h".
	(remove_cwd_entries): Remove now-obsolete FIXME comment.
	(remove_dir): Support rm's new --preserve-root option.

	* src/chown.c: Include "root-dev-ino.h".
	Add new options: --preserve-root and --no-preserve-root.

	* src/chmod.c: Include "root-dev-ino.h".
	(process_file): Use newly-factored-out ROOT_DEV_INO_CHECK and
	ROOT_DEV_INO_WARN macros.
	(get_root_dev_ino): Remove function definition, now that it's
	been moved to a separate file.
	(usage): Describe new options.

	* src/mv.c (rm_option_init): Initialized new member.

	* src/remove.h: Include "dev-ino.h".
	(struct rm_options): Add new member: root_dev_ino.
	* src/chown-core.h: Include "dev-ino.h".
	(struct Chown_option): Add new member: root_dev_ino.

2003-11-06  Jim Meyering  <jim@@meyering.net>

	* src/paste.c (paste_parallel): Use `sizeof *var' rather than
	hard-coding `sizeof FILE*'.

2003-11-05  Dennis Smit  <ds@@nerds-incorporated.org>

	* src/wc.c (main): Free `fstatus' so there is no confusion about
	whether it's leaked or not.
	* src/who.c (who): Likewise for `utmp_buf'.

2003-11-05  Paul Eggert  <eggert@@twinsun.com>

	Fix 'cut' problems with size_t overflow and unsigned int.
	More generally, resize integer variables to fit use more precisely.
	* src/cut.c (ADD_RANGE_PAIR): Remove unnecessary parens.
	(struct range_pair): Make members to be of type size_t, not unsigned.
	(max_range_endpoint, eol_range_start): Now size_t, not unsigned.
	(suppress_non_delimited, output_delimiter_specified,
	have_read_stdin, print_kth, set_fields): Now bool, nt int.
	(delim): Now unsigned char, not int.
	(mark_printable_field, is_printable_field, is_range_start_index,
	set_fields, set_fields, cut_bytes, cut_fields):
	Use size_t, not unsigned, for field and byte counts.
	(hash_int): Use uintptr_t, not unsigned, for pointers converted
	to integers.  This squeezes more info out of them.
	(set_fields, cut_bytes, cut_fields, main):
	Use bool, not int, for booleans.
	(set_fields): Allocate zeroed byte array with xzalloc, not xcalloc.

2003-11-05  Paul Eggert  <eggert@@twinsun.com>

	* man/Makefile.am (check-programs-vs-x):
	Work even if $(programs) contains '$'.
	Work even if 'missing=1' in environment.
	Don't report an error simply because $(programs) outputs nothing.

2003-11-05  Jim Meyering  <jim@@meyering.net>

	* Use autoconf-2.58.  Regenerate dependent files.

	* src/tr.c (spec_init): Fix typo in last change.

	* src/sys2.h (case_GETOPT_VERSION_CHAR): Cast NULL to `(char *)' in
	call to variadic version_etc function, so that it works even on systems
	for which sizeof char* != sizeof int.
	* src/true.c (main): Likewise.
	* basename.c, chroot.c, cksum.c, dd.c, dirname.c, echo.c, expr.c:
	* factor.c, hostid.c, hostname.c, link.c, logname.c, nice.c, nohup.c:
	* pathchk.c, printenv.c, printf.c, pwd.c, setuidgid.c, sleep.c, stty.c:
	* sync.c, test.c, tsort.c, unlink.c, uptime.c, users.c, whoami.c, yes.c:
	Similarly, cast NULL to `(char *)' in call to variadic function,
	parse_long_options, so that it works even on systems for which
	sizeof char* != sizeof int.
	A similar problem was reported by Harti Brandt in
	http://mail.gnu.org/archive/html/bug-gnu-utils/2003-10/msg00320.html.

	* src/users.c (users): Free `utmp_buf' explicitly so that people
	don't mistake this for a real leak.
	Patch by Dennis Smit <ds@@nerds-incorporated.org.

2003-11-04  Paul Eggert  <eggert@@twinsun.com>

	* README: Document _POSIX2_VERSION.

2003-11-04  Jim Meyering  <jim@@meyering.net>

	* src/tac.c (memrchr): Remove #if-0'd function.
	(tac_stdin_to_mem): Clean up #if-0'd code.

	* src/od.c (decode_format_string): Remove unnecessary casts.
	Use more maintainable `sizeof *var'.
	(main): Call decode_format_string rather than decode_one_format,
	now that `spec' may be NULL.

	* src/chmod.c (AUTHORS): Add my name.

	* src/split.c (next_file_name): Use `sizeof *var' rather than
	hard-coding `sizeof size_t'.

	* src/sort.c (new_key): Use xzalloc, not xcalloc (1, ...).

	* src/cut.c (ADD_RANGE_PAIR): Use x2nrealloc rather than xrealloc,
	to avoid potential overflow in pointer arithmetic.
	(set_fields): Use not `1', but rather `sizeof *printable_field' as
	second argument to xcalloc.
	* src/od.c (decode_format_string, dump_strings): Use x2nrealloc
	rather than xrealloc.
	* src/date.c (show_date): Likewise.
	* src/join.c (ADD_FIELD, initseq, getseq): Likewise.
	* src/pr.c (store_char): Likewise.
	* src/fold.c (fold_file): Likewise.

	* src/copy.c (triple_hash, triple_hash_no_name): Adjust to reflect
	type changes (unsigned int -> size_t) in hash.c.
	* src/cp-hash.c (src_to_dest_hash): Likewise.
	* src/du.c (entry_hash): Likewise.
	* src/ls.c (dev_ino_hash): Likewise.
	* src/cut.c (hash_int): Likewise.  Declare function as static.

2003-11-03  Jim Meyering  <jim@@meyering.net>

	* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define PACKAGE_VERSION.
	* tests/misc/fold: Fail the test immediately if we're not running
	the expected version of fold.

2003-11-02  Jim Meyering  <jim@@meyering.net>

	* src/tr.c (append_normal_char, append_range, append_char_class)
	(append_repeated_char, append_equiv_class, spec_init): Use `sizeof *var'
	rather than `sizeof EXPLICIT_TYPE'.  The former is more maintainable
	and usually shorter.
	* src/copy.c (copy_internal): Likewise.
	* src/join.c (initseq, add_field, make_blank): Likewise.
	* src/od.c (main): Likewise.
	* src/cp.c (make_path_private): Likewise.
	* src/tsort.c (new_item, record_relation): Likewise.

	* src/df.c (add_fs_type, add_excluded_fs_type, main): Likewise.
	(main): Also remove anachronistic cast of xmalloc return value.
	* src/ptx.c (alloc_and_compile_regex, main): Likewise.
	(main): Also remove anachronistic cast of xmalloc return value.
	* src/sort.c (inittables): Likewise.
	(sort): Also Split a long line.

2003-10-25  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (triple_hash, triple_hash_no_name): Adjust to reflect
	type changes (unsigned int -> size_t) in hash.c.
	* src/cp-hash.c (src_to_dest_hash): Likewise.
	* src/du.c (entry_hash): Likewise.
	* src/ls.c (dev_ino_hash): Likewise.
	* src/cut.c (hash_int): Likewise.  Declare function as static.

2003-10-21  Jim Meyering  <jim@@meyering.net>

	Don't fail when run with VERBOSE=yes.
	* tests/chgrp/basic: Do `set +x' before starting the subshell
	from which we invoke chgrp.  Otherwise, the output from the
	VERBOSE=yes-induced `set -x' would result in spurious differences.
	Reported by Russel Coker via Michael Stone.

2003-10-19  Jim Meyering  <jim@@meyering.net>

	chmod now uses fts to perform a directory traversal when -R is
	specified.  Before, it operated on full path names, and as such
	would encounter the PATH_MAX (often 4096) limit.

	* src/chmod.c: Include "xfts.h".
	(process_file): Rename from change_file_mode.
	Adapt to be used with fts.
	(process_files): New function.

2003-10-18  Jim Meyering  <jim@@meyering.net>

	* tests/du/deref-args: Ensure that du -D now dereferences all
	symlinks specified on the command line, not just those that
	reference directories.

	* basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c:
	* dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c:
	* hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c:
	* mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c:
	* printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c:
	* split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c:
	* touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c:
	* who.c, whoami.c, yes.c (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
	of 2003-09-19.  Now, AUTHORS is a comma-separated list of strings.
	Update the call to parse_long_options so that `AUTHORS, NULL' are the
	last parameters.
	* src/true.c (main): Append NULL to version_etc argument list.
	* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.

2003-10-17  Andreas Schwab  <schwab@@suse.de>

	* tests/mk-script: Get $srcdir from first parameter instead of
	hardcoding it.
	(main): Update usage.

	* tests/Makefile.am.in ($(srcdir)/$x-tests): Pass $(srcdir) as
	first argument of mk-script.
	($(srcdir)/Makefile.am): Likewise.  Prepend $(srcdir) to target.

2003-10-17  Jim Meyering  <jim@@meyering.net>

	* src/mv.c (usage): Tweak descriptions of -i and -f so that the
	generated `man' page is more readable.  Suggestion from Dan Jacobson.

	* src/chown-core.c (change_file_owner): Handle the cases in
	which fts_info indicates an error with the given entry.

	* src/du.c (main): Simply assign to bit_flags.
	Don't bother with bit arithmetic.

	* tests/chmod/no-x: New file.
	* tests/chgrp/no-x: New file.
	* tests/chmod/Makefile.am (TESTS): Add no-x.
	* tests/chgrp/Makefile.am (TESTS): Likewise.

	* src/du.c: Include "xfts.h".
	(du_files): Use xfts_open, rather than fts_open.
	* src/chown-core.c (chown_files): Likewise.

2003-10-16  Jim Meyering  <jim@@meyering.net>

	* src/chgrp.c (main): Simply assign to bit_flags.
	Don't bother with bit arithmetic.
	* src/chown.c (main): Likewise.
	Rename a couple of local variables.
	Remove unnecessary casts.

	* src/tail.c (start_bytes): Rename local, remainder, to avoid
	gcc's warning about shadowing a global.

2003-10-15  Jim Meyering  <jim@@meyering.net>

	chown and chgrp now accept POSIX-mandated -H, -L, -P options and
	use fts to perform a directory traversal when -R is specified.
	Before, they operated on full path names, and as such would
	encounter the PATH_MAX (often 4096) limit.
	They are more efficient.  For example, before, chgrp -R would
	take almost 5 seconds to change about 2000 directories and fail
	(with `File name too long'), while now it succeeds on a hierarchy
	of depth 20,000 in 1/10 the time.

	* src/chown.c: Include "userspec.h" and "fts_.h".
	(WRITTEN_BY): Add my name.
	(getpwnam, getgrnam, getgrgid): Remove declarations.
	(endpwent): Remove definition.
	(usage): Update.
	(main): Handle new options.
	Call new function, chown_files rather than change_file_owner.

	* src/chgrp.c: Include "fts_.h".
	(WRITTEN_BY): Add my name.
	(MAXUID, MAXGID): Remove definitions.  Use GID_T_MAX instead of
	the latter.
	(usage): Update.
	(main): Handle new options.
	Call new function, chown_files rather than change_file_owner.

	Rewrite to iterate through hierarchies using fts rather than
	via explicit recursion.
	* src/chown-core.c: Include "fts_.h"
	(change_file_owner): Rewrite to use FTS* and FTSENT* and to operate
	on a single file at a time.
	(chown_files): New function.
	* src/chown-core.h [enum Dereference_symlink]: Remove declaration.
	[struct Chown_option] (recurse, force_silent): Change type to `bool'.
	[struct Chown_option] (dereference): Remove member with ambiguous name.
	[struct Chown_option] (affect_symlink_referent): New member.
	(chown_files): New prototype.

	* tests/chgrp/recurse: Update tests accordingly.
	* tests/chgrp/posix-H: New tests for the above.
	* tests/chgrp/Makefile.am (TESTS): Add posix-H.

	* src/ln.c (usage): Clarify that --directory, -d, -F probably won't
	work even for superuser.  Suggestion from Dan Jacobson.

2003-10-14  Paul Eggert  <eggert@@twinsun.com>

	Fix some number-parsing bugs, e.g., "head -n 100k@@" wasn't
	properly diagnosed.
	* lib/human.c, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
	lib/xstrtoul.c, lib/xstrtoumax.c: Sync with gnulib.
	* src/sort.c (parse_field_count): Handle the case where overflow
	and invalid suffix char are both reported.

2003-10-14  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (decode_switches) [TIOCGWINSZ]: Comment out the
	warning-inducing test, ws.ws_col <= SIZE_MAX, since it was always
	true on Linux.

2003-10-13  Paul Eggert  <eggert@@twinsun.com>

	Fix to avoid a denial-of-service attack if the display width is
	enormous.  Also, clean up the code a bit by removing duplicate code.

	* src/ls.c (init_column_info): Remove forward decl; no longer needed.
	(calculate_columns): New function, that contains code that used
	to be common to print_many_per_line and print_horizontal.
	(print_many_per_line, print_horizontal): Use it.
	(decode_switches): Set max_idx here, not in calculate_columns.
	(print_current_files): Don't call init_column_info; calculate_columns
	now does that.
	(init_column_info): Don't allocate a lot more space than is needed
	to represent the current set of files.  Allocate all the new
	size_t cells in one call to xnmalloc, rather than a row at a time.

2003-10-13  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (init_column_info): Add another FIXME comment.

2003-10-13  Paul Eggert  <eggert@@twinsun.com>

	Fix address-arithmetic bug in 'ls', reported by Georgi Guninski.
	Remove several arbitrary limits on hosts where int cannot represent
	all size_t values.

	* src/ls.c (struct bin_str.len, length_of_file_name_and_frills, indent,
	nfiles, files_index, tabsize, line_length, struct column_info.line_len,
	struct column_info.col_arr[0], max_idx):
	Now size_t, not int.
	(get_funky_string): Return bool indicating success, instead of
	a negative count to indicate failure.  Store number of columns
	through new parameter OUTPUT_COUNT; that way, they can never
	go negative.  Change equals_end from int to bool.  All uses
	changed.
	(struct column_info.valid_len): Now bool, not int.  All uses changed.
	(dired_dump_obstack, get_funky_string, clear_files,
	extract_dirs_from_files, print_current_files,
	print_many_per_line, print_horizontal, init_column_info,
	put_indicator, length_of_file_name_and_frills,
	print_with_commas): Use size_t, not int, for local variables
	that count sizes.
	(decode_switches): Decode sizes using xstrtoul, not xstrtol.
	Check for TIOCGWINSZ returing negative values (or values greater
	than SIZE_MAX!).
	(visit_dir, main, parse_ls_color, queue_directory, add_ignore_pattern,
	init_column_info):
	Use xmalloc and xnmalloc, not XMALLOC.
	(gobble_file): Use xnrealloc, not XREALLOC.
	(print_color_indicator): Remove now-unnecessary cast to size_t.

2003-10-12  Paul Eggert  <eggert@@twinsun.com>

	* tests/du/no-x: Change wording of diagnostic to match latest du.c.
	* tests/sort/sort-tests: Remove from CVS; assume that people
	brave enough to check coreutils out from CVS can rebuild it.

2003-10-12  Jim Meyering  <jim@@meyering.net>

	New options: --preserve-root and --no-preserve-root.
	* src/chmod.c (change_file_mode): Honor new option.
	(change_file_mode): Strip trailing slashes on directory
	argument passed to change_dir_mode.
	(get_root_dev_ino): New function.
	(main): Initialize global, root_dev_ino.

	* src/copy.c (copy_internal): Don't #ifdef-out simple uses of
	S_ISLNK or S_ISSOCK.  The S_IS* macros are guaranteed to be defined
	via system.h.
	* src/chmod.c (change_file_mode): Likewise.

2003-10-08  Jim Meyering  <jim@@meyering.net>

	* src/csplit.c (main): Remove obsolete FIXME.

2003-10-07  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.7.8.  Regenerate dependent files.

2003-09-29  Paul Eggert  <eggert@@twinsun.com>

	csplit cleanup.

	* doc/coreutils.texi (csplit invocation):
	The regexp offset need not have a sign; POSIX requires support
	for signless offets.

	Be more careful about int widths.  For example, remove some
	arbitrary limits by replacing 'unsigned' with 'size_t',
	'uintmax_t', etc.  Use standard bool rather than a homegrown type.
	* lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
	* src/csplit.c (FALSE, TRUE, boolean): Remove.  All uses changed
	to <stdbool.h> usage.
	(struct control): offset is now intmax_t, not int.
	repeat_forever is now bool, not int.
	(struct cstring): len is now size_t, not unsigned int.
	(struct buffer_record): bytes_alloc, bytes_used, num_lines are now
	size_t, not unsigned.  start_line, first_available are now
	uintmax_t, not unsigned.
	(hold_count, control_used): Now size_t, not unsigned.
	(last_line_number, current_line, bytes_written):
	Now uintmax_t, not unsigned.
	(save_to_hold_area, red_input, keep_new_line, record_line_starts,
	create_new_buffer, get_new_buffer, load_buffer, find_line,
	process_regexp, split_file, new_control_record, extract_regexp,
	get_format_width, get_format_prec, max_out):
	size args, locals, and returned values are now size_t, not unsigned
	or int.
	(get_first_line_in_buffer, find_line, write_to_file,
	handle_line_error, process_line_count, regexp_error, process_regexp,
	split_file):
	File line, byte, and repetition counts are now uintmax_t, not unsigned.
	(check_for_offset): Don't require a sign before the offset.
	Use xstrtoimax to do the real work.
	(extract_regexp): Remove harmful cast of size to unsigned.
	256 -> 1<<CHAR_BIT, for clarity.
	(get_format_flags): Return at most 3, to avoid worries about overflow.

	(bytes_to_octal_digits): Remove.

	(cleanup): Don't check whether output_stream is NULL, since
	close_output_file does that for us.

	(new_line_control, create_new_buffer): Use "foo *p = xmalloc
	(sizeof *p);" instead of the more long-winded alternatives.

	(get_new_buffer): Use O(1) algorithm for resizing a buffer
	to a much larger size, instead of an O(N) algorithm.

	(process_regexp): Use plain NULL rather than casted 0.

	(make_filename): Use %u, not %d, to format unsigned file number.

	(new_control_record): Use xrealloc exclusively, since it handles
	NULL reliably.

	(extract_regexp): Change misspelled word in diagnostic.

	(get_format_width): Even if a minimum field width is specified,
	allow room for enough octal digits to represent the value of
	the maximum representible integer.  This fixes a potential
	buffer overrun.  Calculate this room at compile-time, not
	at run-time; this removes the need for bytes_to_octal_digits.
	Check for overflow; this removes a FIXME.

	(get_format_prec): Don't allow precision to be signed; it's
	not ANSI.  Check for overflow.  Remove hardcoded "11" as
	default precision; this fixes a potential buffer overrun
	on hosts with wider size_t.

	(get_format_conv_type): Change local variable to be of type
	unsigned char, not int; this removes a potential subscript
	violation on hosts where char is signed.

	(max_out): Replace "for (;*p;)" with more-standard "while (*p)".
	Allow "%%" in format.  Don't overflow when
	counting lots of percents.

	(usage): Default sprintf format is %02u, not %d.

2003-10-05  Jim Meyering  <jim@@meyering.net>

	* src/chown-core.c (change_file_owner): Remove set-but-not-used local.

	* src/du.c (du_files): Mark diagnostic for translation.

2003-10-04  Jim Meyering  <jim@@meyering.net>

	* src/du.c (du_files): Ignore any failure of fts_close.
	Give better diagnostics for failed fts_open.

	* src/du.c (MAX_N_DESCRIPTORS): Remove now-unused definition.

	Deprecate existing use of -H (aka --si).
	* src/du.c (enum) [HUMAN_SI_OPTION]: New member.
	[long_options]: Use HUMAN_SI_OPTION, not 'H'.
	(main): Warn that the meaning of -H will soon change to be
	POSIX compliant.

2003-10-03  Jim Meyering  <jim@@meyering.net>

	* src/du.c: Accept --no-dereference (-P).

2003-10-02  Jim Meyering  <jim@@meyering.net>

	* tests/du/trailing-slash: Adjust for slightly different output.

	Rewrite du.c to use fts.
	* src/du.c: Include "fts_.h", not ftw.h.
	(opt_dereference_arguments, arg_length, suffix_length): Remove globals.
	(IS_FTW_DIR_TYPE): Remove definition.
	(IS_DIR_TYPE): Define.
	(is_symlink_to_dir): Remove now-unnecessary function.
	(process_file, du_files): Rewrite to use fts.

	* tests/du/inaccessible-cwd: Ensure that even when run from an
	inaccessible directory, du can still operate on accessible
	directories elsewhere.
	* tests/du/Makefile.am (TESTS): Add inaccessible-cwd.

	* tests/rm/deep-1: Ensure that du can process a hierarchy
	of depth 400 while using no more than 50KB of stack space.

2003-10-01  Akim Demaille  <akim@@epita.fr>

	* announce-gen (print_news_deltas): New function, extracted from main.
	(main): Make `news_file' an array.
	Use '...=s' => \@@var for --news and --url-directory specs.
	Before there were a couple of portability problems.

2003-09-28  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_cast_of_alloca_return_value): New rule.
	(syntax-check-rules): Add it.

	* src/copy.c: Remove unnecessary cast of alloca, since now it's
	guaranteed to be (void *).
	* src/cp.c: Likewise.
	* src/join.c: Likewise.
	* src/ln.c: Likewise.
	* src/ls.c: Likewise.
	* src/od.c: Likewise.
	* src/sys2.h (ASSIGN_STRDUPA): Likewise.

2003-09-27  Jim Meyering  <jim@@meyering.net>

	Don't exhaust virtual memory when processing large inputs.
	Fix this by removing csplit's internal free-list management;
	instead rely on malloc for that.

	* src/csplit.c (free_list): Remove global.
	(clear_all_line_control): Remove function.
	(get_new_buffer): Always use create_new_buffer to obtain a
	new buffer, rather than searching free_list.
	(free_buffer): Just call free.
	Reported by Nikola Milutinovic.

2003-09-26  Jim Meyering  <jim@@meyering.net>

	* man/rm.x: Also list `chattr' in SEE ALSO section.
	Suggestion from Mark Hubbart.

2003-09-25  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Don't invoke AC_AIX or AC_MINIX explicitly, now
	that we use gl_USE_SYSTEM_EXTENSIONS, since it AC_REQUIREs them.

	* Use autoconf-2.57d.  Regenerate dependent files.

2003-09-24  Jim Meyering  <jim@@meyering.net>

	Minor efficiency tweak.
	* src/ln.c (PATH_BASENAME_CONCAT): Use memcpy rather than strcpy.
	(do_link): Likewise.

2003-09-23  Jim Meyering  <jim@@meyering.net>

	* src/paste.c (paste_serial): Save errno after input error,
	to report proper errno value.
	Based on a patch from Paul Eggert.

	* src/tee.c (tee): Adjust fwrite arguments so that the return
	value is the number of bytes written.

2003-09-16  Paul Eggert  <eggert@@twinsun.com>

	Don't assume ferror sets errno.  Bug reported by Bruno Haible.

	* src/comm.c (compare_files): Save errno after input error,
	to report proper errno value.
	* src/fold.c (fold_file): Likewise.
	* src/od.c (check_and_close, skip, read_char, read_block): Likewise.
	* src/unexpand.c (unexpand): Likewise.

	* src/csplit.c (close_output_file): Don't report bogus errno value
	after ferror discovers an output error.  We don't know the proper
	errno value, since it might have been caused by any of a whole
	bunch of calls, and it might have been trashed in the meantime.
	Fixing this problem will require much more extensive changes;
	in the meantime just say "write error".
	* src/od.c (check_and_close, dump, dump_strings): Likewise.
	* src/uniq.c (check_file): Likewise.

	* src/join.c (get_line): Report error right away if I/O fails,
	so that the proper errno value is used.
	* src/tac.c (tac_seekable, tac_file, save_stdin): Likewise.
	* src/tee.c (tee): Likewise.
	* src/uniq.c (check_file): Likewise.

	* src/od.c (skip): If a read fails, don't retry it later, so
	that we report the proper errno.

	* src/tac.c (tac_mem): Don't return a value; nobody uses it.

	* src/tee.c (tee): Once a write failure has occurred, don't bother
	writing anything more to that stream.

	* src/uniq.c (check_file): Check for ferror (stdout) even if
	ostream == stdout.

	* src/yes.c (UNROLL): Remove.
	(main): Exit immediately when write failure is detected.
	Simplify code by assigning to argv when argc == 1.

2003-09-21  Paul Eggert  <eggert@@twinsun.com>

	* src/ptx.c: Switch encoding from Latin-1 to UTF-8.
	(WRITTEN_BY): Change "Franc,ois" (actually using
	c-with-cedilla in Latin-1) to "F.", so that it's ASCII, as
	xgettext requires.

2003-09-19  Jim Meyering  <jim@@meyering.net>

	`du -D symlink-to-dir' would mistakenly omit the slash in
	lines like this: 24	symlink-to-dir/subdir
	* src/du.c (process_file): Fix offset calculation.
	Reported by Jeff Sheinberg as Debian bug #211591;
	http://bugs.debian.org/205251

	* tests/du/deref-args: New file/test for the above.
	* tests/du/Makefile.am (TESTS): Add deref-args.

	* src/du.c (process_file): Remove useless disjunct.

	* src/sys2.h (case_GETOPT_VERSION_CHAR): Rename parameter, Authors,
	to Written_by.
	* nearly all src/*.c files (WRITTEN_BY): Rename from AUTHORS.
	Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
	Mark each WRITTEN_BY string as translatable.

	* basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c:
	* dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c:
	* hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c:
	* mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c:
	* printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c:
	* split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c:
	* touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c:
	* who.c, whoami.c, yes.c: Revert yesterday's changes.
	Instead, a subsequent change will embed `Written by ' in
	each string along with the author names.

	* src/true.c: Revert yesterday's changes.
	* src/sys2.h: Likewise.

2003-09-18  Jim Meyering  <jim@@meyering.net>

	* basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c:
	* dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c:
	* hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c:
	* mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c:
	* printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c:
	* split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c:
	* touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c:
	* who.c, whoami.c, yes.c: Update AUTHORS definition to be a
	comma-separated list of strings and/or update the call to
	parse_long_options so that `AUTHORS, NULL' are the last parameters.
	* src/true.c (main): Append NULL to version_etc argument list.
	* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.

	* src/sort.c (numcompare): Rename local, logb, to log_b to avoid
	shadowing the math function name.  Also rename loga to log_a.

2003-09-14  Jim Meyering  <jim@@meyering.net>

	* src/factor.c (print_factors): Give a separate diagnostic
	for numbers that are too large, but otherwise valid.
	Reported by Dániel Varga.

2003-09-10  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.7.7.  Regenerate dependent files.

	* tests/Makefile.am (all_programs): Use ../src/tr -s ' ' '\n' in place
	of `fmt -1'.  Using the just-built tr is a little cleaner.
	Christian Krackowizer reported that HPUX 10.20 doesn't have fmt.
	* man/Makefile.am (programs, check-x-vs-1): Likewise.

2003-09-09  Jim Meyering  <jim@@meyering.net>

	* src/copy.c: Alphabetize includes.
	Remove duplicate inclusion of "same.h".

2003-09-08  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (GZIP_ENV): Remove --rsyncable.
	Didn't give enough of a benefit, mainly because it's not yet
	in wide enough use.

	* Version 5.0.91.

	* man/Makefile.am (programs): Use ../src, not $(srcdir)/../src.
	(check-programs-vs-x): Fail if $(programs) is empty.

	* src/remove.c: Add a comment.

2003-09-07  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (D_INO, ENABLE_CYCLE_CHECK) [D_INO_IN_DIRENT]:
	Don't define.  These symbols are no longer used.

	* tests/misc/tty-eof: Write ^D as \cD.
	Complete the change of 2003-08-02.

	* Makefile.maint (po-check): Use cvsu, so that a temporary source
	file in lib/ or src/ doesn't induce an unwarranted failure.
	Add a kludge to filter out the sole generated source file that
	also has translatable messages: src/false.c.

2003-09-06  Jim Meyering  <jim@@meyering.net>

	* src/tail.c (enum): Add ALLOW_MISSING_OPTION.
	(parse_options): Give a diagnostic for (but still accept) the
	deprecated --allow-missing option.

2003-09-04  Paul Eggert  <eggert@@twinsun.com>

	Don't ignore -S if input is a pipe.  Bug report by Michael McFarland in
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00008.html>.

	* src/sort.c (sort_buffer_size): Omit SIZE_BOUND arg.  Compute the
	size_bound ourselves. if an input file is a pipe and the user
	specified a size, use that size instead of trying to guess the
	pipe size.  This has the beneficial side effect of avoiding the
	overhead of default_sort_size in that case.  All callers changed.
	(sort): Remove static var size; now done by sort_buffer_size.

2003-09-05  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.7.6b and autoconf-2.57b.  Regenerate dependent files.

	* tests/tail-2/tail-n0f: Wait .5 seconds for backgrounded process
	to start, rather than just .1.  Upon failure, print unexpected state.

2003-09-04  Paul Eggert  <eggert@@twinsun.com>

	* src/head.c (elide_tail_lines_pipe): Don't assign 0 or
	SAFE_READ_ERROR to tmp->nbytes.
	* src/tail.c (pipe_lines, pipe_bytes): Likewise.

	* src/head.c (struct linebuffer): Change nbytes and nlines
	from unsigned int to size_t.  unsigned int is safe (after the
	2003-09-03 patch) but size_t is cleaner.
	* src/tail.c (struct linebuffer, struct charbuffer): Likewise.
	(pipe_bytes): Likewise for local variable 'i', which was 'int'.

	Standardize on BUFSIZ as opposed to other macro names and values.
	* src/head.c (BUFSIZE): Remove.  All uses changed to BUFSIZ.
	* src/tail.c (BUFSIZ) [!defined BUFSIZ]: Remove.
	stdio.h has always defined it,
	and other code already assumes it's defined.
	* src/tr.c (BUFSIZ) [!defined BUFSIZ]: Likewise.
	(IO_BUF_SIZE): Remove; replace all uses with sizeof io_buf.
	(io_buf): IO_BUF_SIZE -> BUFSIZ.

2003-09-04  Paul Eggert  <eggert@@twinsun.com>

	* src/seq.c (step): Default to 1.
	(print_numbers): Allow the output to be empty.
	(main): The default step is 1, even if LAST < FIRST;
	as per documentation.
	* tests/seq/basic (onearg-2): Output should be empty.

2003-09-05  Jim Meyering  <jim@@meyering.net>

	* Makefile.cfg (wget_files): Temporarily disable, until master
	versions are restored to ftp.gnu.org.

	* configure.ac (AM_INIT_AUTOMAKE): Specify automake-1.7.6.

	Make seq's --width (-w) option work properly even when the
	endpoint requiring the larger width is negative and smaller than
	the other endpoint.
	* src/seq.c (get_width_format): Include `-' in the set of bytes
	allowed in a `simple' number (no decimal point, no exponent).
	Reported by Patrick Mauritz.

2003-09-02  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: sort -t '\0' now uses a NUL tab.
	sort option order no longer matters, unless POSIX requires it.
	* src/sort.c (usage): Say "blanks" instead of "whitespace",
	Similar fixes for many comments.
	(TAB_DEFAULT): New constant, so that we can support NUL as
	the field separator.
	(tab): Now int, not char.  Initialize to TAB_DEFAULT.
	(specify_sort_size): If multiple sizes are specified, use the largest.
	(begfield, limfield): Support NUL tab char.
	(set_ordering): Do not let -i override -d.
	(main): Report an error if incompatible -o or -t options are given.
	Report an error for "-t ''".  Allow "-t '\0'" to specify a NUL tab.

2003-09-05  Jim Meyering  <jim@@meyering.net>

	* tests/sort/Test.pm [o2, nul-tab]: New tests for the above.

2003-09-03  Andreas Schwab  <schwab@@suse.de>

	Bug report and patch here:
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00009.html>
	* src/tail.c (pipe_lines): Don't truncate return value from safe_read.
	* src/head.c (elide_tail_lines_pipe): Likewise.

2003-09-03  Jim Meyering  <jim@@meyering.net>

	* src/du.c (AUTHORS): Remove Larry McVoy's name, since the relatively
	small amount of code from him was first moved to lib/human.c, and was
	subsequently rewritten entirely.
	* src/df.c (AUTHORS): Likewise.

2003-08-22  Lawrence Teo  <lcteo@@uncc.edu>

	* src/md5sum.c (split_3): Accept the BSD format for generic
	message digest modes.  Currently works with BSD's MD5 and SHA1
	formats since these are the two algorithms presently used in
	coreutils.  Updated comments to reflect this change.
	(bsd_split_3): Updated comments.

	* tests/md5sum/basic-1: New test to make sure that
	`md5sum --check' doesn't accept the BSD SHA1 format (adapted
	from `check-bsd' test in tests/sha1sum/basic-1).

	* tests/sha1sum/basic-1 (check-bsd2, check-bsd3): New tests for
	--check exit status and BSD SHA1 format (adapted from tests
	in tests/md5sum/basic-1).

2003-08-30  Jim Meyering  <jim@@meyering.net>

	* src/ln.c (do_link): Use SAME_INODE rather than open-coding it.

	When source and destination arguments refer to the same file, reside
	on a partition (e.g. VFAT) on which distinct names may refer to the
	same directory entry (often due to variations in case), and when the
	link count for the file is 1, mv no longer unlinks the file.  Instead,
	it gives the expected diagnostic that the source and destination are
	the same.  WARNING: this is an incomplete fix.  If the file happens
	to have a link count of 2 or greater, such an erroneous mv command
	will still unlink it.
	Although that is not possible on vfat or umsdos, it is possible on
	other file system types, e.g., ntfs, and hpfs.
	* src/copy.c (same_file_ok): Invoke same_name (which might still
	return false for names that refer to the same directory entry)
	only if the link count is 2 or more.
	* tests/mv/vfat: Show how to demonstrate the above problem.
	This test is not run.
	* tests/mv/Makefile.am (EXTRA_DIST): Add vfat.

2003-08-27  Jim Meyering  <jim@@meyering.net>

	* src/who.c: Change meaning of -l from --lookup to --login, per POSIX.
	who's -l option has been eliciting an unconditional warning about
	this impending change since sh-utils-2.0.12 (April 2002).

	* src/paste.c (paste_parallel): Don't output `EOF' (aka -1) as a `char'.
	This would happen for nonempty files not ending with a newline.
	Reported by Dan Jacobson.
	* tests/misc/paste-no-nl: New file.  Test for above-fixed bug.
	* tests/misc/Makefile.am (TESTS): Add paste-no-nl.

	* src/stat.c (print_it): Avoid buffer overrun that would
	occur when the user-specified format string ends with `%'.
	Patch by Tommi Kyntola.
	* tests/misc/stat-fmt: New file.  Test for above-fixed bug.
	* tests/misc/Makefile.am (TESTS): Add stat-fmt.

2003-08-26  Jim Meyering  <jim@@meyering.net>

	Apply changes from bison.
	* GNUmakefile (SHELL): Define to `sh', if necessary.
	Add copyright.
	* Makefile.maint (WGETFLAGS): Define to `-C off'.
	Update all uses of $(WGET).

2003-08-22  Akim Demaille  <akim@@epita.fr>

	* Makefile.cfg (local-checks-to-skip): New.
	* Makefile.maint (local-check): Rename as...
	(local-checks-available): this.
	(local-check): New.

2003-08-26  Akim Demaille  <akim@@epita.fr>

	* announce-gen (print_changelog_deltas): Neutralize "<#" as
	"<\#" to avoid magic from Gnus when posting parts of this script.

2003-08-25  Jim Meyering  <jim@@meyering.net>

	* src/stat.c (main): Warn about use of deprecated `-l' option.

2003-08-22  Jim Meyering  <jim@@meyering.net>

	* src/stat.c (do_stat): For link count at end of line, use %h format,
	instead of %-5h.  The latter would make stat emit trailing spaces.
	Reported by Dan Jacobson.

2003-08-20  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (EXTRA_DIST): Add .x-sc_space_tab .x-sc_sun_os_names

2003-08-19  Jim Meyering  <jim@@meyering.net>

	* src/system.h: Include stdlib.h unconditionally,
	as we're now assuming that part of hosted C89.

2003-08-18  Jim Meyering  <jim@@meyering.net>

	* src/sys2.h (textdomain, bindtextdomain) [! ENABLE_NLS]: Define away,
	to avoid warnings from gcc.

2003-08-17  Jim Meyering  <jim@@meyering.net>

	Avoid unnecessary and sometimes time-consuming hostname lookups.
	* src/who.c (print_user): Use strchr, not strrchr.
	* src/pinky.c (print_entry): Likewise.
	Patch by Michael Stone.
	This fixes a typo I introduced in who-users.c on 1996-02-23.

	* Makefile.maint (makefile-check): Add 0-9 to the range of characters
	disallowed between `@@...@@'.

2003-08-16  Paul Eggert  <eggert@@twinsun.com>

	* configure.ac (fu_cv_sys_truncating_statfs): Remove; now
	done by gnulib .m4 files.
	(jm_DUMMY_1): Require gl_READUTMP, not jm_PREREQ_READUTMP.
	* src/sys2.h (strtoull): Remove unused declaration.

2003-08-16  Jim Meyering  <jim@@meyering.net>

	* man/Makefile.am (.x.1): Ensure that generated PROGRAM.1 files
	are read-only.

	* src/tail.c (tail_lines): Fix a potential (but very hard to exercise)
	race condition bug.  The bug would be triggered when tailing a file
	with file pointer not at beginning of file, and where the file was
	truncated to have a length of less than the initial offset at just
	the right moment (between the two lseek calls in this function).

	An invalid initial value for *read_pos would result in
	`tail -n0 -f FILE' and `tail -c0 -f FILE' doing what amounted to a
	busy-wait rather than sleeping between iterations.  The bug manifests
	itself only when tailing regular files that are initially nonempty.
	* src/tail.c (tail_bytes): Set *read_pos to new file offset after
	each xlseek call.
	(tail_lines): Likewise, after lseek calls.
	Reported by Nick Estes.  See http://bugs.debian.org/205251 for details.
	* tests/tail-2/tail-n0f: New file.  Test for above fix.
	* tests/tail-2/Makefile.am (TESTS): Add tail-n0f.

2003-08-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_space_tab): Use exclusion list in separate file.
	(sc_sun_os_names): Likewise.
	* .x-sc_space_tab, .x-sc_sun_os_names: New files.

	* man/help2man: Remove some SPACEs before TAB.

2003-08-14  Paul Eggert  <eggert@@twinsun.com>

	* Makefile.maint (LC_ALL): Set to C.
	* man/Makefile.am (ASSORT): New var.
	(check-x-vs-1, programs): Use it.
	* src/Makefile.am (ASSORT, check-README, ../AUTHORS): Likewise.
	* tests/Makefile.am (ASSORT, all_programs): Likewise.

2003-08-11  Jim Meyering  <jim@@meyering.net>

	fold -s -wN would infloop for N < 8 with TABs in the input.
	E.g., this would not terminate: printf 'a\tb' | fold -w2 -s
	* src/fold.c (fold_file): Move contents of `else'-block
	out of conditional so it's used also for --spaces (-s).
	* tests/misc/fold: Test for the above fix.
	* tests/misc/Makefile.am (TESTS): Add fold.

2003-08-10  Jim Meyering  <jim@@meyering.net>

	* src/nice.c [!NICE_PRIORITY]: Include <sys/resource.h> after
	system.h so the types from time.h and sys/time.h are available.
	It appears that this is necessary for OpenBSD, NetBSD, and
	Darwin 6.5 (MacOS 10.2.5).  Reported by Nelson Beebe.

2003-08-06  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Add support for setting file timestamps to microsecond
	resolution, on hosts that support this.
	* src/copy.c, src/cp.c, src/install.c, src/touch.c: Include utimens.h.
	* src/copy.c (copy_internal):
	Set file timestamps with utimens, not utime.
	* src/cp.c (re_protect): Likewise.
	* src/install.c (change_timestamps): Likewise.
	* src/touch.c (newtime, touch, main): Likewise.

2003-08-09  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_sun_os_names): New rule based on a regexp
	from Paul Eggert.
	(syntax-check-rules): Add it.

	* src/tail.c (main): Tweak Solaris OS version number in comment.
	* src/wc.c (wc): Likewise
	* tests/tail-2/fflush: Likewise.

	* src/tail.c: Add new undocumented option, --presume-input-pipe.
	(pipe_lines): Use memchr to skip lines, rather than an explicit loop.

2003-08-08  Paul Eggert  <eggert@@twinsun.com>

	Use new gnulib 'extensions' module.
	* configure.ac: Invoke gl_USE_SYSTEM_EXTENSIONS instead of
	AC_GNU_SOURCE.

2003-08-08  Paul Eggert  <eggert@@twinsun.com>

	* tests/du/basic: Ensure that a/b/F has at least 65 bytes too.

2003-08-09  Jim Meyering  <jim@@meyering.net>

	* tests/misc/split-fail: Reflect that `split -a 0' is now accepted.
	For tests of obsolete behavior, don't presume that unsetting
	_POSIX2_VERSION is equivalent to _POSIX2_VERSION=199209.

2003-08-07  Paul Eggert  <eggert@@twinsun.com>

	* doc/coreutils.texi (split invocation):
	Add -d or --numeric-suffixes option to 'split'.
	From a suggestion by Jesse Kornblum.
	* src/split.c (suffix_alphabet): New var.
	(longopts, usage, next_file_name, main): Support -d.
	(next_file_name, main): Allow -a0, as POSIX requires.
	(next_file_name): Don't assume ASCII-like encoding;
	'a' through 'z' are not contiguous in EBCDIC.

2003-08-05  Paul Eggert  <eggert@@twinsun.com>

	Merge getline from gnulib.
	* lib/getline.h, lib/getline.c, m4/getline.m4: Merge from gnulib.
	* lib/getndelim2.h, lib/getndelim2.c, m4/getndelim2.m4, m4/ssize_t.m4:
	New files, from gnulib.
	* lib/getdelim2.c, lib/getdelim2.h: Remove.
	* lib/Makefile.am (libfetish_a_SOURCES): Change getdelim2.c and
	getdelim2.h to getndelim2.c and getndelim2.h.
	* m4/jm-macros.m4 (jm_MACROS): Use gl_GETNDELIM2 rather than
	checking for getdelim.
	(jm_CHECK_ALL_TYPES): Use gt_TYPE_SSIZE_T for ssize_t rather
	than rolling our own.
	* src/cut.c: Include getndelim2.h rather than getdelim2.h.
	(cut_fields): Invoke getndelim2 rather than getdelim2.

2003-08-04  Jim Meyering  <jim@@meyering.net>

	* src/sort.c (main): Use unsigned int instead of int for `nsigs'
	and for the indices to iterate through nsigs.

2003-08-02  Paul Eggert  <eggert@@twinsun.com>

	* src/sort.c: Minor code cleanups, mostly to use more accurate
	types and to remove unnecessary casts.
	(min, max): Remove.  All uses changed to MIN and MAX.
	(hard_lc_collate, hard_LC_TIME, struct buffer.eof, struct
	keyfield.skipsblanks, struct keyfield.skipeblanks, struct
	keyfield.numeric, struct keyfield.general_numeric, struct
	keyfield.month, struct keyfield.reverse, reverse, unique,
	have_read_stdin): Now bool, not int.  All uses changed.
	(eolchar): Now char, not int.
	(struct keyfield.ignore): Now bool const *, not int *.
	(struct keyfield.translate): Now char const *, not char *.
	(struct month.name): Likewise.
	(blanks, nonprinting, nondictionary): Now bool[], not int[].
	(cleanup, inittables, keycompare, check, mergefps, first_same_file,
	check, sort, main): Use const * pointers when possible.
	(month_cmp): Rewrite to avoid casts.
	(inittables): Initialize tables unconditionally, to avoid branches.
	(fillbuf): Return bool, not int.  All uses changed.
	(fillbuf, keycompare, new_key, main):
	Use SIZE_MAX rather than (size_t) -1.
	(trailing_blanks): Renamed from trim_trailing_blanks.
	Return the number of blanks to trim.  All uses changed.
	(getmonth): Use trailing_blanks rather than open code.
	(keycompare): Do not cast char * to unsigned char *; not needed.
	CMP_WITH_IGNORE converts args to UCHAR, so no need to convert it
	ourselves.
	(compare, main): Use | rather than || to avoid jumps.
	Replace "diff = NONZERO (alen)" with "diff = 1", since alen must
	be nonzero there.
	(check, first_same_file, sort, main):
	Use bool instead of int local vars when possible.
	(check): Merge the old 'checkfp' and 'check' into a single function,
	that returns a boolean (true if the file was ordered).
	All uses changed.
	(main): Use int instead of unsigned for iterating through nsigs.
	Rename local var "posix_pedantic" to "posixly_correct".

2003-08-02  Jim Meyering  <jim@@meyering.net>

	* src/nice.c [!NICE_PRIORITY]: Include <time.h> before <sys/resource.h>
	to avoid compilation error on Ultrix. Reported by Christian Krackowizer.

	* src/cut.c (cut_fields): Don't read again after encountering an
	initial EOF.  E.g., `cut -f2' would do so.
	* tests/misc/tty-eof: Add a test for the above fix.

	* src/sort.c (sortlines): Add description and references.
	From Paul Eggert.

	* tests/Makefile.am (TESTS_ENVIRONMENT): Set PATH so that
	the tests in help-version will use the just-built binaries.
	Reported by Christian Krackowizer.

2003-07-31  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Add --rfc-2822 option to GNU date.
	* doc/coreutils.texi (Time directives, Options for date, Examples
	of date): Likewise.
	* src/date.c (long_options, usage, main): Likewise.
	* doc/getdate.texi (General date syntax): Likewise.
	* doc/coreutils.texi (Options for date): Fix a typo in format:
	it's now %d not %_d.  Add URLs.

2003-08-01  Jim Meyering  <jim@@meyering.net>

	* tests/shred/remove: Ensure that $? is 0 for the final `exit 0'.
	Otherwise, with at least the /bin/sh from HPUX 10.20,
	the trap code would end up converting that to exit 1 and thus an
	unexpected test failure.  Reported by Christian Krackowizer.

2003-07-31  Paul Eggert  <eggert@@twinsun.com>

	* src/ptx.c: Do not include bumpalloc.h.
	(WORD_TABLE): New member alloc.
	(ALLOC_NEW_WORD): Remove.
	(occurs_alloc): New var.
	(digest_word_file, find_occurs_in_text): Check for arithmetic
	overflow when computing table size.  Use xrealloc rather than
	bumpalloc primitives.

2003-07-29  Jim Meyering  <jim@@meyering.net>

	* Version 5.0.90.

	* README: When running tests as root, suggest using
	sudo with NON_ROOT_USERNAME=$USER.

	* tests/Makefile.am (all_programs): Makefile is in ../src, not
	$(srcdir)/../src.

2003-07-28  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (GZIP_ENV): Try Debian/gzip's new --rsyncable option.

2003-07-28  Paul Eggert  <eggert@@twinsun.com>

	* lib/stdbool.hin (_Bool): Make it signed char, instead of
	an enum type, so that it's guaranteed to promote to int.
	* src/sort.c (sortlines_temp): Undo previous change.

2003-07-28  Jim Meyering  <jim@@meyering.net>

	* src/sort.c (sortlines_temp): Declare local `swap' to be `int', not
	`bool'.  Otherwise, at least one buggy compiler (alpha gcc-2.95.4)
	would cause lines[-1 - swap] (with swap = false) to evaluate to
	lines[4294967295].

2003-07-27  Jim Meyering  <jim@@meyering.net>

	* tests/priv-check (my_uid): Use `!', not `^' in case pattern `[!0-9]',
	since /bin/sh of at least NetBSD 1.6 and OpenBSD 3.2 don't accept `^'.

	* src/remove.c (prompt) [! recursive]: Don't prompt about unwritable
	directories, as required by POSIX.   Reported by Karl Berry.
	* tests/rm/dir-no-w: New file.  Test for the above fix.
	* tests/rm/Makefile.am (TESTS): Add dir-no-w.

	* tests/mk-script: Emit `$xx', not its expansion.

2003-07-27  Paul Eggert  <eggert@@twinsun.com>

	This change was inspired by a similar proposal by Stepan Kasal.
	* src/sort.c (mergelines, sortlines_temp): New functions.
	(sortlines): Use them, to reduce the number of times that
	we need to copy 'struct line' values.  This improved CPU
	performance by about 30% on one 18 MB test.
	(sort): Don't invoke sortlines unless we have 2 or more lines.

2003-07-26  Stepan Kasal  <kasal@@ucw.cz>

	* src/sort.c (sort): Don't require two `struct line's per text line,
	the new sort algorithm requires just 1.5.

2003-07-27  Jim Meyering  <jim@@meyering.net>

	* src/pathchk.c (validate_path): Use %lu, not %ld.
	From Paul Eggert.
	* src/cut.c (is_printable_field): Simplify bit arithmetic.
	From Paul Eggert.
	* src/ls.c (sort_files): Put `volatile' in the right place.
	From Paul Eggert.

2003-07-26  Jim Meyering  <jim@@meyering.net>

	Use only one bit per field/offset in array, not one `int'.
	* src/cut.c (printable_field): Change type to `unsigned char'.
	(mark_printable_field, is_printable_field): New functions.
	Use them in place of all direct accesses of `printable_field'.

	* src/expand.c (parse_tabstops): Detect overflow properly.
	* src/cut.c (set_fields): Likewise.

	* src/rm.c: Include "dirname.h".
	(usage): Use base_name (program_name) in body of --help output.
	This lets me...
	* man/Makefile.am (.x.1): ...back out the kludge of 2003-07-22.
	Idea from Brendan O'Dea, who suggested using
	`program_name = basename (argv[0]);' everywhere --
	can't do that, but using base_name works just fine here.

	* src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Exempt test.

2003-07-24  Paul Eggert  <eggert@@twinsun.com>

	Fix some POSIX-compliance problems with 'test'.  This makes
	'test' more compatible with Bash.

	* NEWS, doc/coreutils.texi: Document the following.
	* src/test.c: Include exitfail.h.
	(TEST_FAILURE): New constant, used for exit status if 'test' fails.
	(test-syntax_error): Use it.
	(binary_operator): Now takes bool arg specifying whether left operand
	is -l ARG, so that caller determines this rather than us.
	All uses changed.
	(term): Use posixtest to evaluate parenthesized subexpressions.
	(unary_operator, one_argument): Remove support for -t without operand.
	(one_argument): Take argument from argv[pos].
	(one_argument, two_arguments, three_arguments): Advance pos.
	All callers changed.
	(three_arguments): Look for binary ops before "!".  Then look
	for parenthesized one_argument expressions, instead of trusting
	expr () to do the right thing.
	(posixtest): Now takes number of args.  All callers changed.
	Treat "( A B )" like "A B".
	(main): Set exit_failure to TEST_FAILURE.  Don't depend on
	POSIXLY_CORRECT, as we now conform to POSIX by default.
	(main) [!LBRACKET]: Do not recognize "--help" or "--verbose" unless.
	* tests/test/Test.pm (test_vector): Add several tests to check
	the above.  Syntax errors now exit with status 2, not 1.
	* man/Makefile.am (mapped_name): Use `../src/[' binary to create test.1.

2003-07-26  Jim Meyering  <jim@@meyering.net>

	* tests/help-version: Adjust for above change in test behavior:
	`[' exits with 2, not 1, and test doesn't accept --help or --version.

	* Makefile.maint (ME): Don't use trick suggested in Make manual.
	It doesn't work for make-3.79.1.  Reported by Christian Krackowizer.

	* Makefile.maint (sc_system_h_headers): Another syntax check.
	(syntax-check-rules): Add it to the list.

	* src/pathchk.c (validate_path): Cast strlen value to `unsigned long'
	so it matches `%ld' format even on 32-bit systems.

	* src/fmt.c (flush_paragraph): Cast field width to `int' to
	avoid warning on 64-bit systems.

	* src/ls.c (sort_files): Make `func' volatile, so it can't be
	clobbered by a `longjmp' into this function.

2003-07-25  Jim Meyering  <jim@@meyering.net>

	* src/pathchk.c (validate_path): Use %ld format (not %d) for size_t
	value.

	* tests/misc/split-fail: Disable the --line-bytes=$_4gb test,
	because it'd evoke spurious failure on 64-bit systems.

2003-07-24  Jim Meyering  <jim@@meyering.net>

	* src/dd.c (usage): Document the fact that SIGUSR1 makes dd
	output its current record counts.  Reported by Jurriaan.

	* tests/wc/Test.pm (test_vector): Disable the `PIPE' tests when running
	`wc' with no options.  This goes along with the change of 2003-07-20.

2003-07-23  Jim Meyering  <jim@@meyering.net>

	Don't include headers already included by system.h:
	* src/tr.c: Don't include errno.h.
	* src/true.c: Don't include version-etc.h.
	* src/test.c: Don't include limits.h or error.h.
	* src/stat.c: Don't include unistd.h or time.h.
	* src/readlink.c: Don't include stdlib.h, unistd.h, or limits.h.
	* src/pr.c: Don't include time.h.
	* src/pathchk.c: Don't include errno.h.
	* src/nice.c: Don't include sys/time.h.
	* src/ls.c: Don't include stdlib.h.

	* basename.c, cat.c, chroot.c, cksum.c, comm.c, csplit.c, cut.c, date.c:
	* dd.c, dirname.c, echo.c, env.c, expand.c, expr.c, factor.c, fmt.c:
	* fold.c, head.c, hostid.c, hostname.c, id.c, join.c, kill.c, logname.c:
	* md5sum.c, nice.c, nl.c, nohup.c, od.c, paste.c, pathchk.c, pinky.c:
	* pr.c, printenv.c, printf.c, ptx.c, pwd.c, seq.c, setuidgid.c, shred.c:
	* sleep.c, sort.c, split.c, stat.c, stty.c, su.c, sum.c, tac.c, tail.c:
	* tee.c, test.c, tr.c, true.c, tsort.c, tty.c, uname.c, unexpand.c:
	* uniq.c, uptime.c, users.c, wc.c, who.c, whoami.c, yes.c:
	Don't include closeout.h.

	* tests/rm/fail-2eperm: Add a check for whether $NON_ROOT_USERNAME
	can access the required version of rm.
	* tests/rm/Makefile.am (TESTS_ENVIRONMENT): Define PACKAGE_VERSION.

	* tests/cut/Test.pm (out-delim3a): New test.

	* man/help2man: Update to version 1.33.

	* src/expand.c (parse_tabstops): Detect overflow in tabstop sizes.

	* src/dircolors.c: Include xstrndup.h.
	(xstrndup): Remove function, now that it's been factored out into
	it's own file.

2003-07-22  Paul Eggert  <eggert@@twinsun.com>

	* src/wc.c (wc): Fix typo in computation of file from file_x,
	which caused the former to be used uninitialized if file_x was
	nonzero.

2003-07-22  Jim Meyering  <jim@@meyering.net>

	* src/cut.c (set_fields): Use xcalloc in place of xmalloc+memset.

	* man/Makefile.am (.x.1): Substitute 's,$t/$*,$*,' on output of
	help2man, to avoid having `rm.td/rm' appear in rm.1.  Reported by
	Thomas Luzat.  See http://bugs.debian.org/202413 for details.

	* src/cut.c (main) [lint]: Initialize spec_list_string to avoid warning.

	* src/hostid.c: Don't include <unistd.h>.  system.h already does that.

	* src/cut.c (set_fields): Mark all selected indices before trying to
	determine range endpoints.
	* tests/cut/Test.pm: New test for the above fix.

	Begin to address this comment: What if someone wants to
	extract the 1,000,000-th field of some huge input file?
	The first step is to rearrange things so that the values
	in the printable_field array are all 0/1 rather than 0/1/2.
	* src/cut.c (RANGE_START_SENTINEL): Remove.
	Store range-start indices in a hash table, rather than
	overloading the `printable_field' array.
	(range_start_ht): New global.
	(hash_int, hash_compare_ints, is_range_start_index): New functions.
	(print_kth): Use is_range_start_index; don't test printable_field.
	(set_fields): Detect overflow.
	(set_fields): Insert each range-start index into range_start_ht.
	(main): Call set_fields only once, and only after
	output_delimiter_specified and (if required) range_start_ht have
	been defined.

2003-07-20  Paul Eggert  <eggert@@twinsun.com>

	* src/wc.c (get_input_fstatus): Fix typo: `stat' was being
	invoked with a null pointer when there were no file arguments.

2003-07-20  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_changelog): Add another nit-picky check.

	* src/wc.c (write_counts): Add a comment.
	(wc): Rename `file' parameter.
	Set new local, `file', to be the file name, or (when it's NULL)
	_("standard output") so that all uses of `file' use the proper value.
	Use STREQ, not strcmp.

2003-07-20  Paul Eggert  <eggert@@twinsun.com>

	wc count field widths now are heuristically adjusted depending
	on the input size, if known.  If only one count is printed, it
	is guaranteed to be printed without leading spaces.

	Previously, wc did not align the count fields if
	POSIXLY_CORRECT was set, but POSIX did not actually require
	this undesirable behavior, so it has been removed.

	* NEWS: Document this.
	* doc/coreutils.texi (wc invocation): Likewise.

	* src/wc.c (number_width): New var.
	(posixly_correct): Remove.
	(struct fstatus): New struct.
	(write_counts): Output fields of width number_width.
	Do not worry about POSIXLY_CORRECT.
	Use null file, not empty-string file, to denote stdin,
	since "" is a valid file name on some hosts.
	(wc, wc_file): New arg fstatus.  Use it to avoid invoking fstat
	if possible.
	(wc):  Avoid problems if end_pos - current_pos overflows.
	Do not print odd message if stdin has a read error.
	(get_input_fstatus, compute_number_width): New functions.
	(main): Use them to implement the new behavior.
	Ignore POSIXLY_CORRECT.

	* tests/wc/Test.pm: Adjust to the new output widths.

2003-07-19  Jim Meyering  <jim@@meyering.net>

	* tests/rm/fail-eperm: Don't create temporary directory --
	we don't use it.

	* tests/shred/remove: Don't open-code test for UID != 0.
	Use priv-check's require-non-root instead.
	Update to use newer framework.

	* tests/help-version (expected_failure_status_expr): Record that
	expr exits with status of 3 for e.g., a write error.

	* tests/priv-check: Use `id -u' to see if we're running as root,
	rather than trying go write to an write-protected file.
	When running as root, ensure $NON_ROOT_USERNAME is valid.
	When running as root with `require-non-root', ensure that `.'
	is writable by $NON_ROOT_USERNAME, then reinvoke $0 set-user-ID
	to $NON_ROOT_USERNAME.  If `.' is not writable, then skip the test.

	* src/printenv.c: Include "exitfail.h".
	(main): Set exit_failure rather than calling close_stdout_set_status.
	* src/date.c: Likewise.
	* src/sort.c: Likewise.
	* src/tty.c: Likewise.

2003-07-18  Jim Meyering  <jim@@meyering.net>

	* tests/touch/not-owner: Update to use newer framework.

	* tests/rm/fail-eperm: Use $srcdir/../priv-check, create a temporary
	directory, and remove Perl-coded `you may not run as root' test.
	* tests/cp/fail-perm: Use $srcdir/../priv-check, rather than
	hard-coding something not quite equivalent.
	Paul Jarc reported the inconsistent diagnostics.

	* src/sort.c (main): Use close_stdout via atexit.
	Now `sort --version' and `sort --help' fail, as they should
	when their output is redirected to /dev/full.

	* src/su.c (usage): Don't call close_stdout here.
	(main): Use close_stdout via atexit.
	Now `su --version > /dev/full' fails, as it should.
	Somehow, the change of 2000-05-07 that purports to fix this
	was not checked in.

	* tests/help-version (--help/--version vs. /dev/full): Special-case
	`[' to protect it from expected_failure_status-`eval'.

	* src/uniq.c (writeline): Use a SPACE, not a TAB between the
	count and the corresponding line, as required by POSIX.
	Reported by Clement Wang.
	* tests/uniq/Test.pm (101, 102): Update tests of -c accordingly.

	* tests/expr/basic: Add tests for when exit status is 2.

	* src/nohup.c (NOHUP_FOUND_BUT_CANNOT_INVOKE, NOHUP_FAILURE):
	Use an anonymous `enum', rather than #define.

2003-07-17  Paul Eggert  <eggert@@twinsun.com>

	* src/expr.c: Include "exitfail.h", "quotearg.h".
	(EXPR_INVALID, EXPR_ERROR): New constants.
	(nomoreargs, null, toarith, nextarg): Return bool, not int.
	(syntax_error): New function, exiting with status 2.  Use it
	insteading of printing "syntax error" ourselves.
	(main): Initialize exit_failure to EXPR_ERROR.
	Exit with EXPR_INVALID on syntax error (too few arguments).
	(nextarg): Use strcmp, not strcoll; strcoll might return
	an undesirable 0, or might fail.
	(docolon, eval4, eval3): Exit with status 3 on invalid argument type
	or other such error.
	(eval2): Report an error if strcoll fails in a string comparison.
	* src/sort.c: Include "exitfail.h".
	(main): Set exit_failure, not xalloc_exit_failure and
	xmemcoll_exit_failure.
	* tests/expr/basic: Invalid value exits with status 3, not 2.

2003-07-16  Jim Meyering  <jim@@meyering.net>

	* configure.ac (AC_INIT): Use 5.0.90 as the version, rather than 5.0.2,
	per GNU maintainer guidelines.  The next non-beta release will be 5.1.

	This script would have caught at least two recent bugs:
	those in [ and kill.
	* tests/help-version: Revive this script.
	It wasn't doing anything useful, since $all_programs wasn't being
	defined by the invoking Makefile.am.
	Reflect that nohup is no longer a script, so don't exclude it.
	Add framework to handle the programs added since it was last run:
	kill, stat, unlink, [, link, readlink.
	Fix path-related problems deriving from the move of this script
	from src/ to its present location.
	* tests/Makefile.am (all_programs): Define.
	(TESTS_ENVIRONMENT): Use it.

	* src/kill.c (main): Fix bug introduced on 2003-05-10 (for 5.0.1)
	whereby kill would always attempt to operate on argv[0] and fail.

	* src/test.c (integer_expected_error): Improve diagnostic -- now,
	it also matches the one from bash's builtin test.
	(binary_operator): Add \n at end of diagnostic.

	* tests/rm/fail-2eperm: Remove setuidgid-related code.  Move it to ...
	* tests/priv-check: Move setuidgid-related and
	NON_ROOT_USERNAME-checking code to this file.

	* README: Update section on testing as `root'.
	Suggestion from Paul Jarc.

	* src/test.c (AUTHORS): Replace 3-letter usernames with the actual
	names of authors that I just found in bash's builtins/test.def.

	Running `[' with no arguments would evoke a segfault.
	* src/test.c (main) [LBRACKET]: Move initialization of argv to
	precede potential use via test_syntax_error.

	* src/Makefile.am (AM_CPPFLAGS): Rename from `INCLUDES', to avoid
	warning from automake -Wall.

2003-07-15  Jim Meyering  <jim@@meyering.net>

	* Version 5.0.1.

	* Makefile.maint (%.asc): Remove target first, so gpg doesn't
	prompt us about it.

	* announce-gen (print_changelog_deltas): Relax tests for matching
	version-number line in NEWS.
	Change the .sig suffix to .asc here, too.

2003-07-14  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (%.asc): Renamed from %.sig.
	Generate and use ascii-armored signatures.
	Use gpg's -o option.

2003-07-13  Jim Meyering  <jim@@meyering.net>

	* src/nohup.c (NOHUP_FAILURE, NOHUP_FOUND_BUT_CANNOT_INVOKE): Define.
	(main): Use them.

	* Makefile.maint (syntax-check): Move each individual check into
	its own target.
	(syntax-check-rules): This is the list of syntax-check targets.
	(sc_unmarked_diagnostics, sc_cast_of_argument_to_free):
	(sc_cast_of_x_alloc_return_value, sc_space_tab):
	(sc_error_exit_success, sc_xalloc_h_in_src):  New targets.

2003-07-12  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Remove uses of OPTIONAL_BIN_ZCRIPTS and last
	traces of the nohup script.

	* src/Makefile.am (bin_SCRIPTS): Remove use of just-removed
	$(OPTIONAL_BIN_ZCRIPTS).

	* src/Makefile.am (localedir.h): Put the `2>&1' after the redirect
	target, not before the `>'.

	* src/remove.c (remove_dir): Give a diagnostic upon failed save_cwd,
	now that that function no longer calls `error'.

	* src/df.c (find_mount_point): Emit a diagnostic for each
	failed syscall, rather than relying on caller to do that.
	The caller couldn't do a good job, anyhow -- too many different
	ways to fail (each with a different referent).
	Give a diagnostic upon failed save_cwd, now that that function
	no longer calls `error'.
	(show_point): Don't diagnose find_mount_point's errors, now that
	it handles them itself.

	* src/df.c (find_mount_point): Don't let free clobber errno upon
	failed chdir.

	* src/sys2.h: Remove alloca-related block.
	* src/system.h: Include <alloca.h> here, instead.

	It appears that the `#pragma alloca' included via "system.h" is
	adequate, since join.c uses alloca, yet lacked an in-file #pragma.
	* src/copy.c, src/cp.c, src/df.c, src/install.c, src/ln.c:
	* src/ls.c, src/mv.c, src/remove.c: Remove `#pragma alloca'.

	* src/chown-core.c (change_file_owner): Do not restore any special
	permission bits (e.g., set-user-ID, set-group-ID) that are reset
	by chown(2) on some systems.  Suggestion and insistence :-) from
	Michael Stone.

	* tests/input-tty: Also check `test -t 1'.
	This is necessary on linux-2.4.21.  Otherwise, the stty/basic-1
	test would block when run in the background.

2003-07-11  Jim Meyering  <jim@@meyering.net>

	* tests/sample-test: Also fail if cat-to-create-expected-output
	fails.  Otherwise, if both `exp' and `out' were to end up empty
	because of e.g., a full disk, they would mistakenly compare equal.

	* src/nohup.c: New file.  Rewrite of nohup.sh in C.
	This solves a portability problem: on at least Solaris systems,
	when nohup.sh used the vendor /bin/sh, it would exit with status
	of `1' rather than the required 126 or 127 upon failure to exec
	the specified program.

	* src/Makefile.am (EXTRA_SCRIPTS): Remove definition.
	(bin_PROGRAMS): Add nohup.
	(EXTRA_DIST): Remove nohup.sh.
	(all_programs): Remove use of $(EXTRA_SCRIPTS).
	* src/nohup.sh: Remove file.
	* man/Makefile.am (nohup.1): Depend on nohup.c, rather than nohup.sh.

	* tests/misc/nohup: Tests for the above.
	* tests/misc/Makefile.am (TESTS): Add nohup.

	* src/head.c (diagnose_copy_fd_failure): New function, renamed from
	the macro, COPY_FD_DIAGNOSE.
	(diagnose_copy_fd_failure): Enclose diagnostic in _(...).
	(head_file): Likewise.

	* src/date.c: Include "quote.h".
	(batch_convert): Use the quote function rather than using literal `...'
	in a diagnostic.

	* src/setuidgid.c (main): Enclose diagnostic in _(...).
	* src/fmt.c (main): Likewise.
	* src/mknod.c (main): Likewise.
	* src/tac.c (tac_seekable): Likewise.
	* src/yes.c (main): Likewise.
	* src/od.c (main): Likewise.
	* src/install.c (change_attributes): Likewise.

2003-07-10  Jim Meyering  <jim@@meyering.net>

	* src/head.c (usage): Use 1024*1024 in place of 1048576.
	* src/tail.c (usage): Likewise.

	* tests/rm/fail-2eperm: Now that we have setuidgid, use it in
	place of the kludge in this test.  Suggestion from Paul Jarc.

	* src/Makefile.am (noinst_PROGRAMS): Define to setuidgid.
	* src/setuidgid.c: New program, solely for testing (not installed).

	* src/chown-core.c (change_file_owner): Don't leak file descriptors
	when dereferencing symlinks.

2003-07-09  Jim Meyering  <jim@@meyering.net>

	* tests/du/slash: New file/test for today's lib/ftw.c fix.
	* tests/du/Makefile.am (TESTS): Add slash

	* src/tail.c (xlseek): Avoid warning about ``return without value
	from function returning non-void''.

2003-07-08  Jim Meyering  <jim@@meyering.net>

	* man/help2man: Update to version 1.29.

	* man/help2man: Add END handler to close STDOUT and check for errors.

2003-06-30  Paul Eggert  <eggert@@twinsun.com>

	Add support for a "[" that conforms to the GNU coding standards,
	i.e., that does not depend on its name.
	* src/lbracket.c: New file.
	* README: Add "[".
	* man/Makefile.am (programs): Ignore "[", since it doesn't have
	a separate man page.
	* src/Makefile.am (bin_PROGRAMS): Add "[".
	(__SOURCES): New var.
	* src/test.c (LBRACKET): Define to 0 if not defined.
	(main): Use LBRACKET rather than argv[0].

	* src/test.c (one_argument): Do not check for -t if POSIXLY_CORRECT.
	Reported by Paul Jarc and Dan Jacobson.

	* src/test.c (main): Do not recognize --help or --version if
	POSIXLY_CORRECT, when invoked as "test".  Handle "[ ]" correctly.
	Do not bother testing that margv[margc] is non-null.

2003-07-04  Jim Meyering  <jim@@meyering.net>

	* src/who.c (print_line): Rewrite to use asprintf, in order to be
	able to avoid emitting trailing spaces.  Reported by Dan Jacobson.

	* tests/misc/head-elide-tail: Add tests of head's new --lines=-N
	option, and perform the +1600 invocations of head IFF the envvar
	RUN_EXPENSIVE_TESTS is set.

2003-07-03  Jim Meyering  <jim@@meyering.net>

	* src/cp.c (do_copy): Give a better diagnostic when failing due
	to nonexistent destination directory.  Reported by Dmitry Rutsky.
	See http://bugs.debian.org/199730 for details.

2003-06-27  Jim Meyering  <jim@@meyering.net>

	split's --verbose option did nothing [broken in 4.5.10 and 5.0]
	* src/split.c (longopts): Use `1', not `0' as the value for
	for &verbose.  Reported by Keith Thompson.

	Test for the above fix.
	* tests/misc/split-a: Also use --verbose and compare stderr
	output with what we'd expect.

2003-06-20  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
	Use `error_t' (rather than int) as type for local `err'.
	From Alfred M. Szmidt.

2003-06-19  Marcus Brinkmann  <marcus@@gnu.org>

	* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
	Fix author preservation code.

2003-06-19  Jim Meyering  <jim@@meyering.net>

	* src/ln.c (ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0.
	(do_link): Don't warn about hard link to symlink.

2003-06-18  Jim Meyering  <jim@@meyering.net>

	* src/cut.c: Include "getdelim2.h", not "getstr.h".
	Reflect renaming: getstr -> getdelim2.

	* src/comm.c, src/join.c, src/nl.c, src/uniq.c: Reflect renaming:
	readline -> readlinebuffer.

2003-06-09  John David Anglin  <dave.anglin@@nrc-cnrc.gc.ca>

	* src/readlink.c: Include <sys/types.h> before system.h (because
	the latter includes <sys/stat.h>).  Required on Ultrix 4.3.

2003-06-17  Jim Meyering  <jim@@meyering.net>

	* src/system.h (initialize_main): Define.
	Use it in every `main'.  Applied via this:
	p='initialize_main (&argc, &argv);'
	perl -ni -e '/program_name.=.argv.0/ and print "  '"$p"'\n"; print' \
	  $(grep -l program_name.=.argv.0 *.c)
	test.c uses margc/margv, so I made the change manually for that file.
	Based on a patch from Bernard Giroud.

2003-06-09  John David Anglin  <dave.anglin@@nrc-cnrc.gc.ca>

	Fix for build failure on Ultrix 4.3.
	* src/stat.c: Include sys/statvfs.h in preference to sys/vfs.h.
	Include sys/param.h and sys/mount.h on ultrix.

2003-06-16  Jim Meyering  <jim@@meyering.net>

	* src/touch.c (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove
	definitions.
	* src/system.h (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Define
	them here instead, but with one change: define EISDIR to -1, not 0.

	* src/cat.c (cat): Remove `#ifndef ENOSYS', now that it's
	guaranteed to be defined.
	* src/system.h (ENOSYS, ENOTSUP): Define to -1 if not defined.

	* README: Mention the CVS repository.
	Encourage addition of test cases.

2003-06-12  Jim Meyering  <jim@@meyering.net>

	* src/touch.c (touch): Call close only if necessary.
	From Bruno Haible.

	* src/wc.c (usage): Correct wording: wc prints counts in the order
	`newline, word, byte'.  Reported by Keith M. Briggs.
	* man/wc.x: Fix it here, too.  And change `lines' to `newlines'.

2003-06-10  Jim Meyering  <jim@@meyering.net>

	* tests/date/Test.pm: Add a test for the new format, e.g., May-23-2003.

2003-06-07  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (syntax-check): Add commented-out (over-aggressive)
	rule.

2003-06-06  Jim Meyering  <jim@@meyering.net>

	* src/extract-magic (main): Avoid newer 3-arg form of open,
	so this script works also with e.g., perl5.005_03.
	Patch by John David Anglin.

2003-06-04  Paul Eggert  <eggert@@twinsun.com>

	* src/system.h: Include <stdbool.h> unconditionally.

2003-06-04  Jim Meyering  <jim@@meyering.net>

	* man/Makefile.am (check-programs-vs-x): Rename target
	from check-programs-vs-1.  Adjust rule to check for the
	primary (.x) file, not the generated one (.1).

2003-06-03  Tim Mooney <mooney@@dogbert.cc.ndsu.NoDak.edu>

	* man/kill.x: New file.
	* man/Makefile.am (dist_man_MANS): Add kill.1.
	(kill.1): New rule.

2003-06-04  Jim Meyering  <jim@@meyering.net>

	Ensure that the .x file for a new program is never forgotten again.
	* man/Makefile.am (programs): Define.
	(check-programs-vs-1): New phony target.
	(check-local): Depend on it.

2003-06-03  Jim Meyering  <jim@@meyering.net>

	Avoid unnecessary copying of environment.
	* src/env.c (main): Rather than clearing the environment and --
	unless told to ignore environment -- copying all settings from
	the saved, original environment, clear the environment only when
	that is requested.  Suggested by Jens Elkner.

2003-06-02  Jim Meyering  <jim@@meyering.net>

	* src/system.h: Always include <string.h>, since we assume C89.
	Include <limits.h> without checking for HAVE_LIMITS_H.

	* src/test.c [!TEST_STANDALONE]: Remove #if-0'd block.
	(STREQ, S_IXUGO): Remove redundant (in system.h) definitions.

2003-06-01  Jim Meyering  <jim@@meyering.net>

	Avoid a race condition in `tail -f' described by Ken Raeburn in
	http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html
	* src/tail.c (file_lines): Add new parameter, *read_pos, and set it.
	(pipe_lines, pipe_bytes, start_bytes, start_lines): Likewise.
	(tail_bytes, tail_lines, tail): Likewise.
	(tail_file): Use the new `read_pos' value as the size,
	rather than stats.st_size from the fstat call.

2003-05-28  Jim Meyering  <jim@@meyering.net>

	* src/extract-magic: Allow expansion of `$file' in the here-
	document corresponding to the comment at the top of fs.h.

2003-05-26  Jim Meyering  <jim@@meyering.net>

	* src/stat.c: Fix portability problem on FreeBSD5.0: don't include
	<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE.
	Use #if/#elif/... cascade so we get only one set of include files.
	Reported by Nelson Beebe.

2003-05-24  Jim Meyering  <jim@@meyering.net>

	* src/md5sum.c (split_3): Accept the BSD format only when in MD5 mode.
	* tests/sha1sum/basic-1: Make sure `sha1sum --check' doesn't
	accept the BSD format.

2003-03-28  Joe Orton  <jorton@@redhat.com>

	* src/md5sum.c (bsd_split_3): New function.
	(split_3): Detect checksums from BSD 'md5' command and handle them
	using bsd_split_3.

	* tests/md5sum/basic-1: New tests for --check exit status, and for
	BSD-style checksum files.

2003-05-21  Jim Meyering  <jim@@meyering.net>

	* src/head.c (elide_tail_lines_pipe): Fix a thinko.
	This sort of thing is why it'd be *Really Good* to factor
	out the common code used here and in tail.c.

2003-05-14  Jim Meyering  <jim@@meyering.net>

	* src/head.c (usage): Document new feature: --bytes=-N and --lines=-N.

	* tests/du/slink: Skip this test if `.' is on an XFS file system.

	* tests/du/fd-leak: New file.  Test for the bug in du that
	was fixed by the 2003-05-12 change to lib/ftw.c.
	* tests/du/Makefile.am (TESTS): Add fd-leak.

	* src/head.c (AUTHORS): Enclose string in N_(...), now that it
	includes a translatable word, `and'.

	* src/dd.c (usage): Don't use `,' as the thousands separator
	in e.g. 1,000,000 and 1,048,576.  Instead, do this:
	`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
	* src/df.c (usage): Likewise.
	* src/du.c (usage): Likewise.
	* src/ls.c (usage): Likewise.

	* Makefile.maint (syntax-check): Add another check.

2003-05-13  Paul Eggert  <eggert@@twinsun.com>

	Fix uniq to conform to POSIX, which requires that "uniq -d -u"
	must output nothing.  Problem reported by Josh Hyman.

	* src/uniq.c (enum output_mode, mode): Remove, replacing with:
	(output_unique, output_first_repeated, output_later_repeated):
	New vars.  All uses of "mode" changed to use these variables,
	which are not mutually exclusive as "mode" was.
	(writeline): New arg "match", used to control whether to
	obey output_first_repeated or output_later_repeated.
	All callers changed.
	(check_file, main): Adjust to above changes.

	* tests/uniq/Test.pm: Test that 'uniq -d -u' outputs nothing.

2003-05-14  Jim Meyering  <jim@@meyering.net>

	* tests/rm/rm3: Use tr's \n notation rather than \012.
	This package can afford to do that, since its tests are guaranteed use
	GNU tr, which has accepted the more modern notation for 10 years.
	* tests/rm/rm5: Likewise.
	* tests/cp/same-file: Likewise.
	* tests/stty/row-col-1: Likewise.
	* tests/stty/basic-1: Likewise.
	* tests/rm/deep-1: Likewise.
	* tests/mv/part-symlink: Likewise.
	* tests/mkdir/perm: Likewise.
	* tests/misc/nice: Likewise.

2003-05-13  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (struct F_triple) [name]: Remove const attribute.
	(triple_free): Don't apply cast to argument of free.
	(seen_file): Add cast here instead.

	* src/cp-hash.c (struct Src_to_dest) [name]: Remove const attribute.
	(src_to_dest_free): Don't apply cast to argument of free.

	* src/sort.c (zaptemp): Don't apply cast to argument of free.
	* src/pr.c (init_fps, init_store_cols): Likewise.
	* src/join.c (delseq, freeline): Likewise.
	* src/expr.c (OLD): Likewise.
	* src/sort.c (sort): Likewise.
	* src/head.c (elide_tail_lines_pipe): Likewise.

	* src/tail.c: Include "quote.h".
	Use quote in diagnostics.  Change many error format strings
	from just `%s' to e.g., `error reading %s'.
	(pipe_lines): Change type of parameter, n_lines, to uintmax_t.
	Rewrite newline-counting loop to use memchr.

	* src/head.c (elide_tail_lines_pipe): Use `if', not assert.
	Now that assert is no longer used, don't include <assert.h>.

2003-05-12  Jim Meyering  <jim@@meyering.net>

	* src/head.c: Include <assert.h>.
	(AUTHORS): Add my name.
	(elide_tail_lines_pipe): New function.

2003-05-10  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (syntax-check): Check for `error (EXIT_SUCCESS,'.

	* src/readlink.c (main): Set program_name before first use.
	Remove that (redundant) first use.
	Don't exit successfully just because --verbose was specified.
	Pass 0, not EXIT_SUCCESS, as first argument to error; when that
	parameter is 0, error does not exit.

	* src/uname.c (main): When failing due to too many arguments, also say
	that, rather than just "Try `uname --help' for more information.".
	* src/comm.c (main): Likewise, but for too few arguments.
	* src/logname.c: Include error.h.
	(main): Say why we're failing.

	* src/uniq.c (main): Don't segfault when argc < optind.
	* src/who.c (main): Handle argc < optind.
	* src/df.c (main): Likewise.
	* src/install.c (main): Likewise.
	* src/mv.c (main): Likewise.
	* src/pwd.c (main): Likewise.
	* src/tty.c (main): Likewise.
	* src/chroot.c (main): Likewise.
	* src/hostname.c: Likewise.
	* src/du.c (main): Likewise.
	* src/expand.c (main): Likewise.
	* src/env.c (main): Likewise.
	* src/unexpand.c (main): Likewise.
	* src/printenv.c (main): Likewise.
	* src/sync.c (main): Handle argc == 0.
	* src/expr.c (main): Likewise.
	* src/printf.c (main): Likewise.
	* src/basename.c (main): Likewise.
	* src/ln.c (main): Test for `missing argument' before computing n_files.
	* src/tail.c (main): Test for the case of no arguments before
	computing n_files.

	* src/kill.c (send_signals): Don't check command line arguments here.
	(main): Check them here instead.  Handle argc < optind.

	* src/logname.c (main): Use error, rather than fprintf, for the sake
	of consistency.

	* src/rm.c (main): Don't overrun array bound if argc is 0.

2003-05-09  Jim Meyering  <jim@@meyering.net>

	* src/sort.c (main): Don't overrun array bound if argc is 0.
	That would happen when invoked via: execl ("/usr/bin/sort", NULL);
	Reported by Wartan Hachaturow.

2003-05-07  Jim Meyering  <jim@@meyering.net>

	Implement support so that `head --lines=-N' works on seekable files.
	* src/head.c (enum Copy_fd_status): Define.
	(COPY_FD_DIAGNOSE): New macro.
	(elide_tail_lines_seekable): New funtion.
	(elide_tail_lines_file): Call it here.

2003-05-06  Jim Meyering  <jim@@meyering.net>

	* src/sys2.h (CHAR_BIT): Remove duplicate definition.

2003-05-04  Jim Meyering  <jim@@meyering.net>

	* tests/head/Test.pm: Remove tests of --bytes=-N; using that framework
	caused the addition of thousands of small files to the tar archive.
	* tests/misc/head-elide-tail: New file.  Add them here instead.
	* tests/misc/Makefile.am (TESTS): Add head-elide-tail.

2003-05-04  Paul Eggert  <eggert@@twinsun.com>

	* src/remove.c (HAVE_WORKING_READDIR): Define to 0 if not defined.
	(IF_READDIR_NEEDS_REWINDDIR): Remove.
	(remove_cwd_entries): Rewrite to avoid IF_READDIR_NEEDS_REWINDDIR,
	which was a bit weird because it couldn't be emulated by a function.

2003-05-03  Jim Meyering  <jim@@meyering.net>

	Extend head to accept --lines=-N (--bytes=-N) and to print all
	but the N lines (bytes) at the end of the file.
	* src/head.c: Include full-write.h, full-read.h, inttostr.h, quote.h.
	Use quote() in diagnostics, rather than literal `' marks.
	(copy_fd, elide_tail_bytes_pipe, elide_tail_bytes_file):
	New functions.
	(elide_tail_lines_pipe, elide_tail_lines_file): New functions.
	(head_file): Reorganize so as to call head from only one place.
	(main): Likewise, for head_file.
	Handle new, undocumented option, --presume-input-pipe.
	Handle negative line and byte counts.
	* tests/head/Test.pm: Add lots of tests to exercise --bytes=-N.

	* tests/du/8gb: Skip test if the file system of `.' doesn't support
	sparse files -- otherwise it'd create a file of size 8GB.

2003-05-02  Jim Meyering  <jim@@meyering.net>

	* src/fmt.c (usage): Don't mention obsolescent -WIDTH option.
	Instead explain about `-' and standard input.
	(main): Give a proper diagnostic for e.g., `fmt -c -72'.
	Reported by Keith Thompson.
	* tests/fmt/basic: Add test for the above fix.

	* src/fmt.c: Include "quote.h".
	Use quote() in diagnostics, rather than literal `' marks.
	(main): Exit nonzero when unable to open an input file.
	* tests/fmt/basic: Add test for the above fix.

	* src/fmt.c (main): Diagnose invalid suffix on obsolescent width
	specifications like `-72x'.
	* tests/fmt/basic: Add test for the above fix.

	Work around nasty readdir bug on Darwin6.5.
	* src/remove.c (IF_READDIR_NEEDS_REWINDDIR): Define.
	[! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just
	returned NULL and there has been at least one successful unlink or
	rmdir call since the opendir or previous rewinddir, then call
	rewinddir and reiterate the loop.

	Factor out common code.
	* src/remove.c (readdir_ignoring_dotdirs): New function.
	(is_empty_dir): Use it here.
	(remove_cwd_entries): Use it here.

2003-05-01  Jim Meyering  <jim@@meyering.net>

	* tests/rm/r-3: Create 500 rather than just 300 files.
	There's a bug in Darwin6.5's readdir that shows up only with
	338 or more files.
	Fix a bug in this test: `cd $pwd' (not to `..'), now that $tmp
	has two components.

	* src/tail.c:
	Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
	(dump_remainder): Move two declarations `down' into the scope
	where they are used.
	(xlseek): Return the resulting offset.
	(file_lines): Rename parameter, file_length, to end_pos.
	(pipe_lines): Don't coerce safe_read return value to `int'.
	Adapt tests accordingly.
	(pipe_bytes) [struct charbuffer] (nbytes): Change type from `int'
	to `unsigned int'.
	Change type of `total_bytes' from `int' to `size_t',
	since the former wouldn't always be wide enough.
	Don't coerce safe_read return value to `int',
	and adapt tests accordingly.
	Now that testing for a read error no longer involves
	using `tmp', handle that case *after* freeing `tmp'.
	(start_bytes): Clean up.
	(tail_bytes): Now that `n_bytes' may be larger than
	OFF_T_MAX, test for that condition and, if it's true, don't
	use lseek optimizations.
	(parse_options): Don't fail just because N_UNITS is larger than
	the maximum size of a file -- tail may be applied to an input
	stream (e.g., a pipe) with more data than that.

	* Makefile.maint (syntax-check): Rename from alloc-check.
	Also check for SPACE-TAB sequences.
	Also check for malloc/calloc/realloc casts.

2003-05-01  Jim Meyering  <jim@@meyering.net>

	* src/tail.c (start_lines): Rewrite to use memchr.  Clean up.

2003-04-28  Jim Meyering  <jim@@meyering.net>

	* tests/misc/tty-eof: Send two tokens, not just one, so we don't
	make the now-more-picky tsort fail.

2003-04-24  Jim Meyering  <jim@@meyering.net>

	* src/tsort.c (tsort): Remove unnecessary test of have_read_stdin.
	(main): Minor syntactic clean-up.

	* src/tsort.c (tsort): Fail if the input contains an odd number of
	tokens.  Reported by junkio@@cox.net.

	* tests/tsort/basic-1: Test for the above fix.

2003-04-21  Jim Meyering  <jim@@meyering.net>

	* tests/misc/printf: Add tests for the printf fixes below.

	* Makefile.cfg (cvs_files): Add $(srcdir)/config/depcomp to the list.

2003-04-20  Paul Eggert  <eggert@@twinsun.com>

	Fix printf POSIX compatibility bug reported by Ben Harris in
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.
	* doc/coreutils.texi (printf invocation): It's \NNN in the format,
	\0NNN in the %b operand.
	* src/printf.c (usage): Likewise.
	(print_esc): New arg OCTAL0 to specify whether \0NNN or \NNN
	is desired.  All uses changed.  Behave like Bash printf if %b
	operand uses \NNN where the initial N is not 0.

2003-04-17  Jim Meyering  <jim@@meyering.net>

	* src/stty.c: Remove uses of PROTOTYPE macro.

2003-04-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint: Remove (or replace-with-TAB(s) to retain alignment)
	each sequence of spaces before a TAB character.

2003-04-13  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (is_empty_dir): Don't closedir (NULL).

2003-04-12  Jim Meyering  <jim@@meyering.net>

	Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h),
	--body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or
	FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic.
	* src/nl.c (main): Fix those problems and remove literal quote marks
	(e.g., "`%s'") from format string; instead use "%s" in each format
	string and `quote (optarg)' as the corresponding argument.
	Also, diagnose all invalid command line options before failing.

	* src/nl.c (proc_text): Fix a bug that would make nl output extra
	newlines in some cases.  Details here: http://bugs.debian.org/177256.
	This bug was introduced on 2001-11-10 for textutils-2.0.17.
	* tests/misc/nl: Add test for the above-fixed bug.

	* tests/misc/readlink: New file.  Test the --canonicalize option.
	* tests/misc/Makefile.am (TESTS): Add readlink.

2003-04-11  Jim Meyering  <jim@@meyering.net>

	Clean up.
	* src/chown.c, src/cp.c, src/dircolors.hin, src/du.c, src/ln.c:
	* src/mkfifo.c, src/ptx.c, src/spline.c, src/stty.c, src/tail.c:
	* src/test.c, src/unexpand.c: Remove (or replace-with-TAB(s) to
	retain alignment) each sequence of spaces before a TAB character.

	* src/ls.c: Include <stdlib.h> unconditionally.

	* Makefile.maint (xalloc-check): Rename from header-check.

	* src/yes.c: Include error.h after system.h, not before.

	Clean up.
	* src/copy.c, src/cp-hash.c, src/cp.c, src/csplit.c, src/cut.c:
	* src/date.c, src/df.c, src/du.c, src/expand.c, src/expr.c, src/id.c:
	* src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c:
	* src/ptx.c, src/sort.c, src/split.c, src/su.c, src/tail.c, src/tee.c:
	* src/tr.c: * src/unexpand.c, src/users.c:
	Remove anachronistic casts of xmalloc, xrealloc, and xcalloc
	return values and of xrealloc's first argument.
	Fix the former with this:
	perl -pi -e 's/\([^(]*?\*\) *(x(m|c|re)alloc)\b/$1/'

2003-04-10  Jim Meyering  <jim@@meyering.net>

	* src/stty.c (wrapf): Declare with format attribute.

	The S_MAGIC_... names shouldn't be maintained in two places (prior
	to this change, one would have to keep stat.c and fs.h in sync).
	This change makes it so those names and the corresponding
	hexadecimal constants all reside in stat.c.  fs.h is now generated.
	* src/Makefile.am (fs.h): New rule to generate fs.h from stat.c.
	(BUILT_SOURCES): Add fs.h, now that it's generated.
	(EXTRA_DIST): Add extract-magic.
	* src/extract-magic: New script to extract fs.h definitions from stat.c.
	* src/stat.c (human_fstype) [__linux__]: Append each hex constant from
	fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.

	* tests/tail-2/big-4gb: Skip this test (don't fail) if creating a
	file with nominal length > 4GB fails.  Reported by Michael Deutschmann.

	* man/unexpand.x: Add `SEE ALSO' reference to expand.
	* man/expand.x: Add `SEE ALSO' reference to unexpand.
	Suggestion from Dan Jacobson.

2003-04-10  Maciej W. Rozycki  <macro@@ds2.pg.gda.pl>

	* src/fs.h (S_MAGIC_DEVPTS): New magic for Linux's devpts.
	* src/stat.c (human_fstype): Handle Linux's devpts.

2003-04-09  Paul Eggert  <eggert@@twinsun.com>

	* src/split.c (line_bytes_split): Arg is of type size_t, since
	that's all that is supported for now.
	(main): Check for overflow in obsolescent line count option.

2003-04-09  Jim Meyering  <jim@@meyering.net>

	* tests/misc/split-fail: Add a new test for the above fix.

	* src/split.c (bytes_split): Use size_t temporary (rather than
	uintmax_t original) in remaining computations.  From Paul Eggert.

	Handle command line option arguments larger than 2^31.
	This allows e.g., splitting into files of size 2GB and larger,
	and running split --lines=N with N=2^31 or more.
	But for --line-bytes=N, the restriction that N <= SIZE_MAX
	remains (for now), due to the way it is implemented.

	* src/split.c: Include "inttostr.h".
	(bytes_split, lines_split, line_bytes_split, main):
	Use uintmax_t, not size_t, for file sizes.
	(main): Give a better diagnostic for option arguments == 0.
	Use umaxtostr to print file sizes.
	Reported by Luke Hassell.

2003-04-08  Jim Meyering  <jim@@meyering.net>

	* src/rm.c (usage): Mention that --directory (-d) works only
	on some systems.  Suggestion from Samuel Tardieu.

	* tests/basename/basic: Run $PERL to see if it is available,
	rather than testing its value.
	* tests/sum/sysv, tests/tsort/basic-1, tests/unexpand/basic-1:
	* tests/basename/basic, tests/dd/skip-seek, tests/dircolors/simple:
	* tests/expr/basic, tests/factor/basic, tests/fmt/basic:
	* tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
	* tests/misc/sort, tests/misc/tty-eof, tests/mv/i-1:
	* tests/rm/empty-name, tests/rm/fail-eperm, tests/rm/unreadable:
	* tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
	* tests/sum/basic-1, tests/seq/basic: Likewise.

	* tests/misc/Makefile.am (TESTS): Add split-fail.
	* tests/misc/split-fail: New file.

	* src/split.c: Rename local variables: nchars -> n_bytes.
	(lines_split): Rename local, nlines -> n_lines.
	(main): Rename local variable: s/accum/n_units/.
	(main): Use STDIN_FILENO, not literal `0'.

2003-04-07  Jim Meyering  <jim@@meyering.net>

	* src/stat.c: Add #include directives for Ultrix 4.4.
	Based on a suggested change from Bert Deknuydt.

2003-04-06  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (makefile-check): New rule.
	(local-check): Add it.

2003-04-05  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (nearly all of them):
	Use $(VAR) rather than @@VAR@@, now that we can rely on automake to
	emit a definition for each substituted variable.
	* tests/Makefile.am.in: Likewise.

	* tests/rm/rm5: Add a comment explaining why this test fails when
	using Tru64's broken sed.
	* tests/rm/rm3: Likewise.

	Make `kill -t' output signal descriptions (not `?') on Tru64.
	* src/kill.c (sys_siglist): Also check for __sys_siglist.
	Patch by Tony Leneis.
	* configure.ac: Also check for declaration of __sys_siglist.
	Required for Tru64 4.0D, 4.0F, and 5.1.
	Reported by Tony Leneis.

2003-04-04  Jim Meyering  <jim@@meyering.net>

	* src/Makefile.am (PERL): Remove unnecessary definition.

	Because of inappropriate (but POSIX-mandated) behavior of rename,
	`mv a b' would not remove `a' in some unusual cases.  Work around
	this by unlinking `a' when necessary.

	* src/copy.c (same_file_ok): Add an output parameter.
	Set it in the offending case.
	(copy_internal): When necessary, unlink SRC_PATH and inform caller.
	Reported by Ed Avis.
	* tests/mv/hard-4: New test for the above.
	* tests/mv/Makefile.am (TESTS): Add hard-4.

	Clean up rules for automatically generated sources:
	* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, false.c):
	Make each generated file be read-only.
	Add each file name to BUILT_SOURCES separately.
	(MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).

	Put LOCALEDIR macro definition in new file: localedir.h.
	* src/Makefile.am (DEFS): Remove definition.
	(localedir.h): New rule.
	(BUILT_SOURCES, DISTCLEANFILES): Add localedir.h.
	* src/system.h: Include "localedir.h".

2003-04-02  Jim Meyering  <jim@@meyering.net>

	* Version 5.0.

	* tests/misc/Makefile.am (TESTS): Add false.

	* Makefile.maint (TMPDIR): Make sure it's defined.
	(my-distcheck): Build in $(TMPDIR), not `.'.

	* src/Makefile.am (false.c): Change all occurrences of
	`(EXIT_SUCCESS)' to `(EXIT_FAILURE)' so that false exits
	unsuccessfully also with --help.  Reported by Paul Jarc,
	* tests/misc/false: New test for the above.

2003-03-30  Jim Meyering  <jim@@meyering.net>

	* NEWS: Note the location of older NEWS files.

	* src/remove.c (is_empty_dir): Don't let a failing closedir
	clobber errno.  Spotted by Arnold Robbins.

	* src/env.c: Fix typo in comment.  From Arnold Robbins.

2003-03-29  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.12.

	* README: Note to expect build problems for stat.c on Ultrix 4.3.
	Note that there are some harmless test failures when running
	`make check' as root on some systems.

2003-03-28  Jim Meyering  <jim@@meyering.net>

	* tests/stty/row-col-1: Skip this test if stty can't get window size.
	This happens when connecting to sparc-solaris5.7 via ssh from within
	emacs.  Reported by Karl Berry.

	* tests/du/basic: Use seq, not `yes' to generate 4KB of data.
	Otherwise, on systems (DJGPP) that emulate pipes using files,
	this test would never complete, waiting for `yes' to terminate.
	* tests/du/slink: As above, use seq, not `yes' to generate link target.
	* tests/rm/hash: As above, use seq, not `yes' to generate dir name.
	Reported by Rich Dawe.

2003-03-27  Jim Meyering  <jim@@meyering.net>

	* src/id.c: Remove Arnold Robbins' obsolete e-mail address
	from `written by...' comment, at his request.

2003-03-24  Paul Eggert  <eggert@@twinsun.com>

	Fix buffer overrun problem reported by TAKAI Kousuke, along
	with some other POSIX incompatibilities.

	* src/printf.c (print_esc): Do not treat \x specially if
	POSIXLY_CORRECT.  Avoid buffer overrun if the format ends
	in backslash.  Treat incomplete escape sequences as strings
	of characters, as POSIX requires.
	(print_formatted): Allow multiple flags.  Avoid buffer overrun
	if the format is incomplete.

2003-03-24  Jim Meyering  <jim@@meyering.net>

	* tests/misc/printf: Add tests for the above fixes and changes.

2003-03-26  Jim Meyering  <jim@@meyering.net>

	* src/copy.h (struct cp_options): Add a comment.

2003-03-23  Jim Meyering  <jim@@meyering.net>

	* README: Describe problem with 64-bit mode on HPUX 11.x,
	with patch for /usr/include/inttypes.h.
	* TODO: Plan to add an autoconf test to work around the bug.

2003-03-22  Jim Meyering  <jim@@meyering.net>

	* src/stat.c: Don't include <sys/sysmacros.h>.
	That is already done via system.h.  Otherwise, the multiple
	inclusion would evoke redefinition warnings from Cray's /bin/cc,
	aka Cray Standard C Version 4.0.3  (057126) Mar 22 2003  22:02:28.
	(human_fstype): Factor some directives `up', out of this function.
	Cast away `const' to avoid error from Cray's /bin/cc.

2003-03-20  Jim Meyering  <jim@@meyering.net>

	* announce-gen (print_changelog_deltas): Ensure that a newline
	precedes each row of `*'s.

2003-03-20  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.11.

	* src/seq.c (valid_format): Also accept ` ' and `'' as valid
	format flag characters.
	Do not require that a field width be specified.
	Do not fail when given a field width of `0'.
	Reported by Dan Jacobson.
	* tests/seq/basic: Add new tests for the above-fixed bug.

	* src/Makefile.am (all-local): Append $(EXEEXT) to use of `su'
	(install-root): Likewise.
	(install-exec-local): Likewise.
	Based on a patch from Richard Dawe.

2003-03-19  Jim Meyering  <jim@@meyering.net>

	* man/Makefile.am (.x.1): Use $(LN_S) instead of 'ln -s',
	because the DJGPP 2.03 port of 'ln -s' doesn't work.
	Include $(EXEEXT) in program names.
	Since $(LN_S) may degenerate to `cp -p', be careful
	to invoke it from the destination directory.
	Mostly from Richard Dawe.
	* configure.ac: Use AC_PROG_LN_S.

	* tests/mv/part-symlink: Unset CDPATH.  Otherwise, having the
	CDPATH shell variable set could cause this test to fail.
	Reported by Karl Berry.

2003-03-18  Jim Meyering  <jim@@meyering.net>

	* src/fmt.c [struct Word] (paren, period, punct, final): Change the
	type of each member from bool <MEMBER>:1 to unsigned int <MEMBER>:1.
	AIX 5.1's xlc could not compile the former.
	Patch by Petter Reinholdtsen.  Also reported by Mike Jetzer.

2003-03-17  Richard Dawe  <rich@@phekda.freeserve.co.uk>

	* configure.ac: Include $(EXEEXT) in OPTIONAL_BIN_PROGS'
	program names, since automake only adds $(EXEEXT) to programs
	in its *_PROGRAMS.

2003-03-16  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (rm): Put two local variables in static storage,
	so they can't be clobbered by the potential longjmp.

2003-03-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.cfg (gnu_rel_host): Fix code to match the comment
	so that a version number with a two-digit component can still count
	as an alpha release.  Reported by Richard A Downing.
	(gnu_rel_host): Define in terms of $(RELEASE_TYPE) instead.

2003-03-14  Jim Meyering  <jim@@meyering.net>

	* src/ansi2knr.c: Remove no-longer-used file.
	* src/ansi2knr.1: Likewise.

	* Makefile.maint (prev_version_file): Don't use ?= for this particular
	assignment, since it causes trouble with old versions of GNU make
	(e.g. 3.76.1).  The other uses of `?=' are inoffensive.  Details here.
	http://mail.gnu.org/archive/html/bug-coreutils/2003-03/msg00028.html
	Patch from Alexandre Duret-Lutz.

	* Use patched automake-1.7.3.  Regenerate Makefile.in files in
	subdirectories so that each includes a definition of ACLOCAL_M4.

	* announce-gen (main): Label the compressed source URLs.

	* Version 4.5.10.

	* tests/du/slink: Relax the test for the `local'ness of a file system,
	so that now it works also for tmpfs.

	* tests/du/hard-link: Transform output from first du, so that this
	test doesn't fail on file systems like tmpfs that order directory
	entries differently.

2003-03-13  Jim Meyering  <jim@@meyering.net>

	* tests/du/8gb: Work around what appears to be an NFS failure that
	would make this test fail on some systems.

2003-03-11  Jim Meyering  <jim@@meyering.net>

	* tests/du/basic: Make the test file exactly 4k bytes long.

	* src/split.c (longopts): Don't hard-code `2' here.
	Instead, just specify `&verbose', and ...
	(main): ... remove the `case 2:' block for --verbose.

	* tests/du/basic: Make the test file larger than 64 bytes, so that
	we don't immediately disqualify file systems (e.g., NetApp) on which
	smaller files take up zero disk blocks.  Reported by Vin Shelton.

2003-03-10  Jim Meyering  <jim@@meyering.net>

	Don't segfault for a negative field width or precision in format string.
	Note that this is just a stopgap fix.  The longer term solution may
	involve adapting bash's builtins/printf.def.

	* src/printf.c: (UNSPECIFIED): Define.
	(print_direc): Use the special value, UNSPECIFIED, to indicate
	that field_width or precision has not been specified.
	(print_formatted): Fail if field_width or precision is the
	special value, UNSPECIFIED.
	Reported by Oliver Kiddle <okiddle@@yahoo.co.uk>

	* src/sys2.h (INT_MIN): Define, if necessary.
	* tests/misc/printf: Add a test for the above-fixed bug.

2003-03-09  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (AD_stack_pop): Cast sizeof... to int before
	changing its sign.  This avoids a warning from gcc on 64-bit systems.
	Reported by Bob Proulx.
	(pop_dir): Reverse order of sign change and cast, to be consistent
	with the above.

2003-03-08  Jim Meyering  <jim@@meyering.net>

	* tests/Makefile.am (evar-check): Check for POSIXLY_CORRECT not as a
	shell variable, but only in the environment.  With /bin/sh->bash, the
	shell variable is set to `y', and that would cause a spurious warning.
	Reported by Bob Proulx.

	* tests/Makefile.am (check-root): Remove touch/fifo.
	It doesn't appear to have to be run as root.

	* tests/rm/fail-2eperm: Rather than simply using the first non-root
	user name, make sure that the selected user name has a usable shell.
	Reported by Paul Jarc.

	Before, when using shred on a device, one had to specify --exact,
	or be careful to choose a size that would not be rounded up and
	exceed the maximum value;  that could result in a failure of
	the final write.
	* src/shred.c (do_wipefd): --exact is now the default for non-regular
	files.  Suggestion from Ben Elliston.
	(usage): Say it.

	* tests/misc/tty-eof: Require at least version 1.11 of Expect.pm.
	Old versions of Expect.pm (e.g., 1.07) lack the log_user function.
	Patch by Bob Proulx.

	* src/Makefile.am (check-misc): Check for use of `defined' in
	#define directives.
	Change to $(srcdir) before running grep.

	* src/sleep.c: Remove now-unused #include and #define directives.

	* src/du.c (process_file): If a file's size is not being counted
	e.g., because it's a hard link to a file we've already counted,
	then don't print a line for it.

	* tests/du/hard-link: New test for the above-fixed bug.
	* tests/du/Makefile.am (TESTS): Add hard-link.

	`du -S' didn't work
	* src/du.c: Revert most of the `reorganization' change of 2003-02-20,
	and make the two-array approach work.

	* tests/du/basic: Correct/add tests for the above fix.
	Set LC_ALL, etc., now that we use sort.
	Check the block/size of a small file, too.
	Correct expected results for simple dir1/dir2/file case.
	Add another test of du -S.

2003-03-07  John David Anglin  <dave.anglin@@nrc-cnrc.gc.ca>

	Avoid build failure with gcc on hppa1.1-hp-hpux10.20 (see GCC PR
	middle-end/9986).  As one of GCC's optimizations, it transforms a
	fputs_unlocked call to a fputc_unlocked call when the string is
	one character long.  However, hpux doesn't have fputc_unlocked.

	* expr.c (usage): Use putchar, not fputs, to output a single character.
	* ls.c (dired_dump_obstack): Likewise.
	* ptx.c (output_one_tex_line, output_one_dumb_line): Likewise.
	* stat.c (print_it): Likewise.

2003-03-07  Jim Meyering  <jim@@meyering.net>

	* src/cp.c: Remove everything associated with mmap-stack.c.
	This reverts the two changes of 2003-02-21.
	* src/du.c: Remove everything associated with mmap-stack.c.
	This reverts the change of 2003-02-19.

2003-03-06  Jim Meyering  <jim@@meyering.net>

	* tests/cp/same-file: Unset CDPATH.  Otherwise, having the
	CDPATH shell variable set could cause this test to fail.
	Reported by Karl Berry.

2003-03-05  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.9.

	* src/printf.c (print_esc): Remove pointless comparison of unsigned
	integer with zero, to avoid a warning from Intel's ecc.
	Reported by Nelson Beebe.

	* src/du.c (process_file): Sizes must all be of type uintmax_t.
	Otherwise, for files or totals that are too big, numbers would
	be truncated.  Patch mostly by Michael Stone.
	Reported by Ingo Saitz as Debian bug #183210.

	* tests/du/8gb: New test for the above-fixed bug.
	* tests/du/Makefile.am (TESTS): Add 8gb.

	* src/du.c (MAX_N_DESCRIPTORS): Use 3 * UTILS_OPEN_MAX / 4
	rather than UTILS_OPEN_MAX - 10.

2003-03-04  Jim Meyering  <jim@@meyering.net>

	* README: Refer new feature discussion to bug-coreutils@@gnu.org,
	rather than bug-gnu-utils, now that the former is better known.
	Suggestion from Göran Uddeborg.

	* src/stat.c (usage): Capitalize consistently.
	Reported by Göran Uddeborg.

	* Makefile.maint (rel-files): Include $(signatures), so that
	those files are also copied into $(release_archive_dir).

	* src/df.c (find_mount_point): Call error here, now that restore_cwd
	no longer does it.
	* src/remove.c (AD_pop_and_chdir): Likewise.

	* tests/Makefile.am (check-root): Add fail-2eperm.

2003-03-03  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (remove_cwd_entries): Include the full filename of
	the offending file, not just the basename.

	* tests/misc/tty-eof: Set $ME properly.

	* Makefile.maint (THIS_VERSION_REGEXP, PREV_VERSION_REGEXP):
	Remove now-unused variables.
	(tag-prev-version, prev-cvs-tag): Likewise.

	* src/remove.c (remove_cwd_entries) [!ROOT_CAN_UNLINK_DIRS]: Give an
	accurate diagnostic when failing to remove a file owned by some other
	user.  Reported by Ivo Timmermans via Michael Stone.
	This fixes Debian bug# 178471.

	* tests/rm/Makefile.am (TESTS): Add fail-2eperm.
	* tests/rm/fail-2eperm: New test, for the above-fixed bug.
	Based on a report from Ivo Timmermans.

2003-03-02  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (copy_internal) [un_backup]: When recovering from a
	failure to create a hard link, do not remove the entry associating
	the source dev/ino with the destination file name.
	* tests/mv/Makefile.am (TESTS): Add hard-3.
	* tests/mv/hard-3: New test, for the above-fixed bug.
	Inspired by a report from Iida Yosiaki.

2003-03-01  Jim Meyering  <jim@@meyering.net>

	* src/df.c (print_header): Don't embed spaces in a separate `Type'
	header string.  Instead, put `Filesystem' and `Type' headers in the
	same string, so translators can use horizontal space as needed.
	Reported by Jean Charles Delepine.

2003-02-28  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (copy_internal): When link fails because of an
	existing destination file, unlink that file and try again.
	Reported by Iida Yosiaki.

	* tests/mv/Makefile.am (TESTS): Add hard-2.
	* tests/mv/hard-2: New test for the above-fixed bug.
	Based on a test case from Iida Yosiaki.

2003-02-26  Jim Meyering  <jim@@meyering.net>

	* tests/du/basic: Don't test du's -b option here.  Directory byte
	counts are smaller (512 rather than 4096) on at least OSF/1 5.1
	and IBM AIX 4.2.  Reported by Nelson Beebe.

2003-02-25  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (announcement): Now that ChangeLog entries
	are output by announce-gen, don't do it here.
	* announce-gen (print_changelog_deltas): New function.
	(main): Use it.

2003-02-22  Jim Meyering  <jim@@meyering.net>

	* announce-gen: New option: --release-type=TYPE
	* Makefile.maint (beta, major): New targets.  Remove `release'.
	Put them all together on a line.
	Pass the release type (via RELEASE_TYPE envvar) to the MAKE
	invocation of `announcement'.
	(announcement): Invoke announce-gen with --release-type=$RELEASE_TYPE.

	* announce-gen: New option: --news=NEWS_FILE.
	Extract NEWS entries here, not via rules in Makefile.maint.
	* Makefile.maint (announcement): Now that NEWS entries are
	extracted by announce-gen, don't do it here.
	(news-r1, news-r2): Remove now-unused definitions.

2003-02-21  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.8.

	Merge in changes from autoconf's version of this file.
	* Makefile.maint (www-gnu): Define.
	(standards.texi-url_prefix): Use $(www-gnu).
	(make-stds.texi-url_prefix): Likewise.

	* src/cp.c: Include "mmap-stack.h".
	(main): Invoke `run' through a macro that (when possible) runs it
	with a large, mmap'd stack.

	* src/cp.c (run): New function, preparing for the above.
	Exit from this function, not from main
	(main): Call run.

	* src/du.c: New option: --apparent-size.
	(enum) [APPARENT_SIZE_OPTION]: New member.
	(long_options): Add it.
	(usage): Describe it.
	(main): Handle it.
	['b']: Set apparent_size.
	David Eisner reported that the behavior of --bytes had changed.
	Paul Eggert proposed the use of a new option, --apparent-size.

	* src/du.c (apparent_size): New global.
	(print_only_size): Reflect the fact that we're printing byte counts,
	not ST_NBLOCKSIZE-byte-block counts.
	(print_size): Call print_only_size rather than duplicating its code.
	(process_file): Accumulate byte counts, rather than block counts.

	* src/du.c (process_file): Always reset size_to_propagate_to_parent
	for --separate-dirs (-S).

2003-02-20  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.7.3.  Regenerate dependent files.

	* src/stat.c (print_stat): New format: %B (to print ST_NBLOCKSIZE).
	This makes %b (number of ST_NBLOCKSIZE-byte blocks) more useful.
	(usage) [%B]: Describe it.
	[%b]: Refer to %B.

	* src/du.c (process_file): Reorganize the code to use only
	one `sum' array, and change how -S works back to the way it was
	before 2003-01-31.  Patch by Bruno Haible.

	* tests/du/basic: New test.
	* tests/du/Makefile.am (TESTS): Add basic.

	* tests/envvar-check: Add checks for the following:
	BLOCK_SIZE, DU_BLOCK_SIZE, DF_BLOCK_SIZE, LS_BLOCK_SIZE.

	* tests/Makefile.am: Rename phony target envvar-check to evar-check
	so as not to conflict with the distributed file by the same name.

	* src/du.c (process_file): Set info->skip before any possible return.

	Report correct usage for directories, not 0.
	* src/du.c (process_file): Return for `file_type == FTW_DPRE'
	_before_ recording the dev/ino of a directory.
	Reported by Bruno Haible.

	Now, df always displays the device file name corresponding to the
	listed mount point under `Filesystem'.  Before, for an unmounted
	block- or character-special file argument, it would display the
	command-line argument instead.
	* src/df.c (show_disk): Return a value indicating whether
	there was a match.  Don't try to find a mount point here.
	(show_entry): If show_disk doesn't find a match, call show_point.

2003-02-19  Jim Meyering  <jim@@meyering.net>

	* src/du.c: Include "mmap-stack.h".
	(du_files): Add prototype with ATTRIBUTE_NORETURN.
	Exit from this function, not from...
	(main): ...here.
	Instead, if possible, invoke du_files through a macro that
	runs it with a large, mmap'd stack.

	* src/join.c (usage): Change wording in --help output:
	use FILENUM instead of `SIDE' and say what FILENUM means.
	Reported by Bernhard Gabler.

	* src/df.c (print_header): Rather than using a hard-coded literal
	string of spaces matching the length of the English `...Type' header,
	output the right number of spaces to match the selected translation.
	Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.

	* src/split.c (bytes_split): Remove unnecessary `else' after break.
	(lines_split): Likewise.  and correct misleading indentation.

	* src/split.c: Include "full-read.h".
	(bytes_split, lines_split, line_bytes_split): Use full_read,
	not safe_read.   The way split was using the latter, a short read
	could cause split to terminate before EOF.

	* tests/misc/tty-eof: Test all programs that can read stdin,
	requiring no arguments and that write to standard output.

	* tests/misc/tty-eof: New file.  Renamed from ...
	* tests/misc/cat-tty-eof: Remove file.  Rename to tty-eof.
	* tests/misc/Makefile.am (TESTS): Reflect renaming.

2003-02-18  Jim Meyering  <jim@@meyering.net>

	cksum would perform an extra read after encountering EOF
	* src/cksum.c (cksum): Exit the loop upon EOF, too.
	Patch by Michael Bacarella.

	Test for the bug fixed today in cksum, md5sum, and sha1sum.
	* tests/misc/cat-tty-eof: Generalize, clean-up, and test for
	cat, cksum, md5sum, and sha1sum all in the same loop.

2003-02-14  Jim Meyering  <jim@@meyering.net>

	* src/remove.c: Include "euidaccess.h".
	Remove declaration of euidaccess.

2003-02-12  Jim Meyering  <jim@@meyering.net>

	* src/pathchk.c (portable_chars_only): Remove unnecessary `const'
	in cast to avoid warning from icc.  Reported by Alexandre Duret-Lutz.

2003-02-10  Jim Meyering  <jim@@meyering.net>

	* src/test.c: Don't include group-member.h.
	Include euidaccess.h.
	(eaccess): Rewrite function to set the real uid and gid temporarily
	to the effective uid and gid, then invoke 'access', and then set the
	real uid and gid back.  On systems that lack setreuid or setregid,
	fall back on the kludges in euidaccess.  Before, it would not work
	for e.g., files with ACLs, files that were marked immutable,
	or on file systems mounted read-only.  Nelson Beebe raised the issue.
	Paul Eggert suggested the new implementation.

2003-02-09  Jim Meyering  <jim@@meyering.net>

	* src/test.c (test_stat): Remove function.  It's job is done (only
	when necessary) by the wrapper in lib/stat.c.  Adjust all uses.

2003-02-08  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.7.

	* tests/mv/part-symlink: Don't assume that the file owner username
	length is less than 9 in ls output: instead, omit that field
	altogether.  Reported by, and suggested fix from, Ferdinand.

	* tests/du/restore-wd: New test for just-fixed bug in ftw.c.
	* tests/du/Makefile.am (TESTS): Add restore-wd.

	* src/rm.c: Correct now-invalid comment about cycle-detection.

2003-02-06  Jim Meyering  <jim@@meyering.net>

	* NEWS: Add entries from old/*/NEWS
	from fileutils-4.1 through 4.1.11 and
	from sh-utils-2.0 through 2.0.15.  Suggestion from Karl Berry.

	* Version 4.5.6.

	* src/du.c (process_file): Don't return early for excluded files
	or for files whose dev/inode we've already seen.

2003-02-05  Jim Meyering  <jim@@meyering.net>

	* tests/du/exclude: New file.
	* tests/du/Makefile.am (TESTS): Add exclude.

2003-02-04  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/who.c (print_boottime, print_deadprocs, print_runlevel):
	Fix memory allocation arithmetic.

2003-02-04  Jim Meyering  <jim@@meyering.net>

	`df /dev/block-or-char-device-file--not-mounted' now reports
	the name of the file system on which the file resides, usually `/'.
	Before, it would leave the `Mounted on' field blank.
	* src/df.c (show_disk): Move function to precede find_mount_point.
	(show_disk): Add parameter: STATP.
	If we don't find a matching device name, then resort to calling
	find_mount_point.  Reported by Bob Proulx.

2003-02-03  Andreas Schwab  <schwab@@suse.de>

	* tests/rm/cycle: Require non-root.
	* tests/rm/isatty: Likewise.

2003-02-02  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.5.

	* man/Makefile.am (check-x-vs-1): Use @@PATH_SEPARATOR@@, not `:'.

	Ensure that there are no offending uses of `:'.
	* Makefile.maint (makefile_path_separator_check): New rule.
	(local-check): Add it to the list.

2003-02-01  Jim Meyering  <jim@@meyering.net>

	* src/du.c (MAX_N_DESCRIPTORS): Define.

	* src/stat.c (G_fail): New global.
	(human_time): Diagnose failed localtime, not failed nstrftime.
	(main): Fail if G_fail is set.

2003-01-31  Richard Dawe  <rich@@phekda.freeserve.co.uk>

	* tests/basename/Makefile.am: Use @@PATH_SEPARATOR@@ instead of
	hard-coding the path-separator.  Also double-quote the new PATH,
	to avoid problems when the path-separator is a semi-colon or when
	`pwd` contains e.g. a space.
	* tests/chgrp/Makefile.am: Likewise.
	* tests/chmod/Makefile.am: Likewise.
	* tests/chown/Makefile.am: Likewise.
	* tests/cp/Makefile.am: Likewise.
	* tests/dd/Makefile.am: Likewise.
	* tests/dircolors/Makefile.am: Likewise.
	* tests/du/Makefile.am: Likewise.
	* tests/expr/Makefile.am: Likewise.
	* tests/factor/Makefile.am: Likewise.
	* tests/fmt/Makefile.am: Likewise.
	* tests/install/Makefile.am: Likewise.
	* tests/ln/Makefile.am: Likewise.
	* tests/ls/Makefile.am: Likewise.
	* tests/ls-2/Makefile.am: Likewise.
	* tests/md5sum/Makefile.am: Likewise.
	* tests/misc/Makefile.am: Likewise.
	* tests/mkdir/Makefile.am: Likewise.
	* tests/mv/Makefile.am: Likewise.
	* tests/od/Makefile.am: Likewise.
	* tests/rm/Makefile.am: Likewise.
	* tests/rmdir/Makefile.am: Likewise.
	* tests/seq/Makefile.am: Likewise.
	* tests/sha1sum/Makefile.am: Likewise.
	* tests/shred/Makefile.am: Likewise.
	* tests/stty/Makefile.am: Likewise.
	* tests/sum/Makefile.am: Likewise.
	* tests/tail-2/Makefile.am: Likewise.
	* tests/touch/Makefile.am: Likewise.
	* tests/tsort/Makefile.am: Likewise.
	* tests/unexpand/Makefile.am: Likewise.

2003-01-31  Jim Meyering  <jim@@meyering.net>

	* src/stat.c: Include "file-type.h"
	(print_human_type): Remove function.
	(human_access): Rename from print_human_access.  Return a string.
	(human_time): Rename from print_human_time.  Return a string.
	(print_stat): Arrange so that field width and an alignment specifier
	are honored for the %A, %F, %x, %y, and %z formats.
	[%F]: Use file_type; this gives slightly different file type strings,
	e.g., `directory' instead of `Directory' and `regular file' or
	`regular empty file' instead of `Regular file'.
	Prompted by a report from Richard Dawe that the uses of
	S_IFSOCK and S_IFIFO in print_human_time were not portable
	to systems using e.g., DJGPP.

2003-01-31  Richard Dawe  <rich@@phekda.freeserve.co.uk>

	* src/stat.c (print_stat): Use S_ISLNK rather than an explicit
	test using S_IFMT and S_IFLNK.  S_IFLNK may not be defined.

2003-01-31  Jim Meyering  <jim@@meyering.net>

	* src/du.c (main): Upon processing an invalid option or an invalid
	--exclude-from or --max-depth option argument, don't exit right away,
	in case there are others.  Rather record the failure and exit after
	processing other options.

	* GNUmakefile (TAR_OPTIONS): Set and export, in order to make
	tar archive easier to reproduce.

	Rewrite to perform directory traversal using nftw.

	* src/du.c: Include "dirname.h", "ftw.h", and "quotearg.h".
	(AUTHORS): Add self.
	(opt_one_file_system): Move global into `main'.
	(path, xstat, exit_status): Remove declarations.
	(arg_length, suffix_length): New globals.
	(G_fail): New global, sort of like the old `exit_status'.
	(IS_FTW_DIR_TYPE): Define.
	(print_only_size): New function.
	(process_file): New function.
	(str_init, ensure_space, str_copyc, str_concatc): Remove functions.
	(str_trunc, pop_dir, count_entry): Likewise.
	(du_files): Rewrite to use nftw.

2003-01-30  Jim Meyering  <jim@@meyering.net>

	* tests/du/trailing-slash: Ensure that du/ftw follows a command-line
	symlink-to-directory with -L, even without the trailing slash.

2003-01-27  Jim Meyering  <jim@@meyering.net>

	* src/Makefile.am (check-misc): Check for st_blocks, too.

	* src/stat.c (print_stat): Use ST_NBLOCKS rather than `->st_blocks'.
	Reported by Richard Dawe.

2003-01-27  Andreas Schwab  <schwab@@suse.de>

	* src/ls.c (quote_name): Add fourth parameter, width, into which to
	store the screen columns, and return the number of bytes instead.
	(print_dir): Pass NULL as fourth parameter of quote_name.
	(print_name_with_quoting): Likewise.
	(length_of_file_name_and_frills): Get the width from the fourth
	parameter of quote_name instead of return value.

2003-01-27  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (decode_switches): If `dired' is set without
	`format == long_format', then silently reset dired.  This doesn't
	change the behavior of ls (all prior uses of dired were protected
	by `&& format == long_format'), and lets us...
	(DIRED_INDENT): ... remove the `format == long_format' conjunct.
	(PUSH_CURRENT_DIRED_POS): Likewise.
	(main): Likewise.

2003-01-22  Jim Meyering  <jim@@meyering.net>

	* tests/du/no-x: New test, for functionality added to lib/ftw.c.
	* tests/du/Makefile.am (TESTS): Add no-x.

2003-01-21  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS
	&& HAVE_STRUCT_DIRENT_D_TYPE]: If a file has d_type == DT_UNKNOWN
	it may still be a directory -- or not (e.g., with FreeBSD on an
	NFS-mounted file system), so resort to calling lstat to find out.
	Based on a patch by Michael van Elst.

	* tests/cp/same-file: Don't assume that the file owner username
	length is less than 9 in ls output: instead, omit that field
	altogether.  Reported by, and suggested fix from, Ferdinand.

2003-01-20  Jim Meyering  <jim@@meyering.net>

	* tests/date/Test.pm (wide-fmt): New test to demonstrate that
	large format widths no longer cause strftime to infloop.

	* Makefile.maint (mail_gpg_sign_cookie): Remove now-unused definition.

2003-01-19  Jim Meyering  <jim@@meyering.net>

	* src/readlink.c: Include "canonicalize.h".

2003-01-18  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]:
	New member.
	(enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
	(long_options): Add option --dereference-command-line-symlink-to-dir.
	(main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
	rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
	-d, -F, -l options is specified.
	(decode_switches): Handle --dereference-command-line-symlink-to-dir.
	(gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
	Change --dereference-command-line (-H) to dereference *all*
	command line arguments, including broken symlinks.

2003-01-15  Paul Eggert  <eggert@@twinsun.com>

	Change ls -H back to the way it was yesterday, since this is
	compatible with FreeBSD and the POSIX spec is confusing
	and somewhat contradictory.

	* src/ls.c (DEREF_COMMAND_LINE_ARGUMENTS): Change name back
	from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
	(long_options): Change the long option name back.
	(usage): Change the usage back.
	(gobble_file): When -H is specified, dereference a top-level
	arg even if it points to a non-directory.

2003-01-15  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (gobble_file): Fall back on using lstat when required:
	when --dereference (-L) is not specified, and
	- when operating on a dangling symlink
	- when operating on command-line-symlink-to-directories
	This fixes numerous problems.  Here are examples:
	- `ls dangling-symlink' would fail with `no such file...'
	Now it prints `dangling-symlink'.
	- `ls -i symlink' would mistakenly print the inode of the referent.
	Now it prints the inode of the symlink.  Likewise for --size (-s).
	Based on a patch from Michael Stone.
	Reported by Deepak Goel as Debian bug #173793.

	Rename ls's --dereference-command-line (-H)
	option to   --dereference-command-line-symlink-to-dir.
	* src/ls.c [enum Dereference_symlink]
	(DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
	DEREF_COMMAND_LINE_ARGUMENTS.  Update all uses.
	(long_options): Rename the long option.
	(usage): Say that --dereference-... changes how ls treats
	only symlinks to directories specified on the command line.

2003-01-14  Jim Meyering  <jim@@meyering.net>

	* tests/ls/dangle: New file/test, for the above fix.
	* tests/ls/inode: Another new file/test, for the above fix.
	* tests/ls/Makefile.am (TESTS): Add dangle and inode.

	* src/ls.c (gobble_file): Fix a bug introduced in 4.5.4 that made it
	so that ls --color would no longer highlight the names of files with
	the execute bit set when not specified on the command line.
	Patch by Michael Stone.  Reported by Stephen Depooter as
	Debian bug 175135.

	* tests/ls-2/tests (color-exe): New test, for the above fix.

2003-01-13  Jim Meyering  <jim@@meyering.net>

	* tests/shred/exact: Also test for just fixed bug with --zero.

	* src/shred.c (long_opts): --zero does not require an argument.
	Patch by Michael Stone.  Reported by Roland Turner as Debian bug 172019.

2003-01-12  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (cvs-update): Skip any file with local modifications.

	* src/unexpand.c (usage): Document --first-only and mention that
	--tabs=N (-t) enables --all (-a).  Reported by wiregauze@@yahoo.com.

2002-12-01  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/df.c: Include "canonicalize.h".
	Use canonicalize_file_name unconditionally.

2003-01-09  Jim Meyering  <jim@@meyering.net>

	* README: Add readlink.

2002-11-30  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/df.c: Include "xgetcwd.h".
	* src/pwd.c: Likewise.

2002-11-30  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/shred.c: Remove declaration of xstrdup.
	We already get it via xalloc.h which is included via system.h.

2002-08-27  Dmitry V. Levin  <ldv@@altlinux.org>

	New program: readlink.

	* src/Makefile.am (bin_PROGRAMS): Add readlink.
	* src/readlink.c: New file.

	* man/readlink.x: New file.
	* man/Makefile.am (dist_man_MANS): Add readlink.1.
	(readlink.1): New rule.

2003-01-09  Jim Meyering  <jim@@meyering.net>

	When selecting ranges of byte offsets (as opposed to ranges of fields)
	and when --output-delimiter=STRING is specified, output STRING between
	ranges of selected bytes.
	* src/cut.c (RANGE_START_SENTINEL): Define.
	(output_delimiter_specified): New global.
	(print_kth): Add parameter.  Adjust all callers.
	(set_fields): Mark each range-start index with RANGE_START_SENTINEL.
	(cut_bytes): When requested, output STRING between ranges of
	selected bytes.
	(main): Make a diagnostic a little clearer.
	Based on a patch from Jan Nieuwenhuizen.

	* tests/cut/Test.pm: New tests for the above.

	* src/cut.c (set_fields): Make code agree with comment:
	Don't merge abutting ranges like 4- and 2-3.  This makes no
	difference currently, but is required to support an upcoming change.

2003-01-07  Jim Meyering  <jim@@meyering.net>

	* src/cut.c (set_fields): Fix typo in comment.

	* tests/touch/not-owner: New test, mostly extracted from fail-diag.
	* tests/touch/Makefile.am (TESTS): Add not-owner.
	* tests/touch/fail-diag: Remove the test for non-owner diagnostic.
	Now, this tests only the nonexistent-directory diagnostic.
	Suggestion from Michael Stone.

	* tests/touch/fail-diag: Fix typo: s/ld/ls/.

2003-01-04  Jim Meyering  <jim@@meyering.net>

	* src/copy.h: Remove use of PARAMS.
	* src/remove.h: Likewise.
	* src/chown-core.h: Likewise.

	rm could be tricked into mistakenly reporting a cycle.
	* src/remove.c: [cycle_check_state]: New global.
	(remove_cwd_entries): Adapt to new semantics of cycle_check.
	(rm): Call cycle_check_init and cycle_check_free for each file.
	* tests/rm/cycle (rm): New test, for the above fix.
	* tests/rm/Makefile.am (TESTS): Add cycle.

	When rm detects a cycle, don't abort the entire command,
	but rather just the affected command line argument.
	* src/remove.c: Include <setjmp.h>
	(struct dirstack_state) [current_arg_jumpbuf]: New member.
	(remove_cwd_entries): Call longjmp if we detect a cycle.
	(rm): Call setjmp here.

	* src/remove.c (cycle_check, is_power_of_two): Remove functions.
	Instead, include cycle-check.h and use it.

	* src/remove.h (struct dev_ino): Remove declaration.

	* src/remove.c (remove_cwd_entries): Fix typos in comment.

	Don't include trailing /. in diagnostics about directories.
	* src/remove.c (full_filename_): When FILENAME is just `.'
	and there is a nonempty directory-name part, don't append `/.'.
	* tests/rm/unread2: Remove trailing /. from diagnostic.
	* tests/rm/rm2: Likewise.

	* src/remove.c (struct dirstack_state): Define.
	To be used in place of these file-scoped globals ...
	(dir_stack, len_stack, Active_dir): Remove globals.
	(ds_init, ds_free): New functions.
	(full_filename): Define.
	(full_filename_): Rename from full_filename.

	Begin to make AD_* functions more generic.
	* src/remove.c (AD_push_initial): Don't set status to RM_OK here.
	(AD_push): Likewise.
	(AD_INIT_OTHER_MEMBERS): Define.
	(remove_dir): Define the `status' member manually after each
	call to AD_push or AD_push_initial.

	* src/Makefile.am (check-misc): New rule, to ensure that no more
	S_IS* macro definitions sneak into the code.
	(check): Depend on check-misc.

	* src/remove.c [S_ISLNK]: Don't define.  It's already defined in sys2.h.
	* src/du.c (count_entry) [S_ISLNK]: Don't define.
	* src/shred.c [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.

2003-01-03  Jim Meyering  <jim@@meyering.net>

	* src/true.c: Add copyright.
	(AUTHORS): I suppose I've written it.

	* src/Makefile.am (false.c): Make the generated file be read-only.

2003-01-04  Jim Meyering  <jim@@meyering.net>

	* src/ls.c: Include "dev-ino.h".
	[struct dev_ino]: Remove declaration.

2003-01-02  Jim Meyering  <jim@@meyering.net>

	* src/cp.c (do_copy): Tweak diagnostic to be consistent with the one
	from mv: s/missing file arguments/missing file argument/.
	With --target-directory=DIR, cp and mv work with a single file argument.
	Reported by Karl Berry.

	* tests/rm/isatty: Enable this test.

2002-12-31  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (AD_push_initial): Don't set status to RM_OK here.
	(AD_push): Likewise.
	(AD_INIT_OTHER_MEMBERS): Define.
	(remove_dir): Define the `status' member manually after each
	call to AD_push or AD_push_initial.

	* src/ls.c [struct dev_ino]: Remove definition.
	Include "dev-ino.h" instead.

2002-12-28  Jim Meyering  <jim@@meyering.net>

	* tests/du/Makefile.am (TESTS): Add no-deref.
	* tests/du/no-deref: New script.

2002-12-23  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (remove_cwd_entries): Fix typo in comment.

2002-12-21  Jim Meyering  <jim@@meyering.net>

	* announce-gen: Generate MML-formatted announcement.
	This makes it a *lot* harder to send stale MD5/SHA1 signatures.

2002-12-20  Jim Meyering  <jim@@meyering.net>

	* src/touch.c (touch): Change the wording of a diagnostic so
	that it makes sense both when the file exists and when it doesn't.
	Suggestion from Michael Stone.

2002-12-18  Jim Meyering  <jim@@meyering.net>

	* src/stty.c (valid_options): Declare to be static.

2002-12-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.cfg: Remove rules related to generating m4/jm-glibc-io.m4.

	* src/chmod.c, src/copy.c, src/copy.h, src/cp-hash.h, src/csplit.c:
	* src/date.c, src/expr.c, src/fmt.c, src/id.c, src/install.c:
	* src/ls.c, src/od.c, src/pathchk.c, src/pr.c, src/remove.c:
	* src/shred.c, src/sort.c, src/stat.c, src/stty.c, src/sum.c:
	* src/tee.c, src/test.c: Remove all uses of `PARAMS'.

	* src/remove.c (PARAMS): Remove definition.
	* src/sys2.h: Likewise.

	* src/ls.c, src/stat.c, src/date.c: Remove declaration of nstrftime.
	Include strftime.h instead.

2002-12-14  Jim Meyering  <jim@@meyering.net>

	* Makefile.cfg ($(url_dir_list)): Use .../coreutils, not .../fetish.

	* src/system.h [! HAVE_DECL_MEMRCHR]: Declare memrchr.
	This is necessary at least for Irix6.5 when using c89.
	Reported by Nelson Beebe.

	* tests/misc/Makefile.am (TESTS): Add cat-tty-eof.

	* tests/misc/cat-tty-eof: New test.

	* src/mknod.c (usage): Specify how major and minor mode numbers
	are interpreted.  Report forwarded by Kristin E Thomas.
	* src/mknod.c: Remove now-redundant usage-specifying comment.

2002-12-13  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.4.

	* tests/du/trailing-slash: Allow for a directory of size `0'.
	That happens at least on file systems of type tmpfs on linux-2.4.18.

	* announce-gen: New script to begin replacing the commands
	associated with the rule here...
	* Makefile.maint (announcement): Invoke announce-gen.
	* Makefile.am (EXTRA_DIST): Add announce-gen.

	* tests/cp/preserve-2: New file/test, for latest fix.
	* tests/cp/Makefile.am (TESTS): Add preserve-2.

2002-12-11  TAKAI Kousuke  <takai@@vlsi.kuee.kyoto-u.ac.jp>

	Fix a bug whereby cp would fail to parse an option like
	--preserve=mode,ownership.
	* src/cp.c (decode_preserve_arg): Advance `comma' to
	point the character following the comma.

2002-12-11  Jim Meyering  <jim@@meyering.net>

	* src/pathchk.c (NEED_PATHCONF_WRAPPER): Undefine before defining,
	in case it's already defined.

2002-12-09  Jim Meyering  <jim@@meyering.net>

	* tests/touch/fail-diag: Don't get a test failure if /no exists.
	Instead, evoke a framework failure if /no-$$ exists.
	Reported by Michael Stone.

2002-12-08  Jim Meyering  <jim@@meyering.net>

	* src/du.c (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
	Define to rpl_lstat, so that even on systems like Solaris 5.8,
	du honors (per POSIX) the trailing slash on an argument referring
	to a symlink-to-directory.

2002-12-06  Jim Meyering  <jim@@meyering.net>

	* Use autoconf-2.57.  Regenerate dependent files.
	* Use automake-1.7.2.  Regenerate dependent files.

	* src/ls.c (gobble_file): Also stat the file if it's a
	regular file and --indicator-style=classify (aka -F).
	Thanks to Ed Santiago for opening my eyes.

	* tests/ls/file-type: New file.  Test for the above.
	A test to contrast ls -F and ls --indicator-style=file-type.
	* tests/ls/Makefile.am (TESTS): Add file-type.

2002-12-04  Jim Meyering  <jim@@meyering.net>

	* tests/ls/follow-slink: Make sure the symlink was created.
	Richard Dawe reported that `ln -s link link' succeeds, but creates
	no file on systems running some version of the DJGPP libc.

2002-12-03  Jim Meyering  <jim@@meyering.net>

	* src/Makefile.am (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr)
	since this package no longer panders to K&R compilers.

2002-12-02  Jim Meyering  <jim@@meyering.net>

	* tests/du/slink: Skip this test if `.' is on a non-local file system.

	* tests/Fetish.pm (_at_replace): Do the substitution only if there's
	something to replace.

2002-12-01  Jim Meyering  <jim@@meyering.net>

	* src/stat.c: Don't include <string.h> or <ctype.h>.
	That's already done via system.h.
	* src/dircolors.c: Don't include <ctype.h>.

2002-11-30  Jim Meyering  <jim@@meyering.net>

	* ls.c (gobble_file): Remove the block of code that caused
	`ls --color -F symlink-to-dir' to list the files in
	`symlink-to-dir/.'.  Now, it prints `symlink-to-dir@@', (just
	like `ls -F symlink-to-dir') but with the addition of highlighting.
	Similarly, `ls --color -dF symlink-to-dir' would print
	`symlink-to-dir/';  now it prints `symlink-to-dir@@'.
	Reported by Jeff Sheinberg as Debian bug #168203.
	* tests/ls-2/tests (sl-F-color, sl-dF-color): New tests for the above.

	ls is now more efficient: with certain options, it no longer needs
	to stat each directory entry on systems with valid dirent.d_type.
	* src/ls.c (print_dir): Add DT_LNK and DT_REG.
	(main): Make --recursive set format_needs_type, not format_needs_stat.
	(gobble_file): Remove a FIXME comment, now that it's fixed.

2002-11-24  Jim Meyering  <jim@@meyering.net>

	* src/du.c (du_files): Don't strip any trailing slash.
	Rewrite so that `/' is no longer represented internally as
	the empty string.
	(count_entry): When appending a file name component,
	account for the fact that the current path may end in `/'.
	François Pinard reported that `du symlink-to-dir/' was not
	equivalent to `du symlink-to-dir/.'.  Now it is.
	* tests/du/trailing-slash: New file/test, for the above fix.
	* tests/du/Makefile.am (TESTS): Add trailing-slash.

2002-11-23  Jim Meyering  <jim@@meyering.net>

	* src/tac.c (output): Declare some local variables to be of type size_t,
	rather than `int' to avoid warnings from gcc.

2002-11-21  Paul Eggert  <eggert@@twinsun.com>

	* src/ls.c (decode_switches): Use case-sensitive matching to
	decode the QUOTING_STYLE environment variable.  This is more
	consistent with the documentation, and with --quoting-style.

2002-11-21  Martin Buck  <martin.buck@@ascom.ch

	* src/stty.c (struct speeds): Add support for all baud rates defined
	in linux-2.4.19.

2002-11-19  Jim Meyering  <jim@@meyering.net>

	* tests/sum/sysv: Export LC_ALL=C, to avoid failure when
	run in a UTF locale.  Report and suggested fix by Bruno Haible.
	* tests/fmt/basic: Likewise.

2002-11-17  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Update via autoupdate.
	Add `AM_GNU_GETTEXT_VERSION(0.11.5)'.

	* src/mv.c (movefile): Don't remove trailing slashes from SOURCE.
	Reported by Hans Ginzel.

2002-11-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.cfg (gnu_rel_host): Define.
	(url_dir_list): Choose from (alpha|ftp).gnu.org depending
	on whether $(VERSION) looks like a major release number.

	* Makefile.maint (mail_gpg_sign_cookie): Backslash-escape `#'.
	(release): Rename from `alpha'.
	(alpha): Depend on release.

	* Makefile.maint (signatures): Define with ?=, so it's easy to override.

2002-11-14  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (mail_gpg_sign_cookie): Make optional.
	(announcement): Use the new variable.

	* Makefile.maint: Sync with Bison, i.e.:
	(po-check): Scan .l and .y files instead of the
	.c and the .h files that they generate.  This fixes the bug
	reported by Tim Van Holder in:
	<http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
	Look for N_ as well as for _.  Try to avoid matching #define for
	N_ and _.
	From Paul Eggert.

2002-11-12  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (HAVE_SYMLINKS): Remove unnecessary macro definition.
	Replace sole use with equivalent `#ifdef S_ISLNK'.
	Inconsistency reported by Dmitry V. Levin.

2002-11-11  Jim Meyering  <jim@@meyering.net>

	* src/stat.c (usage): Transform --help items output via s/ - /   /,
	so that help2man produces properly formatted man pages.
	Reported by Herbert Xu as Debian bug #168400.

2002-11-10  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (sighandler): Handle SIGTSTP specially.
	Based on suggestions from Solar Designer and Dmitry V. Levin.
	Add comments.

	* Makefile.cfg (cvs_files): Define.  From autoconf.
	(local_updates): Likewise.

	* src/ls.c (restore_default_color_handler, sigtstp_handler):
	Remove functions.
	(sighandler): New function, based on the one in sort.c.
	(main): Use sigaction, if possible; otherwise signal.
	Handle these signals:
	SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
	Don't register our handler if the signal is already being ignored.

	* src/dd.c (interrupt_handler): Use raise, rather than kill+getpid.
	* src/csplit.c (interrupt_handler): Likewise.
	* src/sort.c (sighandler): Likewise.
	(main): Declare `i' and `nsigs' to be unsigned, not int.

2002-11-09  Jim Meyering  <jim@@meyering.net>

	ls --color: restore terminal text color upon signal.
	* src/ls.c: Include "full-write.h" and <signal.h>.
	(restore_default_color, restore_default_color_handler): New functions.
	(sigtstp_handler, put_indicator_direct): New functions.
	(main) [print_with_color]: Register signal handlers.
	Patch mostly by Solar Designer and Stanislav Ievlev.

	Update from autoconf.
	* Makefile.maint (AMTAR): Remove definition.
	(update, cvs-update, po-update, do-po-update): New rules.
	(wget-update): Update (thus renaming to cvs-update).
	(automake_repo): Use anoncvs@@sources.redhat.com.

2002-11-06  Jim Meyering  <jim@@meyering.net>

	* tests/misc/Makefile.am (TESTS): Add printf-hex.

	* tests/misc/printf: Be careful to test the code in this package,
	not the shell built-in function.

	* src/printf.c (print_esc): A hexadecimal escape sequence has
	at most two hex. digits, not three.  Reported by Padraig Brady.
	(usage): Update description.
	* tests/misc/printf-hex: New file/test, for the above fix.

2002-10-07  Paul Eggert  <eggert@@twinsun.com>

	Add support for locale-specific size indications (e.g.,
	thousands-separators) and for explicit size suffixes on output.

	* doc/coreutils.texi (Block size): Say that:
	This affects display format as well as block size.
	Fractional block counts are rounded up.
	ls file size blocksize defaults to 1.
	A block size spec preceded by ' generates thousands separators.
	A suffix without a preceding integer generates suffixes.
	(tail invocation): 32k -> 32 KiB.
	(What information is listed): ls -h is now equivalent to
	ls --block-size=human, and ls -H is now equivalent to
	ls --block-size=si.  Displayed file size is now always affected by
	--block-size.

	* lib/inttostr.c, lib/inttostr.h, lib/imaxtostr.c, lib/offtostr.c,
	lib/umaxtostr.c: New files, taken from GNU tar.

	* lib/Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c,
	umaxtostr.c.
	(EXTRA_DIST): Add inttostr.c.

	* lib/human.c, lib/human.h: Rewrite to support locale-specific
	notations like thousands separators.
	Specify what includer of include.h must include beforehand.
	(human_group_digits, human_suppress_point_zero, human_autoscale,
	human_base_1024, human_SI, human_B): New enum values.
	(human_readable): Rename from human_readable_inexact; put the
	options before the sizes.  All uses changed.  The old human_readable
	function has been removed; use inttostr.h instead.
	(human_options): Renamed from human_block_size, with new signature
	that allows block sizes up to UINTMAX_MAX.  All callers changed.

	* m4/prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv,
	AC_HEADER_STDBOOL.  No need to check for limits.h since it's in
	freestanding C89.  No need to check for stdlib.h or string.h since
	autoconf does this now.

	* src/cksum.c (cksum): Use primitives from inttostr.h, not
	human.h, to print large numbers simply.
	* src/csplit.c (handle_line_error, parse_patterns): Likewise.
	* src/dd.c (print_stats, main): Likewise.
	* src/df.c (print_header): Likewise.
	* src/factor.c (print_factors): Likewise.
	* src/ls.c (print_long_format, print_file_name_and_frills): Likewise.
	* src/shred.c (dopass): Likewise.
	* src/sort.c (checkfp): Likewise.
	* src/sum.c (bsd_sum_file, sysv_sym_file): Likewise.
	* src/tail.c (xlseek): Likewise.
	* src/wc.c (write_counts, wc): Likewise.

	* src/df.c (human_output_opts): New var.
	(output_block_size): Now uintmax_t, not int, to handle larger
	block sizes.  All uses changed.
	* src/du.c: Likewise.
	* src/ls.c: Likewise.

	* src/df.c (print_header): In the header line, prefer SI to human
	representation if it's shorter; if neither is shorter, try to
	intuit what the user would prefer.

	* src/expr.c (inttostr): Remove; use new imaxtostr library
	function instead.

	* src/ls.c (file_output_block_size): New var, to distinguish
	file sizes from other sizes.
	(decode_switches): Set it.

	* src/shred.c (OUTPUT_BLOCK_SIZE): remove.
	(dopass): When printing progress, use floor for what has been done
	so far (since we should be conservative there), and ceiling for
	what needs to be done (since that's what other programs use).

2002-10-19  Jim Meyering  <jim@@meyering.net>

	* src/pinky.c (print_heading): Align TTY and Name headings.
	Reported by Karl Eichwalder.

2002-10-18  Jim Meyering  <jim@@meyering.net>

	* src/split.c (cwrite): Change type of `bytes' parameter to size_t
	Remove now-useless cast.
	(stdread): Remove function.
	(bytes_split): Use size_t instead of int.
	Use safe_read, not stdread.
	(lines_split): Likewise.
	Use memchr rather than a `while' loop.
	(line_bytes_split): Use size_t instead of int.
	Use safe_read, not stdread.
	(main): Add some FIXME comments to remind me to remove casts.

	* src/system.h (ST_BLKSIZE): Correct comment describing how to
	reproduce HPUX-11 cat failure.  From Petter Reinholdtsen.

2002-10-17  Jim Meyering  <jim@@meyering.net>

	Fix a problem that could make e.g., `cat' misbehave on systems which
	give invalid (unreasonably large) values for stat.st_blksize.
	* src/system.h (ST_BLKSIZE): Ensure that the result is in [1..4MB].
	Reported by Petter Reinholdtsen.

2002-10-14  Jim Meyering  <jim@@meyering.net>

	Specifying a printf conversion specifer as nl's separator string
	could cause nl to segfault.
	* src/nl.c (build_print_fmt): Don't include separator string
	in the printf format; it might contain `%'.
	Use a better bound on the length of the print_fmt buffer.
	(print_lineno): Print the separator here instead.
	Reported by Doug Coleman.

	* tests/misc/nl: New file/tests, including a test for the above.
	* tests/misc/Makefile.am (TESTS): Add nl.

	* tests/misc/split-l: New test, to make sure `split --lines=N' works.
	* tests/misc/Makefile.am (TESTS): Add split-l.

2002-10-13  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.3.

	* src/du.c (usage): Tweak description of --dereference-args/-D.

	* src/du.c (count_entry): Also save cwd when dereferencing (via
	--dereference-args, -D) a command-line argument.
	Reported by Michal Svec.  Based on a patch by Andreas Schwab.

	* src/Makefile.am (../AUTHORS): New target/rule.

2002-10-12  Jim Meyering  <jim@@meyering.net>

	* src/paste.c (paste_parallel): Declare local, `delims_saved', to be
	of type size_t, since that's the way it's used and avoids a warning.

	* src/csplit.c (struct cstring) [len]: Declare to be unsigned int,
	since that's how it's always used and avoids a new warning from gcc.
	(read_input): Adapt to new safe_read ABI.

	* src/cut.c (cut_fields): Add a temporary size_t variable, n_bytes,
	to avoid warnings.

	* src/pinky.c (print_long_entry): fread returns size_t.
	Declare local `bytes' accordingly, to avoid warning.

	tail -c +N would perform an extra read after encountering EOF
	[this change is analogous (bytes vs. lines) to the one of 2002-01-27]
	* src/tail.c (start_bytes): Detect EOF, inform caller.
	(tail_bytes): Upon EOF in start_bytes, return immediately.
	(file_lines): Reorganize to use memrchr rather than an explicit loop.
	Adapt to new safe_read ABI.

2002-10-11  Jim Meyering  <jim@@meyering.net>

	* tests/du/deref: New file/test, for the above fix.
	* tests/du/Makefile.am (TESTS): Add deref.

2002-10-10  Jim Meyering  <jim@@meyering.net>

	* tests/ln/Makefile.am (TESTS): Add target-1.
	* tests/ln/target-1: New file/test, for the fix on 2002-10-08.

2002-10-09  Jim Meyering  <jim@@meyering.net>

	* tests/cp/backup-is-src: Ensure that certain environment variables
	are not set (e.g., SIMPLE_BACKUP_SUFFIX).  Reported by Duncan Roe.

	* tests/tail-2/big-4gb: Mark this as an expensive test; it would
	consume 4GB of disk space on systems without support for sparse files.
	Fix a logic error that'd make it `cat err' even though dd didn't fail.

	* src/dircolors.hin (.jar): Fix typo: s/;3$/;31/.
	Patch by steven@@magelico.net, forwarded by Michael Stone.

	* tests/ls/dired: Ensure that ls produces English messages.
	Patch by Alexey Vyskubov, forwarded by Michael Stone.

2002-10-08  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/ln.c (main): Fix target_directory parsing when n_files == 1.

2002-10-08  Jim Meyering  <jim@@meyering.net>

	* tests/tail-2/big-4gb: Use double quotes around diagnostic.
	Fix syntax in test: use =, not ==.
	Reported by Bob Proulx.
	Change all the rest like this: grep -lR "testing framework'" .\
	|xargs perl -pi -e 's/'\''(\$0: failure in testing framework)'\''/"$1"/'

	* src/sum.c (sysv_sum_file): Adapt to new safe_read ABI.
	* src/tr.c (squeeze_filter, read_and_delete, read_and_xlate): Likewise.
	* src/tac.c (save_stdin, tac_stdin_to_mem): Likewise.
	* src/wc.c (wc): Likewise.

2002-10-07  Paul Eggert  <eggert@@twinsun.com>

	* src/cat.c (cat):
	Don't advance the write pointer past the end of the write buffer.
	* src/sort.c (begfield, limfield): Likewise.

2002-10-07  Jim Meyering  <jim@@meyering.net>

	* src/cat.c (simple_cat, cat): Adapt to new safe_read ABI.
	* src/head.c (head_bytes, head_lines): Likewise.

2002-10-06  Jim Meyering  <jim@@meyering.net>

	* src/dd.c (scanargs): Ensure that specified block sizes (specified
	via ibs=N, obs=N, and bs=N) are no larger than SSIZE_MAX.
	(skip, dd_copy): Adapt to new safe_read ABI.

	* Makefile.maint (signatures): Define.
	(%.sig): New rule.
	(announcement): Depend on $(signatures).

	* Makefile.maint (announcement): Output all URLs for detached
	signatures, not just the last one from the previous loop.

2002-10-05  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.2.

	* src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS]: With `rm -i DIR',
	don't recurse into directory, DIR.  Prompted by a report from
	Leonardo Milano.

	* tests/rm/i-no-r: New file/test, for the above fix.
	* tests/rm/Makefile.am (TESTS): Add i-no-r.

	* tests/tail-2/big-4gb: New file/test, for the fix of 2002-09-27.
	* tests/tail-2/Makefile.am (TESTS): Add big-4gb.

2002-10-03  Jim Meyering  <jim@@meyering.net>

	* src/rm.c (AUTHORS): Mark translatable string with `N_ (...)'.
	* src/df.c (AUTHORS): Likewise.
	* src/du.c (AUTHORS): Likewise.
	* src/tail.c (AUTHORS): Likewise.
	* src/touch.c (AUTHORS): Likewise.

2002-10-02  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (SUBDIRS): Remove `old'.
	(EXTRA_DIST): List the files in old/.
	* configure.ac (AC_CONFIG_FILES): Remove old/* names.
	Suggestion from Akim Demaille.

2002-10-01  Jim Meyering  <jim@@meyering.net>

	* src/sys2.h (SSIZE_MAX): Define.

2002-09-30  Jim Meyering  <jim@@meyering.net>

	* src/csplit.c: Don't include stdlib.h here.  It's already included
	via system.h.

2002-09-29  Jim Meyering  <jim@@meyering.net>

	* src/tr.c (find_bracketed_repeat): Rearrange pointer/integer
	expression to avoid bogus warning from gcc.

	* src/cat.c (simple_cat): Use a temporary to avoid bogus warnings.
	(cat): Declare insize and outsize to be of type size_t, not int.
	Rearrange pointer/integer expressions to avoid bogus warnings.
	(main): Declare insize and outsize to be of type size_t, not int.

	* src/tail.c (parse_options): Give a sensible diagnostic for
	an invalid byte or line count.  Reported by Mikko Tuumanen.

	* src/touch.c (main): Split a long line.

	* tests/du/Makefile.am (TESTS): Add slink.
	* tests/du/slink: New test for system.h change of 2002-08-31.

	In move mode, always first try to rename.  Before, upon failure to
	rename a directory, this code would never attempt to rename any
	other file in that directory, but would thenceforth always copy.
	On some systems (e.g., NetApp's OnTap-6.4), renaming a directory
	may fail with EXDEV, yet renaming files within that directory to
	a newly-created destination directory succeeds.
	* src/copy.c (copy_internal): Remove local, move_mode;
	use x->move_mode instead.  Based on a patch from Tom Haynes.

2002-09-28  Jim Meyering  <jim@@meyering.net>

	* src/split.c (FAIL_ONLY_ONE_WAY): New macro.
	Factor out some duplication.
	(main): Use it.
	[case 'a']: Use strtoul rather than strtol to avoid compiler warnings.

	* src/sort.c (begfield, limfield): Rearrange comparisons to avoid
	compiler warnings.
	(fillbuf, keycompare): Cast literal `-1' to size_t in comparisons,
	to avoid compiler warnings.

	* src/shred.c (dopass): Use a uintmax_t temporary to avoid bogus
	compiler warnings.

	Fix things so `mkdir -p' can create very deep directories, e.g.,
	mkdir -p $(perl -e 'print "a/" x 40000') now works.
	* src/mkdir.c (main): For --parents (-p), call make_path with the
	entire directory name, so we don't ever require that file operations
	like stat or chmod be performed on the entire command line argument.
	* makepath.c (make_path): Restore umask *before* creating the final
	component.

2002-09-27  Andreas Schwab  <schwab@@suse.de>

	* src/tail.c (tail_bytes): Change type of bytes_remaining to off_t
	to avoid overflow.  Reported by Hans Lermen.

2002-09-26  Jim Meyering  <jim@@meyering.net>

	* src/install.c (get_ids): Use strtoul, not strtol.  Remove some casts.

2002-09-25  Jim Meyering  <jim@@meyering.net>

	* src/test.c (eaccess): Change type of local `euid' from int to uid_t
	and add a cast, to avoid a warning about `signed and unsigned type in
	conditional expression'.

2002-09-22  Jim Meyering  <jim@@meyering.net>

	* src/rmdir.c: Include "dirname.h", for declaration of
	strip_trailing_slashes.

	* src/stat.c (PRIdMAX, PRIuMAX): Remove definitions.
	Now they're defined through system.h.

	* src/cp-hash.c, src/dd.c, src/df.c, src/du.c, src/ls.c,
	* src/stat.c, src/wc.c: Remove all inclusions of inttypes.h,
	since it's already included from sys2.h via system.h.

	* Use automake-1.6f.  Regenerate dependent files.

	* src/Makefile.am (PERL): Remove duplicate definition.

	fmt's -s, -t, -c options didn't work properly for long lines.
	Since get_line may end up calling put_paragraph (for long lines),
	be sure to set global, `other_indent', before it is used there.

	* src/fmt.c (set_other_indent): New function, factored out of...
	(get_paragraph): ... here.  Call it.
	(get_line): Call set_other_indent before calling flush_paragraph,
	which calls fmt_paragraph, which in turn calls put_paragraph,
	which uses other_indent.

	* tests/fmt/Makefile.am (TESTS): Add long-line.
	* tests/fmt/long-line: New file/test, for the above fix.

2002-09-21  Jim Meyering  <jim@@meyering.net>

	* src/od.c: No longer include deprecated <values.h>.
	It was required solely for now-removed reference to BITSPERBYTE.
	* src/install.c: Likewise.
	Suggestion from Bruno Haible.

2002-09-06  Andreas Schwab  <schwab@@suse.de>

	`rmdir -p dir-specified-with-trailing-slash/' would fail.
	* src/rmdir.c (remove_parents): Strip trailing slashes.

2002-09-20  Jim Meyering  <jim@@meyering.net>

	* tests/rmdir/t-slash: New file/test, for the above fix.
	* tests/rmdir/Makefile.am (TESTS): Add t-slash.

	* Makefile.maint (announcement): Arrange to gpg-sign the message.
	Add a URL for each detached signature file.

2002-09-07  Bruno Haible  <bruno@@clisp.org>

	* configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation.

2002-09-18  Jim Meyering  <jim@@meyering.net>

	`od -t x8' used the wrong (`l'-prefixed) printf format.
	Likewise for the o8 and u8 formats.
	* src/od.c (ISPEC_TO_FORMAT): Define macro.
	(decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG.
	Reported by Arun Sharma.

2002-09-17  Jim Meyering  <jim@@meyering.net>

	* src/sys2.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary.
	From gettext's intl/loadmsgcat.c.

	* tests/od/x8: New file/test, for the above fix.
	* tests/od/Makefile.am (TESTS): Add x8.

2002-09-15  Jim Meyering  <jim@@meyering.net>

	* Use autoconf-2.54.  Regenerate dependent files.

	* src/csplit.c (get_format_width): Add cast to avoid
	warning about `signed and unsigned type in conditional expression'.

2002-09-14  Jim Meyering  <jim@@meyering.net>

	* src/who.c (print_user): Change type of local to size_t
	to avoid warnings about `comparison between signed and unsigned'.
	* src/ptx.c (generate_all_output): Likewise.

	* src/dd.c (main, skip): Add casts to avoid warnings about
	`comparison between signed and unsigned'.

	* src/id.c (print_full_info, print_group_list): Add casts to avoid
	warnings about `signed and unsigned type in conditional expression'.

	* src/md5sum.c: Change type of global, digest_hex_bytes, to size_t
	to avoid warnings about `comparison between signed and unsigned'.
	(split_3): Change parameter names to be readable and add comment.
	Clean up the test for whether a line may be ignored.

2002-09-13  Jim Meyering  <jim@@meyering.net>

	* src/printf.c (main): Handle leading command line argument of `--'.
	Reported by Raul: DervishD <raul@@pleyades.net>
	* tests/misc/printf: New file: test for the above.
	* tests/misc/Makefile.am (TESTS): Add printf.

	* src/date.c (usage): Explain that %S's range of [0..60] is required --
	rather than 0..59 -- to accommodate the occasional positive leap second.
	Reported by Richard Neill.

2002-09-12  Jim Meyering  <jim@@meyering.net>

	* src/Makefile.am (nanosec_libs): Define.
	(sleep_LDADD, tail_LDADD): Use it here.

	Factor nanosleep-related code into ../lib/xnanosleep.c.
	* src/sleep.c: Include xnanosleep.h.
	Factor out fenv.h-related code.
	(timespec_subtract): Remove function.
	(main): Remove code that deals with computing start and stop times
	as well as the loop around nanosleep.  Now that's in xnanosleep.c.

	Allow S (in --sleep-interval=S) to be a floating point value.
	* src/tail.c: Include xnanosleep.h and xstrtod.h.
	Move declaration of global variable, sleep_interval, to ...
	(main): ...here.
	(usage): Update description of --sleep-interval option.
	(tail_forever): New parameter, sleep_interval.  Update caller.
	Use xnanosleep, rather than sleep.
	(parse_options): New parameter, sleep_interval.  Update caller.
	Use xstrtod, now that we accept floating point values.
	Prompted by a patch from Augey Mikus.

2002-09-06  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (prompt): Change comment to give a better note to
	translators.  From Michael Piefel.

2002-09-02  Jim Meyering  <jim@@meyering.net>

	* README: A good problem report/patch includes diffs against
	the most recent test release.

	* src/pathchk.c (NEED_PATHCONF_WRAPPER): Define.
	(pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.

	* src/kill.c (print_table_row): Use an unsigned type for widths
	to avoid warning about comparison between signed and unsigned.
	(list_signals): Likewise.

	* src/od.c (skip): Add a cast to avoid warning about comparison
	between signed and unsigned.
	* src/install.c (get_ids): Likewise.  Also rearrange range-checking
	comparisons to make them more readable.

2002-09-01  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.1.

2002-08-31  Jim Meyering  <jim@@meyering.net>

	Symlinks were always reported as using 0 blocks.
	* src/system.h (ST_NBLOCKS): Don't depend on file type.
	This reverts the change of 2000-01-30.
	Based on a report and patch from Neil Brown via Michael Stone.
	This fixes Debian Bug#156358.

	* Most files: Change `exit (0)' to `exit (EXIT_SUCCESS)',
	`exit (1)' to `exit (EXIT_FAILURE)', and
	`usage (1)' to `usage (EXIT_FAILURE)'.

	* chgrp.c, chmod.c, chown.c, chroot.c, cp.c, date.c, dd.c, du.c,
	* hostname.c, id.c, install.c, ln.c, mkdir.c, mkfifo.c, mknod.c,
	* nice.c, pinky.c, printf.c, pwd.c, shred.c, sleep.c, stty.c,
	* su.c, tac-pipe.c, tail.c, tee.c, touch.c, uname.c, uptime.c,
	* users.c, who.c: Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
	But don't change `error (0, ...' to `error (EXIT_SUCCESS, ...', since
	error never exits successfully.

2002-08-29  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (remove_cwd_entries): Use closedir (not CLOSEDIR)
	when ignoring any return value.

	* src/remove.c (remove_cwd_entries): Detect and diagnose readdir
	failures.  On some systems (at least EMC Celerra and Solaris5.8),
	this appears to be necessary.
	(is_empty_dir): Likewise.  Also, always close directory handle.
	* src/ls.c (print_dir): Likewise.
	(print_dir): Rename local variable: reading -> dirp.
	Reported by Mike Coleman.

2002-08-28  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (remove_cwd_entries): Use CLOSEDIR, not closedir.
	Give a diagnostic and fail if closedir fails.

2002-08-26  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (THANKS-to-translators): New rule.
	(EXTRA_DIST): Add both THANKS-to-translators and THANKStt.in.
	* THANKStt.in: New file.

	* src/cat.c (close_stdout_wrapper): New, kludgey, function and
	file-scoped global.
	(main): Register it with atexit.
	Close STDOUT_FILENO, to avoid a problem when writing to
	/dev/audio on at least Solaris 5.7 and 5.8 systems.
	Reported by Shing-Shong Shei.

2002-08-25  Jim Meyering  <jim@@meyering.net>

	* src/cat.c (main): Close STDIN_FILENO rather than a literal `0'.
	* src/tac.c (main): Likewise.
	* src/tail.c (main): Likewise.
	* src/tee.c (main): Likewise.
	* src/tr.c (main): Likewise.
	* src/wc.c (main): Likewise.

2002-08-20  Jim Meyering  <jim@@meyering.net>

	* tests/mv/setup: Rewrite not to use `: ${VAR=not_set}' paradigm.

2002-08-10  Paul Eggert  <eggert@@twinsun.com>

	* src/nohup.sh: Don't use "exec --"; it's not portable and
	shouldn't be needed.

2002-08-09  Jim Meyering  <jim@@meyering.net>

	* src/pr.c (main): Don't ignore -COLUMN if it's the last option.
	(usage): Clarify help text for the -COLUMN option.
	Patch by Padraig Brady.
	* tests/pr/Test.pm [col-last]: New test for the above.

	* configure.ac: Start with version 4.5.1, chosen so that it's larger
	than the latest version numbers of the component packages.

	* man/Makefile.am (check-x-vs-1): Set and export PATH so we use
	programs in ../src.

2002-08-08  Jim Meyering  <jim@@meyering.net>

	* src/date.c: Guard inclusion of <langinfo.h> with
	`#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
	* src/sort.c: Likewise.
	Patch by GOTO Masanori.

2002-08-05  Paul Eggert  <eggert@@twinsun.com>

	Fix some minor time-related bugs with POSIX time arguments.
	Some valid time stamps were being rejected (notably -1, and
	time stamps before 1900 on 64-bit hosts).  And some invalid
	time stamps were being accepted, e.g. September 31.

	* src/date.c (main): Adjust to posixtime signature change.
	* src/touch.c (main): Likewise.  Remove unnecessary initialization.
	Use localtime, not posixtm, to warn about obsolete "touch".

2002-08-05  Jim Meyering  <jim@@meyering.net>

	* tests/misc/Makefile.am (TESTS): Add nice and pathchk1.

2002-08-04  Jim Meyering  <jim@@meyering.net>

	* src/Makefile.am (check-README): New target/rule.
	(check): Depend on it.

	* configure.ac (AC_CONFIG_FILES): Add old/Makefile and old/*/Makefile.

2002-08-03  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (SUBDIRS): Add old.
	* old/: New directory, containing legacy ChangeLog* and NEWS files
	from the fileutils, sh-utils, and textutils packages.

	* src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false.

2002-08-02  Paul Eggert  <eggert@@twinsun.com>

	* NEWS, doc/coreutils.texi: uniq now obeys LC_COLLATE.

	* src/uniq.c: Include hard-locale.h, xmemcoll.h.
	(hard_LC_COLLATE): New var.
	(different): Args are now char *, not const char *.
	Use xmemcoll instead of memcmp to compare lines, so that
	LC_COLLATE has effect.  However, use memcmp if it is an
	easy locale.
	(check_file): Do not include newline in comparison, so that
	xmemcoll has a byte to stomp on temporarily.
	(main): Set hard_LC_COLLATE.

2002-07-29  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (SUBDIRS): Remove djgpp, for now.

2002-07-20  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (false.c): Convert only the final EXIT_SUCCESS
	into EXIT_FAILURE.  Otherwise, false --help and false --version
	would fail.

2002-07-08  Jim Meyering  <jim@@meyering.net>

	* src/Makefile.am (uninstall-local): Search for @@GNU_PACKAGE@@,
	rather than the hard-coded `sh-utils'.

2002-07-01  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Merge the three files from fileutils,
	textutils, and sh-utils.
	* Makefile.am: Likewise.
	* src/Makefile.am: Likewise.
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Virgin import (trimmed) of GNU Sort, textutils 2.0.21
@
text
@@


1.1.1.2
log
@Virgin import (trimmed) of GNU Sort, textutils 2.1
@
text
@a0 169
2002-07-29  Jim Meyering  <meyering@@lucent.com>

	* Version 2.1.

	* src/tail.c: Adjust command examples in comments to use
	POSIX 1003.1-2001 option syntax.
	* src/sort.c: Likewise.
	From Paul Eggert.

2002-07-28  Jim Meyering  <meyering@@lucent.com>

	* configure.ac: Require automake-1.6b.

2002-07-20  Jim Meyering  <meyering@@lucent.com>

	* Version 2.0.22.

	* Upgrade to cvs automake -- required to work with 2.53b.
	* configure.ac: Require automake-1.6a.

	* Upgrade to gettext-0.11.3.
	* Upgrade to autoconf-2.53b.

2002-07-02  Jim Meyering  <meyering@@lucent.com>

	* src/cat.c, src/cksum.c, src/comm.c, src/csplit.c, src/cut.c (usage):
	Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.
	* src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/join.c: Likewise.
	* src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c: Likewise.
	* src/sort.c, src/split.c, src/sum.c, src/tac.c, src/tail.c: Likewise.
	* src/tr.c, src/tsort.c, src/unexpand.c, src/uniq.c, src/wc.c: Likewise.

2002-06-22  Jim Meyering  <meyering@@lucent.com>

	* configure.ac: Invoke AC_GNU_SOURCE very early.

2002-06-15  Jim Meyering  <meyering@@lucent.com>

	* src/cksum.c: Include <sys/types.h> before system.h.

2002-05-22  Jim Meyering  <meyering@@lucent.com>

	* src/od.c [struct dummy]: Renamed.  Don't rely on portability of
	zero-length arrays.  Instead, use sizes of -1 or +1.
	Reported by Eric Backus.

2002-05-14  Jim Meyering  <meyering@@lucent.com>

	`od -t f8' didn't work.
	This bug was introduced with my change of 2000-10-22 (textutils-2.0.8).
	* src/od.c (ulonglong_t): Move declaration to precede new use.
	[enum size_spec] (N_SIZE_SPECS): New member.
	(width_bytes): Add initializer corresponding to ulonglong_t type.
	(struct assert_width_bytes_matches_size_spec_decl): Declare.
	Based on a patch from Tony Kocurko.

2002-04-29  Paul Eggert  <eggert@@twinsun.com>

	Use ENABLE_NLS only for gettext-related stuff, not also for
	setlocale-related stuff.  From a patch suggested by Bruno
	Haible.

	Since setlocale is now almost universal, this patch also
	removes some of the optimizations that clutter up the code and
	which don't help all that much even on hosts that lack
	setlocale.

	* lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
	* m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
	Do not check for alloca.h (no longer used) or stdbool.h (was never
	used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.

	* src/sys2.h (HAVE_SETLOCALE): Define to 0 if not defined.
	* src/comm.c (compare_files): Replace #ifdef ENABLE_NLS
	with if (HAVE_SETLOCALE).
	* src/join.c (keycmp): Likewise.
	* src/sort.c (keycompare, compare): Likewise.

	* src/comm.c (hard_LC_COLLATE): Define even if ! ENABLE_NLS.
	* src/join.c (hard_LC_COLLATE): Likewise.
	* src/sort.c (hard_LC_COLLATE): Likewise.

	* src/comm.c (main): Always initialize hard_LC_COLLATE.
	Put initialization next to other locale-related stuff.
	* src/join.c (main): Likewise.
	* src/sort.c (main): Likewise.

	* src/sort.c: Include <langinfo.h> even if ! ENABLE_NLS.
	(decimal_point, th_sep): Depend on HAVE_SETLOCALE, not ENABLE_NLS.
	(main): Likewise.
	(MONTHTAB_CONST): Remove; all uses removed.
	(struct_month_cmp, inittables): Do not depend on ENABLE_NLS.
	(main): hard_LC_TIME locale does not depend on ENABLE_NLS.

2002-04-29  Jim Meyering  <meyering@@lucent.com>

	* src/tail.c (parse_obsolescent_option): Do not limit the maximum
	line/byte count (when specified via obsolete option syntax) to be
	less than ULONG_MAX on systems where OFF_T_MAX is larger.

2002-04-28  Paul Eggert  <eggert@@twinsun.com>

	* src/tail.c (tail_forever): Do not treat
	max_n_unchanged_stats_between_opens specially (as if it were
	infinite) if it has its maximal value.  Similarly for
	max_n_consecutive_size_changes_between_opens.

2002-04-28  Jim Meyering  <meyering@@lucent.com>

	Avoid new warnings from gcc.
	* src/pr.c [struct COLUMN] <name>: Declare member to be const.
	(init_fps): Declare local variable `firstname' to be const.

2002-04-25  Jim Meyering  <meyering@@lucent.com>

	* src/wc.c (usage): Adjust ordering to match that of default output.
	Suggestion from Gaute Hvoslef Kvalnes.

	* configure.ac (AM_GNU_GETTEXT): Add external arg.
	(AC_CONFIG_FILES): Remove intl/Makefile.
	* Makefile.am (SUBDIRS): Remove intl.
	* src/Makefile.am (INCLUDES): Remove -I../intl.

2002-04-15  Jim Meyering  <meyering@@lucent.com>

	* src/tr.c (usage): Give a verbose description of --squeeze-repeats,
	including the mention of SET1.  Reported by Dan Jacobson.

2002-04-12  Jim Meyering  <meyering@@lucent.com>

	* src/Makefile.am (LDADD): List ../lib/libfetish.a both before
	and after @@LIBINTL@@.  Thanks to Paul Eggert for the fix and to
	Bruno Haible for diagnosing the problem.

2002-03-16  Jim Meyering  <meyering@@lucent.com>

	* src/Makefile.am (datadir): Don't override $(datadir)
	which might be set by --datadir and different from $(prefix)/share.
	Patch from Albert Chin-A-Young.

2002-03-10  Jim Meyering  <meyering@@lucent.com>

	* configure.ac (AM_INIT_AUTOMAKE): Specify the required version
	of automake (1.6), and options (gnits dist-bzip2), rather than...
	* Makefile.am (AUTOMAKE_OPTIONS): ...here.  Remove definition.

2002-03-09  Jim Meyering  <meyering@@lucent.com>

	* Makefile.am (EXTRA_DIST): Remove config/config.rpath,
	now that automake knows about it.

2002-03-05  Jim Meyering  <meyering@@lucent.com>

	* Makefile.am (EXTRA_DIST): Add config/config.rpath.

2002-02-23  Paul Eggert  <eggert@@twinsun.com>

	* src/cat.c (simple_cat, cat, main): Use char * rather than
	unsigned char *, to avoid some technical violations of the C
	standard, and to avoid the need for casts.  I guess the
	unsigned char * was probably there for improved performance
	with ancient compilers, but the code wasn't using the
	unsignedness any more.
	Reported by Nelson H. F. Beebe.

	(cat): int -> size_t for full_write arg.  This doesn't
	fix any bugs since the buffer size is small, but it makes
	the code a bit clearer.

@


1.1.1.3
log
@Import of GNU sort from coreutils 5.2.1 (trimmed)
@
text
@d1 1
a1 1
2004-03-12  Jim Meyering  <jim@@meyering.net>
d3 1
a3 1
	* Version 5.2.1.
d5 3829
a3833 2
	Sometimes, when source and destination partition are different,
	mv mistakenly fails to preserve a hard link.  Reported by IIDA Yosiaki.
d3835 4
a3838 20
	* src/copy.c: When moving a set of N hard-linked files between
	partitions, via two or more command line arguments where the
	command line argument containing the Nth link contains no other
	link to that same file, mv would mistakenly copy the file, rather
	than hard-linking it to the other(s).  That happens because when the
	final link is processed, its link count has been reduced to 1 since
	the other links have been `copied' to the destination partition
	and the source links have been removed.
	(copy_internal): When in move mode, use the source dev/inode
	pair to look up destination name even when st_nlink == 1.
	* src/cp-hash.c (src_to_dest_lookup): New function.
	* src/cp-hash.h (src_to_dest_lookup): Add prototype.
	* tests/mv/part-hardlink: New file.  Test for the above fix.
	* tests/mv/Makefile.am (TESTS): Add part-hardlink.

	* announce-gen: Sync with autoconf.

	* tests/ls/time-1: Exit 77 (not 1) if we can't set up for the test.
	This was triggered on a Linux-2.2.19 system using a file system
	NFS-mounted from some sort of Sun.
d3840 2
a3841 1
2004-03-11  Jim Meyering  <jim@@meyering.net>
d3843 1
a3843 1
	* Use automake-1.8.3.  Regenerate dependent files.
d3845 1
a3845 1
2004-03-10  Jim Meyering  <jim@@meyering.net>
d3847 38
a3884 3
	* tests/du/deref-args: Also convert sizes in the 70-79 kB range,
	so that this test works with SELinux-enabled systems.
	Based on a patch from Tim Waugh.
d3886 1
a3886 4
	`join -1 x' would give a misleading diagnostic
	* src/join.c (string_to_join_field): Report that a non-numeric field
	number is invalid, rather than `so large that it is not representable'.
	* tests/join/Test.pm (invalid-j): New partial test for the above fix.
d3888 1
a3888 1
2004-03-06  Jim Meyering  <jim@@meyering.net>
d3890 1
a3890 2
	cp --sparse=always sparse-image-file.img /dev/hda1 could
	produce an invalid copy on the destination device.
d3892 4
a3895 3
	* src/copy.c (copy_reg): Even with --sparse=always, try to
	make `holes' only if the destination is a regular file.
	Reported by Szakacsits Szabolcs.
d3897 1
a3897 1
2004-03-03  Paul Eggert  <eggert@@twinsun.com>
d3899 2
a3900 2
	* src/nohup.c (main): Don't invoke set_cloexec_flag with
	a file descriptor of -1.
d3902 1
a3902 1
2004-03-02  Dmitry V. Levin  <ldv@@altlinux.org>
d3904 3
a3906 2
	* src/nohup.c: Include "cloexec.h".
	(main): Set the copy of stderr to close on exec.
d3908 1
a3908 1
2004-03-01  Paul Eggert  <eggert@@twinsun.com>
d3910 2
a3911 3
	* configure.ac: Include <signal.h> when checking for strsignal,
	sys_siglist, and friends.  Problem reported by Tony Leneis in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-02/msg00136.html>.
d3913 3
a3915 1
2004-02-25  Paul Eggert  <eggert@@twinsun.com>
d3917 3
a3919 3
	* tests/du/deref-args, tests/du/exclude, tests/du/slash:
	* tests/du/trailing-slash: Run envvar-check in case BLOCK_SIZE
	etc. are set.
d3921 4
a3924 1
2004-02-23  Paul Eggert  <eggert@@twinsun.com>
d3926 1
a3926 1
	* NEWS: Document how chown's USER.GROUP argument is now parsed.
d3928 2
a3929 1
2004-02-23  Jim Meyering  <jim@@meyering.net>
d3931 1
a3931 1
	* src/seq.c (usage): Remove stray space after \n in --help output.
d3933 4
a3936 1
2004-02-22  Jim Meyering  <jim@@meyering.net>
d3938 1
a3938 2
	* src/du.c (usage): Separate -H and --si.  Say that the meaning
	of -H will soon change to that of --dereference-args (-D).
d3940 1
a3940 1
2004-02-21  Jim Meyering  <jim@@meyering.net>
d3942 5
a3946 3
	* src/comm.c (usage): Tell what comm does when there are no options.
	Reword in terms of FILE1 and FILE2 rather than `left file' and
	`right file'.  Suggestion from Dan Jacobson.
d3948 2
a3949 1
2004-02-15  Paul Eggert  <eggert@@twinsun.com>
d3951 5
a3955 1
	Fix some POSIX-conformance bugs in expr.
d3957 48
a4004 16
	* NEWS: document the following changes to src/expr.c.
	* doc/coreutils.texi (expr invocation): Likewise.
	Document what forms integers may take, and say "integer"
	consistently instead of "number".  Warn about operands
	that "expr" can misinterpret, and how to work around the
	problem.
	* src/expr.c (eval, eval7, eval6, eval5, eval4, eval3, eval2, eval1):
	Accept a bool argument specifying whether to evaluate the
	expression.  This is to allow short-circuit evaluation.  All
	callers changed.
	(null): Report that a string is zero even if it has
	a form like "-0" or "00".
	(eval1, eval): Use short-circuit evaluation for | and &.
	(eval): Return 0 if both arguments are null or zero, instead
	of returning the first argument.
	* tests/expr/basic: Add some tests for the above.
d4006 1
a4006 1
2004-02-17  Jim Meyering  <jim@@meyering.net>
d4008 11
a4018 1
	* Version 5.2.0.
d4020 1
a4020 6
	`make check' from a build inside a chroot environment would fail
	* tests/help-version: Specify an argument (`/') for df, in the
	unusual event that there is no valid entry in /etc/mtab.
	Likewise for id: add the -u option, so we don't get spurious
	failures when there are no user or group names.
	Patch by Tim Waugh.
d4022 8
a4029 4
	* src/sort.c (usage) [-u]: Add punctuation so that the description in
	the help2man-generated (line-joined) man page is more readable.
	Reported by Tim Waugh.
	[-T]: Add a semicolon, for the same reason.
d4031 2
a4032 1
2004-02-15  Jim Meyering  <jim@@meyering.net>
d4034 1
a4034 1
	* Makefile.am (dist-hook): Qualify target with $(srcdir)/ prefix.
d4036 3
a4038 1
2004-02-11  Jim Meyering  <jim@@meyering.net>
d4040 4
a4043 3
	* tests/Makefile.am.in ($(srcdir)/Makefile.am): Use more portable
	$(srcdir)/../Makefile.am.in, rather than $<.
	Suggestion from Michael Elizabeth Chastain.
d4045 1
a4045 1
2004-02-10  Jim Meyering  <jim@@meyering.net>
d4047 4
a4050 6
	* config/install-sh: Make this script executable.
	* Makefile.am (dist-hook): New target, to ensure that config/install-sh
	is executable.  Otherwise, on systems that lack a suitable install
	binary, `make install' would fail, because of the way this script
	is invoked (without `$SHELL ' prefix).
	Reported by Bob Proulx.
d4052 1
a4052 1
2004-02-08  Jim Meyering  <jim@@meyering.net>
d4054 1
a4054 1
	* Version 5.1.3.
d4056 1
a4056 3
	* tests/rm/rm5: Avoid triggering a bug in OSF/Tru64's sed
	that would cause an unwarranted test failure.
	* tests/rm/rm3: Likewise.
d4058 1
a4058 1
2004-02-07  Jim Meyering  <jim@@meyering.net>
d4060 1
a4060 10
	Remove xstat function pointer member.  The way it was used was not
	portable, since some systems (OSF V5.1, Solaris 2.5.1) provide static
	inline `stat' and `lstat' functions, thus making the tests of
	`xstat == lstat' in copy.c always fail.
	* src/copy.h (struct cp_options) [xstat]: Remove member.
	(XSTAT): New macro.
	* src/copy.c (copy_dir): Set `.dereference' member, not .xstat.
	(copy_internal): Use `XSTAT (x, ...)' in place of `*(x->xstat) (...)'.
	Use `x->dereference == DEREF_NEVER' in place of `x->xstat == lstat'.
	(valid_options): Remove now-obsolete FIXME comments.
d4062 2
a4063 6
	* src/cp.c (re_protect): Use `XSTAT (x, ...)' in place of
	`*(x->xstat) (...)'.
	(do_copy): Declare/use local xstat rather than x->xstat.
	(main): Remove code that set x.xstat.
	* src/mv.c (cp_option_init): Don't initialize xstat member.
	* src/install.c (cp_option_init): Likewise.
d4065 1
a4065 2
	* Makefile.cfg (gnu_ftp_host-alpha, etc.): Un-factor .gnu.org suffix,
	so that emit_upload_commands can use these variables, too.
d4067 6
a4072 1
2004-02-06  Jim Meyering  <jim@@meyering.net>
d4074 1
a4074 4
	* tests/rm/deep-1: Remove `du' stack space test.
	Apparently, `ulimit -s N' isn't portable enough.
	This test will be restored (with a guard against losing ulimit)
	in its own file later.
d4076 1
a4076 3
	* tests/rm/deep-1 (deep): Remove progress-style diagnostics,
	since this test doesn't take long enough to merit them.
	Run du on $tmp (the containing dir), not $deep, the full path to leaf.
d4078 1
a4078 6
	* Makefile.maint (signatures): Remove definition.
	Now, automake's gnupload handles this.
	(%.sig: %): Remove now-unused rule.
	(rel-files): Use automake's $(DIST_ARCHIVES), rather than
	`$(distdir).tar.bz2 $(distdir).tar.gz'.
	(emit-upload-commands): Adjust to use gnupload.
d4080 3
a4082 1
2004-02-05  Jim Meyering  <jim@@meyering.net>
d4084 1
a4084 4
	* src/system.h (ST_TIME_CMP_NS, ST_TIME_CMP): Remove definitions.
	(ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
	Now, those are all defined in timespec.h.
	Include timespec.h.
d4086 3
a4088 1
	* src/date.c: Don't include timespec.h, now that system.h does it.
d4090 1
a4090 1
2004-02-02  Paul Eggert  <eggert@@twinsun.com>
d4092 3
a4094 11
	Don't dump core if localtime returns NULL (possible on
	hosts with 64-bit time_t and 32-bit int).
	* src/date.c: Include "inttostr.h".
	(batch_convert, main):
	If time conversion fails, exit with nonzero status.
	(show_date): Return int to report conversion failure.
	Print the time as an int if localtime fails.
	* src/uptime.c: Print "??" if the current clock can't
	be converted by localtime.  This won't happen until the year
	2*31 + 1900, but we don't want to dump core even if the current
	clock has the wrong value.
d4096 1
a4096 6
	* src/stat.c: Include "inttostr.h".
	(human_time): Print the date/time as a number of seconds since the
	epoch if it can't be converted by localtime.  This is better than
	just saying "invalid", and is consistent with what "ls" does.
	Don't dump core if the year has more than 48 digits; this isn't
	possible on any contemporary host, but we might as well do it right.
d4098 8
a4105 1
2004-01-31  Paul Eggert  <eggert@@twinsun.com>
d4107 2
a4108 2
	* src/stat.c (human_time): Accept time rather than
	pointer-to-const-time parameter, for clarity.  All callers changed.
d4110 3
a4112 1
2004-02-02  Jim Meyering  <jim@@meyering.net>
d4114 1
a4114 2
	* src/stat.c (do_stat): Remove extra trailing newline from
	default formats.  Reported by Nelson H. F. Beebe.
d4116 2
a4117 9
	Print actual fractional seconds in time stamps, not just `.00000000'.
	* src/stat.c (human_time): Add and use new parameter, t_ns.
	(print_stat): Update callers.
	* src/ls.c (TIMESPEC_NS): Remove definition.
	* src/system.h (TIMESPEC_NS): Define here, instead, now that stat.c
	also uses this macro.
	Nelson H. F. Beebe noticed that ls --full-time printed nonzero
	fractional seconds for files on an XFS file system, but that stat's
	fractional seconds were always zero.
d4119 1
a4119 1
2004-01-28  Paul Eggert  <eggert@@twinsun.com>
d4121 5
a4125 4
	* src/seq.c (print_numbers): Use 'double' for loop index, not
	'int', to avoid problems with integer overflow.  On almost all
	machines 'double' works in every case where 'int' works, and
	it works on other cases besides.
d4127 3
a4129 1
2004-01-27  Jim Meyering  <jim@@meyering.net>
d4131 1
a4131 3
	* src/seq.c (usage): Mention that if INCREMENT is omitted,
	it defaults to 1, even when FIRST is larger than LAST.
	Reword so as not to exclude the possibility that INCREMENT be zero.
d4133 8
a4140 1
2004-01-25  Jim Meyering  <jim@@meyering.net>
d4142 8
a4149 1
	* Version 5.1.2.
d4151 2
a4152 1
	* Makefile.maint (signatures): Comment out definition.
d4154 1
a4154 1
2004-01-23  Jim Meyering  <jim@@meyering.net>
d4156 5
a4160 1
	* Makefile.maint (header_regexp): Add exitfail.
d4162 1
a4162 2
	* man/Makefile.am (EXTRA_DIST): Add help2man.
	Reported by Nelson H. F. Beebe.
d4164 3
a4166 98
	* man/Makefile.am (.x.1): Prefix help2man invocation with `$(PERL) --'
	so it works on systems with Perl installed somewhere other than in
	/usr/bin.

	* src/paste.c (paste_parallel): Declare local, chr, to be of type
	`int', not `char', since it must hold EOF.  This bug would make
	paste infloop on some systems.  Test failures reported by
	Nelson H. F. Beebe and Christian Krackowizer.

2004-01-22  Jim Meyering  <jim@@meyering.net>

	* tests/rmdir/fail-perm: New file.  Test for just-fixed rmdir bug.
	* tests/rmdir/Makefile.am (TESTS): Add fail-perm.

	* man/help2man: Fix it so using --info-page='coreutils PROG' works.
	* man/Makefile.am (.x.1): Invoke our own (tweaked) copy of help2man.
	Use --info-page='coreutils PROG' option.
	Now, readlink.1 refers the user to `info coreutils readlink'
	rather than to `info readlink'.  Reported by Matt Swift.

2004-01-21  Paul Eggert  <eggert@@twinsun.com>

	Exit status cleanup.

	* src/basename.c (usage): Use EXIT_SUCCESS, not 0, for clarity.
	* src/cat.c, src/chgrp.c, src/chmod.c, src/chown.c, src/chroot.c,
	* src/cksum.c, src/comm.c, src/cp.c, src/csplit.c, src/cut.c,
	* src/date.c, src/dd.c, src/df.c, src/dircolors.c, src/dirname.c,
	* src/du.c, src/echo.c, src/env.c, src/expand.c, src/expr.c,
	* src/factor.c, src/fmt.c, src/fold.c, src/head.c, src/hostid.c,
	* src/hostname.c, src/id.c, src/install.c, src/join.c, src/kill.c,
	* src/link.c, src/ln.c, src/logname.c, src/ls.c, src/md5sum.c,
	* src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c, src/nice.c,
	* src/nl.c, src/nohup.c, src/od.c, src/paste.c, src/pathchk.c,
	* src/pinky.c, src/pr.c, src/printenv.c, src/printf.c, src/pwd.c,
	* src/rm.c, src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c,
	* src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c,
	* src/su.c, src/sum.c, src/sync.c, src/tac.c, src/tail.c, src/tee.c,
	* src/test.c, src/touch.c, src/tr.c, src/tsort.c, src/tty.c,
	* src/uname.c, src/unexpand.c, src/uniq.c, src/unlink.c, src/uptime.c,
	* src/users.c, src/wc.c, src/who.c, src/whoami.c, src/yes.c: Likewise.

	* src/cat.c (usage): Don't bother normalizing exit status
	since the arg is already the correct exit status now.
	* src/cksum.c, src/comm.c, src/csplit.c, src/cut.c,
	* src/dircolors.c, src/expand.c, src/fmt.c, src/fold.c, src/head.c,
	* src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c,
	* src/pr.c, src/split.c, src/sum.c, src/tac.c, src/tail.c, src/tr.c,
	* src/tsort.c, unexpand.c, src/src/uniq.c, src/src/wc.c: Likewise.

	* src/chown.c (main): Removed unused local 'fail'.

	* src/chroot.c (CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE):
	Remove.

	* src/chroot.c (main): Initialize exit_failure to EXIT_FAIL.
	* src/env.c, src/nice.c, src/su.c: Likewise.
	* src/nohup.c (main): Likewise, to NOHUP_FAILURE.
	* src/setuidgid.c (main): Likewise, to SETUIDGID_FAILURE.
	* src/expr.c (main): Use initialize_exit_failure rather than
	setting exit_failure directly; this optimizes away redundant
	assignments.
	* src/printenv.c, src/sort.c, src/test.c, src/tty.c: Likewise.

	* src/chroot.c (main): Exit with status 1 rather than 127
	if chroot itself fails, as per documentation.

	* src/chroot.c (main): Use EXIT_ENOENT and EXIT_CANNOT_INVOKE
	rather than roll-your-own symbols or integers.
	* src/env.c (main): Likewise.
	* src/nohup.c (main): Likewise.
	* src/su.c (run_shell): Likewise.

	* src/cp.c (exit_status): Remove static var....
	(main): Making it local here instead.  Use =, not |=, to set it.

	* src/cut.c (FATAL_ERROR, main): Exit with status EXIT_FAILURE,
	not 2, on errors.
	* src/date.c (batch_convert, main): Likewise.
	* src/dd.c (dd_copy): Likewise.
	* src/pr.c (first_last_page, main, getoptarg): Likewise.
	* src/tr.c (main): Likewise.
	* src/date.c (main): Don't assume EXIT_FAILURE == 1, as
	POSIX doesn't require it.
	* src/dd.c (write_output, skip, dd_copy): Likewise.
	* src/df.c (main): Likewise.
	* src/id.c (main): Likewise.
	* src/install.c (main): Likewise.
	* src/ln.c (main): Likewise.
	* src/ls.c (main): Likewise.
	* src/mv.c (main): Likewise.
	* src/shred.c (main): Likewise.

	* src/env.c (main): Exit with status 1, not 2, on errors detected
	by env proper.
	* src/hostname.c (main): Likewise.
	* src/nl.c (main): Likewise.
	* src/stty.c (main): Likewise.
d4168 1
a4168 3
	* src/expr.c (EXPR_FAILURE): Renamed from EXPR_ERROR, for
	consistency with the other programs' naming conventions.
	All uses changed.
d4170 2
a4171 2
	* src/factor.c (main): Do not report a usage error simply
	because stdin has bad numbers.
d4173 3
a4175 3
	* src/id.c (problems): Now a boolean int, not a counter,
	so that we don't have to worry about int overflow.  All uses changed.
	* src/touch.c (err): Likewise.
d4177 7
a4183 1
	* src/md5sum.c (main): Use int, not size_t, to store boolean int.
d4185 2
a4186 2
	* src/mkfifo.c (main): Exit with status 1, not 4, if not implemented.
	* src/mknod.c: Likewise.
d4188 1
a4188 3
	* src/nice.c (main): Exit with status EXIT_FAIL, not EXIT_FAILURE,
	on error; this is in case EXIT_FAILURE is unusual.
	* src/su.c (main): Likewise.
d4190 1
a4190 2
	* src/nohup.c (NOHUP_FOUND_BUT_CANNOT_INVOKE): Remove; all uses
	changed to EXIT_CANNOT_INVOKE.
d4192 13
a4204 3
	* src/printenv.c (PRINTENV_FAILURE): New constant.
	(main): Exit with status PRINTENV_FAILURE, not EXIT_FAILURE, on
	command-line syntax problems.
d4206 4
a4209 2
	* src/rmdir.c (remove_parents): Don't set 'fail' to a negative number.
	(main): Avoid integer overflow when seeing whether errors occurred.
d4211 4
a4214 4
	* src/seq.c (print_numbers): Now returns void, not (zero) int.
	All callers changed.
	(main): Remove unused local variable 'errs'.  Always exit successfully
	if we reach the end.
d4216 1
a4216 3
	* src/setuidgid.c (SETUIDGID_FAILURE): Renamed from FAIL_STATUS,
	for consistency with other programs here.  All uses changed.
	(main): Use 'error' to exit rather than invoking 'exit' here.
d4218 2
a4219 4
	* src/sort.c: Don't include <assert.h>.
	(SORT_OUT_OF_ORDER,  SORT_FAILURE): Now enums, not macros.
	(usage): Don't use 'assert'.
	(main): Remove redundant assignment to exit_failure.
d4221 2
a4222 5
	* src/system.h (EXIT_FAIL, EXIT_CANNOT_INVOKE, EXIT_ENOENT):
	New enum values.
	(initialize_exit_failure): New inline function.
	Include exitfail.h here, since we refer to exit_failure.
	All callers changed to not include exitfail.h.
d4224 6
a4229 2
	* src/tty.c (TTY_FAILURE, TTY_WRITE_ERROR): New enum values;
	substitute them for the corresponding integer constants.
d4231 1
a4231 3
	* tests/help-version (expected_failure_status_date): Remove, as
	'date' is now normal.
	(expected_failure_status_nohup): New var.
d4233 1
a4233 1
2004-01-21  Jim Meyering  <jim@@meyering.net>
d4235 2
a4236 2
	* tests/touch/relative: Remove `command' syntax.
	Thanks to Nelson H. F. Beebe and Paul Eggert.
d4238 1
a4238 5
	* tests/touch/relative: Test only year/month/day, not hours/min/sec,
	so as to avoid problems with systems using TAI clocks.
	Although it's no longer necessary, set TZ=UTC0 also for the
	initial touch command.  Reported by Paul Jarc here:
	http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/1504
d4240 4
a4243 1
2004-01-20  Diego Biurrun  <diego@@biurrun.de>
d4245 1
a4245 1
	* src/dircolors.hin: Add .mov to the list of media files.
d4247 2
a4248 1
2004-01-19  Paul Eggert  <eggert@@twinsun.com>
d4250 1
a4250 4
	* tests/touch/relative: Use TZ=UTC0, not TZ=utc (which isn't
	portable).  Problem reported by Christian Krackowizer.  Also, use
	+0000 rather than +0 to specify a time zone, as the documentation
	requires four digits.
d4252 1
a4252 1
2004-01-19  Jim Meyering  <jim@@meyering.net>
d4254 5
a4258 3
	* tests/mv/hard-4: Run envvar-check in case SIMPLE_BACKUP_SUFFIX is set.
	* tests/mv/backup-is-src: Likewise.
	Problem reported by Peter Horst
d4260 1
a4260 1
2004-01-17  Jim Meyering  <jim@@meyering.net>
d4262 1
a4262 1
	* announce-gen (print_changelog_deltas): Use .sig suffix, not .asc.
d4264 1
a4264 1
	* Version 5.1.1.
d4266 3
a4268 1
2003-12-15  Paul Eggert  <eggert@@twinsun.com>
d4270 2
a4271 5
	* NEWS, doc/coreutils.texi: touch -r and -d can now both be specified,
	with -r specifying the origin for -d.
	* src/touch.c (flexible_date): Remove static var.
	(get_reldate): New function.
	(main): Use it, to implement this new behavior.
d4273 1
a4273 1
2004-01-16  Jim Meyering  <jim@@meyering.net>
d4275 4
a4278 2
	* tests/touch/relative: New test for the above.
	* tests/touch/Makefile.am (TESTS): Add relative.
d4280 2
a4281 1
2004-01-13  Jim Meyering  <jim@@meyering.net>
d4283 1
a4283 3
	* src/system.h: Include contents of sys2.h.
	* src/sys2.h: Remove file.
	* src/Makefile.am (noinst_HEADERS): Remove sys2.h.
d4285 2
a4286 1
	* Use automake-1.8.2.  Regenerate dependent files.
d4288 1
a4288 3
	* Update to gettext-0.13.1.
	* configure.ac: Use gettext-0.13.1.
	* .x-sc_space_tab: Add m4/po.m4 to the list of exceptions.
d4290 2
a4291 1
2004-01-12  Jim Meyering  <jim@@meyering.net>
d4293 1
a4293 1
	* Makefile.maint (%.sig): Use .sig suffix rather than .asc.
d4295 6
a4300 2
	* Makefile.maint (po-check): Ensure that cvsu works before using it.
	Reported by Alexandre Duret-Lutz.
d4302 1
a4302 1
	* src/tail.c (main): Warn about following stdin only when it's a tty.
d4304 9
a4312 1
	* configure.ac: Use gl_DEFAULT_POSIX2_VERSION.
d4314 1
a4314 1
2004-01-10  Jim Meyering  <jim@@meyering.net>
d4316 1
a4316 1
	* tests/misc/stat-fmt: Use backticks, not `$()' notation.
d4318 3
a4320 1
2004-01-09  Jim Meyering  <jim@@meyering.net>
d4322 1
a4322 1
	* configure.ac: Quote underquoted `jm_DUMMY_1' to avoid new warning.
d4324 4
a4327 1
2004-01-08  Jim Meyering  <jim@@meyering.net>
d4329 1
a4329 2
	* src/stat.c (human_fstype): Use %lx, not %x format for `unsigned long'.
	From Andreas Schwab.
d4331 1
a4331 4
	* tests/Makefile.am (TESTS_ENVIRONMENT): Remove `/vg' (prerelease test
	remnant) from PATH component.  That would cause tests in this directory
	not to run the just-built binaries, but rather whatever happened
	to be in one's PATH.  Reported by Christian Krackowizer.
d4333 3
a4335 1
2004-01-04  Jim Meyering  <jim@@meyering.net>
d4337 1
a4337 2
	* src/csplit.c (new_control_record): Use x2nrealloc
	rather than xrealloc.
d4339 3
a4341 3
	* src/cp.c (re_protect): Use ASSIGN_STRDUPA rather than
	alloca and strcpy.
	(make_path_private): Likewise.
d4343 1
a4343 1
2004-01-03  Jim Meyering  <jim@@meyering.net>
d4345 6
a4350 12
	* src/paste.c: Use `bool' (not int) as the type for a few
	global variables.
	(collapse_escapes): Rewrite to set globals rather than modifying
	its parameter.
	Use size_t (not int) for all counters and related index variables.
	(paste_parallel): Remove needless complexity of
	using xrealloc in the loop;  just allocate the buffers up front.
	Free the two temporary buffers.
	Move declarations of locals `down' into scope where used.
	(paste_serial): Remove `register' attributes.
	(main): Simplify delim-related code.
	Free `delims', now that it's malloc'd.
d4352 1
a4352 1
2004-01-02  Jim Meyering  <jim@@meyering.net>
d4354 1
a4354 5
	* src/chroot.c: Include "quote.h".
	(CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE): Define.
	(main): Exit with status of 127, not 1, for too-few-args,
	chroot failure, or chdir failure.
	Give a better diagnostic upon execvp failure.
d4356 1
a4356 2
	* src/du.c (usage): Mention that, with its current meaning,
	-H is deprecated.
d4358 2
a4359 2
	* src/tail.c (main): Warn about following stdin when it's a tty.
	Fail when following by name but no names are specified.
d4361 4
a4364 1
2003-12-30  Jim Meyering  <jim@@meyering.net>
d4366 3
a4368 1
	* src/fold.c (main): Use memcpy, not strcpy.
d4370 2
a4371 2
	* src/copy.c (copy_internal): Use ASSIGN_STRDUPA rather than
	alloca and strcpy.
d4373 1
a4373 1
2003-12-28  Jim Meyering  <jim@@meyering.net>
d4375 6
a4380 3
	* src/unexpand.c (n_tabs_allocated): New global.
	(add_tabstop): Use x2nrealloc rather than xrealloc.
	* src/expand.c: Likewise.
d4382 1
a4382 2
	* tests/misc/expand: New file.
	* tests/misc/Makefile.am (TESTS): Add expand.
d4384 2
a4385 4
	* src/sort.c (add_temp_dir): Use x2nrealloc rather than xrealloc.
	(fillbuf): Use x2nrealloc rather than xrealloc.
	(sort): Use xnmalloc rather than xmalloc.
	(main): Likewise.
d4387 5
a4391 1
2003-12-27  Jim Meyering  <jim@@meyering.net>
d4393 2
a4394 1
	* src/tee.c (tee): Use xnmalloc rather than xmalloc.
d4396 2
a4397 1
2003-12-29  Paul Eggert  <eggert@@twinsun.com>
d4399 2
a4400 2
	* NEWS: Remove support for join -j1 FIELD, -j2 FIELD, and -o LIST1
	LIST2 in POSIX 1003.1-2001 hosts, as required by POSIX.
d4402 1
a4402 2
	* doc/coreutils.texi (join invocation): Remove documentation
	accordingly.  Document that -t makes all separators significant.
d4404 2
a4405 9
	* src/join.c: Include posixver.h.
	(obsolete_usage): New var.
	(longopts): Put obsolete options first.
	(OBSOLETE_LONG_OPTIONS): New constant.
	(get_option, add_file_name): New functions.
	(main): Use them to support new behavior.
	(usage): Remove documentation for -j1 FIELD and -j2 FIELD.
	Do not mark -j FIELD as obsolescent; it is longstanding
	UNIX tradition and is a valid extension to POSIX.
d4407 4
a4410 1
	* tests/join/Test.pm (tv): Avoid obsolete -o usage.
d4412 3
a4414 1
2003-12-28  Paul Eggert  <eggert@@twinsun.com>
d4416 1
a4416 2
	* src/join.c (add_field_list): Don't use alloca with unbounded
	size; just modify the argument, which is no longer const *.
d4418 1
a4418 1
	Various other minor cleanups, mostly to avoid the need for casts.
d4420 13
a4432 1
	(extract_field): Renamed from ADD_FIELD, as it's now a function.
d4434 2
a4435 5
	(struct field.beg): Now char *, not unsigned char const *.  All
	uses changed.  It shouldn't be const since xmemcoll writes on its
	arguments.
	(extract_field): Likewise, for 2nd arg.
	(keycmp): Remove now-unnecessary cast of xmemcoll args.
d4437 1
a4437 2
	(is_blank): New function, to avoid need to cast arg to unsigned char.
	(extract_field): Use it.
d4439 2
a4440 1
	(xfields): Rewrite pretty much from scratch.
d4442 1
a4442 4
	(hard_LC_COLLATE): Now bool, not int.
	(get_line, getseq, add_field_list): Now returns bool, not int.
	(decode_field_spec, add_field_list): Return true on success (not
	false), for consistency with the rest of the code.  All uses changed.
d4444 1
a4444 3
	(tab): Now char, not unsigned char.  This wasn't 100% necessary
	but is slightly cleaner.
	(prjoin): Hoist (tab ? tab : ' ') expression, to help the compiler.
d4446 1
a4446 1
	(empty_filler): Now const *.
d4448 11
a4458 2
	(make_blank): Remove; wasn't needed.  Remove all calls.
	(main): Don't set uni_blank.nfields; zero is fine.
d4460 1
a4460 1
2003-12-27  Jim Meyering  <jim@@meyering.net>
d4462 2
a4463 9
	* src/join.c: Include "quote.h".
	(min, max): Remove definitions.
	Make a few function parameters and corresponding
	locals `const'.  Use bool for boolean variables.
	Use size_t (not int) for all counters and related index variables.
	(prjoin): Remove now-useless assertion.
	(string_to_join_field): New function.
	(main): Accept join fields as large as SIZE_MAX.
	(keycmp): Rename `min' to MIN and max to MAX.
d4465 5
a4469 1
2003-12-26  Jim Meyering  <jim@@meyering.net>
d4471 1
a4471 4
	fold -s didn't work on e.g., alpha-based systems.
	* src/fold.c (fold_file): Adjust types (int->size_t) so that using
	x2nrealloc works properly on systems with differing sizes for int
	and size_t.  Reported by Nelson Beebe.
d4473 6
a4478 2
	* src/fold.c: Use `bool' (not int) as the type for a few
	global variables.
d4480 2
a4481 1
2003-12-23  Paul Eggert  <eggert@@twinsun.com>
d4483 2
a4484 5
	* src/ls.c (length_of_file_names_and_frills):
	Remove forward decl; not needed.
	(print_file_name_and_frills, length_of_file_name_and_frills):
	With -m, don't output spaces before inum or size.
	(print_with_commas): Don't output space just before newline.
d4486 3
a4488 1
2003-12-24  Jim Meyering  <jim@@meyering.net>
d4490 2
a4491 2
	* tests/ls/Makefile.am (TESTS): Add m-option.
	* tests/ls/m-option: New file.  Test for above fixes.
d4493 6
a4498 1
2003-12-20  Jim Meyering  <jim@@meyering.net>
d4500 1
a4500 1
	* Version 5.1.0.
d4502 8
a4509 1
	* src/pr.c: Change type of global, buff_allocated, to size_t.
d4511 1
a4511 2
	* src/join.c [struct seq]: Change types of members count and alloc
	from `int' to `size_t'.
d4513 2
a4514 1
	* tests/Makefile.am (root-hint): Tweak wording.
d4516 1
a4516 2
	* src/du.c: Accept new option (-0, --null) that makes it so each
	output line is NUL-terminated rather than newline-terminated.
d4518 7
a4524 4
	* src/dd.c (apply_translations): Don't prohibit conv=unblock,sync.
	Reported by Volker Paul.
	* tests/dd/Makefile.am (TESTS): Add unblock-sync.
	* tests/dd/unblock-sync: New test for the above.
d4526 1
a4526 1
2003-12-19  Jim Meyering  <jim@@meyering.net>
d4528 2
a4529 2
	* tests/misc/nohup: Double quote back-ticked expression,
	in case it ends up having an unexpected value.
d4531 1
a4531 1
	* tests/ls/no-arg: Use ls's -1 option in both runs.
d4533 8
a4540 4
	* src/du.c (fts_debug): New global.
	(FTS_CROSS_CHECK, DEBUG_OPT): Define.
	(main): Make fts use FTS_TIGHT_CYCLE_CHECK.
	(main) [DU_DEBUG]: Accept -d option.
d4542 6
a4547 1
2003-12-18  Jim Meyering  <jim@@meyering.net>
d4549 1
a4549 5
	* src/ls.c (format_user): Increment dired_pos via two statements,
	`dired_pos += width; dired_pos++;' rather than one,
	`dired_pos += width + 1;' since the latter could conceivably overflow.
	(format_group): Likewise.
	From Paul Eggert.
d4551 3
a4553 1
	* configure.ac: Require automake-1.8.
d4555 1
a4555 1
2003-12-12  Jim Meyering  <jim@@meyering.net>
d4557 1
a4557 1
	* Use automake-1.8.  Regenerate dependent files.
d4559 1
a4559 1
2003-12-08  Jim Meyering  <jim@@meyering.net>
d4561 1
a4561 2
	* Makefile.maint (news-date-check): New rule.
	(alpha beta major): Depend on it.
d4563 1
a4563 1
2003-12-03  Paul Eggert  <eggert@@twinsun.com>
d4565 6
a4570 21
	* NEWS: ls -l (and similar options) now adjust all columns to
	fit the data.  Generalized from a suggestion by Leah Q for file sizes.
	* src/ls.c (INODE_DIGITS, LOGIN_NAME_MAX, ID_LENGTH_MAX): Remove.
	(format_user_width, format_group_width, unsigned_file_size,
	format_group): New functions.
	(block_size_width): Renamed from block_size_size.
	(inode_number_width, nlink_width, owner_width, group_width,
	author_width, major_device_number_width, minor_device_number_width,
	file_size_width): New vars.
	(clear_files): Initialize them.
	(gobble_file): Set them.  Don't ceiling block_size_width to 7.
	(print_long_file): Use them.
	(gobble_file): Use a new local variable 'f' to make the code
	smaller and more consistent with other functions.
	(format_user): Output to stdout, not to a buffer, so that we
	don't have to worry about buffer overrun.  Update dired_pos.
	(print_long_file): Don't put owner, group, author into buffer;
	just print them directly.  Don't assume link counts and
	major and minor numbers fit into unsigned long int.
	* tests/cp/same-file, tests/mv/part-symlink: Don't assume that
	'ls' output is fixed-width.
d4572 1
a4572 1
2003-12-02  Jim Meyering  <jim@@meyering.net>
d4574 2
a4575 1
	* src/md5sum.c: Include sha1.h (reflect renaming: sha.h -> sha1.h.
d4577 12
a4588 1
2003-11-27  Jim Meyering  <jim@@meyering.net>
d4590 5
a4594 1
	* Use automake-1.7f.  Regenerate dependent files.
d4596 1
a4596 1
2003-11-24  Paul Eggert  <eggert@@twinsun.com>
d4598 2
a4599 3
	Parse floating-point operands and options in the C locale.
	POSIX requires this for printf, and we might as well be
	consistent elsewhere (tail, sleep, seq).
d4601 1
a4601 7
	* src/printf.c: Remove decls of strtod, strtol, strtoul; no longer
	needed now that we assume C89.  Include "c-strtod.h".
	(xstrtod): Call c_strtod, not strtod.
	* src/sleep.c: Include "c-strtod.h".
	(main): Update xstrtod call to include new argument, c_strtod.
	* src/seq.c (scan_double_arg): Likewise.
	* src/tail.c (parse_options): Likewise.
d4603 1
a4603 1
2003-11-24  Jim Meyering  <jim@@meyering.net>
d4605 1
a4605 2
	* tests/rm/fail-2eperm: Handle another errno variant (HPUX, EPERM).
	Reported by Mark Conty.
d4607 2
a4608 1
2003-11-22  Jim Meyering  <jim@@meyering.net>
d4610 1
a4610 2
	* Makefile.maint (sc_xalloc_h_in_src): Remove rule.  Subsumed by...
	(sc_system_h_headers): Do this test only if sys2.h exists.
d4612 2
a4613 1
2003-11-20  Jim Meyering  <jim@@meyering.net>
d4615 1
a4615 3
	* tests/help-version: Ensure that the bug-reporting address is
	included in the --help output for every program.
	* tests/Makefile.am (TESTS_ENVIRONMENT): Add $PACKAGE_BUGREPORT.
d4617 3
a4619 2
	* src/ptx.c (usage): Output bug-reporting address.
	Reported by Dan Jacobson.
d4621 1
a4621 1
2003-11-19  Jim Meyering  <jim@@meyering.net>
d4623 1
a4623 2
	* src/join.c (usage): Mention that FILE1 and FILE2 must be sorted
	on the join fields.  Suggestion from Bruce Robertson.
d4625 1
a4625 1
2003-11-18  Jim Meyering  <jim@@meyering.net>
d4627 1
a4627 2
	`od -c -w9999999' could segfault
	* src/od.c (dump): Use xnmalloc/free, not alloca.
d4629 1
a4629 1
2003-11-16  Jim Meyering  <jim@@meyering.net>
d4631 1
a4631 1
	* Use autoconf-2.59.  Regenerate dependent files.
d4633 1
a4633 1
	* tests/du/hard-link: Minor tweak: use mkdir -p.
d4635 1
a4635 4
	Fix read-from-free'd-buffer error detected by valgrind.
	* src/csplit.c (remove_line): Don't return a pointer to data in
	a freed buffer.  Instead, arrange to free the buffer on the
	subsequent call.
d4637 1
a4637 1
	* tests/misc/csplit: New test for above fix.
d4639 2
a4640 1
2003-11-11  Jim Meyering  <jim@@meyering.net>
d4642 1
a4642 3
	* src/ls.c (extract_dirs_from_files): Avoid useless copy operations.
	This avoids a warning from valgrind about memcpy with overlapping
	source and destination.
d4644 5
a4648 1
	* configure.ac: Require automake-1.7.8.
d4650 1
a4650 1
2003-11-09  Jim Meyering  <jim@@meyering.net>
d4652 2
a4653 1
	* Use automake-1.7.9.  Regenerate dependent files.
d4655 1
a4655 2
	* src/rm.c: Support new options: --preserve-root and --no-preserve-root.
	* src/chown.c: Likewise.
d4657 1
a4657 3
	* src/chown-core.c: Include "root-dev-ino.h".
	(chopt_init): Initialize new member.
	(change_file_owner): Support rm's new --preserve-root option.
d4659 1
a4659 3
	* src/remove.c: Include "root-dev-ino.h".
	(remove_cwd_entries): Remove now-obsolete FIXME comment.
	(remove_dir): Support rm's new --preserve-root option.
d4661 2
a4662 2
	* src/chown.c: Include "root-dev-ino.h".
	Add new options: --preserve-root and --no-preserve-root.
d4664 1
a4664 6
	* src/chmod.c: Include "root-dev-ino.h".
	(process_file): Use newly-factored-out ROOT_DEV_INO_CHECK and
	ROOT_DEV_INO_WARN macros.
	(get_root_dev_ino): Remove function definition, now that it's
	been moved to a separate file.
	(usage): Describe new options.
d4666 3
a4668 1
	* src/mv.c (rm_option_init): Initialized new member.
d4670 4
a4673 4
	* src/remove.h: Include "dev-ino.h".
	(struct rm_options): Add new member: root_dev_ino.
	* src/chown-core.h: Include "dev-ino.h".
	(struct Chown_option): Add new member: root_dev_ino.
d4675 3
a4677 1
2003-11-06  Jim Meyering  <jim@@meyering.net>
d4679 1
a4679 2
	* src/paste.c (paste_parallel): Use `sizeof *var' rather than
	hard-coding `sizeof FILE*'.
d4681 2
a4682 1
2003-11-05  Dennis Smit  <ds@@nerds-incorporated.org>
d4684 1
a4684 3
	* src/wc.c (main): Free `fstatus' so there is no confusion about
	whether it's leaked or not.
	* src/who.c (who): Likewise for `utmp_buf'.
d4686 3
a4688 1
2003-11-05  Paul Eggert  <eggert@@twinsun.com>
d4690 1
a4690 16
	Fix 'cut' problems with size_t overflow and unsigned int.
	More generally, resize integer variables to fit use more precisely.
	* src/cut.c (ADD_RANGE_PAIR): Remove unnecessary parens.
	(struct range_pair): Make members to be of type size_t, not unsigned.
	(max_range_endpoint, eol_range_start): Now size_t, not unsigned.
	(suppress_non_delimited, output_delimiter_specified,
	have_read_stdin, print_kth, set_fields): Now bool, nt int.
	(delim): Now unsigned char, not int.
	(mark_printable_field, is_printable_field, is_range_start_index,
	set_fields, set_fields, cut_bytes, cut_fields):
	Use size_t, not unsigned, for field and byte counts.
	(hash_int): Use uintptr_t, not unsigned, for pointers converted
	to integers.  This squeezes more info out of them.
	(set_fields, cut_bytes, cut_fields, main):
	Use bool, not int, for booleans.
	(set_fields): Allocate zeroed byte array with xzalloc, not xcalloc.
d4692 2
a4693 1
2003-11-05  Paul Eggert  <eggert@@twinsun.com>
d4695 2
a4696 4
	* man/Makefile.am (check-programs-vs-x):
	Work even if $(programs) contains '$'.
	Work even if 'missing=1' in environment.
	Don't report an error simply because $(programs) outputs nothing.
d4698 2
a4699 1
2003-11-05  Jim Meyering  <jim@@meyering.net>
d4701 1
a4701 1
	* Use autoconf-2.58.  Regenerate dependent files.
d4703 2
a4704 1
	* src/tr.c (spec_init): Fix typo in last change.
d4706 3
a4708 13
	* src/sys2.h (case_GETOPT_VERSION_CHAR): Cast NULL to `(char *)' in
	call to variadic version_etc function, so that it works even on systems
	for which sizeof char* != sizeof int.
	* src/true.c (main): Likewise.
	* basename.c, chroot.c, cksum.c, dd.c, dirname.c, echo.c, expr.c:
	* factor.c, hostid.c, hostname.c, link.c, logname.c, nice.c, nohup.c:
	* pathchk.c, printenv.c, printf.c, pwd.c, setuidgid.c, sleep.c, stty.c:
	* sync.c, test.c, tsort.c, unlink.c, uptime.c, users.c, whoami.c, yes.c:
	Similarly, cast NULL to `(char *)' in call to variadic function,
	parse_long_options, so that it works even on systems for which
	sizeof char* != sizeof int.
	A similar problem was reported by Harti Brandt in
	http://mail.gnu.org/archive/html/bug-gnu-utils/2003-10/msg00320.html.
d4710 2
a4711 3
	* src/users.c (users): Free `utmp_buf' explicitly so that people
	don't mistake this for a real leak.
	Patch by Dennis Smit <ds@@nerds-incorporated.org.
d4713 3
a4715 1
2003-11-04  Paul Eggert  <eggert@@twinsun.com>
d4717 1
a4717 1
	* README: Document _POSIX2_VERSION.
d4719 2
a4720 1
2003-11-04  Jim Meyering  <jim@@meyering.net>
d4722 2
a4723 2
	* src/tac.c (memrchr): Remove #if-0'd function.
	(tac_stdin_to_mem): Clean up #if-0'd code.
d4725 2
a4726 4
	* src/od.c (decode_format_string): Remove unnecessary casts.
	Use more maintainable `sizeof *var'.
	(main): Call decode_format_string rather than decode_one_format,
	now that `spec' may be NULL.
d4728 2
a4729 1
	* src/chmod.c (AUTHORS): Add my name.
d4731 1
a4731 2
	* src/split.c (next_file_name): Use `sizeof *var' rather than
	hard-coding `sizeof size_t'.
d4733 4
a4736 1
	* src/sort.c (new_key): Use xzalloc, not xcalloc (1, ...).
d4738 1
a4738 10
	* src/cut.c (ADD_RANGE_PAIR): Use x2nrealloc rather than xrealloc,
	to avoid potential overflow in pointer arithmetic.
	(set_fields): Use not `1', but rather `sizeof *printable_field' as
	second argument to xcalloc.
	* src/od.c (decode_format_string, dump_strings): Use x2nrealloc
	rather than xrealloc.
	* src/date.c (show_date): Likewise.
	* src/join.c (ADD_FIELD, initseq, getseq): Likewise.
	* src/pr.c (store_char): Likewise.
	* src/fold.c (fold_file): Likewise.
d4740 5
a4744 6
	* src/copy.c (triple_hash, triple_hash_no_name): Adjust to reflect
	type changes (unsigned int -> size_t) in hash.c.
	* src/cp-hash.c (src_to_dest_hash): Likewise.
	* src/du.c (entry_hash): Likewise.
	* src/ls.c (dev_ino_hash): Likewise.
	* src/cut.c (hash_int): Likewise.  Declare function as static.
d4746 1
a4746 1
2003-11-03  Jim Meyering  <jim@@meyering.net>
d4748 1
a4748 3
	* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define PACKAGE_VERSION.
	* tests/misc/fold: Fail the test immediately if we're not running
	the expected version of fold.
d4750 1
a4750 1
2003-11-02  Jim Meyering  <jim@@meyering.net>
d4752 1
a4752 9
	* src/tr.c (append_normal_char, append_range, append_char_class)
	(append_repeated_char, append_equiv_class, spec_init): Use `sizeof *var'
	rather than `sizeof EXPLICIT_TYPE'.  The former is more maintainable
	and usually shorter.
	* src/copy.c (copy_internal): Likewise.
	* src/join.c (initseq, add_field, make_blank): Likewise.
	* src/od.c (main): Likewise.
	* src/cp.c (make_path_private): Likewise.
	* src/tsort.c (new_item, record_relation): Likewise.
d4754 2
a4755 114
	* src/df.c (add_fs_type, add_excluded_fs_type, main): Likewise.
	(main): Also remove anachronistic cast of xmalloc return value.
	* src/ptx.c (alloc_and_compile_regex, main): Likewise.
	(main): Also remove anachronistic cast of xmalloc return value.
	* src/sort.c (inittables): Likewise.
	(sort): Also Split a long line.

2003-10-25  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (triple_hash, triple_hash_no_name): Adjust to reflect
	type changes (unsigned int -> size_t) in hash.c.
	* src/cp-hash.c (src_to_dest_hash): Likewise.
	* src/du.c (entry_hash): Likewise.
	* src/ls.c (dev_ino_hash): Likewise.
	* src/cut.c (hash_int): Likewise.  Declare function as static.

2003-10-21  Jim Meyering  <jim@@meyering.net>

	Don't fail when run with VERBOSE=yes.
	* tests/chgrp/basic: Do `set +x' before starting the subshell
	from which we invoke chgrp.  Otherwise, the output from the
	VERBOSE=yes-induced `set -x' would result in spurious differences.
	Reported by Russel Coker via Michael Stone.

2003-10-19  Jim Meyering  <jim@@meyering.net>

	chmod now uses fts to perform a directory traversal when -R is
	specified.  Before, it operated on full path names, and as such
	would encounter the PATH_MAX (often 4096) limit.

	* src/chmod.c: Include "xfts.h".
	(process_file): Rename from change_file_mode.
	Adapt to be used with fts.
	(process_files): New function.

2003-10-18  Jim Meyering  <jim@@meyering.net>

	* tests/du/deref-args: Ensure that du -D now dereferences all
	symlinks specified on the command line, not just those that
	reference directories.

	* basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c:
	* dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c:
	* hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c:
	* mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c:
	* printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c:
	* split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c:
	* touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c:
	* who.c, whoami.c, yes.c (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
	of 2003-09-19.  Now, AUTHORS is a comma-separated list of strings.
	Update the call to parse_long_options so that `AUTHORS, NULL' are the
	last parameters.
	* src/true.c (main): Append NULL to version_etc argument list.
	* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.

2003-10-17  Andreas Schwab  <schwab@@suse.de>

	* tests/mk-script: Get $srcdir from first parameter instead of
	hardcoding it.
	(main): Update usage.

	* tests/Makefile.am.in ($(srcdir)/$x-tests): Pass $(srcdir) as
	first argument of mk-script.
	($(srcdir)/Makefile.am): Likewise.  Prepend $(srcdir) to target.

2003-10-17  Jim Meyering  <jim@@meyering.net>

	* src/mv.c (usage): Tweak descriptions of -i and -f so that the
	generated `man' page is more readable.  Suggestion from Dan Jacobson.

	* src/chown-core.c (change_file_owner): Handle the cases in
	which fts_info indicates an error with the given entry.

	* src/du.c (main): Simply assign to bit_flags.
	Don't bother with bit arithmetic.

	* tests/chmod/no-x: New file.
	* tests/chgrp/no-x: New file.
	* tests/chmod/Makefile.am (TESTS): Add no-x.
	* tests/chgrp/Makefile.am (TESTS): Likewise.

	* src/du.c: Include "xfts.h".
	(du_files): Use xfts_open, rather than fts_open.
	* src/chown-core.c (chown_files): Likewise.

2003-10-16  Jim Meyering  <jim@@meyering.net>

	* src/chgrp.c (main): Simply assign to bit_flags.
	Don't bother with bit arithmetic.
	* src/chown.c (main): Likewise.
	Rename a couple of local variables.
	Remove unnecessary casts.

	* src/tail.c (start_bytes): Rename local, remainder, to avoid
	gcc's warning about shadowing a global.

2003-10-15  Jim Meyering  <jim@@meyering.net>

	chown and chgrp now accept POSIX-mandated -H, -L, -P options and
	use fts to perform a directory traversal when -R is specified.
	Before, they operated on full path names, and as such would
	encounter the PATH_MAX (often 4096) limit.
	They are more efficient.  For example, before, chgrp -R would
	take almost 5 seconds to change about 2000 directories and fail
	(with `File name too long'), while now it succeeds on a hierarchy
	of depth 20,000 in 1/10 the time.

	* src/chown.c: Include "userspec.h" and "fts_.h".
	(WRITTEN_BY): Add my name.
	(getpwnam, getgrnam, getgrgid): Remove declarations.
	(endpwent): Remove definition.
	(usage): Update.
	(main): Handle new options.
	Call new function, chown_files rather than change_file_owner.
d4757 5
a4761 7
	* src/chgrp.c: Include "fts_.h".
	(WRITTEN_BY): Add my name.
	(MAXUID, MAXGID): Remove definitions.  Use GID_T_MAX instead of
	the latter.
	(usage): Update.
	(main): Handle new options.
	Call new function, chown_files rather than change_file_owner.
d4763 3
a4765 252
	Rewrite to iterate through hierarchies using fts rather than
	via explicit recursion.
	* src/chown-core.c: Include "fts_.h"
	(change_file_owner): Rewrite to use FTS* and FTSENT* and to operate
	on a single file at a time.
	(chown_files): New function.
	* src/chown-core.h [enum Dereference_symlink]: Remove declaration.
	[struct Chown_option] (recurse, force_silent): Change type to `bool'.
	[struct Chown_option] (dereference): Remove member with ambiguous name.
	[struct Chown_option] (affect_symlink_referent): New member.
	(chown_files): New prototype.

	* tests/chgrp/recurse: Update tests accordingly.
	* tests/chgrp/posix-H: New tests for the above.
	* tests/chgrp/Makefile.am (TESTS): Add posix-H.

	* src/ln.c (usage): Clarify that --directory, -d, -F probably won't
	work even for superuser.  Suggestion from Dan Jacobson.

2003-10-14  Paul Eggert  <eggert@@twinsun.com>

	Fix some number-parsing bugs, e.g., "head -n 100k@@" wasn't
	properly diagnosed.
	* lib/human.c, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
	lib/xstrtoul.c, lib/xstrtoumax.c: Sync with gnulib.
	* src/sort.c (parse_field_count): Handle the case where overflow
	and invalid suffix char are both reported.

2003-10-14  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (decode_switches) [TIOCGWINSZ]: Comment out the
	warning-inducing test, ws.ws_col <= SIZE_MAX, since it was always
	true on Linux.

2003-10-13  Paul Eggert  <eggert@@twinsun.com>

	Fix to avoid a denial-of-service attack if the display width is
	enormous.  Also, clean up the code a bit by removing duplicate code.

	* src/ls.c (init_column_info): Remove forward decl; no longer needed.
	(calculate_columns): New function, that contains code that used
	to be common to print_many_per_line and print_horizontal.
	(print_many_per_line, print_horizontal): Use it.
	(decode_switches): Set max_idx here, not in calculate_columns.
	(print_current_files): Don't call init_column_info; calculate_columns
	now does that.
	(init_column_info): Don't allocate a lot more space than is needed
	to represent the current set of files.  Allocate all the new
	size_t cells in one call to xnmalloc, rather than a row at a time.

2003-10-13  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (init_column_info): Add another FIXME comment.

2003-10-13  Paul Eggert  <eggert@@twinsun.com>

	Fix address-arithmetic bug in 'ls', reported by Georgi Guninski.
	Remove several arbitrary limits on hosts where int cannot represent
	all size_t values.

	* src/ls.c (struct bin_str.len, length_of_file_name_and_frills, indent,
	nfiles, files_index, tabsize, line_length, struct column_info.line_len,
	struct column_info.col_arr[0], max_idx):
	Now size_t, not int.
	(get_funky_string): Return bool indicating success, instead of
	a negative count to indicate failure.  Store number of columns
	through new parameter OUTPUT_COUNT; that way, they can never
	go negative.  Change equals_end from int to bool.  All uses
	changed.
	(struct column_info.valid_len): Now bool, not int.  All uses changed.
	(dired_dump_obstack, get_funky_string, clear_files,
	extract_dirs_from_files, print_current_files,
	print_many_per_line, print_horizontal, init_column_info,
	put_indicator, length_of_file_name_and_frills,
	print_with_commas): Use size_t, not int, for local variables
	that count sizes.
	(decode_switches): Decode sizes using xstrtoul, not xstrtol.
	Check for TIOCGWINSZ returing negative values (or values greater
	than SIZE_MAX!).
	(visit_dir, main, parse_ls_color, queue_directory, add_ignore_pattern,
	init_column_info):
	Use xmalloc and xnmalloc, not XMALLOC.
	(gobble_file): Use xnrealloc, not XREALLOC.
	(print_color_indicator): Remove now-unnecessary cast to size_t.

2003-10-12  Paul Eggert  <eggert@@twinsun.com>

	* tests/du/no-x: Change wording of diagnostic to match latest du.c.
	* tests/sort/sort-tests: Remove from CVS; assume that people
	brave enough to check coreutils out from CVS can rebuild it.

2003-10-12  Jim Meyering  <jim@@meyering.net>

	New options: --preserve-root and --no-preserve-root.
	* src/chmod.c (change_file_mode): Honor new option.
	(change_file_mode): Strip trailing slashes on directory
	argument passed to change_dir_mode.
	(get_root_dev_ino): New function.
	(main): Initialize global, root_dev_ino.

	* src/copy.c (copy_internal): Don't #ifdef-out simple uses of
	S_ISLNK or S_ISSOCK.  The S_IS* macros are guaranteed to be defined
	via system.h.
	* src/chmod.c (change_file_mode): Likewise.

2003-10-08  Jim Meyering  <jim@@meyering.net>

	* src/csplit.c (main): Remove obsolete FIXME.

2003-10-07  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.7.8.  Regenerate dependent files.

2003-09-29  Paul Eggert  <eggert@@twinsun.com>

	csplit cleanup.

	* doc/coreutils.texi (csplit invocation):
	The regexp offset need not have a sign; POSIX requires support
	for signless offets.

	Be more careful about int widths.  For example, remove some
	arbitrary limits by replacing 'unsigned' with 'size_t',
	'uintmax_t', etc.  Use standard bool rather than a homegrown type.
	* lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
	* src/csplit.c (FALSE, TRUE, boolean): Remove.  All uses changed
	to <stdbool.h> usage.
	(struct control): offset is now intmax_t, not int.
	repeat_forever is now bool, not int.
	(struct cstring): len is now size_t, not unsigned int.
	(struct buffer_record): bytes_alloc, bytes_used, num_lines are now
	size_t, not unsigned.  start_line, first_available are now
	uintmax_t, not unsigned.
	(hold_count, control_used): Now size_t, not unsigned.
	(last_line_number, current_line, bytes_written):
	Now uintmax_t, not unsigned.
	(save_to_hold_area, red_input, keep_new_line, record_line_starts,
	create_new_buffer, get_new_buffer, load_buffer, find_line,
	process_regexp, split_file, new_control_record, extract_regexp,
	get_format_width, get_format_prec, max_out):
	size args, locals, and returned values are now size_t, not unsigned
	or int.
	(get_first_line_in_buffer, find_line, write_to_file,
	handle_line_error, process_line_count, regexp_error, process_regexp,
	split_file):
	File line, byte, and repetition counts are now uintmax_t, not unsigned.
	(check_for_offset): Don't require a sign before the offset.
	Use xstrtoimax to do the real work.
	(extract_regexp): Remove harmful cast of size to unsigned.
	256 -> 1<<CHAR_BIT, for clarity.
	(get_format_flags): Return at most 3, to avoid worries about overflow.

	(bytes_to_octal_digits): Remove.

	(cleanup): Don't check whether output_stream is NULL, since
	close_output_file does that for us.

	(new_line_control, create_new_buffer): Use "foo *p = xmalloc
	(sizeof *p);" instead of the more long-winded alternatives.

	(get_new_buffer): Use O(1) algorithm for resizing a buffer
	to a much larger size, instead of an O(N) algorithm.

	(process_regexp): Use plain NULL rather than casted 0.

	(make_filename): Use %u, not %d, to format unsigned file number.

	(new_control_record): Use xrealloc exclusively, since it handles
	NULL reliably.

	(extract_regexp): Change misspelled word in diagnostic.

	(get_format_width): Even if a minimum field width is specified,
	allow room for enough octal digits to represent the value of
	the maximum representible integer.  This fixes a potential
	buffer overrun.  Calculate this room at compile-time, not
	at run-time; this removes the need for bytes_to_octal_digits.
	Check for overflow; this removes a FIXME.

	(get_format_prec): Don't allow precision to be signed; it's
	not ANSI.  Check for overflow.  Remove hardcoded "11" as
	default precision; this fixes a potential buffer overrun
	on hosts with wider size_t.

	(get_format_conv_type): Change local variable to be of type
	unsigned char, not int; this removes a potential subscript
	violation on hosts where char is signed.

	(max_out): Replace "for (;*p;)" with more-standard "while (*p)".
	Allow "%%" in format.  Don't overflow when
	counting lots of percents.

	(usage): Default sprintf format is %02u, not %d.

2003-10-05  Jim Meyering  <jim@@meyering.net>

	* src/chown-core.c (change_file_owner): Remove set-but-not-used local.

	* src/du.c (du_files): Mark diagnostic for translation.

2003-10-04  Jim Meyering  <jim@@meyering.net>

	* src/du.c (du_files): Ignore any failure of fts_close.
	Give better diagnostics for failed fts_open.

	* src/du.c (MAX_N_DESCRIPTORS): Remove now-unused definition.

	Deprecate existing use of -H (aka --si).
	* src/du.c (enum) [HUMAN_SI_OPTION]: New member.
	[long_options]: Use HUMAN_SI_OPTION, not 'H'.
	(main): Warn that the meaning of -H will soon change to be
	POSIX compliant.

2003-10-03  Jim Meyering  <jim@@meyering.net>

	* src/du.c: Accept --no-dereference (-P).

2003-10-02  Jim Meyering  <jim@@meyering.net>

	* tests/du/trailing-slash: Adjust for slightly different output.

	Rewrite du.c to use fts.
	* src/du.c: Include "fts_.h", not ftw.h.
	(opt_dereference_arguments, arg_length, suffix_length): Remove globals.
	(IS_FTW_DIR_TYPE): Remove definition.
	(IS_DIR_TYPE): Define.
	(is_symlink_to_dir): Remove now-unnecessary function.
	(process_file, du_files): Rewrite to use fts.

	* tests/du/inaccessible-cwd: Ensure that even when run from an
	inaccessible directory, du can still operate on accessible
	directories elsewhere.
	* tests/du/Makefile.am (TESTS): Add inaccessible-cwd.

	* tests/rm/deep-1: Ensure that du can process a hierarchy
	of depth 400 while using no more than 50KB of stack space.

2003-10-01  Akim Demaille  <akim@@epita.fr>

	* announce-gen (print_news_deltas): New function, extracted from main.
	(main): Make `news_file' an array.
	Use '...=s' => \@@var for --news and --url-directory specs.
	Before there were a couple of portability problems.

2003-09-28  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_cast_of_alloca_return_value): New rule.
	(syntax-check-rules): Add it.

	* src/copy.c: Remove unnecessary cast of alloca, since now it's
	guaranteed to be (void *).
	* src/cp.c: Likewise.
d4767 1
a4767 2
	* src/ln.c: Likewise.
	* src/ls.c: Likewise.
d4769 327
a5095 1
	* src/sys2.h (ASSIGN_STRDUPA): Likewise.
d5097 4
a5100 1
2003-09-27  Jim Meyering  <jim@@meyering.net>
d5102 2
a5103 3
	Don't exhaust virtual memory when processing large inputs.
	Fix this by removing csplit's internal free-list management;
	instead rely on malloc for that.
d5105 1
a5105 6
	* src/csplit.c (free_list): Remove global.
	(clear_all_line_control): Remove function.
	(get_new_buffer): Always use create_new_buffer to obtain a
	new buffer, rather than searching free_list.
	(free_buffer): Just call free.
	Reported by Nikola Milutinovic.
d5107 2
a5108 1
2003-09-26  Jim Meyering  <jim@@meyering.net>
d5110 1
a5110 2
	* man/rm.x: Also list `chattr' in SEE ALSO section.
	Suggestion from Mark Hubbart.
d5112 1
a5112 1
2003-09-25  Jim Meyering  <jim@@meyering.net>
d5114 1
a5114 2
	* configure.ac: Don't invoke AC_AIX or AC_MINIX explicitly, now
	that we use gl_USE_SYSTEM_EXTENSIONS, since it AC_REQUIREs them.
d5116 1
a5116 1
	* Use autoconf-2.57d.  Regenerate dependent files.
d5118 2
a5119 1
2003-09-24  Jim Meyering  <jim@@meyering.net>
d5121 2
a5122 3
	Minor efficiency tweak.
	* src/ln.c (PATH_BASENAME_CONCAT): Use memcpy rather than strcpy.
	(do_link): Likewise.
d5124 2
a5125 1
2003-09-23  Jim Meyering  <jim@@meyering.net>
d5127 1
a5127 3
	* src/paste.c (paste_serial): Save errno after input error,
	to report proper errno value.
	Based on a patch from Paul Eggert.
d5129 2
a5130 2
	* src/tee.c (tee): Adjust fwrite arguments so that the return
	value is the number of bytes written.
d5132 1
a5132 1
2003-09-16  Paul Eggert  <eggert@@twinsun.com>
d5134 1
a5134 1
	Don't assume ferror sets errno.  Bug reported by Bruno Haible.
d5136 1
a5136 5
	* src/comm.c (compare_files): Save errno after input error,
	to report proper errno value.
	* src/fold.c (fold_file): Likewise.
	* src/od.c (check_and_close, skip, read_char, read_block): Likewise.
	* src/unexpand.c (unexpand): Likewise.
d5138 1
a5138 8
	* src/csplit.c (close_output_file): Don't report bogus errno value
	after ferror discovers an output error.  We don't know the proper
	errno value, since it might have been caused by any of a whole
	bunch of calls, and it might have been trashed in the meantime.
	Fixing this problem will require much more extensive changes;
	in the meantime just say "write error".
	* src/od.c (check_and_close, dump, dump_strings): Likewise.
	* src/uniq.c (check_file): Likewise.
d5140 5
a5144 5
	* src/join.c (get_line): Report error right away if I/O fails,
	so that the proper errno value is used.
	* src/tac.c (tac_seekable, tac_file, save_stdin): Likewise.
	* src/tee.c (tee): Likewise.
	* src/uniq.c (check_file): Likewise.
d5146 1
a5146 2
	* src/od.c (skip): If a read fails, don't retry it later, so
	that we report the proper errno.
d5148 3
a5150 1
	* src/tac.c (tac_mem): Don't return a value; nobody uses it.
d5152 5
a5156 2
	* src/tee.c (tee): Once a write failure has occurred, don't bother
	writing anything more to that stream.
d5158 1
a5158 2
	* src/uniq.c (check_file): Check for ferror (stdout) even if
	ostream == stdout.
d5160 1
a5160 3
	* src/yes.c (UNROLL): Remove.
	(main): Exit immediately when write failure is detected.
	Simplify code by assigning to argv when argc == 1.
d5162 1
a5162 1
2003-09-21  Paul Eggert  <eggert@@twinsun.com>
d5164 1
a5164 4
	* src/ptx.c: Switch encoding from Latin-1 to UTF-8.
	(WRITTEN_BY): Change "Franc,ois" (actually using
	c-with-cedilla in Latin-1) to "F.", so that it's ASCII, as
	xgettext requires.
d5166 2
a5167 1
2003-09-19  Jim Meyering  <jim@@meyering.net>
d5169 1
a5169 5
	`du -D symlink-to-dir' would mistakenly omit the slash in
	lines like this: 24	symlink-to-dir/subdir
	* src/du.c (process_file): Fix offset calculation.
	Reported by Jeff Sheinberg as Debian bug #211591;
	http://bugs.debian.org/205251
d5171 1
a5171 2
	* tests/du/deref-args: New file/test for the above.
	* tests/du/Makefile.am (TESTS): Add deref-args.
d5173 1
a5173 1
	* src/du.c (process_file): Remove useless disjunct.
d5175 2
a5176 5
	* src/sys2.h (case_GETOPT_VERSION_CHAR): Rename parameter, Authors,
	to Written_by.
	* nearly all src/*.c files (WRITTEN_BY): Rename from AUTHORS.
	Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
	Mark each WRITTEN_BY string as translatable.
d5178 1
a5178 10
	* basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c:
	* dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c:
	* hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c:
	* mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c:
	* printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c:
	* split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c:
	* touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c:
	* who.c, whoami.c, yes.c: Revert yesterday's changes.
	Instead, a subsequent change will embed `Written by ' in
	each string along with the author names.
d5180 3
a5182 2
	* src/true.c: Revert yesterday's changes.
	* src/sys2.h: Likewise.
d5184 2
a5185 1
2003-09-18  Jim Meyering  <jim@@meyering.net>
d5187 1
a5187 12
	* basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c:
	* dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c:
	* hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c:
	* mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c:
	* printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c:
	* split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c:
	* touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c:
	* who.c, whoami.c, yes.c: Update AUTHORS definition to be a
	comma-separated list of strings and/or update the call to
	parse_long_options so that `AUTHORS, NULL' are the last parameters.
	* src/true.c (main): Append NULL to version_etc argument list.
	* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
d5189 2
a5190 2
	* src/sort.c (numcompare): Rename local, logb, to log_b to avoid
	shadowing the math function name.  Also rename loga to log_a.
d5192 1
a5192 1
2003-09-14  Jim Meyering  <jim@@meyering.net>
d5194 2
a5195 3
	* src/factor.c (print_factors): Give a separate diagnostic
	for numbers that are too large, but otherwise valid.
	Reported by Dniel Varga.
d5197 2
a5198 1
2003-09-10  Jim Meyering  <jim@@meyering.net>
d5200 3
a5202 1
	* Use automake-1.7.7.  Regenerate dependent files.
d5204 1
a5204 4
	* tests/Makefile.am (all_programs): Use ../src/tr -s ' ' '\n' in place
	of `fmt -1'.  Using the just-built tr is a little cleaner.
	Christian Krackowizer reported that HPUX 10.20 doesn't have fmt.
	* man/Makefile.am (programs, check-x-vs-1): Likewise.
d5206 2
a5207 1
2003-09-09  Jim Meyering  <jim@@meyering.net>
d5209 1
a5209 2
	* src/copy.c: Alphabetize includes.
	Remove duplicate inclusion of "same.h".
d5211 3
a5213 1
2003-09-08  Jim Meyering  <jim@@meyering.net>
d5215 1
a5215 3
	* Makefile.maint (GZIP_ENV): Remove --rsyncable.
	Didn't give enough of a benefit, mainly because it's not yet
	in wide enough use.
d5217 1
a5217 1
	* Version 5.0.91.
d5219 1
a5219 2
	* man/Makefile.am (programs): Use ../src, not $(srcdir)/../src.
	(check-programs-vs-x): Fail if $(programs) is empty.
d5221 1
a5221 1
	* src/remove.c: Add a comment.
d5223 1
a5223 1
2003-09-07  Jim Meyering  <jim@@meyering.net>
d5225 2
a5226 2
	* src/remove.c (D_INO, ENABLE_CYCLE_CHECK) [D_INO_IN_DIRENT]:
	Don't define.  These symbols are no longer used.
d5228 3
a5230 2
	* tests/misc/tty-eof: Write ^D as \cD.
	Complete the change of 2003-08-02.
d5232 1
a5232 4
	* Makefile.maint (po-check): Use cvsu, so that a temporary source
	file in lib/ or src/ doesn't induce an unwarranted failure.
	Add a kludge to filter out the sole generated source file that
	also has translatable messages: src/false.c.
d5234 1
a5234 1
2003-09-06  Jim Meyering  <jim@@meyering.net>
d5236 1
a5236 3
	* src/tail.c (enum): Add ALLOW_MISSING_OPTION.
	(parse_options): Give a diagnostic for (but still accept) the
	deprecated --allow-missing option.
d5238 8
a5245 1
2003-09-04  Paul Eggert  <eggert@@twinsun.com>
d5247 1
a5247 2
	Don't ignore -S if input is a pipe.  Bug report by Michael McFarland in
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00008.html>.
d5249 1
a5249 6
	* src/sort.c (sort_buffer_size): Omit SIZE_BOUND arg.  Compute the
	size_bound ourselves. if an input file is a pipe and the user
	specified a size, use that size instead of trying to guess the
	pipe size.  This has the beneficial side effect of avoiding the
	overhead of default_sort_size in that case.  All callers changed.
	(sort): Remove static var size; now done by sort_buffer_size.
d5251 3
a5253 1
2003-09-05  Jim Meyering  <jim@@meyering.net>
d5255 1
a5255 1
	* Use automake-1.7.6b and autoconf-2.57b.  Regenerate dependent files.
d5257 1
a5257 2
	* tests/tail-2/tail-n0f: Wait .5 seconds for backgrounded process
	to start, rather than just .1.  Upon failure, print unexpected state.
d5259 1
a5259 1
2003-09-04  Paul Eggert  <eggert@@twinsun.com>
d5261 1
a5261 3
	* src/head.c (elide_tail_lines_pipe): Don't assign 0 or
	SAFE_READ_ERROR to tmp->nbytes.
	* src/tail.c (pipe_lines, pipe_bytes): Likewise.
d5263 4
a5266 5
	* src/head.c (struct linebuffer): Change nbytes and nlines
	from unsigned int to size_t.  unsigned int is safe (after the
	2003-09-03 patch) but size_t is cleaner.
	* src/tail.c (struct linebuffer, struct charbuffer): Likewise.
	(pipe_bytes): Likewise for local variable 'i', which was 'int'.
d5268 1
a5268 8
	Standardize on BUFSIZ as opposed to other macro names and values.
	* src/head.c (BUFSIZE): Remove.  All uses changed to BUFSIZ.
	* src/tail.c (BUFSIZ) [!defined BUFSIZ]: Remove.
	stdio.h has always defined it,
	and other code already assumes it's defined.
	* src/tr.c (BUFSIZ) [!defined BUFSIZ]: Likewise.
	(IO_BUF_SIZE): Remove; replace all uses with sizeof io_buf.
	(io_buf): IO_BUF_SIZE -> BUFSIZ.
d5270 1
a5270 1
2003-09-04  Paul Eggert  <eggert@@twinsun.com>
d5272 3
a5274 5
	* src/seq.c (step): Default to 1.
	(print_numbers): Allow the output to be empty.
	(main): The default step is 1, even if LAST < FIRST;
	as per documentation.
	* tests/seq/basic (onearg-2): Output should be empty.
d5276 1
a5276 1
2003-09-05  Jim Meyering  <jim@@meyering.net>
d5278 3
a5280 2
	* Makefile.cfg (wget_files): Temporarily disable, until master
	versions are restored to ftp.gnu.org.
d5282 2
a5283 1
	* configure.ac (AM_INIT_AUTOMAKE): Specify automake-1.7.6.
d5285 1
a5285 6
	Make seq's --width (-w) option work properly even when the
	endpoint requiring the larger width is negative and smaller than
	the other endpoint.
	* src/seq.c (get_width_format): Include `-' in the set of bytes
	allowed in a `simple' number (no decimal point, no exponent).
	Reported by Patrick Mauritz.
d5287 1
a5287 1
2003-09-02  Paul Eggert  <eggert@@twinsun.com>
d5289 1
a5289 12
	* NEWS: sort -t '\0' now uses a NUL tab.
	sort option order no longer matters, unless POSIX requires it.
	* src/sort.c (usage): Say "blanks" instead of "whitespace",
	Similar fixes for many comments.
	(TAB_DEFAULT): New constant, so that we can support NUL as
	the field separator.
	(tab): Now int, not char.  Initialize to TAB_DEFAULT.
	(specify_sort_size): If multiple sizes are specified, use the largest.
	(begfield, limfield): Support NUL tab char.
	(set_ordering): Do not let -i override -d.
	(main): Report an error if incompatible -o or -t options are given.
	Report an error for "-t ''".  Allow "-t '\0'" to specify a NUL tab.
d5291 3
a5293 1
2003-09-05  Jim Meyering  <jim@@meyering.net>
d5295 1
a5295 1
	* tests/sort/Test.pm [o2, nul-tab]: New tests for the above.
d5297 2
a5298 1
2003-09-03  Andreas Schwab  <schwab@@suse.de>
d5300 1
a5300 4
	Bug report and patch here:
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00009.html>
	* src/tail.c (pipe_lines): Don't truncate return value from safe_read.
	* src/head.c (elide_tail_lines_pipe): Likewise.
d5302 1
a5302 1
2003-09-03  Jim Meyering  <jim@@meyering.net>
d5304 2
a5305 4
	* src/du.c (AUTHORS): Remove Larry McVoy's name, since the relatively
	small amount of code from him was first moved to lib/human.c, and was
	subsequently rewritten entirely.
	* src/df.c (AUTHORS): Likewise.
d5307 1
a5307 1
2003-08-22  Lawrence Teo  <lcteo@@uncc.edu>
d5309 1
a5309 5
	* src/md5sum.c (split_3): Accept the BSD format for generic
	message digest modes.  Currently works with BSD's MD5 and SHA1
	formats since these are the two algorithms presently used in
	coreutils.  Updated comments to reflect this change.
	(bsd_split_3): Updated comments.
d5311 1
a5311 3
	* tests/md5sum/basic-1: New test to make sure that
	`md5sum --check' doesn't accept the BSD SHA1 format (adapted
	from `check-bsd' test in tests/sha1sum/basic-1).
d5313 3
a5315 3
	* tests/sha1sum/basic-1 (check-bsd2, check-bsd3): New tests for
	--check exit status and BSD SHA1 format (adapted from tests
	in tests/md5sum/basic-1).
d5317 1
a5317 1
2003-08-30  Jim Meyering  <jim@@meyering.net>
d5319 1
a5319 1
	* src/ln.c (do_link): Use SAME_INODE rather than open-coding it.
d5321 1
a5321 16
	When source and destination arguments refer to the same file, reside
	on a partition (e.g. VFAT) on which distinct names may refer to the
	same directory entry (often due to variations in case), and when the
	link count for the file is 1, mv no longer unlinks the file.  Instead,
	it gives the expected diagnostic that the source and destination are
	the same.  WARNING: this is an incomplete fix.  If the file happens
	to have a link count of 2 or greater, such an erroneous mv command
	will still unlink it.
	Although that is not possible on vfat or umsdos, it is possible on
	other file system types, e.g., ntfs, and hpfs.
	* src/copy.c (same_file_ok): Invoke same_name (which might still
	return false for names that refer to the same directory entry)
	only if the link count is 2 or more.
	* tests/mv/vfat: Show how to demonstrate the above problem.
	This test is not run.
	* tests/mv/Makefile.am (EXTRA_DIST): Add vfat.
d5323 1
a5323 1
2003-08-27  Jim Meyering  <jim@@meyering.net>
d5325 1
a5325 3
	* src/who.c: Change meaning of -l from --lookup to --login, per POSIX.
	who's -l option has been eliciting an unconditional warning about
	this impending change since sh-utils-2.0.12 (April 2002).
d5327 2
a5328 5
	* src/paste.c (paste_parallel): Don't output `EOF' (aka -1) as a `char'.
	This would happen for nonempty files not ending with a newline.
	Reported by Dan Jacobson.
	* tests/misc/paste-no-nl: New file.  Test for above-fixed bug.
	* tests/misc/Makefile.am (TESTS): Add paste-no-nl.
d5330 1
a5330 5
	* src/stat.c (print_it): Avoid buffer overrun that would
	occur when the user-specified format string ends with `%'.
	Patch by Tommi Kyntola.
	* tests/misc/stat-fmt: New file.  Test for above-fixed bug.
	* tests/misc/Makefile.am (TESTS): Add stat-fmt.
d5332 1
a5332 1
2003-08-26  Jim Meyering  <jim@@meyering.net>
d5334 1
a5334 5
	Apply changes from bison.
	* GNUmakefile (SHELL): Define to `sh', if necessary.
	Add copyright.
	* Makefile.maint (WGETFLAGS): Define to `-C off'.
	Update all uses of $(WGET).
d5336 2
a5337 1
2003-08-22  Akim Demaille  <akim@@epita.fr>
d5339 3
a5341 4
	* Makefile.cfg (local-checks-to-skip): New.
	* Makefile.maint (local-check): Rename as...
	(local-checks-available): this.
	(local-check): New.
d5343 1
a5343 1
2003-08-26  Akim Demaille  <akim@@epita.fr>
d5345 4
a5348 2
	* announce-gen (print_changelog_deltas): Neutralize "<#" as
	"<\#" to avoid magic from Gnus when posting parts of this script.
a5349 1
2003-08-25  Jim Meyering  <jim@@meyering.net>
d5351 4
a5354 1
	* src/stat.c (main): Warn about use of deprecated `-l' option.
d5356 3
a5358 1
2003-08-22  Jim Meyering  <jim@@meyering.net>
d5360 1
a5360 3
	* src/stat.c (do_stat): For link count at end of line, use %h format,
	instead of %-5h.  The latter would make stat emit trailing spaces.
	Reported by Dan Jacobson.
d5362 5
a5366 1
2003-08-20  Jim Meyering  <jim@@meyering.net>
d5368 1
a5368 1
	* Makefile.am (EXTRA_DIST): Add .x-sc_space_tab .x-sc_sun_os_names
d5370 3
a5372 1
2003-08-19  Jim Meyering  <jim@@meyering.net>
d5374 1
a5374 2
	* src/system.h: Include stdlib.h unconditionally,
	as we're now assuming that part of hosted C89.
d5376 3
a5378 1
2003-08-18  Jim Meyering  <jim@@meyering.net>
d5380 6
a5385 2
	* src/sys2.h (textdomain, bindtextdomain) [! ENABLE_NLS]: Define away,
	to avoid warnings from gcc.
d5387 1
a5387 1
2003-08-17  Jim Meyering  <jim@@meyering.net>
d5389 4
a5392 5
	Avoid unnecessary and sometimes time-consuming hostname lookups.
	* src/who.c (print_user): Use strchr, not strrchr.
	* src/pinky.c (print_entry): Likewise.
	Patch by Michael Stone.
	This fixes a typo I introduced in who-users.c on 1996-02-23.
d5394 3
a5396 2
	* Makefile.maint (makefile-check): Add 0-9 to the range of characters
	disallowed between `@@...@@'.
d5398 1
a5398 1
2003-08-16  Paul Eggert  <eggert@@twinsun.com>
d5400 2
a5401 4
	* configure.ac (fu_cv_sys_truncating_statfs): Remove; now
	done by gnulib .m4 files.
	(jm_DUMMY_1): Require gl_READUTMP, not jm_PREREQ_READUTMP.
	* src/sys2.h (strtoull): Remove unused declaration.
d5403 3
a5405 1
2003-08-16  Jim Meyering  <jim@@meyering.net>
d5407 1
a5407 2
	* man/Makefile.am (.x.1): Ensure that generated PROGRAM.1 files
	are read-only.
d5409 1
a5409 5
	* src/tail.c (tail_lines): Fix a potential (but very hard to exercise)
	race condition bug.  The bug would be triggered when tailing a file
	with file pointer not at beginning of file, and where the file was
	truncated to have a length of less than the initial offset at just
	the right moment (between the two lseek calls in this function).
d5411 1
a5411 10
	An invalid initial value for *read_pos would result in
	`tail -n0 -f FILE' and `tail -c0 -f FILE' doing what amounted to a
	busy-wait rather than sleeping between iterations.  The bug manifests
	itself only when tailing regular files that are initially nonempty.
	* src/tail.c (tail_bytes): Set *read_pos to new file offset after
	each xlseek call.
	(tail_lines): Likewise, after lseek calls.
	Reported by Nick Estes.  See http://bugs.debian.org/205251 for details.
	* tests/tail-2/tail-n0f: New file.  Test for above fix.
	* tests/tail-2/Makefile.am (TESTS): Add tail-n0f.
d5413 4
a5416 1
2003-08-15  Jim Meyering  <jim@@meyering.net>
d5418 2
a5419 3
	* Makefile.maint (sc_space_tab): Use exclusion list in separate file.
	(sc_sun_os_names): Likewise.
	* .x-sc_space_tab, .x-sc_sun_os_names: New files.
d5421 1
a5421 1
	* man/help2man: Remove some SPACEs before TAB.
d5423 1
a5423 1
2003-08-14  Paul Eggert  <eggert@@twinsun.com>
d5425 1
a5425 5
	* Makefile.maint (LC_ALL): Set to C.
	* man/Makefile.am (ASSORT): New var.
	(check-x-vs-1, programs): Use it.
	* src/Makefile.am (ASSORT, check-README, ../AUTHORS): Likewise.
	* tests/Makefile.am (ASSORT, all_programs): Likewise.
d5427 4
a5430 1
2003-08-11  Jim Meyering  <jim@@meyering.net>
d5432 5
a5436 6
	fold -s -wN would infloop for N < 8 with TABs in the input.
	E.g., this would not terminate: printf 'a\tb' | fold -w2 -s
	* src/fold.c (fold_file): Move contents of `else'-block
	out of conditional so it's used also for --spaces (-s).
	* tests/misc/fold: Test for the above fix.
	* tests/misc/Makefile.am (TESTS): Add fold.
d5438 1
a5438 1
2003-08-10  Jim Meyering  <jim@@meyering.net>
d5440 1
a5440 4
	* src/nice.c [!NICE_PRIORITY]: Include <sys/resource.h> after
	system.h so the types from time.h and sys/time.h are available.
	It appears that this is necessary for OpenBSD, NetBSD, and
	Darwin 6.5 (MacOS 10.2.5).  Reported by Nelson Beebe.
d5442 1
a5442 1
2003-08-06  Paul Eggert  <eggert@@twinsun.com>
d5444 1
a5444 8
	* NEWS: Add support for setting file timestamps to microsecond
	resolution, on hosts that support this.
	* src/copy.c, src/cp.c, src/install.c, src/touch.c: Include utimens.h.
	* src/copy.c (copy_internal):
	Set file timestamps with utimens, not utime.
	* src/cp.c (re_protect): Likewise.
	* src/install.c (change_timestamps): Likewise.
	* src/touch.c (newtime, touch, main): Likewise.
d5446 4
a5449 1
2003-08-09  Jim Meyering  <jim@@meyering.net>
d5451 3
a5453 3
	* Makefile.maint (sc_sun_os_names): New rule based on a regexp
	from Paul Eggert.
	(syntax-check-rules): Add it.
d5455 1
a5455 3
	* src/tail.c (main): Tweak Solaris OS version number in comment.
	* src/wc.c (wc): Likewise
	* tests/tail-2/fflush: Likewise.
d5457 3
a5459 2
	* src/tail.c: Add new undocumented option, --presume-input-pipe.
	(pipe_lines): Use memchr to skip lines, rather than an explicit loop.
d5461 3
a5463 1
2003-08-08  Paul Eggert  <eggert@@twinsun.com>
d5465 1
a5465 3
	Use new gnulib 'extensions' module.
	* configure.ac: Invoke gl_USE_SYSTEM_EXTENSIONS instead of
	AC_GNU_SOURCE.
d5467 4
a5470 1
2003-08-08  Paul Eggert  <eggert@@twinsun.com>
d5472 1
a5472 1
	* tests/du/basic: Ensure that a/b/F has at least 65 bytes too.
d5474 1
a5474 1
2003-08-09  Jim Meyering  <jim@@meyering.net>
d5476 8
a5483 3
	* tests/misc/split-fail: Reflect that `split -a 0' is now accepted.
	For tests of obsolete behavior, don't presume that unsetting
	_POSIX2_VERSION is equivalent to _POSIX2_VERSION=199209.
d5485 6
a5490 1
2003-08-07  Paul Eggert  <eggert@@twinsun.com>
d5492 1
a5492 8
	* doc/coreutils.texi (split invocation):
	Add -d or --numeric-suffixes option to 'split'.
	From a suggestion by Jesse Kornblum.
	* src/split.c (suffix_alphabet): New var.
	(longopts, usage, next_file_name, main): Support -d.
	(next_file_name, main): Allow -a0, as POSIX requires.
	(next_file_name): Don't assume ASCII-like encoding;
	'a' through 'z' are not contiguous in EBCDIC.
d5494 2
a5495 1
2003-08-05  Paul Eggert  <eggert@@twinsun.com>
d5497 1
a5497 13
	Merge getline from gnulib.
	* lib/getline.h, lib/getline.c, m4/getline.m4: Merge from gnulib.
	* lib/getndelim2.h, lib/getndelim2.c, m4/getndelim2.m4, m4/ssize_t.m4:
	New files, from gnulib.
	* lib/getdelim2.c, lib/getdelim2.h: Remove.
	* lib/Makefile.am (libfetish_a_SOURCES): Change getdelim2.c and
	getdelim2.h to getndelim2.c and getndelim2.h.
	* m4/jm-macros.m4 (jm_MACROS): Use gl_GETNDELIM2 rather than
	checking for getdelim.
	(jm_CHECK_ALL_TYPES): Use gt_TYPE_SSIZE_T for ssize_t rather
	than rolling our own.
	* src/cut.c: Include getndelim2.h rather than getdelim2.h.
	(cut_fields): Invoke getndelim2 rather than getdelim2.
d5499 1
a5499 1
2003-08-04  Jim Meyering  <jim@@meyering.net>
d5501 1
a5501 2
	* src/sort.c (main): Use unsigned int instead of int for `nsigs'
	and for the indices to iterate through nsigs.
d5503 5
a5507 1
2003-08-02  Paul Eggert  <eggert@@twinsun.com>
d5509 483
a5991 36
	* src/sort.c: Minor code cleanups, mostly to use more accurate
	types and to remove unnecessary casts.
	(min, max): Remove.  All uses changed to MIN and MAX.
	(hard_lc_collate, hard_LC_TIME, struct buffer.eof, struct
	keyfield.skipsblanks, struct keyfield.skipeblanks, struct
	keyfield.numeric, struct keyfield.general_numeric, struct
	keyfield.month, struct keyfield.reverse, reverse, unique,
	have_read_stdin): Now bool, not int.  All uses changed.
	(eolchar): Now char, not int.
	(struct keyfield.ignore): Now bool const *, not int *.
	(struct keyfield.translate): Now char const *, not char *.
	(struct month.name): Likewise.
	(blanks, nonprinting, nondictionary): Now bool[], not int[].
	(cleanup, inittables, keycompare, check, mergefps, first_same_file,
	check, sort, main): Use const * pointers when possible.
	(month_cmp): Rewrite to avoid casts.
	(inittables): Initialize tables unconditionally, to avoid branches.
	(fillbuf): Return bool, not int.  All uses changed.
	(fillbuf, keycompare, new_key, main):
	Use SIZE_MAX rather than (size_t) -1.
	(trailing_blanks): Renamed from trim_trailing_blanks.
	Return the number of blanks to trim.  All uses changed.
	(getmonth): Use trailing_blanks rather than open code.
	(keycompare): Do not cast char * to unsigned char *; not needed.
	CMP_WITH_IGNORE converts args to UCHAR, so no need to convert it
	ourselves.
	(compare, main): Use | rather than || to avoid jumps.
	Replace "diff = NONZERO (alen)" with "diff = 1", since alen must
	be nonzero there.
	(check, first_same_file, sort, main):
	Use bool instead of int local vars when possible.
	(check): Merge the old 'checkfp' and 'check' into a single function,
	that returns a boolean (true if the file was ordered).
	All uses changed.
	(main): Use int instead of unsigned for iterating through nsigs.
	Rename local var "posix_pedantic" to "posixly_correct".
d5993 1
a5993 1
2003-08-02  Jim Meyering  <jim@@meyering.net>
d5995 2
a5996 2
	* src/nice.c [!NICE_PRIORITY]: Include <time.h> before <sys/resource.h>
	to avoid compilation error on Ultrix. Reported by Christian Krackowizer.
d5998 1
a5998 3
	* src/cut.c (cut_fields): Don't read again after encountering an
	initial EOF.  E.g., `cut -f2' would do so.
	* tests/misc/tty-eof: Add a test for the above fix.
d6000 6
a6005 2
	* src/sort.c (sortlines): Add description and references.
	From Paul Eggert.
d6007 1
a6007 3
	* tests/Makefile.am (TESTS_ENVIRONMENT): Set PATH so that
	the tests in help-version will use the just-built binaries.
	Reported by Christian Krackowizer.
d6009 1
a6009 1
2003-07-31  Paul Eggert  <eggert@@twinsun.com>
d6011 3
a6013 7
	* NEWS: Add --rfc-2822 option to GNU date.
	* doc/coreutils.texi (Time directives, Options for date, Examples
	of date): Likewise.
	* src/date.c (long_options, usage, main): Likewise.
	* doc/getdate.texi (General date syntax): Likewise.
	* doc/coreutils.texi (Options for date): Fix a typo in format:
	it's now %d not %_d.  Add URLs.
d6015 3
a6017 1
2003-08-01  Jim Meyering  <jim@@meyering.net>
d6019 1
a6019 4
	* tests/shred/remove: Ensure that $? is 0 for the final `exit 0'.
	Otherwise, with at least the /bin/sh from HPUX 10.20,
	the trap code would end up converting that to exit 1 and thus an
	unexpected test failure.  Reported by Christian Krackowizer.
d6021 1
a6021 1
2003-07-31  Paul Eggert  <eggert@@twinsun.com>
d6023 1
a6023 7
	* src/ptx.c: Do not include bumpalloc.h.
	(WORD_TABLE): New member alloc.
	(ALLOC_NEW_WORD): Remove.
	(occurs_alloc): New var.
	(digest_word_file, find_occurs_in_text): Check for arithmetic
	overflow when computing table size.  Use xrealloc rather than
	bumpalloc primitives.
d6025 1
a6025 1
2003-07-29  Jim Meyering  <jim@@meyering.net>
d6027 10
a6036 1
	* Version 5.0.90.
d6038 1
a6038 2
	* README: When running tests as root, suggest using
	sudo with NON_ROOT_USERNAME=$USER.
d6040 1
a6040 2
	* tests/Makefile.am (all_programs): Makefile is in ../src, not
	$(srcdir)/../src.
d6042 2
a6043 1
2003-07-28  Jim Meyering  <jim@@meyering.net>
d6045 2
a6046 1
	* Makefile.maint (GZIP_ENV): Try Debian/gzip's new --rsyncable option.
d6048 1
a6048 1
2003-07-28  Paul Eggert  <eggert@@twinsun.com>
d6050 1
a6050 3
	* lib/stdbool.hin (_Bool): Make it signed char, instead of
	an enum type, so that it's guaranteed to promote to int.
	* src/sort.c (sortlines_temp): Undo previous change.
d6052 1
a6052 1
2003-07-28  Jim Meyering  <jim@@meyering.net>
d6054 1
a6054 4
	* src/sort.c (sortlines_temp): Declare local `swap' to be `int', not
	`bool'.  Otherwise, at least one buggy compiler (alpha gcc-2.95.4)
	would cause lines[-1 - swap] (with swap = false) to evaluate to
	lines[4294967295].
d6056 3
a6058 1
2003-07-27  Jim Meyering  <jim@@meyering.net>
d6060 2
a6061 2
	* tests/priv-check (my_uid): Use `!', not `^' in case pattern `[!0-9]',
	since /bin/sh of at least NetBSD 1.6 and OpenBSD 3.2 don't accept `^'.
d6063 1
a6063 4
	* src/remove.c (prompt) [! recursive]: Don't prompt about unwritable
	directories, as required by POSIX.   Reported by Karl Berry.
	* tests/rm/dir-no-w: New file.  Test for the above fix.
	* tests/rm/Makefile.am (TESTS): Add dir-no-w.
d6065 4
a6068 1
	* tests/mk-script: Emit `$xx', not its expansion.
d6070 11
a6080 1
2003-07-27  Paul Eggert  <eggert@@twinsun.com>
d6082 1
a6082 6
	This change was inspired by a similar proposal by Stepan Kasal.
	* src/sort.c (mergelines, sortlines_temp): New functions.
	(sortlines): Use them, to reduce the number of times that
	we need to copy 'struct line' values.  This improved CPU
	performance by about 30% on one 18 MB test.
	(sort): Don't invoke sortlines unless we have 2 or more lines.
d6084 8
a6091 1
2003-07-26  Stepan Kasal  <kasal@@ucw.cz>
d6093 1
a6093 2
	* src/sort.c (sort): Don't require two `struct line's per text line,
	the new sort algorithm requires just 1.5.
d6095 3
a6097 1
2003-07-27  Jim Meyering  <jim@@meyering.net>
d6099 1
a6099 6
	* src/pathchk.c (validate_path): Use %lu, not %ld.
	From Paul Eggert.
	* src/cut.c (is_printable_field): Simplify bit arithmetic.
	From Paul Eggert.
	* src/ls.c (sort_files): Put `volatile' in the right place.
	From Paul Eggert.
d6101 1
a6101 1
2003-07-26  Jim Meyering  <jim@@meyering.net>
d6103 7
a6109 46
	Use only one bit per field/offset in array, not one `int'.
	* src/cut.c (printable_field): Change type to `unsigned char'.
	(mark_printable_field, is_printable_field): New functions.
	Use them in place of all direct accesses of `printable_field'.

	* src/expand.c (parse_tabstops): Detect overflow properly.
	* src/cut.c (set_fields): Likewise.

	* src/rm.c: Include "dirname.h".
	(usage): Use base_name (program_name) in body of --help output.
	This lets me...
	* man/Makefile.am (.x.1): ...back out the kludge of 2003-07-22.
	Idea from Brendan O'Dea, who suggested using
	`program_name = basename (argv[0]);' everywhere --
	can't do that, but using base_name works just fine here.

	* src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Exempt test.

2003-07-24  Paul Eggert  <eggert@@twinsun.com>

	Fix some POSIX-compliance problems with 'test'.  This makes
	'test' more compatible with Bash.

	* NEWS, doc/coreutils.texi: Document the following.
	* src/test.c: Include exitfail.h.
	(TEST_FAILURE): New constant, used for exit status if 'test' fails.
	(test-syntax_error): Use it.
	(binary_operator): Now takes bool arg specifying whether left operand
	is -l ARG, so that caller determines this rather than us.
	All uses changed.
	(term): Use posixtest to evaluate parenthesized subexpressions.
	(unary_operator, one_argument): Remove support for -t without operand.
	(one_argument): Take argument from argv[pos].
	(one_argument, two_arguments, three_arguments): Advance pos.
	All callers changed.
	(three_arguments): Look for binary ops before "!".  Then look
	for parenthesized one_argument expressions, instead of trusting
	expr () to do the right thing.
	(posixtest): Now takes number of args.  All callers changed.
	Treat "( A B )" like "A B".
	(main): Set exit_failure to TEST_FAILURE.  Don't depend on
	POSIXLY_CORRECT, as we now conform to POSIX by default.
	(main) [!LBRACKET]: Do not recognize "--help" or "--verbose" unless.
	* tests/test/Test.pm (test_vector): Add several tests to check
	the above.  Syntax errors now exit with status 2, not 1.
	* man/Makefile.am (mapped_name): Use `../src/[' binary to create test.1.
d6111 1
a6111 1
2003-07-26  Jim Meyering  <jim@@meyering.net>
d6113 3
a6115 2
	* tests/help-version: Adjust for above change in test behavior:
	`[' exits with 2, not 1, and test doesn't accept --help or --version.
d6117 1
a6117 2
	* Makefile.maint (ME): Don't use trick suggested in Make manual.
	It doesn't work for make-3.79.1.  Reported by Christian Krackowizer.
d6119 1
a6119 2
	* Makefile.maint (sc_system_h_headers): Another syntax check.
	(syntax-check-rules): Add it to the list.
d6121 5
a6125 2
	* src/pathchk.c (validate_path): Cast strlen value to `unsigned long'
	so it matches `%ld' format even on 32-bit systems.
d6127 4
a6130 2
	* src/fmt.c (flush_paragraph): Cast field width to `int' to
	avoid warning on 64-bit systems.
d6132 9
a6140 2
	* src/ls.c (sort_files): Make `func' volatile, so it can't be
	clobbered by a `longjmp' into this function.
d6142 1
a6142 1
2003-07-25  Jim Meyering  <jim@@meyering.net>
d6144 10
a6153 2
	* src/pathchk.c (validate_path): Use %ld format (not %d) for size_t
	value.
d6155 4
a6158 2
	* tests/misc/split-fail: Disable the --line-bytes=$_4gb test,
	because it'd evoke spurious failure on 64-bit systems.
d6160 9
a6168 1
2003-07-24  Jim Meyering  <jim@@meyering.net>
d6170 6
a6175 2
	* src/dd.c (usage): Document the fact that SIGUSR1 makes dd
	output its current record counts.  Reported by Jurriaan.
d6177 1
a6177 2
	* tests/wc/Test.pm (test_vector): Disable the `PIPE' tests when running
	`wc' with no options.  This goes along with the change of 2003-07-20.
d6179 4
a6182 1
2003-07-23  Jim Meyering  <jim@@meyering.net>
d6184 2
a6185 10
	Don't include headers already included by system.h:
	* src/tr.c: Don't include errno.h.
	* src/true.c: Don't include version-etc.h.
	* src/test.c: Don't include limits.h or error.h.
	* src/stat.c: Don't include unistd.h or time.h.
	* src/readlink.c: Don't include stdlib.h, unistd.h, or limits.h.
	* src/pr.c: Don't include time.h.
	* src/pathchk.c: Don't include errno.h.
	* src/nice.c: Don't include sys/time.h.
	* src/ls.c: Don't include stdlib.h.
d6187 2
a6188 9
	* basename.c, cat.c, chroot.c, cksum.c, comm.c, csplit.c, cut.c, date.c:
	* dd.c, dirname.c, echo.c, env.c, expand.c, expr.c, factor.c, fmt.c:
	* fold.c, head.c, hostid.c, hostname.c, id.c, join.c, kill.c, logname.c:
	* md5sum.c, nice.c, nl.c, nohup.c, od.c, paste.c, pathchk.c, pinky.c:
	* pr.c, printenv.c, printf.c, ptx.c, pwd.c, seq.c, setuidgid.c, shred.c:
	* sleep.c, sort.c, split.c, stat.c, stty.c, su.c, sum.c, tac.c, tail.c:
	* tee.c, test.c, tr.c, true.c, tsort.c, tty.c, uname.c, unexpand.c:
	* uniq.c, uptime.c, users.c, wc.c, who.c, whoami.c, yes.c:
	Don't include closeout.h.
d6190 5
a6194 3
	* tests/rm/fail-2eperm: Add a check for whether $NON_ROOT_USERNAME
	can access the required version of rm.
	* tests/rm/Makefile.am (TESTS_ENVIRONMENT): Define PACKAGE_VERSION.
d6196 3
a6198 1
	* tests/cut/Test.pm (out-delim3a): New test.
d6200 1
a6200 1
	* man/help2man: Update to version 1.33.
d6202 1
a6202 1
	* src/expand.c (parse_tabstops): Detect overflow in tabstop sizes.
d6204 2
a6205 3
	* src/dircolors.c: Include xstrndup.h.
	(xstrndup): Remove function, now that it's been factored out into
	it's own file.
d6207 1
a6207 1
2003-07-22  Paul Eggert  <eggert@@twinsun.com>
d6209 3
a6211 3
	* src/wc.c (wc): Fix typo in computation of file from file_x,
	which caused the former to be used uninitialized if file_x was
	nonzero.
d6213 8
a6220 1
2003-07-22  Jim Meyering  <jim@@meyering.net>
d6222 2
a6223 1
	* src/cut.c (set_fields): Use xcalloc in place of xmalloc+memset.
d6225 4
a6228 3
	* man/Makefile.am (.x.1): Substitute 's,$t/$*,$*,' on output of
	help2man, to avoid having `rm.td/rm' appear in rm.1.  Reported by
	Thomas Luzat.  See http://bugs.debian.org/202413 for details.
d6230 1
a6230 1
	* src/cut.c (main) [lint]: Initialize spec_list_string to avoid warning.
d6232 2
a6233 1
	* src/hostid.c: Don't include <unistd.h>.  system.h already does that.
d6235 3
a6237 3
	* src/cut.c (set_fields): Mark all selected indices before trying to
	determine range endpoints.
	* tests/cut/Test.pm: New test for the above fix.
d6239 4
a6242 15
	Begin to address this comment: What if someone wants to
	extract the 1,000,000-th field of some huge input file?
	The first step is to rearrange things so that the values
	in the printable_field array are all 0/1 rather than 0/1/2.
	* src/cut.c (RANGE_START_SENTINEL): Remove.
	Store range-start indices in a hash table, rather than
	overloading the `printable_field' array.
	(range_start_ht): New global.
	(hash_int, hash_compare_ints, is_range_start_index): New functions.
	(print_kth): Use is_range_start_index; don't test printable_field.
	(set_fields): Detect overflow.
	(set_fields): Insert each range-start index into range_start_ht.
	(main): Call set_fields only once, and only after
	output_delimiter_specified and (if required) range_start_ht have
	been defined.
d6244 2
a6245 1
2003-07-20  Paul Eggert  <eggert@@twinsun.com>
d6247 1
a6247 2
	* src/wc.c (get_input_fstatus): Fix typo: `stat' was being
	invoked with a null pointer when there were no file arguments.
d6249 2
a6250 1
2003-07-20  Jim Meyering  <jim@@meyering.net>
d6252 2
a6253 1
	* Makefile.maint (sc_changelog): Add another nit-picky check.
d6255 1
a6255 5
	* src/wc.c (write_counts): Add a comment.
	(wc): Rename `file' parameter.
	Set new local, `file', to be the file name, or (when it's NULL)
	_("standard output") so that all uses of `file' use the proper value.
	Use STREQ, not strcmp.
d6257 4
a6260 1
2003-07-20  Paul Eggert  <eggert@@twinsun.com>
d6262 2
a6263 3
	wc count field widths now are heuristically adjusted depending
	on the input size, if known.  If only one count is printed, it
	is guaranteed to be printed without leading spaces.
d6265 1
a6265 3
	Previously, wc did not align the count fields if
	POSIXLY_CORRECT was set, but POSIX did not actually require
	this undesirable behavior, so it has been removed.
d6267 8
a6274 2
	* NEWS: Document this.
	* doc/coreutils.texi (wc invocation): Likewise.
d6276 2
a6277 41
	* src/wc.c (number_width): New var.
	(posixly_correct): Remove.
	(struct fstatus): New struct.
	(write_counts): Output fields of width number_width.
	Do not worry about POSIXLY_CORRECT.
	Use null file, not empty-string file, to denote stdin,
	since "" is a valid file name on some hosts.
	(wc, wc_file): New arg fstatus.  Use it to avoid invoking fstat
	if possible.
	(wc):  Avoid problems if end_pos - current_pos overflows.
	Do not print odd message if stdin has a read error.
	(get_input_fstatus, compute_number_width): New functions.
	(main): Use them to implement the new behavior.
	Ignore POSIXLY_CORRECT.

	* tests/wc/Test.pm: Adjust to the new output widths.

2003-07-19  Jim Meyering  <jim@@meyering.net>

	* tests/rm/fail-eperm: Don't create temporary directory --
	we don't use it.

	* tests/shred/remove: Don't open-code test for UID != 0.
	Use priv-check's require-non-root instead.
	Update to use newer framework.

	* tests/help-version (expected_failure_status_expr): Record that
	expr exits with status of 3 for e.g., a write error.

	* tests/priv-check: Use `id -u' to see if we're running as root,
	rather than trying go write to an write-protected file.
	When running as root, ensure $NON_ROOT_USERNAME is valid.
	When running as root with `require-non-root', ensure that `.'
	is writable by $NON_ROOT_USERNAME, then reinvoke $0 set-user-ID
	to $NON_ROOT_USERNAME.  If `.' is not writable, then skip the test.

	* src/printenv.c: Include "exitfail.h".
	(main): Set exit_failure rather than calling close_stdout_set_status.
	* src/date.c: Likewise.
	* src/sort.c: Likewise.
	* src/tty.c: Likewise.
d6279 4
a6282 1
2003-07-18  Jim Meyering  <jim@@meyering.net>
d6284 1
a6284 1
	* tests/touch/not-owner: Update to use newer framework.
d6286 4
a6289 188
	* tests/rm/fail-eperm: Use $srcdir/../priv-check, create a temporary
	directory, and remove Perl-coded `you may not run as root' test.
	* tests/cp/fail-perm: Use $srcdir/../priv-check, rather than
	hard-coding something not quite equivalent.
	Paul Jarc reported the inconsistent diagnostics.

	* src/sort.c (main): Use close_stdout via atexit.
	Now `sort --version' and `sort --help' fail, as they should
	when their output is redirected to /dev/full.

	* src/su.c (usage): Don't call close_stdout here.
	(main): Use close_stdout via atexit.
	Now `su --version > /dev/full' fails, as it should.
	Somehow, the change of 2000-05-07 that purports to fix this
	was not checked in.

	* tests/help-version (--help/--version vs. /dev/full): Special-case
	`[' to protect it from expected_failure_status-`eval'.

	* src/uniq.c (writeline): Use a SPACE, not a TAB between the
	count and the corresponding line, as required by POSIX.
	Reported by Clement Wang.
	* tests/uniq/Test.pm (101, 102): Update tests of -c accordingly.

	* tests/expr/basic: Add tests for when exit status is 2.

	* src/nohup.c (NOHUP_FOUND_BUT_CANNOT_INVOKE, NOHUP_FAILURE):
	Use an anonymous `enum', rather than #define.

2003-07-17  Paul Eggert  <eggert@@twinsun.com>

	* src/expr.c: Include "exitfail.h", "quotearg.h".
	(EXPR_INVALID, EXPR_ERROR): New constants.
	(nomoreargs, null, toarith, nextarg): Return bool, not int.
	(syntax_error): New function, exiting with status 2.  Use it
	insteading of printing "syntax error" ourselves.
	(main): Initialize exit_failure to EXPR_ERROR.
	Exit with EXPR_INVALID on syntax error (too few arguments).
	(nextarg): Use strcmp, not strcoll; strcoll might return
	an undesirable 0, or might fail.
	(docolon, eval4, eval3): Exit with status 3 on invalid argument type
	or other such error.
	(eval2): Report an error if strcoll fails in a string comparison.
	* src/sort.c: Include "exitfail.h".
	(main): Set exit_failure, not xalloc_exit_failure and
	xmemcoll_exit_failure.
	* tests/expr/basic: Invalid value exits with status 3, not 2.

2003-07-16  Jim Meyering  <jim@@meyering.net>

	* configure.ac (AC_INIT): Use 5.0.90 as the version, rather than 5.0.2,
	per GNU maintainer guidelines.  The next non-beta release will be 5.1.

	This script would have caught at least two recent bugs:
	those in [ and kill.
	* tests/help-version: Revive this script.
	It wasn't doing anything useful, since $all_programs wasn't being
	defined by the invoking Makefile.am.
	Reflect that nohup is no longer a script, so don't exclude it.
	Add framework to handle the programs added since it was last run:
	kill, stat, unlink, [, link, readlink.
	Fix path-related problems deriving from the move of this script
	from src/ to its present location.
	* tests/Makefile.am (all_programs): Define.
	(TESTS_ENVIRONMENT): Use it.

	* src/kill.c (main): Fix bug introduced on 2003-05-10 (for 5.0.1)
	whereby kill would always attempt to operate on argv[0] and fail.

	* src/test.c (integer_expected_error): Improve diagnostic -- now,
	it also matches the one from bash's builtin test.
	(binary_operator): Add \n at end of diagnostic.

	* tests/rm/fail-2eperm: Remove setuidgid-related code.  Move it to ...
	* tests/priv-check: Move setuidgid-related and
	NON_ROOT_USERNAME-checking code to this file.

	* README: Update section on testing as `root'.
	Suggestion from Paul Jarc.

	* src/test.c (AUTHORS): Replace 3-letter usernames with the actual
	names of authors that I just found in bash's builtins/test.def.

	Running `[' with no arguments would evoke a segfault.
	* src/test.c (main) [LBRACKET]: Move initialization of argv to
	precede potential use via test_syntax_error.

	* src/Makefile.am (AM_CPPFLAGS): Rename from `INCLUDES', to avoid
	warning from automake -Wall.

2003-07-15  Jim Meyering  <jim@@meyering.net>

	* Version 5.0.1.

	* Makefile.maint (%.asc): Remove target first, so gpg doesn't
	prompt us about it.

	* announce-gen (print_changelog_deltas): Relax tests for matching
	version-number line in NEWS.
	Change the .sig suffix to .asc here, too.

2003-07-14  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (%.asc): Renamed from %.sig.
	Generate and use ascii-armored signatures.
	Use gpg's -o option.

2003-07-13  Jim Meyering  <jim@@meyering.net>

	* src/nohup.c (NOHUP_FAILURE, NOHUP_FOUND_BUT_CANNOT_INVOKE): Define.
	(main): Use them.

	* Makefile.maint (syntax-check): Move each individual check into
	its own target.
	(syntax-check-rules): This is the list of syntax-check targets.
	(sc_unmarked_diagnostics, sc_cast_of_argument_to_free):
	(sc_cast_of_x_alloc_return_value, sc_space_tab):
	(sc_error_exit_success, sc_xalloc_h_in_src):  New targets.

2003-07-12  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Remove uses of OPTIONAL_BIN_ZCRIPTS and last
	traces of the nohup script.

	* src/Makefile.am (bin_SCRIPTS): Remove use of just-removed
	$(OPTIONAL_BIN_ZCRIPTS).

	* src/Makefile.am (localedir.h): Put the `2>&1' after the redirect
	target, not before the `>'.

	* src/remove.c (remove_dir): Give a diagnostic upon failed save_cwd,
	now that that function no longer calls `error'.

	* src/df.c (find_mount_point): Emit a diagnostic for each
	failed syscall, rather than relying on caller to do that.
	The caller couldn't do a good job, anyhow -- too many different
	ways to fail (each with a different referent).
	Give a diagnostic upon failed save_cwd, now that that function
	no longer calls `error'.
	(show_point): Don't diagnose find_mount_point's errors, now that
	it handles them itself.

	* src/df.c (find_mount_point): Don't let free clobber errno upon
	failed chdir.

	* src/sys2.h: Remove alloca-related block.
	* src/system.h: Include <alloca.h> here, instead.

	It appears that the `#pragma alloca' included via "system.h" is
	adequate, since join.c uses alloca, yet lacked an in-file #pragma.
	* src/copy.c, src/cp.c, src/df.c, src/install.c, src/ln.c:
	* src/ls.c, src/mv.c, src/remove.c: Remove `#pragma alloca'.

	* src/chown-core.c (change_file_owner): Do not restore any special
	permission bits (e.g., set-user-ID, set-group-ID) that are reset
	by chown(2) on some systems.  Suggestion and insistence :-) from
	Michael Stone.

	* tests/input-tty: Also check `test -t 1'.
	This is necessary on linux-2.4.21.  Otherwise, the stty/basic-1
	test would block when run in the background.

2003-07-11  Jim Meyering  <jim@@meyering.net>

	* tests/sample-test: Also fail if cat-to-create-expected-output
	fails.  Otherwise, if both `exp' and `out' were to end up empty
	because of e.g., a full disk, they would mistakenly compare equal.

	* src/nohup.c: New file.  Rewrite of nohup.sh in C.
	This solves a portability problem: on at least Solaris systems,
	when nohup.sh used the vendor /bin/sh, it would exit with status
	of `1' rather than the required 126 or 127 upon failure to exec
	the specified program.

	* src/Makefile.am (EXTRA_SCRIPTS): Remove definition.
	(bin_PROGRAMS): Add nohup.
	(EXTRA_DIST): Remove nohup.sh.
	(all_programs): Remove use of $(EXTRA_SCRIPTS).
	* src/nohup.sh: Remove file.
	* man/Makefile.am (nohup.1): Depend on nohup.c, rather than nohup.sh.

	* tests/misc/nohup: Tests for the above.
	* tests/misc/Makefile.am (TESTS): Add nohup.

	* src/head.c (diagnose_copy_fd_failure): New function, renamed from
	the macro, COPY_FD_DIAGNOSE.
	(diagnose_copy_fd_failure): Enclose diagnostic in _(...).
	(head_file): Likewise.
d6291 1
a6291 3
	* src/date.c: Include "quote.h".
	(batch_convert): Use the quote function rather than using literal `...'
	in a diagnostic.
d6293 3
a6295 7
	* src/setuidgid.c (main): Enclose diagnostic in _(...).
	* src/fmt.c (main): Likewise.
	* src/mknod.c (main): Likewise.
	* src/tac.c (tac_seekable): Likewise.
	* src/yes.c (main): Likewise.
	* src/od.c (main): Likewise.
	* src/install.c (change_attributes): Likewise.
d6297 1
a6297 1
2003-07-10  Jim Meyering  <jim@@meyering.net>
d6299 2
a6300 2
	* src/head.c (usage): Use 1024*1024 in place of 1048576.
	* src/tail.c (usage): Likewise.
d6302 2
a6303 2
	* tests/rm/fail-2eperm: Now that we have setuidgid, use it in
	place of the kludge in this test.  Suggestion from Paul Jarc.
d6305 2
a6306 2
	* src/Makefile.am (noinst_PROGRAMS): Define to setuidgid.
	* src/setuidgid.c: New program, solely for testing (not installed).
d6308 3
a6310 2
	* src/chown-core.c (change_file_owner): Don't leak file descriptors
	when dereferencing symlinks.
d6312 1
a6312 1
2003-07-09  Jim Meyering  <jim@@meyering.net>
d6314 1
a6314 2
	* tests/du/slash: New file/test for today's lib/ftw.c fix.
	* tests/du/Makefile.am (TESTS): Add slash
d6316 12
a6327 2
	* src/tail.c (xlseek): Avoid warning about ``return without value
	from function returning non-void''.
d6329 1
a6329 1
2003-07-08  Jim Meyering  <jim@@meyering.net>
d6331 8
a6338 1
	* man/help2man: Update to version 1.29.
d6340 2
a6341 1
	* man/help2man: Add END handler to close STDOUT and check for errors.
d6343 1
a6343 1
2003-06-30  Paul Eggert  <eggert@@twinsun.com>
d6345 3
a6347 10
	Add support for a "[" that conforms to the GNU coding standards,
	i.e., that does not depend on its name.
	* src/lbracket.c: New file.
	* README: Add "[".
	* man/Makefile.am (programs): Ignore "[", since it doesn't have
	a separate man page.
	* src/Makefile.am (bin_PROGRAMS): Add "[".
	(__SOURCES): New var.
	* src/test.c (LBRACKET): Define to 0 if not defined.
	(main): Use LBRACKET rather than argv[0].
d6349 1
a6349 2
	* src/test.c (one_argument): Do not check for -t if POSIXLY_CORRECT.
	Reported by Paul Jarc and Dan Jacobson.
d6351 4
a6354 3
	* src/test.c (main): Do not recognize --help or --version if
	POSIXLY_CORRECT, when invoked as "test".  Handle "[ ]" correctly.
	Do not bother testing that margv[margc] is non-null.
d6356 1
a6356 1
2003-07-04  Jim Meyering  <jim@@meyering.net>
d6358 3
a6360 2
	* src/who.c (print_line): Rewrite to use asprintf, in order to be
	able to avoid emitting trailing spaces.  Reported by Dan Jacobson.
d6362 1
a6362 3
	* tests/misc/head-elide-tail: Add tests of head's new --lines=-N
	option, and perform the +1600 invocations of head IFF the envvar
	RUN_EXPENSIVE_TESTS is set.
d6364 7
a6370 1
2003-07-03  Jim Meyering  <jim@@meyering.net>
d6372 1
a6372 3
	* src/cp.c (do_copy): Give a better diagnostic when failing due
	to nonexistent destination directory.  Reported by Dmitry Rutsky.
	See http://bugs.debian.org/199730 for details.
d6374 4
a6377 1
2003-06-27  Jim Meyering  <jim@@meyering.net>
d6379 1
a6379 3
	split's --verbose option did nothing [broken in 4.5.10 and 5.0]
	* src/split.c (longopts): Use `1', not `0' as the value for
	for &verbose.  Reported by Keith Thompson.
d6381 1
a6381 3
	Test for the above fix.
	* tests/misc/split-a: Also use --verbose and compare stderr
	output with what we'd expect.
d6383 1
a6383 1
2003-06-20  Jim Meyering  <jim@@meyering.net>
d6385 4
a6388 3
	* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
	Use `error_t' (rather than int) as type for local `err'.
	From Alfred M. Szmidt.
d6390 2
a6391 1
2003-06-19  Marcus Brinkmann  <marcus@@gnu.org>
d6393 4
a6396 2
	* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
	Fix author preservation code.
d6398 1
a6398 1
2003-06-19  Jim Meyering  <jim@@meyering.net>
d6400 1
a6400 2
	* src/ln.c (ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0.
	(do_link): Don't warn about hard link to symlink.
d6402 1
a6402 1
2003-06-18  Jim Meyering  <jim@@meyering.net>
d6404 2
a6405 2
	* src/cut.c: Include "getdelim2.h", not "getstr.h".
	Reflect renaming: getstr -> getdelim2.
d6407 1
a6407 2
	* src/comm.c, src/join.c, src/nl.c, src/uniq.c: Reflect renaming:
	readline -> readlinebuffer.
d6409 4
a6412 1
2003-06-09  John David Anglin  <dave.anglin@@nrc-cnrc.gc.ca>
d6414 1
a6414 2
	* src/readlink.c: Include <sys/types.h> before system.h (because
	the latter includes <sys/stat.h>).  Required on Ultrix 4.3.
d6416 2
a6417 1
2003-06-17  Jim Meyering  <jim@@meyering.net>
d6419 4
a6422 7
	* src/system.h (initialize_main): Define.
	Use it in every `main'.  Applied via this:
	p='initialize_main (&argc, &argv);'
	perl -ni -e '/program_name.=.argv.0/ and print "  '"$p"'\n"; print' \
	  $(grep -l program_name.=.argv.0 *.c)
	test.c uses margc/margv, so I made the change manually for that file.
	Based on a patch from Bernard Giroud.
d6424 1
a6424 1
2003-06-09  John David Anglin  <dave.anglin@@nrc-cnrc.gc.ca>
d6426 1
a6426 3
	Fix for build failure on Ultrix 4.3.
	* src/stat.c: Include sys/statvfs.h in preference to sys/vfs.h.
	Include sys/param.h and sys/mount.h on ultrix.
d6428 1
a6428 1
2003-06-16  Jim Meyering  <jim@@meyering.net>
d6430 3
a6432 4
	* src/touch.c (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove
	definitions.
	* src/system.h (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Define
	them here instead, but with one change: define EISDIR to -1, not 0.
d6434 2
a6435 3
	* src/cat.c (cat): Remove `#ifndef ENOSYS', now that it's
	guaranteed to be defined.
	* src/system.h (ENOSYS, ENOTSUP): Define to -1 if not defined.
d6437 1
a6437 2
	* README: Mention the CVS repository.
	Encourage addition of test cases.
d6439 4
a6442 1
2003-06-12  Jim Meyering  <jim@@meyering.net>
d6444 4
a6447 2
	* src/touch.c (touch): Call close only if necessary.
	From Bruno Haible.
d6449 4
a6452 3
	* src/wc.c (usage): Correct wording: wc prints counts in the order
	`newline, word, byte'.  Reported by Keith M. Briggs.
	* man/wc.x: Fix it here, too.  And change `lines' to `newlines'.
d6454 1
a6454 1
2003-06-10  Jim Meyering  <jim@@meyering.net>
d6456 2
a6457 1
	* tests/date/Test.pm: Add a test for the new format, e.g., May-23-2003.
d6459 3
a6461 1
2003-06-07  Jim Meyering  <jim@@meyering.net>
d6463 4
a6466 2
	* Makefile.maint (syntax-check): Add commented-out (over-aggressive)
	rule.
d6468 1
a6468 1
2003-06-06  Jim Meyering  <jim@@meyering.net>
d6470 2
a6471 3
	* src/extract-magic (main): Avoid newer 3-arg form of open,
	so this script works also with e.g., perl5.005_03.
	Patch by John David Anglin.
d6473 2
a6474 1
2003-06-04  Paul Eggert  <eggert@@twinsun.com>
d6476 2
a6477 1
	* src/system.h: Include <stdbool.h> unconditionally.
d6479 1
a6479 1
2003-06-04  Jim Meyering  <jim@@meyering.net>
d6481 2
a6482 3
	* man/Makefile.am (check-programs-vs-x): Rename target
	from check-programs-vs-1.  Adjust rule to check for the
	primary (.x) file, not the generated one (.1).
d6484 1
a6484 1
2003-06-03  Tim Mooney <mooney@@dogbert.cc.ndsu.NoDak.edu>
d6486 1
a6486 3
	* man/kill.x: New file.
	* man/Makefile.am (dist_man_MANS): Add kill.1.
	(kill.1): New rule.
d6488 1
a6488 1
2003-06-04  Jim Meyering  <jim@@meyering.net>
d6490 1
a6490 4
	Ensure that the .x file for a new program is never forgotten again.
	* man/Makefile.am (programs): Define.
	(check-programs-vs-1): New phony target.
	(check-local): Depend on it.
d6492 3
a6494 1
2003-06-03  Jim Meyering  <jim@@meyering.net>
d6496 2
a6497 5
	Avoid unnecessary copying of environment.
	* src/env.c (main): Rather than clearing the environment and --
	unless told to ignore environment -- copying all settings from
	the saved, original environment, clear the environment only when
	that is requested.  Suggested by Jens Elkner.
d6499 3
a6501 1
2003-06-02  Jim Meyering  <jim@@meyering.net>
d6503 1
a6503 2
	* src/system.h: Always include <string.h>, since we assume C89.
	Include <limits.h> without checking for HAVE_LIMITS_H.
d6505 1
a6505 2
	* src/test.c [!TEST_STANDALONE]: Remove #if-0'd block.
	(STREQ, S_IXUGO): Remove redundant (in system.h) definitions.
d6507 4
a6510 1
2003-06-01  Jim Meyering  <jim@@meyering.net>
d6512 3
a6514 7
	Avoid a race condition in `tail -f' described by Ken Raeburn in
	http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html
	* src/tail.c (file_lines): Add new parameter, *read_pos, and set it.
	(pipe_lines, pipe_bytes, start_bytes, start_lines): Likewise.
	(tail_bytes, tail_lines, tail): Likewise.
	(tail_file): Use the new `read_pos' value as the size,
	rather than stats.st_size from the fstat call.
d6516 1
a6516 1
2003-05-28  Jim Meyering  <jim@@meyering.net>
d6518 3
a6520 2
	* src/extract-magic: Allow expansion of `$file' in the here-
	document corresponding to the comment at the top of fs.h.
d6522 2
a6523 1
2003-05-26  Jim Meyering  <jim@@meyering.net>
d6525 1
a6525 4
	* src/stat.c: Fix portability problem on FreeBSD5.0: don't include
	<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE.
	Use #if/#elif/... cascade so we get only one set of include files.
	Reported by Nelson Beebe.
d6527 2
a6528 1
2003-05-24  Jim Meyering  <jim@@meyering.net>
d6530 3
a6532 3
	* src/md5sum.c (split_3): Accept the BSD format only when in MD5 mode.
	* tests/sha1sum/basic-1: Make sure `sha1sum --check' doesn't
	accept the BSD format.
d6534 313
a6846 1
2003-03-28  Joe Orton  <jorton@@redhat.com>
d6848 2
a6849 3
	* src/md5sum.c (bsd_split_3): New function.
	(split_3): Detect checksums from BSD 'md5' command and handle them
	using bsd_split_3.
d6851 2
a6852 2
	* tests/md5sum/basic-1: New tests for --check exit status, and for
	BSD-style checksum files.
d6854 2
a6855 1
2003-05-21  Jim Meyering  <jim@@meyering.net>
d6857 1
a6857 3
	* src/head.c (elide_tail_lines_pipe): Fix a thinko.
	This sort of thing is why it'd be *Really Good* to factor
	out the common code used here and in tail.c.
d6859 2
a6860 1
2003-05-14  Jim Meyering  <jim@@meyering.net>
d6862 2
a6863 1
	* src/head.c (usage): Document new feature: --bytes=-N and --lines=-N.
d6865 1
a6865 1
	* tests/du/slink: Skip this test if `.' is on an XFS file system.
d6867 1
a6867 3
	* tests/du/fd-leak: New file.  Test for the bug in du that
	was fixed by the 2003-05-12 change to lib/ftw.c.
	* tests/du/Makefile.am (TESTS): Add fd-leak.
d6869 1
a6869 2
	* src/head.c (AUTHORS): Enclose string in N_(...), now that it
	includes a translatable word, `and'.
d6871 2
a6872 6
	* src/dd.c (usage): Don't use `,' as the thousands separator
	in e.g. 1,000,000 and 1,048,576.  Instead, do this:
	`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
	* src/df.c (usage): Likewise.
	* src/du.c (usage): Likewise.
	* src/ls.c (usage): Likewise.
d6874 1
a6874 1
	* Makefile.maint (syntax-check): Add another check.
d6876 2
a6877 1
2003-05-13  Paul Eggert  <eggert@@twinsun.com>
d6879 2
a6880 2
	Fix uniq to conform to POSIX, which requires that "uniq -d -u"
	must output nothing.  Problem reported by Josh Hyman.
d6882 3
a6884 8
	* src/uniq.c (enum output_mode, mode): Remove, replacing with:
	(output_unique, output_first_repeated, output_later_repeated):
	New vars.  All uses of "mode" changed to use these variables,
	which are not mutually exclusive as "mode" was.
	(writeline): New arg "match", used to control whether to
	obey output_first_repeated or output_later_repeated.
	All callers changed.
	(check_file, main): Adjust to above changes.
d6886 3
a6888 1
	* tests/uniq/Test.pm: Test that 'uniq -d -u' outputs nothing.
d6890 1
a6890 1
2003-05-14  Jim Meyering  <jim@@meyering.net>
d6892 3
a6894 80
	* tests/rm/rm3: Use tr's \n notation rather than \012.
	This package can afford to do that, since its tests are guaranteed use
	GNU tr, which has accepted the more modern notation for 10 years.
	* tests/rm/rm5: Likewise.
	* tests/cp/same-file: Likewise.
	* tests/stty/row-col-1: Likewise.
	* tests/stty/basic-1: Likewise.
	* tests/rm/deep-1: Likewise.
	* tests/mv/part-symlink: Likewise.
	* tests/mkdir/perm: Likewise.
	* tests/misc/nice: Likewise.

2003-05-13  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (struct F_triple) [name]: Remove const attribute.
	(triple_free): Don't apply cast to argument of free.
	(seen_file): Add cast here instead.

	* src/cp-hash.c (struct Src_to_dest) [name]: Remove const attribute.
	(src_to_dest_free): Don't apply cast to argument of free.

	* src/sort.c (zaptemp): Don't apply cast to argument of free.
	* src/pr.c (init_fps, init_store_cols): Likewise.
	* src/join.c (delseq, freeline): Likewise.
	* src/expr.c (OLD): Likewise.
	* src/sort.c (sort): Likewise.
	* src/head.c (elide_tail_lines_pipe): Likewise.

	* src/tail.c: Include "quote.h".
	Use quote in diagnostics.  Change many error format strings
	from just `%s' to e.g., `error reading %s'.
	(pipe_lines): Change type of parameter, n_lines, to uintmax_t.
	Rewrite newline-counting loop to use memchr.

	* src/head.c (elide_tail_lines_pipe): Use `if', not assert.
	Now that assert is no longer used, don't include <assert.h>.

2003-05-12  Jim Meyering  <jim@@meyering.net>

	* src/head.c: Include <assert.h>.
	(AUTHORS): Add my name.
	(elide_tail_lines_pipe): New function.

2003-05-10  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (syntax-check): Check for `error (EXIT_SUCCESS,'.

	* src/readlink.c (main): Set program_name before first use.
	Remove that (redundant) first use.
	Don't exit successfully just because --verbose was specified.
	Pass 0, not EXIT_SUCCESS, as first argument to error; when that
	parameter is 0, error does not exit.

	* src/uname.c (main): When failing due to too many arguments, also say
	that, rather than just "Try `uname --help' for more information.".
	* src/comm.c (main): Likewise, but for too few arguments.
	* src/logname.c: Include error.h.
	(main): Say why we're failing.

	* src/uniq.c (main): Don't segfault when argc < optind.
	* src/who.c (main): Handle argc < optind.
	* src/df.c (main): Likewise.
	* src/install.c (main): Likewise.
	* src/mv.c (main): Likewise.
	* src/pwd.c (main): Likewise.
	* src/tty.c (main): Likewise.
	* src/chroot.c (main): Likewise.
	* src/hostname.c: Likewise.
	* src/du.c (main): Likewise.
	* src/expand.c (main): Likewise.
	* src/env.c (main): Likewise.
	* src/unexpand.c (main): Likewise.
	* src/printenv.c (main): Likewise.
	* src/sync.c (main): Handle argc == 0.
	* src/expr.c (main): Likewise.
	* src/printf.c (main): Likewise.
	* src/basename.c (main): Likewise.
	* src/ln.c (main): Test for `missing argument' before computing n_files.
	* src/tail.c (main): Test for the case of no arguments before
	computing n_files.
d6896 1
a6896 2
	* src/kill.c (send_signals): Don't check command line arguments here.
	(main): Check them here instead.  Handle argc < optind.
d6898 3
a6900 2
	* src/logname.c (main): Use error, rather than fprintf, for the sake
	of consistency.
d6902 1
a6902 1
	* src/rm.c (main): Don't overrun array bound if argc is 0.
d6904 4
a6907 1
2003-05-09  Jim Meyering  <jim@@meyering.net>
d6909 1
a6909 3
	* src/sort.c (main): Don't overrun array bound if argc is 0.
	That would happen when invoked via: execl ("/usr/bin/sort", NULL);
	Reported by Wartan Hachaturow.
d6911 2
a6912 1
2003-05-07  Jim Meyering  <jim@@meyering.net>
d6914 6
a6919 5
	Implement support so that `head --lines=-N' works on seekable files.
	* src/head.c (enum Copy_fd_status): Define.
	(COPY_FD_DIAGNOSE): New macro.
	(elide_tail_lines_seekable): New funtion.
	(elide_tail_lines_file): Call it here.
d6921 2
a6922 1
2003-05-06  Jim Meyering  <jim@@meyering.net>
d6924 1
a6924 1
	* src/sys2.h (CHAR_BIT): Remove duplicate definition.
d6926 87
a7012 1
2003-05-04  Jim Meyering  <jim@@meyering.net>
d7014 1
a7014 4
	* tests/head/Test.pm: Remove tests of --bytes=-N; using that framework
	caused the addition of thousands of small files to the tar archive.
	* tests/misc/head-elide-tail: New file.  Add them here instead.
	* tests/misc/Makefile.am (TESTS): Add head-elide-tail.
d7016 1
a7016 1
2003-05-04  Paul Eggert  <eggert@@twinsun.com>
d7018 2
a7019 4
	* src/remove.c (HAVE_WORKING_READDIR): Define to 0 if not defined.
	(IF_READDIR_NEEDS_REWINDDIR): Remove.
	(remove_cwd_entries): Rewrite to avoid IF_READDIR_NEEDS_REWINDDIR,
	which was a bit weird because it couldn't be emulated by a function.
d7021 4
a7024 1
2003-05-03  Jim Meyering  <jim@@meyering.net>
d7026 3
a7028 12
	Extend head to accept --lines=-N (--bytes=-N) and to print all
	but the N lines (bytes) at the end of the file.
	* src/head.c: Include full-write.h, full-read.h, inttostr.h, quote.h.
	Use quote() in diagnostics, rather than literal `' marks.
	(copy_fd, elide_tail_bytes_pipe, elide_tail_bytes_file):
	New functions.
	(elide_tail_lines_pipe, elide_tail_lines_file): New functions.
	(head_file): Reorganize so as to call head from only one place.
	(main): Likewise, for head_file.
	Handle new, undocumented option, --presume-input-pipe.
	Handle negative line and byte counts.
	* tests/head/Test.pm: Add lots of tests to exercise --bytes=-N.
d7030 1
a7030 2
	* tests/du/8gb: Skip test if the file system of `.' doesn't support
	sparse files -- otherwise it'd create a file of size 8GB.
d7032 1
a7032 1
2003-05-02  Jim Meyering  <jim@@meyering.net>
d7034 2
a7035 5
	* src/fmt.c (usage): Don't mention obsolescent -WIDTH option.
	Instead explain about `-' and standard input.
	(main): Give a proper diagnostic for e.g., `fmt -c -72'.
	Reported by Keith Thompson.
	* tests/fmt/basic: Add test for the above fix.
d7037 5
a7041 4
	* src/fmt.c: Include "quote.h".
	Use quote() in diagnostics, rather than literal `' marks.
	(main): Exit nonzero when unable to open an input file.
	* tests/fmt/basic: Add test for the above fix.
d7043 1
a7043 3
	* src/fmt.c (main): Diagnose invalid suffix on obsolescent width
	specifications like `-72x'.
	* tests/fmt/basic: Add test for the above fix.
d7045 5
a7049 6
	Work around nasty readdir bug on Darwin6.5.
	* src/remove.c (IF_READDIR_NEEDS_REWINDDIR): Define.
	[! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just
	returned NULL and there has been at least one successful unlink or
	rmdir call since the opendir or previous rewinddir, then call
	rewinddir and reiterate the loop.
d7051 5
a7055 4
	Factor out common code.
	* src/remove.c (readdir_ignoring_dotdirs): New function.
	(is_empty_dir): Use it here.
	(remove_cwd_entries): Use it here.
d7057 2
a7058 1
2003-05-01  Jim Meyering  <jim@@meyering.net>
d7060 2
a7061 5
	* tests/rm/r-3: Create 500 rather than just 300 files.
	There's a bug in Darwin6.5's readdir that shows up only with
	338 or more files.
	Fix a bug in this test: `cd $pwd' (not to `..'), now that $tmp
	has two components.
d7063 4
a7066 23
	* src/tail.c:
	Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
	(dump_remainder): Move two declarations `down' into the scope
	where they are used.
	(xlseek): Return the resulting offset.
	(file_lines): Rename parameter, file_length, to end_pos.
	(pipe_lines): Don't coerce safe_read return value to `int'.
	Adapt tests accordingly.
	(pipe_bytes) [struct charbuffer] (nbytes): Change type from `int'
	to `unsigned int'.
	Change type of `total_bytes' from `int' to `size_t',
	since the former wouldn't always be wide enough.
	Don't coerce safe_read return value to `int',
	and adapt tests accordingly.
	Now that testing for a read error no longer involves
	using `tmp', handle that case *after* freeing `tmp'.
	(start_bytes): Clean up.
	(tail_bytes): Now that `n_bytes' may be larger than
	OFF_T_MAX, test for that condition and, if it's true, don't
	use lseek optimizations.
	(parse_options): Don't fail just because N_UNITS is larger than
	the maximum size of a file -- tail may be applied to an input
	stream (e.g., a pipe) with more data than that.
d7068 1
a7068 3
	* Makefile.maint (syntax-check): Rename from alloc-check.
	Also check for SPACE-TAB sequences.
	Also check for malloc/calloc/realloc casts.
d7070 4
a7073 1
2003-05-01  Jim Meyering  <jim@@meyering.net>
d7075 6
a7080 1
	* src/tail.c (start_lines): Rewrite to use memchr.  Clean up.
d7082 1
a7082 1
2003-04-28  Jim Meyering  <jim@@meyering.net>
d7084 1
a7084 2
	* tests/misc/tty-eof: Send two tokens, not just one, so we don't
	make the now-more-picky tsort fail.
d7086 1
a7086 1
2003-04-24  Jim Meyering  <jim@@meyering.net>
d7088 1
a7088 2
	* src/tsort.c (tsort): Remove unnecessary test of have_read_stdin.
	(main): Minor syntactic clean-up.
d7090 1
a7090 2
	* src/tsort.c (tsort): Fail if the input contains an odd number of
	tokens.  Reported by junkio@@cox.net.
d7092 4
a7095 1
	* tests/tsort/basic-1: Test for the above fix.
d7097 1
a7097 1
2003-04-21  Jim Meyering  <jim@@meyering.net>
d7099 1
a7099 1
	* tests/misc/printf: Add tests for the printf fixes below.
d7101 1
a7101 1
	* Makefile.cfg (cvs_files): Add $(srcdir)/config/depcomp to the list.
d7103 2
a7104 1
2003-04-20  Paul Eggert  <eggert@@twinsun.com>
d7106 1
a7106 8
	Fix printf POSIX compatibility bug reported by Ben Harris in
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.
	* doc/coreutils.texi (printf invocation): It's \NNN in the format,
	\0NNN in the %b operand.
	* src/printf.c (usage): Likewise.
	(print_esc): New arg OCTAL0 to specify whether \0NNN or \NNN
	is desired.  All uses changed.  Behave like Bash printf if %b
	operand uses \NNN where the initial N is not 0.
d7108 2
a7109 1
2003-04-17  Jim Meyering  <jim@@meyering.net>
d7111 1
a7111 1
	* src/stty.c: Remove uses of PROTOTYPE macro.
d7113 1
a7113 1
2003-04-15  Jim Meyering  <jim@@meyering.net>
d7115 1
a7115 2
	* Makefile.maint: Remove (or replace-with-TAB(s) to retain alignment)
	each sequence of spaces before a TAB character.
d7117 2
a7118 1
2003-04-13  Jim Meyering  <jim@@meyering.net>
d7120 1
a7120 1
	* src/remove.c (is_empty_dir): Don't closedir (NULL).
d7122 1
a7122 1
2003-04-12  Jim Meyering  <jim@@meyering.net>
d7124 1
a7124 7
	Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h),
	--body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or
	FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic.
	* src/nl.c (main): Fix those problems and remove literal quote marks
	(e.g., "`%s'") from format string; instead use "%s" in each format
	string and `quote (optarg)' as the corresponding argument.
	Also, diagnose all invalid command line options before failing.
d7126 1
a7126 4
	* src/nl.c (proc_text): Fix a bug that would make nl output extra
	newlines in some cases.  Details here: http://bugs.debian.org/177256.
	This bug was introduced on 2001-11-10 for textutils-2.0.17.
	* tests/misc/nl: Add test for the above-fixed bug.
d7128 4
a7131 2
	* tests/misc/readlink: New file.  Test the --canonicalize option.
	* tests/misc/Makefile.am (TESTS): Add readlink.
d7133 5
a7137 1
2003-04-11  Jim Meyering  <jim@@meyering.net>
d7139 1
a7139 5
	Clean up.
	* src/chown.c, src/cp.c, src/dircolors.hin, src/du.c, src/ln.c:
	* src/mkfifo.c, src/ptx.c, src/spline.c, src/stty.c, src/tail.c:
	* src/test.c, src/unexpand.c: Remove (or replace-with-TAB(s) to
	retain alignment) each sequence of spaces before a TAB character.
d7141 2
a7142 1
	* src/ls.c: Include <stdlib.h> unconditionally.
d7144 1
a7144 1
	* Makefile.maint (xalloc-check): Rename from header-check.
d7146 2
a7147 1
	* src/yes.c: Include error.h after system.h, not before.
d7149 2
a7150 10
	Clean up.
	* src/copy.c, src/cp-hash.c, src/cp.c, src/csplit.c, src/cut.c:
	* src/date.c, src/df.c, src/du.c, src/expand.c, src/expr.c, src/id.c:
	* src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c:
	* src/ptx.c, src/sort.c, src/split.c, src/su.c, src/tail.c, src/tee.c:
	* src/tr.c: * src/unexpand.c, src/users.c:
	Remove anachronistic casts of xmalloc, xrealloc, and xcalloc
	return values and of xrealloc's first argument.
	Fix the former with this:
	perl -pi -e 's/\([^(]*?\*\) *(x(m|c|re)alloc)\b/$1/'
d7152 2
a7153 1
2003-04-10  Jim Meyering  <jim@@meyering.net>
d7155 2
a7156 1
	* src/stty.c (wrapf): Declare with format attribute.
d7158 1
a7158 10
	The S_MAGIC_... names shouldn't be maintained in two places (prior
	to this change, one would have to keep stat.c and fs.h in sync).
	This change makes it so those names and the corresponding
	hexadecimal constants all reside in stat.c.  fs.h is now generated.
	* src/Makefile.am (fs.h): New rule to generate fs.h from stat.c.
	(BUILT_SOURCES): Add fs.h, now that it's generated.
	(EXTRA_DIST): Add extract-magic.
	* src/extract-magic: New script to extract fs.h definitions from stat.c.
	* src/stat.c (human_fstype) [__linux__]: Append each hex constant from
	fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.
d7160 2
a7161 2
	* tests/tail-2/big-4gb: Skip this test (don't fail) if creating a
	file with nominal length > 4GB fails.  Reported by Michael Deutschmann.
d7163 2
a7164 3
	* man/unexpand.x: Add `SEE ALSO' reference to expand.
	* man/expand.x: Add `SEE ALSO' reference to unexpand.
	Suggestion from Dan Jacobson.
d7166 4
a7169 1
2003-04-10  Maciej W. Rozycki  <macro@@ds2.pg.gda.pl>
d7171 1
a7171 2
	* src/fs.h (S_MAGIC_DEVPTS): New magic for Linux's devpts.
	* src/stat.c (human_fstype): Handle Linux's devpts.
d7173 4
a7176 1
2003-04-09  Paul Eggert  <eggert@@twinsun.com>
d7178 1
a7178 3
	* src/split.c (line_bytes_split): Arg is of type size_t, since
	that's all that is supported for now.
	(main): Check for overflow in obsolescent line count option.
d7180 3
a7182 1
2003-04-09  Jim Meyering  <jim@@meyering.net>
d7184 1
a7184 1
	* tests/misc/split-fail: Add a new test for the above fix.
d7186 3
a7188 2
	* src/split.c (bytes_split): Use size_t temporary (rather than
	uintmax_t original) in remaining computations.  From Paul Eggert.
d7190 5
a7194 5
	Handle command line option arguments larger than 2^31.
	This allows e.g., splitting into files of size 2GB and larger,
	and running split --lines=N with N=2^31 or more.
	But for --line-bytes=N, the restriction that N <= SIZE_MAX
	remains (for now), due to the way it is implemented.
d7196 1
a7196 6
	* src/split.c: Include "inttostr.h".
	(bytes_split, lines_split, line_bytes_split, main):
	Use uintmax_t, not size_t, for file sizes.
	(main): Give a better diagnostic for option arguments == 0.
	Use umaxtostr to print file sizes.
	Reported by Luke Hassell.
d7198 3
a7200 1
2003-04-08  Jim Meyering  <jim@@meyering.net>
d7202 1
a7202 2
	* src/rm.c (usage): Mention that --directory (-d) works only
	on some systems.  Suggestion from Samuel Tardieu.
d7204 1
a7204 10
	* tests/basename/basic: Run $PERL to see if it is available,
	rather than testing its value.
	* tests/sum/sysv, tests/tsort/basic-1, tests/unexpand/basic-1:
	* tests/basename/basic, tests/dd/skip-seek, tests/dircolors/simple:
	* tests/expr/basic, tests/factor/basic, tests/fmt/basic:
	* tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
	* tests/misc/sort, tests/misc/tty-eof, tests/mv/i-1:
	* tests/rm/empty-name, tests/rm/fail-eperm, tests/rm/unreadable:
	* tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
	* tests/sum/basic-1, tests/seq/basic: Likewise.
d7206 1
a7206 2
	* tests/misc/Makefile.am (TESTS): Add split-fail.
	* tests/misc/split-fail: New file.
d7208 2
a7209 4
	* src/split.c: Rename local variables: nchars -> n_bytes.
	(lines_split): Rename local, nlines -> n_lines.
	(main): Rename local variable: s/accum/n_units/.
	(main): Use STDIN_FILENO, not literal `0'.
d7211 1
a7211 1
2003-04-07  Jim Meyering  <jim@@meyering.net>
d7213 2
a7214 2
	* src/stat.c: Add #include directives for Ultrix 4.4.
	Based on a suggested change from Bert Deknuydt.
d7216 1
a7216 1
2003-04-06  Jim Meyering  <jim@@meyering.net>
d7218 2
a7219 2
	* Makefile.maint (makefile-check): New rule.
	(local-check): Add it.
d7221 1
a7221 1
2003-04-05  Jim Meyering  <jim@@meyering.net>
d7223 1
a7223 4
	* Makefile.am (nearly all of them):
	Use $(VAR) rather than @@VAR@@, now that we can rely on automake to
	emit a definition for each substituted variable.
	* tests/Makefile.am.in: Likewise.
d7225 1
a7225 3
	* tests/rm/rm5: Add a comment explaining why this test fails when
	using Tru64's broken sed.
	* tests/rm/rm3: Likewise.
d7227 3
a7229 6
	Make `kill -t' output signal descriptions (not `?') on Tru64.
	* src/kill.c (sys_siglist): Also check for __sys_siglist.
	Patch by Tony Leneis.
	* configure.ac: Also check for declaration of __sys_siglist.
	Required for Tru64 4.0D, 4.0F, and 5.1.
	Reported by Tony Leneis.
d7231 1
a7231 1
2003-04-04  Jim Meyering  <jim@@meyering.net>
d7233 2
a7234 1
	* src/Makefile.am (PERL): Remove unnecessary definition.
d7236 1
a7236 3
	Because of inappropriate (but POSIX-mandated) behavior of rename,
	`mv a b' would not remove `a' in some unusual cases.  Work around
	this by unlinking `a' when necessary.
d7238 1
a7238 6
	* src/copy.c (same_file_ok): Add an output parameter.
	Set it in the offending case.
	(copy_internal): When necessary, unlink SRC_PATH and inform caller.
	Reported by Ed Avis.
	* tests/mv/hard-4: New test for the above.
	* tests/mv/Makefile.am (TESTS): Add hard-4.
d7240 1
a7240 5
	Clean up rules for automatically generated sources:
	* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, false.c):
	Make each generated file be read-only.
	Add each file name to BUILT_SOURCES separately.
	(MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
d7242 2
a7243 5
	Put LOCALEDIR macro definition in new file: localedir.h.
	* src/Makefile.am (DEFS): Remove definition.
	(localedir.h): New rule.
	(BUILT_SOURCES, DISTCLEANFILES): Add localedir.h.
	* src/system.h: Include "localedir.h".
d7245 2
a7246 1
2003-04-02  Jim Meyering  <jim@@meyering.net>
d7248 1
a7248 1
	* Version 5.0.
d7250 2
a7251 1
	* tests/misc/Makefile.am (TESTS): Add false.
d7253 1
a7253 2
	* Makefile.maint (TMPDIR): Make sure it's defined.
	(my-distcheck): Build in $(TMPDIR), not `.'.
d7255 11
a7265 4
	* src/Makefile.am (false.c): Change all occurrences of
	`(EXIT_SUCCESS)' to `(EXIT_FAILURE)' so that false exits
	unsuccessfully also with --help.  Reported by Paul Jarc,
	* tests/misc/false: New test for the above.
d7267 4
a7270 1
2003-03-30  Jim Meyering  <jim@@meyering.net>
d7272 2
a7273 1
	* NEWS: Note the location of older NEWS files.
d7275 2
a7276 2
	* src/remove.c (is_empty_dir): Don't let a failing closedir
	clobber errno.  Spotted by Arnold Robbins.
d7278 1
a7278 1
	* src/env.c: Fix typo in comment.  From Arnold Robbins.
d7280 2
a7281 1
2003-03-29  Jim Meyering  <jim@@meyering.net>
d7283 1
a7283 1
	* Version 4.5.12.
d7285 2
a7286 3
	* README: Note to expect build problems for stat.c on Ultrix 4.3.
	Note that there are some harmless test failures when running
	`make check' as root on some systems.
d7288 1
a7288 1
2003-03-28  Jim Meyering  <jim@@meyering.net>
d7290 6
a7295 3
	* tests/stty/row-col-1: Skip this test if stty can't get window size.
	This happens when connecting to sparc-solaris5.7 via ssh from within
	emacs.  Reported by Karl Berry.
d7297 5
a7301 6
	* tests/du/basic: Use seq, not `yes' to generate 4KB of data.
	Otherwise, on systems (DJGPP) that emulate pipes using files,
	this test would never complete, waiting for `yes' to terminate.
	* tests/du/slink: As above, use seq, not `yes' to generate link target.
	* tests/rm/hash: As above, use seq, not `yes' to generate dir name.
	Reported by Rich Dawe.
d7303 1
a7303 1
2003-03-27  Jim Meyering  <jim@@meyering.net>
d7305 3
a7307 2
	* src/id.c: Remove Arnold Robbins' obsolete e-mail address
	from `written by...' comment, at his request.
d7309 4
a7312 1
2003-03-24  Paul Eggert  <eggert@@twinsun.com>
d7314 1
a7314 2
	Fix buffer overrun problem reported by TAKAI Kousuke, along
	with some other POSIX incompatibilities.
d7316 2
a7317 6
	* src/printf.c (print_esc): Do not treat \x specially if
	POSIXLY_CORRECT.  Avoid buffer overrun if the format ends
	in backslash.  Treat incomplete escape sequences as strings
	of characters, as POSIX requires.
	(print_formatted): Allow multiple flags.  Avoid buffer overrun
	if the format is incomplete.
d7319 1
a7319 1
2003-03-24  Jim Meyering  <jim@@meyering.net>
d7321 4
a7324 1
	* tests/misc/printf: Add tests for the above fixes and changes.
d7326 1
a7326 1
2003-03-26  Jim Meyering  <jim@@meyering.net>
d7328 2
a7329 1
	* src/copy.h (struct cp_options): Add a comment.
d7331 3
a7333 1
2003-03-23  Jim Meyering  <jim@@meyering.net>
d7335 1
a7335 3
	* README: Describe problem with 64-bit mode on HPUX 11.x,
	with patch for /usr/include/inttypes.h.
	* TODO: Plan to add an autoconf test to work around the bug.
d7337 1
a7337 1
2003-03-22  Jim Meyering  <jim@@meyering.net>
d7339 1
a7339 6
	* src/stat.c: Don't include <sys/sysmacros.h>.
	That is already done via system.h.  Otherwise, the multiple
	inclusion would evoke redefinition warnings from Cray's /bin/cc,
	aka Cray Standard C Version 4.0.3  (057126) Mar 22 2003  22:02:28.
	(human_fstype): Factor some directives `up', out of this function.
	Cast away `const' to avoid error from Cray's /bin/cc.
d7341 5
a7345 1
2003-03-20  Jim Meyering  <jim@@meyering.net>
d7347 3
a7349 2
	* announce-gen (print_changelog_deltas): Ensure that a newline
	precedes each row of `*'s.
d7351 5
a7355 1
2003-03-20  Jim Meyering  <jim@@meyering.net>
d7357 1
a7357 1
	* Version 4.5.11.
d7359 2
a7360 6
	* src/seq.c (valid_format): Also accept ` ' and `'' as valid
	format flag characters.
	Do not require that a field width be specified.
	Do not fail when given a field width of `0'.
	Reported by Dan Jacobson.
	* tests/seq/basic: Add new tests for the above-fixed bug.
d7362 1
a7362 4
	* src/Makefile.am (all-local): Append $(EXEEXT) to use of `su'
	(install-root): Likewise.
	(install-exec-local): Likewise.
	Based on a patch from Richard Dawe.
d7364 1
a7364 1
2003-03-19  Jim Meyering  <jim@@meyering.net>
d7366 7
a7372 7
	* man/Makefile.am (.x.1): Use $(LN_S) instead of 'ln -s',
	because the DJGPP 2.03 port of 'ln -s' doesn't work.
	Include $(EXEEXT) in program names.
	Since $(LN_S) may degenerate to `cp -p', be careful
	to invoke it from the destination directory.
	Mostly from Richard Dawe.
	* configure.ac: Use AC_PROG_LN_S.
d7374 3
a7376 3
	* tests/mv/part-symlink: Unset CDPATH.  Otherwise, having the
	CDPATH shell variable set could cause this test to fail.
	Reported by Karl Berry.
d7378 4
a7381 1
2003-03-18  Jim Meyering  <jim@@meyering.net>
d7383 1
a7383 4
	* src/fmt.c [struct Word] (paren, period, punct, final): Change the
	type of each member from bool <MEMBER>:1 to unsigned int <MEMBER>:1.
	AIX 5.1's xlc could not compile the former.
	Patch by Petter Reinholdtsen.  Also reported by Mike Jetzer.
d7385 3
a7387 1
2003-03-17  Richard Dawe  <rich@@phekda.freeserve.co.uk>
d7389 1
a7389 3
	* configure.ac: Include $(EXEEXT) in OPTIONAL_BIN_PROGS'
	program names, since automake only adds $(EXEEXT) to programs
	in its *_PROGRAMS.
d7391 3
a7393 1
2003-03-16  Jim Meyering  <jim@@meyering.net>
d7395 1
a7395 2
	* src/remove.c (rm): Put two local variables in static storage,
	so they can't be clobbered by the potential longjmp.
d7397 7
a7403 1
2003-03-15  Jim Meyering  <jim@@meyering.net>
d7405 1
a7405 4
	* Makefile.cfg (gnu_rel_host): Fix code to match the comment
	so that a version number with a two-digit component can still count
	as an alpha release.  Reported by Richard A Downing.
	(gnu_rel_host): Define in terms of $(RELEASE_TYPE) instead.
d7407 2
a7408 1
2003-03-14  Jim Meyering  <jim@@meyering.net>
d7410 1
a7410 2
	* src/ansi2knr.c: Remove no-longer-used file.
	* src/ansi2knr.1: Likewise.
d7412 1
a7412 5
	* Makefile.maint (prev_version_file): Don't use ?= for this particular
	assignment, since it causes trouble with old versions of GNU make
	(e.g. 3.76.1).  The other uses of `?=' are inoffensive.  Details here.
	http://mail.gnu.org/archive/html/bug-coreutils/2003-03/msg00028.html
	Patch from Alexandre Duret-Lutz.
d7414 3
a7416 2
	* Use patched automake-1.7.3.  Regenerate Makefile.in files in
	subdirectories so that each includes a definition of ACLOCAL_M4.
d7418 4
a7421 1
	* announce-gen (main): Label the compressed source URLs.
d7423 3
a7425 1
	* Version 4.5.10.
d7427 1
a7427 2
	* tests/du/slink: Relax the test for the `local'ness of a file system,
	so that now it works also for tmpfs.
d7429 2
a7430 3
	* tests/du/hard-link: Transform output from first du, so that this
	test doesn't fail on file systems like tmpfs that order directory
	entries differently.
d7432 1
a7432 1
2003-03-13  Jim Meyering  <jim@@meyering.net>
d7434 1
a7434 2
	* tests/du/8gb: Work around what appears to be an NFS failure that
	would make this test fail on some systems.
d7436 1
a7436 1
2003-03-11  Jim Meyering  <jim@@meyering.net>
d7438 5
a7442 1
	* tests/du/basic: Make the test file exactly 4k bytes long.
d7444 1
a7444 3
	* src/split.c (longopts): Don't hard-code `2' here.
	Instead, just specify `&verbose', and ...
	(main): ... remove the `case 2:' block for --verbose.
d7446 2
a7447 3
	* tests/du/basic: Make the test file larger than 64 bytes, so that
	we don't immediately disqualify file systems (e.g., NetApp) on which
	smaller files take up zero disk blocks.  Reported by Vin Shelton.
d7449 1
a7449 1
2003-03-10  Jim Meyering  <jim@@meyering.net>
d7451 1
a7451 3
	Don't segfault for a negative field width or precision in format string.
	Note that this is just a stopgap fix.  The longer term solution may
	involve adapting bash's builtins/printf.def.
d7453 1
a7453 6
	* src/printf.c: (UNSPECIFIED): Define.
	(print_direc): Use the special value, UNSPECIFIED, to indicate
	that field_width or precision has not been specified.
	(print_formatted): Fail if field_width or precision is the
	special value, UNSPECIFIED.
	Reported by Oliver Kiddle <okiddle@@yahoo.co.uk>
d7455 3
a7457 2
	* src/sys2.h (INT_MIN): Define, if necessary.
	* tests/misc/printf: Add a test for the above-fixed bug.
d7459 1
a7459 1
2003-03-09  Jim Meyering  <jim@@meyering.net>
d7461 1
a7461 5
	* src/remove.c (AD_stack_pop): Cast sizeof... to int before
	changing its sign.  This avoids a warning from gcc on 64-bit systems.
	Reported by Bob Proulx.
	(pop_dir): Reverse order of sign change and cast, to be consistent
	with the above.
d7463 1
a7463 1
2003-03-08  Jim Meyering  <jim@@meyering.net>
d7465 2
a7466 4
	* tests/Makefile.am (evar-check): Check for POSIXLY_CORRECT not as a
	shell variable, but only in the environment.  With /bin/sh->bash, the
	shell variable is set to `y', and that would cause a spurious warning.
	Reported by Bob Proulx.
d7468 2
a7469 2
	* tests/Makefile.am (check-root): Remove touch/fifo.
	It doesn't appear to have to be run as root.
d7471 1
a7471 3
	* tests/rm/fail-2eperm: Rather than simply using the first non-root
	user name, make sure that the selected user name has a usable shell.
	Reported by Paul Jarc.
d7473 4
a7476 7
	Before, when using shred on a device, one had to specify --exact,
	or be careful to choose a size that would not be rounded up and
	exceed the maximum value;  that could result in a failure of
	the final write.
	* src/shred.c (do_wipefd): --exact is now the default for non-regular
	files.  Suggestion from Ben Elliston.
	(usage): Say it.
d7478 2
a7479 3
	* tests/misc/tty-eof: Require at least version 1.11 of Expect.pm.
	Old versions of Expect.pm (e.g., 1.07) lack the log_user function.
	Patch by Bob Proulx.
d7481 8
a7488 3
	* src/Makefile.am (check-misc): Check for use of `defined' in
	#define directives.
	Change to $(srcdir) before running grep.
d7490 1
a7490 1
	* src/sleep.c: Remove now-unused #include and #define directives.
d7492 1
a7492 3
	* src/du.c (process_file): If a file's size is not being counted
	e.g., because it's a hard link to a file we've already counted,
	then don't print a line for it.
d7494 1
a7494 2
	* tests/du/hard-link: New test for the above-fixed bug.
	* tests/du/Makefile.am (TESTS): Add hard-link.
d7496 1
a7496 3
	`du -S' didn't work
	* src/du.c: Revert most of the `reorganization' change of 2003-02-20,
	and make the two-array approach work.
d7498 5
a7502 5
	* tests/du/basic: Correct/add tests for the above fix.
	Set LC_ALL, etc., now that we use sort.
	Check the block/size of a small file, too.
	Correct expected results for simple dir1/dir2/file case.
	Add another test of du -S.
d7504 2
a7505 1
2003-03-07  John David Anglin  <dave.anglin@@nrc-cnrc.gc.ca>
d7507 1
a7507 4
	Avoid build failure with gcc on hppa1.1-hp-hpux10.20 (see GCC PR
	middle-end/9986).  As one of GCC's optimizations, it transforms a
	fputs_unlocked call to a fputc_unlocked call when the string is
	one character long.  However, hpux doesn't have fputc_unlocked.
d7509 5
a7513 4
	* expr.c (usage): Use putchar, not fputs, to output a single character.
	* ls.c (dired_dump_obstack): Likewise.
	* ptx.c (output_one_tex_line, output_one_dumb_line): Likewise.
	* stat.c (print_it): Likewise.
d7515 2
a7516 1
2003-03-07  Jim Meyering  <jim@@meyering.net>
d7518 5
a7522 4
	* src/cp.c: Remove everything associated with mmap-stack.c.
	This reverts the two changes of 2003-02-21.
	* src/du.c: Remove everything associated with mmap-stack.c.
	This reverts the change of 2003-02-19.
d7524 1
a7524 1
2003-03-06  Jim Meyering  <jim@@meyering.net>
d7526 4
a7529 3
	* tests/cp/same-file: Unset CDPATH.  Otherwise, having the
	CDPATH shell variable set could cause this test to fail.
	Reported by Karl Berry.
d7531 1
a7531 1
2003-03-05  Jim Meyering  <jim@@meyering.net>
d7533 4
a7536 1
	* Version 4.5.9.
d7538 2
a7539 3
	* src/printf.c (print_esc): Remove pointless comparison of unsigned
	integer with zero, to avoid a warning from Intel's ecc.
	Reported by Nelson Beebe.
d7541 1
a7541 4
	* src/du.c (process_file): Sizes must all be of type uintmax_t.
	Otherwise, for files or totals that are too big, numbers would
	be truncated.  Patch mostly by Michael Stone.
	Reported by Ingo Saitz as Debian bug #183210.
d7543 10
a7552 2
	* tests/du/8gb: New test for the above-fixed bug.
	* tests/du/Makefile.am (TESTS): Add 8gb.
d7554 1
a7554 2
	* src/du.c (MAX_N_DESCRIPTORS): Use 3 * UTILS_OPEN_MAX / 4
	rather than UTILS_OPEN_MAX - 10.
d7556 1
a7556 1
2003-03-04  Jim Meyering  <jim@@meyering.net>
d7558 1
a7558 3
	* README: Refer new feature discussion to bug-coreutils@@gnu.org,
	rather than bug-gnu-utils, now that the former is better known.
	Suggestion from Gran Uddeborg.
d7560 2
a7561 2
	* src/stat.c (usage): Capitalize consistently.
	Reported by Gran Uddeborg.
d7563 1
a7563 2
	* Makefile.maint (rel-files): Include $(signatures), so that
	those files are also copied into $(release_archive_dir).
d7565 1
a7565 3
	* src/df.c (find_mount_point): Call error here, now that restore_cwd
	no longer does it.
	* src/remove.c (AD_pop_and_chdir): Likewise.
d7567 1
a7567 1
	* tests/Makefile.am (check-root): Add fail-2eperm.
d7569 1
a7569 1
2003-03-03  Jim Meyering  <jim@@meyering.net>
d7571 3
a7573 2
	* src/remove.c (remove_cwd_entries): Include the full filename of
	the offending file, not just the basename.
d7575 1
a7575 1
	* tests/misc/tty-eof: Set $ME properly.
d7577 3
a7579 3
	* Makefile.maint (THIS_VERSION_REGEXP, PREV_VERSION_REGEXP):
	Remove now-unused variables.
	(tag-prev-version, prev-cvs-tag): Likewise.
d7581 3
a7583 4
	* src/remove.c (remove_cwd_entries) [!ROOT_CAN_UNLINK_DIRS]: Give an
	accurate diagnostic when failing to remove a file owned by some other
	user.  Reported by Ivo Timmermans via Michael Stone.
	This fixes Debian bug# 178471.
d7585 1
a7585 3
	* tests/rm/Makefile.am (TESTS): Add fail-2eperm.
	* tests/rm/fail-2eperm: New test, for the above-fixed bug.
	Based on a report from Ivo Timmermans.
d7587 1
a7587 1
2003-03-02  Jim Meyering  <jim@@meyering.net>
d7589 2
a7590 6
	* src/copy.c (copy_internal) [un_backup]: When recovering from a
	failure to create a hard link, do not remove the entry associating
	the source dev/ino with the destination file name.
	* tests/mv/Makefile.am (TESTS): Add hard-3.
	* tests/mv/hard-3: New test, for the above-fixed bug.
	Inspired by a report from Iida Yosiaki.
d7592 1
a7592 1
2003-03-01  Jim Meyering  <jim@@meyering.net>
d7594 1
a7594 4
	* src/df.c (print_header): Don't embed spaces in a separate `Type'
	header string.  Instead, put `Filesystem' and `Type' headers in the
	same string, so translators can use horizontal space as needed.
	Reported by Jean Charles Delepine.
d7596 1
a7596 1
2003-02-28  Jim Meyering  <jim@@meyering.net>
d7598 1
a7598 3
	* src/copy.c (copy_internal): When link fails because of an
	existing destination file, unlink that file and try again.
	Reported by Iida Yosiaki.
d7600 1
a7600 3
	* tests/mv/Makefile.am (TESTS): Add hard-2.
	* tests/mv/hard-2: New test for the above-fixed bug.
	Based on a test case from Iida Yosiaki.
d7602 7
a7608 1
2003-02-26  Jim Meyering  <jim@@meyering.net>
d7610 1
a7610 3
	* tests/du/basic: Don't test du's -b option here.  Directory byte
	counts are smaller (512 rather than 4096) on at least OSF/1 5.1
	and IBM AIX 4.2.  Reported by Nelson Beebe.
d7612 1
a7612 1
2003-02-25  Jim Meyering  <jim@@meyering.net>
d7614 1
a7614 4
	* Makefile.maint (announcement): Now that ChangeLog entries
	are output by announce-gen, don't do it here.
	* announce-gen (print_changelog_deltas): New function.
	(main): Use it.
d7616 1
a7616 1
2003-02-22  Jim Meyering  <jim@@meyering.net>
d7618 2
a7619 38
	* announce-gen: New option: --release-type=TYPE
	* Makefile.maint (beta, major): New targets.  Remove `release'.
	Put them all together on a line.
	Pass the release type (via RELEASE_TYPE envvar) to the MAKE
	invocation of `announcement'.
	(announcement): Invoke announce-gen with --release-type=$RELEASE_TYPE.

	* announce-gen: New option: --news=NEWS_FILE.
	Extract NEWS entries here, not via rules in Makefile.maint.
	* Makefile.maint (announcement): Now that NEWS entries are
	extracted by announce-gen, don't do it here.
	(news-r1, news-r2): Remove now-unused definitions.

2003-02-21  Jim Meyering  <jim@@meyering.net>

	* Version 4.5.8.

	Merge in changes from autoconf's version of this file.
	* Makefile.maint (www-gnu): Define.
	(standards.texi-url_prefix): Use $(www-gnu).
	(make-stds.texi-url_prefix): Likewise.

	* src/cp.c: Include "mmap-stack.h".
	(main): Invoke `run' through a macro that (when possible) runs it
	with a large, mmap'd stack.

	* src/cp.c (run): New function, preparing for the above.
	Exit from this function, not from main
	(main): Call run.

	* src/du.c: New option: --apparent-size.
	(enum) [APPARENT_SIZE_OPTION]: New member.
	(long_options): Add it.
	(usage): Describe it.
	(main): Handle it.
	['b']: Set apparent_size.
	David Eisner reported that the behavior of --bytes had changed.
	Paul Eggert proposed the use of a new option, --apparent-size.
d7621 1
a7621 5
	* src/du.c (apparent_size): New global.
	(print_only_size): Reflect the fact that we're printing byte counts,
	not ST_NBLOCKSIZE-byte-block counts.
	(print_size): Call print_only_size rather than duplicating its code.
	(process_file): Accumulate byte counts, rather than block counts.
d7623 1
a7623 2
	* src/du.c (process_file): Always reset size_to_propagate_to_parent
	for --separate-dirs (-S).
d7625 1
a7625 1
2003-02-20  Jim Meyering  <jim@@meyering.net>
d7627 2
a7628 1
	* Use automake-1.7.3.  Regenerate dependent files.
d7630 2
a7631 4
	* src/stat.c (print_stat): New format: %B (to print ST_NBLOCKSIZE).
	This makes %b (number of ST_NBLOCKSIZE-byte blocks) more useful.
	(usage) [%B]: Describe it.
	[%b]: Refer to %B.
d7633 2
a7634 3
	* src/du.c (process_file): Reorganize the code to use only
	one `sum' array, and change how -S works back to the way it was
	before 2003-01-31.  Patch by Bruno Haible.
d7636 1
a7636 2
	* tests/du/basic: New test.
	* tests/du/Makefile.am (TESTS): Add basic.
d7638 2
a7639 2
	* tests/envvar-check: Add checks for the following:
	BLOCK_SIZE, DU_BLOCK_SIZE, DF_BLOCK_SIZE, LS_BLOCK_SIZE.
d7641 1
a7641 2
	* tests/Makefile.am: Rename phony target envvar-check to evar-check
	so as not to conflict with the distributed file by the same name.
d7643 3
a7645 1
	* src/du.c (process_file): Set info->skip before any possible return.
d7647 1
a7647 4
	Report correct usage for directories, not 0.
	* src/du.c (process_file): Return for `file_type == FTW_DPRE'
	_before_ recording the dev/ino of a directory.
	Reported by Bruno Haible.
d7649 1
a7649 7
	Now, df always displays the device file name corresponding to the
	listed mount point under `Filesystem'.  Before, for an unmounted
	block- or character-special file argument, it would display the
	command-line argument instead.
	* src/df.c (show_disk): Return a value indicating whether
	there was a match.  Don't try to find a mount point here.
	(show_entry): If show_disk doesn't find a match, call show_point.
d7651 1
a7651 1
2003-02-19  Jim Meyering  <jim@@meyering.net>
d7653 1
a7653 6
	* src/du.c: Include "mmap-stack.h".
	(du_files): Add prototype with ATTRIBUTE_NORETURN.
	Exit from this function, not from...
	(main): ...here.
	Instead, if possible, invoke du_files through a macro that
	runs it with a large, mmap'd stack.
d7655 1
a7655 3
	* src/join.c (usage): Change wording in --help output:
	use FILENUM instead of `SIDE' and say what FILENUM means.
	Reported by Bernhard Gabler.
d7657 2
a7658 4
	* src/df.c (print_header): Rather than using a hard-coded literal
	string of spaces matching the length of the English `...Type' header,
	output the right number of spaces to match the selected translation.
	Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.
d7660 1
a7660 2
	* src/split.c (bytes_split): Remove unnecessary `else' after break.
	(lines_split): Likewise.  and correct misleading indentation.
d7662 2
a7663 4
	* src/split.c: Include "full-read.h".
	(bytes_split, lines_split, line_bytes_split): Use full_read,
	not safe_read.   The way split was using the latter, a short read
	could cause split to terminate before EOF.
d7665 1
a7665 2
	* tests/misc/tty-eof: Test all programs that can read stdin,
	requiring no arguments and that write to standard output.
d7667 1
a7667 3
	* tests/misc/tty-eof: New file.  Renamed from ...
	* tests/misc/cat-tty-eof: Remove file.  Rename to tty-eof.
	* tests/misc/Makefile.am (TESTS): Reflect renaming.
d7669 2
a7670 1
2003-02-18  Jim Meyering  <jim@@meyering.net>
d7672 2
a7673 3
	cksum would perform an extra read after encountering EOF
	* src/cksum.c (cksum): Exit the loop upon EOF, too.
	Patch by Michael Bacarella.
d7675 1
a7675 3
	Test for the bug fixed today in cksum, md5sum, and sha1sum.
	* tests/misc/cat-tty-eof: Generalize, clean-up, and test for
	cat, cksum, md5sum, and sha1sum all in the same loop.
d7677 1
a7677 1
2003-02-14  Jim Meyering  <jim@@meyering.net>
d7679 1
a7679 2
	* src/remove.c: Include "euidaccess.h".
	Remove declaration of euidaccess.
d7681 1
a7681 1
2003-02-12  Jim Meyering  <jim@@meyering.net>
d7683 1
a7683 2
	* src/pathchk.c (portable_chars_only): Remove unnecessary `const'
	in cast to avoid warning from icc.  Reported by Alexandre Duret-Lutz.
d7685 3
a7687 1
2003-02-10  Jim Meyering  <jim@@meyering.net>
d7689 3
a7691 9
	* src/test.c: Don't include group-member.h.
	Include euidaccess.h.
	(eaccess): Rewrite function to set the real uid and gid temporarily
	to the effective uid and gid, then invoke 'access', and then set the
	real uid and gid back.  On systems that lack setreuid or setregid,
	fall back on the kludges in euidaccess.  Before, it would not work
	for e.g., files with ACLs, files that were marked immutable,
	or on file systems mounted read-only.  Nelson Beebe raised the issue.
	Paul Eggert suggested the new implementation.
d7693 1
a7693 1
2003-02-09  Jim Meyering  <jim@@meyering.net>
d7695 2
a7696 2
	* src/test.c (test_stat): Remove function.  It's job is done (only
	when necessary) by the wrapper in lib/stat.c.  Adjust all uses.
d7698 1
a7698 1
2003-02-08  Jim Meyering  <jim@@meyering.net>
d7700 4
a7703 1
	* Version 4.5.7.
d7705 2
a7706 3
	* tests/mv/part-symlink: Don't assume that the file owner username
	length is less than 9 in ls output: instead, omit that field
	altogether.  Reported by, and suggested fix from, Ferdinand.
d7708 3
a7710 2
	* tests/du/restore-wd: New test for just-fixed bug in ftw.c.
	* tests/du/Makefile.am (TESTS): Add restore-wd.
d7712 1
a7712 1
	* src/rm.c: Correct now-invalid comment about cycle-detection.
d7714 3
a7716 1
2003-02-06  Jim Meyering  <jim@@meyering.net>
d7718 2
a7719 3
	* NEWS: Add entries from old/*/NEWS
	from fileutils-4.1 through 4.1.11 and
	from sh-utils-2.0 through 2.0.15.  Suggestion from Karl Berry.
d7721 3
a7723 1
	* Version 4.5.6.
d7725 2
a7726 2
	* src/du.c (process_file): Don't return early for excluded files
	or for files whose dev/inode we've already seen.
d7728 3
a7730 1
2003-02-05  Jim Meyering  <jim@@meyering.net>
d7732 1
a7732 2
	* tests/du/exclude: New file.
	* tests/du/Makefile.am (TESTS): Add exclude.
d7734 3
a7736 1
2003-02-04  Dmitry V. Levin  <ldv@@altlinux.org>
d7738 1
a7738 2
	* src/who.c (print_boottime, print_deadprocs, print_runlevel):
	Fix memory allocation arithmetic.
d7740 2
a7741 1
2003-02-04  Jim Meyering  <jim@@meyering.net>
d7743 1
a7743 7
	`df /dev/block-or-char-device-file--not-mounted' now reports
	the name of the file system on which the file resides, usually `/'.
	Before, it would leave the `Mounted on' field blank.
	* src/df.c (show_disk): Move function to precede find_mount_point.
	(show_disk): Add parameter: STATP.
	If we don't find a matching device name, then resort to calling
	find_mount_point.  Reported by Bob Proulx.
d7745 17
a7761 1
2003-02-03  Andreas Schwab  <schwab@@suse.de>
d7763 1
a7763 2
	* tests/rm/cycle: Require non-root.
	* tests/rm/isatty: Likewise.
d7765 6
a7770 1
2003-02-02  Jim Meyering  <jim@@meyering.net>
d7772 1
a7772 1
	* Version 4.5.5.
d7774 1
a7774 1
	* man/Makefile.am (check-x-vs-1): Use @@PATH_SEPARATOR@@, not `:'.
d7776 2
a7777 3
	Ensure that there are no offending uses of `:'.
	* Makefile.maint (makefile_path_separator_check): New rule.
	(local-check): Add it to the list.
d7779 1
a7779 1
2003-02-01  Jim Meyering  <jim@@meyering.net>
d7781 5
a7785 1
	* src/du.c (MAX_N_DESCRIPTORS): Define.
d7787 1
a7787 3
	* src/stat.c (G_fail): New global.
	(human_time): Diagnose failed localtime, not failed nstrftime.
	(main): Fail if G_fail is set.
d7789 1
a7789 1
2003-01-31  Richard Dawe  <rich@@phekda.freeserve.co.uk>
d7791 1
a7791 110
	* tests/basename/Makefile.am: Use @@PATH_SEPARATOR@@ instead of
	hard-coding the path-separator.  Also double-quote the new PATH,
	to avoid problems when the path-separator is a semi-colon or when
	`pwd` contains e.g. a space.
	* tests/chgrp/Makefile.am: Likewise.
	* tests/chmod/Makefile.am: Likewise.
	* tests/chown/Makefile.am: Likewise.
	* tests/cp/Makefile.am: Likewise.
	* tests/dd/Makefile.am: Likewise.
	* tests/dircolors/Makefile.am: Likewise.
	* tests/du/Makefile.am: Likewise.
	* tests/expr/Makefile.am: Likewise.
	* tests/factor/Makefile.am: Likewise.
	* tests/fmt/Makefile.am: Likewise.
	* tests/install/Makefile.am: Likewise.
	* tests/ln/Makefile.am: Likewise.
	* tests/ls/Makefile.am: Likewise.
	* tests/ls-2/Makefile.am: Likewise.
	* tests/md5sum/Makefile.am: Likewise.
	* tests/misc/Makefile.am: Likewise.
	* tests/mkdir/Makefile.am: Likewise.
	* tests/mv/Makefile.am: Likewise.
	* tests/od/Makefile.am: Likewise.
	* tests/rm/Makefile.am: Likewise.
	* tests/rmdir/Makefile.am: Likewise.
	* tests/seq/Makefile.am: Likewise.
	* tests/sha1sum/Makefile.am: Likewise.
	* tests/shred/Makefile.am: Likewise.
	* tests/stty/Makefile.am: Likewise.
	* tests/sum/Makefile.am: Likewise.
	* tests/tail-2/Makefile.am: Likewise.
	* tests/touch/Makefile.am: Likewise.
	* tests/tsort/Makefile.am: Likewise.
	* tests/unexpand/Makefile.am: Likewise.

2003-01-31  Jim Meyering  <jim@@meyering.net>

	* src/stat.c: Include "file-type.h"
	(print_human_type): Remove function.
	(human_access): Rename from print_human_access.  Return a string.
	(human_time): Rename from print_human_time.  Return a string.
	(print_stat): Arrange so that field width and an alignment specifier
	are honored for the %A, %F, %x, %y, and %z formats.
	[%F]: Use file_type; this gives slightly different file type strings,
	e.g., `directory' instead of `Directory' and `regular file' or
	`regular empty file' instead of `Regular file'.
	Prompted by a report from Richard Dawe that the uses of
	S_IFSOCK and S_IFIFO in print_human_time were not portable
	to systems using e.g., DJGPP.

2003-01-31  Richard Dawe  <rich@@phekda.freeserve.co.uk>

	* src/stat.c (print_stat): Use S_ISLNK rather than an explicit
	test using S_IFMT and S_IFLNK.  S_IFLNK may not be defined.

2003-01-31  Jim Meyering  <jim@@meyering.net>

	* src/du.c (main): Upon processing an invalid option or an invalid
	--exclude-from or --max-depth option argument, don't exit right away,
	in case there are others.  Rather record the failure and exit after
	processing other options.

	* GNUmakefile (TAR_OPTIONS): Set and export, in order to make
	tar archive easier to reproduce.

	Rewrite to perform directory traversal using nftw.

	* src/du.c: Include "dirname.h", "ftw.h", and "quotearg.h".
	(AUTHORS): Add self.
	(opt_one_file_system): Move global into `main'.
	(path, xstat, exit_status): Remove declarations.
	(arg_length, suffix_length): New globals.
	(G_fail): New global, sort of like the old `exit_status'.
	(IS_FTW_DIR_TYPE): Define.
	(print_only_size): New function.
	(process_file): New function.
	(str_init, ensure_space, str_copyc, str_concatc): Remove functions.
	(str_trunc, pop_dir, count_entry): Likewise.
	(du_files): Rewrite to use nftw.

2003-01-30  Jim Meyering  <jim@@meyering.net>

	* tests/du/trailing-slash: Ensure that du/ftw follows a command-line
	symlink-to-directory with -L, even without the trailing slash.

2003-01-27  Jim Meyering  <jim@@meyering.net>

	* src/Makefile.am (check-misc): Check for st_blocks, too.

	* src/stat.c (print_stat): Use ST_NBLOCKS rather than `->st_blocks'.
	Reported by Richard Dawe.

2003-01-27  Andreas Schwab  <schwab@@suse.de>

	* src/ls.c (quote_name): Add fourth parameter, width, into which to
	store the screen columns, and return the number of bytes instead.
	(print_dir): Pass NULL as fourth parameter of quote_name.
	(print_name_with_quoting): Likewise.
	(length_of_file_name_and_frills): Get the width from the fourth
	parameter of quote_name instead of return value.

2003-01-27  Jim Meyering  <jim@@meyering.net>

	* src/ls.c (decode_switches): If `dired' is set without
	`format == long_format', then silently reset dired.  This doesn't
	change the behavior of ls (all prior uses of dired were protected
	by `&& format == long_format'), and lets us...
	(DIRED_INDENT): ... remove the `format == long_format' conjunct.
	(PUSH_CURRENT_DIRED_POS): Likewise.
	(main): Likewise.
d7793 1
a7793 1
2003-01-22  Jim Meyering  <jim@@meyering.net>
d7795 1
a7795 2
	* tests/du/no-x: New test, for functionality added to lib/ftw.c.
	* tests/du/Makefile.am (TESTS): Add no-x.
d7797 5
a7801 1
2003-01-21  Jim Meyering  <jim@@meyering.net>
d7803 1
a7803 5
	* src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS
	&& HAVE_STRUCT_DIRENT_D_TYPE]: If a file has d_type == DT_UNKNOWN
	it may still be a directory -- or not (e.g., with FreeBSD on an
	NFS-mounted file system), so resort to calling lstat to find out.
	Based on a patch by Michael van Elst.
d7805 1
a7805 3
	* tests/cp/same-file: Don't assume that the file owner username
	length is less than 9 in ls output: instead, omit that field
	altogether.  Reported by, and suggested fix from, Ferdinand.
d7807 3
a7809 1
2003-01-20  Jim Meyering  <jim@@meyering.net>
d7811 1
a7811 2
	* tests/date/Test.pm (wide-fmt): New test to demonstrate that
	large format widths no longer cause strftime to infloop.
d7813 1
a7813 1
	* Makefile.maint (mail_gpg_sign_cookie): Remove now-unused definition.
d7815 1
a7815 1
2003-01-19  Jim Meyering  <jim@@meyering.net>
d7817 1
a7817 1
	* src/readlink.c: Include "canonicalize.h".
d7819 2
a7820 1
2003-01-18  Jim Meyering  <jim@@meyering.net>
d7822 1
a7822 11
	* src/ls.c (Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]:
	New member.
	(enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
	(long_options): Add option --dereference-command-line-symlink-to-dir.
	(main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
	rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
	-d, -F, -l options is specified.
	(decode_switches): Handle --dereference-command-line-symlink-to-dir.
	(gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
	Change --dereference-command-line (-H) to dereference *all*
	command line arguments, including broken symlinks.
d7824 5
a7828 1
2003-01-15  Paul Eggert  <eggert@@twinsun.com>
d7830 2
a7831 3
	Change ls -H back to the way it was yesterday, since this is
	compatible with FreeBSD and the POSIX spec is confusing
	and somewhat contradictory.
d7833 12
a7844 6
	* src/ls.c (DEREF_COMMAND_LINE_ARGUMENTS): Change name back
	from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
	(long_options): Change the long option name back.
	(usage): Change the usage back.
	(gobble_file): When -H is specified, dereference a top-level
	arg even if it points to a non-directory.
d7846 1
a7846 1
2003-01-15  Jim Meyering  <jim@@meyering.net>
d7848 1
a7848 11
	* src/ls.c (gobble_file): Fall back on using lstat when required:
	when --dereference (-L) is not specified, and
	- when operating on a dangling symlink
	- when operating on command-line-symlink-to-directories
	This fixes numerous problems.  Here are examples:
	- `ls dangling-symlink' would fail with `no such file...'
	Now it prints `dangling-symlink'.
	- `ls -i symlink' would mistakenly print the inode of the referent.
	Now it prints the inode of the symlink.  Likewise for --size (-s).
	Based on a patch from Michael Stone.
	Reported by Deepak Goel as Debian bug #173793.
d7850 1
a7850 8
	Rename ls's --dereference-command-line (-H)
	option to   --dereference-command-line-symlink-to-dir.
	* src/ls.c [enum Dereference_symlink]
	(DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
	DEREF_COMMAND_LINE_ARGUMENTS.  Update all uses.
	(long_options): Rename the long option.
	(usage): Say that --dereference-... changes how ls treats
	only symlinks to directories specified on the command line.
d7852 4
a7855 1
2003-01-14  Jim Meyering  <jim@@meyering.net>
d7857 1
a7857 3
	* tests/ls/dangle: New file/test, for the above fix.
	* tests/ls/inode: Another new file/test, for the above fix.
	* tests/ls/Makefile.am (TESTS): Add dangle and inode.
d7859 1
a7859 5
	* src/ls.c (gobble_file): Fix a bug introduced in 4.5.4 that made it
	so that ls --color would no longer highlight the names of files with
	the execute bit set when not specified on the command line.
	Patch by Michael Stone.  Reported by Stephen Depooter as
	Debian bug 175135.
d7861 4
a7864 1
	* tests/ls-2/tests (color-exe): New test, for the above fix.
d7866 1
a7866 1
2003-01-13  Jim Meyering  <jim@@meyering.net>
d7868 2
a7869 1
	* tests/shred/exact: Also test for just fixed bug with --zero.
d7871 1
a7871 2
	* src/shred.c (long_opts): --zero does not require an argument.
	Patch by Michael Stone.  Reported by Roland Turner as Debian bug 172019.
d7873 1
a7873 1
2003-01-12  Jim Meyering  <jim@@meyering.net>
d7875 1
a7875 1
	* Makefile.maint (cvs-update): Skip any file with local modifications.
d7877 3
a7879 2
	* src/unexpand.c (usage): Document --first-only and mention that
	--tabs=N (-t) enables --all (-a).  Reported by wiregauze@@yahoo.com.
d7881 1
a7881 1
2002-12-01  Dmitry V. Levin  <ldv@@altlinux.org>
d7883 2
a7884 2
	* src/df.c: Include "canonicalize.h".
	Use canonicalize_file_name unconditionally.
d7886 1
a7886 1
2003-01-09  Jim Meyering  <jim@@meyering.net>
d7888 1
a7888 1
	* README: Add readlink.
d7890 2
a7891 1
2002-11-30  Dmitry V. Levin  <ldv@@altlinux.org>
d7893 1
a7893 2
	* src/df.c: Include "xgetcwd.h".
	* src/pwd.c: Likewise.
d7895 2
a7896 1
2002-11-30  Dmitry V. Levin  <ldv@@altlinux.org>
d7898 1
a7898 2
	* src/shred.c: Remove declaration of xstrdup.
	We already get it via xalloc.h which is included via system.h.
d7900 1
a7900 1
2002-08-27  Dmitry V. Levin  <ldv@@altlinux.org>
d7902 1
a7902 1
	New program: readlink.
d7904 1
a7904 2
	* src/Makefile.am (bin_PROGRAMS): Add readlink.
	* src/readlink.c: New file.
d7906 2
a7907 3
	* man/readlink.x: New file.
	* man/Makefile.am (dist_man_MANS): Add readlink.1.
	(readlink.1): New rule.
d7909 1
a7909 1
2003-01-09  Jim Meyering  <jim@@meyering.net>
d7911 1
a7911 11
	When selecting ranges of byte offsets (as opposed to ranges of fields)
	and when --output-delimiter=STRING is specified, output STRING between
	ranges of selected bytes.
	* src/cut.c (RANGE_START_SENTINEL): Define.
	(output_delimiter_specified): New global.
	(print_kth): Add parameter.  Adjust all callers.
	(set_fields): Mark each range-start index with RANGE_START_SENTINEL.
	(cut_bytes): When requested, output STRING between ranges of
	selected bytes.
	(main): Make a diagnostic a little clearer.
	Based on a patch from Jan Nieuwenhuizen.
d7913 1
a7913 1
	* tests/cut/Test.pm: New tests for the above.
d7915 1
a7915 3
	* src/cut.c (set_fields): Make code agree with comment:
	Don't merge abutting ranges like 4- and 2-3.  This makes no
	difference currently, but is required to support an upcoming change.
d7917 1
a7917 1
2003-01-07  Jim Meyering  <jim@@meyering.net>
d7919 1
a7919 1
	* src/cut.c (set_fields): Fix typo in comment.
d7921 1
a7921 5
	* tests/touch/not-owner: New test, mostly extracted from fail-diag.
	* tests/touch/Makefile.am (TESTS): Add not-owner.
	* tests/touch/fail-diag: Remove the test for non-owner diagnostic.
	Now, this tests only the nonexistent-directory diagnostic.
	Suggestion from Michael Stone.
d7923 1
a7923 1
	* tests/touch/fail-diag: Fix typo: s/ld/ls/.
d7925 1
a7925 1
2003-01-04  Jim Meyering  <jim@@meyering.net>
d7927 1
a7927 3
	* src/copy.h: Remove use of PARAMS.
	* src/remove.h: Likewise.
	* src/chown-core.h: Likewise.
d7929 1
a7929 6
	rm could be tricked into mistakenly reporting a cycle.
	* src/remove.c: [cycle_check_state]: New global.
	(remove_cwd_entries): Adapt to new semantics of cycle_check.
	(rm): Call cycle_check_init and cycle_check_free for each file.
	* tests/rm/cycle (rm): New test, for the above fix.
	* tests/rm/Makefile.am (TESTS): Add cycle.
d7931 1
a7931 6
	When rm detects a cycle, don't abort the entire command,
	but rather just the affected command line argument.
	* src/remove.c: Include <setjmp.h>
	(struct dirstack_state) [current_arg_jumpbuf]: New member.
	(remove_cwd_entries): Call longjmp if we detect a cycle.
	(rm): Call setjmp here.
d7933 1
a7933 2
	* src/remove.c (cycle_check, is_power_of_two): Remove functions.
	Instead, include cycle-check.h and use it.
d7935 2
a7936 1
	* src/remove.h (struct dev_ino): Remove declaration.
d7938 2
a7939 1
	* src/remove.c (remove_cwd_entries): Fix typos in comment.
d7941 1
a7941 5
	Don't include trailing /. in diagnostics about directories.
	* src/remove.c (full_filename_): When FILENAME is just `.'
	and there is a nonempty directory-name part, don't append `/.'.
	* tests/rm/unread2: Remove trailing /. from diagnostic.
	* tests/rm/rm2: Likewise.
d7943 1
a7943 6
	* src/remove.c (struct dirstack_state): Define.
	To be used in place of these file-scoped globals ...
	(dir_stack, len_stack, Active_dir): Remove globals.
	(ds_init, ds_free): New functions.
	(full_filename): Define.
	(full_filename_): Rename from full_filename.
d7945 1
a7945 6
	Begin to make AD_* functions more generic.
	* src/remove.c (AD_push_initial): Don't set status to RM_OK here.
	(AD_push): Likewise.
	(AD_INIT_OTHER_MEMBERS): Define.
	(remove_dir): Define the `status' member manually after each
	call to AD_push or AD_push_initial.
d7947 1
a7947 3
	* src/Makefile.am (check-misc): New rule, to ensure that no more
	S_IS* macro definitions sneak into the code.
	(check): Depend on check-misc.
d7949 1
a7949 3
	* src/remove.c [S_ISLNK]: Don't define.  It's already defined in sys2.h.
	* src/du.c (count_entry) [S_ISLNK]: Don't define.
	* src/shred.c [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.
d7951 1
a7951 1
2003-01-03  Jim Meyering  <jim@@meyering.net>
d7953 1
a7953 2
	* src/true.c: Add copyright.
	(AUTHORS): I suppose I've written it.
d7955 1
a7955 1
	* src/Makefile.am (false.c): Make the generated file be read-only.
d7957 3
a7959 1
2003-01-04  Jim Meyering  <jim@@meyering.net>
d7961 2
a7962 2
	* src/ls.c: Include "dev-ino.h".
	[struct dev_ino]: Remove declaration.
d7964 1
a7964 1
2003-01-02  Jim Meyering  <jim@@meyering.net>
d7966 2
a7967 4
	* src/cp.c (do_copy): Tweak diagnostic to be consistent with the one
	from mv: s/missing file arguments/missing file argument/.
	With --target-directory=DIR, cp and mv work with a single file argument.
	Reported by Karl Berry.
d7969 1
a7969 1
	* tests/rm/isatty: Enable this test.
d7971 3
a7973 1
2002-12-31  Jim Meyering  <jim@@meyering.net>
d7975 1
a7975 5
	* src/remove.c (AD_push_initial): Don't set status to RM_OK here.
	(AD_push): Likewise.
	(AD_INIT_OTHER_MEMBERS): Define.
	(remove_dir): Define the `status' member manually after each
	call to AD_push or AD_push_initial.
d7977 2
a7978 2
	* src/ls.c [struct dev_ino]: Remove definition.
	Include "dev-ino.h" instead.
d7980 1
a7980 1
2002-12-28  Jim Meyering  <jim@@meyering.net>
d7982 2
a7983 2
	* tests/du/Makefile.am (TESTS): Add no-deref.
	* tests/du/no-deref: New script.
d7985 1
a7985 1
2002-12-23  Jim Meyering  <jim@@meyering.net>
d7987 4
a7990 1
	* src/remove.c (remove_cwd_entries): Fix typo in comment.
d7992 1
a7992 1
2002-12-21  Jim Meyering  <jim@@meyering.net>
d7994 1
a7994 2
	* announce-gen: Generate MML-formatted announcement.
	This makes it a *lot* harder to send stale MD5/SHA1 signatures.
d7996 1
a7996 1
2002-12-20  Jim Meyering  <jim@@meyering.net>
d7998 2
a7999 3
	* src/touch.c (touch): Change the wording of a diagnostic so
	that it makes sense both when the file exists and when it doesn't.
	Suggestion from Michael Stone.
d8001 1
a8001 1
2002-12-18  Jim Meyering  <jim@@meyering.net>
d8003 1
a8003 1
	* src/stty.c (valid_options): Declare to be static.
d8005 1
a8005 1
2002-12-15  Jim Meyering  <jim@@meyering.net>
d8007 1
a8007 1
	* Makefile.cfg: Remove rules related to generating m4/jm-glibc-io.m4.
d8009 1
a8009 5
	* src/chmod.c, src/copy.c, src/copy.h, src/cp-hash.h, src/csplit.c:
	* src/date.c, src/expr.c, src/fmt.c, src/id.c, src/install.c:
	* src/ls.c, src/od.c, src/pathchk.c, src/pr.c, src/remove.c:
	* src/shred.c, src/sort.c, src/stat.c, src/stty.c, src/sum.c:
	* src/tee.c, src/test.c: Remove all uses of `PARAMS'.
d8011 4
a8014 2
	* src/remove.c (PARAMS): Remove definition.
	* src/sys2.h: Likewise.
d8016 1
a8016 2
	* src/ls.c, src/stat.c, src/date.c: Remove declaration of nstrftime.
	Include strftime.h instead.
d8018 2
a8019 1
2002-12-14  Jim Meyering  <jim@@meyering.net>
d8021 1
a8021 1
	* Makefile.cfg ($(url_dir_list)): Use .../coreutils, not .../fetish.
d8023 2
a8024 3
	* src/system.h [! HAVE_DECL_MEMRCHR]: Declare memrchr.
	This is necessary at least for Irix6.5 when using c89.
	Reported by Nelson Beebe.
d8026 5
a8030 1
	* tests/misc/Makefile.am (TESTS): Add cat-tty-eof.
d8032 1
a8032 1
	* tests/misc/cat-tty-eof: New test.
d8034 1
a8034 3
	* src/mknod.c (usage): Specify how major and minor mode numbers
	are interpreted.  Report forwarded by Kristin E Thomas.
	* src/mknod.c: Remove now-redundant usage-specifying comment.
d8036 1
a8036 1
2002-12-13  Jim Meyering  <jim@@meyering.net>
d8038 1
a8038 1
	* Version 4.5.4.
d8040 3
a8042 2
	* tests/du/trailing-slash: Allow for a directory of size `0'.
	That happens at least on file systems of type tmpfs on linux-2.4.18.
d8044 1
a8044 4
	* announce-gen: New script to begin replacing the commands
	associated with the rule here...
	* Makefile.maint (announcement): Invoke announce-gen.
	* Makefile.am (EXTRA_DIST): Add announce-gen.
d8046 2
a8047 2
	* tests/cp/preserve-2: New file/test, for latest fix.
	* tests/cp/Makefile.am (TESTS): Add preserve-2.
d8049 1
a8049 1
2002-12-11  TAKAI Kousuke  <takai@@vlsi.kuee.kyoto-u.ac.jp>
d8051 1
a8051 4
	Fix a bug whereby cp would fail to parse an option like
	--preserve=mode,ownership.
	* src/cp.c (decode_preserve_arg): Advance `comma' to
	point the character following the comma.
d8053 1
a8053 1
2002-12-11  Jim Meyering  <jim@@meyering.net>
d8055 4
a8058 2
	* src/pathchk.c (NEED_PATHCONF_WRAPPER): Undefine before defining,
	in case it's already defined.
d8060 8
a8067 1
2002-12-09  Jim Meyering  <jim@@meyering.net>
d8069 1
a8069 3
	* tests/touch/fail-diag: Don't get a test failure if /no exists.
	Instead, evoke a framework failure if /no-$$ exists.
	Reported by Michael Stone.
d8071 2
a8072 1
2002-12-08  Jim Meyering  <jim@@meyering.net>
d8074 3
a8076 4
	* src/du.c (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
	Define to rpl_lstat, so that even on systems like Solaris 5.8,
	du honors (per POSIX) the trailing slash on an argument referring
	to a symlink-to-directory.
d8078 1
a8078 1
2002-12-06  Jim Meyering  <jim@@meyering.net>
d8080 8
a8087 2
	* Use autoconf-2.57.  Regenerate dependent files.
	* Use automake-1.7.2.  Regenerate dependent files.
d8089 1
a8089 3
	* src/ls.c (gobble_file): Also stat the file if it's a
	regular file and --indicator-style=classify (aka -F).
	Thanks to Ed Santiago for opening my eyes.
d8091 1
a8091 3
	* tests/ls/file-type: New file.  Test for the above.
	A test to contrast ls -F and ls --indicator-style=file-type.
	* tests/ls/Makefile.am (TESTS): Add file-type.
d8093 1
a8093 1
2002-12-04  Jim Meyering  <jim@@meyering.net>
d8095 1
a8095 3
	* tests/ls/follow-slink: Make sure the symlink was created.
	Richard Dawe reported that `ln -s link link' succeeds, but creates
	no file on systems running some version of the DJGPP libc.
d8097 1
a8097 1
2002-12-03  Jim Meyering  <jim@@meyering.net>
d8099 5
a8103 2
	* src/Makefile.am (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr)
	since this package no longer panders to K&R compilers.
d8105 1
a8105 1
2002-12-02  Jim Meyering  <jim@@meyering.net>
d8107 2
a8108 1
	* tests/du/slink: Skip this test if `.' is on a non-local file system.
d8110 1
a8110 2
	* tests/Fetish.pm (_at_replace): Do the substitution only if there's
	something to replace.
d8112 1
a8112 1
2002-12-01  Jim Meyering  <jim@@meyering.net>
d8114 1
a8114 3
	* src/stat.c: Don't include <string.h> or <ctype.h>.
	That's already done via system.h.
	* src/dircolors.c: Don't include <ctype.h>.
d8116 1
a8116 1
2002-11-30  Jim Meyering  <jim@@meyering.net>
d8118 2
a8119 8
	* ls.c (gobble_file): Remove the block of code that caused
	`ls --color -F symlink-to-dir' to list the files in
	`symlink-to-dir/.'.  Now, it prints `symlink-to-dir@@', (just
	like `ls -F symlink-to-dir') but with the addition of highlighting.
	Similarly, `ls --color -dF symlink-to-dir' would print
	`symlink-to-dir/';  now it prints `symlink-to-dir@@'.
	Reported by Jeff Sheinberg as Debian bug #168203.
	* tests/ls-2/tests (sl-F-color, sl-dF-color): New tests for the above.
d8121 1
a8121 5
	ls is now more efficient: with certain options, it no longer needs
	to stat each directory entry on systems with valid dirent.d_type.
	* src/ls.c (print_dir): Add DT_LNK and DT_REG.
	(main): Make --recursive set format_needs_type, not format_needs_stat.
	(gobble_file): Remove a FIXME comment, now that it's fixed.
d8123 2
a8124 1
2002-11-24  Jim Meyering  <jim@@meyering.net>
d8126 1
a8126 9
	* src/du.c (du_files): Don't strip any trailing slash.
	Rewrite so that `/' is no longer represented internally as
	the empty string.
	(count_entry): When appending a file name component,
	account for the fact that the current path may end in `/'.
	Franois Pinard reported that `du symlink-to-dir/' was not
	equivalent to `du symlink-to-dir/.'.  Now it is.
	* tests/du/trailing-slash: New file/test, for the above fix.
	* tests/du/Makefile.am (TESTS): Add trailing-slash.
d8128 5
a8132 1
2002-11-23  Jim Meyering  <jim@@meyering.net>
d8134 1
a8134 2
	* src/tac.c (output): Declare some local variables to be of type size_t,
	rather than `int' to avoid warnings from gcc.
d8136 1
a8136 1
2002-11-21  Paul Eggert  <eggert@@twinsun.com>
d8138 7
a8144 3
	* src/ls.c (decode_switches): Use case-sensitive matching to
	decode the QUOTING_STYLE environment variable.  This is more
	consistent with the documentation, and with --quoting-style.
d8146 1
a8146 1
2002-11-21  Martin Buck  <martin.buck@@ascom.ch
d8148 1
a8148 2
	* src/stty.c (struct speeds): Add support for all baud rates defined
	in linux-2.4.19.
d8150 1
a8150 1
2002-11-19  Jim Meyering  <jim@@meyering.net>
d8152 1
a8152 3
	* tests/sum/sysv: Export LC_ALL=C, to avoid failure when
	run in a UTF locale.  Report and suggested fix by Bruno Haible.
	* tests/fmt/basic: Likewise.
d8154 1
a8154 1
2002-11-17  Jim Meyering  <jim@@meyering.net>
d8156 2
a8157 2
	* configure.ac: Update via autoupdate.
	Add `AM_GNU_GETTEXT_VERSION(0.11.5)'.
d8159 1
a8159 2
	* src/mv.c (movefile): Don't remove trailing slashes from SOURCE.
	Reported by Hans Ginzel.
d8161 2
a8162 1
2002-11-15  Jim Meyering  <jim@@meyering.net>
d8164 1
a8164 3
	* Makefile.cfg (gnu_rel_host): Define.
	(url_dir_list): Choose from (alpha|ftp).gnu.org depending
	on whether $(VERSION) looks like a major release number.
d8166 1
a8166 3
	* Makefile.maint (mail_gpg_sign_cookie): Backslash-escape `#'.
	(release): Rename from `alpha'.
	(alpha): Depend on release.
d8168 2
a8169 1
	* Makefile.maint (signatures): Define with ?=, so it's easy to override.
d8171 4
a8174 1
2002-11-14  Jim Meyering  <jim@@meyering.net>
d8176 1
a8176 2
	* Makefile.maint (mail_gpg_sign_cookie): Make optional.
	(announcement): Use the new variable.
d8178 3
a8180 8
	* Makefile.maint: Sync with Bison, i.e.:
	(po-check): Scan .l and .y files instead of the
	.c and the .h files that they generate.  This fixes the bug
	reported by Tim Van Holder in:
	<http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
	Look for N_ as well as for _.  Try to avoid matching #define for
	N_ and _.
	From Paul Eggert.
d8182 1
a8182 1
2002-11-12  Jim Meyering  <jim@@meyering.net>
d8184 2
a8185 3
	* src/ls.c (HAVE_SYMLINKS): Remove unnecessary macro definition.
	Replace sole use with equivalent `#ifdef S_ISLNK'.
	Inconsistency reported by Dmitry V. Levin.
d8187 1
a8187 1
2002-11-11  Jim Meyering  <jim@@meyering.net>
d8189 1
a8189 3
	* src/stat.c (usage): Transform --help items output via s/ - /   /,
	so that help2man produces properly formatted man pages.
	Reported by Herbert Xu as Debian bug #168400.
d8191 1
a8191 1
2002-11-10  Jim Meyering  <jim@@meyering.net>
d8193 1
a8193 3
	* src/ls.c (sighandler): Handle SIGTSTP specially.
	Based on suggestions from Solar Designer and Dmitry V. Levin.
	Add comments.
d8195 1
a8195 2
	* Makefile.cfg (cvs_files): Define.  From autoconf.
	(local_updates): Likewise.
d8197 1
a8197 114
	* src/ls.c (restore_default_color_handler, sigtstp_handler):
	Remove functions.
	(sighandler): New function, based on the one in sort.c.
	(main): Use sigaction, if possible; otherwise signal.
	Handle these signals:
	SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
	Don't register our handler if the signal is already being ignored.

	* src/dd.c (interrupt_handler): Use raise, rather than kill+getpid.
	* src/csplit.c (interrupt_handler): Likewise.
	* src/sort.c (sighandler): Likewise.
	(main): Declare `i' and `nsigs' to be unsigned, not int.

2002-11-09  Jim Meyering  <jim@@meyering.net>

	ls --color: restore terminal text color upon signal.
	* src/ls.c: Include "full-write.h" and <signal.h>.
	(restore_default_color, restore_default_color_handler): New functions.
	(sigtstp_handler, put_indicator_direct): New functions.
	(main) [print_with_color]: Register signal handlers.
	Patch mostly by Solar Designer and Stanislav Ievlev.

	Update from autoconf.
	* Makefile.maint (AMTAR): Remove definition.
	(update, cvs-update, po-update, do-po-update): New rules.
	(wget-update): Update (thus renaming to cvs-update).
	(automake_repo): Use anoncvs@@sources.redhat.com.

2002-11-06  Jim Meyering  <jim@@meyering.net>

	* tests/misc/Makefile.am (TESTS): Add printf-hex.

	* tests/misc/printf: Be careful to test the code in this package,
	not the shell built-in function.

	* src/printf.c (print_esc): A hexadecimal escape sequence has
	at most two hex. digits, not three.  Reported by Padraig Brady.
	(usage): Update description.
	* tests/misc/printf-hex: New file/test, for the above fix.

2002-10-07  Paul Eggert  <eggert@@twinsun.com>

	Add support for locale-specific size indications (e.g.,
	thousands-separators) and for explicit size suffixes on output.

	* doc/coreutils.texi (Block size): Say that:
	This affects display format as well as block size.
	Fractional block counts are rounded up.
	ls file size blocksize defaults to 1.
	A block size spec preceded by ' generates thousands separators.
	A suffix without a preceding integer generates suffixes.
	(tail invocation): 32k -> 32 KiB.
	(What information is listed): ls -h is now equivalent to
	ls --block-size=human, and ls -H is now equivalent to
	ls --block-size=si.  Displayed file size is now always affected by
	--block-size.

	* lib/inttostr.c, lib/inttostr.h, lib/imaxtostr.c, lib/offtostr.c,
	lib/umaxtostr.c: New files, taken from GNU tar.

	* lib/Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c,
	umaxtostr.c.
	(EXTRA_DIST): Add inttostr.c.

	* lib/human.c, lib/human.h: Rewrite to support locale-specific
	notations like thousands separators.
	Specify what includer of include.h must include beforehand.
	(human_group_digits, human_suppress_point_zero, human_autoscale,
	human_base_1024, human_SI, human_B): New enum values.
	(human_readable): Rename from human_readable_inexact; put the
	options before the sizes.  All uses changed.  The old human_readable
	function has been removed; use inttostr.h instead.
	(human_options): Renamed from human_block_size, with new signature
	that allows block sizes up to UINTMAX_MAX.  All callers changed.

	* m4/prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv,
	AC_HEADER_STDBOOL.  No need to check for limits.h since it's in
	freestanding C89.  No need to check for stdlib.h or string.h since
	autoconf does this now.

	* src/cksum.c (cksum): Use primitives from inttostr.h, not
	human.h, to print large numbers simply.
	* src/csplit.c (handle_line_error, parse_patterns): Likewise.
	* src/dd.c (print_stats, main): Likewise.
	* src/df.c (print_header): Likewise.
	* src/factor.c (print_factors): Likewise.
	* src/ls.c (print_long_format, print_file_name_and_frills): Likewise.
	* src/shred.c (dopass): Likewise.
	* src/sort.c (checkfp): Likewise.
	* src/sum.c (bsd_sum_file, sysv_sym_file): Likewise.
	* src/tail.c (xlseek): Likewise.
	* src/wc.c (write_counts, wc): Likewise.

	* src/df.c (human_output_opts): New var.
	(output_block_size): Now uintmax_t, not int, to handle larger
	block sizes.  All uses changed.
	* src/du.c: Likewise.
	* src/ls.c: Likewise.

	* src/df.c (print_header): In the header line, prefer SI to human
	representation if it's shorter; if neither is shorter, try to
	intuit what the user would prefer.

	* src/expr.c (inttostr): Remove; use new imaxtostr library
	function instead.

	* src/ls.c (file_output_block_size): New var, to distinguish
	file sizes from other sizes.
	(decode_switches): Set it.

	* src/shred.c (OUTPUT_BLOCK_SIZE): remove.
	(dopass): When printing progress, use floor for what has been done
	so far (since we should be conservative there), and ceiling for
	what needs to be done (since that's what other programs use).
d8199 1
a8199 1
2002-10-19  Jim Meyering  <jim@@meyering.net>
d8201 3
a8203 2
	* src/pinky.c (print_heading): Align TTY and Name headings.
	Reported by Karl Eichwalder.
d8205 1
a8205 1
2002-10-18  Jim Meyering  <jim@@meyering.net>
d8207 1
a8207 10
	* src/split.c (cwrite): Change type of `bytes' parameter to size_t
	Remove now-useless cast.
	(stdread): Remove function.
	(bytes_split): Use size_t instead of int.
	Use safe_read, not stdread.
	(lines_split): Likewise.
	Use memchr rather than a `while' loop.
	(line_bytes_split): Use size_t instead of int.
	Use safe_read, not stdread.
	(main): Add some FIXME comments to remind me to remove casts.
d8209 1
a8209 2
	* src/system.h (ST_BLKSIZE): Correct comment describing how to
	reproduce HPUX-11 cat failure.  From Petter Reinholdtsen.
d8211 1
a8211 1
2002-10-17  Jim Meyering  <jim@@meyering.net>
d8213 1
a8213 4
	Fix a problem that could make e.g., `cat' misbehave on systems which
	give invalid (unreasonably large) values for stat.st_blksize.
	* src/system.h (ST_BLKSIZE): Ensure that the result is in [1..4MB].
	Reported by Petter Reinholdtsen.
d8215 2
a8216 1
2002-10-14  Jim Meyering  <jim@@meyering.net>
d8218 1
a8218 7
	Specifying a printf conversion specifer as nl's separator string
	could cause nl to segfault.
	* src/nl.c (build_print_fmt): Don't include separator string
	in the printf format; it might contain `%'.
	Use a better bound on the length of the print_fmt buffer.
	(print_lineno): Print the separator here instead.
	Reported by Doug Coleman.
d8220 1
a8220 2
	* tests/misc/nl: New file/tests, including a test for the above.
	* tests/misc/Makefile.am (TESTS): Add nl.
d8222 1
a8222 2
	* tests/misc/split-l: New test, to make sure `split --lines=N' works.
	* tests/misc/Makefile.am (TESTS): Add split-l.
d8224 1
a8224 1
2002-10-13  Jim Meyering  <jim@@meyering.net>
d8226 11
a8236 1
	* Version 4.5.3.
d8238 1
a8238 1
	* src/du.c (usage): Tweak description of --dereference-args/-D.
d8240 2
a8241 3
	* src/du.c (count_entry): Also save cwd when dereferencing (via
	--dereference-args, -D) a command-line argument.
	Reported by Michal Svec.  Based on a patch by Andreas Schwab.
d8243 1
a8243 1
	* src/Makefile.am (../AUTHORS): New target/rule.
d8245 1
a8245 1
2002-10-12  Jim Meyering  <jim@@meyering.net>
d8247 2
a8248 2
	* src/paste.c (paste_parallel): Declare local, `delims_saved', to be
	of type size_t, since that's the way it's used and avoids a warning.
d8250 1
a8250 3
	* src/csplit.c (struct cstring) [len]: Declare to be unsigned int,
	since that's how it's always used and avoids a new warning from gcc.
	(read_input): Adapt to new safe_read ABI.
d8252 1
a8252 2
	* src/cut.c (cut_fields): Add a temporary size_t variable, n_bytes,
	to avoid warnings.
d8254 1
a8254 2
	* src/pinky.c (print_long_entry): fread returns size_t.
	Declare local `bytes' accordingly, to avoid warning.
d8256 2
a8257 6
	tail -c +N would perform an extra read after encountering EOF
	[this change is analogous (bytes vs. lines) to the one of 2002-01-27]
	* src/tail.c (start_bytes): Detect EOF, inform caller.
	(tail_bytes): Upon EOF in start_bytes, return immediately.
	(file_lines): Reorganize to use memrchr rather than an explicit loop.
	Adapt to new safe_read ABI.
d8259 1
a8259 1
2002-10-11  Jim Meyering  <jim@@meyering.net>
d8261 2
a8262 2
	* tests/du/deref: New file/test, for the above fix.
	* tests/du/Makefile.am (TESTS): Add deref.
d8264 1
a8264 1
2002-10-10  Jim Meyering  <jim@@meyering.net>
d8266 1
a8266 2
	* tests/ln/Makefile.am (TESTS): Add target-1.
	* tests/ln/target-1: New file/test, for the fix on 2002-10-08.
d8268 1
a8268 1
2002-10-09  Jim Meyering  <jim@@meyering.net>
d8270 2
a8271 2
	* tests/cp/backup-is-src: Ensure that certain environment variables
	are not set (e.g., SIMPLE_BACKUP_SUFFIX).  Reported by Duncan Roe.
d8273 1
a8273 3
	* tests/tail-2/big-4gb: Mark this as an expensive test; it would
	consume 4GB of disk space on systems without support for sparse files.
	Fix a logic error that'd make it `cat err' even though dd didn't fail.
d8275 2
a8276 2
	* src/dircolors.hin (.jar): Fix typo: s/;3$/;31/.
	Patch by steven@@magelico.net, forwarded by Michael Stone.
d8278 1
a8278 2
	* tests/ls/dired: Ensure that ls produces English messages.
	Patch by Alexey Vyskubov, forwarded by Michael Stone.
d8280 6
a8285 1
2002-10-08  Dmitry V. Levin  <ldv@@altlinux.org>
d8287 1
a8287 1
	* src/ln.c (main): Fix target_directory parsing when n_files == 1.
d8289 1
a8289 1
2002-10-08  Jim Meyering  <jim@@meyering.net>
d8291 1
a8291 5
	* tests/tail-2/big-4gb: Use double quotes around diagnostic.
	Fix syntax in test: use =, not ==.
	Reported by Bob Proulx.
	Change all the rest like this: grep -lR "testing framework'" .\
	|xargs perl -pi -e 's/'\''(\$0: failure in testing framework)'\''/"$1"/'
d8293 1
a8293 4
	* src/sum.c (sysv_sum_file): Adapt to new safe_read ABI.
	* src/tr.c (squeeze_filter, read_and_delete, read_and_xlate): Likewise.
	* src/tac.c (save_stdin, tac_stdin_to_mem): Likewise.
	* src/wc.c (wc): Likewise.
d8295 1
a8295 1
2002-10-07  Paul Eggert  <eggert@@twinsun.com>
d8297 9
a8305 3
	* src/cat.c (cat):
	Don't advance the write pointer past the end of the write buffer.
	* src/sort.c (begfield, limfield): Likewise.
d8307 1
a8307 1
2002-10-07  Jim Meyering  <jim@@meyering.net>
d8309 2
a8310 2
	* src/cat.c (simple_cat, cat): Adapt to new safe_read ABI.
	* src/head.c (head_bytes, head_lines): Likewise.
d8312 7
a8318 1
2002-10-06  Jim Meyering  <jim@@meyering.net>
d8320 3
a8322 3
	* src/dd.c (scanargs): Ensure that specified block sizes (specified
	via ibs=N, obs=N, and bs=N) are no larger than SSIZE_MAX.
	(skip, dd_copy): Adapt to new safe_read ABI.
d8324 1
a8324 3
	* Makefile.maint (signatures): Define.
	(%.sig): New rule.
	(announcement): Depend on $(signatures).
d8326 1
a8326 2
	* Makefile.maint (announcement): Output all URLs for detached
	signatures, not just the last one from the previous loop.
d8328 1
a8328 1
2002-10-05  Jim Meyering  <jim@@meyering.net>
d8330 17
a8346 1
	* Version 4.5.2.
d8348 2
a8349 3
	* src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS]: With `rm -i DIR',
	don't recurse into directory, DIR.  Prompted by a report from
	Leonardo Milano.
d8351 1
a8351 2
	* tests/rm/i-no-r: New file/test, for the above fix.
	* tests/rm/Makefile.am (TESTS): Add i-no-r.
d8353 4
a8356 2
	* tests/tail-2/big-4gb: New file/test, for the fix of 2002-09-27.
	* tests/tail-2/Makefile.am (TESTS): Add big-4gb.
d8358 9
a8366 1
2002-10-03  Jim Meyering  <jim@@meyering.net>
d8368 4
a8371 5
	* src/rm.c (AUTHORS): Mark translatable string with `N_ (...)'.
	* src/df.c (AUTHORS): Likewise.
	* src/du.c (AUTHORS): Likewise.
	* src/tail.c (AUTHORS): Likewise.
	* src/touch.c (AUTHORS): Likewise.
d8373 11
a8383 1
2002-10-02  Jim Meyering  <jim@@meyering.net>
d8385 5
a8389 4
	* Makefile.am (SUBDIRS): Remove `old'.
	(EXTRA_DIST): List the files in old/.
	* configure.ac (AC_CONFIG_FILES): Remove old/* names.
	Suggestion from Akim Demaille.
d8391 5
a8395 1
2002-10-01  Jim Meyering  <jim@@meyering.net>
d8397 1
a8397 1
	* src/sys2.h (SSIZE_MAX): Define.
d8399 1
a8399 1
2002-09-30  Jim Meyering  <jim@@meyering.net>
d8401 1
a8401 2
	* src/csplit.c: Don't include stdlib.h here.  It's already included
	via system.h.
d8403 2
a8404 1
2002-09-29  Jim Meyering  <jim@@meyering.net>
d8406 2
a8407 2
	* src/tr.c (find_bracketed_repeat): Rearrange pointer/integer
	expression to avoid bogus warning from gcc.
d8409 1
a8409 4
	* src/cat.c (simple_cat): Use a temporary to avoid bogus warnings.
	(cat): Declare insize and outsize to be of type size_t, not int.
	Rearrange pointer/integer expressions to avoid bogus warnings.
	(main): Declare insize and outsize to be of type size_t, not int.
d8411 1
a8411 2
	* src/tail.c (parse_options): Give a sensible diagnostic for
	an invalid byte or line count.  Reported by Mikko Tuumanen.
d8413 3
a8415 1
	* src/touch.c (main): Split a long line.
d8417 1
a8417 2
	* tests/du/Makefile.am (TESTS): Add slink.
	* tests/du/slink: New test for system.h change of 2002-08-31.
d8419 2
a8420 8
	In move mode, always first try to rename.  Before, upon failure to
	rename a directory, this code would never attempt to rename any
	other file in that directory, but would thenceforth always copy.
	On some systems (e.g., NetApp's OnTap-6.4), renaming a directory
	may fail with EXDEV, yet renaming files within that directory to
	a newly-created destination directory succeeds.
	* src/copy.c (copy_internal): Remove local, move_mode;
	use x->move_mode instead.  Based on a patch from Tom Haynes.
d8422 1
a8422 1
2002-09-28  Jim Meyering  <jim@@meyering.net>
d8424 3
a8426 4
	* src/split.c (FAIL_ONLY_ONE_WAY): New macro.
	Factor out some duplication.
	(main): Use it.
	[case 'a']: Use strtoul rather than strtol to avoid compiler warnings.
d8428 1
a8428 4
	* src/sort.c (begfield, limfield): Rearrange comparisons to avoid
	compiler warnings.
	(fillbuf, keycompare): Cast literal `-1' to size_t in comparisons,
	to avoid compiler warnings.
d8430 1
a8430 2
	* src/shred.c (dopass): Use a uintmax_t temporary to avoid bogus
	compiler warnings.
d8432 1
a8432 7
	Fix things so `mkdir -p' can create very deep directories, e.g.,
	mkdir -p $(perl -e 'print "a/" x 40000') now works.
	* src/mkdir.c (main): For --parents (-p), call make_path with the
	entire directory name, so we don't ever require that file operations
	like stat or chmod be performed on the entire command line argument.
	* makepath.c (make_path): Restore umask *before* creating the final
	component.
d8434 1
a8434 1
2002-09-27  Andreas Schwab  <schwab@@suse.de>
d8436 2
a8437 2
	* src/tail.c (tail_bytes): Change type of bytes_remaining to off_t
	to avoid overflow.  Reported by Hans Lermen.
d8439 1
a8439 1
2002-09-26  Jim Meyering  <jim@@meyering.net>
d8441 2
a8442 1
	* src/install.c (get_ids): Use strtoul, not strtol.  Remove some casts.
d8444 1
a8444 1
2002-09-25  Jim Meyering  <jim@@meyering.net>
d8446 3
a8448 3
	* src/test.c (eaccess): Change type of local `euid' from int to uid_t
	and add a cast, to avoid a warning about `signed and unsigned type in
	conditional expression'.
d8450 1
a8450 1
2002-09-22  Jim Meyering  <jim@@meyering.net>
d8452 2
a8453 2
	* src/rmdir.c: Include "dirname.h", for declaration of
	strip_trailing_slashes.
d8455 1
a8455 2
	* src/stat.c (PRIdMAX, PRIuMAX): Remove definitions.
	Now they're defined through system.h.
d8457 2
a8458 3
	* src/cp-hash.c, src/dd.c, src/df.c, src/du.c, src/ls.c,
	* src/stat.c, src/wc.c: Remove all inclusions of inttypes.h,
	since it's already included from sys2.h via system.h.
d8460 1
a8460 1
	* Use automake-1.6f.  Regenerate dependent files.
d8462 1
a8462 1
	* src/Makefile.am (PERL): Remove duplicate definition.
d8464 1
a8464 3
	fmt's -s, -t, -c options didn't work properly for long lines.
	Since get_line may end up calling put_paragraph (for long lines),
	be sure to set global, `other_indent', before it is used there.
d8466 1
a8466 5
	* src/fmt.c (set_other_indent): New function, factored out of...
	(get_paragraph): ... here.  Call it.
	(get_line): Call set_other_indent before calling flush_paragraph,
	which calls fmt_paragraph, which in turn calls put_paragraph,
	which uses other_indent.
d8468 1
a8468 2
	* tests/fmt/Makefile.am (TESTS): Add long-line.
	* tests/fmt/long-line: New file/test, for the above fix.
d8470 1
a8470 1
2002-09-21  Jim Meyering  <jim@@meyering.net>
d8472 1
a8472 4
	* src/od.c: No longer include deprecated <values.h>.
	It was required solely for now-removed reference to BITSPERBYTE.
	* src/install.c: Likewise.
	Suggestion from Bruno Haible.
d8474 3
a8476 1
2002-09-06  Andreas Schwab  <schwab@@suse.de>
d8478 1
a8478 2
	`rmdir -p dir-specified-with-trailing-slash/' would fail.
	* src/rmdir.c (remove_parents): Strip trailing slashes.
d8480 2
a8481 1
2002-09-20  Jim Meyering  <jim@@meyering.net>
d8483 1
a8483 2
	* tests/rmdir/t-slash: New file/test, for the above fix.
	* tests/rmdir/Makefile.am (TESTS): Add t-slash.
d8485 1
a8485 2
	* Makefile.maint (announcement): Arrange to gpg-sign the message.
	Add a URL for each detached signature file.
d8487 1
a8487 1
2002-09-07  Bruno Haible  <bruno@@clisp.org>
d8489 1
a8489 1
	* configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation.
d8491 1
a8491 1
2002-09-18  Jim Meyering  <jim@@meyering.net>
d8493 2
a8494 5
	`od -t x8' used the wrong (`l'-prefixed) printf format.
	Likewise for the o8 and u8 formats.
	* src/od.c (ISPEC_TO_FORMAT): Define macro.
	(decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG.
	Reported by Arun Sharma.
d8496 2
a8497 1
2002-09-17  Jim Meyering  <jim@@meyering.net>
d8499 1
a8499 2
	* src/sys2.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary.
	From gettext's intl/loadmsgcat.c.
d8501 1
a8501 2
	* tests/od/x8: New file/test, for the above fix.
	* tests/od/Makefile.am (TESTS): Add x8.
d8503 1
a8503 1
2002-09-15  Jim Meyering  <jim@@meyering.net>
d8505 1
a8505 1
	* Use autoconf-2.54.  Regenerate dependent files.
d8507 2
a8508 2
	* src/csplit.c (get_format_width): Add cast to avoid
	warning about `signed and unsigned type in conditional expression'.
d8510 1
a8510 1
2002-09-14  Jim Meyering  <jim@@meyering.net>
d8512 3
a8514 3
	* src/who.c (print_user): Change type of local to size_t
	to avoid warnings about `comparison between signed and unsigned'.
	* src/ptx.c (generate_all_output): Likewise.
d8516 1
a8516 2
	* src/dd.c (main, skip): Add casts to avoid warnings about
	`comparison between signed and unsigned'.
d8518 2
a8519 2
	* src/id.c (print_full_info, print_group_list): Add casts to avoid
	warnings about `signed and unsigned type in conditional expression'.
d8521 6
a8526 4
	* src/md5sum.c: Change type of global, digest_hex_bytes, to size_t
	to avoid warnings about `comparison between signed and unsigned'.
	(split_3): Change parameter names to be readable and add comment.
	Clean up the test for whether a line may be ignored.
d8528 3
a8530 1
2002-09-13  Jim Meyering  <jim@@meyering.net>
d8532 1
a8532 4
	* src/printf.c (main): Handle leading command line argument of `--'.
	Reported by Raul: DervishD <raul@@pleyades.net>
	* tests/misc/printf: New file: test for the above.
	* tests/misc/Makefile.am (TESTS): Add printf.
d8534 1
a8534 3
	* src/date.c (usage): Explain that %S's range of [0..60] is required --
	rather than 0..59 -- to accommodate the occasional positive leap second.
	Reported by Richard Neill.
d8536 1
a8536 1
2002-09-12  Jim Meyering  <jim@@meyering.net>
d8538 4
a8541 2
	* src/Makefile.am (nanosec_libs): Define.
	(sleep_LDADD, tail_LDADD): Use it here.
d8543 1
a8543 6
	Factor nanosleep-related code into ../lib/xnanosleep.c.
	* src/sleep.c: Include xnanosleep.h.
	Factor out fenv.h-related code.
	(timespec_subtract): Remove function.
	(main): Remove code that deals with computing start and stop times
	as well as the loop around nanosleep.  Now that's in xnanosleep.c.
d8545 5
a8549 10
	Allow S (in --sleep-interval=S) to be a floating point value.
	* src/tail.c: Include xnanosleep.h and xstrtod.h.
	Move declaration of global variable, sleep_interval, to ...
	(main): ...here.
	(usage): Update description of --sleep-interval option.
	(tail_forever): New parameter, sleep_interval.  Update caller.
	Use xnanosleep, rather than sleep.
	(parse_options): New parameter, sleep_interval.  Update caller.
	Use xstrtod, now that we accept floating point values.
	Prompted by a patch from Augey Mikus.
d8551 1
a8551 1
2002-09-06  Jim Meyering  <jim@@meyering.net>
d8553 6
a8558 2
	* src/remove.c (prompt): Change comment to give a better note to
	translators.  From Michael Piefel.
d8560 1
a8560 1
2002-09-02  Jim Meyering  <jim@@meyering.net>
d8562 2
a8563 2
	* README: A good problem report/patch includes diffs against
	the most recent test release.
d8565 1
a8565 2
	* src/pathchk.c (NEED_PATHCONF_WRAPPER): Define.
	(pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
d8567 2
a8568 3
	* src/kill.c (print_table_row): Use an unsigned type for widths
	to avoid warning about comparison between signed and unsigned.
	(list_signals): Likewise.
d8570 1
a8570 4
	* src/od.c (skip): Add a cast to avoid warning about comparison
	between signed and unsigned.
	* src/install.c (get_ids): Likewise.  Also rearrange range-checking
	comparisons to make them more readable.
d8572 1
a8572 1
2002-09-01  Jim Meyering  <jim@@meyering.net>
d8574 1
a8574 1
	* Version 4.5.1.
d8576 2
a8577 1
2002-08-31  Jim Meyering  <jim@@meyering.net>
d8579 1
a8579 5
	Symlinks were always reported as using 0 blocks.
	* src/system.h (ST_NBLOCKS): Don't depend on file type.
	This reverts the change of 2000-01-30.
	Based on a report and patch from Neil Brown via Michael Stone.
	This fixes Debian Bug#156358.
d8581 4
a8584 3
	* Most files: Change `exit (0)' to `exit (EXIT_SUCCESS)',
	`exit (1)' to `exit (EXIT_FAILURE)', and
	`usage (1)' to `usage (EXIT_FAILURE)'.
d8586 1
a8586 7
	* chgrp.c, chmod.c, chown.c, chroot.c, cp.c, date.c, dd.c, du.c,
	* hostname.c, id.c, install.c, ln.c, mkdir.c, mkfifo.c, mknod.c,
	* nice.c, pinky.c, printf.c, pwd.c, shred.c, sleep.c, stty.c,
	* su.c, tac-pipe.c, tail.c, tee.c, touch.c, uname.c, uptime.c,
	* users.c, who.c: Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
	But don't change `error (0, ...' to `error (EXIT_SUCCESS, ...', since
	error never exits successfully.
d8588 1
a8588 1
2002-08-29  Jim Meyering  <jim@@meyering.net>
d8590 2
a8591 2
	* src/remove.c (remove_cwd_entries): Use closedir (not CLOSEDIR)
	when ignoring any return value.
d8593 1
a8593 7
	* src/remove.c (remove_cwd_entries): Detect and diagnose readdir
	failures.  On some systems (at least EMC Celerra and Solaris5.8),
	this appears to be necessary.
	(is_empty_dir): Likewise.  Also, always close directory handle.
	* src/ls.c (print_dir): Likewise.
	(print_dir): Rename local variable: reading -> dirp.
	Reported by Mike Coleman.
d8595 2
a8596 1
2002-08-28  Jim Meyering  <jim@@meyering.net>
d8598 1
a8598 2
	* src/remove.c (remove_cwd_entries): Use CLOSEDIR, not closedir.
	Give a diagnostic and fail if closedir fails.
d8600 4
a8603 1
2002-08-26  Jim Meyering  <jim@@meyering.net>
d8605 3
a8607 3
	* Makefile.am (THANKS-to-translators): New rule.
	(EXTRA_DIST): Add both THANKS-to-translators and THANKStt.in.
	* THANKStt.in: New file.
d8609 1
a8609 6
	* src/cat.c (close_stdout_wrapper): New, kludgey, function and
	file-scoped global.
	(main): Register it with atexit.
	Close STDOUT_FILENO, to avoid a problem when writing to
	/dev/audio on at least Solaris 5.7 and 5.8 systems.
	Reported by Shing-Shong Shei.
d8611 1
a8611 1
2002-08-25  Jim Meyering  <jim@@meyering.net>
d8613 1
a8613 6
	* src/cat.c (main): Close STDIN_FILENO rather than a literal `0'.
	* src/tac.c (main): Likewise.
	* src/tail.c (main): Likewise.
	* src/tee.c (main): Likewise.
	* src/tr.c (main): Likewise.
	* src/wc.c (main): Likewise.
d8615 10
a8624 1
2002-08-20  Jim Meyering  <jim@@meyering.net>
d8626 1
a8626 1
	* tests/mv/setup: Rewrite not to use `: ${VAR=not_set}' paradigm.
d8628 2
a8629 1
2002-08-10  Paul Eggert  <eggert@@twinsun.com>
d8631 1
a8631 2
	* src/nohup.sh: Don't use "exec --"; it's not portable and
	shouldn't be needed.
d8633 3
a8635 1
2002-08-09  Jim Meyering  <jim@@meyering.net>
d8637 6
a8642 4
	* src/pr.c (main): Don't ignore -COLUMN if it's the last option.
	(usage): Clarify help text for the -COLUMN option.
	Patch by Padraig Brady.
	* tests/pr/Test.pm [col-last]: New test for the above.
d8644 1
a8644 2
	* configure.ac: Start with version 4.5.1, chosen so that it's larger
	than the latest version numbers of the component packages.
d8646 4
a8649 2
	* man/Makefile.am (check-x-vs-1): Set and export PATH so we use
	programs in ../src.
d8651 1
a8651 1
2002-08-08  Jim Meyering  <jim@@meyering.net>
d8653 2
a8654 4
	* src/date.c: Guard inclusion of <langinfo.h> with
	`#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
	* src/sort.c: Likewise.
	Patch by GOTO Masanori.
d8656 1
a8656 1
2002-08-05  Paul Eggert  <eggert@@twinsun.com>
d8658 2
a8659 4
	Fix some minor time-related bugs with POSIX time arguments.
	Some valid time stamps were being rejected (notably -1, and
	time stamps before 1900 on 64-bit hosts).  And some invalid
	time stamps were being accepted, e.g. September 31.
d8661 1
a8661 3
	* src/date.c (main): Adjust to posixtime signature change.
	* src/touch.c (main): Likewise.  Remove unnecessary initialization.
	Use localtime, not posixtm, to warn about obsolete "touch".
d8663 7
a8669 1
2002-08-05  Jim Meyering  <jim@@meyering.net>
d8671 1
a8671 1
	* tests/misc/Makefile.am (TESTS): Add nice and pathchk1.
d8673 3
a8675 1
2002-08-04  Jim Meyering  <jim@@meyering.net>
d8677 1
a8677 2
	* src/Makefile.am (check-README): New target/rule.
	(check): Depend on it.
d8679 4
a8682 1
	* configure.ac (AC_CONFIG_FILES): Add old/Makefile and old/*/Makefile.
d8684 2
a8685 1
2002-08-03  Jim Meyering  <jim@@meyering.net>
d8687 1
a8687 3
	* Makefile.am (SUBDIRS): Add old.
	* old/: New directory, containing legacy ChangeLog* and NEWS files
	from the fileutils, sh-utils, and textutils packages.
d8689 2
a8690 1
	* src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false.
d8692 1
a8692 1
2002-08-02  Paul Eggert  <eggert@@twinsun.com>
d8694 7
a8700 1
	* NEWS, doc/coreutils.texi: uniq now obeys LC_COLLATE.
d8702 1
a8702 9
	* src/uniq.c: Include hard-locale.h, xmemcoll.h.
	(hard_LC_COLLATE): New var.
	(different): Args are now char *, not const char *.
	Use xmemcoll instead of memcmp to compare lines, so that
	LC_COLLATE has effect.  However, use memcmp if it is an
	easy locale.
	(check_file): Do not include newline in comparison, so that
	xmemcoll has a byte to stomp on temporarily.
	(main): Set hard_LC_COLLATE.
d8704 1
a8704 1
2002-07-29  Jim Meyering  <jim@@meyering.net>
d8706 1
a8706 1
	* Makefile.am (SUBDIRS): Remove djgpp, for now.
d8708 8
a8715 1
2002-07-20  Jim Meyering  <jim@@meyering.net>
d8717 1
a8717 3
	* Makefile.am (false.c): Convert only the final EXIT_SUCCESS
	into EXIT_FAILURE.  Otherwise, false --help and false --version
	would fail.
d8719 10
a8728 1
2002-07-08  Jim Meyering  <jim@@meyering.net>
d8730 1
a8730 2
	* src/Makefile.am (uninstall-local): Search for @@GNU_PACKAGE@@,
	rather than the hard-coded `sh-utils'.
d8732 7
a8738 1
2002-07-01  Jim Meyering  <jim@@meyering.net>
d8740 4
a8743 4
	* configure.ac: Merge the three files from fileutils,
	textutils, and sh-utils.
	* Makefile.am: Likewise.
	* src/Makefile.am: Likewise.
@


1.1.1.4
log
@Import of GNU sort from coreutils CVS (trimmed)
@
text
@a0 2471
2004-08-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* tests/install/basic-1: Test for the -d regression.

2004-08-11  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/install.c (main): Fix -d regression introduced with
	--target-directory support at 2004-06-25.

2004-08-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/copy.c (copy_internal): When preserving links, unlink
	a destination with link count greater than one.  This is so
	that commands like "cp -a" don't get confused when copying into
	a destination that already contains many hard links.  Problem
	reported by Tim Waugh in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00053.html

2004-08-10  Paul Eggert  <eggert@@cs.ucla.edu>

	Convert all files to UTF-8.
	* tests/fmt/basic (8-bit-pfx): Use UTF-8, not Latin-1.
	* tests/sort/Test.pm (16a): Likewise.
	* tests/uniq/Test.pm (8): Likewise.
	* tests/misc/printf-hex: Use ASCII, not Latin-1.

	* NEWS: Document "sort -o -" and "tee -" POSIX-conformance fixes.
	* src/shred.c (usage): "-" is an operand, not an option.
	* src/sort.c (die, xfopen, mergefps, first_same_file, merge):
	A null file arg means standard output.
	(main): "-o -" means to write to a file named "-",
	not to standard output.
	* src/tee.c (usage, tee): "tee -" writes to standard output, not
	to a file named "-".

2004-08-10  Dmitry V. Levin  <ldv@@altlinux.org>

	* src/install.c (change_timestamps): Fix int->bool conversion
	bugs introduced on 2004-07-29.

2004-08-09  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (wipename): Work even if the directory is writeable
	and not readable.  Prefer write access, since this should work
	better with fdatasync.

	* src/csplit.c (xalloc_die): New function.
	(main): Remove now-obsolete initialization of xalloc_fail_func.

	* src/md5sum.c: Adjust to sha->sha1 renaming.

2004-08-08  Dmitry V. Levin  <ldv@@altlinux.org>

	Minor code cleanup.
	* src/readlink.c (canonicalize_fname): Remove unneeded proxy function.
	(can_mode): Make variable local.

2004-08-07  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/system.h (O_BINARY) [!O_BINARY && defined O_BINARY]:
	Do not define, to avoid annoying compiler messages on QNX 6.3.
	Problem reported by Johan in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00050.html

2004-08-04  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/system.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX):
	Define to a concatenation of string literals, not to an expression;
	needed for concatenation contexts.
	(INTMAX_MAX, INTMAX_MIN): New macros.

	* src/stat.c (print_stat): Don't assume st_ino / st_dev fits in
	unsigned long; this isn't true for st_ino on Solaris 9.

2004-08-03  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uname.c: Do not depend on HAVE_SYSCTL when deciding
	whether to include files.  Include <sys/param.h> if
	HAVE_SYS_PARAM_H (not HAVE_SYSCTL).
	(main) [defined __POWERPC__]: Add a kludge to work around a
	Mac OS X bug, so that uname -p defaults to "powerpc" if
	sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
	fails.  Problem reported by Petter Reinholdtsen in:
	http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html

	* src/uniq.c (hard_LC_COLLATE, ignore_case, different, check_file,
	main): Use bool for booleans.
	(writeline, check_file): Use uintmax_t for line counts.
	(check_file): Check for and report line number overflow,
	when that matters.
	* src/wc.c (iswspace, wc): Use to_uchar rather than a cast.
	(print_lines, print_words, print_chars, print_bytes, print_linelength,
	have_read_stdin, wc, wc_file, main):
	Use bool for booleans.
	(exit_status): Remove.
	(wc, wc_file): Return bool status.  All callers changed.
	* src/who.c (scan_entries): 0 -> STDIN_FILENO.
	* src/whoami.c (main): Print uids using unsigned long int, not
	unsigned int.

	* src/unexpand.c: Int cleanup and minor reorganization to be more
	like src/expand.c.
	Include quote.h, xstrndup.h.
	(TAB_STOP_SENTINEL): Increase from INT_MAX to INTMAX_MAX.
	(convert_entire_line, have_read_stdin, parse_tabstops, next_file,
	unexpand, main):
	Use bool for booleans.
	(tab_size, tab_list, add_tabstop, validate_tabstops, unexpand):
	Use uintmax_t for column counts.
	(first_free_tab, validate_tabstops, unexpand): Use size_t for sizes.
	(add_tabstop, parse_tabstops, main): Don't reserve UINTMAX_MAX
	as a tab stop.
	(parse_tabstops): Don't use ISBLANK on possibly-signed char.
	Detect overflow in tab stop string.
	(next_file, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0.
	(unexpand): Concatenate input files the same way expand does.

	* src/touch.c (no_create, use_ref, posix_date, amtime_now,
	touch, main): Use bool for booleans.
	(main): Avoid integer overflow when given more than INT_MAX
	options.
	* src/tsort.c (struct item, n_strings): Use size_t for sizes.
	(have_read_stdin, count_items, scan_zeros, detect_loop,
	recurse_tree, walk_tree, tsort, main):
	Use bool for booleans.
	(exit_status): Remove.
	(tsort): Return a success flag instead of storing into a global.
	(main): Use it.
	* src/tty.c (silent, main): Use bool for booleans.
	(main): 0 -> STDIN_FILENO.
	* src/uname.c (print_element): Use bool for booleans.

	* src/test.c (TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND):
	Remove.  All uses replaced by C99 boolean primitives.
	(TEST_TRUE, TEST_FALSE): New constants, for readability.
	(test_unop, binop, unary_operator, binary_operator, two_arguments,
	three_arguments, posixtest, expr, term, and, or, is_int, age_of,
	one_argument, main): Use bool for booleans.
	(advance, unary_advance): Now inline procedures rather than a macros.
	(is_int): Renamed from isint, to avoid namespace clash with ctype.h.
	(term, and, or): When it's easy, loop instead of recursing.
	(term): Avoid integer overflow if there are INT_MAX-3 args (!).
	(binary_operator, unary_operator): Simplify by systematically rewriting
	true==FOO to FOO (where FOO is a boolean).
	(unary_operator): Don't consider a file to be a regular file
	merely because its mode&S_IFMT is zero.  Just use S_ISREG.
	Remove unnecessary casts.  Remove ifdefs for things like
	S_ISSOCK that are no longer needed, since stat-macros.h always
	defines them now.

	* src/tac-pipe.c (buf_init_from_stdin, find_bol, tac_mem):
	Use bool for booleans.
	(buf_init_from_stdin, buf_free, find_bol, print_line):
	Use size_t for sizes.
	* src/tac.c (separator_ends_record, tac_seekable, tac_file,
	tac_stdin, tac_stdin_to_mem, main): Use bool for booleans.
	(match_length, G_buffer_size, tac_seekable, main): Use size_t for sizes.
	(tac_seekable): Use ptrdiff_t for pointer subtraction.
	Report an error if the result is out of range.
	(tac_seekable, main): Check for integer overflow in buffer size
	calculations.
	(main): Remove unnecessary casts.

	* src/su.c (run_shell): Pass a new n_additional_args arg, so that
	the callee doesn't have to count 'em.  All callers changed.
	Don't allocate more space for the arg vector than we'll need.
	Use memcpy to copy the args rather than rolling our own loop.
	Use size_t for sizes.
	(fast_startup, simulate_login, change_environment, log_su,
	correct_password, restricted_shell, main): Use bool for booleans.
	(longopts): Don't assume change_environment is an int.
	Use NULL, not 0, for pointers.
	(xsetenv): New function, replacing xputenv and concat.
	All callers changed.
	(elements): Remove; no longer needed.
	(log_su, correct_passwd, main): Prefer !x to x==NULL.
	(log_su): 2 -> STDERR_FILENO.
	(modify_environment, main): Don't assume that getenv's returned value
	has an indefinite lifetime.
	(modify_environment): Allocate a larger environ.
	(main): Remove an impossible 'case 0'; if it happens now, it'll
	get diagnosed.  Don't assume getpwnam results outlive endpwent.
	Check for null or empty pw_name, pw_dir and for null pw_passwd.

	* src/stty.c (VA_START): Remove.  All callers now use va_start.
	(_POSIX_VDISABLE): Remove unnecessary cast.
	(struct control_info, visible): Use cc_t for control chars.
	(struct control_info): Use size_t for sizes.
	(recover_mode, set_mode, display_speed, display_window_size,
	valid_options, main, display_changed):
	Use bool for booleans.
	(integer_arg): Return unsigned long int, not long int.
	Accept new max arg; all callers changed, to specify a maximum
	value for integer parameters instead of silently overflowing.
	(wrap): Do not overrun the stack buffer if the output contains
	more than 1024 bytes.  Instead, malloc a buffer.
	(main): Remove a "what is this?!?" FIXME.  Nobody knows what it is.
	Remove unnecessary casts.
	(set_control_char): Allow int values only up to cc_t range.
	(screen_columns): Don't reject INT_MAX.
	(display_changed, display_all, display_speed, recover_mode):
	Don't assume cc_t fits in int.

	* src/remove.h: Add copyright notice.
	(struct rm_options): Use bool for booleans.
	* src/rmdir.c (empty_paths, ignore_fail_on_non_empty, verbose,
	errno_rmdir_non_empty, remove_parents, main): Likewise.
	* src/sum.c (have_read_stdin, bsd_sum_file, sysv_sum_file,
	main): Likewise.
	(main): Don't dump core if invoked with argv[0]==NULL.
	* src/tee.c (tee, append, ignore_interrupts, main, tee):
	Use bool for booleans.
	(tee): Use ssize_t for read returns.

	* src/ptx.c: Add a FIXME mentioning that there are many
	unchecked integer overflows in this file.
	(gnu_extensions, auto_reference, input_reference, right_reference,
	ignore_case, initialize_regex, fix_output_parameters,
	output_one_roff_line, output_one_text_line, output_one_dumb_line, main):
	Use bool for booleans.
	(SKIP_SOMETHING, compare_words, digest_break_file,
	find_occurs_in_text, fix_output_parameters):
	Use to_uchar instead of a caset.
	(print_field): Rewrite to avoid cast.

	* src/printf.c (posixly_correct): Use bool for booleans.
	(verify, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0.
	(STRTOX): Rewrite to avoid casts.
	(print_esc_char): Arg is char, not int.
	* src/readlink.c (canonicalize): Remove.  All uses now merely inspect
	can_mode.
	(no_newline, verbose): Use bool for booleans.
	(can_mode): Now of type int; use -1 to denote otherwise-uninitialized.
	* src/shred.c (struct Options, main): Use bool for booleans.
	(isaac_seed_data, fillpattern, wipefile): Rewrite to avoid casts.
	* src/split.c (cwrite, bytes_split, lines_split, line_bytes_split):
	Use bool for booleans.
	* src/stat.c (G_fail): Remove.
	(print_statfs): Print various gotta-be-nonnegative values using
	unsigned long int, not long int or int.
	(do_statfs, do_stat): Return a boolean success flag.
	(do_stat, main): Use bool for booleans.

	* src/pr.c: Add a FIXME mentioning that there are many
	unchecked integer overflows in this file.
	(TRUE, FALSE): Remove.  All uses replaced by true and false.
	(struct COLUMN, read_line, print_page, print_stored, open_file,
	skip_to_page, init_fps, parallel_files, align_empty_cols,
	empty_line, FF_only, explicit_columns, extremities, keep_FF,
	print_a_FF, print_a_header, use_form_feed, have_read_stdin,
	print_across_flag, storing_columns, balance_columns,
	truncate_lines, join_lines, untabify_input, failed_opens,
	numbered_lines, skip_count, use_esc_sequence, use_cntrl_prefix,
	double_space, ignore_failed_opens, use_col_separator,
	pad_vertically, last_line, main, init_parameters, skip_read,
	read_line, print_stored):
	Use bool for booleans.
	(struct COLUMN, char_to_clump, store_char, print_char):
	Use char for chars.
	(clump_buff, print_clump): Use char[], not int[], for an array whose
	elements are always chars.
	(first_last_page, main, getoptarg, balance, add_line_number,
	char_to_uclump): Remove unnecessary casts.
	(init_parameters): Allocate chars, not ints, for clump_buff.
	(print_char): Use to_uchar before invoking ISPRINT.
	(char_to_clump): Convert to unsigned char before invoking ISPRINT.

	* src/nohup.c (main): Use bool for booleans.
	* src/paste.c (paste_parallel, paste_serial, main): Likewise.
	* src/pathchk.c (validate-path, main, portable_chars_only): Likewise.
	(portable_chars_only): Use to_uchar rather than a cast.
	* src/printenv.c (main): Use bool for booleans.
	Do not assume that the environ has at most one matching entry
	for each option (integer overflow was possible otherwise).

	* src/od.c (FMT_BYTES_ALLOCATED): Now an enum, not a decimal
	constant.  Do not assume PRIdMAX etc. are strings of length 3 or
	less.
	(struct tspec): Use it.  fmt_string is now an array, not
	a pointer, as there's little point to the indirection here.
	(struct tspec, flag_dump_strings,
	traditional, flag_pseudo_start, limit_bytes_to_format,
	abbreviate_duplicate_blocks, have_read_stdin, simple_strtoul,
	decode_one_format, open_next_file, check_and_close,
	decode_format_string, skip, write_block, read_char, read_block,
	parse_old_offset, dump, dump_strings, main):
	Use bool for booleans.
	(struct tspec): Use void *, not char *, for generic pointers.
	(bytes_to_oct_digits, bytes_to_signed_dec_digits,
	bytes_to_unsigned_dec_digits, bytes_to_hex_digits):
	Use char, not unsigned int, since char suffices.
	(print_s_char, print_char, print_s_short, print_short,
	print_int, print_long, print_long_long, print_float,
	print_double, print_long_double): Rewrite to avoid casts.
	These now take void * arguments, instead of char *.
	Use the same body for all functions, except for the choice
	of type.  Assume C89 to simplify handling of signed char.
	(dump_hexl_mode_trailer, print_named_ascii, print_ascii):
	Rewrite to avoid casts.
	(print_named_ascii, print_ascii): Now takes void *, not char *.
	(decode_one_format): Use int for printf field widths, not
	unsigned int.  Pass void * to subsidiary printers,
	not char *.  Simplify handling of floating-point formats
	by factoring out common code dealing with precision and field width.
	(decode_format_string): Avoid need for temporary copy of
	each decoded struct tspec.
	(get_lcm): Remove unnecessary cast.
	(main): Fix bug where more than INT_MAX failed decodes were ignored.

2004-08-02  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/nl.c (TRUE, FALSE): Remove; all uses changed to true, false.
	(enum number_format): Remove.
	(FORMAT_RIGHT_NOLZ, FORMAT_RIGHT_LZ, FORMAT_LEFT): Now strings,
	not enum values.
	(DEFAULT_SECTION_DELIMITERS): Now an array constant, not a macro.
	(section_del): Now const.
	(print_fmt): Remove.
	(starting_line_number, page_incr, blank_join, line_no,
	print_lineno, proc_text, main):
	Use intmax_t for line numbers.
	(reset_numbers, have_read_stdin, build_type_arg, nl_file, main):
	Use bool for booleans.
	(lineno_format): Now a string, not an enum value.
	(build_print_fmt): Remove.  All calls removed.  This work is
	now done within print_lineno.
	(build_type_arg): Use size_t for sizes.
	(print_lineno): Check for line number overflow.
	(proc_text, main): Remove unnecessary cast.

	* src/ln.c (symbolic_link, interactive, remove_existing_files,
	verbose, hard_dir_link, dereference_dest_dir_symlinks,
	do_link, main): Use bool for booleans.

	* src/ls.c (struct fileinfo, file_interesting,
	extract_dirs_from_files, color_symlink_as_referent,
	FILE_OR_LINK_MODE, sort_reverse, print_owner, print_group,
	numeric_ids, print_block_size, dired, print_with_color,
	check_symlink_color, print_inode, recursive, immediate_dirs,
	all_files, really_all_files, qmark_funny_chars,
	print_dir_name, format_needs_stat, format_needs_type, visit_dir,
	main, decode_switches, parse_ls_color, print_dir, file_interesting,
	gobble_file, make_link_path, basename_is_dot_or_dotdot,
	extract_dirs_from_files, print_long_format):
	Use bool for booleans.
	(dir_defaulted): Remove; no longer needed.
	(main): Use int to count files, since it suffices for argv.
	Rewrite to avoid need for dir_defaulted.
	(main, print_dir, gobble_file, get_link_name,
	xstrcoll):
	Set exit status to EXIT_SUCCES/EXIT_FAILURE rather than 0/1.
	(decode_switches): Put back check for ws.ws_col <= SIZE_MAX.
	Remove unnecessary cast to int.  Use int instead of unsigned
	int to count from 0 to 1.
	(get_funky_string, print_type_indicator): Use char for bytes, not int.
	(make_link_path): Use NULL for null pointers.
	(quote_name): Use to_uchar instead of cast.

	* src/id.c (use_name, main, print_user, xgetgroups, print_group_list,
	print_full_info): Use bool for booleans.
	(problems): Remove, replacing with....
	(ok): New var (inverted from old sense).
	(print_user, print_group, print_full_info):
	Print uids/gids with %lu, not %u.
	(xgetgroups): Don't run out of memory if getgroups or getugroups
	returns -1.
	* src/setuidgid.c (main): Print uids/gids with %lu, not %ld.

	* src/factor.c (wheel_tab): Use unsigned char instead of unsigned
	int, since it suffices.
	(factor, print_factors): Use size_t for sizes.
	(print_factors, do_stdin, main): Use bool for booleans.
	* src/fold.c (TAB_WIDTH): New macro; use it instead of "8".
	(fold_file, main): Use bool for booleans.
	(fold_file, main): Use size_t for sizes.
	(main): Allow -w options up to SIZE_MAX - TAB_WIDTH - 1, instead
	of prohibiting widths greater than INT_MAX.
	* src/head.c (presume_input_pipe, print_headers, have_read_stdin,
	write_header, elide_tail_bytes_pipe, elide_tail_bytes_file,
	elide_tail_lines_pipe, elide_tail_lines_seekable,
	elide_tail_lines_file, head_bytes, head_lines, head, head_file,
	string_to_integer, main):
	Use bool for booleans.
	(main): Rewrite to avoid cast.

	* src/csplit.c (struct line): Use size_t for sizes.
	(main): Remove unnecessary cast.
	* src/cut.c (cut_fields): Use to_uchar rather than a cast.
	* src/cut.c (cut_file, main): Use bool for booleans.
	* src/date.c (show_date, rfc_format, batch_convert, main): Likewise.
	* src/env.c (main): Likewise.
	* src/expr.c (nextarg): Likewise.
	* src/env.c (main): Remove unused and nonstandard envp arg.

	* src/fmt.c (COST, MAXWORDS): Add a comment describing some of
	fmt's arbitrary limits.
	(TRUE, FALSE): Remove; all uses changed to (true, false).
	(main): Use bool for booleans.
	Limit maximum width to MAXCHARS / 2.  Use xstrtoul, not xstrtol,
	to parse width.
	(copy_rest): Remove unnecessary cast.
	(get_prefix): Rewrite to avoid cast.
	(check_punctuation): Use char *, not unsigned char *; C89 requires
	this.  Avoid off-by-one buffer read overrun when line is empty.
	(flush_paragraph): Don't assume wptr-parabuf is <= INT_MAX.
	Remove unnecessary casts.
	* tests/fmt/basic (wide-1, wide-2, bad-suffix): Adjust to above
	changes.

	* src/expand.c (convert_entire_line, have_read_stdin, parse_tabstops,
	next_file, expand, main):
	Use bool for booleans.
	(tab_size, tab_list, add_tabstop, parse_tabstops, validate_tabstops,
	expand, main):
	Use uintmax_t for column counts.
	(add_tabstop): Don't reserve -1 (now UINTMAX_MAX) as a special value.
	All callers changed.
	(parse_tabstops): Don't pass a negative char to isblank.
	Avoid memory leak with large tab stops.
	(validate_tabstops, expand): Don't assume number of tab stops is
	<= INT_MAX.
	(next_file, main): Use EXIT_SUCCESS/EXIT_FAILURE rather than 0/1 when
	storing values into exit_status.
	(expand): Use same pattern as unexpand for reading chars.
	Report an error when input line is too long, instead of silently
	screwing up.  Do not mishandle tab stops when backspacing left
	over start of line.

	* src/dircolors.c (have_read_stdin, append_quoted,
	dc_parse_stream, dc_parse_file, main): Use bool for booleans.
	(dc_parse_stream): Use enum for state, rather than int.
	Use ssize_t to store getline result.

	* src/dd.c (translation_needed, parse_integer, scanargs,
	apply_translations, char_is_saved, swab_buffer, skip_via_lseek):
	Use bool for booleans.
	(translate_buffer): Use to_uchar rather than a cast.
	(swab_buffer, copy_simple, copy_with_unblock):
	Use size_t for sizes.

	* src/seq.c (equal_width, valid_format, main): Use bool for booleans.
	* src/sleep.c (apply_suffix): Likewise.
	* src/tail.c (struct File_spec, reopen_inaccessible_files, count_lines,
	forever, from_start, print_headers, have_read_stdin, valid_file_spec,
	write_header, file_lines, pipe_lines, pipe_bytes, recheck,
	tail_forever, tail_bytes, tail_lines, tail, tail_file,
	parse_obsolescent_option, parse_options, main): Likewise.
	* src/sleep.c (apply_suffix): Invert sense of result.
	Use int (not unsigned int) for multiplier, as this generates better
	code with some compilers.  Simplify code a bit.
	* src/tail.c (struct File_spec, max_n_unchanged_stats_between_opens,
	parse_options): Use uintmax_t, not unsigned int or unsigned long int,
	for state counters.
	(tail_bytes, tail_lines): Redo test of return value (-1, 0, 1) to
	make it a bit clearer.

	* src/hostname.c: Include "xgethostname.h".
	(xgethostname): Remove decl; xgethostname.h has it.
	(sethostname) [!defined(HAVE_SETHOSTNAME) && defined(HAVE_SYSINFO)
	&& defined (HAVE_SYS_SYSTEMINFO_H) && defined(HAVE_LIMITS_H)]: Use
	prototypes rather than K&R form.  Assume any negative value from
	sysinfo denotes failure, not just -1.
	(main): Simplify use of sethostname.

	* src/pinky.c (include_idle, include_heading, include_fullname,
	include_project, include_plan, include_home_and_shell, do_short_format,
	include_where, main): Use bool for booleans.
	(count_ampersands, create_fullname, scan_entries, short_pinky):
	Use size_t for sizes.
	(create_fullname): Check for overflow in size calculations.
	(idle_string): Don't assume that the number of idle days
	is less than 10**8 and/or INT_MAX/(24*60*60).
	(main): No need to pass a non-NULL last arg to getopt_long.
	* src/uptime.c (print_uptime, uptime): Use size_t for sizes.
	(print_uptime): Remove unused local variable.
	(main): No need to pass a non-NULL last arg to getopt_long.
	* src/users.c (list_entries_users, users): Use size_t for sizes.
	(list_entries_users): Use char for bytes.
	(main): No need to pass a non-NULL last arg to getopt_long.
	* src/who.c (do_lookup, short_list, short_output, include_idle,
	include_heading, include_mesg, include_exit, need_boottime,
	need_deadprocs, need_login, need_initspawn, need_clockchange,
	need_runlevel, need_users, my_line_only, main): Use bool for booleans.
	(print_runlevel): Use unsigned char for bytes.
	(list_entries_who, scan_entries, who): Use size_t for sizes.
	(main): No need to pass a non-NULL last arg to getopt_long.

	* src/install.c (isdir): Remove decl.
	(install_file_to_path): Rely on make_path to fail if the destination
	is not a directory, by passing preserve_existing==true to it.
	Hence we no longer need to call isdir.
	Free dest_dir immediately when it's no longer needed, rather than
	waiting until the end of the function.
	(copy_file): Don't bother calling isdir, as copy will do the
	right thing if the destination is a directory.

	* src/du.c (fts_debug, opt_all, apparent_size, opt_count_all,
	print_grand_total, opt_separate_dirs, hash_ins, process_file, main):
	Use bool for booleans.
	(max_depth): Now size_t, not int, to avoid an arbitrary limit
	of INT_MAX on depth.
	(G_fail): Remove: no longer needed, now that the relevant
	functions return bool.
	(process_file): Use return value to signal success rather than
	setting a global.  Remove first_call static var; not needed, since
	we can look at n_alloc.  Use size_t for depths.  Remove FIXME
	about size_t casts, as it's now fixed.  Use xnrealloc rather
	than the obsolescent XREALLOC.  Don't bother to check whether
	reallocation is needed unless level > prev_level.
	(du_files): Invert sense of result, for consistency with
	other coreutils code.  All callers changed.
	(main): Allow --max-depth values up to SIZE_MAX.

	* src/df.c (inode_format, show_all_fs, show_local_fs,
	show_listed_fs, posix_format, require_sync, print_type,
	selected_fstype, excluded_fstype, show_dev, show_point, main):
	Use bool for booleans.
	(df_readable, show_dev): Use UINTMAX_MAX instead of -1.
	(show_dev, show_point, main):
	Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
	Don't assume disk name lengths are <= INT_MAX.
	Rewrite pct calculation to avoid cast.
	(show_point): Don't assume resolved length is <= SSIZE_MAX.

	* src/cut.c (hash_int) [!defined UINTPTR_MAX]: Use size_t
	instead of uintptr_t.
	* src/shred.c (UINT_MAX_32_BITS): Remove.
	(word32): Remove.  All uses changed to uint32_t.
	(isaac_seed_data): Remove unnecessary cast.
	* src/system.h (ptr_align): Use size_t; in practice, this is just as
	good as uintptr_t in checking for alignments, and has fewer
	configuration hassles.

	* src/Makefile.am (localedir.h): Make it readonly; this
	undoes part of the 2004-07-27 patch.

2004-07-30  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/sort.c (UCHAR): Remove; all uses changed to to_uchar.
	(IS_THOUSANDS_SEP): Use bool when appropriate.
	(numcompare, main): Use char, not int, when the value is always a char.
	(numcompare): Remove "register"; compilers are smart enough these days.
	* src/system.h (errno, CHAR_BIT): Remove decls;
	no longer needed now we assume C89 or better.
	Include <inttypes.h> before <stdint.h>, as it's the
	Autoconf-recommended pattern.
	(to_uchar): New inline function, moved here from tr.c.
	Use full names for int types, e.g. "long int" rather than "long".
	* src/tr.c (to_uchar): Remove; now in system.h.
	(is_char_class_member): Use bool when appropriate.

	* src/mkdir.c (create_parents, main): Use bool when appropriate.
	(main): Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.

2004-07-29  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/mkfifo.c (main): Use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1.

	* src/chmod.c (recurse, force_silent, process_file, process_files,
	main): Use bool when appropriate.
	* src/cksum.c (cksum, main): Likewise.
	* src/comm.c (hard_LC_COLLATE, only_file_1, only_file_2, both,
	compare_files, main): Likewise.

	* src/copy.h (struct cp_options): Likewise.
	* src/copy.c (copy_internal, is_ancestor, copy_dir, copy_reg,
	same_file_ok, seen_file, copy_internal, valid_options, copy): Likewise.
	* src/cp-hash.h (remember_created): Likewise.
	* src/cp-hash.c (remember_created): Likewise.
	* src/cp.c (struct dir_attr, flag_path, remove_trailing_slashes,
	re_protect, make_path_private, target_directory_operand, do_copy,
	cp_option_init, decode_preserve_arg, main): Likewise.
	* src/install.c (isdir, change_timestamps, change_attributes,
	copy_file, install_file_to_path, install_file_in_dir,
	install_file_in_file, strip_files, dir_arg, cp_option_init, main,
	change_attributes, change_timestamps): Likewise.
	* src/mv.c (remove_trailing_slashes, rm_option_init,
	cp_option_init, do_move, movefile, main): Likewise.
	* src/remove.c (right_justify), full_filename_, AD_pop_and_chdir,
	AD_push, prompt, remove_dir): Likewise.
	* src/rm.c (rm_option_init, main): Likewise.

	* src/remove.c (top_dir, pop_dir, full_filename_):
	Use size_t for sizes.
	* src/cp.c (target_directory_operand): Do not clear *NEW_DST if stat
	succeeds.  It's not necessary in that case, as *NEW_DST is always
	false already.
	(do_copy): Rewrite slightly to avoid need for "unreachable" comment.
	(main): Use EXIT_SUCCESS, EXIT_FAILURE instead of 0, 1.
	* src/rm.c (main): Likewise.

	md5sum, sha1sum integer cleanups.

	* src/checksum.h: Don't include config.h, sys/types.h, stdio.h:
	not needed.
	(ALG_UNSPECIFIED): Remove.
	(ALG_MDT): Don't make it equal to CHAR_MAX + 1; this isn't necessary.
	* src/md5.c: Don't include any files other than checksum.h.
	* src/sha1sum.c: Likewise.
	* src/md5sum.c (OPENOPTS, have_read_stdin, status_only, warn,
	bsd_split_3, split_3, hex_digits, digest_file, digest_check, main):
	Use bool when appropriate.
	(digest_check): Increase limit of number of input lines to
	UINTMAX_MAX from INT_MAX.  Diagnose any overflows of this counter.
	Use ngettext instead of hard-to-i18nize hardcoded stuff for plurals.

2004-07-28  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/cat.c (exit_status): Remove.  Now done by passing a boolean
	'ok' flag around.
	(simple_cat, cat): Return true if successful.  All callers changed.
	(simple_cat, cat, main): Use bool for booleans.
	(simple_cat): Use size_t for sizes.
	(cat, main): Use the same names for parameters that we use for
	long options, to avoid confusion.  This inverts the sense of the
	show_tabs (formerly output_tabs) and number_nonblank
	(formerly numbers_at_empty_lines) variables.
	(main): Don't mess up (due to integer overflow) if we are given
	INT_MAX - INT_MIN + 1 options.
	[O_BINARY]: Don't invoke isatty unless the other options require it.
	(main): When deciding whether to use simple_cat, don't worry
	about binary option; it's irrelevant.

	* src/dcgen: Remove comments, trailing white space, and empty
	lines from the output strings, to save space.
	Use a narrower type like 'unsigned char' for line lengths, if
	that will do.
	Make the output variables static, not extern.

	* src/chgrp.c (parse_group): Require base 10 when parsing
	groups as integers.
	(main): int -> bool when appropriate.
	* src/chown.c (main): Likewise.
	* src/chown-core.c: Include inttostr.h.
	(UINT_MAX_DECIMAL_DIGITS, uint_to_string): Remove.
	(gid_to_name, uid_to_name): Use imaxtostr/umaxtostr
	instead of uint_to_string).
	(describe_change): Instead of an int flag, use a char *
	auxiliary; this avoids the need for casts.
	Assume free (NULL) works.
	(change_file_owner): Return true/false, not 0/-1, since
	we don't set errno.  All callers changed.
	Use bool when appropriate.
	(chown_files): Likewise.
	* src/chown-core.h (chown_files): Likewise.

	* tests/chown/basic: Test for proper handling of uids like
	"010", which must be parsed as decimal.

	* tests/misc/pwd: Don't assume that Perl's getpwd agrees with our
	pwd when there are multiple names for the working directory
	(which can happen with an automounter, sigh).

	* src/Makefile.am ($(SCRIPTS)): Don't depend on Makefile;
	this causes Solaris 8 'make' to refuse to build "groups".
	(localedir.h): Don't depend on Makefile: this causes Solaris
	8 'make' to build localedir.h unnecessarily.  The dependence
	on Makefile is ineffective anyway, since $(localedir) might
	change even if Makefile hasn't.

	* src/remove.c (remove_dir): If we can't save the state of the
	working directory, pretend we started from "/", not ".".
	This avoids a bug on hosts like Solaris that don't let you
	remove the working directory.

2004-07-27  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/printf.c (strtiomax, strtoumax): Declare if not already
	declared: this fixes a portability bug with Solaris 8 + GCC.
	(STRTOX): Parenthesize use of macro arg as expression.
	(vstrtoimax, vstrtoumax, vstrtold): Remove now-unnecessary
	parentheses.
	* configure.ac: Check for declaration of strtoumax, for
	src/printf.c.

	* src/Makefile.am (cp_LDADD, ginstall_LDADD, mv_LDADD,
	pathchk_LDADD, rm_LDADD, test_LDADD): New vars, for eaccess.

	* tests/readlink/can-e: Don't assume that we can remove the
	working directory: this isn't possible under Solaris 8, say.
	* tests/readlink/can-f: Likewise.
	* tests/readlink/can-m: Likewise.

	* src/copy.c (copy_internal): find_backup_file_name no longer
	returns NULL, so don't bother to check for this.
	* src/cp.c (do_copy): Likewise.
	* src/ln.c (do_link): Likewise.

2004-07-25  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/nice.c (GET_NICE_VALUE): Renamed from GET_PRIORITY.
	All uses changed.
	(NZERO): New macro, if system doesn't define it already.
	(usage): Distinguish priorities from nice values.
	Don't assume NZERO is 20.
	(main): Use bool instead of int where appropriate.
	If user specifies an adjustment out of range, always truncate it
	to an inrange value instead of sometimes giving an error message
	and sometimes not.
	Do not assume that -1 is an error return from "nice" or
	"getpriority", as it might be the current nice value minus NZERO.
	If nice/setpriority fails with errno == EPERM, go ahead and run
	the command anyway; POSIX requires this.

	* src/pathchk.c: Include euidaccess.h.
	(dir_ok): Use euidaccess, not access.
	* src/test.c (R_OK, W_OK, X_OK, FOK): Remove; system.h defines them.
	(eaccess): Remove.  All users changed to use euidaccess instead.

2004-07-24  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uptime.c (print_uptime) [defined BOOT_MSG]:
	Don't assume ut_line is null-terminated.
	* src/who.c (print_line): New arguments USERLEN and LINELEN,
	since USER and LINE might not be null terminated.  All callers
	changed.

2004-07-23  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug with "tail -f" reported by Rob Holland in
	<http://lists.gnu.org/archive/html/bug-coreutils/2004-07/msg00054.html>.
	Also, remove the undocumented and unsupported-since-2000
	--max-consecutive-size-changes options.  Fix another related bug:
	"tail" got confused if stdin, stdout, or stderr were closed.
	Also, use output buffering even with "tail -f".

	* NEWS: Document this, plus yesterday's patch.
	* doc/coreutils.texi (tail invocation): "size has remained the same"
	-> "file has not changed", which is more accurate for fifos.
	* src/tail.c: Include fcntl-safer.h.
	(COPY_TO_EOF): Set to UINTMAX_MAX, not OFF_T_MAX (which was wrong).
	(COPY_A_BUFFER): New macro.
	(struct File_spec): New members mtime, mode, blocking.
	Remove member n_consecutive_size_changes.
	(DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES,
	max_n_consecutive_size_changes_between_opens,
	MAX_CONSECUTIVE_SIZE_CHANGES_OPTION): Remove.
	(long_options, tail_forever, parse_options):
	Remove (non-)support for --max-consecutive-size-changes.
	(record_open_fd): New function.
	(recheck, tail_file): Use it.  Don't assume that stdin is open.
	(dump_remainder): Add support for new COPY_A_BUFFER special value.
	Treat errno==EAGAIN like EOF, since it might be a nonblocking read.
	(recheck): New arg BLOCKING, specifying whether to use blocking reads.
	All uses changed.
	(n_live_files): Remove, replacing with...
	(any_live_files): New function.  All uses changed.
	(tail_forever): Use nonblocking I/O unless we know that blocking I/O
	is safe; this avoids some hangs when reading from a fifo.
	Avoid invoking fstat or sleep when using blocking I/O.
	Do not check for changes to size if the file is not a regular file,
	as the size is undefined in that case.
	Check for changes to mtime or mode, too; this works for non-regular
	files.
	(tail_forever, main): Redo fflush strategy to work even when input
	is nonblocking.  Don't use unbuffered output; just flush when needed.

2004-07-22  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/tail.c (main): Ignore -f if no file operand is specified
	and standard input is a pipe.
	* doc/coreutils.texi (tail invocation): Do not ignore -f for
	all pipes, just for when standard input is a pipe and no
	file operand is specified.
	* tests/tail/Test.pm: Reinstate f-1 test, since we now pass.
	Add a new commented-out f-2 test, which we still fail.
	(test_vector): All f-* tests are special cases, not just f-1.

2004-07-12  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uptime.c: Include c-strtod.h.
	(print_uptime): Use c_strtod instead of setlocale and sscanf.
	Use long int rather than int to count days (for 64-bit hosts),
	and check for arithmetic overflow when converting double to time_t.

2004-07-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/printf.c (vstrtold): Renamed from vstrtod.
	Now returns long double.  All uses changed.
	(print_direc): Use "L" length modifier when printing floating point
	numbers, since we're now printing long double.

2004-07-06  Paul Eggert  <eggert@@cs.ucla.edu>

	* Version 5.3.0.

	printf cleanup, to avoid undefined behavior, to add support for
	formats that Bash supports, and to support wide integers like
	Bash does.

	* NEWS: Document this.
	* src/printf.c (UNSPECIFIED): Remove.  All uses now replaced by
	booleans, so that we don't reserve any values for precision or
	width (like Bash).
	(STRTOX): Use prototype, not K&R-style definition.
	(vstrtoimax): Renamed from xstrtol (to avoid confusion with xstrtol
	in ../lib), with type change to intmax_t.
	All uses changed.
	(vstrtoumax): Renamed from xstrtoul, with type change to uintmax_t.
	All uses changed.
	(vstrtod): Renamed from xstrtod.  All uses changed.
	(print_direc): Use boolean arg instead of special value to indicate
	a missing precision or width.  LENGTH no longer includes
	length modifiers or conversion character.  New arg CONVERSION
	now specifies conversion character.
	Use intmax_t-width formatting for integers (like Bash).
	Add support for C99 %a, %A, %F (like Bash).
	Add support for field width with %c (POSIX requires this).
	Add a FIXME for lack of support for field width and precision
	for %b.
	Add support for '\'', '0' flags.
	Check for invalid combinations of flags, field width, precision,
	and conversion, to prevent use of undefined behavior.
	Allow multiple length modifiers, for formats like "%lld" (like Bash).
	Add support for C99 'j', 't', 'z' length modifiers (like Bash).
	In error message, output entire invalid conversion specification,
	instead of merely outputting % followed by the conversion char.
	* tests/misc/printf: Add tests for the above.

2004-04-03  Dmitry V. Levin  <ldv@@altlinux.org>

	Change "readlink -f" to be more compatible with prior implementations.
	Add more canonicalize options, -e and -m.
	Add comprehensive tests for all readlink modes.

	* m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
	Do not add canonicalize.c here.

	* src/readlink.c (longopts): Add new options.
	(usage): Document them.
	(canonicalize_fname): New proxy function.
	(main): Handle new options.
	* doc/coreutils.texi (readlink invocation): Document new
	"readlink -f" behaviour and new canonicalize options, -e and -m.

	* configure.ac (AC_CONFIG_FILES): Add tests/readlink/Makefile.
	* tests/Makefile.am (SUBDIRS): Add readlink.
	* tests/readlink/Makefile.am: New file.
	* tests/readlink/{rl-1,can-e,can-f,can-m}: New readlink tests.
	* tests/misc/Makefile.am (TESTS): Remove basic readlink test.
	* tests/misc/readlink: Remove file.

2004-07-04  Jim Meyering  <jim@@meyering.net>

	* src/copy.c (copy_internal): Add a FIXME comment.

2004-07-02  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/copy.c (copy_dir): Assume path_concat returns non-NULL.
	* src/cp.c (do_copy): Likewise.
	* src/mv.c (movefile): Likewise.

	* src/cp.c (make_path_private): 2nd arg is now size_t, not int,
	to avoid problem when path_concat dir name is longer than 2 GiB (!).

	* src/nohup.c (main): Don't pass NULL first argument to path_concat.
	This cleans up the semantics a bit, as we no longer try to open the
	same file twice.

2004-07-01  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Add short names -t and -T for --target-directory
	and --no-target-directory options, respectively.

	* src/cp.c (NO_TARGET_DIRECTORY_OPTION, TARGET_DIRECTORY_OPTION):
	Remove.  All uses changed to 'T' and 't', respectively.
	* src/install.c, src/ln.c, src/mv.c: Likewise.

	* src/cp.c (long_opts, usage, do_copy, main): Add -t and -T as
	aliases for --target-directory and --no-target-directory,
	respectively.
	* src/install.c (long_options, main, usage): Likewise.
	* src/ln.c, src/mv.c: Likewise.

2004-07-01  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_file_system): New target.
	(syntax-check-rules): Add it.
	.x-sc_file_system: New file.
	* Makefile.am (EXTRA_DIST): Add it.

	* man/sync.x: Use "file system" rather than "filesystem".
	* man/stat.x, man/df.x: Likewise.

2004-06-30  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/df.c (usage, main): Output "file system" rather than
	"filesystem".
	* src/du.c (usage): Likewise.
	* src/shred.c (usage): Likewise.
	* src/stat.c (usage): Likewise.
	* src/stat.c (long_options, usage): Rename "--filesystem" to
	"--file-system".  But keep the old name around, for compatibility
	reasons.

2004-06-29  Paul Eggert  <eggert@@cs.ucla.edu>

	Add support for --no-target-directory option.

	* NEWS: Document it.
	* doc/coreutils.texi (Common options, Target directory, cp
	invocation, install invocation, mv invocation, ln invocation):
	Likewise.
	(link invocation): Explain how to rewrite link using ln now
	that we have --no-target-directory.
	(ln invocation): Explain that --no-target-directory subsumes
	--no-dereference.
	(unlink invocation): Modify wording to match new wording in
	link invocation.

	* src/cp.c (NO_TARGET_DIRECTORY_OPTION): New constant.
	(long_opts, usage, do_copy, main): Add support for
	--no-target-directory,
	* src/install.c (NO_TARGET_DIRECTORY_OPTION, long_options, main,
	usage): Likewise.
	* src/ln.c (NO_TARGET_DIRECTORY_OPTION, long_options, usage,
	main): Likewise.
	* src/mv.c (NO_TARGET_DIRECTORY_OPTION, long_options, usage,
	main): Likewise.
	* src/mv.c (enum): Sort values.

2004-06-29  Jim Meyering  <jim@@meyering.net>

	Don't let verbose-mode output from a subshell obscure actual differences.
	* tests/rm/inaccessible: Turn off command-echoing just before
	invoking subshell, then turn it back on if VERBOSE=yes afterward.

2004-06-25  Paul Eggert  <eggert@@cs.ucla.edu>

	Add support for 'install --target-directory', an option
	that has been documented for years but not implemented (!).
	* doc/coreutils.texi (install invocation): Document
	--target-directory in synopsis, too.
	* src/install.c (TARGET_DIRECTORY_OPTION): New var.
	(long_options, main, usage): Add --target-directory.
	(target_directory_operand): New function, stolen from mv.c.
	(main): Use it.  Check for -d and --target-directory.
	Alter wording of diagnostics to match other programs.

2004-06-28  Jim Meyering  <jim@@meyering.net>

	* src/cp.c (usage): Fix copy+paste error in description of
	--target-directory: s/move/copy/.  From Paul Jarc.

2004-06-27  Paul Eggert  <eggert@@cs.ucla.edu>

	Use more-consistent rules among cp, ln, and mv when dealing with
	last operands that are (or look like) directories.

	* src/cp.c (target_directory_operand): New, nearly-common function,
	It reports an error if the destination appears to be a directory
	(e.g., because it has a trailing slash) but is not.
	* src/ln.c, src/mv.c: Likewise.
	* src/cp.c (do_copy): Use it.
	* src/ln.c (main): Likewise.
	* src/mv.c (main): Likewise.

	* src/cp.c (do_copy): Don't assume argc is positive.
	Don't bother to lstat dest, since copy() will do that for us.
	Use "const" to avoid the need for cast.

	* src/cp.c (do_copy): Don't output a usage message because of file
	problems (e.g., an operand is not a directory).  Use it only for
	syntax.  Standardize on "target %s is not a directory" for the
	diagnostic.
	* src/ln.c (main): Likewise.
	* src/mv.c (main): Likewise.

	* src/cp.c (do_copy): Remove test for trailing slash, since
	target_directory_operand now does this.
	* src/ln.c (main): Likewise.
	* src/mv.c (movefile): Likewise.

	* src/cp.c (main): Reject multiple target directories.
	Check whether a specified target is a directory when parsing the
	options, using stat.  This gives more-accurate diagnostics.
	* src/ln.c (main): Likewise.

	* src/ln.c (isdir): Remove decl; no longer needed.
	* src/mv.c (isdir, lstat): Likewise.

	* src/ln.c (do_link): New arg dest_is_dir.  All uses changed.
	Don't check the destination ourself; rely on dest_is_dir.
	This way we can avoid lstatting the destination in the
	usual case, and in the worst case we lstat 1, not 3 times.
	Don't bother to unlink unless link failed; this saves a syscall.
	Remove unnecessary backup_succeeded flag;
	it was identical to "dest_backup != NULL".

	* src/ln.c (main): Use int to count to argc, not unsigned int.
	This handles negative operand counts.
	* src/mv.c (main): Likewise.

	* src/mv.c (do_move): Don't call hash_init; expect the caller to
	do it, for consistency with cp.c and ln.c.  All callers changed.
	(movefile): dest_is_dir parameter is now bool, not int.
	(main): Standardize on "missing destination file operand after %s"
	for the diagnostic, for consistency with cp.c.

	* tests/mv/diag: Don't assume "mv --target=nonexistentdir"
	will complain about the arg count.
	Adjust to new (briefer) diagnostics.
	* tests/cp/fail-perm: Add a test to verify that we get the new
	diagnostic when failing to copy through a symlink-to-inaccessible-dir.

2004-06-27  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix a bug: formerly, if d/x was a directory and x a file, "ln x
	d/" incorrectly created a link d/x/x.  It also saves some system
	calls.

	* NEWS: Document the fix.

	* src/ln.c (main): Don't append basename to dest if this
	results in an existing directory name.
	* tests/ln/misc: See whether a trailing slash is followed too far.

2004-06-26  Jim Meyering  <jim@@meyering.net>

	* src/printf.c (main): When given no arguments, print the standard
	"missing operand\nTry printf --help..." message -- to be consistent.

2004-06-26  Jim Meyering  <jim@@meyering.net>

	* src/mknod.c (main): Add \n at the end of message output via fprintf.

2004-06-25  Jim Meyering  <jim@@meyering.net>

	* tests/ln/misc: Add test for ln subscript error.

2004-06-23  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/ln.c (do_link): Remove unnecessary call to lstat.
	(main): Avoid subscript error when the destination is "".

2004-06-23  Jim Meyering  <jim@@meyering.net>

	* tests/*: Replace all occurrences of `(exit N); exit' with
	`(exit N); exit N'.  Otherwise, those many tests could exit with
	improper exit status when exiting via e.g., a trapped interrupt.
	Thanks to a report from Bob Proulx.

2004-06-22  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (idle_string, print_user): New arg boottime,
	specifying the most recent boot time.  All uses changed.
	(idle_string) Consider a line to be "old" if it hasn't been used
	since the last boot time.  Watch out for overflow when computing
	times, and for times in the future.
	(idle_string): Record latest boot time.

2004-06-22  Jim Meyering  <jim@@meyering.net>

	* src/test.c (usage): Correct description of `-t FD'.  The file
	descriptor, FD, is no longer optional.  Reported by Ton Nijkes.

2004-06-21  Paul Eggert  <eggert@@cs.ucla.edu>

	The 2004-06-19 fix for who and pinky was incomplete, as ctime
	has undefined behavior if the year precedes -999 or follows 9999.
	Since we have to stop using ctime anyway, we might as well use
	strftime and fix the FIXME, and support internationalized dates.

	* NEWS: Document the new behavior.
	* src/who.c: Include "hard-locale.h".
	(time_format, time_format_width): New vars.
	(time_string, print_line): Use them.
	(main): Set them.
	(time_string): Use localtime + strftime instead of
	ctime, to avoid problems with years before -999 or after 9999.
	* src/pinky.c: Likewise.

2004-06-21  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug: GNU 'ls' didn't count columns correctly if user or group
	names contained multibyte characters where the column count
	differed from the byte count.  This patch also corrects
	some comments.

	* src/ls.c (format_user_or_group): New function, which counts
	columns correctly.
	(format_user, format_group): Use it.
	(format_user_or_group_width): New function, which counts columns
	correctly.
	(format_user_width, format_group_width): Use it.

2004-06-21  Jim Meyering  <jim@@meyering.net>

	* tests/priv-check: Quote "$PATH" in PATH=$PATH.
	Suggestion from Andreas Schwab.

	* tests/priv-check: When running as root, be sure to propagate
	PATH through to the process we exec as non-root.
	Reported by michael@@aplatform.com.

	* src/mknod.c (main): Don't segfault when calculating the
	expected number of operands for `mknod NAME'.

2004-06-20  Jim Meyering  <jim@@meyering.net>

	* src/dd.c (input_seek_errno): Declare file-scoped variable as static.

2004-06-20  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/basename.c (main):
	Standardize on the diagnostics given when someone gives
	too few operands ("missing operand after `xxx'") or
	too many operands ("extra operand `xxx'").
	Include "quote.h" and/or "error.h" if it wasn't already being included.
	* src/chgrp.c (main): Likewise.
	* src/chmod.c (main): Likewise.
	* src/chown.c (main): Likewise.
	* src/chroot.c (main): Likewise.
	* src/comm.c (main): Likewise.
	* src/cp.c (do_copy): Likewise.
	* src/csplit.c (main): Likewise.
	* src/date.c (main): Likewise.
	* src/dircolors.c (main): Likewise.
	* src/dirname.c (main): Likewise.
	* src/du.c (main): Likewise.
	* src/expr.c (main): Likewise.
	* src/hostid.c (main): Likewise.
	* src/hostname.c (main): Likewise.
	* src/id.c (main): Likewise.
	* src/install.c (main): Likewise.
	* src/join.c (add_file_name, main): Likewise.
	* src/link.c (main): Likewise.
	* src/ln.c (main): Likewise.
	* src/logname.c (main): Likewise.
	* src/md5sum.c (main): Likewise.
	* src/mkdir.c (main): Likewise.
	* src/mkfifo.c (main): Likewise.
	* src/mknod.c (main): Likewise.
	* src/mv.c (main): Likewise.
	* src/nohup.c (main): Likewise.
	* src/od.c (main): Likewise.
	* src/pathchk.c (main): Likewise.
	* src/ptx.c (main): Likewise.
	* src/readlink.c (main): Likewise.
	* src/rm.c (main): Likewise.
	* src/rmdir.c (main): Likewise.
	* src/seq.c (main): Likewise.
	* src/setuidgid.c (main): Likewise.
	* src/shred.c (main): Likewise.
	* src/sleep.c (main): Likewise.
	* src/sort.c (main): Likewise.
	* src/split.c (main): Likewise.
	* src/stat.c (main): Likewise.
	* src/test.c (beyond, main): Likewise.
	* src/touch.c (main): Likewise.
	* src/tr.c (main): Likewise.
	* src/tsort.c (main): Likewise.
	* src/tty.c (main): Likewise.
	* src/uname.c (main): Likewise.
	* src/uniq.c (main): Likewise.
	* src/unlink.c (main): Likewise.
	* src/uptime.c (main): Likewise.
	* src/users.c (main): Likewise.
	* src/who.c (main): Likewise.
	* src/whoami.c (main): Likewise.

	* tests/basename/basic: Adjust to new diagnostics.
	* tests/du/files0-from: Likewise.
	* tests/expr/basic: Likewise.
	* tests/mv/diag: Likewise.
	* tests/tsort/basic-1: Likewise.

2004-06-20  Jim Meyering  <jim@@meyering.net>

	* src/ln.c: Remove declaration of yesno.
	Instead, include yesno.h.
	* src/copy.c: Likewise.

	* src/remove.c: Remove declaration of yesno.
	Instead, include yesno.h.
	(top_dir): Remove now-unnecessary cast of obstack_base.
	(pop_dir): Likewise.
	(full_filename_): Likewise.

2004-06-19  Paul Eggert  <eggert@@cs.ucla.edu>

	Don't dump core if ctime returns NULL; this is possible on
	hosts with 64-bit time_t and 32-bit int.
	* src/who.c: Include "inttostr.h".
	(time_string): If ctime fails, print the raw time as an integer
	instead of dumping core.
	* src/pinky.c: Likewise, as follows:
	Include "inttostr.h".
	(time_string): New function, copied from who.c.
	(print_entry): Use it.

2004-06-19  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (print_line): Don't truncate user names at 8 bytes.
	Problem reported by Guido Leenders in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00056.html
	* NEWS: document this.

2004-06-19  Jim Meyering  <jim@@meyering.net>

	* src/system.h (case_GETOPT_VERSION_CHAR): Switch back to
	using GNU_PACKAGE (from PACKAGE) once again.  This restores
	`GNU' to the parenthesized package name in --version output.
	Before, the first argument from AC_INIT, `GNU coreutils', would
	be propagated to the PACKAGE variable.	Now, `GNU ' is trimmed.
	Reported by Richard Stallman.

2004-06-17  Jim Meyering  <jim@@meyering.net>

	* src/tr.c (to_uchar): Rename function from `uchar'.  The latter
	would clash with a typedef in Tru64's <sys/types.h>.  From Albert Chin.

2004-06-15  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Remove more special cases for POSIXLY_CORRECT when POSIX
	allows the GNU behavior.  "--" is now supported by chroot, hostid,
	hosname, pwd, sync, yes.
	* doc/coreutils.texi (yes invocation, false invocation,
	true invocation): Document this.
	* src/chroot.c (main): Handle "--".
	* src/hostid.c (main): Likewise.
	* src/hostname.c (main): Likewise.
	* src/pwd.c (main): Likewise.
	* src/sync.c (main): Likewise.
	* src/yes.c (main): Likewise.
	* src/true.c (main): Recognize --help and --version even if
	POSIXLY_CORRECT is set.
	* src/yes.c (main): Likewise.

2004-06-09  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Remove special cases for POSIXLY_CORRECT when POSIX allows
	the GNU behavior.
	* doc/coreutils.texi (pr invocation, unlink invocation): Document this.
	* src/ls.c (decode_switches): Pay attention to TABSIZE even if
	POSIXLY_CORRECT is set.  POSIX reserves upper-case environment
	variables to the implementation, so it's OK for ls to depend on
	TABSIZE.
	* src/pr.c: Include "hard-locale.h".
	(main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since
	POSIX specifies the behavior only in the POSIX locale.
	* src/printf.c (print_esc): Support \x, \u, \U even if POSIXLY_CORRECT,
	since POSIX says the behavior is unspecified here.
	* src/tail.c (parse_obsolescent_option): Support multiple file operands
	even if POSIXLY_CORRECT, since POSIX does not require a diagnostic.
	* src/printf.c (main): Recognize --help, --version even if
	POSIXLY_CORRECT.  POSIX does not specify any options, but it
	does not prohibit options either, so "printf" is like "expr" here.
	* src/unlink.c (main): Likewise.
	* tests/misc/printf: Adjust to the new semantics for \x if
	POSIXLY_CORRECT.

2004-06-14  Jim Meyering  <jim@@meyering.net>

	* tests/misc/pwd: New test, for fix of 2004-04-19.
	* tests/misc/Makefile.am (TESTS): Add pwd.
	(BUILD_SRC_DIR): Define BUILD_SRC_DIR.

	* src/copy.c: Remove declaration of euidaccess.
	Instead, include "euidaccess.h".

2004-06-13  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (PIDSTR_DECL_AND_INIT): Don't assume pid_t fits in int.
	(UT_ID) [!HAVE_STRUCT_XTMP_UT_ID]: Remove bogus comment,
	as (sizeof "??") reliably returns 3.
	(print_line): Guard against idle and pid being too long
	(which is possible when printing headers).
	(print_user): Allocate enough bytes for idlestr.  Use IDLESTR_LEN.
	Avoid unnecessary cast of sizeof to int.
	(make_id_equals_comment): Do not assume that UT_ID returns
	a string; it might return a non-null-terminated array.
	Use strncat instead.  It's not very often where strncat is
	exactly what you want, but this is one of those rare cases.

2004-06-11  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/who.c (list_entries_who): Don't output a trailing space.

2004-06-09  Jim Meyering  <jim@@meyering.net>

	* src/touch.c (usage): Improve wording in description of the
	--time=WORD option.  Reported by Dan Jacobson.

	* src/chown-core.c (change_file_owner): Change names of parameters
	old_uid and old_gid to required_uid and required_gid respectively.

	* src/chmod.c (mode_changed): Return false, not 0, now that the
	function returns `bool'.

2004-06-08  Paul Eggert  <eggert@@cs.ucla.edu>

	Adjust chmod and chown to be similar if -c or -v are given.  In
	particular, a no-op chown is no longer reported as a change; this
	reverts to previous behavior.  Also, fix both commands so that -v
	report failures even if the failure is not due to the chmod or
	chown syscalls.

	* src/chmod.c (CH_NOT_APPLIED): New constant.
	(describe_change): Handle it.
	(process_file): Use it, if a symlink wasn't changed.
	(mode_changed): Return bool, not int.  Accept new argument
	NEW_MODE; all callers changed.  This lets us avoid statting the
	file unless the new mode has unusual bits.
	(process_file): Return -1 on error.  With -v, report all errors
	verbosely, not just some.

	* src/chown-core.c (change_file_owner): Return -1 on error, not
	1 sometimes and -1 on others.  Our caller ORs together our results,
	and (-1 | 1) == 0 on ones-complement hosts.
	With -v report all errors verbosely, not just some.
	Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent:
	file_stats wasn't set properly in that case.

	* tests/chgrp/basic: Adjust to above changes.

2004-05-20  Paul Eggert  <eggert@@cs.ucla.edu>

	* tests/chgrp/basic: Test that chgrp -h does not fail on
	symlinks, even on hosts where that's not supported.
	Test that if -R is specified without -H or L, -h is assumed.
	Test that chown() is not optimized away.

2004-05-18  Paul Eggert  <eggert@@cs.ucla.edu>

	Several fixes to chgrp and chown for compatibility with POSIX and BSD:

	  Check for incompatible options.  When -R and --dereference are
	  both used, then either -H or -L must also be used.  When -R and -h
	  are both used, then -P must be in effect.

	  -H, -L, and -P have no effect unless -R is also specified.
	  If -P and -R are both specified, -h is assumed.

	  Do not optimize away the chown() system call when the file's owner
	  and group already have the desired value.  This optimization was
	  incorrect, as it failed to updated the last-changed time and reset
	  special permission bits, as POSIX requires.

	  Do not report an error if the owner or group of a
	  recursively-encountered symbolic link cannot be updated because
	  the file system does not support it.

	* NEWS: Document the above.

	* src/chgrp.c (main): Check for incompatible options.  -R --dereference
	requires either -H or -L, and -R -h requires -P.  If -H, specify
	FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster.  Make this
	file as much like chown.c as possible.
	* src/chown.c (main): Likewise.

	* src/chown-core.c (change_file_owner): Use ent->fts_statp only if
	needed.  Chown a directory only after chowning its children; this
	avoids problems if the new directory ownership doesn't permit
	access to the children.  Dereference symlinks before doing
	ROOT_DEV_INO_CHECK, not after, so that we catch symlinks to /.
	Do not optimize away the chown() system call when the file's owner
	and group already have the desired value.  POSIX does not permit
	this optimization.  Rely on chown and lchown to do the right
	thing with symlinks and/or -1 arguments, now that we have wrappers
	to do this.  Use ENOTSUPP not ENOSYS, and ignore all ENOTSUPP
	errors, not just command-line errors.
	(chown_files): Pass FTS_NOSTAT to xfts_open if we don't need file status.

	* src/system.h (ENOTSUP): Remove.

	* tests/chgrp/basic: Use chown --from to discover whether the
	group changed, since chgrp now changes unconditionally.  This
	complicates the sed script a bit.  Do not specify --dereference,
	since it's the default (and we want to test this).  Adjust output
	to match the fact that chgrp no longer optimizes the case of
	changing a file's group to the same value as before.
	* tests/chgrp/posix-H: Do not attempt to combine -h and -H; these
	options are incompatible, and their behavior is undefined with POSIX.
	(changed, not_changed): Adjust to match the fact that -h is no longer
	specified.  Sort names.
	* tests/chown/deref: Adjust error-diagnostic spelling to match new
	behavior.

2004-06-07  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/uname.c (main): Fix typo introduced on 2003-05-10 that
	prevented a diagnostic of any operands.

2004-06-08  Jim Meyering  <jim@@meyering.net>

	* src/shred.c (direct_mode): Turn it on/off with directio, too.

2004-06-07  Jim Meyering  <jim@@meyering.net>

	Enable direct-mode I/O (bypassing the buffer cache), if possible.
	Prompted by a suggestion from Kalle Olavi Niemitalo
	in http://bugs.debian.org/207035.
	* src/shred.c (direct_mode): New function.
	(do_wipefd): Turn on direct-mode I/O.
	(dopass): If a file's first write fails with EINVAL,
	turn off direct-mode I/O and retry the write.

2004-06-05  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/tr.c (main): "tr -d a b" is now a fatal error even if
	POSIXLY_CORRECT is set.  The POSIX SYNOPSIS does not allow this
	option combination.

2004-06-04  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (dopass): Don't subtract 1 from the offset after
	a write error.  Problem reported by Jon Peatfield in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html

2004-06-02  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug reported by Buciuman Adrian in
	<http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00105.html>
	where 'dd' created a file that was too large.  The bug was that dd
	assumed that the input file offset does not advance after a failed
	read; but POSIX says that the input file offset is undefined after
	a failed read.

	* src/dd.c (MAX_BLOCKSIZE): New macro.
	(input_seekable, input_seek_errno, input_offset,
	input_offset_overflow): New vars.
	(scanargs): Reject block sizes greater than MAX_BLOCKSIZE.
	(advance_input_offset): New function.
	(skip_via_lseek): Set errno to zero when reporting our failure,
	so that we don't report based on garbage errno.
	(skip): If fdesc is standard input, advance the input offset.
	Do not quit if reading, and if noerror was specified;
	POSIX seems to require this.
	If read fails on output file, report the earlier lseek failure
	instead; this fixes a FIXME in dd_copy.
	(advance_input_after_read_error): New function.
	(dd_copy): Use it, instead of assuming that failed reads
	do not advance the file pointer.  Advance input offset
	after nonfailed reads.  Advance only a partial block if
	the previous read (before the failed read) succeeded, and
	do not generate an output block of zeros in this case.
	(main): Determine initial input offset, seekability of input,
	and error if it wasn't seekable.

2004-06-02  Jim Meyering  <jim@@meyering.net>

	rm (without -f) could hang unnecessarily when attempting to
	remove a symlink to a file on an off-line NFS-mounted partition.
	Reported by David Howells in https://bugzilla.redhat.com/124699.
	* src/remove.c (write_protected_non_symlink): New function.
	Don't invoke euidaccess on symlinks.
	(prompt): Use write_protected_non_symlink rather than using
	euidaccess directly, being careful not to call lstat twice for a file.

	Fix a bug in how the --output-delimiter=D option works with
	abutting byte or character ranges.  Reported by David Krider in
	http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00132.html
	* src/cut.c (print_kth): Remove special case for open-ended range.
	(set_fields): Record the range start index for an interval even
	when it abuts another interval on its low side.
	Also record the range start index of the longest right-open-interval.
	* tests/cut/Test.pm: Add tests of --output-delimiter=S with
	abutting and overlapping byte ranges.

2004-06-01  Paul Eggert  <eggert@@cs.ucla.edu>

	Some POSIX-conformance cleanups for tr.

	* src/tr.c (posix_pedantic): Remove; no longer needed since
	we need to test this in just one place now.
	(usage): Mention -C.
	(unquote): Note that \055, \n, etc are escaped.
	Do not worry about POSIXLY_CORRECT when warning about ambiguous
	escape sequences.
	\ at end of string stands for itself.
	Do not diagnose invalid backslash escapes: POSIX says the behavior
	is unspecified in this case, so we don't need to diagnose it.
	(main): Add support for -C (currently an alias for -c).
	Do not diagnose 'tr [:upper:] [:upper:], as POSIX does not require
	a diagnostic here.
	* tests/tr/Test.pm: New tests bs-055, bs-at-end, repeat-Compl.
	Fix comment for range-a-a.

2004-05-25  Paul Eggert  <eggert@@cs.ucla.edu>

	Improve the efficiency (and in one case, correctness) of code
	that reads symlinks.

	* src/copy.c (copy_internal): Don't use alloca, as it can mess up
	royally if the link length is long (e.g., GNU/Hurd).  Use
	xreadlink instead, it's safer.  Don't bother to read the link if
	it's the wrong size.  Add a FIXME because this area is a bit murky
	and undocumented.
	* src/ls.c (get_link_name): Update use of xreadlink.
	* src/readlink.c (main): Likewise.
	* src/stat.c (print_stat): Likewise.

2004-06-01  Jim Meyering  <jim@@meyering.net>

	* src/env.c (main): Prefer the notation `STREQ (a, b)'
	over `!strcmp (a, b)'.
	* src/sort.c (main, sort_buffer_size): Prefer the notation
	`STREQ (a, b)' over `strcmp (a, b) == 0'.
	* src/date.c (batch_convert): Likewise.
	* src/expr.c (nextarg): Likewise.
	* src/su.c (correct_password, restricted_shell, main): Likewise.
	* src/ptx.c (swallow_file_in_memory, main): Likewise.
	* src/test.c (binary_operator, and, or, main): Likewise.

2004-05-13  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: echo compatibility cleanup.
	* doc/coreutils.texi (echo invocation): Document the changes.
	* src/echo.c (V9_ECHO): Remove; always enabled.
	(DEFAULT_ECHO_TO_XPG): Renamed from V9_DEFAULT, so that
	we use the same naming convention as bash.  Now an enum,
	not a macro.
	(usage): Reword to mention -e/-E more accurately.
	Mention \0NNN (the POSIX syntax) rather than \NNN (nonstandard).
	(hextobin): New function.
	(main): Use bool rather than int for local vars when appropriate.
	Do not allow options if POSIXLY_CORRECT, unless we are using
	BSD semantics and the first argument is "-n".
	Don't pass unnecessary extra arg to parse_long_options.
	do_v9 now defaults to DEFAULT_ECHO_TO_XPG, not to allow_options.
	Do not look for options if !allow_options.
	Use size_t rather than int when appropriate.
	Open-code option test rather than using strrchr.
	Use faster test for "-".
	Avoid redundant argc test.
	Add support for \x, for Bash compatibility.
	Use e.g. '\a' rather than '\007', for portability to EBCDIC hosts.
	When '\c' is encountered, stop printing immediately, as POSIX
	requires.
	Add support for \xhh syntax.
	Add support for \0ooo syntax; POSIX requires this.

2004-06-01  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.8b.  Regenerate dependent files.

2004-05-31  Jim Meyering  <jim@@meyering.net>

	* tests/Makefile.am.in (TESTS_ENVIRONMENT): Define PATH to include
	the build src/ directory -- at the front.
	($(srcdir)/$x-tests): Depend on Makefile.am.
	Use $x as the program name, except when it would be `test' (test is
	the sole program tested via mk-script that is also a shell built-in).
	In that case, use the old ../../src/$x.

2004-05-30  Jim Meyering  <jim@@meyering.net>

	Work around HPUX /bin/cc compiler bug that is exposed, now that
	sets are arrays of type `bool'.  More details here:
	http://lists.gnu.org/archive/html/bug-gnulib/2004-05/msg00094.html
	FIXME: verify that the above URL points to the right message

	* src/tr.c (card_of_complement): Use cleaner `sizeof in_set'
	rather than `N_CHARS * sizeof(in_set[0])'.  Using HPUX's /bin/cc
	(aC++/ANSI C B3910B A.05.55 [Dec 04 2003]) on an ia64-hp-hpux11.22
	system, those two expressions are not the same (256 vs. 1024).
	The effect of this problem was that `tr -c x y' would fail:
	tr: when not truncating set1, string2 must be non-empty
	(set_initialize): Remove unnecessary initialization of the `in_set'
	buffer; that initialization triggered the same compiler bug as above.

2004-05-29  Paul Eggert  <eggert@@cs.ucla.edu>

	tr cleanup, mostly having to do with integer type ranges.
	Remove all casts.

	* tests/tr/Test.pm: Add a few tests for the below.  Alas, most of
	the test cases wouldn't be portable, or would take too much CPU
	time, or both.

	* src/tr.c (N_CHARS, N_CHAR_CLASSES): Now an enum, not a macro.
	This is safe since the code already assumes N_CHARS fits in int.
	(Filter): Remove: we want to prototype everything.
	(ORD, CHR): Remove.  All uses removed.  Some replaced with:
	(uchar): New function.  All places where a char must be converted
	to an unsigned char are now done this way, not by ad-hoc methods.
	(count): New type.  Use it whenever counts or states are needed.
	(BEGIN_STATE): Increase from INT_MAX - 1 (which was bogus, anyway,
	since we used it in an unsigned int context) to UINTMAX_MAX - 1.
	(REPEAT_COUNT_MAXIMUM): New macro.  Use it in place of BEGIN_STATE
	whenever appropriate.
	(NOT_A_CHAR): Remove global macro; now a local enum.
	(UL_LOWER, UL_UPPER, UL_NONE): No longer specify values, since
	the rest of the code no longer depends on them.
	(class_ok): Remove; all uses changed to use inline comparisons.
	(RE_NO_TYPE): Remove; wasn't used or needed.
	(struct List_element): normal_char and equiv_code are now unsigned
	char, not int.
	first_char, last_char, and the_repeated_char are now unsigned char,
	not unsigned int.  repeat_count is now count, not size_t.
	All uses changed.
	(struct Spec_list): state is now count, not unsigned int.
	lengthis now count, not size_t.
	n_indefinite_repeats is now size_t, not int.
	has_equiv_class, has_char_class, and has_restricted_char_class
	are now bool, not int.  All uses changed.
	(struct E_string): s is now char *, not unsigned char *.
	escaped is now bool *, not int *.  All uses changed.
	(ES_MATCH): Remove macro, replacing with:
	(es_match): New inline function.  All uses changed.
	(squeeze_repeats, complement, posix_pedantic, truncate_set1,
	translating): Now bool, not int.
	(io_buf): Now char array, not unsigned char.
	(SET_TYPE): Remove.  All uses replaced with bool.
	(is_equiv_class_member, unquote, append_range, append_char_class,
	append_equiv_class, find_closing_delim, star_digits_closebracket,
	build_spec_list, parse_str, homogeneous_spec_list):
	Now returns bool, not int.  All uses changed.
	(is_equiv_class_member): Now inline.
	(is_equiv_class_member, is_char_class_member, make_printable_str,
	append_normal_char, append_range, append_repeated_char,
	get_s2_spec_stats):
	Args are now of proper integer type.
	(unquote, look_up_char_class, make_printable_str,
	append_equiv_class, build_spec_list, squeeze_filter):
	Avoid unsigned char *p; gently convert *p to unsigned char instead.
	(unquote, get_spec_stats): Do not jump past declarations and then
	use them; C doesn't allow this in portable programs.
	(make_printable_str): Check for overflow in size calculations.
	(xmemdup): Remove.  All uses rewritten.
	(find_bracketed_repeat): Args are now of proper pointer-to-integer
	type.  Do not reject [c*0].  Use xstrtoumax, not xstrtoul.
	(find_bracketed_repeat, star_digits_closebracket): Check that the
	digits are not escaped.
	(build_spec_list): Don't bother to copy opnd_str; not needed.
	(build_spec_list, get_next): Simplify internal logic a bit.
	(card_of_complement): Fix bug due to char overflow.
	(get_spec_stats): Don't assume len fits into int.
	Check for integer overflow.  Use abort() rather than assert(0).
	(string2_extend): Fix subscript error: is_char_class_member (..., 255)
	was being invoked.
	(squeeze_filter): READER is never null now; simplify code.
	READER arg now has a simpler type.  Remove unnecessary casts.
	(squeeze_filter, main): Calls to fwrite improperly checked result
	against zero, rather than against requested size.
	(plain_read): New function.
	(read_and_delete, read_and_xlate):
	Remove unused filter arg, and don't worry about hit_eof.
	Simplify by using plain_read.
	(set_initialize): Args are bool and bool *, not int and SET_TYPE *.
	(main): Always pass a non-null procedure to squeeze_filter.
	Rewrite so that class_ok isn't needed.

2004-05-29  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (dosync): Ignore EBADF errors, as IRIX 6.5
	fdatasync reports EBADF when syncing (unwritable) directories.
	Problem reported by Albert Chin-A-Young in:
	http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00165.html

2004-05-29  Jim Meyering  <jim@@meyering.net>

	* tests/chown/deref: Fix typo: use ls -ldo, not ls -ldg.
	Patch from Albert Chin.

	* src/ptx.c (text_buffer_maxend): Remove declaration of unused variable.

	* src/remove.c (push_dir): Merge declaration and adjacent assignment
	into a single statement.

2004-05-28  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (AD_mark_helper): Eliminate an unnecessary comparison.

2004-05-22  Jim Meyering  <jim@@meyering.net>

	rm -r would get a failed assertion when run from an inaccessible
	directory and with two or more command line arguments including an
	absolute-named directory followed by a relative-named directory.

	* src/remove.h (struct rm_options) [require_restore_cwd]: New member.
	* src/remove.c (struct cwd_state): Define.
	(AD_pop_and_chdir): Redesign interface so that a restore_cwd failure
	can be detected by the caller.  Instead of returning a malloc'd
	directory name, communicate it to caller via a new parameter, and
	return an indication of whether restore_cwd failed.  Update caller.
	Eliminate an unnecessary call to AC_stack_top.
	(remove_dir): Change type of cwd_state parameter to `struct cwd_state'
	so we can now communicate to caller whether/how functions like
	restore_cwd have failed.  Update caller.
	(rm_1): Fail if we've failed to restore the working directory
	and the name of the next file to remove is `.'-relative.
	(rm): Fail if the require_restore_cwd flag is true and we've
	failed to restore the working directory.
	* src/mv.c (rm_option_init): Initialize new member,
	x->require_restore_cwd.
	* src/rm.c (rm_option_init): Likewise.

2004-05-21  Jim Meyering  <jim@@meyering.net>

	* tests/rm/inaccessible: New test for the above fix.
	* tests/rm/Makefile.am (TESTS): Add inaccessible.

	* src/remove.c (rm): Use free rather than XFREE.
	(remove_dir): Use xmalloc, not XMALLOC.
	(ds_init): Likewise.

2004-05-20  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_unmarked_diagnostics): Now that the unmarked
	diagnostics in shred.c have been fixed, don't exempt shred.c from
	this check.

	* src/shred.c: Use translatable diagnostics, e.g.
	change "%s: remove" to _("%s: failed to remove") and
	change "%s: close"  to _("%s: failed to close").

2004-05-17  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/shred.c (names): Bring back lower-case letters, "_", and
	".".  But continue to omit +, =, %, @@, #, as they're either
	shell metacharacters (for some shells) or are not in some
	character sets, or (in the case of '%') must be a
	metacharacter somewhere.

2004-05-16  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/cut.c (cut_fields): Adjust to new signature of getndelim2.

2004-05-17  Jim Meyering  <jim@@meyering.net>

	* src/shred.c (incname): Decrement `len' only once per loop iteration.

	chgrp and chown now dereference symlinks by default, per POSIX.
	Reported by Michal Politowski as http://bugs.debian.org/249177.

	* src/chown-core.c (chopt_init): Affect each symlink referent by default.
	* src/chown.c (usage): Update to reflect this.
	* src/chgrp.c (usage): Likewise.
	* NEWS: Describe the change.
	Adapt tests accordingly.
	* tests/chgrp/basic: Use -h where necessary to retain semantics.
	* tests/chgrp/deref: Likewise.
	* tests/chgrp/posix-H: Likewise.

2004-05-15  Paul Eggert  <eggert@@cs.ucla.edu>

	In shred, check for errors from fdatasync more carefully.  If
	fdatasync fails with errno==EINVAL, it means this implementation
	does not support synchronized I/O for this file.  Do not report
	this as an error, as (for example) AIX 5.2 fdatasync reports it
	for raw disk devices.  Problem reported by Albert Chin in
	<http://mail.gnu.org/archive/html/bug-gnu-utils/2004-05/msg00028.html>.

	Check for write errors, though: the old code ignored them.
	Improve error checking in a few other cases, too (e.g., close of a
	directory).

	Also, change several 'int' values to 'bool', so that the error
	checking is a bit clearer.  Similarly, change unsigned values
	to size_t where appropriate.

	* src/shred.c: Include "dirname.h".
	(datasync) [!HAVE_FDATASYNC]: Remove.
	(dosync): New function.
	(dopass): Use it.  Return 1 on write error, -1 on other error.
	All callers changed.  Report write error if dosync does.
	(do_wipefd, wipefd, wipename, wipefile): Return bool (true/false),
	not int (0/-1).  All callers changed.  Return false if there's a
	write error.
	(incname): Return bool (true/false), not int (0/1).  Accept
	size_t length, not unsigned.  All callers changed.  Do not
	bother checking for non-digits; it can't happen.  Replace
	recursion with iteration.
	(wipename): Use dir_name, base_name, etc. instead of assuming
	Unix file names.  Use size_t for length, not unsigned.
	Report error if unlink or close fails.
	(wipename, main): Use bool for booleans.

	(names): Use only digits and uppercase letters, for greater
	portability.

2004-05-16  Jim Meyering  <jim@@meyering.net>

	* tests/chown/deref: New test for the yesterday's change.
	* tests/chown/Makefile.am (TESTS): Add deref.

2004-05-15  Jim Meyering  <jim@@meyering.net>

	chown --dereference did nothing when the owner/group of a
	symlink matched the desired owner/group.  Reported by David Malone.
	Also reported in 1999 as http://bugs.debian.org/39642.

	* src/chown-core.c (change_file_owner): When --dereference has
	been specified, and when processing a symlink, stat it to get the
	owner and group of the referent.

2004-05-14  Jim Meyering  <jim@@meyering.net>

	* man/pwd.x, man/echo.x, man/printf.x: Fix typo:
	s/supercede/supersede/ reported by Andrew Fabbro.

2004-05-13  Paul Eggert  <eggert@@cs.ucla.edu>

	Improve performance of `sort -m' on large files, at the cost of
	making some contrived examples unsafe.  POSIX allows this
	optimization.  Performance problem reported by Jonathan Baker in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00071.html>.

	* src/sort.c (first_same_file): Do not treat input pipes
	differently from other files.
	* doc/coreutils.texi (sort invocation): Document that "sort -m -o F"
	might write F before reading all the input.
	* NEWS: Likewise.

2004-05-12  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/od.c (print_ascii, dump_strings): Use e.g. '\a' rather than
	'\007', for portability to EBCDIC hosts.
	* src/printf.c (print_esc_char): Likewise.
	* src/tr.c (unquote, make_printable_str): Likewise.

2004-05-12  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (AD_pop_and_chdir): Move lstat-`.' into if-block
	where the result is used.  This avoids one unnecessary lstat call
	per command line argument.

2004-05-12  Paul Eggert  <eggert@@cs.ucla.edu>

	Don't assume that "make -C" works; Solaris "make" doesn't have -C.

	* src/Makefile.am (all_programs.list): New rule, copied from
	man/Makefile.am and tests/Makefile.am, except that we use the
	system tr rather than ./tr and we don't use tr -s.
	* tests/Makefile.am (all_programs): Use it.
	* man/Makefile.am (all_programs): Likewise.  Renamed from programs,
	for consistency.  All uses changed.

2004-05-11  Jim Meyering  <jim@@meyering.net>

	* tests/rm/unread3: New test, for the above fix and today's
	lib/save-cwd.c improvement.
	* tests/rm/Makefile.am (TESTS): Add unread3.

	* src/rm.c: Don't include "save-cwd.h".  It's no longer used.

2004-05-10  Jim Meyering  <jim@@meyering.net>

	* tests/install/trap: New file.  Test for bug fix of 2004-04-18.
	* tests/install/Makefile.am (TESTS): Add trap.

	* src/remove.c (AD_push): Don't use errno in diagnostic about
	`changed dev/ino'.

	Remove these generated files from CVS.
	* tests/cut/cut-tests, tests/date/date-tests, tests/join/join-tests:
	* tests/ls/ls-tests, tests/pr/pr-tests, tests/tac/tac-tests:
	* tests/tail/tail-tests, tests/test/test-tests, tests/tr/range-tests:
	* tests/tr/tr-tests, tests/wc/wc-tests:

2004-05-09  Jim Meyering  <jim@@meyering.net>

	* src/tr.c (unquote): Use xcalloc rather than xmalloc and
	a loop initializing the just-allocated memory to zero.

2004-05-08  Jim Meyering  <jim@@meyering.net>

	* tests/rm/no-give-up: New file; check for today's fix.
	* tests/rm/Makefile.am (TESTS): Add no-give-up.

2004-05-08  Paul Eggert  <eggert@@cs.ucla.edu>

	Fix bug where "rm" gave up too easily, reported by Dan Jacobsen in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00013.html>.

	* src/remove.c (remove_entry): Check for errno values like ENOENT
	that show the file cannot be directory, instead of for errno
	values like EPERM that show the file might be a directory.  This
	is necessary because, when a single unlink() call has multiple
	reasons to fail, it can set errno to any of those reasons; it's
	only the rare errno value like ENOENT that excludes all the other
	possible reasons to fail even when the file is a directory.
	(remove_cwd_entries): Don't attempt chdir if the file is known
	to not be a directory.
	(remove_dir): Use the same method that remove_cwd_entries uses
	(for some reason they differed).  Don't assert that saved_errno
	must be EPERM; it might be just about anything.

2004-05-06  Jim Meyering  <jim@@meyering.net>

	* src/id.c (xgetgroups): Use xnmalloc, rather than xmalloc.
	Don't add `1' to the buffer size (it was to protect against malloc
	implementations that fail to allocate a buffer of size zero).
	That is no longer necessary, since we use a malloc wrapper
	on such systems.

	* src/wc.c (get_input_fstatus): Use xnmalloc, rather than xmalloc.
	* src/head.c (elide_tail_bytes_pipe): Likewise.
	* src/df.c (main): Likewise.
	* src/shred.c (do_wipefd): Likewise.
	* src/users.c (list_entries_users): Likewise.
	* src/tail.c (main): Likewise.
	* src/md5sum.c (main): Likewise.

2004-04-29  Paul Eggert  <eggert@@cs.ucla.edu>

	* src/df.c (show_disk, show_point): If several filesystems are
	mounted on the same mount point, prefer the last one, not the first.
	Problem reported by Christian Jones in
	<http://mail.gnu.org/archive/html/bug-coreutils/2004-04/msg00200.html>.
	(show_disk): Remove unused statp arg.  Return bool, not int.
	(show_point): Rewrite to avoid gotos.  Use the same algorithm
	for lofs and dummies for each pass through the mount table,
	rather than subtly different algorithms (which are probably
	inadvertent).

2004-05-03  Jim Meyering  <jim@@meyering.net>

	* Makefile.am (EXTRA_DIST): Add m4/ChangeLog, now that we no longer
	have m4/Makefile*.

2004-05-01  Jim Meyering  <jim@@meyering.net>

	When chown or chgrp is modifying the referent of a symlink,
	use the chown(2) function, if possible.
	* src/chown-core.c (change_file_owner): Don't hard-code the
	open/fchown/close kludge here.  Use `chown' instead.
	The chown function works just fine on conforming systems.
	Other systems now go through the new chown wrapper that
	resorts to the old kludge.

	* src/chown-core.c (change_file_owner): Add a comment.

2004-04-27  Jim Meyering  <jim@@meyering.net>

	* src/ptx.c: Make over 40 global extern variables `static'.
	(syntax_table, re_syntax_table): Remove declarations of two unused
	variables (they were exposed by the above change).

	* src/du.c (G_fail, opt_nul_terminate_output): Declare `static'.
	* src/ln.c (backup_type): Likewise.

	* src/remove.c (rm): Add `extern' keyword.
	* src/cp-hash.c (forget_created, remember_created)
	(src_to_dest_lookup, remember_copied, hash_init, forget_all): Likewise.
	* src/copy.c (dest_info_init, src_info_init, copy): Likewise.
	* src/chown-core.c (chopt_init, chopt_free, gid_to_name)
	(uid_to_name, chown_files): Likewise.

	* src/Makefile.am (sc_tight_scope): New rule.
	* Makefile.maint (sc_tight_scope): New rule.
	(syntax-check-rules): Add it.

2004-04-26  Jim Meyering  <jim@@meyering.net>

	* Use automake-1.8.4.  Regenerate dependent files.

	* src/sort.c (limfield): Make a comment clearer.

2004-04-25  Paul Eggert  <eggert@@twinsun.com>

	Fix POSIX-conformance bug: "sort -k 3,3.5b" is supposed to skip
	leading blanks when computing the location of the field end;
	it is not supposed to skip trailing blanks.  Solaris 8 "sort"
	does conform to POSIX.  Also fix the documentation to clarify
	this and related issues.

	* doc/coreutils.texi (sort invocation): Mention -k earlier, so
	that the options are in alphabetical order.  Describe how -b works
	more-accurately; this involves fixing some examples, too.  Mention
	what happens if the start field falls after an end field or after
	a line end.  Warn about using -k without -b, -g, -M, -n, or -t.
	Add an example of how to sort IPv4 addresses and Apache Common
	Log Format dates.  Remove a duplicate example.
	(Putting the tools together): Use separate options rather
	than agglomerating them.
	* src/sort.c (limfield): Use skipeblanks, not skipsblanks, to
	decode whether to skip leading blanks.
	(trailing_blanks): Remove.
	(fillbuf, getmonth, keycompare): Don't trim trailing blanks.

	* tests/pr/Test.pm: Fix typo in env_default comment.
	* tests/sort/Test.pm: Likewise.
	(18c, 18d): Reverse the order of output lines, so that the
	test cases conform to POSIX.

2004-04-22  Paul Eggert  <eggert@@twinsun.com>

	More signal-handling cleanup for ls.c.  Do not allow signals to
	happen between arbitrary output bytes, as the
	restore-default-color sequence can bollix up multibyte chars or
	color-change sequences in the ordinary output.  Instead, process
	signals only between printing a file name and changing the color
	back to non_filename_text color.  That way, if the signal handler
	changes the color (to the default), 'ls' will change it back when
	'ls' continues (after being suspended).

	Also, do not bother with signal-handling unless stdout is a
	controlling terminal; this lets stdio buffer better when "ls
	--color" is piped or sent to a file.

	* src/ls.c (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: New macros.
	Do not include "full-write.h"; no longer needed.
	(tcgetpgrp) [! HAVE_TCGETPGRP]: New macro.
	(put_indicator_direct): Remove.  All callers changed to use
	put_indicator.
	(caught_signals, interrupt_signal, stop_signal_count): New vars.
	(restore_default_color): Don't bother checking for put_indicator
	failure.
	(sighandler): Don't handle SIGTSTP; that's another handler now.
	Simply set interrupt_signal to the signal, then exit.
	(stophandler, process_signals): New functions.
	(main): Don't output any color changes until _after_ the signal
	handlers are set up.  This fixes a race condition where 'ls'
	could be interrupted while initializing colors, and leaving the
	terminal in an undesirable state.
	Don't mess with signal-handling if standard output is not a
	controlling terminal.
	When exiting, restore the default color, then restore the
	default signal handling, then act on any signals that weren't
	acted on yet.
	Do not print //DIRED// etc. in colors; this avoids the need
	to catch signals when printing them.
	(print_name_with_quoting): Process signals just before switching
	color back to non_filename_text.

2004-04-23  Jim Meyering  <jim@@meyering.net>

	Avoid segfault on systems for which SIZE_MAX != (size_t) -1.
	* src/ls.c (quote_name): Use SIZE_MAX, not -1, in calls
	of quotearg_buffer.  Patch by Mikulas Patocka.

2004-04-18  Paul Eggert  <eggert@@twinsun.com>

	tee ignored SIGPIPE, but POSIX doesn't allow this.

	* src/tee.c (main): Do not ignore SIGPIPE, as POSIX 1003.1-2001
	does not allow this.  This undoes the 1996-10-24 patch.

2004-04-18  Paul Eggert  <eggert@@twinsun.com>

	Signal-handling cleanup for coreutils.  Here are the highlights:

	 - csplit sometimes failed to remove files when interrupted.
	 - csplit didn't clean up if two signals arrived nearly simultaneously.
	 - install -s would infloop on System V if SIGCHLD was ignored.
	 - ls could incorrectly restore color if multiple signals
	   arrived nearly simultaneously.

	* src/csplit.c (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]:
	Define.
	(filename_space, prefix, suffix, digits, files_created, remove_files):
	Now volatile.
	(caught_signals): New var.
	(cleanup): Block signals while deleting all files.
	(cleanup_fatal, handle_line_error, regexp_error):
	Mark with ATTRIBUTE_NORETURN.
	(create_output_file, close_output_file, interrupt_handler):
	Block signals while changing the number of output files,
	to fix some race conditions.
	(delete_all_files): Do nothing if remove_files is zero.
	Clear files_created.
	(main): Don't mess with signals until after argument processing
	is done.

	* src/csplit.c (main): Rewrite signal-catching code to make it
	similar to other coreutils programs.  When processing signals,
	block all signals that we catch, but do not block signals that we
	don't catch.  Avoid problems with unsigned int warnings.
	* src/ls.c (main): Likewise.
	* src/sort.c (main): Likewise.

	* src/csplit.c (interrupt_handler):
	Use void, not (obsolete) RETSIGTYPE.
	* src/shred.c (sigill_handler, isaac_seed_machdep): Likewise.

	* src/csplit.c (interrupt_handler) [defined SA_NOCLDSTOP]:
	Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent.
	* src/ls.c (sighandler) [defined SA_NOCLDSTOP]: Likewise.
	* src/sort.c (sighandler) [defined SA_NOCLDSTOP]: Likewise.
	* src/nohup.c (main) [!defined _POSIX_SOURCE]: Likewise, except
	for SIG_IGN.
	* src/tee.c (main) [!defined _POSIX_SOURCE]: Likewise.

	* src/install.c: Include <signal.h>.
	(main) [defined SIGCHLD]: Set SIGCHLD handler to the default, if -s is
	given, since System V fork+wait does not work if SIGCHLD is ignored.

	* src/ls.c (sighandler) [!defined SA_NOCLDSTOP]: Reset signal
	handler to self, not to SIG_IGN, since SIGTSTP can be received
	more than once.
	(main): Use SA_RESTART, as that is simpler than checking for EINTR
	failures all over the place.

2004-04-20  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (is_empty_dir): Clarify comment.

	* man/help2man: Accept new option: --program-name=NAME, so that we
	can override the one in --version output.  This is needed solely
	so that test.1 doesn't refer to `[' as the program name.
	Reported by Benjamin Cutler as http://bugs.debian.org/205251.
	* man/Makefile.am (.x.1): Use help2man's new --program-name option.

	* src/pwd.c: Don't include pathmax.h; system.h already does it.

	* src/cut.c (cut_fields): Free buffer upon getndelim2 failure.

2004-04-19  Jim Meyering  <jim@@meyering.net>

	* src/shred.c (isaac_seed_start) [AVOID_USED_UNINITIALIZED_WARNINGS]:
	Initialize a buffer to avoid warnings from tools like valgrind.

	* Makefile.maint (sc_trailing_blank): New rule.
	(syntax-check-rules): Add it.
	* .x-sc_trailing_blank: New file.

	Make pwd work even if the resulting name is so long that getcwd fails.
	* src/pwd.c: (path_free, path_init, path_prepend): New functions.
	(nth_parent, find_dir_entry, robust_getcwd): New functions.
	(main): First try getcwd, then, upon failure, robust_getcwd.

2004-04-18  Jim Meyering  <jim@@meyering.net>

	* src/who.c (print_user): Use xrealloc here, rather than
	unchecked realloc.  Remove anachronistic casts.

	* src/remove.c (full_filename_): Don't leak upon failed realloc.

	* src/system.h (readdir_ignoring_dot_and_dotdot): New inline function,
	from remove.c.
	* src/remove.c (readdir_ignoring_dotdirs): Move function to system.h,
	renaming it.  Update uses.

2004-04-17  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Depend on automake-1.8.3.

	* src/join.c (add_file_name): Declare function to be `static'.
	(string_to_join_field): Likewise.
	* src/remove.c (ds_init, ds_free): Likewise.

	* Makefile.maint (sc_prohibit_jm_in_m4): New rule.
	(syntax-check-rules): Add to the list.

2004-04-13  Paul Eggert  <eggert@@twinsun.com>

	Use page-aligned buffers whenever we bother to do I/O using buffer
	sizes that are tailored for the files.

	* src/cat.c: Include getpagesize.h.
	* src/copy.c: Likewise.
	* src/shred.c: Likewise.
	* src/split.c: Likewise.
	* src/cat.c (main): Align I/O buffers to page boundaries.
	* src/copy.c (copy_reg): Likewise.
	* src/shred.c (dopass): Likewise.
	* src/split.c (main): Likewise.
	* src/dd.c (ROUND_UP_OFFSET, PTR_ALIGN): Remove.
	All uses replaced by ptr_align.
	* src/od.c (gcd, lcm): Remove; now in system.h.
	* src/system.h (gcd, lcm, ptr_align): New functions, moved from od.c.

2004-04-14  Jim Meyering  <jim@@meyering.net>

	Remove m4/Makefile.am: it's no longer needed, with newer automake
	* configure.ac (AC_CONFIG_FILES): Remove m4/Makefile.in from the list.
	* Makefile.am (SUBDIRS): Remove `m4' from the list.

2004-04-13  Jim Meyering  <jim@@meyering.net>

	* configure.ac: Change `jm_' in AC_DEFINE'd names to `gl_'.

2004-03-27  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: cp -pu and mv -u (when copying) now take the destination
	file system time stamp resolution into account.
	* doc/coreutils.texi (mv invocation): Document this.
	(cp invocation): Document -u (it was missing!) with new behavior.

	* src/copy.c: Include "utimecmp.h".
	(copy_internal): Compare time stamps using utimecmp rather than
	MTIME_CMP.

2004-04-09  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (.re-list): New rule/file, to replace
	hard-coded list of header file names.
	(sc_system_h_headers): Use the new file.
	Don't look for sys2.h anymore.

	* src/system.h: Include new "stat-macros.h" rather than hard-coding
	all of its macro definitions -- the list was slightly out of date.
	Suggestion from Dmitry V. Levin.

2004-04-08  Paul Eggert  <eggert@@cs.ucla.edu>

	* NEWS: Remove noctty flag from dd.  Suggested by Philippe Troin.
	* doc/coreutils.texi (dd invocation): Likewise.
	* src/shred.c (O_NOCTTY): Remove redundant decl.
	* src/dd.c (flags, usage): Remove noctty flag.
	(main): Always use O_NOCTTY when opening files.

2004-04-08  Jim Meyering  <jim@@meyering.net>

	* src/dd.c (dd_copy): Mark two diagnostics for translations.
	(set_fd_flags): Undo part of today's change: it's a little
	cleaner -- and more efficient in the common case -- to go
	ahead and OR in the -1 when fcntl fails.

	* Makefile.maint (sc_dd_max_sym_length): New target.
	(syntax-check-rules): Add it.

	* src/md5sum.c (PROGRAM_NAME) [algorithm == ALG_SHA1]:
	Correct spelling: s/shasum/sha1sum.  Reported by Jesse Kornblum.

	* src/dd.c (set_fd_flags): Don't OR in -1 when fcntl fails.
	Rename parameter, flags, to avoid shadowing global.
	(LONGEST_SYMBOL): Tweak comment.

2004-04-07  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: New dd conv= symbols nocreat, excl, fdatasync, fsync,
	and new dd options iflag= and oflag=.
	* src/dd.c (usage): Likewise.
	* src/Makefile.am (dd_LDADD, shred_LDADD): Add fdatasync's lib.
	* src/dd.c (fdatasync) [!HAVE_FDATASYNC]: New macro.
	(C_NOCREAT, C_EXCL, C_FDATASYNC, C_FSYNC): New macros.
	(input_flags, output_flags): New vars.
	(LONGEST_SYMBOL): New macro.
	(struct symbol_value): Renamed from struct conversion.  Members
	symbol and value renamed from convname and conversion.  The
	symbol value is now an array instead of a pointer; this saves
	a bit of space and time in practice.  All uses changed.
	(conversions): Add nocreat, excl, fdatasync, fsync.  Now const.
	(flags): New constant array.
	(iflag_error_msgid, oflag_error_msgid): New constants.
	(parse_symbols): Renamed from parse_conversion and generalized
	to handle either conversion or flag symbols.
	(scanargs): Adjust uses of parse_symbols accodingly.  Add
	support for iflag= and oflag=.  Reject attempts to use
	both excl and nocreat.
	(set_fd_flags): New function.
	(dd_copy): Just return X rather than calling quit (X), since our
	caller invokes quit with the returned value.  Add support for
	fdatasync and fsync.
	(main): Add support for iflag=, oflag=, and new conv= symbols.
	* src/system.h (O_DIRECT, O_DSYNC, O_NDELAY, O_NOFOLLOW,
	O_RSYNC, O_SYNC): Define to 0 if not already defined.

	* NEWS: Remove duplicate mention of BLOCKSIZE.

2004-04-02  Andreas Schwab  <schwab@@suse.de>

	* src/stty.c: Add support for IUTF8 input flag.

2004-04-06  Jim Meyering  <jim@@meyering.net>

	* src/system.h (makedev) [mkdev && !makedev]: Define in terms of mkdev.
	Interix spells it `mkdev'.  Reported by Mark Funkenhauser.

2004-04-04  Jim Meyering  <jim@@meyering.net>

	A specified format is no longer automatically newline terminated.
	If you want a newline at the end of your format, use `\n'.
	* src/stat.c (print_it): Don't print a newline at the end of
	every format.
	(do_statfs): Add a newline at end of each default format string.

2004-03-30  Paul Eggert  <eggert@@twinsun.com>

	* src/nohup.c (main): Adjust to new calling convention
	for set_cloexec_flag.

2004-03-31  Jim Meyering  <jim@@meyering.net>

	* tests/Fetish.pm (run_tests): Remove `.orig' file.
	Remove debugging diagnostic.

	Specifying an invalid --width=N (-w) or --gap-size=N (-g)
	would not elicit an error.
	* src/ptx.c: Include "xstrtol.h" and "quotearg.h".
	(main): Don't use atoi.  Use xstrtoul instead.

2004-03-30  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (sc_prohibit_atoi_atof): New rule.
	(syntax-check-rules): Add it.
	* .x-sc_prohibit_atoi_atof: New file.

2004-03-29  Jim Meyering  <jim@@meyering.net>

	* tests/du/files0-from: Use new OUT_SUBST directive, so that this
	test is not sensitive to system-dependent block size differences.
	Prompted by a report of Solaris 8 differences from Paul Eggert.

	* tests/Fetish.pm: Accept new directives: OUT_SUBST, ERR_SUBST.
	Rename `%tmp' to `%actual'.  Reverse order of last two args to
	_compare_files (to $actual, $expected) so as to match declaration.

2004-03-28  Paul Eggert  <eggert@@twinsun.com>

	Fix some gotchas encountered when porting to Solaris 8, using
	the Forte 6u2 compiler.

	* src/hostname.c [HAVE_SETHOSTNAME && !defined sethostname]:
	Declare sethostname, since no Solaris header does it.
	* src/who.c: Include "vasprintf.h", for asprintf.

2004-03-28  Jim Meyering  <jim@@meyering.net>

	Minor optimization:
	* src/du.c (process_file): Don't record dev/inode for directories.

	Under some circumstances, without -c, du would mistakenly count the
	space of hard-linked files, not just the first one it encountered.
	Reported by Anthony Thyssen.
	* src/du.c (du_files): Don't ever clear the set of `seen' dev/inodes.

	* src/du.c: Rename global `print_totals' to `print_grand_total'.

	* src/du.c (main): Rearrange filtering loop to be a tiny bit
	more efficient.

	* src/chown-core.c: Don't include savedir.h -- no longer needed.
	* src/chmod.c: Likewise.

2004-03-25  Jim Meyering  <jim@@meyering.net>

	* src/du.c (main): Remove now-unused declaration of `i'.

2004-03-24  Paul Eggert  <eggert@@twinsun.com>

	* src/du.c (main): Filter out file names of length zero before
	invoking fts, so that they don't cause fatal errors.

2004-03-25  Jim Meyering  <jim@@meyering.net>

	* tests/du/files0-from (zero-len): Add a test for the above.

2004-02-25  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: New environment var BLOCKSIZE.
	* lib/human.c (humblock): Support BLOCKSIZE as well as BLOCK_SIZE.
	* tests/envvar-check: Test for it.  Factor the code to simplify it.

2004-03-23  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Shorten the du --files0-from announcement, and say
	"NUL-terminated" rather than "NUL-separated".
	* src/du.c (EXPECTED_BYTES_PER_FILE_NAME, DEFAULT_PROJECTED_N_FILES):
	Remove: not used.
	(usage): Say "NUL-terminated", not "NUL-separated".
	(main): Check for I/O error when istream is closed.
	Allow --files0-from=F even if F is empty; this specifies no files.
	(du_files): Now that we allow the list of files to be empty,
	handle that case.
	* tests/du/files0-from: Adjust to above changes to src/du.c.

2004-03-24  Jim Meyering  <jim@@meyering.net>

	* tests/tail-2/assert: Avoid race condition that could cause
	spurious failure.  Based on a patch from Andreas Schwab.

2004-03-23  Jim Meyering  <jim@@meyering.net>

	* src/du.c (main): Free the hash table, too.

2004-03-22  Jim Meyering  <jim@@meyering.net>

	* man/Makefile.am (.x.1): Remove --info-page= option, reverting
	the change of 2004-01-22.  I can no longer reproduce the problem
	that prompted that change, and `info coreutils pr' would display the
	`printing text' section of the manual, not the one on `pr invocation'.

	* tests/du/files0-from (nul-1, nul-2): Adjust expected diagnostics
	to match corrected output.

	* src/du.c: Include "readtokens0.h" rather than "readtokens.h".
	(main): Use readtoken0 functions rather than readtokens.
	Don't use errno when diagnosing readtokens0 failure.
	Fix off-by-one error in the token number reported in a diagnostic.
	(du_files): Return bool, rather than int.
	(main): Call readtokens0_free.

2004-03-21  Jim Meyering  <jim@@meyering.net>

	* src/remove.c (ds_free): Plug a small leak.

	* tests/Fetish.pm: Fix typo in comment.

2004-03-07  Jim Meyering  <jim@@meyering.net>

	* NEWS: du accepts a new option --files0-from=FILE, where FILE
	contains a list of NUL-separated file names.

	* src/du.c: Include "readtokens.h".
	(usage): Describe the new option, and adjust the `Usage':
	with this option, no FILE may be specified on the command line.
	(main): Handle the new option.

	* tests/du/files0-from: New tests, for the above.
	* tests/du/Makefile.am (TESTS): Add files0-from.

	* src/factor.c (do_stdin): Reflect changes in use of readtoken.
	* src/tsort.c (tsort): Likewise.

2004-02-29  Paul Eggert  <eggert@@twinsun.com>

	* NEWS: Add support for a new notation @@N to get_date to represent
	the time stamp with numeric value N.  Improve support for
	fractional time stamps.  date's -d and -f options now accept them.
	Likewise for touch -t.  date has a new option --iso-8601=ns.

	* doc/coreutils.texi (touch invocation):
	Describe use of fractional seconds.
	(date invocation, Options for date): Likewise.
	* doc/getdate.texi (General date syntax, Time of day items): Likewise.
	* doc/coreutils.texi (date invocation): Mention effect of LC_TIME.
	(Options for date): Describe new --iso-8601=ns option.

	* doc/getdate.texi: Add copyright notice.  Change getdate to
	get_date when talking about the function name.
	(Seconds since the Epoch): New section, containing the time_t
	info moved from Date input formats section, along with new
	info about the @@ syntax.  Mention negative time stamps,
	fractional time stamps, and leap seconds.
	(General date syntax): Modernize examples a bit to reflect new
	features.
	(General date syntax, Relative items in date strings):
	Use ' rather than " to quote formats.
	(Time of day items): Add an example with fractional seconds.
	Describe fractional-second syntax.

	* src/Makefile.am (touch_LDADD): New macro, since `touch' now
	needs clock_gettime.

	* src/date.c (enum Time_spec): New enum TIME_SPEC_NS.
	(time_spec_string, time_spec, show_date): Support it.
	(usage): Remove description of -ITIMESPEC, as it's obsolete and
	confusing.  Mention --iso-8601=ns.
	(batch_convert): getline returns ssize_t, not int.

	* src/touch.c (newtime): Now an array of two timespecs, one
	for access and one for modification.
	(ref_stats): Remove.
	(get_reldate): Use get_date's parameter profile.
	(touch, main): Adjust to above changes.
	(main): Work even if tm_year == INT_MAX (so long as long int is wider).
	Use gettime instead of gettimeofday, for new get_date signature.

	* tests/date/Test.pm (test_vector): New tests epoch, ns-10, ns-max32,
	ns-relative.

2004-03-15  Jim Meyering  <jim@@meyering.net>

	* Makefile.maint (alpha beta major): `Make' the emit_upload_commands
	target before updating $(prev_version_file).

	* tests/misc/date-sec: New file, to test for just-fixed bug in date.
	See today's change in lib/getdate.y.
	* tests/misc/Makefile.am (TESTS): Add date-sec.

2004-03-14  Jim Meyering  <jim@@meyering.net>

	* announce-gen (print_changelog_deltas): Use `.sig' suffix for
	signature files, not `.asc'.  Reported by angico@@yahoo.com.

2004-03-13  Jim Meyering  <jim@@meyering.net>

	* src/cp.c (do_copy): Tweak wording in a diagnostic.
	Suggestion from Karl Berry.
	Include "quoatearg.h".
	(do_copy): Use quotearg_colon (not quote) for diagnostics
	that begin with `"%s:'.

	* src/nl.c (usage): Specify that nl uses _basic_ regular expressions.
	Suggestion from Dan Jacobson.

d1490 1
a1490 1
	Reported by Dániel Varga.
d3468 1
a3468 1
	Suggestion from Göran Uddeborg.
d3471 1
a3471 1
	Reported by Göran Uddeborg.
d4290 1
a4290 1
	François Pinard reported that `du symlink-to-dir/' was not
@


