1 2003-02-20 Jim Meyering <jim@meyering.net>
5 Now, df always displays the device file name corresponding to the
6 listed mount point under `Filesystem'. Before, for an unmounted
7 block- or character-special file argument, it would display the
8 command-line argument instead.
9 * src/df.c (show_disk): Return a value indicating whether
10 there was a match. Don't try to find a mount point here.
11 (show_entry): If show_disk doesn't find a match, call show_point.
13 2003-02-19 Jim Meyering <jim@meyering.net>
15 * src/du.c: Include "mmap-stack.h".
16 (du_files): Add prototype with ATTRIBUTE_NORETURN.
17 Exit from this function, not from...
19 Instead, if possible, invoke du_files through a macro that
20 runs it with a large, mmap'd stack.
22 * src/join.c (usage): Change wording in --help output:
23 use FILENUM instead of `SIDE' and say what FILENUM means.
24 Reported by Bernhard Gabler.
26 * src/df.c (print_header): Rather than using a hard-coded literal
27 string of spaces matching the length of the English `...Type' header,
28 output the right number of spaces to match the selected translation.
29 Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.
31 * src/split.c (bytes_split): Remove unnecessary `else' after break.
32 (lines_split): Likewise. and correct misleading indentation.
34 * src/split.c: Include "full-read.h".
35 (bytes_split, lines_split, line_bytes_split): Use full_read,
36 not safe_read. The way split was using the latter, a short read
37 could cause split to terminate before EOF.
39 * tests/misc/tty-eof: Test all programs that can read stdin,
40 requiring no arguments and that write to standard output.
42 * tests/misc/tty-eof: New file. Renamed from ...
43 * tests/misc/cat-tty-eof: Remove file. Rename to tty-eof.
44 * tests/misc/Makefile.am (TESTS): Reflect renaming.
46 2003-02-18 Jim Meyering <jim@meyering.net>
48 cksum would perform an extra read after encountering EOF
49 * src/cksum.c (cksum): Exit the loop upon EOF, too.
50 Patch by Michael Bacarella.
52 Test for the bug fixed today in cksum, md5sum, and sha1sum.
53 * tests/misc/cat-tty-eof: Generalize, clean-up, and test for
54 cat, cksum, md5sum, and sha1sum all in the same loop.
56 2003-02-17 Jim Meyering <jim@meyering.net>
58 * src/cp.c (run): New function, preparing for ...
61 2003-02-14 Jim Meyering <jim@meyering.net>
63 * src/remove.c: Include "euidaccess.h".
64 Remove declaration of euidaccess.
66 2003-02-12 Jim Meyering <jim@meyering.net>
68 * src/pathchk.c (portable_chars_only): Remove unnecessary `const'
69 in cast to avoid warning from icc. Reported by Alexandre Duret-Lutz.
71 2003-02-10 Jim Meyering <jim@meyering.net>
73 * src/test.c: Don't include group-member.h.
75 (eaccess): Rewrite function to set the real uid and gid temporarily
76 to the effective uid and gid, then invoke 'access', and then set the
77 real uid and gid back. On systems that lack setreuid or setregid,
78 fall back on the kludges in euidaccess. Before, it would not work
79 for e.g., files with ACLs, files that were marked immutable,
80 or on file systems mounted read-only. Nelson Beebe raised the issue.
81 Paul Eggert suggested the new implementation.
83 2003-02-09 Jim Meyering <jim@meyering.net>
85 * src/test.c (test_stat): Remove function. It's job is done (only
86 when necessary) by the wrapper in lib/stat.c. Adjust all uses.
88 2003-02-08 Jim Meyering <jim@meyering.net>
92 * tests/mv/part-symlink: Don't assume that the file owner username
93 length is less than 9 in ls output: instead, omit that field
94 altogether. Reported by, and suggested fix from, Ferdinand.
96 * tests/du/restore-wd: New test for just-fixed bug in ftw.c.
97 * tests/du/Makefile.am (TESTS): Add restore-wd.
99 * src/rm.c: Correct now-invalid comment about cycle-detection.
101 2003-02-06 Jim Meyering <jim@meyering.net>
103 * NEWS: Add entries from old/*/NEWS
104 from fileutils-4.1 through 4.1.11 and
105 from sh-utils-2.0 through 2.0.15. Suggestion from Karl Berry.
109 * src/du.c (process_file): Don't return early for excluded files
110 or for files whose dev/inode we've already seen.
112 2003-02-05 Jim Meyering <jim@meyering.net>
114 * tests/du/exclude: New file.
115 * tests/du/Makefile.am (TESTS): Add exclude.
117 2003-02-04 Dmitry V. Levin <ldv@altlinux.org>
119 * src/who.c (print_boottime, print_deadprocs, print_runlevel):
120 Fix memory allocation arithmetic.
122 2003-02-04 Jim Meyering <jim@meyering.net>
124 `df /dev/block-or-char-device-file--not-mounted' now reports
125 the name of the file system on which the file resides, usually `/'.
126 Before, it would leave the `Mounted on' field blank.
127 * src/df.c (show_disk): Move function to precede find_mount_point.
128 (show_disk): Add parameter: STATP.
129 If we don't find a matching device name, then resort to calling
130 find_mount_point. Reported by Bob Proulx.
132 2003-02-03 Andreas Schwab <schwab@suse.de>
134 * tests/rm/cycle: Require non-root.
135 * tests/rm/isatty: Likewise.
137 2003-02-02 Jim Meyering <jim@meyering.net>
141 * man/Makefile.am (check-x-vs-1): Use @PATH_SEPARATOR@, not `:'.
143 Ensure that there are no offending uses of `:'.
144 * Makefile.maint (makefile_path_separator_check): New rule.
145 (local-check): Add it to the list.
147 2003-02-01 Jim Meyering <jim@meyering.net>
149 * src/du.c (MAX_N_DESCRIPTORS): Define.
151 * src/stat.c (G_fail): New global.
152 (human_time): Diagnose failed localtime, not failed nstrftime.
153 (main): Fail if G_fail is set.
155 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
157 * tests/basename/Makefile.am: Use @PATH_SEPARATOR@ instead of
158 hard-coding the path-separator. Also double-quote the new PATH,
159 to avoid problems when the path-separator is a semi-colon or when
160 `pwd` contains e.g. a space.
161 * tests/chgrp/Makefile.am: Likewise.
162 * tests/chmod/Makefile.am: Likewise.
163 * tests/chown/Makefile.am: Likewise.
164 * tests/cp/Makefile.am: Likewise.
165 * tests/dd/Makefile.am: Likewise.
166 * tests/dircolors/Makefile.am: Likewise.
167 * tests/du/Makefile.am: Likewise.
168 * tests/expr/Makefile.am: Likewise.
169 * tests/factor/Makefile.am: Likewise.
170 * tests/fmt/Makefile.am: Likewise.
171 * tests/install/Makefile.am: Likewise.
172 * tests/ln/Makefile.am: Likewise.
173 * tests/ls/Makefile.am: Likewise.
174 * tests/ls-2/Makefile.am: Likewise.
175 * tests/md5sum/Makefile.am: Likewise.
176 * tests/misc/Makefile.am: Likewise.
177 * tests/mkdir/Makefile.am: Likewise.
178 * tests/mv/Makefile.am: Likewise.
179 * tests/od/Makefile.am: Likewise.
180 * tests/rm/Makefile.am: Likewise.
181 * tests/rmdir/Makefile.am: Likewise.
182 * tests/seq/Makefile.am: Likewise.
183 * tests/sha1sum/Makefile.am: Likewise.
184 * tests/shred/Makefile.am: Likewise.
185 * tests/stty/Makefile.am: Likewise.
186 * tests/sum/Makefile.am: Likewise.
187 * tests/tail-2/Makefile.am: Likewise.
188 * tests/touch/Makefile.am: Likewise.
189 * tests/tsort/Makefile.am: Likewise.
190 * tests/unexpand/Makefile.am: Likewise.
192 2003-01-31 Jim Meyering <jim@meyering.net>
194 * src/stat.c: Include "file-type.h"
195 (print_human_type): Remove function.
196 (human_access): Rename from print_human_access. Return a string.
197 (human_time): Rename from print_human_time. Return a string.
198 (print_stat): Arrange so that field width and an alignment specifier
199 are honored for the %A, %F, %x, %y, and %z formats.
200 [%F]: Use file_type; this gives slightly different file type strings,
201 e.g., `directory' instead of `Directory' and `regular file' or
202 `regular empty file' instead of `Regular file'.
203 Prompted by a report from Richard Dawe that the uses of
204 S_IFSOCK and S_IFIFO in print_human_time were not portable
205 to systems using e.g., DJGPP.
207 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
209 * src/stat.c (print_stat): Use S_ISLNK rather than an explicit
210 test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
212 2003-01-31 Jim Meyering <jim@meyering.net>
214 * src/du.c (main): Upon processing an invalid option or an invalid
215 --exclude-from or --max-depth option argument, don't exit right away,
216 in case there are others. Rather record the failure and exit after
217 processing other options.
219 * GNUmakefile (TAR_OPTIONS): Set and export, in order to make
220 tar archive easier to reproduce.
222 Rewrite to perform directory traversal using nftw.
224 * src/du.c: Include "dirname.h", "ftw.h", and "quotearg.h".
226 (opt_one_file_system): Move global into `main'.
227 (path, xstat, exit_status): Remove declarations.
228 (arg_length, suffix_length): New globals.
229 (G_fail): New global, sort of like the old `exit_status'.
230 (IS_FTW_DIR_TYPE): Define.
231 (print_only_size): New function.
232 (process_file): New function.
233 (str_init, ensure_space, str_copyc, str_concatc): Remove functions.
234 (str_trunc, pop_dir, count_entry): Likewise.
235 (du_files): Rewrite to use nftw.
237 2003-01-30 Jim Meyering <jim@meyering.net>
239 * tests/du/trailing-slash: Ensure that du/ftw follows a command-line
240 symlink-to-directory with -L, even without the trailing slash.
242 2003-01-27 Jim Meyering <jim@meyering.net>
244 * src/Makefile.am (check-misc): Check for st_blocks, too.
246 * src/stat.c (print_stat): Use ST_NBLOCKS rather than `->st_blocks'.
247 Reported by Richard Dawe.
249 2003-01-27 Andreas Schwab <schwab@suse.de>
251 * src/ls.c (quote_name): Add fourth parameter, width, into which to
252 store the screen columns, and return the number of bytes instead.
253 (print_dir): Pass NULL as fourth parameter of quote_name.
254 (print_name_with_quoting): Likewise.
255 (length_of_file_name_and_frills): Get the width from the fourth
256 parameter of quote_name instead of return value.
258 2003-01-27 Jim Meyering <jim@meyering.net>
260 * src/ls.c (decode_switches): If `dired' is set without
261 `format == long_format', then silently reset dired. This doesn't
262 change the behavior of ls (all prior uses of dired were protected
263 by `&& format == long_format'), and lets us...
264 (DIRED_INDENT): ... remove the `format == long_format' conjunct.
265 (PUSH_CURRENT_DIRED_POS): Likewise.
268 2003-01-22 Jim Meyering <jim@meyering.net>
270 * tests/du/no-x: New test, for functionality added to lib/ftw.c.
271 * tests/du/Makefile.am (TESTS): Add no-x.
273 2003-01-21 Jim Meyering <jim@meyering.net>
275 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS
276 && HAVE_STRUCT_DIRENT_D_TYPE]: If a file has d_type == DT_UNKNOWN
277 it may still be a directory -- or not (e.g., with FreeBSD on an
278 NFS-mounted file system), so resort to calling lstat to find out.
279 Based on a patch by Michael van Elst.
281 * tests/cp/same-file: Don't assume that the file owner username
282 length is less than 9 in ls output: instead, omit that field
283 altogether. Reported by, and suggested fix from, Ferdinand.
285 2003-01-20 Jim Meyering <jim@meyering.net>
287 * tests/date/Test.pm (wide-fmt): New test to demonstrate that
288 large format widths no longer cause strftime to infloop.
290 * Makefile.maint (mail_gpg_sign_cookie): Remove now-unused definition.
292 2003-01-19 Jim Meyering <jim@meyering.net>
294 * src/readlink.c: Include "canonicalize.h".
296 2003-01-18 Jim Meyering <jim@meyering.net>
298 * src/ls.c (Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]:
300 (enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
301 (long_options): Add option --dereference-command-line-symlink-to-dir.
302 (main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
303 rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
304 -d, -F, -l options is specified.
305 (decode_switches): Handle --dereference-command-line-symlink-to-dir.
306 (gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
307 Change --dereference-command-line (-H) to dereference *all*
308 command line arguments, including broken symlinks.
310 2003-01-15 Paul Eggert <eggert@twinsun.com>
312 Change ls -H back to the way it was yesterday, since this is
313 compatible with FreeBSD and the POSIX spec is confusing
314 and somewhat contradictory.
316 * src/ls.c (DEREF_COMMAND_LINE_ARGUMENTS): Change name back
317 from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
318 (long_options): Change the long option name back.
319 (usage): Change the usage back.
320 (gobble_file): When -H is specified, dereference a top-level
321 arg even if it points to a non-directory.
323 2003-01-15 Jim Meyering <jim@meyering.net>
325 * src/ls.c (gobble_file): Fall back on using lstat when required:
326 when --dereference (-L) is not specified, and
327 - when operating on a dangling symlink
328 - when operating on command-line-symlink-to-directories
329 This fixes numerous problems. Here are examples:
330 - `ls dangling-symlink' would fail with `no such file...'
331 Now it prints `dangling-symlink'.
332 - `ls -i symlink' would mistakenly print the inode of the referent.
333 Now it prints the inode of the symlink. Likewise for --size (-s).
334 Based on a patch from Michael Stone.
335 Reported by Deepak Goel as Debian bug #173793.
337 Rename ls's --dereference-command-line (-H)
338 option to --dereference-command-line-symlink-to-dir.
339 * src/ls.c [enum Dereference_symlink]
340 (DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
341 DEREF_COMMAND_LINE_ARGUMENTS. Update all uses.
342 (long_options): Rename the long option.
343 (usage): Say that --dereference-... changes how ls treats
344 only symlinks to directories specified on the command line.
346 2003-01-14 Jim Meyering <jim@meyering.net>
348 * tests/ls/dangle: New file/test, for the above fix.
349 * tests/ls/inode: Another new file/test, for the above fix.
350 * tests/ls/Makefile.am (TESTS): Add dangle and inode.
352 * src/ls.c (gobble_file): Fix a bug introduced in 4.5.4 that made it
353 so that ls --color would no longer highlight the names of files with
354 the execute bit set when not specified on the command line.
355 Patch by Michael Stone. Reported by Stephen Depooter as
358 * tests/ls-2/tests (color-exe): New test, for the above fix.
360 2003-01-13 Jim Meyering <jim@meyering.net>
362 * tests/shred/exact: Also test for just fixed bug with --zero.
364 * src/shred.c (long_opts): --zero does not require an argument.
365 Patch by Michael Stone. Reported by Roland Turner as Debian bug 172019.
367 2003-01-12 Jim Meyering <jim@meyering.net>
369 * Makefile.maint (cvs-update): Skip any file with local modifications.
371 * src/unexpand.c (usage): Document --first-only and mention that
372 --tabs=N (-t) enables --all (-a). Reported by wiregauze@yahoo.com.
374 2002-12-01 Dmitry V. Levin <ldv@altlinux.org>
376 * src/df.c: Include "canonicalize.h".
377 Use canonicalize_file_name unconditionally.
379 2003-01-09 Jim Meyering <jim@meyering.net>
381 * README: Add readlink.
383 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
385 * src/df.c: Include "xgetcwd.h".
386 * src/pwd.c: Likewise.
388 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
390 * src/shred.c: Remove declaration of xstrdup.
391 We already get it via xalloc.h which is included via system.h.
393 2002-08-27 Dmitry V. Levin <ldv@altlinux.org>
395 New program: readlink.
397 * src/Makefile.am (bin_PROGRAMS): Add readlink.
398 * src/readlink.c: New file.
400 * man/readlink.x: New file.
401 * man/Makefile.am (dist_man_MANS): Add readlink.1.
402 (readlink.1): New rule.
404 2003-01-09 Jim Meyering <jim@meyering.net>
406 When selecting ranges of byte offsets (as opposed to ranges of fields)
407 and when --output-delimiter=STRING is specified, output STRING between
408 ranges of selected bytes.
409 * src/cut.c (RANGE_START_SENTINEL): Define.
410 (output_delimiter_specified): New global.
411 (print_kth): Add parameter. Adjust all callers.
412 (set_fields): Mark each range-start index with RANGE_START_SENTINEL.
413 (cut_bytes): When requested, output STRING between ranges of
415 (main): Make a diagnostic a little clearer.
416 Based on a patch from Jan Nieuwenhuizen.
418 * tests/cut/Test.pm: New tests for the above.
420 * src/cut.c (set_fields): Make code agree with comment:
421 Don't merge abutting ranges like 4- and 2-3. This makes no
422 difference currently, but is required to support an upcoming change.
424 2003-01-07 Jim Meyering <jim@meyering.net>
426 * src/cut.c (set_fields): Fix typo in comment.
428 * tests/touch/not-owner: New test, mostly extracted from fail-diag.
429 * tests/touch/Makefile.am (TESTS): Add not-owner.
430 * tests/touch/fail-diag: Remove the test for non-owner diagnostic.
431 Now, this tests only the nonexistent-directory diagnostic.
432 Suggestion from Michael Stone.
434 * tests/touch/fail-diag: Fix typo: s/ld/ls/.
436 2003-01-04 Jim Meyering <jim@meyering.net>
438 * src/copy.h: Remove use of PARAMS.
439 * src/remove.h: Likewise.
440 * src/chown-core.h: Likewise.
442 rm could be tricked into mistakenly reporting a cycle.
443 * src/remove.c: [cycle_check_state]: New global.
444 (remove_cwd_entries): Adapt to new semantics of cycle_check.
445 (rm): Call cycle_check_init and cycle_check_free for each file.
446 * tests/rm/cycle (rm): New test, for the above fix.
447 * tests/rm/Makefile.am (TESTS): Add cycle.
449 When rm detects a cycle, don't abort the entire command,
450 but rather just the affected command line argument.
451 * src/remove.c: Include <setjmp.h>
452 (struct dirstack_state) [current_arg_jumpbuf]: New member.
453 (remove_cwd_entries): Call longjmp if we detect a cycle.
454 (rm): Call setjmp here.
456 * src/remove.c (cycle_check, is_power_of_two): Remove functions.
457 Instead, include cycle-check.h and use it.
459 * src/remove.h (struct dev_ino): Remove declaration.
461 * src/remove.c (remove_cwd_entries): Fix typos in comment.
463 Don't include trailing /. in diagnostics about directories.
464 * src/remove.c (full_filename_): When FILENAME is just `.'
465 and there is a nonempty directory-name part, don't append `/.'.
466 * tests/rm/unread2: Remove trailing /. from diagnostic.
467 * tests/rm/rm2: Likewise.
469 * src/remove.c (struct dirstack_state): Define.
470 To be used in place of these file-scoped globals ...
471 (dir_stack, len_stack, Active_dir): Remove globals.
472 (ds_init, ds_free): New functions.
473 (full_filename): Define.
474 (full_filename_): Rename from full_filename.
476 Begin to make AD_* functions more generic.
477 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
479 (AD_INIT_OTHER_MEMBERS): Define.
480 (remove_dir): Define the `status' member manually after each
481 call to AD_push or AD_push_initial.
483 * src/Makefile.am (check-misc): New rule, to ensure that no more
484 S_IS* macro definitions sneak into the code.
485 (check): Depend on check-misc.
487 * src/remove.c [S_ISLNK]: Don't define. It's already defined in sys2.h.
488 * src/du.c (count_entry) [S_ISLNK]: Don't define.
489 * src/shred.c [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.
491 2003-01-03 Jim Meyering <jim@meyering.net>
493 * src/true.c: Add copyright.
494 (AUTHORS): I suppose I've written it.
496 * src/Makefile.am (false.c): Make the generated file be read-only.
498 2003-01-04 Jim Meyering <meyering@lucent.com>
500 * src/ls.c: Include "dev-ino.h".
501 [struct dev_ino]: Remove declaration.
503 2003-01-02 Jim Meyering <meyering@lucent.com>
505 * src/cp.c (do_copy): Tweak diagnostic to be consistent with the one
506 from mv: s/missing file arguments/missing file argument/.
507 With --target-directory=DIR, cp and mv work with a single file argument.
508 Reported by Karl Berry.
510 * tests/rm/isatty: Enable this test.
512 2002-12-31 Jim Meyering <meyering@lucent.com>
514 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
516 (AD_INIT_OTHER_MEMBERS): Define.
517 (remove_dir): Define the `status' member manually after each
518 call to AD_push or AD_push_initial.
520 * src/ls.c [struct dev_ino]: Remove definition.
521 Include "dev-ino.h" instead.
523 2002-12-28 Jim Meyering <meyering@lucent.com>
525 * tests/du/Makefile.am (TESTS): Add no-deref.
526 * tests/du/no-deref: New script.
528 2002-12-23 Jim Meyering <meyering@lucent.com>
530 * src/remove.c (remove_cwd_entries): Fix typo in comment.
532 2002-12-21 Jim Meyering <jim@meyering.net>
534 * announce-gen: Generate MML-formatted announcement.
535 This makes it a *lot* harder to send stale MD5/SHA1 signatures.
537 2002-12-20 Jim Meyering <jim@meyering.net>
539 * src/touch.c (touch): Change the wording of a diagnostic so
540 that it makes sense both when the file exists and when it doesn't.
541 Suggestion from Michael Stone.
543 2002-12-18 Jim Meyering <jim@meyering.net>
545 * src/stty.c (valid_options): Declare to be static.
547 2002-12-15 Jim Meyering <jim@meyering.net>
549 * Makefile.cfg: Remove rules related to generating m4/jm-glibc-io.m4.
551 * src/chmod.c, src/copy.c, src/copy.h, src/cp-hash.h, src/csplit.c:
552 * src/date.c, src/expr.c, src/fmt.c, src/id.c, src/install.c:
553 * src/ls.c, src/od.c, src/pathchk.c, src/pr.c, src/remove.c:
554 * src/shred.c, src/sort.c, src/stat.c, src/stty.c, src/sum.c:
555 * src/tee.c, src/test.c: Remove all uses of `PARAMS'.
557 * src/remove.c (PARAMS): Remove definition.
558 * src/sys2.h: Likewise.
560 * src/ls.c, src/stat.c, src/date.c: Remove declaration of nstrftime.
561 Include strftime.h instead.
563 2002-12-14 Jim Meyering <jim@meyering.net>
565 * Makefile.cfg ($(url_dir_list)): Use .../coreutils, not .../fetish.
567 * src/system.h [! HAVE_DECL_MEMRCHR]: Declare memrchr.
568 This is necessary at least for Irix6.5 when using c89.
569 Reported by Nelson Beebe.
571 * tests/misc/Makefile.am (TESTS): Add cat-tty-eof.
573 * tests/misc/cat-tty-eof: New test.
575 * src/mknod.c (usage): Specify how major and minor mode numbers
576 are interpreted. Report forwarded by Kristin E Thomas.
577 * src/mknod.c: Remove now-redundant usage-specifying comment.
579 2002-12-13 Jim Meyering <jim@meyering.net>
583 * tests/du/trailing-slash: Allow for a directory of size `0'.
584 That happens at least on file systems of type tmpfs on linux-2.4.18.
586 * announce-gen: New script to begin replacing the commands
587 associated with the rule here...
588 * Makefile.maint (announcement): Invoke announce-gen.
589 * Makefile.am (EXTRA_DIST): Add announce-gen.
591 * tests/cp/preserve-2: New file/test, for latest fix.
592 * tests/cp/Makefile.am (TESTS): Add preserve-2.
594 2002-12-11 TAKAI Kousuke <takai@vlsi.kuee.kyoto-u.ac.jp>
596 Fix a bug whereby cp would fail to parse an option like
597 --preserve=mode,ownership.
598 * src/cp.c (decode_preserve_arg): Advance `comma' to
599 point the character following the comma.
601 2002-12-11 Jim Meyering <jim@meyering.net>
603 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Undefine before defining,
604 in case it's already defined.
606 2002-12-09 Jim Meyering <jim@meyering.net>
608 * tests/touch/fail-diag: Don't get a test failure if /no exists.
609 Instead, evoke a framework failure if /no-$$ exists.
610 Reported by Michael Stone.
612 2002-12-08 Jim Meyering <jim@meyering.net>
614 * src/du.c (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
615 Define to rpl_lstat, so that even on systems like Solaris 2.8,
616 du honors (per POSIX) the trailing slash on an argument referring
617 to a symlink-to-directory.
619 2002-12-06 Jim Meyering <jim@meyering.net>
621 * Use autoconf-2.57. Regenerate dependent files.
622 * Use automake-1.7.2. Regenerate dependent files.
624 * src/ls.c (gobble_file): Also stat the file if it's a
625 regular file and --indicator-style=classify (aka -F).
626 Thanks to Ed Santiago for opening my eyes.
628 * tests/ls/file-type: New file. Test for the above.
629 A test to contrast ls -F and ls --indicator-style=file-type.
630 * tests/ls/Makefile.am (TESTS): Add file-type.
632 2002-12-04 Jim Meyering <jim@meyering.net>
634 * tests/ls/follow-slink: Make sure the symlink was created.
635 Richard Dawe reported that `ln -s link link' succeeds, but creates
636 no file on systems running some version of the DJGPP libc.
638 2002-12-03 Jim Meyering <jim@meyering.net>
640 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr)
641 since this package no longer panders to K&R compilers.
643 2002-12-02 Jim Meyering <jim@meyering.net>
645 * tests/du/slink: Skip this test if `.' is on a non-local file system.
647 * tests/Fetish.pm (_at_replace): Do the substitution only if there's
648 something to replace.
650 2002-12-01 Jim Meyering <jim@meyering.net>
652 * src/stat.c: Don't include <string.h> or <ctype.h>.
653 That's already done via system.h.
654 * src/dircolors.c: Don't include <ctype.h>.
656 2002-11-30 Jim Meyering <jim@meyering.net>
658 * ls.c (gobble_file): Remove the block of code that caused
659 `ls --color -F symlink-to-dir' to list the files in
660 `symlink-to-dir/.'. Now, it prints `symlink-to-dir@', (just
661 like `ls -F symlink-to-dir') but with the addition of highlighting.
662 Similarly, `ls --color -dF symlink-to-dir' would print
663 `symlink-to-dir/'; now it prints `symlink-to-dir@'.
664 Reported by Jeff Sheinberg as Debian bug #168203.
665 * tests/ls-2/tests (sl-F-color, sl-dF-color): New tests for the above.
667 ls is now more efficient: with certain options, it no longer needs
668 to stat each directory entry on systems with valid dirent.d_type.
669 * src/ls.c (print_dir): Add DT_LNK and DT_REG.
670 (main): Make --recursive set format_needs_type, not format_needs_stat.
671 (gobble_file): Remove a FIXME comment, now that it's fixed.
673 2002-11-24 Jim Meyering <jim@meyering.net>
675 * src/du.c (du_files): Don't strip any trailing slash.
676 Rewrite so that `/' is no longer represented internally as
678 (count_entry): When appending a file name component,
679 account for the fact that the current path may end in `/'.
680 François Pinard reported that `du symlink-to-dir/' was not
681 equivalent to `du symlink-to-dir/.'. Now it is.
682 * tests/du/trailing-slash: New file/test, for the above fix.
683 * tests/du/Makefile.am (TESTS): Add trailing-slash.
685 2002-11-23 Jim Meyering <jim@meyering.net>
687 * src/tac.c (output): Declare some local variables to be of type size_t,
688 rather than `int' to avoid warnings from gcc.
690 2002-11-21 Paul Eggert <eggert@twinsun.com>
692 * src/ls.c (decode_switches): Use case-sensitive matching to
693 decode the QUOTING_STYLE environment variable. This is more
694 consistent with the documentation, and with --quoting-style.
696 2002-11-21 Martin Buck <martin.buck@ascom.ch
698 * src/stty.c (struct speeds): Add support for all baud rates defined
701 2002-11-19 Jim Meyering <jim@meyering.net>
703 * tests/sum/sysv: Export LC_ALL=C, to avoid failure when
704 run in a UTF locale. Report and suggested fix by Bruno Haible.
705 * tests/fmt/basic: Likewise.
707 2002-11-17 Jim Meyering <jim@meyering.net>
709 * configure.ac: Update via autoupdate.
710 Add `AM_GNU_GETTEXT_VERSION(0.11.5)'.
712 * src/mv.c (movefile): Don't remove trailing slashes from SOURCE.
713 Reported by Hans Ginzel.
715 2002-11-15 Jim Meyering <jim@meyering.net>
717 * Makefile.cfg (gnu_rel_host): Define.
718 (url_dir_list): Choose from (alpha|ftp).gnu.org depending
719 on whether $(VERSION) looks like a major release number.
721 * Makefile.maint (mail_gpg_sign_cookie): Backslash-escape `#'.
722 (release): Rename from `alpha'.
723 (alpha): Depend on release.
725 * Makefile.maint (signatures): Define with ?=, so it's easy to override.
727 2002-11-14 Jim Meyering <jim@meyering.net>
729 * Makefile.maint (mail_gpg_sign_cookie): Make optional.
730 (announcement): Use the new variable.
732 * Makefile.maint: Sync with Bison, i.e.:
733 (po-check): Scan .l and .y files instead of the
734 .c and the .h files that they generate. This fixes the bug
735 reported by Tim Van Holder in:
736 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
737 Look for N_ as well as for _. Try to avoid matching #define for
741 2002-11-12 Jim Meyering <jim@meyering.net>
743 * src/ls.c (HAVE_SYMLINKS): Remove unnecessary macro definition.
744 Replace sole use with equivalent `#ifdef S_ISLNK'.
745 Inconsistency reported by Dmitry V. Levin.
747 2002-11-11 Jim Meyering <jim@meyering.net>
749 * src/stat.c (usage): Transform --help items output via s/ - / /,
750 so that help2man produces properly formatted man pages.
751 Reported by Herbert Xu as Debian bug #168400.
753 2002-11-10 Jim Meyering <jim@meyering.net>
755 * src/ls.c (sighandler): Handle SIGTSTP specially.
756 Based on suggestions from Solar Designer and Dmitry V. Levin.
759 * Makefile.cfg (cvs_files): Define. From autoconf.
760 (local_updates): Likewise.
762 * src/ls.c (restore_default_color_handler, sigtstp_handler):
764 (sighandler): New function, based on the one in sort.c.
765 (main): Use sigaction, if possible; otherwise signal.
766 Handle these signals:
767 SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
768 Don't register our handler if the signal is already being ignored.
770 * src/dd.c (interrupt_handler): Use raise, rather than kill+getpid.
771 * src/csplit.c (interrupt_handler): Likewise.
772 * src/sort.c (sighandler): Likewise.
773 (main): Declare `i' and `nsigs' to be unsigned, not int.
775 2002-11-09 Jim Meyering <jim@meyering.net>
777 ls --color: restore terminal text color upon signal.
778 * src/ls.c: Include "full-write.h" and <signal.h>.
779 (restore_default_color, restore_default_color_handler): New functions.
780 (sigtstp_handler, put_indicator_direct): New functions.
781 (main) [print_with_color]: Register signal handlers.
782 Patch mostly by Solar Designer and Stanislav Ievlev.
784 Update from autoconf.
785 * Makefile.maint (AMTAR): Remove definition.
786 (update, cvs-update, po-update, do-po-update): New rules.
787 (wget-update): Update (thus renaming to cvs-update).
788 (automake_repo): Use anoncvs@sources.redhat.com.
790 2002-11-06 Jim Meyering <jim@meyering.net>
792 * tests/misc/Makefile.am (TESTS): Add printf-hex.
794 * tests/misc/printf: Be careful to test the code in this package,
795 not the shell built-in function.
797 * src/printf.c (print_esc): A hexadecimal escape sequence has
798 at most two hex. digits, not three. Reported by Padraig Brady.
799 (usage): Update description.
800 * tests/misc/printf-hex: New file/test, for the above fix.
802 2002-10-07 Paul Eggert <eggert@twinsun.com>
804 Add support for locale-specific size indications (e.g.,
805 thousands-separators) and for explicit size suffixes on output.
807 * doc/coreutils.texi (Block size): Say that:
808 This affects display format as well as block size.
809 Fractional block counts are rounded up.
810 ls file size blocksize defaults to 1.
811 A block size spec preceded by ' generates thousands separators.
812 A suffix without a preceding integer generates suffixes.
813 (tail invocation): 32k -> 32 KiB.
814 (What information is listed): ls -h is now equivalent to
815 ls --block-size=human, and ls -H is now equivalent to
816 ls --block-size=si. Displayed file size is now always affected by
819 * lib/inttostr.c, lib/inttostr.h, lib/imaxtostr.c, lib/offtostr.c,
820 lib/umaxtostr.c: New files, taken from GNU tar.
822 * lib/Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c,
824 (EXTRA_DIST): Add inttostr.c.
826 * lib/human.c, lib/human.h: Rewrite to support locale-specific
827 notations like thousands separators.
828 Specify what includer of include.h must include beforehand.
829 (human_group_digits, human_suppress_point_zero, human_autoscale,
830 human_base_1024, human_SI, human_B): New enum values.
831 (human_readable): Rename from human_readable_inexact; put the
832 options before the sizes. All uses changed. The old human_readable
833 function has been removed; use inttostr.h instead.
834 (human_options): Renamed from human_block_size, with new signature
835 that allows block sizes up to UINTMAX_MAX. All callers changed.
837 * m4/prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv,
838 AC_HEADER_STDBOOL. No need to check for limits.h since it's in
839 freestanding C89. No need to check for stdlib.h or string.h since
840 autoconf does this now.
842 * src/cksum.c (cksum): Use primitives from inttostr.h, not
843 human.h, to print large numbers simply.
844 * src/csplit.c (handle_line_error, parse_patterns): Likewise.
845 * src/dd.c (print_stats, main): Likewise.
846 * src/df.c (print_header): Likewise.
847 * src/factor.c (print_factors): Likewise.
848 * src/ls.c (print_long_format, print_file_name_and_frills): Likewise.
849 * src/shred.c (dopass): Likewise.
850 * src/sort.c (checkfp): Likewise.
851 * src/sum.c (bsd_sum_file, sysv_sym_file): Likewise.
852 * src/tail.c (xlseek): Likewise.
853 * src/wc.c (write_counts, wc): Likewise.
855 * src/df.c (human_output_opts): New var.
856 (output_block_size): Now uintmax_t, not int, to handle larger
857 block sizes. All uses changed.
858 * src/du.c: Likewise.
859 * src/ls.c: Likewise.
861 * src/df.c (print_header): In the header line, prefer SI to human
862 representation if it's shorter; if neither is shorter, try to
863 intuit what the user would prefer.
865 * src/expr.c (inttostr): Remove; use new imaxtostr library
868 * src/ls.c (file_output_block_size): New var, to distinguish
869 file sizes from other sizes.
870 (decode_switches): Set it.
872 * src/shred.c (OUTPUT_BLOCK_SIZE): remove.
873 (dopass): When printing progress, use floor for what has been done
874 so far (since we should be conservative there), and ceiling for
875 what needs to be done (since that's what other programs use).
877 2002-10-19 Jim Meyering <jim@meyering.net>
879 * src/pinky.c (print_heading): Align TTY and Name headings.
880 Reported by Karl Eichwalder.
882 2002-10-18 Jim Meyering <jim@meyering.net>
884 * src/split.c (cwrite): Change type of `bytes' parameter to size_t
885 Remove now-useless cast.
886 (stdread): Remove function.
887 (bytes_split): Use size_t instead of int.
888 Use safe_read, not stdread.
889 (lines_split): Likewise.
890 Use memchr rather than a `while' loop.
891 (line_bytes_split): Use size_t instead of int.
892 Use safe_read, not stdread.
893 (main): Add some FIXME comments to remind me to remove casts.
895 * src/system.h (ST_BLKSIZE): Correct comment describing how to
896 reproduce HPUX-11 cat failure. From Petter Reinholdtsen.
898 2002-10-17 Jim Meyering <jim@meyering.net>
900 Fix a problem that could make e.g., `cat' misbehave on systems which
901 give invalid (unreasonably large) values for stat.st_blksize.
902 * src/system.h (ST_BLKSIZE): Ensure that the result is in [1..4MB].
903 Reported by Petter Reinholdtsen.
905 2002-10-14 Jim Meyering <jim@meyering.net>
907 Specifying a printf conversion specifer as nl's separator string
908 could cause nl to segfault.
909 * src/nl.c (build_print_fmt): Don't include separator string
910 in the printf format; it might contain `%'.
911 Use a better bound on the length of the print_fmt buffer.
912 (print_lineno): Print the separator here instead.
913 Reported by Doug Coleman.
915 * tests/misc/nl: New file/tests, including a test for the above.
916 * tests/misc/Makefile.am (TESTS): Add nl.
918 * tests/misc/split-l: New test, to make sure `split --lines=N' works.
919 * tests/misc/Makefile.am (TESTS): Add split-l.
921 2002-10-13 Jim Meyering <jim@meyering.net>
925 * src/du.c (usage): Tweak description of --dereference-args/-D.
927 * src/du.c (count_entry): Also save cwd when dereferencing (via
928 --dereference-args, -D) a command-line argument.
929 Reported by Michal Svec. Based on a patch by Andreas Schwab.
931 * src/Makefile.am (../AUTHORS): New target/rule.
933 2002-10-12 Jim Meyering <jim@meyering.net>
935 * src/paste.c (paste_parallel): Declare local, `delims_saved', to be
936 of type size_t, since that's the way it's used and avoids a warning.
938 * src/csplit.c (struct cstring) [len]: Declare to be unsigned int,
939 since that's how it's always used and avoids a new warning from gcc.
940 (read_input): Adapt to new safe_read ABI.
942 * src/cut.c (cut_fields): Add a temporary size_t variable, n_bytes,
945 * src/pinky.c (print_long_entry): fread returns size_t.
946 Declare local `bytes' accordingly, to avoid warning.
948 tail -c +N would perform an extra read after encountering EOF
949 [this change is analogous (bytes vs. lines) to the one of 2002-01-27]
950 * src/tail.c (start_bytes): Detect EOF, inform caller.
951 (tail_bytes): Upon EOF in start_bytes, return immediately.
952 (file_lines): Reorganize to use memrchr rather than an explicit loop.
953 Adapt to new safe_read ABI.
955 2002-10-11 Jim Meyering <jim@meyering.net>
957 * tests/du/deref: New file/test, for the above fix.
958 * tests/du/Makefile.am (TESTS): Add deref.
960 2002-10-10 Jim Meyering <jim@meyering.net>
962 * tests/ln/Makefile.am (TESTS): Add target-1.
963 * tests/ln/target-1: New file/test, for the fix on 2002-10-08.
965 2002-10-09 Jim Meyering <jim@meyering.net>
967 * tests/cp/backup-is-src: Ensure that certain environment variables
968 are not set (e.g., SIMPLE_BACKUP_SUFFIX). Reported by Duncan Roe.
970 * tests/tail-2/big-4gb: Mark this as an expensive test; it would
971 consume 4GB of disk space on systems without support for sparse files.
972 Fix a logic error that'd make it `cat err' even though dd didn't fail.
974 * src/dircolors.hin (.jar): Fix typo: s/;3$/;31/.
975 Patch by steven@magelico.net, forwarded by Michael Stone.
977 * tests/ls/dired: Ensure that ls produces English messages.
978 Patch by Alexey Vyskubov, forwarded by Michael Stone.
980 2002-10-08 Dmitry V. Levin <ldv@altlinux.org>
982 * src/ln.c (main): Fix target_directory parsing when n_files == 1.
984 2002-10-08 Jim Meyering <jim@meyering.net>
986 * tests/tail-2/big-4gb: Use double quotes around diagnostic.
987 Fix syntax in test: use =, not ==.
988 Reported by Bob Proulx.
989 Change all the rest like this: grep -lR "testing framework'" .\
990 |xargs perl -pi -e 's/'\''(\$0: failure in testing framework)'\''/"$1"/'
992 * src/sum.c (sysv_sum_file): Adapt to new safe_read ABI.
993 * src/tr.c (squeeze_filter, read_and_delete, read_and_xlate): Likewise.
994 * src/tac.c (save_stdin, tac_stdin_to_mem): Likewise.
995 * src/wc.c (wc): Likewise.
997 2002-10-07 Paul Eggert <eggert@twinsun.com>
1000 Don't advance the write pointer past the end of the write buffer.
1001 * src/sort.c (begfield, limfield): Likewise.
1003 2002-10-07 Jim Meyering <jim@meyering.net>
1005 * src/cat.c (simple_cat, cat): Adapt to new safe_read ABI.
1006 * src/head.c (head_bytes, head_lines): Likewise.
1008 2002-10-06 Jim Meyering <jim@meyering.net>
1010 * src/dd.c (scanargs): Ensure that specified block sizes (specified
1011 via ibs=N, obs=N, and bs=N) are no larger than SSIZE_MAX.
1012 (skip, dd_copy): Adapt to new safe_read ABI.
1014 * Makefile.maint (signatures): Define.
1016 (announcement): Depend on $(signatures).
1018 * Makefile.maint (announcement): Output all URLs for detached
1019 signatures, not just the last one from the previous loop.
1021 2002-10-05 Jim Meyering <jim@meyering.net>
1025 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS]: With `rm -i DIR',
1026 don't recurse into directory, DIR. Prompted by a report from
1029 * tests/rm/i-no-r: New file/test, for the above fix.
1030 * tests/rm/Makefile.am (TESTS): Add i-no-r.
1032 * tests/tail-2/big-4gb: New file/test, for the fix of 2002-09-27.
1033 * tests/tail-2/Makefile.am (TESTS): Add big-4gb.
1035 2002-10-03 Jim Meyering <jim@meyering.net>
1037 * src/rm.c (AUTHORS): Mark translatable string with `N_ (...)'.
1038 * src/df.c (AUTHORS): Likewise.
1039 * src/du.c (AUTHORS): Likewise.
1040 * src/tail.c (AUTHORS): Likewise.
1041 * src/touch.c (AUTHORS): Likewise.
1043 2002-10-02 Jim Meyering <jim@meyering.net>
1045 * Makefile.am (SUBDIRS): Remove `old'.
1046 (EXTRA_DIST): List the files in old/.
1047 * configure.ac (AC_CONFIG_FILES): Remove old/* names.
1048 Suggestion from Akim Demaille.
1050 2002-10-01 Jim Meyering <jim@meyering.net>
1052 * src/sys2.h (SSIZE_MAX): Define.
1054 2002-09-30 Jim Meyering <jim@meyering.net>
1056 * src/csplit.c: Don't include stdlib.h here. It's already included
1059 2002-09-29 Jim Meyering <jim@meyering.net>
1061 * src/tr.c (find_bracketed_repeat): Rearrange pointer/integer
1062 expression to avoid bogus warning from gcc.
1064 * src/cat.c (simple_cat): Use a temporary to avoid bogus warnings.
1065 (cat): Declare insize and outsize to be of type size_t, not int.
1066 Rearrange pointer/integer expressions to avoid bogus warnings.
1067 (main): Declare insize and outsize to be of type size_t, not int.
1069 * src/tail.c (parse_options): Give a sensible diagnostic for
1070 an invalid byte or line count. Reported by Mikko Tuumanen.
1072 * src/touch.c (main): Split a long line.
1074 * tests/du/Makefile.am (TESTS): Add slink.
1075 * tests/du/slink: New test for system.h change of 2002-08-31.
1077 In move mode, always first try to rename. Before, upon failure to
1078 rename a directory, this code would never attempt to rename any
1079 other file in that directory, but would thenceforth always copy.
1080 On some systems (e.g., NetApp's OnTap-6.4), renaming a directory
1081 may fail with EXDEV, yet renaming files within that directory to
1082 a newly-created destination directory succeeds.
1083 * src/copy.c (copy_internal): Remove local, move_mode;
1084 use x->move_mode instead. Based on a patch from Tom Haynes.
1086 2002-09-28 Jim Meyering <jim@meyering.net>
1088 * src/split.c (FAIL_ONLY_ONE_WAY): New macro.
1089 Factor out some duplication.
1091 [case 'a']: Use strtoul rather than strtol to avoid compiler warnings.
1093 * src/sort.c (begfield, limfield): Rearrange comparisons to avoid
1095 (fillbuf, keycompare): Cast literal `-1' to size_t in comparisons,
1096 to avoid compiler warnings.
1098 * src/shred.c (dopass): Use a uintmax_t temporary to avoid bogus
1101 Fix things so `mkdir -p' can create very deep directories, e.g.,
1102 mkdir -p $(perl -e 'print "a/" x 40000') now works.
1103 * src/mkdir.c (main): For --parents (-p), call make_path with the
1104 entire directory name, so we don't ever require that file operations
1105 like stat or chmod be performed on the entire command line argument.
1106 * makepath.c (make_path): Restore umask *before* creating the final
1109 2002-09-27 Andreas Schwab <schwab@suse.de>
1111 * src/tail.c (tail_bytes): Change type of bytes_remaining to off_t
1112 to avoid overflow. Reported by Hans Lermen.
1114 2002-09-26 Jim Meyering <jim@meyering.net>
1116 * src/install.c (get_ids): Use strtoul, not strtol. Remove some casts.
1118 2002-09-25 Jim Meyering <jim@meyering.net>
1120 * src/test.c (eaccess): Change type of local `euid' from int to uid_t
1121 and add a cast, to avoid a warning about `signed and unsigned type in
1122 conditional expression'.
1124 2002-09-22 Jim Meyering <jim@meyering.net>
1126 * src/rmdir.c: Include "dirname.h", for declaration of
1127 strip_trailing_slashes.
1129 * src/stat.c (PRIdMAX, PRIuMAX): Remove definitions.
1130 Now they're defined through system.h.
1132 * src/cp-hash.c, src/dd.c, src/df.c, src/du.c, src/ls.c,
1133 * src/stat.c, src/wc.c: Remove all inclusions of inttypes.h,
1134 since it's already included from sys2.h via system.h.
1136 * Use automake-1.6f. Regenerate dependent files.
1138 * src/Makefile.am (PERL): Remove duplicate definition.
1140 fmt's -s, -t, -c options didn't work properly for long lines.
1141 Since get_line may end up calling put_paragraph (for long lines),
1142 be sure to set global, `other_indent', before it is used there.
1144 * src/fmt.c (set_other_indent): New function, factored out of...
1145 (get_paragraph): ... here. Call it.
1146 (get_line): Call set_other_indent before calling flush_paragraph,
1147 which calls fmt_paragraph, which in turn calls put_paragraph,
1148 which uses other_indent.
1150 * tests/fmt/Makefile.am (TESTS): Add long-line.
1151 * tests/fmt/long-line: New file/test, for the above fix.
1153 2002-09-21 Jim Meyering <jim@meyering.net>
1155 * src/od.c: No longer include deprecated <values.h>.
1156 It was required solely for now-removed reference to BITSPERBYTE.
1157 * src/install.c: Likewise.
1158 Suggestion from Bruno Haible.
1160 2002-09-06 Andreas Schwab <schwab@suse.de>
1162 `rmdir -p dir-specified-with-trailing-slash/' would fail.
1163 * src/rmdir.c (remove_parents): Strip trailing slashes.
1165 2002-09-20 Jim Meyering <jim@meyering.net>
1167 * tests/rmdir/t-slash: New file/test, for the above fix.
1168 * tests/rmdir/Makefile.am (TESTS): Add t-slash.
1170 * Makefile.maint (announcement): Arrange to gpg-sign the message.
1171 Add a URL for each detached signature file.
1173 2002-09-07 Bruno Haible <bruno@clisp.org>
1175 * configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation.
1177 2002-09-18 Jim Meyering <jim@meyering.net>
1179 `od -t x8' used the wrong (`l'-prefixed) printf format.
1180 Likewise for the o8 and u8 formats.
1181 * src/od.c (ISPEC_TO_FORMAT): Define macro.
1182 (decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG.
1183 Reported by Arun Sharma.
1185 2002-09-17 Jim Meyering <jim@meyering.net>
1187 * src/sys2.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary.
1188 From gettext's intl/loadmsgcat.c.
1190 * tests/od/x8: New file/test, for the above fix.
1191 * tests/od/Makefile.am (TESTS): Add x8.
1193 2002-09-15 Jim Meyering <jim@meyering.net>
1195 * Use autoconf-2.54. Regenerate dependent files.
1197 * src/csplit.c (get_format_width): Add cast to avoid
1198 warning about `signed and unsigned type in conditional expression'.
1200 2002-09-14 Jim Meyering <jim@meyering.net>
1202 * src/who.c (print_user): Change type of local to size_t
1203 to avoid warnings about `comparison between signed and unsigned'.
1204 * src/ptx.c (generate_all_output): Likewise.
1206 * src/dd.c (main, skip): Add casts to avoid warnings about
1207 `comparison between signed and unsigned'.
1209 * src/id.c (print_full_info, print_group_list): Add casts to avoid
1210 warnings about `signed and unsigned type in conditional expression'.
1212 * src/md5sum.c: Change type of global, digest_hex_bytes, to size_t
1213 to avoid warnings about `comparison between signed and unsigned'.
1214 (split_3): Change parameter names to be readable and add comment.
1215 Clean up the test for whether a line may be ignored.
1217 2002-09-13 Jim Meyering <jim@meyering.net>
1219 * src/printf.c (main): Handle leading command line argument of `--'.
1220 Reported by Raul: DervishD <raul@pleyades.net>
1221 * tests/misc/printf: New file: test for the above.
1222 * tests/misc/Makefile.am (TESTS): Add printf.
1224 * src/date.c (usage): Explain that %S's range of [0..60] is required --
1225 rather than 0..59 -- to accommodate the occasional positive leap second.
1226 Reported by Richard Neill.
1228 2002-09-12 Jim Meyering <jim@meyering.net>
1230 * src/Makefile.am (nanosec_libs): Define.
1231 (sleep_LDADD, tail_LDADD): Use it here.
1233 Factor nanosleep-related code into ../lib/xnanosleep.c.
1234 * src/sleep.c: Include xnanosleep.h.
1235 Factor out fenv.h-related code.
1236 (timespec_subtract): Remove function.
1237 (main): Remove code that deals with computing start and stop times
1238 as well as the loop around nanosleep. Now that's in xnanosleep.c.
1240 Allow S (in --sleep-interval=S) to be a floating point value.
1241 * src/tail.c: Include xnanosleep.h and xstrtod.h.
1242 Move declaration of global variable, sleep_interval, to ...
1244 (usage): Update description of --sleep-interval option.
1245 (tail_forever): New parameter, sleep_interval. Update caller.
1246 Use xnanosleep, rather than sleep.
1247 (parse_options): New parameter, sleep_interval. Update caller.
1248 Use xstrtod, now that we accept floating point values.
1249 Prompted by a patch from Augey Mikus.
1251 2002-09-06 Jim Meyering <jim@meyering.net>
1253 * src/remove.c (prompt): Change comment to give a better note to
1254 translators. From Michael Piefel.
1256 2002-09-02 Jim Meyering <jim@meyering.net>
1258 * README: A good problem report/patch includes diffs against
1259 the most recent test release.
1261 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Define.
1262 (pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
1264 * src/kill.c (print_table_row): Use an unsigned type for widths
1265 to avoid warning about comparison between signed and unsigned.
1266 (list_signals): Likewise.
1268 * src/od.c (skip): Add a cast to avoid warning about comparison
1269 between signed and unsigned.
1270 * src/install.c (get_ids): Likewise. Also rearrange range-checking
1271 comparisons to make them more readable.
1273 2002-09-01 Jim Meyering <jim@meyering.net>
1277 2002-08-31 Jim Meyering <jim@meyering.net>
1279 Symlinks were always reported as using 0 blocks.
1280 * src/system.h (ST_NBLOCKS): Don't depend on file type.
1281 This reverts the change of 2000-01-30.
1282 Based on a report and patch from Neil Brown via Michael Stone.
1283 This fixes Debian Bug#156358.
1285 * Most files: Change `exit (0)' to `exit (EXIT_SUCCESS)',
1286 `exit (1)' to `exit (EXIT_FAILURE)', and
1287 `usage (1)' to `usage (EXIT_FAILURE)'.
1289 * chgrp.c, chmod.c, chown.c, chroot.c, cp.c, date.c, dd.c, du.c,
1290 * hostname.c, id.c, install.c, ln.c, mkdir.c, mkfifo.c, mknod.c,
1291 * nice.c, pinky.c, printf.c, pwd.c, shred.c, sleep.c, stty.c,
1292 * su.c, tac-pipe.c, tail.c, tee.c, touch.c, uname.c, uptime.c,
1293 * users.c, who.c: Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
1294 But don't change `error (0, ...' to `error (EXIT_SUCCESS, ...', since
1295 error never exits successfully.
1297 2002-08-29 Jim Meyering <jim@meyering.net>
1299 * src/remove.c (remove_cwd_entries): Use closedir (not CLOSEDIR)
1300 when ignoring any return value.
1302 * src/remove.c (remove_cwd_entries): Detect and diagnose readdir
1303 failures. On some systems (at least EMC Celerra and Solaris5.8),
1304 this appears to be necessary.
1305 (is_empty_dir): Likewise. Also, always close directory handle.
1306 * src/ls.c (print_dir): Likewise.
1307 (print_dir): Rename local variable: reading -> dirp.
1308 Reported by Mike Coleman.
1310 2002-08-28 Jim Meyering <jim@meyering.net>
1312 * src/remove.c (remove_cwd_entries): Use CLOSEDIR, not closedir.
1313 Give a diagnostic and fail if closedir fails.
1315 2002-08-26 Jim Meyering <jim@meyering.net>
1317 * Makefile.am (THANKS-to-translators): New rule.
1318 (EXTRA_DIST): Add both THANKS-to-translators and THANKStt.in.
1319 * THANKStt.in: New file.
1321 * src/cat.c (close_stdout_wrapper): New, kludgey, function and
1323 (main): Register it with atexit.
1324 Close STDOUT_FILENO, to avoid a problem when writing to
1325 /dev/audio on at least Solaris 2.7 and 2.8 systems.
1326 Reported by Shing-Shong Shei.
1328 2002-08-25 Jim Meyering <jim@meyering.net>
1330 * src/cat.c (main): Close STDIN_FILENO rather than a literal `0'.
1331 * src/tac.c (main): Likewise.
1332 * src/tail.c (main): Likewise.
1333 * src/tee.c (main): Likewise.
1334 * src/tr.c (main): Likewise.
1335 * src/wc.c (main): Likewise.
1337 2002-08-20 Jim Meyering <jim@meyering.net>
1339 * tests/mv/setup: Rewrite not to use `: ${VAR=not_set}' paradigm.
1341 2002-08-10 Paul Eggert <eggert@twinsun.com>
1343 * src/nohup.sh: Don't use "exec --"; it's not portable and
1344 shouldn't be needed.
1346 2002-08-09 Jim Meyering <jim@meyering.net>
1348 * src/pr.c (main): Don't ignore -COLUMN if it's the last option.
1349 (usage): Clarify help text for the -COLUMN option.
1350 Patch by Padraig Brady.
1351 * tests/pr/Test.pm [col-last]: New test for the above.
1353 * configure.ac: Start with version 4.5.1, chosen so that it's larger
1354 than the latest version numbers of the component packages.
1356 * man/Makefile.am (check-x-vs-1): Set and export PATH so we use
1359 2002-08-08 Jim Meyering <jim@meyering.net>
1361 * src/date.c: Guard inclusion of <langinfo.h> with
1362 `#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
1363 * src/sort.c: Likewise.
1364 Patch by GOTO Masanori.
1366 2002-08-05 Paul Eggert <eggert@twinsun.com>
1368 Fix some minor time-related bugs with POSIX time arguments.
1369 Some valid time stamps were being rejected (notably -1, and
1370 time stamps before 1900 on 64-bit hosts). And some invalid
1371 time stamps were being accepted, e.g. September 31.
1373 * src/date.c (main): Adjust to posixtime signature change.
1374 * src/touch.c (main): Likewise. Remove unnecessary initialization.
1375 Use localtime, not posixtm, to warn about obsolete "touch".
1377 2002-08-05 Jim Meyering <jim@meyering.net>
1379 * tests/misc/Makefile.am (TESTS): Add nice and pathchk1.
1381 2002-08-04 Jim Meyering <jim@meyering.net>
1383 * src/Makefile.am (check-README): New target/rule.
1384 (check): Depend on it.
1386 * configure.ac (AC_CONFIG_FILES): Add old/Makefile and old/*/Makefile.
1388 2002-08-03 Jim Meyering <jim@meyering.net>
1390 * Makefile.am (SUBDIRS): Add old.
1391 * old/: New directory, containing legacy ChangeLog* and NEWS files
1392 from the fileutils, sh-utils, and textutils packages.
1394 * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false.
1396 2002-08-02 Paul Eggert <eggert@twinsun.com>
1398 * NEWS, doc/coreutils.texi: uniq now obeys LC_COLLATE.
1400 * src/uniq.c: Include hard-locale.h, xmemcoll.h.
1401 (hard_LC_COLLATE): New var.
1402 (different): Args are now char *, not const char *.
1403 Use xmemcoll instead of memcmp to compare lines, so that
1404 LC_COLLATE has effect. However, use memcmp if it is an
1406 (check_file): Do not include newline in comparison, so that
1407 xmemcoll has a byte to stomp on temporarily.
1408 (main): Set hard_LC_COLLATE.
1410 2002-07-29 Jim Meyering <jim@meyering.net>
1412 * Makefile.am (SUBDIRS): Remove djgpp, for now.
1414 2002-07-08 Jim Meyering <jim@meyering.net>
1416 * src/Makefile.am (uninstall-local): Search for @GNU_PACKAGE@,
1417 rather than the hard-coded `sh-utils'.
1419 2002-07-01 Jim Meyering <jim@meyering.net>
1421 * configure.ac: Merge the three files from fileutils,
1422 textutils, and sh-utils.
1423 * Makefile.am: Likewise.
1424 * src/Makefile.am: Likewise.
1427 version-control: never