1 2003-03-07 Jim Meyering <jim@meyering.net>
3 * src/du.c: Remove everything associated with mmap-stack.c.
4 This reverts the change of 2003-02-19.
8 * tests/du/basic: Add a test for the above fix.
9 Test the -S option using a hierarchy containing files, too,
12 2003-03-06 Jim Meyering <jim@meyering.net>
14 * tests/cp/same-file: Unset CDPATH. Otherwise, having the
15 CDPATH shell variable set could cause this test to fail.
16 Reported by Karl Berry.
18 2003-03-05 Jim Meyering <jim@meyering.net>
22 * src/printf.c (print_esc): Remove pointless comparison of unsigned
23 integer with zero, to avoid a warning from Intel's ecc.
24 Reported by Nelson Beebe.
26 * src/du.c (process_file): Sizes must all be of type uintmax_t.
27 Otherwise, for files or totals that are too big, numbers would
28 be truncated. Patch mostly by Michael Stone.
29 Reported by Ingo Saitz as Debian bug #183210.
31 * tests/du/8gb: New test for the above-fixed bug.
32 * tests/du/Makefile.am (TESTS): Add 8gb.
34 * src/du.c (MAX_N_DESCRIPTORS): Use 3 * UTILS_OPEN_MAX / 4
35 rather than UTILS_OPEN_MAX - 10.
37 2003-03-04 Jim Meyering <jim@meyering.net>
39 * README: Refer new feature discussion to bug-coreutils@gnu.org,
40 rather than bug-gnu-utils, now that the former is better known.
41 Suggestion from Göran Uddeborg.
43 * src/stat.c (usage): Capitalize consistently.
44 Reported by Göran Uddeborg.
46 * Makefile.maint (rel-files): Include $(signatures), so that
47 those files are also copied into $(release_archive_dir).
49 * src/df.c (find_mount_point): Call error here, now that restore_cwd
51 * src/remove.c (AD_pop_and_chdir): Likewise.
53 * tests/Makefile.am (check-root): Add fail-2eperm.
55 2003-03-03 Jim Meyering <jim@meyering.net>
57 * src/remove.c (remove_cwd_entries): Include the full filename of
58 the offending file, not just the basename.
60 * tests/misc/tty-eof: Set $ME properly.
62 * Makefile.maint (THIS_VERSION_REGEXP, PREV_VERSION_REGEXP):
63 Remove now-unused variables.
64 (tag-prev-version, prev-cvs-tag): Likewise.
66 * src/remove.c (remove_cwd_entries) [!ROOT_CAN_UNLINK_DIRS]: Give an
67 accurate diagnostic when failing to remove a file owned by some other
68 user. Reported by Ivo Timmermans via Michael Stone.
69 This fixes Debian bug# 178471.
71 * tests/rm/Makefile.am (TESTS): Add fail-2eperm.
72 * tests/rm/fail-2eperm: New test, for the above-fixed bug.
73 Based on a report from Ivo Timmermans.
75 2003-03-02 Jim Meyering <jim@meyering.net>
77 * src/copy.c (copy_internal) [un_backup]: When recovering from a
78 failure to create a hard link, do not remove the entry associating
79 the source dev/ino with the destination file name.
80 * tests/mv/Makefile.am (TESTS): Add hard-3.
81 * tests/mv/hard-3: New test, for the above-fixed bug.
82 Inspired by a report from Iida Yosiaki.
84 2003-03-01 Jim Meyering <jim@meyering.net>
86 * src/df.c (print_header): Don't embed spaces in a separate `Type'
87 header string. Instead, put `Filesystem' and `Type' headers in the
88 same string, so translators can use horizontal space as needed.
89 Reported by Jean Charles Delepine.
91 2003-02-28 Jim Meyering <jim@meyering.net>
93 * src/copy.c (copy_internal): When link fails because of an
94 existing destination file, unlink that file and try again.
95 Reported by Iida Yosiaki.
97 * tests/mv/Makefile.am (TESTS): Add hard-2.
98 * tests/mv/hard-2: New test for the above-fixed bug.
99 Based on a test case from Iida Yosiaki.
101 2003-02-26 Jim Meyering <jim@meyering.net>
103 * tests/du/basic: Don't test du's -b option here. Directory byte
104 counts are smaller (512 rather than 4096) on at least OSF/1 5.1
105 and IBM AIX 4.2. Reported by Nelson Beebe.
107 2003-02-25 Jim Meyering <jim@meyering.net>
109 * Makefile.maint (announcement): Now that ChangeLog entries
110 are output by announce-gen, don't do it here.
111 * announce-gen (print_changelog_deltas): New function.
114 2003-02-22 Jim Meyering <jim@meyering.net>
116 * announce-gen: New option: --release-type=TYPE
117 * Makefile.maint (beta, major): New targets. Remove `release'.
118 Put them all together on a line.
119 Pass the release type (via RELEASE_TYPE envvar) to the MAKE
120 invocation of `announcement'.
121 (announcement): Invoke announce-gen with --release-type=$RELEASE_TYPE.
123 * announce-gen: New option: --news=NEWS_FILE.
124 Extract NEWS entries here, not via rules in Makefile.maint.
125 * Makefile.maint (announcement): Now that NEWS entries are
126 extracted by announce-gen, don't do it here.
127 (news-r1, news-r2): Remove now-unused definitions.
129 2003-02-21 Jim Meyering <jim@meyering.net>
133 Merge in changes from autoconf's version of this file.
134 * Makefile.maint (www-gnu): Define.
135 (standards.texi-url_prefix): Use $(www-gnu).
136 (make-stds.texi-url_prefix): Likewise.
138 * src/cp.c: Include "mmap-stack.h".
139 (main): Invoke `run' through a macro that (when possible) runs it
140 with a large, mmap'd stack.
142 * src/cp.c (run): New function, preparing for the above.
143 Exit from this function, not from main
146 * src/du.c: New option: --apparent-size.
147 (enum) [APPARENT_SIZE_OPTION]: New member.
148 (long_options): Add it.
149 (usage): Describe it.
151 ['b']: Set apparent_size.
152 David Eisner reported that the behavior of --bytes had changed.
153 Paul Eggert proposed the use of a new option, --apparent-size.
155 * src/du.c (apparent_size): New global.
156 (print_only_size): Reflect the fact that we're printing byte counts,
157 not ST_NBLOCKSIZE-byte-block counts.
158 (print_size): Call print_only_size rather than duplicating its code.
159 (process_file): Accumulate byte counts, rather than block counts.
161 * src/du.c (process_file): Always reset size_to_propagate_to_parent
162 for --separate-dirs (-S).
164 2003-02-20 Jim Meyering <jim@meyering.net>
166 * Use automake-1.7.3. Regenerate dependent files.
168 * src/stat.c (print_stat): New format: %B (to print ST_NBLOCKSIZE).
169 This makes %b (number of ST_NBLOCKSIZE-byte blocks) more useful.
170 (usage) [%B]: Describe it.
173 * src/du.c (process_file): Reorganize the code to use only
174 one `sum' array, and change how -S works back to the way it was
175 before 2003-01-31. Patch by Bruno Haible.
177 * tests/du/basic: New test.
178 * tests/du/Makefile.am (TESTS): Add basic.
180 * tests/envvar-check: Add checks for the following:
181 BLOCK_SIZE, DU_BLOCK_SIZE, DF_BLOCK_SIZE, LS_BLOCK_SIZE.
183 * tests/Makefile.am: Rename phony target envvar-check to evar-check
184 so as not to conflict with the distributed file by the same name.
186 * src/du.c (process_file): Set info->skip before any possible return.
188 Report correct usage for directories, not 0.
189 * src/du.c (process_file): Return for `file_type == FTW_DPRE'
190 _before_ recording the dev/ino of a directory.
191 Reported by Bruno Haible.
193 Now, df always displays the device file name corresponding to the
194 listed mount point under `Filesystem'. Before, for an unmounted
195 block- or character-special file argument, it would display the
196 command-line argument instead.
197 * src/df.c (show_disk): Return a value indicating whether
198 there was a match. Don't try to find a mount point here.
199 (show_entry): If show_disk doesn't find a match, call show_point.
201 2003-02-19 Jim Meyering <jim@meyering.net>
203 * src/du.c: Include "mmap-stack.h".
204 (du_files): Add prototype with ATTRIBUTE_NORETURN.
205 Exit from this function, not from...
207 Instead, if possible, invoke du_files through a macro that
208 runs it with a large, mmap'd stack.
210 * src/join.c (usage): Change wording in --help output:
211 use FILENUM instead of `SIDE' and say what FILENUM means.
212 Reported by Bernhard Gabler.
214 * src/df.c (print_header): Rather than using a hard-coded literal
215 string of spaces matching the length of the English `...Type' header,
216 output the right number of spaces to match the selected translation.
217 Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.
219 * src/split.c (bytes_split): Remove unnecessary `else' after break.
220 (lines_split): Likewise. and correct misleading indentation.
222 * src/split.c: Include "full-read.h".
223 (bytes_split, lines_split, line_bytes_split): Use full_read,
224 not safe_read. The way split was using the latter, a short read
225 could cause split to terminate before EOF.
227 * tests/misc/tty-eof: Test all programs that can read stdin,
228 requiring no arguments and that write to standard output.
230 * tests/misc/tty-eof: New file. Renamed from ...
231 * tests/misc/cat-tty-eof: Remove file. Rename to tty-eof.
232 * tests/misc/Makefile.am (TESTS): Reflect renaming.
234 2003-02-18 Jim Meyering <jim@meyering.net>
236 cksum would perform an extra read after encountering EOF
237 * src/cksum.c (cksum): Exit the loop upon EOF, too.
238 Patch by Michael Bacarella.
240 Test for the bug fixed today in cksum, md5sum, and sha1sum.
241 * tests/misc/cat-tty-eof: Generalize, clean-up, and test for
242 cat, cksum, md5sum, and sha1sum all in the same loop.
244 2003-02-14 Jim Meyering <jim@meyering.net>
246 * src/remove.c: Include "euidaccess.h".
247 Remove declaration of euidaccess.
249 2003-02-12 Jim Meyering <jim@meyering.net>
251 * src/pathchk.c (portable_chars_only): Remove unnecessary `const'
252 in cast to avoid warning from icc. Reported by Alexandre Duret-Lutz.
254 2003-02-10 Jim Meyering <jim@meyering.net>
256 * src/test.c: Don't include group-member.h.
257 Include euidaccess.h.
258 (eaccess): Rewrite function to set the real uid and gid temporarily
259 to the effective uid and gid, then invoke 'access', and then set the
260 real uid and gid back. On systems that lack setreuid or setregid,
261 fall back on the kludges in euidaccess. Before, it would not work
262 for e.g., files with ACLs, files that were marked immutable,
263 or on file systems mounted read-only. Nelson Beebe raised the issue.
264 Paul Eggert suggested the new implementation.
266 2003-02-09 Jim Meyering <jim@meyering.net>
268 * src/test.c (test_stat): Remove function. It's job is done (only
269 when necessary) by the wrapper in lib/stat.c. Adjust all uses.
271 2003-02-08 Jim Meyering <jim@meyering.net>
275 * tests/mv/part-symlink: Don't assume that the file owner username
276 length is less than 9 in ls output: instead, omit that field
277 altogether. Reported by, and suggested fix from, Ferdinand.
279 * tests/du/restore-wd: New test for just-fixed bug in ftw.c.
280 * tests/du/Makefile.am (TESTS): Add restore-wd.
282 * src/rm.c: Correct now-invalid comment about cycle-detection.
284 2003-02-06 Jim Meyering <jim@meyering.net>
286 * NEWS: Add entries from old/*/NEWS
287 from fileutils-4.1 through 4.1.11 and
288 from sh-utils-2.0 through 2.0.15. Suggestion from Karl Berry.
292 * src/du.c (process_file): Don't return early for excluded files
293 or for files whose dev/inode we've already seen.
295 2003-02-05 Jim Meyering <jim@meyering.net>
297 * tests/du/exclude: New file.
298 * tests/du/Makefile.am (TESTS): Add exclude.
300 2003-02-04 Dmitry V. Levin <ldv@altlinux.org>
302 * src/who.c (print_boottime, print_deadprocs, print_runlevel):
303 Fix memory allocation arithmetic.
305 2003-02-04 Jim Meyering <jim@meyering.net>
307 `df /dev/block-or-char-device-file--not-mounted' now reports
308 the name of the file system on which the file resides, usually `/'.
309 Before, it would leave the `Mounted on' field blank.
310 * src/df.c (show_disk): Move function to precede find_mount_point.
311 (show_disk): Add parameter: STATP.
312 If we don't find a matching device name, then resort to calling
313 find_mount_point. Reported by Bob Proulx.
315 2003-02-03 Andreas Schwab <schwab@suse.de>
317 * tests/rm/cycle: Require non-root.
318 * tests/rm/isatty: Likewise.
320 2003-02-02 Jim Meyering <jim@meyering.net>
324 * man/Makefile.am (check-x-vs-1): Use @PATH_SEPARATOR@, not `:'.
326 Ensure that there are no offending uses of `:'.
327 * Makefile.maint (makefile_path_separator_check): New rule.
328 (local-check): Add it to the list.
330 2003-02-01 Jim Meyering <jim@meyering.net>
332 * src/du.c (MAX_N_DESCRIPTORS): Define.
334 * src/stat.c (G_fail): New global.
335 (human_time): Diagnose failed localtime, not failed nstrftime.
336 (main): Fail if G_fail is set.
338 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
340 * tests/basename/Makefile.am: Use @PATH_SEPARATOR@ instead of
341 hard-coding the path-separator. Also double-quote the new PATH,
342 to avoid problems when the path-separator is a semi-colon or when
343 `pwd` contains e.g. a space.
344 * tests/chgrp/Makefile.am: Likewise.
345 * tests/chmod/Makefile.am: Likewise.
346 * tests/chown/Makefile.am: Likewise.
347 * tests/cp/Makefile.am: Likewise.
348 * tests/dd/Makefile.am: Likewise.
349 * tests/dircolors/Makefile.am: Likewise.
350 * tests/du/Makefile.am: Likewise.
351 * tests/expr/Makefile.am: Likewise.
352 * tests/factor/Makefile.am: Likewise.
353 * tests/fmt/Makefile.am: Likewise.
354 * tests/install/Makefile.am: Likewise.
355 * tests/ln/Makefile.am: Likewise.
356 * tests/ls/Makefile.am: Likewise.
357 * tests/ls-2/Makefile.am: Likewise.
358 * tests/md5sum/Makefile.am: Likewise.
359 * tests/misc/Makefile.am: Likewise.
360 * tests/mkdir/Makefile.am: Likewise.
361 * tests/mv/Makefile.am: Likewise.
362 * tests/od/Makefile.am: Likewise.
363 * tests/rm/Makefile.am: Likewise.
364 * tests/rmdir/Makefile.am: Likewise.
365 * tests/seq/Makefile.am: Likewise.
366 * tests/sha1sum/Makefile.am: Likewise.
367 * tests/shred/Makefile.am: Likewise.
368 * tests/stty/Makefile.am: Likewise.
369 * tests/sum/Makefile.am: Likewise.
370 * tests/tail-2/Makefile.am: Likewise.
371 * tests/touch/Makefile.am: Likewise.
372 * tests/tsort/Makefile.am: Likewise.
373 * tests/unexpand/Makefile.am: Likewise.
375 2003-01-31 Jim Meyering <jim@meyering.net>
377 * src/stat.c: Include "file-type.h"
378 (print_human_type): Remove function.
379 (human_access): Rename from print_human_access. Return a string.
380 (human_time): Rename from print_human_time. Return a string.
381 (print_stat): Arrange so that field width and an alignment specifier
382 are honored for the %A, %F, %x, %y, and %z formats.
383 [%F]: Use file_type; this gives slightly different file type strings,
384 e.g., `directory' instead of `Directory' and `regular file' or
385 `regular empty file' instead of `Regular file'.
386 Prompted by a report from Richard Dawe that the uses of
387 S_IFSOCK and S_IFIFO in print_human_time were not portable
388 to systems using e.g., DJGPP.
390 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
392 * src/stat.c (print_stat): Use S_ISLNK rather than an explicit
393 test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
395 2003-01-31 Jim Meyering <jim@meyering.net>
397 * src/du.c (main): Upon processing an invalid option or an invalid
398 --exclude-from or --max-depth option argument, don't exit right away,
399 in case there are others. Rather record the failure and exit after
400 processing other options.
402 * GNUmakefile (TAR_OPTIONS): Set and export, in order to make
403 tar archive easier to reproduce.
405 Rewrite to perform directory traversal using nftw.
407 * src/du.c: Include "dirname.h", "ftw.h", and "quotearg.h".
409 (opt_one_file_system): Move global into `main'.
410 (path, xstat, exit_status): Remove declarations.
411 (arg_length, suffix_length): New globals.
412 (G_fail): New global, sort of like the old `exit_status'.
413 (IS_FTW_DIR_TYPE): Define.
414 (print_only_size): New function.
415 (process_file): New function.
416 (str_init, ensure_space, str_copyc, str_concatc): Remove functions.
417 (str_trunc, pop_dir, count_entry): Likewise.
418 (du_files): Rewrite to use nftw.
420 2003-01-30 Jim Meyering <jim@meyering.net>
422 * tests/du/trailing-slash: Ensure that du/ftw follows a command-line
423 symlink-to-directory with -L, even without the trailing slash.
425 2003-01-27 Jim Meyering <jim@meyering.net>
427 * src/Makefile.am (check-misc): Check for st_blocks, too.
429 * src/stat.c (print_stat): Use ST_NBLOCKS rather than `->st_blocks'.
430 Reported by Richard Dawe.
432 2003-01-27 Andreas Schwab <schwab@suse.de>
434 * src/ls.c (quote_name): Add fourth parameter, width, into which to
435 store the screen columns, and return the number of bytes instead.
436 (print_dir): Pass NULL as fourth parameter of quote_name.
437 (print_name_with_quoting): Likewise.
438 (length_of_file_name_and_frills): Get the width from the fourth
439 parameter of quote_name instead of return value.
441 2003-01-27 Jim Meyering <jim@meyering.net>
443 * src/ls.c (decode_switches): If `dired' is set without
444 `format == long_format', then silently reset dired. This doesn't
445 change the behavior of ls (all prior uses of dired were protected
446 by `&& format == long_format'), and lets us...
447 (DIRED_INDENT): ... remove the `format == long_format' conjunct.
448 (PUSH_CURRENT_DIRED_POS): Likewise.
451 2003-01-22 Jim Meyering <jim@meyering.net>
453 * tests/du/no-x: New test, for functionality added to lib/ftw.c.
454 * tests/du/Makefile.am (TESTS): Add no-x.
456 2003-01-21 Jim Meyering <jim@meyering.net>
458 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS
459 && HAVE_STRUCT_DIRENT_D_TYPE]: If a file has d_type == DT_UNKNOWN
460 it may still be a directory -- or not (e.g., with FreeBSD on an
461 NFS-mounted file system), so resort to calling lstat to find out.
462 Based on a patch by Michael van Elst.
464 * tests/cp/same-file: Don't assume that the file owner username
465 length is less than 9 in ls output: instead, omit that field
466 altogether. Reported by, and suggested fix from, Ferdinand.
468 2003-01-20 Jim Meyering <jim@meyering.net>
470 * tests/date/Test.pm (wide-fmt): New test to demonstrate that
471 large format widths no longer cause strftime to infloop.
473 * Makefile.maint (mail_gpg_sign_cookie): Remove now-unused definition.
475 2003-01-19 Jim Meyering <jim@meyering.net>
477 * src/readlink.c: Include "canonicalize.h".
479 2003-01-18 Jim Meyering <jim@meyering.net>
481 * src/ls.c (Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]:
483 (enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
484 (long_options): Add option --dereference-command-line-symlink-to-dir.
485 (main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
486 rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
487 -d, -F, -l options is specified.
488 (decode_switches): Handle --dereference-command-line-symlink-to-dir.
489 (gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
490 Change --dereference-command-line (-H) to dereference *all*
491 command line arguments, including broken symlinks.
493 2003-01-15 Paul Eggert <eggert@twinsun.com>
495 Change ls -H back to the way it was yesterday, since this is
496 compatible with FreeBSD and the POSIX spec is confusing
497 and somewhat contradictory.
499 * src/ls.c (DEREF_COMMAND_LINE_ARGUMENTS): Change name back
500 from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
501 (long_options): Change the long option name back.
502 (usage): Change the usage back.
503 (gobble_file): When -H is specified, dereference a top-level
504 arg even if it points to a non-directory.
506 2003-01-15 Jim Meyering <jim@meyering.net>
508 * src/ls.c (gobble_file): Fall back on using lstat when required:
509 when --dereference (-L) is not specified, and
510 - when operating on a dangling symlink
511 - when operating on command-line-symlink-to-directories
512 This fixes numerous problems. Here are examples:
513 - `ls dangling-symlink' would fail with `no such file...'
514 Now it prints `dangling-symlink'.
515 - `ls -i symlink' would mistakenly print the inode of the referent.
516 Now it prints the inode of the symlink. Likewise for --size (-s).
517 Based on a patch from Michael Stone.
518 Reported by Deepak Goel as Debian bug #173793.
520 Rename ls's --dereference-command-line (-H)
521 option to --dereference-command-line-symlink-to-dir.
522 * src/ls.c [enum Dereference_symlink]
523 (DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
524 DEREF_COMMAND_LINE_ARGUMENTS. Update all uses.
525 (long_options): Rename the long option.
526 (usage): Say that --dereference-... changes how ls treats
527 only symlinks to directories specified on the command line.
529 2003-01-14 Jim Meyering <jim@meyering.net>
531 * tests/ls/dangle: New file/test, for the above fix.
532 * tests/ls/inode: Another new file/test, for the above fix.
533 * tests/ls/Makefile.am (TESTS): Add dangle and inode.
535 * src/ls.c (gobble_file): Fix a bug introduced in 4.5.4 that made it
536 so that ls --color would no longer highlight the names of files with
537 the execute bit set when not specified on the command line.
538 Patch by Michael Stone. Reported by Stephen Depooter as
541 * tests/ls-2/tests (color-exe): New test, for the above fix.
543 2003-01-13 Jim Meyering <jim@meyering.net>
545 * tests/shred/exact: Also test for just fixed bug with --zero.
547 * src/shred.c (long_opts): --zero does not require an argument.
548 Patch by Michael Stone. Reported by Roland Turner as Debian bug 172019.
550 2003-01-12 Jim Meyering <jim@meyering.net>
552 * Makefile.maint (cvs-update): Skip any file with local modifications.
554 * src/unexpand.c (usage): Document --first-only and mention that
555 --tabs=N (-t) enables --all (-a). Reported by wiregauze@yahoo.com.
557 2002-12-01 Dmitry V. Levin <ldv@altlinux.org>
559 * src/df.c: Include "canonicalize.h".
560 Use canonicalize_file_name unconditionally.
562 2003-01-09 Jim Meyering <jim@meyering.net>
564 * README: Add readlink.
566 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
568 * src/df.c: Include "xgetcwd.h".
569 * src/pwd.c: Likewise.
571 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
573 * src/shred.c: Remove declaration of xstrdup.
574 We already get it via xalloc.h which is included via system.h.
576 2002-08-27 Dmitry V. Levin <ldv@altlinux.org>
578 New program: readlink.
580 * src/Makefile.am (bin_PROGRAMS): Add readlink.
581 * src/readlink.c: New file.
583 * man/readlink.x: New file.
584 * man/Makefile.am (dist_man_MANS): Add readlink.1.
585 (readlink.1): New rule.
587 2003-01-09 Jim Meyering <jim@meyering.net>
589 When selecting ranges of byte offsets (as opposed to ranges of fields)
590 and when --output-delimiter=STRING is specified, output STRING between
591 ranges of selected bytes.
592 * src/cut.c (RANGE_START_SENTINEL): Define.
593 (output_delimiter_specified): New global.
594 (print_kth): Add parameter. Adjust all callers.
595 (set_fields): Mark each range-start index with RANGE_START_SENTINEL.
596 (cut_bytes): When requested, output STRING between ranges of
598 (main): Make a diagnostic a little clearer.
599 Based on a patch from Jan Nieuwenhuizen.
601 * tests/cut/Test.pm: New tests for the above.
603 * src/cut.c (set_fields): Make code agree with comment:
604 Don't merge abutting ranges like 4- and 2-3. This makes no
605 difference currently, but is required to support an upcoming change.
607 2003-01-07 Jim Meyering <jim@meyering.net>
609 * src/cut.c (set_fields): Fix typo in comment.
611 * tests/touch/not-owner: New test, mostly extracted from fail-diag.
612 * tests/touch/Makefile.am (TESTS): Add not-owner.
613 * tests/touch/fail-diag: Remove the test for non-owner diagnostic.
614 Now, this tests only the nonexistent-directory diagnostic.
615 Suggestion from Michael Stone.
617 * tests/touch/fail-diag: Fix typo: s/ld/ls/.
619 2003-01-04 Jim Meyering <jim@meyering.net>
621 * src/copy.h: Remove use of PARAMS.
622 * src/remove.h: Likewise.
623 * src/chown-core.h: Likewise.
625 rm could be tricked into mistakenly reporting a cycle.
626 * src/remove.c: [cycle_check_state]: New global.
627 (remove_cwd_entries): Adapt to new semantics of cycle_check.
628 (rm): Call cycle_check_init and cycle_check_free for each file.
629 * tests/rm/cycle (rm): New test, for the above fix.
630 * tests/rm/Makefile.am (TESTS): Add cycle.
632 When rm detects a cycle, don't abort the entire command,
633 but rather just the affected command line argument.
634 * src/remove.c: Include <setjmp.h>
635 (struct dirstack_state) [current_arg_jumpbuf]: New member.
636 (remove_cwd_entries): Call longjmp if we detect a cycle.
637 (rm): Call setjmp here.
639 * src/remove.c (cycle_check, is_power_of_two): Remove functions.
640 Instead, include cycle-check.h and use it.
642 * src/remove.h (struct dev_ino): Remove declaration.
644 * src/remove.c (remove_cwd_entries): Fix typos in comment.
646 Don't include trailing /. in diagnostics about directories.
647 * src/remove.c (full_filename_): When FILENAME is just `.'
648 and there is a nonempty directory-name part, don't append `/.'.
649 * tests/rm/unread2: Remove trailing /. from diagnostic.
650 * tests/rm/rm2: Likewise.
652 * src/remove.c (struct dirstack_state): Define.
653 To be used in place of these file-scoped globals ...
654 (dir_stack, len_stack, Active_dir): Remove globals.
655 (ds_init, ds_free): New functions.
656 (full_filename): Define.
657 (full_filename_): Rename from full_filename.
659 Begin to make AD_* functions more generic.
660 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
662 (AD_INIT_OTHER_MEMBERS): Define.
663 (remove_dir): Define the `status' member manually after each
664 call to AD_push or AD_push_initial.
666 * src/Makefile.am (check-misc): New rule, to ensure that no more
667 S_IS* macro definitions sneak into the code.
668 (check): Depend on check-misc.
670 * src/remove.c [S_ISLNK]: Don't define. It's already defined in sys2.h.
671 * src/du.c (count_entry) [S_ISLNK]: Don't define.
672 * src/shred.c [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.
674 2003-01-03 Jim Meyering <jim@meyering.net>
676 * src/true.c: Add copyright.
677 (AUTHORS): I suppose I've written it.
679 * src/Makefile.am (false.c): Make the generated file be read-only.
681 2003-01-04 Jim Meyering <meyering@lucent.com>
683 * src/ls.c: Include "dev-ino.h".
684 [struct dev_ino]: Remove declaration.
686 2003-01-02 Jim Meyering <meyering@lucent.com>
688 * src/cp.c (do_copy): Tweak diagnostic to be consistent with the one
689 from mv: s/missing file arguments/missing file argument/.
690 With --target-directory=DIR, cp and mv work with a single file argument.
691 Reported by Karl Berry.
693 * tests/rm/isatty: Enable this test.
695 2002-12-31 Jim Meyering <meyering@lucent.com>
697 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
699 (AD_INIT_OTHER_MEMBERS): Define.
700 (remove_dir): Define the `status' member manually after each
701 call to AD_push or AD_push_initial.
703 * src/ls.c [struct dev_ino]: Remove definition.
704 Include "dev-ino.h" instead.
706 2002-12-28 Jim Meyering <meyering@lucent.com>
708 * tests/du/Makefile.am (TESTS): Add no-deref.
709 * tests/du/no-deref: New script.
711 2002-12-23 Jim Meyering <meyering@lucent.com>
713 * src/remove.c (remove_cwd_entries): Fix typo in comment.
715 2002-12-21 Jim Meyering <jim@meyering.net>
717 * announce-gen: Generate MML-formatted announcement.
718 This makes it a *lot* harder to send stale MD5/SHA1 signatures.
720 2002-12-20 Jim Meyering <jim@meyering.net>
722 * src/touch.c (touch): Change the wording of a diagnostic so
723 that it makes sense both when the file exists and when it doesn't.
724 Suggestion from Michael Stone.
726 2002-12-18 Jim Meyering <jim@meyering.net>
728 * src/stty.c (valid_options): Declare to be static.
730 2002-12-15 Jim Meyering <jim@meyering.net>
732 * Makefile.cfg: Remove rules related to generating m4/jm-glibc-io.m4.
734 * src/chmod.c, src/copy.c, src/copy.h, src/cp-hash.h, src/csplit.c:
735 * src/date.c, src/expr.c, src/fmt.c, src/id.c, src/install.c:
736 * src/ls.c, src/od.c, src/pathchk.c, src/pr.c, src/remove.c:
737 * src/shred.c, src/sort.c, src/stat.c, src/stty.c, src/sum.c:
738 * src/tee.c, src/test.c: Remove all uses of `PARAMS'.
740 * src/remove.c (PARAMS): Remove definition.
741 * src/sys2.h: Likewise.
743 * src/ls.c, src/stat.c, src/date.c: Remove declaration of nstrftime.
744 Include strftime.h instead.
746 2002-12-14 Jim Meyering <jim@meyering.net>
748 * Makefile.cfg ($(url_dir_list)): Use .../coreutils, not .../fetish.
750 * src/system.h [! HAVE_DECL_MEMRCHR]: Declare memrchr.
751 This is necessary at least for Irix6.5 when using c89.
752 Reported by Nelson Beebe.
754 * tests/misc/Makefile.am (TESTS): Add cat-tty-eof.
756 * tests/misc/cat-tty-eof: New test.
758 * src/mknod.c (usage): Specify how major and minor mode numbers
759 are interpreted. Report forwarded by Kristin E Thomas.
760 * src/mknod.c: Remove now-redundant usage-specifying comment.
762 2002-12-13 Jim Meyering <jim@meyering.net>
766 * tests/du/trailing-slash: Allow for a directory of size `0'.
767 That happens at least on file systems of type tmpfs on linux-2.4.18.
769 * announce-gen: New script to begin replacing the commands
770 associated with the rule here...
771 * Makefile.maint (announcement): Invoke announce-gen.
772 * Makefile.am (EXTRA_DIST): Add announce-gen.
774 * tests/cp/preserve-2: New file/test, for latest fix.
775 * tests/cp/Makefile.am (TESTS): Add preserve-2.
777 2002-12-11 TAKAI Kousuke <takai@vlsi.kuee.kyoto-u.ac.jp>
779 Fix a bug whereby cp would fail to parse an option like
780 --preserve=mode,ownership.
781 * src/cp.c (decode_preserve_arg): Advance `comma' to
782 point the character following the comma.
784 2002-12-11 Jim Meyering <jim@meyering.net>
786 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Undefine before defining,
787 in case it's already defined.
789 2002-12-09 Jim Meyering <jim@meyering.net>
791 * tests/touch/fail-diag: Don't get a test failure if /no exists.
792 Instead, evoke a framework failure if /no-$$ exists.
793 Reported by Michael Stone.
795 2002-12-08 Jim Meyering <jim@meyering.net>
797 * src/du.c (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
798 Define to rpl_lstat, so that even on systems like Solaris 2.8,
799 du honors (per POSIX) the trailing slash on an argument referring
800 to a symlink-to-directory.
802 2002-12-06 Jim Meyering <jim@meyering.net>
804 * Use autoconf-2.57. Regenerate dependent files.
805 * Use automake-1.7.2. Regenerate dependent files.
807 * src/ls.c (gobble_file): Also stat the file if it's a
808 regular file and --indicator-style=classify (aka -F).
809 Thanks to Ed Santiago for opening my eyes.
811 * tests/ls/file-type: New file. Test for the above.
812 A test to contrast ls -F and ls --indicator-style=file-type.
813 * tests/ls/Makefile.am (TESTS): Add file-type.
815 2002-12-04 Jim Meyering <jim@meyering.net>
817 * tests/ls/follow-slink: Make sure the symlink was created.
818 Richard Dawe reported that `ln -s link link' succeeds, but creates
819 no file on systems running some version of the DJGPP libc.
821 2002-12-03 Jim Meyering <jim@meyering.net>
823 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr)
824 since this package no longer panders to K&R compilers.
826 2002-12-02 Jim Meyering <jim@meyering.net>
828 * tests/du/slink: Skip this test if `.' is on a non-local file system.
830 * tests/Fetish.pm (_at_replace): Do the substitution only if there's
831 something to replace.
833 2002-12-01 Jim Meyering <jim@meyering.net>
835 * src/stat.c: Don't include <string.h> or <ctype.h>.
836 That's already done via system.h.
837 * src/dircolors.c: Don't include <ctype.h>.
839 2002-11-30 Jim Meyering <jim@meyering.net>
841 * ls.c (gobble_file): Remove the block of code that caused
842 `ls --color -F symlink-to-dir' to list the files in
843 `symlink-to-dir/.'. Now, it prints `symlink-to-dir@', (just
844 like `ls -F symlink-to-dir') but with the addition of highlighting.
845 Similarly, `ls --color -dF symlink-to-dir' would print
846 `symlink-to-dir/'; now it prints `symlink-to-dir@'.
847 Reported by Jeff Sheinberg as Debian bug #168203.
848 * tests/ls-2/tests (sl-F-color, sl-dF-color): New tests for the above.
850 ls is now more efficient: with certain options, it no longer needs
851 to stat each directory entry on systems with valid dirent.d_type.
852 * src/ls.c (print_dir): Add DT_LNK and DT_REG.
853 (main): Make --recursive set format_needs_type, not format_needs_stat.
854 (gobble_file): Remove a FIXME comment, now that it's fixed.
856 2002-11-24 Jim Meyering <jim@meyering.net>
858 * src/du.c (du_files): Don't strip any trailing slash.
859 Rewrite so that `/' is no longer represented internally as
861 (count_entry): When appending a file name component,
862 account for the fact that the current path may end in `/'.
863 François Pinard reported that `du symlink-to-dir/' was not
864 equivalent to `du symlink-to-dir/.'. Now it is.
865 * tests/du/trailing-slash: New file/test, for the above fix.
866 * tests/du/Makefile.am (TESTS): Add trailing-slash.
868 2002-11-23 Jim Meyering <jim@meyering.net>
870 * src/tac.c (output): Declare some local variables to be of type size_t,
871 rather than `int' to avoid warnings from gcc.
873 2002-11-21 Paul Eggert <eggert@twinsun.com>
875 * src/ls.c (decode_switches): Use case-sensitive matching to
876 decode the QUOTING_STYLE environment variable. This is more
877 consistent with the documentation, and with --quoting-style.
879 2002-11-21 Martin Buck <martin.buck@ascom.ch
881 * src/stty.c (struct speeds): Add support for all baud rates defined
884 2002-11-19 Jim Meyering <jim@meyering.net>
886 * tests/sum/sysv: Export LC_ALL=C, to avoid failure when
887 run in a UTF locale. Report and suggested fix by Bruno Haible.
888 * tests/fmt/basic: Likewise.
890 2002-11-17 Jim Meyering <jim@meyering.net>
892 * configure.ac: Update via autoupdate.
893 Add `AM_GNU_GETTEXT_VERSION(0.11.5)'.
895 * src/mv.c (movefile): Don't remove trailing slashes from SOURCE.
896 Reported by Hans Ginzel.
898 2002-11-15 Jim Meyering <jim@meyering.net>
900 * Makefile.cfg (gnu_rel_host): Define.
901 (url_dir_list): Choose from (alpha|ftp).gnu.org depending
902 on whether $(VERSION) looks like a major release number.
904 * Makefile.maint (mail_gpg_sign_cookie): Backslash-escape `#'.
905 (release): Rename from `alpha'.
906 (alpha): Depend on release.
908 * Makefile.maint (signatures): Define with ?=, so it's easy to override.
910 2002-11-14 Jim Meyering <jim@meyering.net>
912 * Makefile.maint (mail_gpg_sign_cookie): Make optional.
913 (announcement): Use the new variable.
915 * Makefile.maint: Sync with Bison, i.e.:
916 (po-check): Scan .l and .y files instead of the
917 .c and the .h files that they generate. This fixes the bug
918 reported by Tim Van Holder in:
919 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
920 Look for N_ as well as for _. Try to avoid matching #define for
924 2002-11-12 Jim Meyering <jim@meyering.net>
926 * src/ls.c (HAVE_SYMLINKS): Remove unnecessary macro definition.
927 Replace sole use with equivalent `#ifdef S_ISLNK'.
928 Inconsistency reported by Dmitry V. Levin.
930 2002-11-11 Jim Meyering <jim@meyering.net>
932 * src/stat.c (usage): Transform --help items output via s/ - / /,
933 so that help2man produces properly formatted man pages.
934 Reported by Herbert Xu as Debian bug #168400.
936 2002-11-10 Jim Meyering <jim@meyering.net>
938 * src/ls.c (sighandler): Handle SIGTSTP specially.
939 Based on suggestions from Solar Designer and Dmitry V. Levin.
942 * Makefile.cfg (cvs_files): Define. From autoconf.
943 (local_updates): Likewise.
945 * src/ls.c (restore_default_color_handler, sigtstp_handler):
947 (sighandler): New function, based on the one in sort.c.
948 (main): Use sigaction, if possible; otherwise signal.
949 Handle these signals:
950 SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
951 Don't register our handler if the signal is already being ignored.
953 * src/dd.c (interrupt_handler): Use raise, rather than kill+getpid.
954 * src/csplit.c (interrupt_handler): Likewise.
955 * src/sort.c (sighandler): Likewise.
956 (main): Declare `i' and `nsigs' to be unsigned, not int.
958 2002-11-09 Jim Meyering <jim@meyering.net>
960 ls --color: restore terminal text color upon signal.
961 * src/ls.c: Include "full-write.h" and <signal.h>.
962 (restore_default_color, restore_default_color_handler): New functions.
963 (sigtstp_handler, put_indicator_direct): New functions.
964 (main) [print_with_color]: Register signal handlers.
965 Patch mostly by Solar Designer and Stanislav Ievlev.
967 Update from autoconf.
968 * Makefile.maint (AMTAR): Remove definition.
969 (update, cvs-update, po-update, do-po-update): New rules.
970 (wget-update): Update (thus renaming to cvs-update).
971 (automake_repo): Use anoncvs@sources.redhat.com.
973 2002-11-06 Jim Meyering <jim@meyering.net>
975 * tests/misc/Makefile.am (TESTS): Add printf-hex.
977 * tests/misc/printf: Be careful to test the code in this package,
978 not the shell built-in function.
980 * src/printf.c (print_esc): A hexadecimal escape sequence has
981 at most two hex. digits, not three. Reported by Padraig Brady.
982 (usage): Update description.
983 * tests/misc/printf-hex: New file/test, for the above fix.
985 2002-10-07 Paul Eggert <eggert@twinsun.com>
987 Add support for locale-specific size indications (e.g.,
988 thousands-separators) and for explicit size suffixes on output.
990 * doc/coreutils.texi (Block size): Say that:
991 This affects display format as well as block size.
992 Fractional block counts are rounded up.
993 ls file size blocksize defaults to 1.
994 A block size spec preceded by ' generates thousands separators.
995 A suffix without a preceding integer generates suffixes.
996 (tail invocation): 32k -> 32 KiB.
997 (What information is listed): ls -h is now equivalent to
998 ls --block-size=human, and ls -H is now equivalent to
999 ls --block-size=si. Displayed file size is now always affected by
1002 * lib/inttostr.c, lib/inttostr.h, lib/imaxtostr.c, lib/offtostr.c,
1003 lib/umaxtostr.c: New files, taken from GNU tar.
1005 * lib/Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c,
1007 (EXTRA_DIST): Add inttostr.c.
1009 * lib/human.c, lib/human.h: Rewrite to support locale-specific
1010 notations like thousands separators.
1011 Specify what includer of include.h must include beforehand.
1012 (human_group_digits, human_suppress_point_zero, human_autoscale,
1013 human_base_1024, human_SI, human_B): New enum values.
1014 (human_readable): Rename from human_readable_inexact; put the
1015 options before the sizes. All uses changed. The old human_readable
1016 function has been removed; use inttostr.h instead.
1017 (human_options): Renamed from human_block_size, with new signature
1018 that allows block sizes up to UINTMAX_MAX. All callers changed.
1020 * m4/prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv,
1021 AC_HEADER_STDBOOL. No need to check for limits.h since it's in
1022 freestanding C89. No need to check for stdlib.h or string.h since
1023 autoconf does this now.
1025 * src/cksum.c (cksum): Use primitives from inttostr.h, not
1026 human.h, to print large numbers simply.
1027 * src/csplit.c (handle_line_error, parse_patterns): Likewise.
1028 * src/dd.c (print_stats, main): Likewise.
1029 * src/df.c (print_header): Likewise.
1030 * src/factor.c (print_factors): Likewise.
1031 * src/ls.c (print_long_format, print_file_name_and_frills): Likewise.
1032 * src/shred.c (dopass): Likewise.
1033 * src/sort.c (checkfp): Likewise.
1034 * src/sum.c (bsd_sum_file, sysv_sym_file): Likewise.
1035 * src/tail.c (xlseek): Likewise.
1036 * src/wc.c (write_counts, wc): Likewise.
1038 * src/df.c (human_output_opts): New var.
1039 (output_block_size): Now uintmax_t, not int, to handle larger
1040 block sizes. All uses changed.
1041 * src/du.c: Likewise.
1042 * src/ls.c: Likewise.
1044 * src/df.c (print_header): In the header line, prefer SI to human
1045 representation if it's shorter; if neither is shorter, try to
1046 intuit what the user would prefer.
1048 * src/expr.c (inttostr): Remove; use new imaxtostr library
1051 * src/ls.c (file_output_block_size): New var, to distinguish
1052 file sizes from other sizes.
1053 (decode_switches): Set it.
1055 * src/shred.c (OUTPUT_BLOCK_SIZE): remove.
1056 (dopass): When printing progress, use floor for what has been done
1057 so far (since we should be conservative there), and ceiling for
1058 what needs to be done (since that's what other programs use).
1060 2002-10-19 Jim Meyering <jim@meyering.net>
1062 * src/pinky.c (print_heading): Align TTY and Name headings.
1063 Reported by Karl Eichwalder.
1065 2002-10-18 Jim Meyering <jim@meyering.net>
1067 * src/split.c (cwrite): Change type of `bytes' parameter to size_t
1068 Remove now-useless cast.
1069 (stdread): Remove function.
1070 (bytes_split): Use size_t instead of int.
1071 Use safe_read, not stdread.
1072 (lines_split): Likewise.
1073 Use memchr rather than a `while' loop.
1074 (line_bytes_split): Use size_t instead of int.
1075 Use safe_read, not stdread.
1076 (main): Add some FIXME comments to remind me to remove casts.
1078 * src/system.h (ST_BLKSIZE): Correct comment describing how to
1079 reproduce HPUX-11 cat failure. From Petter Reinholdtsen.
1081 2002-10-17 Jim Meyering <jim@meyering.net>
1083 Fix a problem that could make e.g., `cat' misbehave on systems which
1084 give invalid (unreasonably large) values for stat.st_blksize.
1085 * src/system.h (ST_BLKSIZE): Ensure that the result is in [1..4MB].
1086 Reported by Petter Reinholdtsen.
1088 2002-10-14 Jim Meyering <jim@meyering.net>
1090 Specifying a printf conversion specifer as nl's separator string
1091 could cause nl to segfault.
1092 * src/nl.c (build_print_fmt): Don't include separator string
1093 in the printf format; it might contain `%'.
1094 Use a better bound on the length of the print_fmt buffer.
1095 (print_lineno): Print the separator here instead.
1096 Reported by Doug Coleman.
1098 * tests/misc/nl: New file/tests, including a test for the above.
1099 * tests/misc/Makefile.am (TESTS): Add nl.
1101 * tests/misc/split-l: New test, to make sure `split --lines=N' works.
1102 * tests/misc/Makefile.am (TESTS): Add split-l.
1104 2002-10-13 Jim Meyering <jim@meyering.net>
1108 * src/du.c (usage): Tweak description of --dereference-args/-D.
1110 * src/du.c (count_entry): Also save cwd when dereferencing (via
1111 --dereference-args, -D) a command-line argument.
1112 Reported by Michal Svec. Based on a patch by Andreas Schwab.
1114 * src/Makefile.am (../AUTHORS): New target/rule.
1116 2002-10-12 Jim Meyering <jim@meyering.net>
1118 * src/paste.c (paste_parallel): Declare local, `delims_saved', to be
1119 of type size_t, since that's the way it's used and avoids a warning.
1121 * src/csplit.c (struct cstring) [len]: Declare to be unsigned int,
1122 since that's how it's always used and avoids a new warning from gcc.
1123 (read_input): Adapt to new safe_read ABI.
1125 * src/cut.c (cut_fields): Add a temporary size_t variable, n_bytes,
1128 * src/pinky.c (print_long_entry): fread returns size_t.
1129 Declare local `bytes' accordingly, to avoid warning.
1131 tail -c +N would perform an extra read after encountering EOF
1132 [this change is analogous (bytes vs. lines) to the one of 2002-01-27]
1133 * src/tail.c (start_bytes): Detect EOF, inform caller.
1134 (tail_bytes): Upon EOF in start_bytes, return immediately.
1135 (file_lines): Reorganize to use memrchr rather than an explicit loop.
1136 Adapt to new safe_read ABI.
1138 2002-10-11 Jim Meyering <jim@meyering.net>
1140 * tests/du/deref: New file/test, for the above fix.
1141 * tests/du/Makefile.am (TESTS): Add deref.
1143 2002-10-10 Jim Meyering <jim@meyering.net>
1145 * tests/ln/Makefile.am (TESTS): Add target-1.
1146 * tests/ln/target-1: New file/test, for the fix on 2002-10-08.
1148 2002-10-09 Jim Meyering <jim@meyering.net>
1150 * tests/cp/backup-is-src: Ensure that certain environment variables
1151 are not set (e.g., SIMPLE_BACKUP_SUFFIX). Reported by Duncan Roe.
1153 * tests/tail-2/big-4gb: Mark this as an expensive test; it would
1154 consume 4GB of disk space on systems without support for sparse files.
1155 Fix a logic error that'd make it `cat err' even though dd didn't fail.
1157 * src/dircolors.hin (.jar): Fix typo: s/;3$/;31/.
1158 Patch by steven@magelico.net, forwarded by Michael Stone.
1160 * tests/ls/dired: Ensure that ls produces English messages.
1161 Patch by Alexey Vyskubov, forwarded by Michael Stone.
1163 2002-10-08 Dmitry V. Levin <ldv@altlinux.org>
1165 * src/ln.c (main): Fix target_directory parsing when n_files == 1.
1167 2002-10-08 Jim Meyering <jim@meyering.net>
1169 * tests/tail-2/big-4gb: Use double quotes around diagnostic.
1170 Fix syntax in test: use =, not ==.
1171 Reported by Bob Proulx.
1172 Change all the rest like this: grep -lR "testing framework'" .\
1173 |xargs perl -pi -e 's/'\''(\$0: failure in testing framework)'\''/"$1"/'
1175 * src/sum.c (sysv_sum_file): Adapt to new safe_read ABI.
1176 * src/tr.c (squeeze_filter, read_and_delete, read_and_xlate): Likewise.
1177 * src/tac.c (save_stdin, tac_stdin_to_mem): Likewise.
1178 * src/wc.c (wc): Likewise.
1180 2002-10-07 Paul Eggert <eggert@twinsun.com>
1183 Don't advance the write pointer past the end of the write buffer.
1184 * src/sort.c (begfield, limfield): Likewise.
1186 2002-10-07 Jim Meyering <jim@meyering.net>
1188 * src/cat.c (simple_cat, cat): Adapt to new safe_read ABI.
1189 * src/head.c (head_bytes, head_lines): Likewise.
1191 2002-10-06 Jim Meyering <jim@meyering.net>
1193 * src/dd.c (scanargs): Ensure that specified block sizes (specified
1194 via ibs=N, obs=N, and bs=N) are no larger than SSIZE_MAX.
1195 (skip, dd_copy): Adapt to new safe_read ABI.
1197 * Makefile.maint (signatures): Define.
1199 (announcement): Depend on $(signatures).
1201 * Makefile.maint (announcement): Output all URLs for detached
1202 signatures, not just the last one from the previous loop.
1204 2002-10-05 Jim Meyering <jim@meyering.net>
1208 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS]: With `rm -i DIR',
1209 don't recurse into directory, DIR. Prompted by a report from
1212 * tests/rm/i-no-r: New file/test, for the above fix.
1213 * tests/rm/Makefile.am (TESTS): Add i-no-r.
1215 * tests/tail-2/big-4gb: New file/test, for the fix of 2002-09-27.
1216 * tests/tail-2/Makefile.am (TESTS): Add big-4gb.
1218 2002-10-03 Jim Meyering <jim@meyering.net>
1220 * src/rm.c (AUTHORS): Mark translatable string with `N_ (...)'.
1221 * src/df.c (AUTHORS): Likewise.
1222 * src/du.c (AUTHORS): Likewise.
1223 * src/tail.c (AUTHORS): Likewise.
1224 * src/touch.c (AUTHORS): Likewise.
1226 2002-10-02 Jim Meyering <jim@meyering.net>
1228 * Makefile.am (SUBDIRS): Remove `old'.
1229 (EXTRA_DIST): List the files in old/.
1230 * configure.ac (AC_CONFIG_FILES): Remove old/* names.
1231 Suggestion from Akim Demaille.
1233 2002-10-01 Jim Meyering <jim@meyering.net>
1235 * src/sys2.h (SSIZE_MAX): Define.
1237 2002-09-30 Jim Meyering <jim@meyering.net>
1239 * src/csplit.c: Don't include stdlib.h here. It's already included
1242 2002-09-29 Jim Meyering <jim@meyering.net>
1244 * src/tr.c (find_bracketed_repeat): Rearrange pointer/integer
1245 expression to avoid bogus warning from gcc.
1247 * src/cat.c (simple_cat): Use a temporary to avoid bogus warnings.
1248 (cat): Declare insize and outsize to be of type size_t, not int.
1249 Rearrange pointer/integer expressions to avoid bogus warnings.
1250 (main): Declare insize and outsize to be of type size_t, not int.
1252 * src/tail.c (parse_options): Give a sensible diagnostic for
1253 an invalid byte or line count. Reported by Mikko Tuumanen.
1255 * src/touch.c (main): Split a long line.
1257 * tests/du/Makefile.am (TESTS): Add slink.
1258 * tests/du/slink: New test for system.h change of 2002-08-31.
1260 In move mode, always first try to rename. Before, upon failure to
1261 rename a directory, this code would never attempt to rename any
1262 other file in that directory, but would thenceforth always copy.
1263 On some systems (e.g., NetApp's OnTap-6.4), renaming a directory
1264 may fail with EXDEV, yet renaming files within that directory to
1265 a newly-created destination directory succeeds.
1266 * src/copy.c (copy_internal): Remove local, move_mode;
1267 use x->move_mode instead. Based on a patch from Tom Haynes.
1269 2002-09-28 Jim Meyering <jim@meyering.net>
1271 * src/split.c (FAIL_ONLY_ONE_WAY): New macro.
1272 Factor out some duplication.
1274 [case 'a']: Use strtoul rather than strtol to avoid compiler warnings.
1276 * src/sort.c (begfield, limfield): Rearrange comparisons to avoid
1278 (fillbuf, keycompare): Cast literal `-1' to size_t in comparisons,
1279 to avoid compiler warnings.
1281 * src/shred.c (dopass): Use a uintmax_t temporary to avoid bogus
1284 Fix things so `mkdir -p' can create very deep directories, e.g.,
1285 mkdir -p $(perl -e 'print "a/" x 40000') now works.
1286 * src/mkdir.c (main): For --parents (-p), call make_path with the
1287 entire directory name, so we don't ever require that file operations
1288 like stat or chmod be performed on the entire command line argument.
1289 * makepath.c (make_path): Restore umask *before* creating the final
1292 2002-09-27 Andreas Schwab <schwab@suse.de>
1294 * src/tail.c (tail_bytes): Change type of bytes_remaining to off_t
1295 to avoid overflow. Reported by Hans Lermen.
1297 2002-09-26 Jim Meyering <jim@meyering.net>
1299 * src/install.c (get_ids): Use strtoul, not strtol. Remove some casts.
1301 2002-09-25 Jim Meyering <jim@meyering.net>
1303 * src/test.c (eaccess): Change type of local `euid' from int to uid_t
1304 and add a cast, to avoid a warning about `signed and unsigned type in
1305 conditional expression'.
1307 2002-09-22 Jim Meyering <jim@meyering.net>
1309 * src/rmdir.c: Include "dirname.h", for declaration of
1310 strip_trailing_slashes.
1312 * src/stat.c (PRIdMAX, PRIuMAX): Remove definitions.
1313 Now they're defined through system.h.
1315 * src/cp-hash.c, src/dd.c, src/df.c, src/du.c, src/ls.c,
1316 * src/stat.c, src/wc.c: Remove all inclusions of inttypes.h,
1317 since it's already included from sys2.h via system.h.
1319 * Use automake-1.6f. Regenerate dependent files.
1321 * src/Makefile.am (PERL): Remove duplicate definition.
1323 fmt's -s, -t, -c options didn't work properly for long lines.
1324 Since get_line may end up calling put_paragraph (for long lines),
1325 be sure to set global, `other_indent', before it is used there.
1327 * src/fmt.c (set_other_indent): New function, factored out of...
1328 (get_paragraph): ... here. Call it.
1329 (get_line): Call set_other_indent before calling flush_paragraph,
1330 which calls fmt_paragraph, which in turn calls put_paragraph,
1331 which uses other_indent.
1333 * tests/fmt/Makefile.am (TESTS): Add long-line.
1334 * tests/fmt/long-line: New file/test, for the above fix.
1336 2002-09-21 Jim Meyering <jim@meyering.net>
1338 * src/od.c: No longer include deprecated <values.h>.
1339 It was required solely for now-removed reference to BITSPERBYTE.
1340 * src/install.c: Likewise.
1341 Suggestion from Bruno Haible.
1343 2002-09-06 Andreas Schwab <schwab@suse.de>
1345 `rmdir -p dir-specified-with-trailing-slash/' would fail.
1346 * src/rmdir.c (remove_parents): Strip trailing slashes.
1348 2002-09-20 Jim Meyering <jim@meyering.net>
1350 * tests/rmdir/t-slash: New file/test, for the above fix.
1351 * tests/rmdir/Makefile.am (TESTS): Add t-slash.
1353 * Makefile.maint (announcement): Arrange to gpg-sign the message.
1354 Add a URL for each detached signature file.
1356 2002-09-07 Bruno Haible <bruno@clisp.org>
1358 * configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation.
1360 2002-09-18 Jim Meyering <jim@meyering.net>
1362 `od -t x8' used the wrong (`l'-prefixed) printf format.
1363 Likewise for the o8 and u8 formats.
1364 * src/od.c (ISPEC_TO_FORMAT): Define macro.
1365 (decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG.
1366 Reported by Arun Sharma.
1368 2002-09-17 Jim Meyering <jim@meyering.net>
1370 * src/sys2.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary.
1371 From gettext's intl/loadmsgcat.c.
1373 * tests/od/x8: New file/test, for the above fix.
1374 * tests/od/Makefile.am (TESTS): Add x8.
1376 2002-09-15 Jim Meyering <jim@meyering.net>
1378 * Use autoconf-2.54. Regenerate dependent files.
1380 * src/csplit.c (get_format_width): Add cast to avoid
1381 warning about `signed and unsigned type in conditional expression'.
1383 2002-09-14 Jim Meyering <jim@meyering.net>
1385 * src/who.c (print_user): Change type of local to size_t
1386 to avoid warnings about `comparison between signed and unsigned'.
1387 * src/ptx.c (generate_all_output): Likewise.
1389 * src/dd.c (main, skip): Add casts to avoid warnings about
1390 `comparison between signed and unsigned'.
1392 * src/id.c (print_full_info, print_group_list): Add casts to avoid
1393 warnings about `signed and unsigned type in conditional expression'.
1395 * src/md5sum.c: Change type of global, digest_hex_bytes, to size_t
1396 to avoid warnings about `comparison between signed and unsigned'.
1397 (split_3): Change parameter names to be readable and add comment.
1398 Clean up the test for whether a line may be ignored.
1400 2002-09-13 Jim Meyering <jim@meyering.net>
1402 * src/printf.c (main): Handle leading command line argument of `--'.
1403 Reported by Raul: DervishD <raul@pleyades.net>
1404 * tests/misc/printf: New file: test for the above.
1405 * tests/misc/Makefile.am (TESTS): Add printf.
1407 * src/date.c (usage): Explain that %S's range of [0..60] is required --
1408 rather than 0..59 -- to accommodate the occasional positive leap second.
1409 Reported by Richard Neill.
1411 2002-09-12 Jim Meyering <jim@meyering.net>
1413 * src/Makefile.am (nanosec_libs): Define.
1414 (sleep_LDADD, tail_LDADD): Use it here.
1416 Factor nanosleep-related code into ../lib/xnanosleep.c.
1417 * src/sleep.c: Include xnanosleep.h.
1418 Factor out fenv.h-related code.
1419 (timespec_subtract): Remove function.
1420 (main): Remove code that deals with computing start and stop times
1421 as well as the loop around nanosleep. Now that's in xnanosleep.c.
1423 Allow S (in --sleep-interval=S) to be a floating point value.
1424 * src/tail.c: Include xnanosleep.h and xstrtod.h.
1425 Move declaration of global variable, sleep_interval, to ...
1427 (usage): Update description of --sleep-interval option.
1428 (tail_forever): New parameter, sleep_interval. Update caller.
1429 Use xnanosleep, rather than sleep.
1430 (parse_options): New parameter, sleep_interval. Update caller.
1431 Use xstrtod, now that we accept floating point values.
1432 Prompted by a patch from Augey Mikus.
1434 2002-09-06 Jim Meyering <jim@meyering.net>
1436 * src/remove.c (prompt): Change comment to give a better note to
1437 translators. From Michael Piefel.
1439 2002-09-02 Jim Meyering <jim@meyering.net>
1441 * README: A good problem report/patch includes diffs against
1442 the most recent test release.
1444 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Define.
1445 (pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
1447 * src/kill.c (print_table_row): Use an unsigned type for widths
1448 to avoid warning about comparison between signed and unsigned.
1449 (list_signals): Likewise.
1451 * src/od.c (skip): Add a cast to avoid warning about comparison
1452 between signed and unsigned.
1453 * src/install.c (get_ids): Likewise. Also rearrange range-checking
1454 comparisons to make them more readable.
1456 2002-09-01 Jim Meyering <jim@meyering.net>
1460 2002-08-31 Jim Meyering <jim@meyering.net>
1462 Symlinks were always reported as using 0 blocks.
1463 * src/system.h (ST_NBLOCKS): Don't depend on file type.
1464 This reverts the change of 2000-01-30.
1465 Based on a report and patch from Neil Brown via Michael Stone.
1466 This fixes Debian Bug#156358.
1468 * Most files: Change `exit (0)' to `exit (EXIT_SUCCESS)',
1469 `exit (1)' to `exit (EXIT_FAILURE)', and
1470 `usage (1)' to `usage (EXIT_FAILURE)'.
1472 * chgrp.c, chmod.c, chown.c, chroot.c, cp.c, date.c, dd.c, du.c,
1473 * hostname.c, id.c, install.c, ln.c, mkdir.c, mkfifo.c, mknod.c,
1474 * nice.c, pinky.c, printf.c, pwd.c, shred.c, sleep.c, stty.c,
1475 * su.c, tac-pipe.c, tail.c, tee.c, touch.c, uname.c, uptime.c,
1476 * users.c, who.c: Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
1477 But don't change `error (0, ...' to `error (EXIT_SUCCESS, ...', since
1478 error never exits successfully.
1480 2002-08-29 Jim Meyering <jim@meyering.net>
1482 * src/remove.c (remove_cwd_entries): Use closedir (not CLOSEDIR)
1483 when ignoring any return value.
1485 * src/remove.c (remove_cwd_entries): Detect and diagnose readdir
1486 failures. On some systems (at least EMC Celerra and Solaris5.8),
1487 this appears to be necessary.
1488 (is_empty_dir): Likewise. Also, always close directory handle.
1489 * src/ls.c (print_dir): Likewise.
1490 (print_dir): Rename local variable: reading -> dirp.
1491 Reported by Mike Coleman.
1493 2002-08-28 Jim Meyering <jim@meyering.net>
1495 * src/remove.c (remove_cwd_entries): Use CLOSEDIR, not closedir.
1496 Give a diagnostic and fail if closedir fails.
1498 2002-08-26 Jim Meyering <jim@meyering.net>
1500 * Makefile.am (THANKS-to-translators): New rule.
1501 (EXTRA_DIST): Add both THANKS-to-translators and THANKStt.in.
1502 * THANKStt.in: New file.
1504 * src/cat.c (close_stdout_wrapper): New, kludgey, function and
1506 (main): Register it with atexit.
1507 Close STDOUT_FILENO, to avoid a problem when writing to
1508 /dev/audio on at least Solaris 2.7 and 2.8 systems.
1509 Reported by Shing-Shong Shei.
1511 2002-08-25 Jim Meyering <jim@meyering.net>
1513 * src/cat.c (main): Close STDIN_FILENO rather than a literal `0'.
1514 * src/tac.c (main): Likewise.
1515 * src/tail.c (main): Likewise.
1516 * src/tee.c (main): Likewise.
1517 * src/tr.c (main): Likewise.
1518 * src/wc.c (main): Likewise.
1520 2002-08-20 Jim Meyering <jim@meyering.net>
1522 * tests/mv/setup: Rewrite not to use `: ${VAR=not_set}' paradigm.
1524 2002-08-10 Paul Eggert <eggert@twinsun.com>
1526 * src/nohup.sh: Don't use "exec --"; it's not portable and
1527 shouldn't be needed.
1529 2002-08-09 Jim Meyering <jim@meyering.net>
1531 * src/pr.c (main): Don't ignore -COLUMN if it's the last option.
1532 (usage): Clarify help text for the -COLUMN option.
1533 Patch by Padraig Brady.
1534 * tests/pr/Test.pm [col-last]: New test for the above.
1536 * configure.ac: Start with version 4.5.1, chosen so that it's larger
1537 than the latest version numbers of the component packages.
1539 * man/Makefile.am (check-x-vs-1): Set and export PATH so we use
1542 2002-08-08 Jim Meyering <jim@meyering.net>
1544 * src/date.c: Guard inclusion of <langinfo.h> with
1545 `#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
1546 * src/sort.c: Likewise.
1547 Patch by GOTO Masanori.
1549 2002-08-05 Paul Eggert <eggert@twinsun.com>
1551 Fix some minor time-related bugs with POSIX time arguments.
1552 Some valid time stamps were being rejected (notably -1, and
1553 time stamps before 1900 on 64-bit hosts). And some invalid
1554 time stamps were being accepted, e.g. September 31.
1556 * src/date.c (main): Adjust to posixtime signature change.
1557 * src/touch.c (main): Likewise. Remove unnecessary initialization.
1558 Use localtime, not posixtm, to warn about obsolete "touch".
1560 2002-08-05 Jim Meyering <jim@meyering.net>
1562 * tests/misc/Makefile.am (TESTS): Add nice and pathchk1.
1564 2002-08-04 Jim Meyering <jim@meyering.net>
1566 * src/Makefile.am (check-README): New target/rule.
1567 (check): Depend on it.
1569 * configure.ac (AC_CONFIG_FILES): Add old/Makefile and old/*/Makefile.
1571 2002-08-03 Jim Meyering <jim@meyering.net>
1573 * Makefile.am (SUBDIRS): Add old.
1574 * old/: New directory, containing legacy ChangeLog* and NEWS files
1575 from the fileutils, sh-utils, and textutils packages.
1577 * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false.
1579 2002-08-02 Paul Eggert <eggert@twinsun.com>
1581 * NEWS, doc/coreutils.texi: uniq now obeys LC_COLLATE.
1583 * src/uniq.c: Include hard-locale.h, xmemcoll.h.
1584 (hard_LC_COLLATE): New var.
1585 (different): Args are now char *, not const char *.
1586 Use xmemcoll instead of memcmp to compare lines, so that
1587 LC_COLLATE has effect. However, use memcmp if it is an
1589 (check_file): Do not include newline in comparison, so that
1590 xmemcoll has a byte to stomp on temporarily.
1591 (main): Set hard_LC_COLLATE.
1593 2002-07-29 Jim Meyering <jim@meyering.net>
1595 * Makefile.am (SUBDIRS): Remove djgpp, for now.
1597 2002-07-08 Jim Meyering <jim@meyering.net>
1599 * src/Makefile.am (uninstall-local): Search for @GNU_PACKAGE@,
1600 rather than the hard-coded `sh-utils'.
1602 2002-07-01 Jim Meyering <jim@meyering.net>
1604 * configure.ac: Merge the three files from fileutils,
1605 textutils, and sh-utils.
1606 * Makefile.am: Likewise.
1607 * src/Makefile.am: Likewise.
1610 version-control: never