1 2003-02-21 Jim Meyering <jim@meyering.net>
5 Merge in changes from autoconf's version of this file.
6 * Makefile.maint (www-gnu): Define.
7 (standards.texi-url_prefix): Use $(www-gnu).
8 (make-stds.texi-url_prefix): Likewise.
10 * src/cp.c: Include "mmap-stack.h".
11 (main): Invoke `run' through a macro that (when possible) runs it
12 with a large, mmap'd stack.
14 * src/cp.c (run): New function, preparing for the above.
15 Exit from this function, not from main
18 * src/du.c: New option: --apparent-size.
19 (enum) [APPARENT_SIZE_OPTION]: New member.
20 (long_options): Add it.
23 ['b']: Set apparent_size.
24 David Eisner reported that the behavior of --bytes had changed.
25 Paul Eggert proposed the use of a new option, --apparent-size.
27 * src/du.c (apparent_size): New global.
28 (print_only_size): Reflect the fact that we're printing byte counts,
29 not ST_NBLOCKSIZE-byte-block counts.
30 (print_size): Call print_only_size rather than duplicating its code.
31 (process_file): Accumulate byte counts, rather than block counts.
33 * src/du.c (process_file): Always reset size_to_propagate_to_parent
34 for --separate-dirs (-S).
36 2003-02-20 Jim Meyering <jim@meyering.net>
38 * Use automake-1.7.3. Regenerate dependent files.
40 * src/stat.c (print_stat): New format: %B (to print ST_NBLOCKSIZE).
41 This makes %b (number of ST_NBLOCKSIZE-byte blocks) more useful.
42 (usage) [%B]: Describe it.
45 * src/du.c (process_file): Reorganize the code to use only
46 one `sum' array, and change how -S works back to the way it was
47 before 2003-01-31. Patch by Bruno Haible.
49 * tests/du/basic: New test.
50 * tests/du/Makefile.am (TESTS): Add basic.
52 * tests/envvar-check: Add checks for the following:
53 BLOCK_SIZE, DU_BLOCK_SIZE, DF_BLOCK_SIZE, LS_BLOCK_SIZE.
55 * tests/Makefile.am: Rename phony target envvar-check to evar-check
56 so as not to conflict with the distributed file by the same name.
58 * src/du.c (process_file): Set info->skip before any possible return.
60 Report correct usage for directories, not 0.
61 * src/du.c (process_file): Return for `file_type == FTW_DPRE'
62 _before_ recording the dev/ino of a directory.
63 Reported by Bruno Haible.
65 Now, df always displays the device file name corresponding to the
66 listed mount point under `Filesystem'. Before, for an unmounted
67 block- or character-special file argument, it would display the
68 command-line argument instead.
69 * src/df.c (show_disk): Return a value indicating whether
70 there was a match. Don't try to find a mount point here.
71 (show_entry): If show_disk doesn't find a match, call show_point.
73 2003-02-19 Jim Meyering <jim@meyering.net>
75 * src/du.c: Include "mmap-stack.h".
76 (du_files): Add prototype with ATTRIBUTE_NORETURN.
77 Exit from this function, not from...
79 Instead, if possible, invoke du_files through a macro that
80 runs it with a large, mmap'd stack.
82 * src/join.c (usage): Change wording in --help output:
83 use FILENUM instead of `SIDE' and say what FILENUM means.
84 Reported by Bernhard Gabler.
86 * src/df.c (print_header): Rather than using a hard-coded literal
87 string of spaces matching the length of the English `...Type' header,
88 output the right number of spaces to match the selected translation.
89 Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.
91 * src/split.c (bytes_split): Remove unnecessary `else' after break.
92 (lines_split): Likewise. and correct misleading indentation.
94 * src/split.c: Include "full-read.h".
95 (bytes_split, lines_split, line_bytes_split): Use full_read,
96 not safe_read. The way split was using the latter, a short read
97 could cause split to terminate before EOF.
99 * tests/misc/tty-eof: Test all programs that can read stdin,
100 requiring no arguments and that write to standard output.
102 * tests/misc/tty-eof: New file. Renamed from ...
103 * tests/misc/cat-tty-eof: Remove file. Rename to tty-eof.
104 * tests/misc/Makefile.am (TESTS): Reflect renaming.
106 2003-02-18 Jim Meyering <jim@meyering.net>
108 cksum would perform an extra read after encountering EOF
109 * src/cksum.c (cksum): Exit the loop upon EOF, too.
110 Patch by Michael Bacarella.
112 Test for the bug fixed today in cksum, md5sum, and sha1sum.
113 * tests/misc/cat-tty-eof: Generalize, clean-up, and test for
114 cat, cksum, md5sum, and sha1sum all in the same loop.
116 2003-02-14 Jim Meyering <jim@meyering.net>
118 * src/remove.c: Include "euidaccess.h".
119 Remove declaration of euidaccess.
121 2003-02-12 Jim Meyering <jim@meyering.net>
123 * src/pathchk.c (portable_chars_only): Remove unnecessary `const'
124 in cast to avoid warning from icc. Reported by Alexandre Duret-Lutz.
126 2003-02-10 Jim Meyering <jim@meyering.net>
128 * src/test.c: Don't include group-member.h.
129 Include euidaccess.h.
130 (eaccess): Rewrite function to set the real uid and gid temporarily
131 to the effective uid and gid, then invoke 'access', and then set the
132 real uid and gid back. On systems that lack setreuid or setregid,
133 fall back on the kludges in euidaccess. Before, it would not work
134 for e.g., files with ACLs, files that were marked immutable,
135 or on file systems mounted read-only. Nelson Beebe raised the issue.
136 Paul Eggert suggested the new implementation.
138 2003-02-09 Jim Meyering <jim@meyering.net>
140 * src/test.c (test_stat): Remove function. It's job is done (only
141 when necessary) by the wrapper in lib/stat.c. Adjust all uses.
143 2003-02-08 Jim Meyering <jim@meyering.net>
147 * tests/mv/part-symlink: Don't assume that the file owner username
148 length is less than 9 in ls output: instead, omit that field
149 altogether. Reported by, and suggested fix from, Ferdinand.
151 * tests/du/restore-wd: New test for just-fixed bug in ftw.c.
152 * tests/du/Makefile.am (TESTS): Add restore-wd.
154 * src/rm.c: Correct now-invalid comment about cycle-detection.
156 2003-02-06 Jim Meyering <jim@meyering.net>
158 * NEWS: Add entries from old/*/NEWS
159 from fileutils-4.1 through 4.1.11 and
160 from sh-utils-2.0 through 2.0.15. Suggestion from Karl Berry.
164 * src/du.c (process_file): Don't return early for excluded files
165 or for files whose dev/inode we've already seen.
167 2003-02-05 Jim Meyering <jim@meyering.net>
169 * tests/du/exclude: New file.
170 * tests/du/Makefile.am (TESTS): Add exclude.
172 2003-02-04 Dmitry V. Levin <ldv@altlinux.org>
174 * src/who.c (print_boottime, print_deadprocs, print_runlevel):
175 Fix memory allocation arithmetic.
177 2003-02-04 Jim Meyering <jim@meyering.net>
179 `df /dev/block-or-char-device-file--not-mounted' now reports
180 the name of the file system on which the file resides, usually `/'.
181 Before, it would leave the `Mounted on' field blank.
182 * src/df.c (show_disk): Move function to precede find_mount_point.
183 (show_disk): Add parameter: STATP.
184 If we don't find a matching device name, then resort to calling
185 find_mount_point. Reported by Bob Proulx.
187 2003-02-03 Andreas Schwab <schwab@suse.de>
189 * tests/rm/cycle: Require non-root.
190 * tests/rm/isatty: Likewise.
192 2003-02-02 Jim Meyering <jim@meyering.net>
196 * man/Makefile.am (check-x-vs-1): Use @PATH_SEPARATOR@, not `:'.
198 Ensure that there are no offending uses of `:'.
199 * Makefile.maint (makefile_path_separator_check): New rule.
200 (local-check): Add it to the list.
202 2003-02-01 Jim Meyering <jim@meyering.net>
204 * src/du.c (MAX_N_DESCRIPTORS): Define.
206 * src/stat.c (G_fail): New global.
207 (human_time): Diagnose failed localtime, not failed nstrftime.
208 (main): Fail if G_fail is set.
210 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
212 * tests/basename/Makefile.am: Use @PATH_SEPARATOR@ instead of
213 hard-coding the path-separator. Also double-quote the new PATH,
214 to avoid problems when the path-separator is a semi-colon or when
215 `pwd` contains e.g. a space.
216 * tests/chgrp/Makefile.am: Likewise.
217 * tests/chmod/Makefile.am: Likewise.
218 * tests/chown/Makefile.am: Likewise.
219 * tests/cp/Makefile.am: Likewise.
220 * tests/dd/Makefile.am: Likewise.
221 * tests/dircolors/Makefile.am: Likewise.
222 * tests/du/Makefile.am: Likewise.
223 * tests/expr/Makefile.am: Likewise.
224 * tests/factor/Makefile.am: Likewise.
225 * tests/fmt/Makefile.am: Likewise.
226 * tests/install/Makefile.am: Likewise.
227 * tests/ln/Makefile.am: Likewise.
228 * tests/ls/Makefile.am: Likewise.
229 * tests/ls-2/Makefile.am: Likewise.
230 * tests/md5sum/Makefile.am: Likewise.
231 * tests/misc/Makefile.am: Likewise.
232 * tests/mkdir/Makefile.am: Likewise.
233 * tests/mv/Makefile.am: Likewise.
234 * tests/od/Makefile.am: Likewise.
235 * tests/rm/Makefile.am: Likewise.
236 * tests/rmdir/Makefile.am: Likewise.
237 * tests/seq/Makefile.am: Likewise.
238 * tests/sha1sum/Makefile.am: Likewise.
239 * tests/shred/Makefile.am: Likewise.
240 * tests/stty/Makefile.am: Likewise.
241 * tests/sum/Makefile.am: Likewise.
242 * tests/tail-2/Makefile.am: Likewise.
243 * tests/touch/Makefile.am: Likewise.
244 * tests/tsort/Makefile.am: Likewise.
245 * tests/unexpand/Makefile.am: Likewise.
247 2003-01-31 Jim Meyering <jim@meyering.net>
249 * src/stat.c: Include "file-type.h"
250 (print_human_type): Remove function.
251 (human_access): Rename from print_human_access. Return a string.
252 (human_time): Rename from print_human_time. Return a string.
253 (print_stat): Arrange so that field width and an alignment specifier
254 are honored for the %A, %F, %x, %y, and %z formats.
255 [%F]: Use file_type; this gives slightly different file type strings,
256 e.g., `directory' instead of `Directory' and `regular file' or
257 `regular empty file' instead of `Regular file'.
258 Prompted by a report from Richard Dawe that the uses of
259 S_IFSOCK and S_IFIFO in print_human_time were not portable
260 to systems using e.g., DJGPP.
262 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
264 * src/stat.c (print_stat): Use S_ISLNK rather than an explicit
265 test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
267 2003-01-31 Jim Meyering <jim@meyering.net>
269 * src/du.c (main): Upon processing an invalid option or an invalid
270 --exclude-from or --max-depth option argument, don't exit right away,
271 in case there are others. Rather record the failure and exit after
272 processing other options.
274 * GNUmakefile (TAR_OPTIONS): Set and export, in order to make
275 tar archive easier to reproduce.
277 Rewrite to perform directory traversal using nftw.
279 * src/du.c: Include "dirname.h", "ftw.h", and "quotearg.h".
281 (opt_one_file_system): Move global into `main'.
282 (path, xstat, exit_status): Remove declarations.
283 (arg_length, suffix_length): New globals.
284 (G_fail): New global, sort of like the old `exit_status'.
285 (IS_FTW_DIR_TYPE): Define.
286 (print_only_size): New function.
287 (process_file): New function.
288 (str_init, ensure_space, str_copyc, str_concatc): Remove functions.
289 (str_trunc, pop_dir, count_entry): Likewise.
290 (du_files): Rewrite to use nftw.
292 2003-01-30 Jim Meyering <jim@meyering.net>
294 * tests/du/trailing-slash: Ensure that du/ftw follows a command-line
295 symlink-to-directory with -L, even without the trailing slash.
297 2003-01-27 Jim Meyering <jim@meyering.net>
299 * src/Makefile.am (check-misc): Check for st_blocks, too.
301 * src/stat.c (print_stat): Use ST_NBLOCKS rather than `->st_blocks'.
302 Reported by Richard Dawe.
304 2003-01-27 Andreas Schwab <schwab@suse.de>
306 * src/ls.c (quote_name): Add fourth parameter, width, into which to
307 store the screen columns, and return the number of bytes instead.
308 (print_dir): Pass NULL as fourth parameter of quote_name.
309 (print_name_with_quoting): Likewise.
310 (length_of_file_name_and_frills): Get the width from the fourth
311 parameter of quote_name instead of return value.
313 2003-01-27 Jim Meyering <jim@meyering.net>
315 * src/ls.c (decode_switches): If `dired' is set without
316 `format == long_format', then silently reset dired. This doesn't
317 change the behavior of ls (all prior uses of dired were protected
318 by `&& format == long_format'), and lets us...
319 (DIRED_INDENT): ... remove the `format == long_format' conjunct.
320 (PUSH_CURRENT_DIRED_POS): Likewise.
323 2003-01-22 Jim Meyering <jim@meyering.net>
325 * tests/du/no-x: New test, for functionality added to lib/ftw.c.
326 * tests/du/Makefile.am (TESTS): Add no-x.
328 2003-01-21 Jim Meyering <jim@meyering.net>
330 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS
331 && HAVE_STRUCT_DIRENT_D_TYPE]: If a file has d_type == DT_UNKNOWN
332 it may still be a directory -- or not (e.g., with FreeBSD on an
333 NFS-mounted file system), so resort to calling lstat to find out.
334 Based on a patch by Michael van Elst.
336 * tests/cp/same-file: Don't assume that the file owner username
337 length is less than 9 in ls output: instead, omit that field
338 altogether. Reported by, and suggested fix from, Ferdinand.
340 2003-01-20 Jim Meyering <jim@meyering.net>
342 * tests/date/Test.pm (wide-fmt): New test to demonstrate that
343 large format widths no longer cause strftime to infloop.
345 * Makefile.maint (mail_gpg_sign_cookie): Remove now-unused definition.
347 2003-01-19 Jim Meyering <jim@meyering.net>
349 * src/readlink.c: Include "canonicalize.h".
351 2003-01-18 Jim Meyering <jim@meyering.net>
353 * src/ls.c (Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]:
355 (enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
356 (long_options): Add option --dereference-command-line-symlink-to-dir.
357 (main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
358 rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
359 -d, -F, -l options is specified.
360 (decode_switches): Handle --dereference-command-line-symlink-to-dir.
361 (gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
362 Change --dereference-command-line (-H) to dereference *all*
363 command line arguments, including broken symlinks.
365 2003-01-15 Paul Eggert <eggert@twinsun.com>
367 Change ls -H back to the way it was yesterday, since this is
368 compatible with FreeBSD and the POSIX spec is confusing
369 and somewhat contradictory.
371 * src/ls.c (DEREF_COMMAND_LINE_ARGUMENTS): Change name back
372 from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
373 (long_options): Change the long option name back.
374 (usage): Change the usage back.
375 (gobble_file): When -H is specified, dereference a top-level
376 arg even if it points to a non-directory.
378 2003-01-15 Jim Meyering <jim@meyering.net>
380 * src/ls.c (gobble_file): Fall back on using lstat when required:
381 when --dereference (-L) is not specified, and
382 - when operating on a dangling symlink
383 - when operating on command-line-symlink-to-directories
384 This fixes numerous problems. Here are examples:
385 - `ls dangling-symlink' would fail with `no such file...'
386 Now it prints `dangling-symlink'.
387 - `ls -i symlink' would mistakenly print the inode of the referent.
388 Now it prints the inode of the symlink. Likewise for --size (-s).
389 Based on a patch from Michael Stone.
390 Reported by Deepak Goel as Debian bug #173793.
392 Rename ls's --dereference-command-line (-H)
393 option to --dereference-command-line-symlink-to-dir.
394 * src/ls.c [enum Dereference_symlink]
395 (DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
396 DEREF_COMMAND_LINE_ARGUMENTS. Update all uses.
397 (long_options): Rename the long option.
398 (usage): Say that --dereference-... changes how ls treats
399 only symlinks to directories specified on the command line.
401 2003-01-14 Jim Meyering <jim@meyering.net>
403 * tests/ls/dangle: New file/test, for the above fix.
404 * tests/ls/inode: Another new file/test, for the above fix.
405 * tests/ls/Makefile.am (TESTS): Add dangle and inode.
407 * src/ls.c (gobble_file): Fix a bug introduced in 4.5.4 that made it
408 so that ls --color would no longer highlight the names of files with
409 the execute bit set when not specified on the command line.
410 Patch by Michael Stone. Reported by Stephen Depooter as
413 * tests/ls-2/tests (color-exe): New test, for the above fix.
415 2003-01-13 Jim Meyering <jim@meyering.net>
417 * tests/shred/exact: Also test for just fixed bug with --zero.
419 * src/shred.c (long_opts): --zero does not require an argument.
420 Patch by Michael Stone. Reported by Roland Turner as Debian bug 172019.
422 2003-01-12 Jim Meyering <jim@meyering.net>
424 * Makefile.maint (cvs-update): Skip any file with local modifications.
426 * src/unexpand.c (usage): Document --first-only and mention that
427 --tabs=N (-t) enables --all (-a). Reported by wiregauze@yahoo.com.
429 2002-12-01 Dmitry V. Levin <ldv@altlinux.org>
431 * src/df.c: Include "canonicalize.h".
432 Use canonicalize_file_name unconditionally.
434 2003-01-09 Jim Meyering <jim@meyering.net>
436 * README: Add readlink.
438 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
440 * src/df.c: Include "xgetcwd.h".
441 * src/pwd.c: Likewise.
443 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
445 * src/shred.c: Remove declaration of xstrdup.
446 We already get it via xalloc.h which is included via system.h.
448 2002-08-27 Dmitry V. Levin <ldv@altlinux.org>
450 New program: readlink.
452 * src/Makefile.am (bin_PROGRAMS): Add readlink.
453 * src/readlink.c: New file.
455 * man/readlink.x: New file.
456 * man/Makefile.am (dist_man_MANS): Add readlink.1.
457 (readlink.1): New rule.
459 2003-01-09 Jim Meyering <jim@meyering.net>
461 When selecting ranges of byte offsets (as opposed to ranges of fields)
462 and when --output-delimiter=STRING is specified, output STRING between
463 ranges of selected bytes.
464 * src/cut.c (RANGE_START_SENTINEL): Define.
465 (output_delimiter_specified): New global.
466 (print_kth): Add parameter. Adjust all callers.
467 (set_fields): Mark each range-start index with RANGE_START_SENTINEL.
468 (cut_bytes): When requested, output STRING between ranges of
470 (main): Make a diagnostic a little clearer.
471 Based on a patch from Jan Nieuwenhuizen.
473 * tests/cut/Test.pm: New tests for the above.
475 * src/cut.c (set_fields): Make code agree with comment:
476 Don't merge abutting ranges like 4- and 2-3. This makes no
477 difference currently, but is required to support an upcoming change.
479 2003-01-07 Jim Meyering <jim@meyering.net>
481 * src/cut.c (set_fields): Fix typo in comment.
483 * tests/touch/not-owner: New test, mostly extracted from fail-diag.
484 * tests/touch/Makefile.am (TESTS): Add not-owner.
485 * tests/touch/fail-diag: Remove the test for non-owner diagnostic.
486 Now, this tests only the nonexistent-directory diagnostic.
487 Suggestion from Michael Stone.
489 * tests/touch/fail-diag: Fix typo: s/ld/ls/.
491 2003-01-04 Jim Meyering <jim@meyering.net>
493 * src/copy.h: Remove use of PARAMS.
494 * src/remove.h: Likewise.
495 * src/chown-core.h: Likewise.
497 rm could be tricked into mistakenly reporting a cycle.
498 * src/remove.c: [cycle_check_state]: New global.
499 (remove_cwd_entries): Adapt to new semantics of cycle_check.
500 (rm): Call cycle_check_init and cycle_check_free for each file.
501 * tests/rm/cycle (rm): New test, for the above fix.
502 * tests/rm/Makefile.am (TESTS): Add cycle.
504 When rm detects a cycle, don't abort the entire command,
505 but rather just the affected command line argument.
506 * src/remove.c: Include <setjmp.h>
507 (struct dirstack_state) [current_arg_jumpbuf]: New member.
508 (remove_cwd_entries): Call longjmp if we detect a cycle.
509 (rm): Call setjmp here.
511 * src/remove.c (cycle_check, is_power_of_two): Remove functions.
512 Instead, include cycle-check.h and use it.
514 * src/remove.h (struct dev_ino): Remove declaration.
516 * src/remove.c (remove_cwd_entries): Fix typos in comment.
518 Don't include trailing /. in diagnostics about directories.
519 * src/remove.c (full_filename_): When FILENAME is just `.'
520 and there is a nonempty directory-name part, don't append `/.'.
521 * tests/rm/unread2: Remove trailing /. from diagnostic.
522 * tests/rm/rm2: Likewise.
524 * src/remove.c (struct dirstack_state): Define.
525 To be used in place of these file-scoped globals ...
526 (dir_stack, len_stack, Active_dir): Remove globals.
527 (ds_init, ds_free): New functions.
528 (full_filename): Define.
529 (full_filename_): Rename from full_filename.
531 Begin to make AD_* functions more generic.
532 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
534 (AD_INIT_OTHER_MEMBERS): Define.
535 (remove_dir): Define the `status' member manually after each
536 call to AD_push or AD_push_initial.
538 * src/Makefile.am (check-misc): New rule, to ensure that no more
539 S_IS* macro definitions sneak into the code.
540 (check): Depend on check-misc.
542 * src/remove.c [S_ISLNK]: Don't define. It's already defined in sys2.h.
543 * src/du.c (count_entry) [S_ISLNK]: Don't define.
544 * src/shred.c [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.
546 2003-01-03 Jim Meyering <jim@meyering.net>
548 * src/true.c: Add copyright.
549 (AUTHORS): I suppose I've written it.
551 * src/Makefile.am (false.c): Make the generated file be read-only.
553 2003-01-04 Jim Meyering <meyering@lucent.com>
555 * src/ls.c: Include "dev-ino.h".
556 [struct dev_ino]: Remove declaration.
558 2003-01-02 Jim Meyering <meyering@lucent.com>
560 * src/cp.c (do_copy): Tweak diagnostic to be consistent with the one
561 from mv: s/missing file arguments/missing file argument/.
562 With --target-directory=DIR, cp and mv work with a single file argument.
563 Reported by Karl Berry.
565 * tests/rm/isatty: Enable this test.
567 2002-12-31 Jim Meyering <meyering@lucent.com>
569 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
571 (AD_INIT_OTHER_MEMBERS): Define.
572 (remove_dir): Define the `status' member manually after each
573 call to AD_push or AD_push_initial.
575 * src/ls.c [struct dev_ino]: Remove definition.
576 Include "dev-ino.h" instead.
578 2002-12-28 Jim Meyering <meyering@lucent.com>
580 * tests/du/Makefile.am (TESTS): Add no-deref.
581 * tests/du/no-deref: New script.
583 2002-12-23 Jim Meyering <meyering@lucent.com>
585 * src/remove.c (remove_cwd_entries): Fix typo in comment.
587 2002-12-21 Jim Meyering <jim@meyering.net>
589 * announce-gen: Generate MML-formatted announcement.
590 This makes it a *lot* harder to send stale MD5/SHA1 signatures.
592 2002-12-20 Jim Meyering <jim@meyering.net>
594 * src/touch.c (touch): Change the wording of a diagnostic so
595 that it makes sense both when the file exists and when it doesn't.
596 Suggestion from Michael Stone.
598 2002-12-18 Jim Meyering <jim@meyering.net>
600 * src/stty.c (valid_options): Declare to be static.
602 2002-12-15 Jim Meyering <jim@meyering.net>
604 * Makefile.cfg: Remove rules related to generating m4/jm-glibc-io.m4.
606 * src/chmod.c, src/copy.c, src/copy.h, src/cp-hash.h, src/csplit.c:
607 * src/date.c, src/expr.c, src/fmt.c, src/id.c, src/install.c:
608 * src/ls.c, src/od.c, src/pathchk.c, src/pr.c, src/remove.c:
609 * src/shred.c, src/sort.c, src/stat.c, src/stty.c, src/sum.c:
610 * src/tee.c, src/test.c: Remove all uses of `PARAMS'.
612 * src/remove.c (PARAMS): Remove definition.
613 * src/sys2.h: Likewise.
615 * src/ls.c, src/stat.c, src/date.c: Remove declaration of nstrftime.
616 Include strftime.h instead.
618 2002-12-14 Jim Meyering <jim@meyering.net>
620 * Makefile.cfg ($(url_dir_list)): Use .../coreutils, not .../fetish.
622 * src/system.h [! HAVE_DECL_MEMRCHR]: Declare memrchr.
623 This is necessary at least for Irix6.5 when using c89.
624 Reported by Nelson Beebe.
626 * tests/misc/Makefile.am (TESTS): Add cat-tty-eof.
628 * tests/misc/cat-tty-eof: New test.
630 * src/mknod.c (usage): Specify how major and minor mode numbers
631 are interpreted. Report forwarded by Kristin E Thomas.
632 * src/mknod.c: Remove now-redundant usage-specifying comment.
634 2002-12-13 Jim Meyering <jim@meyering.net>
638 * tests/du/trailing-slash: Allow for a directory of size `0'.
639 That happens at least on file systems of type tmpfs on linux-2.4.18.
641 * announce-gen: New script to begin replacing the commands
642 associated with the rule here...
643 * Makefile.maint (announcement): Invoke announce-gen.
644 * Makefile.am (EXTRA_DIST): Add announce-gen.
646 * tests/cp/preserve-2: New file/test, for latest fix.
647 * tests/cp/Makefile.am (TESTS): Add preserve-2.
649 2002-12-11 TAKAI Kousuke <takai@vlsi.kuee.kyoto-u.ac.jp>
651 Fix a bug whereby cp would fail to parse an option like
652 --preserve=mode,ownership.
653 * src/cp.c (decode_preserve_arg): Advance `comma' to
654 point the character following the comma.
656 2002-12-11 Jim Meyering <jim@meyering.net>
658 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Undefine before defining,
659 in case it's already defined.
661 2002-12-09 Jim Meyering <jim@meyering.net>
663 * tests/touch/fail-diag: Don't get a test failure if /no exists.
664 Instead, evoke a framework failure if /no-$$ exists.
665 Reported by Michael Stone.
667 2002-12-08 Jim Meyering <jim@meyering.net>
669 * src/du.c (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
670 Define to rpl_lstat, so that even on systems like Solaris 2.8,
671 du honors (per POSIX) the trailing slash on an argument referring
672 to a symlink-to-directory.
674 2002-12-06 Jim Meyering <jim@meyering.net>
676 * Use autoconf-2.57. Regenerate dependent files.
677 * Use automake-1.7.2. Regenerate dependent files.
679 * src/ls.c (gobble_file): Also stat the file if it's a
680 regular file and --indicator-style=classify (aka -F).
681 Thanks to Ed Santiago for opening my eyes.
683 * tests/ls/file-type: New file. Test for the above.
684 A test to contrast ls -F and ls --indicator-style=file-type.
685 * tests/ls/Makefile.am (TESTS): Add file-type.
687 2002-12-04 Jim Meyering <jim@meyering.net>
689 * tests/ls/follow-slink: Make sure the symlink was created.
690 Richard Dawe reported that `ln -s link link' succeeds, but creates
691 no file on systems running some version of the DJGPP libc.
693 2002-12-03 Jim Meyering <jim@meyering.net>
695 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr)
696 since this package no longer panders to K&R compilers.
698 2002-12-02 Jim Meyering <jim@meyering.net>
700 * tests/du/slink: Skip this test if `.' is on a non-local file system.
702 * tests/Fetish.pm (_at_replace): Do the substitution only if there's
703 something to replace.
705 2002-12-01 Jim Meyering <jim@meyering.net>
707 * src/stat.c: Don't include <string.h> or <ctype.h>.
708 That's already done via system.h.
709 * src/dircolors.c: Don't include <ctype.h>.
711 2002-11-30 Jim Meyering <jim@meyering.net>
713 * ls.c (gobble_file): Remove the block of code that caused
714 `ls --color -F symlink-to-dir' to list the files in
715 `symlink-to-dir/.'. Now, it prints `symlink-to-dir@', (just
716 like `ls -F symlink-to-dir') but with the addition of highlighting.
717 Similarly, `ls --color -dF symlink-to-dir' would print
718 `symlink-to-dir/'; now it prints `symlink-to-dir@'.
719 Reported by Jeff Sheinberg as Debian bug #168203.
720 * tests/ls-2/tests (sl-F-color, sl-dF-color): New tests for the above.
722 ls is now more efficient: with certain options, it no longer needs
723 to stat each directory entry on systems with valid dirent.d_type.
724 * src/ls.c (print_dir): Add DT_LNK and DT_REG.
725 (main): Make --recursive set format_needs_type, not format_needs_stat.
726 (gobble_file): Remove a FIXME comment, now that it's fixed.
728 2002-11-24 Jim Meyering <jim@meyering.net>
730 * src/du.c (du_files): Don't strip any trailing slash.
731 Rewrite so that `/' is no longer represented internally as
733 (count_entry): When appending a file name component,
734 account for the fact that the current path may end in `/'.
735 François Pinard reported that `du symlink-to-dir/' was not
736 equivalent to `du symlink-to-dir/.'. Now it is.
737 * tests/du/trailing-slash: New file/test, for the above fix.
738 * tests/du/Makefile.am (TESTS): Add trailing-slash.
740 2002-11-23 Jim Meyering <jim@meyering.net>
742 * src/tac.c (output): Declare some local variables to be of type size_t,
743 rather than `int' to avoid warnings from gcc.
745 2002-11-21 Paul Eggert <eggert@twinsun.com>
747 * src/ls.c (decode_switches): Use case-sensitive matching to
748 decode the QUOTING_STYLE environment variable. This is more
749 consistent with the documentation, and with --quoting-style.
751 2002-11-21 Martin Buck <martin.buck@ascom.ch
753 * src/stty.c (struct speeds): Add support for all baud rates defined
756 2002-11-19 Jim Meyering <jim@meyering.net>
758 * tests/sum/sysv: Export LC_ALL=C, to avoid failure when
759 run in a UTF locale. Report and suggested fix by Bruno Haible.
760 * tests/fmt/basic: Likewise.
762 2002-11-17 Jim Meyering <jim@meyering.net>
764 * configure.ac: Update via autoupdate.
765 Add `AM_GNU_GETTEXT_VERSION(0.11.5)'.
767 * src/mv.c (movefile): Don't remove trailing slashes from SOURCE.
768 Reported by Hans Ginzel.
770 2002-11-15 Jim Meyering <jim@meyering.net>
772 * Makefile.cfg (gnu_rel_host): Define.
773 (url_dir_list): Choose from (alpha|ftp).gnu.org depending
774 on whether $(VERSION) looks like a major release number.
776 * Makefile.maint (mail_gpg_sign_cookie): Backslash-escape `#'.
777 (release): Rename from `alpha'.
778 (alpha): Depend on release.
780 * Makefile.maint (signatures): Define with ?=, so it's easy to override.
782 2002-11-14 Jim Meyering <jim@meyering.net>
784 * Makefile.maint (mail_gpg_sign_cookie): Make optional.
785 (announcement): Use the new variable.
787 * Makefile.maint: Sync with Bison, i.e.:
788 (po-check): Scan .l and .y files instead of the
789 .c and the .h files that they generate. This fixes the bug
790 reported by Tim Van Holder in:
791 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
792 Look for N_ as well as for _. Try to avoid matching #define for
796 2002-11-12 Jim Meyering <jim@meyering.net>
798 * src/ls.c (HAVE_SYMLINKS): Remove unnecessary macro definition.
799 Replace sole use with equivalent `#ifdef S_ISLNK'.
800 Inconsistency reported by Dmitry V. Levin.
802 2002-11-11 Jim Meyering <jim@meyering.net>
804 * src/stat.c (usage): Transform --help items output via s/ - / /,
805 so that help2man produces properly formatted man pages.
806 Reported by Herbert Xu as Debian bug #168400.
808 2002-11-10 Jim Meyering <jim@meyering.net>
810 * src/ls.c (sighandler): Handle SIGTSTP specially.
811 Based on suggestions from Solar Designer and Dmitry V. Levin.
814 * Makefile.cfg (cvs_files): Define. From autoconf.
815 (local_updates): Likewise.
817 * src/ls.c (restore_default_color_handler, sigtstp_handler):
819 (sighandler): New function, based on the one in sort.c.
820 (main): Use sigaction, if possible; otherwise signal.
821 Handle these signals:
822 SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
823 Don't register our handler if the signal is already being ignored.
825 * src/dd.c (interrupt_handler): Use raise, rather than kill+getpid.
826 * src/csplit.c (interrupt_handler): Likewise.
827 * src/sort.c (sighandler): Likewise.
828 (main): Declare `i' and `nsigs' to be unsigned, not int.
830 2002-11-09 Jim Meyering <jim@meyering.net>
832 ls --color: restore terminal text color upon signal.
833 * src/ls.c: Include "full-write.h" and <signal.h>.
834 (restore_default_color, restore_default_color_handler): New functions.
835 (sigtstp_handler, put_indicator_direct): New functions.
836 (main) [print_with_color]: Register signal handlers.
837 Patch mostly by Solar Designer and Stanislav Ievlev.
839 Update from autoconf.
840 * Makefile.maint (AMTAR): Remove definition.
841 (update, cvs-update, po-update, do-po-update): New rules.
842 (wget-update): Update (thus renaming to cvs-update).
843 (automake_repo): Use anoncvs@sources.redhat.com.
845 2002-11-06 Jim Meyering <jim@meyering.net>
847 * tests/misc/Makefile.am (TESTS): Add printf-hex.
849 * tests/misc/printf: Be careful to test the code in this package,
850 not the shell built-in function.
852 * src/printf.c (print_esc): A hexadecimal escape sequence has
853 at most two hex. digits, not three. Reported by Padraig Brady.
854 (usage): Update description.
855 * tests/misc/printf-hex: New file/test, for the above fix.
857 2002-10-07 Paul Eggert <eggert@twinsun.com>
859 Add support for locale-specific size indications (e.g.,
860 thousands-separators) and for explicit size suffixes on output.
862 * doc/coreutils.texi (Block size): Say that:
863 This affects display format as well as block size.
864 Fractional block counts are rounded up.
865 ls file size blocksize defaults to 1.
866 A block size spec preceded by ' generates thousands separators.
867 A suffix without a preceding integer generates suffixes.
868 (tail invocation): 32k -> 32 KiB.
869 (What information is listed): ls -h is now equivalent to
870 ls --block-size=human, and ls -H is now equivalent to
871 ls --block-size=si. Displayed file size is now always affected by
874 * lib/inttostr.c, lib/inttostr.h, lib/imaxtostr.c, lib/offtostr.c,
875 lib/umaxtostr.c: New files, taken from GNU tar.
877 * lib/Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c,
879 (EXTRA_DIST): Add inttostr.c.
881 * lib/human.c, lib/human.h: Rewrite to support locale-specific
882 notations like thousands separators.
883 Specify what includer of include.h must include beforehand.
884 (human_group_digits, human_suppress_point_zero, human_autoscale,
885 human_base_1024, human_SI, human_B): New enum values.
886 (human_readable): Rename from human_readable_inexact; put the
887 options before the sizes. All uses changed. The old human_readable
888 function has been removed; use inttostr.h instead.
889 (human_options): Renamed from human_block_size, with new signature
890 that allows block sizes up to UINTMAX_MAX. All callers changed.
892 * m4/prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv,
893 AC_HEADER_STDBOOL. No need to check for limits.h since it's in
894 freestanding C89. No need to check for stdlib.h or string.h since
895 autoconf does this now.
897 * src/cksum.c (cksum): Use primitives from inttostr.h, not
898 human.h, to print large numbers simply.
899 * src/csplit.c (handle_line_error, parse_patterns): Likewise.
900 * src/dd.c (print_stats, main): Likewise.
901 * src/df.c (print_header): Likewise.
902 * src/factor.c (print_factors): Likewise.
903 * src/ls.c (print_long_format, print_file_name_and_frills): Likewise.
904 * src/shred.c (dopass): Likewise.
905 * src/sort.c (checkfp): Likewise.
906 * src/sum.c (bsd_sum_file, sysv_sym_file): Likewise.
907 * src/tail.c (xlseek): Likewise.
908 * src/wc.c (write_counts, wc): Likewise.
910 * src/df.c (human_output_opts): New var.
911 (output_block_size): Now uintmax_t, not int, to handle larger
912 block sizes. All uses changed.
913 * src/du.c: Likewise.
914 * src/ls.c: Likewise.
916 * src/df.c (print_header): In the header line, prefer SI to human
917 representation if it's shorter; if neither is shorter, try to
918 intuit what the user would prefer.
920 * src/expr.c (inttostr): Remove; use new imaxtostr library
923 * src/ls.c (file_output_block_size): New var, to distinguish
924 file sizes from other sizes.
925 (decode_switches): Set it.
927 * src/shred.c (OUTPUT_BLOCK_SIZE): remove.
928 (dopass): When printing progress, use floor for what has been done
929 so far (since we should be conservative there), and ceiling for
930 what needs to be done (since that's what other programs use).
932 2002-10-19 Jim Meyering <jim@meyering.net>
934 * src/pinky.c (print_heading): Align TTY and Name headings.
935 Reported by Karl Eichwalder.
937 2002-10-18 Jim Meyering <jim@meyering.net>
939 * src/split.c (cwrite): Change type of `bytes' parameter to size_t
940 Remove now-useless cast.
941 (stdread): Remove function.
942 (bytes_split): Use size_t instead of int.
943 Use safe_read, not stdread.
944 (lines_split): Likewise.
945 Use memchr rather than a `while' loop.
946 (line_bytes_split): Use size_t instead of int.
947 Use safe_read, not stdread.
948 (main): Add some FIXME comments to remind me to remove casts.
950 * src/system.h (ST_BLKSIZE): Correct comment describing how to
951 reproduce HPUX-11 cat failure. From Petter Reinholdtsen.
953 2002-10-17 Jim Meyering <jim@meyering.net>
955 Fix a problem that could make e.g., `cat' misbehave on systems which
956 give invalid (unreasonably large) values for stat.st_blksize.
957 * src/system.h (ST_BLKSIZE): Ensure that the result is in [1..4MB].
958 Reported by Petter Reinholdtsen.
960 2002-10-14 Jim Meyering <jim@meyering.net>
962 Specifying a printf conversion specifer as nl's separator string
963 could cause nl to segfault.
964 * src/nl.c (build_print_fmt): Don't include separator string
965 in the printf format; it might contain `%'.
966 Use a better bound on the length of the print_fmt buffer.
967 (print_lineno): Print the separator here instead.
968 Reported by Doug Coleman.
970 * tests/misc/nl: New file/tests, including a test for the above.
971 * tests/misc/Makefile.am (TESTS): Add nl.
973 * tests/misc/split-l: New test, to make sure `split --lines=N' works.
974 * tests/misc/Makefile.am (TESTS): Add split-l.
976 2002-10-13 Jim Meyering <jim@meyering.net>
980 * src/du.c (usage): Tweak description of --dereference-args/-D.
982 * src/du.c (count_entry): Also save cwd when dereferencing (via
983 --dereference-args, -D) a command-line argument.
984 Reported by Michal Svec. Based on a patch by Andreas Schwab.
986 * src/Makefile.am (../AUTHORS): New target/rule.
988 2002-10-12 Jim Meyering <jim@meyering.net>
990 * src/paste.c (paste_parallel): Declare local, `delims_saved', to be
991 of type size_t, since that's the way it's used and avoids a warning.
993 * src/csplit.c (struct cstring) [len]: Declare to be unsigned int,
994 since that's how it's always used and avoids a new warning from gcc.
995 (read_input): Adapt to new safe_read ABI.
997 * src/cut.c (cut_fields): Add a temporary size_t variable, n_bytes,
1000 * src/pinky.c (print_long_entry): fread returns size_t.
1001 Declare local `bytes' accordingly, to avoid warning.
1003 tail -c +N would perform an extra read after encountering EOF
1004 [this change is analogous (bytes vs. lines) to the one of 2002-01-27]
1005 * src/tail.c (start_bytes): Detect EOF, inform caller.
1006 (tail_bytes): Upon EOF in start_bytes, return immediately.
1007 (file_lines): Reorganize to use memrchr rather than an explicit loop.
1008 Adapt to new safe_read ABI.
1010 2002-10-11 Jim Meyering <jim@meyering.net>
1012 * tests/du/deref: New file/test, for the above fix.
1013 * tests/du/Makefile.am (TESTS): Add deref.
1015 2002-10-10 Jim Meyering <jim@meyering.net>
1017 * tests/ln/Makefile.am (TESTS): Add target-1.
1018 * tests/ln/target-1: New file/test, for the fix on 2002-10-08.
1020 2002-10-09 Jim Meyering <jim@meyering.net>
1022 * tests/cp/backup-is-src: Ensure that certain environment variables
1023 are not set (e.g., SIMPLE_BACKUP_SUFFIX). Reported by Duncan Roe.
1025 * tests/tail-2/big-4gb: Mark this as an expensive test; it would
1026 consume 4GB of disk space on systems without support for sparse files.
1027 Fix a logic error that'd make it `cat err' even though dd didn't fail.
1029 * src/dircolors.hin (.jar): Fix typo: s/;3$/;31/.
1030 Patch by steven@magelico.net, forwarded by Michael Stone.
1032 * tests/ls/dired: Ensure that ls produces English messages.
1033 Patch by Alexey Vyskubov, forwarded by Michael Stone.
1035 2002-10-08 Dmitry V. Levin <ldv@altlinux.org>
1037 * src/ln.c (main): Fix target_directory parsing when n_files == 1.
1039 2002-10-08 Jim Meyering <jim@meyering.net>
1041 * tests/tail-2/big-4gb: Use double quotes around diagnostic.
1042 Fix syntax in test: use =, not ==.
1043 Reported by Bob Proulx.
1044 Change all the rest like this: grep -lR "testing framework'" .\
1045 |xargs perl -pi -e 's/'\''(\$0: failure in testing framework)'\''/"$1"/'
1047 * src/sum.c (sysv_sum_file): Adapt to new safe_read ABI.
1048 * src/tr.c (squeeze_filter, read_and_delete, read_and_xlate): Likewise.
1049 * src/tac.c (save_stdin, tac_stdin_to_mem): Likewise.
1050 * src/wc.c (wc): Likewise.
1052 2002-10-07 Paul Eggert <eggert@twinsun.com>
1055 Don't advance the write pointer past the end of the write buffer.
1056 * src/sort.c (begfield, limfield): Likewise.
1058 2002-10-07 Jim Meyering <jim@meyering.net>
1060 * src/cat.c (simple_cat, cat): Adapt to new safe_read ABI.
1061 * src/head.c (head_bytes, head_lines): Likewise.
1063 2002-10-06 Jim Meyering <jim@meyering.net>
1065 * src/dd.c (scanargs): Ensure that specified block sizes (specified
1066 via ibs=N, obs=N, and bs=N) are no larger than SSIZE_MAX.
1067 (skip, dd_copy): Adapt to new safe_read ABI.
1069 * Makefile.maint (signatures): Define.
1071 (announcement): Depend on $(signatures).
1073 * Makefile.maint (announcement): Output all URLs for detached
1074 signatures, not just the last one from the previous loop.
1076 2002-10-05 Jim Meyering <jim@meyering.net>
1080 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS]: With `rm -i DIR',
1081 don't recurse into directory, DIR. Prompted by a report from
1084 * tests/rm/i-no-r: New file/test, for the above fix.
1085 * tests/rm/Makefile.am (TESTS): Add i-no-r.
1087 * tests/tail-2/big-4gb: New file/test, for the fix of 2002-09-27.
1088 * tests/tail-2/Makefile.am (TESTS): Add big-4gb.
1090 2002-10-03 Jim Meyering <jim@meyering.net>
1092 * src/rm.c (AUTHORS): Mark translatable string with `N_ (...)'.
1093 * src/df.c (AUTHORS): Likewise.
1094 * src/du.c (AUTHORS): Likewise.
1095 * src/tail.c (AUTHORS): Likewise.
1096 * src/touch.c (AUTHORS): Likewise.
1098 2002-10-02 Jim Meyering <jim@meyering.net>
1100 * Makefile.am (SUBDIRS): Remove `old'.
1101 (EXTRA_DIST): List the files in old/.
1102 * configure.ac (AC_CONFIG_FILES): Remove old/* names.
1103 Suggestion from Akim Demaille.
1105 2002-10-01 Jim Meyering <jim@meyering.net>
1107 * src/sys2.h (SSIZE_MAX): Define.
1109 2002-09-30 Jim Meyering <jim@meyering.net>
1111 * src/csplit.c: Don't include stdlib.h here. It's already included
1114 2002-09-29 Jim Meyering <jim@meyering.net>
1116 * src/tr.c (find_bracketed_repeat): Rearrange pointer/integer
1117 expression to avoid bogus warning from gcc.
1119 * src/cat.c (simple_cat): Use a temporary to avoid bogus warnings.
1120 (cat): Declare insize and outsize to be of type size_t, not int.
1121 Rearrange pointer/integer expressions to avoid bogus warnings.
1122 (main): Declare insize and outsize to be of type size_t, not int.
1124 * src/tail.c (parse_options): Give a sensible diagnostic for
1125 an invalid byte or line count. Reported by Mikko Tuumanen.
1127 * src/touch.c (main): Split a long line.
1129 * tests/du/Makefile.am (TESTS): Add slink.
1130 * tests/du/slink: New test for system.h change of 2002-08-31.
1132 In move mode, always first try to rename. Before, upon failure to
1133 rename a directory, this code would never attempt to rename any
1134 other file in that directory, but would thenceforth always copy.
1135 On some systems (e.g., NetApp's OnTap-6.4), renaming a directory
1136 may fail with EXDEV, yet renaming files within that directory to
1137 a newly-created destination directory succeeds.
1138 * src/copy.c (copy_internal): Remove local, move_mode;
1139 use x->move_mode instead. Based on a patch from Tom Haynes.
1141 2002-09-28 Jim Meyering <jim@meyering.net>
1143 * src/split.c (FAIL_ONLY_ONE_WAY): New macro.
1144 Factor out some duplication.
1146 [case 'a']: Use strtoul rather than strtol to avoid compiler warnings.
1148 * src/sort.c (begfield, limfield): Rearrange comparisons to avoid
1150 (fillbuf, keycompare): Cast literal `-1' to size_t in comparisons,
1151 to avoid compiler warnings.
1153 * src/shred.c (dopass): Use a uintmax_t temporary to avoid bogus
1156 Fix things so `mkdir -p' can create very deep directories, e.g.,
1157 mkdir -p $(perl -e 'print "a/" x 40000') now works.
1158 * src/mkdir.c (main): For --parents (-p), call make_path with the
1159 entire directory name, so we don't ever require that file operations
1160 like stat or chmod be performed on the entire command line argument.
1161 * makepath.c (make_path): Restore umask *before* creating the final
1164 2002-09-27 Andreas Schwab <schwab@suse.de>
1166 * src/tail.c (tail_bytes): Change type of bytes_remaining to off_t
1167 to avoid overflow. Reported by Hans Lermen.
1169 2002-09-26 Jim Meyering <jim@meyering.net>
1171 * src/install.c (get_ids): Use strtoul, not strtol. Remove some casts.
1173 2002-09-25 Jim Meyering <jim@meyering.net>
1175 * src/test.c (eaccess): Change type of local `euid' from int to uid_t
1176 and add a cast, to avoid a warning about `signed and unsigned type in
1177 conditional expression'.
1179 2002-09-22 Jim Meyering <jim@meyering.net>
1181 * src/rmdir.c: Include "dirname.h", for declaration of
1182 strip_trailing_slashes.
1184 * src/stat.c (PRIdMAX, PRIuMAX): Remove definitions.
1185 Now they're defined through system.h.
1187 * src/cp-hash.c, src/dd.c, src/df.c, src/du.c, src/ls.c,
1188 * src/stat.c, src/wc.c: Remove all inclusions of inttypes.h,
1189 since it's already included from sys2.h via system.h.
1191 * Use automake-1.6f. Regenerate dependent files.
1193 * src/Makefile.am (PERL): Remove duplicate definition.
1195 fmt's -s, -t, -c options didn't work properly for long lines.
1196 Since get_line may end up calling put_paragraph (for long lines),
1197 be sure to set global, `other_indent', before it is used there.
1199 * src/fmt.c (set_other_indent): New function, factored out of...
1200 (get_paragraph): ... here. Call it.
1201 (get_line): Call set_other_indent before calling flush_paragraph,
1202 which calls fmt_paragraph, which in turn calls put_paragraph,
1203 which uses other_indent.
1205 * tests/fmt/Makefile.am (TESTS): Add long-line.
1206 * tests/fmt/long-line: New file/test, for the above fix.
1208 2002-09-21 Jim Meyering <jim@meyering.net>
1210 * src/od.c: No longer include deprecated <values.h>.
1211 It was required solely for now-removed reference to BITSPERBYTE.
1212 * src/install.c: Likewise.
1213 Suggestion from Bruno Haible.
1215 2002-09-06 Andreas Schwab <schwab@suse.de>
1217 `rmdir -p dir-specified-with-trailing-slash/' would fail.
1218 * src/rmdir.c (remove_parents): Strip trailing slashes.
1220 2002-09-20 Jim Meyering <jim@meyering.net>
1222 * tests/rmdir/t-slash: New file/test, for the above fix.
1223 * tests/rmdir/Makefile.am (TESTS): Add t-slash.
1225 * Makefile.maint (announcement): Arrange to gpg-sign the message.
1226 Add a URL for each detached signature file.
1228 2002-09-07 Bruno Haible <bruno@clisp.org>
1230 * configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation.
1232 2002-09-18 Jim Meyering <jim@meyering.net>
1234 `od -t x8' used the wrong (`l'-prefixed) printf format.
1235 Likewise for the o8 and u8 formats.
1236 * src/od.c (ISPEC_TO_FORMAT): Define macro.
1237 (decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG.
1238 Reported by Arun Sharma.
1240 2002-09-17 Jim Meyering <jim@meyering.net>
1242 * src/sys2.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary.
1243 From gettext's intl/loadmsgcat.c.
1245 * tests/od/x8: New file/test, for the above fix.
1246 * tests/od/Makefile.am (TESTS): Add x8.
1248 2002-09-15 Jim Meyering <jim@meyering.net>
1250 * Use autoconf-2.54. Regenerate dependent files.
1252 * src/csplit.c (get_format_width): Add cast to avoid
1253 warning about `signed and unsigned type in conditional expression'.
1255 2002-09-14 Jim Meyering <jim@meyering.net>
1257 * src/who.c (print_user): Change type of local to size_t
1258 to avoid warnings about `comparison between signed and unsigned'.
1259 * src/ptx.c (generate_all_output): Likewise.
1261 * src/dd.c (main, skip): Add casts to avoid warnings about
1262 `comparison between signed and unsigned'.
1264 * src/id.c (print_full_info, print_group_list): Add casts to avoid
1265 warnings about `signed and unsigned type in conditional expression'.
1267 * src/md5sum.c: Change type of global, digest_hex_bytes, to size_t
1268 to avoid warnings about `comparison between signed and unsigned'.
1269 (split_3): Change parameter names to be readable and add comment.
1270 Clean up the test for whether a line may be ignored.
1272 2002-09-13 Jim Meyering <jim@meyering.net>
1274 * src/printf.c (main): Handle leading command line argument of `--'.
1275 Reported by Raul: DervishD <raul@pleyades.net>
1276 * tests/misc/printf: New file: test for the above.
1277 * tests/misc/Makefile.am (TESTS): Add printf.
1279 * src/date.c (usage): Explain that %S's range of [0..60] is required --
1280 rather than 0..59 -- to accommodate the occasional positive leap second.
1281 Reported by Richard Neill.
1283 2002-09-12 Jim Meyering <jim@meyering.net>
1285 * src/Makefile.am (nanosec_libs): Define.
1286 (sleep_LDADD, tail_LDADD): Use it here.
1288 Factor nanosleep-related code into ../lib/xnanosleep.c.
1289 * src/sleep.c: Include xnanosleep.h.
1290 Factor out fenv.h-related code.
1291 (timespec_subtract): Remove function.
1292 (main): Remove code that deals with computing start and stop times
1293 as well as the loop around nanosleep. Now that's in xnanosleep.c.
1295 Allow S (in --sleep-interval=S) to be a floating point value.
1296 * src/tail.c: Include xnanosleep.h and xstrtod.h.
1297 Move declaration of global variable, sleep_interval, to ...
1299 (usage): Update description of --sleep-interval option.
1300 (tail_forever): New parameter, sleep_interval. Update caller.
1301 Use xnanosleep, rather than sleep.
1302 (parse_options): New parameter, sleep_interval. Update caller.
1303 Use xstrtod, now that we accept floating point values.
1304 Prompted by a patch from Augey Mikus.
1306 2002-09-06 Jim Meyering <jim@meyering.net>
1308 * src/remove.c (prompt): Change comment to give a better note to
1309 translators. From Michael Piefel.
1311 2002-09-02 Jim Meyering <jim@meyering.net>
1313 * README: A good problem report/patch includes diffs against
1314 the most recent test release.
1316 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Define.
1317 (pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
1319 * src/kill.c (print_table_row): Use an unsigned type for widths
1320 to avoid warning about comparison between signed and unsigned.
1321 (list_signals): Likewise.
1323 * src/od.c (skip): Add a cast to avoid warning about comparison
1324 between signed and unsigned.
1325 * src/install.c (get_ids): Likewise. Also rearrange range-checking
1326 comparisons to make them more readable.
1328 2002-09-01 Jim Meyering <jim@meyering.net>
1332 2002-08-31 Jim Meyering <jim@meyering.net>
1334 Symlinks were always reported as using 0 blocks.
1335 * src/system.h (ST_NBLOCKS): Don't depend on file type.
1336 This reverts the change of 2000-01-30.
1337 Based on a report and patch from Neil Brown via Michael Stone.
1338 This fixes Debian Bug#156358.
1340 * Most files: Change `exit (0)' to `exit (EXIT_SUCCESS)',
1341 `exit (1)' to `exit (EXIT_FAILURE)', and
1342 `usage (1)' to `usage (EXIT_FAILURE)'.
1344 * chgrp.c, chmod.c, chown.c, chroot.c, cp.c, date.c, dd.c, du.c,
1345 * hostname.c, id.c, install.c, ln.c, mkdir.c, mkfifo.c, mknod.c,
1346 * nice.c, pinky.c, printf.c, pwd.c, shred.c, sleep.c, stty.c,
1347 * su.c, tac-pipe.c, tail.c, tee.c, touch.c, uname.c, uptime.c,
1348 * users.c, who.c: Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
1349 But don't change `error (0, ...' to `error (EXIT_SUCCESS, ...', since
1350 error never exits successfully.
1352 2002-08-29 Jim Meyering <jim@meyering.net>
1354 * src/remove.c (remove_cwd_entries): Use closedir (not CLOSEDIR)
1355 when ignoring any return value.
1357 * src/remove.c (remove_cwd_entries): Detect and diagnose readdir
1358 failures. On some systems (at least EMC Celerra and Solaris5.8),
1359 this appears to be necessary.
1360 (is_empty_dir): Likewise. Also, always close directory handle.
1361 * src/ls.c (print_dir): Likewise.
1362 (print_dir): Rename local variable: reading -> dirp.
1363 Reported by Mike Coleman.
1365 2002-08-28 Jim Meyering <jim@meyering.net>
1367 * src/remove.c (remove_cwd_entries): Use CLOSEDIR, not closedir.
1368 Give a diagnostic and fail if closedir fails.
1370 2002-08-26 Jim Meyering <jim@meyering.net>
1372 * Makefile.am (THANKS-to-translators): New rule.
1373 (EXTRA_DIST): Add both THANKS-to-translators and THANKStt.in.
1374 * THANKStt.in: New file.
1376 * src/cat.c (close_stdout_wrapper): New, kludgey, function and
1378 (main): Register it with atexit.
1379 Close STDOUT_FILENO, to avoid a problem when writing to
1380 /dev/audio on at least Solaris 2.7 and 2.8 systems.
1381 Reported by Shing-Shong Shei.
1383 2002-08-25 Jim Meyering <jim@meyering.net>
1385 * src/cat.c (main): Close STDIN_FILENO rather than a literal `0'.
1386 * src/tac.c (main): Likewise.
1387 * src/tail.c (main): Likewise.
1388 * src/tee.c (main): Likewise.
1389 * src/tr.c (main): Likewise.
1390 * src/wc.c (main): Likewise.
1392 2002-08-20 Jim Meyering <jim@meyering.net>
1394 * tests/mv/setup: Rewrite not to use `: ${VAR=not_set}' paradigm.
1396 2002-08-10 Paul Eggert <eggert@twinsun.com>
1398 * src/nohup.sh: Don't use "exec --"; it's not portable and
1399 shouldn't be needed.
1401 2002-08-09 Jim Meyering <jim@meyering.net>
1403 * src/pr.c (main): Don't ignore -COLUMN if it's the last option.
1404 (usage): Clarify help text for the -COLUMN option.
1405 Patch by Padraig Brady.
1406 * tests/pr/Test.pm [col-last]: New test for the above.
1408 * configure.ac: Start with version 4.5.1, chosen so that it's larger
1409 than the latest version numbers of the component packages.
1411 * man/Makefile.am (check-x-vs-1): Set and export PATH so we use
1414 2002-08-08 Jim Meyering <jim@meyering.net>
1416 * src/date.c: Guard inclusion of <langinfo.h> with
1417 `#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
1418 * src/sort.c: Likewise.
1419 Patch by GOTO Masanori.
1421 2002-08-05 Paul Eggert <eggert@twinsun.com>
1423 Fix some minor time-related bugs with POSIX time arguments.
1424 Some valid time stamps were being rejected (notably -1, and
1425 time stamps before 1900 on 64-bit hosts). And some invalid
1426 time stamps were being accepted, e.g. September 31.
1428 * src/date.c (main): Adjust to posixtime signature change.
1429 * src/touch.c (main): Likewise. Remove unnecessary initialization.
1430 Use localtime, not posixtm, to warn about obsolete "touch".
1432 2002-08-05 Jim Meyering <jim@meyering.net>
1434 * tests/misc/Makefile.am (TESTS): Add nice and pathchk1.
1436 2002-08-04 Jim Meyering <jim@meyering.net>
1438 * src/Makefile.am (check-README): New target/rule.
1439 (check): Depend on it.
1441 * configure.ac (AC_CONFIG_FILES): Add old/Makefile and old/*/Makefile.
1443 2002-08-03 Jim Meyering <jim@meyering.net>
1445 * Makefile.am (SUBDIRS): Add old.
1446 * old/: New directory, containing legacy ChangeLog* and NEWS files
1447 from the fileutils, sh-utils, and textutils packages.
1449 * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false.
1451 2002-08-02 Paul Eggert <eggert@twinsun.com>
1453 * NEWS, doc/coreutils.texi: uniq now obeys LC_COLLATE.
1455 * src/uniq.c: Include hard-locale.h, xmemcoll.h.
1456 (hard_LC_COLLATE): New var.
1457 (different): Args are now char *, not const char *.
1458 Use xmemcoll instead of memcmp to compare lines, so that
1459 LC_COLLATE has effect. However, use memcmp if it is an
1461 (check_file): Do not include newline in comparison, so that
1462 xmemcoll has a byte to stomp on temporarily.
1463 (main): Set hard_LC_COLLATE.
1465 2002-07-29 Jim Meyering <jim@meyering.net>
1467 * Makefile.am (SUBDIRS): Remove djgpp, for now.
1469 2002-07-08 Jim Meyering <jim@meyering.net>
1471 * src/Makefile.am (uninstall-local): Search for @GNU_PACKAGE@,
1472 rather than the hard-coded `sh-utils'.
1474 2002-07-01 Jim Meyering <jim@meyering.net>
1476 * configure.ac: Merge the three files from fileutils,
1477 textutils, and sh-utils.
1478 * Makefile.am: Likewise.
1479 * src/Makefile.am: Likewise.
1482 version-control: never