+2006-08-10 Jim Meyering <jim@meyering.net>
+
+ * src/dircolors.hin: Add a TERM directive for each of the following:
+ ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
+ rxvt-cygwin-native, screen.linux, xterm-256color.
+ Sort the TERM directives.
+ From Mike Frysinger.
+
+2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/dd.c (usage): Warn about oflag=append without conv=notrunc.
+ See Debian bug 373736.
+
+ * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian
+ bug 317503.
+
+ * src/.cvsignore: Add shuf.
+
+ * Makefile.maint: Remove the po-update procedure; it doesn't
+ work with the new repository on http://www.iro.umontreal.ca/.
+ For now I guess we'll have to fix things by hand.
+ (do-po-update, po-update): Remove. All references removed.
+
+ * src/shuf.c (next_line): New function.
+ (read_input): Use it, to avoid relying on GCC-specific behavior
+ with void * arithmetic. Problem reported by Bob Proulx.
+ * Makefile.maint (my-distcheck): Compile with -Wpointer-arith
+ to detect this sort of problem automatically in the future.
+
+2006-08-09 Jim Meyering <jim@meyering.net>
+
+ * src/ls.c: Add a compile-time check to ensure that filetype
+ and filetype_letter have the same number of elements.
+
+ * tests/misc/sort-rand: Remove use of --seed=S.
+
+2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ Add a command 'shuf', and modify shred and sort to use the new
+ random number generator library of 'shuf'.
+
+ * AUTHORS: Add shuf.
+ * README: Likewise.
+ * NEWS: Likewise. Mention new --random-source option for shred
+ and sort. Move "sort +1 -2" notice to the appropriate section,
+ and clarify its role with respect to POSIXLY_CORRECT.
+ * man/.cvsignore: Add shuf.1.
+ * man/Makefile.am (dist_man_MANS): Add shuf.1.
+ (shuf.1): New dependency.
+ * man/shuf.x: New file.
+ * src/Makefile.am (bin_PROGRAMS): Add shuf.
+ (EXTRA_DIST): Remove rand-isaac.c.
+ (shuf_LDADD): New macro.
+ * src/rand-isaac.c: Remove, moving most of its contents to
+ lib/rand-isaac.c.
+ * src/shuf.c: New file.
+ * src/shred.c: Use new random-number interface rather than rand-isaac.c.
+ Don't include rand-isaac.c; include randint.h and randread.h instead.
+ (RANDOM_SOURCE_OPTION): New enum.
+ (long_opts, usage, main): New option --random-source.
+ * src/sort.c: Likewise.
+ * src/shred.c (struct irand_state, irand_init, irand32, irand_mod): Remove.
+ All callers changed to use randint interface.
+ (fillrand): Remove. All callers changed to use randread interface.
+ (dopass): Remove dependency on ISAAC buffer size.
+ (genpattern): Don't wipe the random state here.
+ (randint_source): New static var.
+ (clear_random_data): New function.
+ (main): Allocate random source, and arrange to wipe it on exit.
+ * src/sort.c: Include md5.h, randread.h, xmemxfrm.h.
+ (longopts, usage, main): Remove undocumented --seed option;
+ it's now replaced by --random-source.
+ (rand_state, get_hash): Remove.
+ (randread_source): New static var.
+ (random_state, cmp_hashes, compare_random): New functions; they guarantee
+ no collisions in the random hash function.
+ (keycompare): Use compare_random for -R; don't fall back on comparing
+ via memcoll, since compare_random does the right thing.
+ * tests/misc/Makefile.am (TESTS): Add shuf.
+ * tests/misc/shuf: New file.
+
+2006-07-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/copy.c (set_author): Preserve the st_author field via the
+ file descriptor dest_desc.
+
+2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: chmod now preserves setuid and setgid bits on directories
+ if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
+
+ Fix test case problems if working directory is setgid,
+ reported by Bob Proulx.
+ * tests/cp/fail-perm: Use symbolic mode so that we clear
+ setgid bit more reliably on directories.
+ * tests/mkdir/special-1 (set_mode_string): Likewise.
+
+2006-07-27 Jim Meyering <jim@meyering.net>
+
+ * src/chgrp.c (usage): Use correct grammar in description of the
+ --reference option
+ * src/chown.c (usage): Likewise.
+
+2006-07-26 Thomas Schwinge <tschwinge@gnu.org> (tiny change)
+
+ * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
+ Correctly access SRC_SB's element ST_AUTHOR.
+
+2006-07-26 Jim Meyering <jim@meyering.net>
+
+ * tests/ls/stat-failed: Adapt to match new expected output.
+ From Paul Eggert.
+
+ * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
+ than having the code test for all of the other types first.
+ Hoist the set-uid/gid-testing code "up" into this new block.
+ Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
+ C_ORPHAN, not as C_FILE.
+
+2006-07-26 Jim Meyering <jim@meyering.net>
+
+ Checking in a change from Paul.
+
+ 2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/ls.c (DT_INIT): Remove. All uses removed.
+ (enum filetype): Use an ordinary enum rather than trying to keep
+ the values in sync with DT_FIFO etc. That way, we don't have
+ to make special assumptions about them. All uses changed.
+ (whiteout): New constant member of enum filetype.
+ (filetype_letter): New constant, for use with enum filetype.
+ (FILETYPE_INDICATORS): New initializer list.
+ (print_dir): Add case for DT_WHT.
+ (gobble_file): If stat fails, don't discard information from
+ readdir; instead, preserve it so it can be printed.
+ (print_long_format): Fall back on readdir result if stat info
+ is not available. Use "?" to denote each unknown mode char,
+ instead of an overall "?", since we now know some of the mode
+ typically.
+ (print_type_indicator): Now that MODE isn't necessarily
+ useful, guard all uses.
+ Now that two blocks in the type-checking tree can set "type = C_FILE",
+ move the suffix-handling code out and down.
+
+2006-07-26 Jim Meyering <jim@meyering.net>
+
+ Prepare for the above change.
+ * src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
+ and adjust uses. From a patch by Paul Eggert.
+
+2006-07-26 Jim Meyering <jim@meyering.net>
+
+ * src/ls.c: Correct indentation/formatting in a few places.
+
+2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500".
+ Problem report and fix from Bob Proulx.
+ * NEWS: Clarify the "chmod 0500" news, and correct the vague
+ statements about compatibility with BSD.
+
+2006-07-25 Jim Meyering <jim@meyering.net>
+
+ * src/ls.c (gobble_file): When handling a stat-failed entry,
+ print the entry name not the absolute_name -- to be consistent
+ with the usual case.
+ * tests/ls/stat-failed: Update accordingly.
+
+ * src/ls.c: Add parens around the new uses of ?: ternary operator.
+
+ * src/dircolors.hin: Mention that ORPHAN refers not just to dangling
+ symlinks.
+
+ Get --dired offsets right when handling stat-failed entries.
+ * src/ls.c (print_long_format): Be careful to increment P by the
+ appropriate amount, even when inode_number_width and nlink_width
+ are zero.
+ * tests/ls/stat-failed: Test for the above.
+
+ * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
+ have_acl member. That would happen for a directory with both a
+ non-stat'able entry and one with an ACL.
+
+ * src/ls.c (gobble_file): Make it so failure to stat a
+ non-command-line file provokes an exit status of 1, not 0.
+ Say "cannot access" rather than "cannot stat".
+ * tests/ls/stat-failed: New file/test, for the above.
+ * tests/ls/Makefile.am (TESTS): Add stat-failed.
+ * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
+ of "cannot access " to diagnostic.
+
+ * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere.
+
+ * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
+ Replace all occurrences of "type == command_line" with the
+ equivalent, "command_line_arg".
+
+ * src/ls.c: Apply the stat-failed parts of Red Hat's
+ coreutils-selinux.patch. From Ulrich Drepper.
+ This makes it so files not mentioned on the command line (e.g.,
+ names read from a directory that *is* mentioned on the command
+ line) for which stat fails are still listed. With --color,
+ such files are colored just like ORPHANs (aka dangling symlinks).
+
+ * src/df.c (n_valid_args): Declare global to be static.
+
+2006-07-24 Jim Meyering <jim@meyering.net>
+
+ * tests/ls/stat-dtype: Skip this test on reiserfs, since that file
+ system lacks d_type support.
+
+2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * man/chmod.x: Update to reflect recent changes to coreutils.texi.
+
+2006-07-21 Jim Meyering <jim@meyering.net>
+
+ * src/su.c (usage): Correct typo in --help output: s/commmand/command/
+ Reported by Tim Waugh.
+ Also remove the comment duplicating much of --help output.
+
+ * src/ls.c (FILE_TYPE_INDICATOR_OPTION): Reposition this new
+ name so the list remains alphabetized.
+
+ Fix another bug: ls --indicator-style=file-type would call
+ stat for a symlink, even though it wasn't always needed.
+ In some cases, that unnecessary stat would cause ls to fail.
+ * src/ls.c (gobble_file): Don't treat symlinks specially (in
+ requiring a stat syscall). Remove the offending exclusion.
+
+ * NEWS: Mention the fix.
+
+ * tests/ls/stat-dtype: New file/test, for the above fix.
+ Also exercises the new df feature, below.
+
+ * src/df.c (main): Fail and don't print the headers if no
+ file system is processed. This makes it easy to test whether
+ a specified directory is on a file system of a given type or types.
+ Otherwise, applications would have had to parse df's output.
+ E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
+
+ Fix a bug: ls --file-type worked like --indicator-style=slash,
+ rather than like --indicator-style=file-type.
+ * src/ls.c (FILE_TYPE_INDICATOR_OPTION): New enum member.
+ (long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
+ not to 'p'.
+ (decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
+ * NEWS: Mention the fix.
+ * tests/ls-2/tests (file-type): New test, for the above fix.
+
+2006-07-19 Jim Meyering <jim@meyering.net>
+
+ * src/ls.c (print_dir): Give a better diagnostic for failed opendir.
+
+ * Makefile.am (EXTRA_DIST): Add build-aux/vc-list-files.
+
+2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: chmod, install, and mkdir now leave setgid and setuid bits
+ of directories alone unless you specify them explicitly.
+ install and mkdir now implement X correctly.
+ install now creates parent directories with mode 755, without
+ changing their owner or group.
+ * src/chmod.c (process_file): Adjust to mode_adjust API change.
+ * src/install.c: Include mkancesdirs.h.
+ (announce_mkdir, make_ancestor): New functions.
+ (DEFAULT_MODE): New macro, specifying initial value of 'mode'.
+ (mode): Use it.
+ (dir_mode, dir_mode_bits): New vars.
+ (main): Set dir modes separately from nondir, so that the X
+ op of -m works correctly.
+ (main): Remove cwd_errno cruft, since make_dir_parents no longer
+ affects cwd. Adjust to new make_dir_parents API.
+ (install_file_in_file_parents): 2nd arg is now char *, not char
+ const *. Use mkancesdirs instead of rolling our own code.
+ (change_attributes): Don't worry about AFS, since that kludge
+ should not be needed any more.
+ * src/mkdir.c (struct mkdir_options): New struct.
+ (announce_mkdir, make_ancestor): New functions.
+ (main): Use them. Adjust to mode_adjust API change. Stick with
+ umask 0. Use make_dir_parents for all the work.
+ * src/mkfifo.c (main): Adjust to new mode_adjust API.
+ * src/mknod.c (main): Likewise.
+ * tests/chmod/setgid: Do the setgid test instead of bailing.
+ * tests/mkdir/p-3: Remove re_protect case that no longer applies.
+ GNU chmod now behaves like other versions of chmod.
+ * tests/mkdir/perm: Add a test for the X bug.
+
+2006-07-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/base64.c (do_decode): Output to parameter OUT, not to stdout.
+ This doesn't fix any bugs, since OUT always equals stdout, but it
+ makes the code easier to understand.
+
+2006-07-14 Jim Meyering <jim@meyering.net>
+
+ * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
+ rather than open-coding it. Now supports mercurial, too.
+ * .hgignore: New file.
+ * Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
+ all generated files, including ones like configure and po/*.po
+ that are currently version-controlled in cvs.
+
+ * Makefile.am (EXTRA_DIST): Add a few more .??* files.
+ They've been in CVS, just haven't been distributed before this.
+ Distribute ChangeLog-2005, too.
+ (MAINTAINERCLEANFILES): Add THANKS-to-translators.
+
+2006-07-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * src/system.h: Assume <dirent.h> exists, since gnulib assumes
+ this now as well.
+
+2006-07-09 Jim Meyering <jim@meyering.net>
+
+ * tests/mv/dir2dir: Adjust so failing with ENOTEMPTY is ok, too.
+ That happens with Linux/tmpfs.
+ * tests/mv/Makefile.am (TESTS): Add dir2dir.
+
+2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ Adjust to recent updates from gnulib.
+ * src/dd.c (apply_translations): Use toupper rather than
+ islower followed by toupper; it's simpler and typically
+ faster now that we assume at least C89 semantics. Similarly
+ for tolower.
+ * src/sort.c (inittables): Likewise.
+ * src/expand.c (expand): Don't assume that isprint etc. return
+ booleans (needed for pre-C99 hosts).
+ * src/fmt.c (check_punctuation): Likewise.
+ * src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
+ * src/tr.c (is_char_class_member): Likewise.
+ * src/unexpand.c (unexpand): Likewise.
+ * src/join.c (is_blank): Remove; no longer needed. All uses
+ replaced by isblank (to_uchar (...)).
+ * src/pinky.c (create_fullname): Don't assume char is unsigned.
+ * src/printf.c (print_esc): Likewise.
+ * src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
+ (copy_unescaped_string): Likewise.
+ * src/stat.c (print_it): Likewise.
+ * src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
+ convenience on GNU systems. All uses changed. Don't bother
+ looking for any dirent.h substitute other than ndir.h.
+ (D_INO): Remove unnecessary parentheses.
+ (IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
+ (ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
+ (ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
+ to ctype.h equivalents.
+ (isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
+ All uses changed.
+
+2006-07-08 Jim Meyering <jim@meyering.net>
+
+ * tests/mv/dir2dir: New file, test for 2006-07-05 fix in copy.c.
+
+ * Makefile.maint (sc_the_the): New rule.
+
+ * src/dd.c (skip): Remove one of two adjacent "the"s in a comment.
+ * tests/Coreutils.pm (run_tests): Remove one of two adjacent "then"s
+ in a comment.
+
+2006-07-07 Jim Meyering <jim@meyering.net>
+
+ * NEWS: Mention that mv can now remove an empty destination directory,
+ and give an example. Prompted by a report from Florent Bayle.
+
+2006-07-05 Jim Meyering <jim@meyering.net>
+
+ * src/ls.c (usage): Correct the description of -G: it is useful
+ only in a long listing. Reported by Martin Pool in
+ <https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
+
+ * man/chmod.x: Correct the description of the sticky bit. Reported
+ by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
+
+ * src/copy.c (copy_internal): Don't work around old NFS clients like
+ SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
+ ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
+ a banal failure as a recursive move-into-self failure.
+ Reported by Florent Bayle in <http://bugs.debian.org/376749>.
+
+ * src/c99-to-c89.diff: Regenerate, to remove fuzz.
+
2006-07-03 Jim Meyering <jim@meyering.net>
+ Plug another unusual leak.
+ (AD_mark_helper): Free malloc'd filename if hash_insert says
+ that string is already in the hash table.
+
The dev/inode of the topmost directory in each hierarchy were not
being recorded.
* src/remove.c (remove_cwd_entries): Don't call cycle_check here.