1 2003-02-06 Jim Meyering <jim@meyering.net>
5 * src/du.c (process_file): Don't return early for excluded files
6 or for files whose dev/inode we've already seen.
8 2003-02-05 Jim Meyering <jim@meyering.net>
10 * tests/du/exclude: New file.
11 * tests/du/Makefile.am (TESTS): Add exclude.
13 2003-02-04 Dmitry V. Levin <ldv@altlinux.org>
15 * src/who.c (print_boottime, print_deadprocs, print_runlevel):
16 Fix memory allocation arithmetic.
18 2003-02-04 Jim Meyering <jim@meyering.net>
20 `df /dev/block-or-char-device-file--not-mounted' now reports
21 the name of the file system on which the file resides, usually `/'.
22 Before, it would leave the `Mounted on' field blank.
23 * src/df.c (show_disk): Move function to precede find_mount_point.
24 (show_disk): Add parameter: STATP.
25 If we don't find a matching device name, then resort to calling
26 find_mount_point. Reported by Bob Proulx.
28 2003-02-03 Andreas Schwab <schwab@suse.de>
30 * tests/rm/cycle: Require non-root.
31 * tests/rm/isatty: Likewise.
33 2003-02-02 Jim Meyering <jim@meyering.net>
37 * man/Makefile.am (check-x-vs-1): Use @PATH_SEPARATOR@, not `:'.
39 Ensure that there are no offending uses of `:'.
40 * Makefile.maint (makefile_path_separator_check): New rule.
41 (local-check): Add it to the list.
43 2003-02-01 Jim Meyering <jim@meyering.net>
45 * src/du.c (MAX_N_DESCRIPTORS): Define.
47 * src/stat.c (G_fail): New global.
48 (human_time): Diagnose failed localtime, not failed nstrftime.
49 (main): Fail if G_fail is set.
51 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
53 * tests/basename/Makefile.am: Use @PATH_SEPARATOR@ instead of
54 hard-coding the path-separator. Also double-quote the new PATH,
55 to avoid problems when the path-separator is a semi-colon or when
56 `pwd` contains e.g. a space.
57 * tests/chgrp/Makefile.am: Likewise.
58 * tests/chmod/Makefile.am: Likewise.
59 * tests/chown/Makefile.am: Likewise.
60 * tests/cp/Makefile.am: Likewise.
61 * tests/dd/Makefile.am: Likewise.
62 * tests/dircolors/Makefile.am: Likewise.
63 * tests/du/Makefile.am: Likewise.
64 * tests/expr/Makefile.am: Likewise.
65 * tests/factor/Makefile.am: Likewise.
66 * tests/fmt/Makefile.am: Likewise.
67 * tests/install/Makefile.am: Likewise.
68 * tests/ln/Makefile.am: Likewise.
69 * tests/ls/Makefile.am: Likewise.
70 * tests/ls-2/Makefile.am: Likewise.
71 * tests/md5sum/Makefile.am: Likewise.
72 * tests/misc/Makefile.am: Likewise.
73 * tests/mkdir/Makefile.am: Likewise.
74 * tests/mv/Makefile.am: Likewise.
75 * tests/od/Makefile.am: Likewise.
76 * tests/rm/Makefile.am: Likewise.
77 * tests/rmdir/Makefile.am: Likewise.
78 * tests/seq/Makefile.am: Likewise.
79 * tests/sha1sum/Makefile.am: Likewise.
80 * tests/shred/Makefile.am: Likewise.
81 * tests/stty/Makefile.am: Likewise.
82 * tests/sum/Makefile.am: Likewise.
83 * tests/tail-2/Makefile.am: Likewise.
84 * tests/touch/Makefile.am: Likewise.
85 * tests/tsort/Makefile.am: Likewise.
86 * tests/unexpand/Makefile.am: Likewise.
88 2003-01-31 Jim Meyering <jim@meyering.net>
90 * src/stat.c: Include "file-type.h"
91 (print_human_type): Remove function.
92 (human_access): Rename from print_human_access. Return a string.
93 (human_time): Rename from print_human_time. Return a string.
94 (print_stat): Arrange so that field width and an alignment specifier
95 are honored for the %A, %F, %x, %y, and %z formats.
96 [%F]: Use file_type; this gives slightly different file type strings,
97 e.g., `directory' instead of `Directory' and `regular file' or
98 `regular empty file' instead of `Regular file'.
99 Prompted by a report from Richard Dawe that the uses of
100 S_IFSOCK and S_IFIFO in print_human_time were not portable
101 to systems using e.g., DJGPP.
103 2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk>
105 * src/stat.c (print_stat): Use S_ISLNK rather than an explicit
106 test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
108 2003-01-31 Jim Meyering <jim@meyering.net>
110 * src/du.c (main): Upon processing an invalid option or an invalid
111 --exclude-from or --max-depth option argument, don't exit right away,
112 in case there are others. Rather record the failure and exit after
113 processing other options.
115 * GNUmakefile (TAR_OPTIONS): Set and export, in order to make
116 tar archive easier to reproduce.
118 Rewrite to perform directory traversal using nftw.
120 * src/du.c: Include "dirname.h", "ftw.h", and "quotearg.h".
122 (opt_one_file_system): Move global into `main'.
123 (path, xstat, exit_status): Remove declarations.
124 (arg_length, suffix_length): New globals.
125 (G_fail): New global, sort of like the old `exit_status'.
126 (IS_FTW_DIR_TYPE): Define.
127 (print_only_size): New function.
128 (process_file): New function.
129 (str_init, ensure_space, str_copyc, str_concatc): Remove functions.
130 (str_trunc, pop_dir, count_entry): Likewise.
131 (du_files): Rewrite to use nftw.
133 2003-01-30 Jim Meyering <jim@meyering.net>
135 * tests/du/trailing-slash: Ensure that du/ftw follows a command-line
136 symlink-to-directory with -L, even without the trailing slash.
138 2003-01-27 Jim Meyering <jim@meyering.net>
140 * src/Makefile.am (check-misc): Check for st_blocks, too.
142 * src/stat.c (print_stat): Use ST_NBLOCKS rather than `->st_blocks'.
143 Reported by Richard Dawe.
145 2003-01-27 Andreas Schwab <schwab@suse.de>
147 * src/ls.c (quote_name): Add fourth parameter, width, into which to
148 store the screen columns, and return the number of bytes instead.
149 (print_dir): Pass NULL as fourth parameter of quote_name.
150 (print_name_with_quoting): Likewise.
151 (length_of_file_name_and_frills): Get the width from the fourth
152 parameter of quote_name instead of return value.
154 2003-01-27 Jim Meyering <jim@meyering.net>
156 * src/ls.c (decode_switches): If `dired' is set without
157 `format == long_format', then silently reset dired. This doesn't
158 change the behavior of ls (all prior uses of dired were protected
159 by `&& format == long_format'), and lets us...
160 (DIRED_INDENT): ... remove the `format == long_format' conjunct.
161 (PUSH_CURRENT_DIRED_POS): Likewise.
164 2003-01-22 Jim Meyering <jim@meyering.net>
166 * tests/du/no-x: New test, for functionality added to lib/ftw.c.
167 * tests/du/Makefile.am (TESTS): Add no-x.
169 2003-01-21 Jim Meyering <jim@meyering.net>
171 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS
172 && HAVE_STRUCT_DIRENT_D_TYPE]: If a file has d_type == DT_UNKNOWN
173 it may still be a directory -- or not (e.g., with FreeBSD on an
174 NFS-mounted file system), so resort to calling lstat to find out.
175 Based on a patch by Michael van Elst.
177 * tests/cp/same-file: Don't assume that the file owner username
178 length is less than 9 in ls output: instead, omit that field
179 altogether. Reported by, and suggested fix from, Ferdinand.
181 2003-01-20 Jim Meyering <jim@meyering.net>
183 * tests/date/Test.pm (wide-fmt): New test to demonstrate that
184 large format widths no longer cause strftime to infloop.
186 * Makefile.maint (mail_gpg_sign_cookie): Remove now-unused definition.
188 2003-01-19 Jim Meyering <jim@meyering.net>
190 * src/readlink.c: Include "canonicalize.h".
192 2003-01-18 Jim Meyering <jim@meyering.net>
194 * src/ls.c (Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]:
196 (enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
197 (long_options): Add option --dereference-command-line-symlink-to-dir.
198 (main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
199 rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
200 -d, -F, -l options is specified.
201 (decode_switches): Handle --dereference-command-line-symlink-to-dir.
202 (gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
203 Change --dereference-command-line (-H) to dereference *all*
204 command line arguments, including broken symlinks.
206 2003-01-15 Paul Eggert <eggert@twinsun.com>
208 Change ls -H back to the way it was yesterday, since this is
209 compatible with FreeBSD and the POSIX spec is confusing
210 and somewhat contradictory.
212 * src/ls.c (DEREF_COMMAND_LINE_ARGUMENTS): Change name back
213 from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
214 (long_options): Change the long option name back.
215 (usage): Change the usage back.
216 (gobble_file): When -H is specified, dereference a top-level
217 arg even if it points to a non-directory.
219 2003-01-15 Jim Meyering <jim@meyering.net>
221 * src/ls.c (gobble_file): Fall back on using lstat when required:
222 when --dereference (-L) is not specified, and
223 - when operating on a dangling symlink
224 - when operating on command-line-symlink-to-directories
225 This fixes numerous problems. Here are examples:
226 - `ls dangling-symlink' would fail with `no such file...'
227 Now it prints `dangling-symlink'.
228 - `ls -i symlink' would mistakenly print the inode of the referent.
229 Now it prints the inode of the symlink. Likewise for --size (-s).
230 Based on a patch from Michael Stone.
231 Reported by Deepak Goel as Debian bug #173793.
233 Rename ls's --dereference-command-line (-H)
234 option to --dereference-command-line-symlink-to-dir.
235 * src/ls.c [enum Dereference_symlink]
236 (DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
237 DEREF_COMMAND_LINE_ARGUMENTS. Update all uses.
238 (long_options): Rename the long option.
239 (usage): Say that --dereference-... changes how ls treats
240 only symlinks to directories specified on the command line.
242 2003-01-14 Jim Meyering <jim@meyering.net>
244 * tests/ls/dangle: New file/test, for the above fix.
245 * tests/ls/inode: Another new file/test, for the above fix.
246 * tests/ls/Makefile.am (TESTS): Add dangle and inode.
248 * src/ls.c (gobble_file): Fix a bug introduced in 4.5.4 that made it
249 so that ls --color would no longer highlight the names of files with
250 the execute bit set when not specified on the command line.
251 Patch by Michael Stone. Reported by Stephen Depooter as
254 * tests/ls-2/tests (color-exe): New test, for the above fix.
256 2003-01-13 Jim Meyering <jim@meyering.net>
258 * tests/shred/exact: Also test for just fixed bug with --zero.
260 * src/shred.c (long_opts): --zero does not require an argument.
261 Patch by Michael Stone. Reported by Roland Turner as Debian bug 172019.
263 2003-01-12 Jim Meyering <jim@meyering.net>
265 * Makefile.maint (cvs-update): Skip any file with local modifications.
267 * src/unexpand.c (usage): Document --first-only and mention that
268 --tabs=N (-t) enables --all (-a). Reported by wiregauze@yahoo.com.
270 2002-12-01 Dmitry V. Levin <ldv@altlinux.org>
272 * src/df.c: Include "canonicalize.h".
273 Use canonicalize_file_name unconditionally.
275 2003-01-09 Jim Meyering <jim@meyering.net>
277 * README: Add readlink.
279 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
281 * src/df.c: Include "xgetcwd.h".
282 * src/pwd.c: Likewise.
284 2002-11-30 Dmitry V. Levin <ldv@altlinux.org>
286 * src/shred.c: Remove declaration of xstrdup.
287 We already get it via xalloc.h which is included via system.h.
289 2002-08-27 Dmitry V. Levin <ldv@altlinux.org>
291 New program: readlink.
293 * src/Makefile.am (bin_PROGRAMS): Add readlink.
294 * src/readlink.c: New file.
296 * man/readlink.x: New file.
297 * man/Makefile.am (dist_man_MANS): Add readlink.1.
298 (readlink.1): New rule.
300 2003-01-09 Jim Meyering <jim@meyering.net>
302 When selecting ranges of byte offsets (as opposed to ranges of fields)
303 and when --output-delimiter=STRING is specified, output STRING between
304 ranges of selected bytes.
305 * src/cut.c (RANGE_START_SENTINEL): Define.
306 (output_delimiter_specified): New global.
307 (print_kth): Add parameter. Adjust all callers.
308 (set_fields): Mark each range-start index with RANGE_START_SENTINEL.
309 (cut_bytes): When requested, output STRING between ranges of
311 (main): Make a diagnostic a little clearer.
312 Based on a patch from Jan Nieuwenhuizen.
314 * tests/cut/Test.pm: New tests for the above.
316 * src/cut.c (set_fields): Make code agree with comment:
317 Don't merge abutting ranges like 4- and 2-3. This makes no
318 difference currently, but is required to support an upcoming change.
320 2003-01-07 Jim Meyering <jim@meyering.net>
322 * src/cut.c (set_fields): Fix typo in comment.
324 * tests/touch/not-owner: New test, mostly extracted from fail-diag.
325 * tests/touch/Makefile.am (TESTS): Add not-owner.
326 * tests/touch/fail-diag: Remove the test for non-owner diagnostic.
327 Now, this tests only the nonexistent-directory diagnostic.
328 Suggestion from Michael Stone.
330 * tests/touch/fail-diag: Fix typo: s/ld/ls/.
332 2003-01-04 Jim Meyering <jim@meyering.net>
334 * src/copy.h: Remove use of PARAMS.
335 * src/remove.h: Likewise.
336 * src/chown-core.h: Likewise.
338 rm could be tricked into mistakenly reporting a cycle.
339 * src/remove.c: [cycle_check_state]: New global.
340 (remove_cwd_entries): Adapt to new semantics of cycle_check.
341 (rm): Call cycle_check_init and cycle_check_free for each file.
342 * tests/rm/cycle (rm): New test, for the above fix.
343 * tests/rm/Makefile.am (TESTS): Add cycle.
345 When rm detects a cycle, don't abort the entire command,
346 but rather just the affected command line argument.
347 * src/remove.c: Include <setjmp.h>
348 (struct dirstack_state) [current_arg_jumpbuf]: New member.
349 (remove_cwd_entries): Call longjmp if we detect a cycle.
350 (rm): Call setjmp here.
352 * src/remove.c (cycle_check, is_power_of_two): Remove functions.
353 Instead, include cycle-check.h and use it.
355 * src/remove.h (struct dev_ino): Remove declaration.
357 * src/remove.c (remove_cwd_entries): Fix typos in comment.
359 Don't include trailing /. in diagnostics about directories.
360 * src/remove.c (full_filename_): When FILENAME is just `.'
361 and there is a nonempty directory-name part, don't append `/.'.
362 * tests/rm/unread2: Remove trailing /. from diagnostic.
363 * tests/rm/rm2: Likewise.
365 * src/remove.c (struct dirstack_state): Define.
366 To be used in place of these file-scoped globals ...
367 (dir_stack, len_stack, Active_dir): Remove globals.
368 (ds_init, ds_free): New functions.
369 (full_filename): Define.
370 (full_filename_): Rename from full_filename.
372 Begin to make AD_* functions more generic.
373 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
375 (AD_INIT_OTHER_MEMBERS): Define.
376 (remove_dir): Define the `status' member manually after each
377 call to AD_push or AD_push_initial.
379 * src/Makefile.am (check-misc): New rule, to ensure that no more
380 S_IS* macro definitions sneak into the code.
381 (check): Depend on check-misc.
383 * src/remove.c [S_ISLNK]: Don't define. It's already defined in sys2.h.
384 * src/du.c (count_entry) [S_ISLNK]: Don't define.
385 * src/shred.c [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define.
387 2003-01-03 Jim Meyering <jim@meyering.net>
389 * src/true.c: Add copyright.
390 (AUTHORS): I suppose I've written it.
392 * src/Makefile.am (false.c): Make the generated file be read-only.
394 2003-01-04 Jim Meyering <meyering@lucent.com>
396 * src/ls.c: Include "dev-ino.h".
397 [struct dev_ino]: Remove declaration.
399 2003-01-02 Jim Meyering <meyering@lucent.com>
401 * src/cp.c (do_copy): Tweak diagnostic to be consistent with the one
402 from mv: s/missing file arguments/missing file argument/.
403 With --target-directory=DIR, cp and mv work with a single file argument.
404 Reported by Karl Berry.
406 * tests/rm/isatty: Enable this test.
408 2002-12-31 Jim Meyering <meyering@lucent.com>
410 * src/remove.c (AD_push_initial): Don't set status to RM_OK here.
412 (AD_INIT_OTHER_MEMBERS): Define.
413 (remove_dir): Define the `status' member manually after each
414 call to AD_push or AD_push_initial.
416 * src/ls.c [struct dev_ino]: Remove definition.
417 Include "dev-ino.h" instead.
419 2002-12-28 Jim Meyering <meyering@lucent.com>
421 * tests/du/Makefile.am (TESTS): Add no-deref.
422 * tests/du/no-deref: New script.
424 2002-12-23 Jim Meyering <meyering@lucent.com>
426 * src/remove.c (remove_cwd_entries): Fix typo in comment.
428 2002-12-21 Jim Meyering <jim@meyering.net>
430 * announce-gen: Generate MML-formatted announcement.
431 This makes it a *lot* harder to send stale MD5/SHA1 signatures.
433 2002-12-20 Jim Meyering <jim@meyering.net>
435 * src/touch.c (touch): Change the wording of a diagnostic so
436 that it makes sense both when the file exists and when it doesn't.
437 Suggestion from Michael Stone.
439 2002-12-18 Jim Meyering <jim@meyering.net>
441 * src/stty.c (valid_options): Declare to be static.
443 2002-12-15 Jim Meyering <jim@meyering.net>
445 * Makefile.cfg: Remove rules related to generating m4/jm-glibc-io.m4.
447 * src/chmod.c, src/copy.c, src/copy.h, src/cp-hash.h, src/csplit.c:
448 * src/date.c, src/expr.c, src/fmt.c, src/id.c, src/install.c:
449 * src/ls.c, src/od.c, src/pathchk.c, src/pr.c, src/remove.c:
450 * src/shred.c, src/sort.c, src/stat.c, src/stty.c, src/sum.c:
451 * src/tee.c, src/test.c: Remove all uses of `PARAMS'.
453 * src/remove.c (PARAMS): Remove definition.
454 * src/sys2.h: Likewise.
456 * src/ls.c, src/stat.c, src/date.c: Remove declaration of nstrftime.
457 Include strftime.h instead.
459 2002-12-14 Jim Meyering <jim@meyering.net>
461 * Makefile.cfg ($(url_dir_list)): Use .../coreutils, not .../fetish.
463 * src/system.h [! HAVE_DECL_MEMRCHR]: Declare memrchr.
464 This is necessary at least for Irix6.5 when using c89.
465 Reported by Nelson Beebe.
467 * tests/misc/Makefile.am (TESTS): Add cat-tty-eof.
469 * tests/misc/cat-tty-eof: New test.
471 * src/mknod.c (usage): Specify how major and minor mode numbers
472 are interpreted. Report forwarded by Kristin E Thomas.
473 * src/mknod.c: Remove now-redundant usage-specifying comment.
475 2002-12-13 Jim Meyering <jim@meyering.net>
479 * tests/du/trailing-slash: Allow for a directory of size `0'.
480 That happens at least on file systems of type tmpfs on linux-2.4.18.
482 * announce-gen: New script to begin replacing the commands
483 associated with the rule here...
484 * Makefile.maint (announcement): Invoke announce-gen.
485 * Makefile.am (EXTRA_DIST): Add announce-gen.
487 * tests/cp/preserve-2: New file/test, for latest fix.
488 * tests/cp/Makefile.am (TESTS): Add preserve-2.
490 2002-12-11 TAKAI Kousuke <takai@vlsi.kuee.kyoto-u.ac.jp>
492 Fix a bug whereby cp would fail to parse an option like
493 --preserve=mode,ownership.
494 * src/cp.c (decode_preserve_arg): Advance `comma' to
495 point the character following the comma.
497 2002-12-11 Jim Meyering <jim@meyering.net>
499 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Undefine before defining,
500 in case it's already defined.
502 2002-12-09 Jim Meyering <jim@meyering.net>
504 * tests/touch/fail-diag: Don't get a test failure if /no exists.
505 Instead, evoke a framework failure if /no-$$ exists.
506 Reported by Michael Stone.
508 2002-12-08 Jim Meyering <jim@meyering.net>
510 * src/du.c (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
511 Define to rpl_lstat, so that even on systems like Solaris 2.8,
512 du honors (per POSIX) the trailing slash on an argument referring
513 to a symlink-to-directory.
515 2002-12-06 Jim Meyering <jim@meyering.net>
517 * Use autoconf-2.57. Regenerate dependent files.
518 * Use automake-1.7.2. Regenerate dependent files.
520 * src/ls.c (gobble_file): Also stat the file if it's a
521 regular file and --indicator-style=classify (aka -F).
522 Thanks to Ed Santiago for opening my eyes.
524 * tests/ls/file-type: New file. Test for the above.
525 A test to contrast ls -F and ls --indicator-style=file-type.
526 * tests/ls/Makefile.am (TESTS): Add file-type.
528 2002-12-04 Jim Meyering <jim@meyering.net>
530 * tests/ls/follow-slink: Make sure the symlink was created.
531 Richard Dawe reported that `ln -s link link' succeeds, but creates
532 no file on systems running some version of the DJGPP libc.
534 2002-12-03 Jim Meyering <jim@meyering.net>
536 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr)
537 since this package no longer panders to K&R compilers.
539 2002-12-02 Jim Meyering <jim@meyering.net>
541 * tests/du/slink: Skip this test if `.' is on a non-local file system.
543 * tests/Fetish.pm (_at_replace): Do the substitution only if there's
544 something to replace.
546 2002-12-01 Jim Meyering <jim@meyering.net>
548 * src/stat.c: Don't include <string.h> or <ctype.h>.
549 That's already done via system.h.
550 * src/dircolors.c: Don't include <ctype.h>.
552 2002-11-30 Jim Meyering <jim@meyering.net>
554 * ls.c (gobble_file): Remove the block of code that caused
555 `ls --color -F symlink-to-dir' to list the files in
556 `symlink-to-dir/.'. Now, it prints `symlink-to-dir@', (just
557 like `ls -F symlink-to-dir') but with the addition of highlighting.
558 Similarly, `ls --color -dF symlink-to-dir' would print
559 `symlink-to-dir/'; now it prints `symlink-to-dir@'.
560 Reported by Jeff Sheinberg as Debian bug #168203.
561 * tests/ls-2/tests (sl-F-color, sl-dF-color): New tests for the above.
563 ls is now more efficient: with certain options, it no longer needs
564 to stat each directory entry on systems with valid dirent.d_type.
565 * src/ls.c (print_dir): Add DT_LNK and DT_REG.
566 (main): Make --recursive set format_needs_type, not format_needs_stat.
567 (gobble_file): Remove a FIXME comment, now that it's fixed.
569 2002-11-24 Jim Meyering <jim@meyering.net>
571 * src/du.c (du_files): Don't strip any trailing slash.
572 Rewrite so that `/' is no longer represented internally as
574 (count_entry): When appending a file name component,
575 account for the fact that the current path may end in `/'.
576 François Pinard reported that `du symlink-to-dir/' was not
577 equivalent to `du symlink-to-dir/.'. Now it is.
578 * tests/du/trailing-slash: New file/test, for the above fix.
579 * tests/du/Makefile.am (TESTS): Add trailing-slash.
581 2002-11-23 Jim Meyering <jim@meyering.net>
583 * src/tac.c (output): Declare some local variables to be of type size_t,
584 rather than `int' to avoid warnings from gcc.
586 2002-11-21 Paul Eggert <eggert@twinsun.com>
588 * src/ls.c (decode_switches): Use case-sensitive matching to
589 decode the QUOTING_STYLE environment variable. This is more
590 consistent with the documentation, and with --quoting-style.
592 2002-11-21 Martin Buck <martin.buck@ascom.ch
594 * src/stty.c (struct speeds): Add support for all baud rates defined
597 2002-11-19 Jim Meyering <jim@meyering.net>
599 * tests/sum/sysv: Export LC_ALL=C, to avoid failure when
600 run in a UTF locale. Report and suggested fix by Bruno Haible.
601 * tests/fmt/basic: Likewise.
603 2002-11-17 Jim Meyering <jim@meyering.net>
605 * configure.ac: Update via autoupdate.
606 Add `AM_GNU_GETTEXT_VERSION(0.11.5)'.
608 * src/mv.c (movefile): Don't remove trailing slashes from SOURCE.
609 Reported by Hans Ginzel.
611 2002-11-15 Jim Meyering <jim@meyering.net>
613 * Makefile.cfg (gnu_rel_host): Define.
614 (url_dir_list): Choose from (alpha|ftp).gnu.org depending
615 on whether $(VERSION) looks like a major release number.
617 * Makefile.maint (mail_gpg_sign_cookie): Backslash-escape `#'.
618 (release): Rename from `alpha'.
619 (alpha): Depend on release.
621 * Makefile.maint (signatures): Define with ?=, so it's easy to override.
623 2002-11-14 Jim Meyering <jim@meyering.net>
625 * Makefile.maint (mail_gpg_sign_cookie): Make optional.
626 (announcement): Use the new variable.
628 * Makefile.maint: Sync with Bison, i.e.:
629 (po-check): Scan .l and .y files instead of the
630 .c and the .h files that they generate. This fixes the bug
631 reported by Tim Van Holder in:
632 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
633 Look for N_ as well as for _. Try to avoid matching #define for
637 2002-11-12 Jim Meyering <jim@meyering.net>
639 * src/ls.c (HAVE_SYMLINKS): Remove unnecessary macro definition.
640 Replace sole use with equivalent `#ifdef S_ISLNK'.
641 Inconsistency reported by Dmitry V. Levin.
643 2002-11-11 Jim Meyering <jim@meyering.net>
645 * src/stat.c (usage): Transform --help items output via s/ - / /,
646 so that help2man produces properly formatted man pages.
647 Reported by Herbert Xu as Debian bug #168400.
649 2002-11-10 Jim Meyering <jim@meyering.net>
651 * src/ls.c (sighandler): Handle SIGTSTP specially.
652 Based on suggestions from Solar Designer and Dmitry V. Levin.
655 * Makefile.cfg (cvs_files): Define. From autoconf.
656 (local_updates): Likewise.
658 * src/ls.c (restore_default_color_handler, sigtstp_handler):
660 (sighandler): New function, based on the one in sort.c.
661 (main): Use sigaction, if possible; otherwise signal.
662 Handle these signals:
663 SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP.
664 Don't register our handler if the signal is already being ignored.
666 * src/dd.c (interrupt_handler): Use raise, rather than kill+getpid.
667 * src/csplit.c (interrupt_handler): Likewise.
668 * src/sort.c (sighandler): Likewise.
669 (main): Declare `i' and `nsigs' to be unsigned, not int.
671 2002-11-09 Jim Meyering <jim@meyering.net>
673 ls --color: restore terminal text color upon signal.
674 * src/ls.c: Include "full-write.h" and <signal.h>.
675 (restore_default_color, restore_default_color_handler): New functions.
676 (sigtstp_handler, put_indicator_direct): New functions.
677 (main) [print_with_color]: Register signal handlers.
678 Patch mostly by Solar Designer and Stanislav Ievlev.
680 Update from autoconf.
681 * Makefile.maint (AMTAR): Remove definition.
682 (update, cvs-update, po-update, do-po-update): New rules.
683 (wget-update): Update (thus renaming to cvs-update).
684 (automake_repo): Use anoncvs@sources.redhat.com.
686 2002-11-06 Jim Meyering <jim@meyering.net>
688 * tests/misc/Makefile.am (TESTS): Add printf-hex.
690 * tests/misc/printf: Be careful to test the code in this package,
691 not the shell built-in function.
693 * src/printf.c (print_esc): A hexadecimal escape sequence has
694 at most two hex. digits, not three. Reported by Padraig Brady.
695 (usage): Update description.
696 * tests/misc/printf-hex: New file/test, for the above fix.
698 2002-10-07 Paul Eggert <eggert@twinsun.com>
700 Add support for locale-specific size indications (e.g.,
701 thousands-separators) and for explicit size suffixes on output.
703 * doc/coreutils.texi (Block size): Say that:
704 This affects display format as well as block size.
705 Fractional block counts are rounded up.
706 ls file size blocksize defaults to 1.
707 A block size spec preceded by ' generates thousands separators.
708 A suffix without a preceding integer generates suffixes.
709 (tail invocation): 32k -> 32 KiB.
710 (What information is listed): ls -h is now equivalent to
711 ls --block-size=human, and ls -H is now equivalent to
712 ls --block-size=si. Displayed file size is now always affected by
715 * lib/inttostr.c, lib/inttostr.h, lib/imaxtostr.c, lib/offtostr.c,
716 lib/umaxtostr.c: New files, taken from GNU tar.
718 * lib/Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c,
720 (EXTRA_DIST): Add inttostr.c.
722 * lib/human.c, lib/human.h: Rewrite to support locale-specific
723 notations like thousands separators.
724 Specify what includer of include.h must include beforehand.
725 (human_group_digits, human_suppress_point_zero, human_autoscale,
726 human_base_1024, human_SI, human_B): New enum values.
727 (human_readable): Rename from human_readable_inexact; put the
728 options before the sizes. All uses changed. The old human_readable
729 function has been removed; use inttostr.h instead.
730 (human_options): Renamed from human_block_size, with new signature
731 that allows block sizes up to UINTMAX_MAX. All callers changed.
733 * m4/prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv,
734 AC_HEADER_STDBOOL. No need to check for limits.h since it's in
735 freestanding C89. No need to check for stdlib.h or string.h since
736 autoconf does this now.
738 * src/cksum.c (cksum): Use primitives from inttostr.h, not
739 human.h, to print large numbers simply.
740 * src/csplit.c (handle_line_error, parse_patterns): Likewise.
741 * src/dd.c (print_stats, main): Likewise.
742 * src/df.c (print_header): Likewise.
743 * src/factor.c (print_factors): Likewise.
744 * src/ls.c (print_long_format, print_file_name_and_frills): Likewise.
745 * src/shred.c (dopass): Likewise.
746 * src/sort.c (checkfp): Likewise.
747 * src/sum.c (bsd_sum_file, sysv_sym_file): Likewise.
748 * src/tail.c (xlseek): Likewise.
749 * src/wc.c (write_counts, wc): Likewise.
751 * src/df.c (human_output_opts): New var.
752 (output_block_size): Now uintmax_t, not int, to handle larger
753 block sizes. All uses changed.
754 * src/du.c: Likewise.
755 * src/ls.c: Likewise.
757 * src/df.c (print_header): In the header line, prefer SI to human
758 representation if it's shorter; if neither is shorter, try to
759 intuit what the user would prefer.
761 * src/expr.c (inttostr): Remove; use new imaxtostr library
764 * src/ls.c (file_output_block_size): New var, to distinguish
765 file sizes from other sizes.
766 (decode_switches): Set it.
768 * src/shred.c (OUTPUT_BLOCK_SIZE): remove.
769 (dopass): When printing progress, use floor for what has been done
770 so far (since we should be conservative there), and ceiling for
771 what needs to be done (since that's what other programs use).
773 2002-10-19 Jim Meyering <jim@meyering.net>
775 * src/pinky.c (print_heading): Align TTY and Name headings.
776 Reported by Karl Eichwalder.
778 2002-10-18 Jim Meyering <jim@meyering.net>
780 * src/split.c (cwrite): Change type of `bytes' parameter to size_t
781 Remove now-useless cast.
782 (stdread): Remove function.
783 (bytes_split): Use size_t instead of int.
784 Use safe_read, not stdread.
785 (lines_split): Likewise.
786 Use memchr rather than a `while' loop.
787 (line_bytes_split): Use size_t instead of int.
788 Use safe_read, not stdread.
789 (main): Add some FIXME comments to remind me to remove casts.
791 * src/system.h (ST_BLKSIZE): Correct comment describing how to
792 reproduce HPUX-11 cat failure. From Petter Reinholdtsen.
794 2002-10-17 Jim Meyering <jim@meyering.net>
796 Fix a problem that could make e.g., `cat' misbehave on systems which
797 give invalid (unreasonably large) values for stat.st_blksize.
798 * src/system.h (ST_BLKSIZE): Ensure that the result is in [1..4MB].
799 Reported by Petter Reinholdtsen.
801 2002-10-14 Jim Meyering <jim@meyering.net>
803 Specifying a printf conversion specifer as nl's separator string
804 could cause nl to segfault.
805 * src/nl.c (build_print_fmt): Don't include separator string
806 in the printf format; it might contain `%'.
807 Use a better bound on the length of the print_fmt buffer.
808 (print_lineno): Print the separator here instead.
809 Reported by Doug Coleman.
811 * tests/misc/nl: New file/tests, including a test for the above.
812 * tests/misc/Makefile.am (TESTS): Add nl.
814 * tests/misc/split-l: New test, to make sure `split --lines=N' works.
815 * tests/misc/Makefile.am (TESTS): Add split-l.
817 2002-10-13 Jim Meyering <jim@meyering.net>
821 * src/du.c (usage): Tweak description of --dereference-args/-D.
823 * src/du.c (count_entry): Also save cwd when dereferencing (via
824 --dereference-args, -D) a command-line argument.
825 Reported by Michal Svec. Based on a patch by Andreas Schwab.
827 * src/Makefile.am (../AUTHORS): New target/rule.
829 2002-10-12 Jim Meyering <jim@meyering.net>
831 * src/paste.c (paste_parallel): Declare local, `delims_saved', to be
832 of type size_t, since that's the way it's used and avoids a warning.
834 * src/csplit.c (struct cstring) [len]: Declare to be unsigned int,
835 since that's how it's always used and avoids a new warning from gcc.
836 (read_input): Adapt to new safe_read ABI.
838 * src/cut.c (cut_fields): Add a temporary size_t variable, n_bytes,
841 * src/pinky.c (print_long_entry): fread returns size_t.
842 Declare local `bytes' accordingly, to avoid warning.
844 tail -c +N would perform an extra read after encountering EOF
845 [this change is analogous (bytes vs. lines) to the one of 2002-01-27]
846 * src/tail.c (start_bytes): Detect EOF, inform caller.
847 (tail_bytes): Upon EOF in start_bytes, return immediately.
848 (file_lines): Reorganize to use memrchr rather than an explicit loop.
849 Adapt to new safe_read ABI.
851 2002-10-11 Jim Meyering <jim@meyering.net>
853 * tests/du/deref: New file/test, for the above fix.
854 * tests/du/Makefile.am (TESTS): Add deref.
856 2002-10-10 Jim Meyering <jim@meyering.net>
858 * tests/ln/Makefile.am (TESTS): Add target-1.
859 * tests/ln/target-1: New file/test, for the fix on 2002-10-08.
861 2002-10-09 Jim Meyering <jim@meyering.net>
863 * tests/cp/backup-is-src: Ensure that certain environment variables
864 are not set (e.g., SIMPLE_BACKUP_SUFFIX). Reported by Duncan Roe.
866 * tests/tail-2/big-4gb: Mark this as an expensive test; it would
867 consume 4GB of disk space on systems without support for sparse files.
868 Fix a logic error that'd make it `cat err' even though dd didn't fail.
870 * src/dircolors.hin (.jar): Fix typo: s/;3$/;31/.
871 Patch by steven@magelico.net, forwarded by Michael Stone.
873 * tests/ls/dired: Ensure that ls produces English messages.
874 Patch by Alexey Vyskubov, forwarded by Michael Stone.
876 2002-10-08 Dmitry V. Levin <ldv@altlinux.org>
878 * src/ln.c (main): Fix target_directory parsing when n_files == 1.
880 2002-10-08 Jim Meyering <jim@meyering.net>
882 * tests/tail-2/big-4gb: Use double quotes around diagnostic.
883 Fix syntax in test: use =, not ==.
884 Reported by Bob Proulx.
885 Change all the rest like this: grep -lR "testing framework'" .\
886 |xargs perl -pi -e 's/'\''(\$0: failure in testing framework)'\''/"$1"/'
888 * src/sum.c (sysv_sum_file): Adapt to new safe_read ABI.
889 * src/tr.c (squeeze_filter, read_and_delete, read_and_xlate): Likewise.
890 * src/tac.c (save_stdin, tac_stdin_to_mem): Likewise.
891 * src/wc.c (wc): Likewise.
893 2002-10-07 Paul Eggert <eggert@twinsun.com>
896 Don't advance the write pointer past the end of the write buffer.
897 * src/sort.c (begfield, limfield): Likewise.
899 2002-10-07 Jim Meyering <jim@meyering.net>
901 * src/cat.c (simple_cat, cat): Adapt to new safe_read ABI.
902 * src/head.c (head_bytes, head_lines): Likewise.
904 2002-10-06 Jim Meyering <jim@meyering.net>
906 * src/dd.c (scanargs): Ensure that specified block sizes (specified
907 via ibs=N, obs=N, and bs=N) are no larger than SSIZE_MAX.
908 (skip, dd_copy): Adapt to new safe_read ABI.
910 * Makefile.maint (signatures): Define.
912 (announcement): Depend on $(signatures).
914 * Makefile.maint (announcement): Output all URLs for detached
915 signatures, not just the last one from the previous loop.
917 2002-10-05 Jim Meyering <jim@meyering.net>
921 * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS]: With `rm -i DIR',
922 don't recurse into directory, DIR. Prompted by a report from
925 * tests/rm/i-no-r: New file/test, for the above fix.
926 * tests/rm/Makefile.am (TESTS): Add i-no-r.
928 * tests/tail-2/big-4gb: New file/test, for the fix of 2002-09-27.
929 * tests/tail-2/Makefile.am (TESTS): Add big-4gb.
931 2002-10-03 Jim Meyering <jim@meyering.net>
933 * src/rm.c (AUTHORS): Mark translatable string with `N_ (...)'.
934 * src/df.c (AUTHORS): Likewise.
935 * src/du.c (AUTHORS): Likewise.
936 * src/tail.c (AUTHORS): Likewise.
937 * src/touch.c (AUTHORS): Likewise.
939 2002-10-02 Jim Meyering <jim@meyering.net>
941 * Makefile.am (SUBDIRS): Remove `old'.
942 (EXTRA_DIST): List the files in old/.
943 * configure.ac (AC_CONFIG_FILES): Remove old/* names.
944 Suggestion from Akim Demaille.
946 2002-10-01 Jim Meyering <jim@meyering.net>
948 * src/sys2.h (SSIZE_MAX): Define.
950 2002-09-30 Jim Meyering <jim@meyering.net>
952 * src/csplit.c: Don't include stdlib.h here. It's already included
955 2002-09-29 Jim Meyering <jim@meyering.net>
957 * src/tr.c (find_bracketed_repeat): Rearrange pointer/integer
958 expression to avoid bogus warning from gcc.
960 * src/cat.c (simple_cat): Use a temporary to avoid bogus warnings.
961 (cat): Declare insize and outsize to be of type size_t, not int.
962 Rearrange pointer/integer expressions to avoid bogus warnings.
963 (main): Declare insize and outsize to be of type size_t, not int.
965 * src/tail.c (parse_options): Give a sensible diagnostic for
966 an invalid byte or line count. Reported by Mikko Tuumanen.
968 * src/touch.c (main): Split a long line.
970 * tests/du/Makefile.am (TESTS): Add slink.
971 * tests/du/slink: New test for system.h change of 2002-08-31.
973 In move mode, always first try to rename. Before, upon failure to
974 rename a directory, this code would never attempt to rename any
975 other file in that directory, but would thenceforth always copy.
976 On some systems (e.g., NetApp's OnTap-6.4), renaming a directory
977 may fail with EXDEV, yet renaming files within that directory to
978 a newly-created destination directory succeeds.
979 * src/copy.c (copy_internal): Remove local, move_mode;
980 use x->move_mode instead. Based on a patch from Tom Haynes.
982 2002-09-28 Jim Meyering <jim@meyering.net>
984 * src/split.c (FAIL_ONLY_ONE_WAY): New macro.
985 Factor out some duplication.
987 [case 'a']: Use strtoul rather than strtol to avoid compiler warnings.
989 * src/sort.c (begfield, limfield): Rearrange comparisons to avoid
991 (fillbuf, keycompare): Cast literal `-1' to size_t in comparisons,
992 to avoid compiler warnings.
994 * src/shred.c (dopass): Use a uintmax_t temporary to avoid bogus
997 Fix things so `mkdir -p' can create very deep directories, e.g.,
998 mkdir -p $(perl -e 'print "a/" x 40000') now works.
999 * src/mkdir.c (main): For --parents (-p), call make_path with the
1000 entire directory name, so we don't ever require that file operations
1001 like stat or chmod be performed on the entire command line argument.
1002 * makepath.c (make_path): Restore umask *before* creating the final
1005 2002-09-27 Andreas Schwab <schwab@suse.de>
1007 * src/tail.c (tail_bytes): Change type of bytes_remaining to off_t
1008 to avoid overflow. Reported by Hans Lermen.
1010 2002-09-26 Jim Meyering <jim@meyering.net>
1012 * src/install.c (get_ids): Use strtoul, not strtol. Remove some casts.
1014 2002-09-25 Jim Meyering <jim@meyering.net>
1016 * src/test.c (eaccess): Change type of local `euid' from int to uid_t
1017 and add a cast, to avoid a warning about `signed and unsigned type in
1018 conditional expression'.
1020 2002-09-22 Jim Meyering <jim@meyering.net>
1022 * src/rmdir.c: Include "dirname.h", for declaration of
1023 strip_trailing_slashes.
1025 * src/stat.c (PRIdMAX, PRIuMAX): Remove definitions.
1026 Now they're defined through system.h.
1028 * src/cp-hash.c, src/dd.c, src/df.c, src/du.c, src/ls.c,
1029 * src/stat.c, src/wc.c: Remove all inclusions of inttypes.h,
1030 since it's already included from sys2.h via system.h.
1032 * Use automake-1.6f. Regenerate dependent files.
1034 * src/Makefile.am (PERL): Remove duplicate definition.
1036 fmt's -s, -t, -c options didn't work properly for long lines.
1037 Since get_line may end up calling put_paragraph (for long lines),
1038 be sure to set global, `other_indent', before it is used there.
1040 * src/fmt.c (set_other_indent): New function, factored out of...
1041 (get_paragraph): ... here. Call it.
1042 (get_line): Call set_other_indent before calling flush_paragraph,
1043 which calls fmt_paragraph, which in turn calls put_paragraph,
1044 which uses other_indent.
1046 * tests/fmt/Makefile.am (TESTS): Add long-line.
1047 * tests/fmt/long-line: New file/test, for the above fix.
1049 2002-09-21 Jim Meyering <jim@meyering.net>
1051 * src/od.c: No longer include deprecated <values.h>.
1052 It was required solely for now-removed reference to BITSPERBYTE.
1053 * src/install.c: Likewise.
1054 Suggestion from Bruno Haible.
1056 2002-09-06 Andreas Schwab <schwab@suse.de>
1058 `rmdir -p dir-specified-with-trailing-slash/' would fail.
1059 * src/rmdir.c (remove_parents): Strip trailing slashes.
1061 2002-09-20 Jim Meyering <jim@meyering.net>
1063 * tests/rmdir/t-slash: New file/test, for the above fix.
1064 * tests/rmdir/Makefile.am (TESTS): Add t-slash.
1066 * Makefile.maint (announcement): Arrange to gpg-sign the message.
1067 Add a URL for each detached signature file.
1069 2002-09-07 Bruno Haible <bruno@clisp.org>
1071 * configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation.
1073 2002-09-18 Jim Meyering <jim@meyering.net>
1075 `od -t x8' used the wrong (`l'-prefixed) printf format.
1076 Likewise for the o8 and u8 formats.
1077 * src/od.c (ISPEC_TO_FORMAT): Define macro.
1078 (decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG.
1079 Reported by Arun Sharma.
1081 2002-09-17 Jim Meyering <jim@meyering.net>
1083 * src/sys2.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary.
1084 From gettext's intl/loadmsgcat.c.
1086 * tests/od/x8: New file/test, for the above fix.
1087 * tests/od/Makefile.am (TESTS): Add x8.
1089 2002-09-15 Jim Meyering <jim@meyering.net>
1091 * Use autoconf-2.54. Regenerate dependent files.
1093 * src/csplit.c (get_format_width): Add cast to avoid
1094 warning about `signed and unsigned type in conditional expression'.
1096 2002-09-14 Jim Meyering <jim@meyering.net>
1098 * src/who.c (print_user): Change type of local to size_t
1099 to avoid warnings about `comparison between signed and unsigned'.
1100 * src/ptx.c (generate_all_output): Likewise.
1102 * src/dd.c (main, skip): Add casts to avoid warnings about
1103 `comparison between signed and unsigned'.
1105 * src/id.c (print_full_info, print_group_list): Add casts to avoid
1106 warnings about `signed and unsigned type in conditional expression'.
1108 * src/md5sum.c: Change type of global, digest_hex_bytes, to size_t
1109 to avoid warnings about `comparison between signed and unsigned'.
1110 (split_3): Change parameter names to be readable and add comment.
1111 Clean up the test for whether a line may be ignored.
1113 2002-09-13 Jim Meyering <jim@meyering.net>
1115 * src/printf.c (main): Handle leading command line argument of `--'.
1116 Reported by Raul: DervishD <raul@pleyades.net>
1117 * tests/misc/printf: New file: test for the above.
1118 * tests/misc/Makefile.am (TESTS): Add printf.
1120 * src/date.c (usage): Explain that %S's range of [0..60] is required --
1121 rather than 0..59 -- to accommodate the occasional positive leap second.
1122 Reported by Richard Neill.
1124 2002-09-12 Jim Meyering <jim@meyering.net>
1126 * src/Makefile.am (nanosec_libs): Define.
1127 (sleep_LDADD, tail_LDADD): Use it here.
1129 Factor nanosleep-related code into ../lib/xnanosleep.c.
1130 * src/sleep.c: Include xnanosleep.h.
1131 Factor out fenv.h-related code.
1132 (timespec_subtract): Remove function.
1133 (main): Remove code that deals with computing start and stop times
1134 as well as the loop around nanosleep. Now that's in xnanosleep.c.
1136 Allow S (in --sleep-interval=S) to be a floating point value.
1137 * src/tail.c: Include xnanosleep.h and xstrtod.h.
1138 Move declaration of global variable, sleep_interval, to ...
1140 (usage): Update description of --sleep-interval option.
1141 (tail_forever): New parameter, sleep_interval. Update caller.
1142 Use xnanosleep, rather than sleep.
1143 (parse_options): New parameter, sleep_interval. Update caller.
1144 Use xstrtod, now that we accept floating point values.
1145 Prompted by a patch from Augey Mikus.
1147 2002-09-06 Jim Meyering <jim@meyering.net>
1149 * src/remove.c (prompt): Change comment to give a better note to
1150 translators. From Michael Piefel.
1152 2002-09-02 Jim Meyering <jim@meyering.net>
1154 * README: A good problem report/patch includes diffs against
1155 the most recent test release.
1157 * src/pathchk.c (NEED_PATHCONF_WRAPPER): Define.
1158 (pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set.
1160 * src/kill.c (print_table_row): Use an unsigned type for widths
1161 to avoid warning about comparison between signed and unsigned.
1162 (list_signals): Likewise.
1164 * src/od.c (skip): Add a cast to avoid warning about comparison
1165 between signed and unsigned.
1166 * src/install.c (get_ids): Likewise. Also rearrange range-checking
1167 comparisons to make them more readable.
1169 2002-09-01 Jim Meyering <jim@meyering.net>
1173 2002-08-31 Jim Meyering <jim@meyering.net>
1175 Symlinks were always reported as using 0 blocks.
1176 * src/system.h (ST_NBLOCKS): Don't depend on file type.
1177 This reverts the change of 2000-01-30.
1178 Based on a report and patch from Neil Brown via Michael Stone.
1179 This fixes Debian Bug#156358.
1181 * Most files: Change `exit (0)' to `exit (EXIT_SUCCESS)',
1182 `exit (1)' to `exit (EXIT_FAILURE)', and
1183 `usage (1)' to `usage (EXIT_FAILURE)'.
1185 * chgrp.c, chmod.c, chown.c, chroot.c, cp.c, date.c, dd.c, du.c,
1186 * hostname.c, id.c, install.c, ln.c, mkdir.c, mkfifo.c, mknod.c,
1187 * nice.c, pinky.c, printf.c, pwd.c, shred.c, sleep.c, stty.c,
1188 * su.c, tac-pipe.c, tail.c, tee.c, touch.c, uname.c, uptime.c,
1189 * users.c, who.c: Change `error (1, ...' to `error (EXIT_FAILURE, ...'.
1190 But don't change `error (0, ...' to `error (EXIT_SUCCESS, ...', since
1191 error never exits successfully.
1193 2002-08-29 Jim Meyering <jim@meyering.net>
1195 * src/remove.c (remove_cwd_entries): Use closedir (not CLOSEDIR)
1196 when ignoring any return value.
1198 * src/remove.c (remove_cwd_entries): Detect and diagnose readdir
1199 failures. On some systems (at least EMC Celerra and Solaris5.8),
1200 this appears to be necessary.
1201 (is_empty_dir): Likewise. Also, always close directory handle.
1202 * src/ls.c (print_dir): Likewise.
1203 (print_dir): Rename local variable: reading -> dirp.
1204 Reported by Mike Coleman.
1206 2002-08-28 Jim Meyering <jim@meyering.net>
1208 * src/remove.c (remove_cwd_entries): Use CLOSEDIR, not closedir.
1209 Give a diagnostic and fail if closedir fails.
1211 2002-08-26 Jim Meyering <jim@meyering.net>
1213 * Makefile.am (THANKS-to-translators): New rule.
1214 (EXTRA_DIST): Add both THANKS-to-translators and THANKStt.in.
1215 * THANKStt.in: New file.
1217 * src/cat.c (close_stdout_wrapper): New, kludgey, function and
1219 (main): Register it with atexit.
1220 Close STDOUT_FILENO, to avoid a problem when writing to
1221 /dev/audio on at least Solaris 2.7 and 2.8 systems.
1222 Reported by Shing-Shong Shei.
1224 2002-08-25 Jim Meyering <jim@meyering.net>
1226 * src/cat.c (main): Close STDIN_FILENO rather than a literal `0'.
1227 * src/tac.c (main): Likewise.
1228 * src/tail.c (main): Likewise.
1229 * src/tee.c (main): Likewise.
1230 * src/tr.c (main): Likewise.
1231 * src/wc.c (main): Likewise.
1233 2002-08-20 Jim Meyering <jim@meyering.net>
1235 * tests/mv/setup: Rewrite not to use `: ${VAR=not_set}' paradigm.
1237 2002-08-10 Paul Eggert <eggert@twinsun.com>
1239 * src/nohup.sh: Don't use "exec --"; it's not portable and
1240 shouldn't be needed.
1242 2002-08-09 Jim Meyering <jim@meyering.net>
1244 * src/pr.c (main): Don't ignore -COLUMN if it's the last option.
1245 (usage): Clarify help text for the -COLUMN option.
1246 Patch by Padraig Brady.
1247 * tests/pr/Test.pm [col-last]: New test for the above.
1249 * configure.ac: Start with version 4.5.1, chosen so that it's larger
1250 than the latest version numbers of the component packages.
1252 * man/Makefile.am (check-x-vs-1): Set and export PATH so we use
1255 2002-08-08 Jim Meyering <jim@meyering.net>
1257 * src/date.c: Guard inclusion of <langinfo.h> with
1258 `#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
1259 * src/sort.c: Likewise.
1260 Patch by GOTO Masanori.
1262 2002-08-05 Paul Eggert <eggert@twinsun.com>
1264 Fix some minor time-related bugs with POSIX time arguments.
1265 Some valid time stamps were being rejected (notably -1, and
1266 time stamps before 1900 on 64-bit hosts). And some invalid
1267 time stamps were being accepted, e.g. September 31.
1269 * src/date.c (main): Adjust to posixtime signature change.
1270 * src/touch.c (main): Likewise. Remove unnecessary initialization.
1271 Use localtime, not posixtm, to warn about obsolete "touch".
1273 2002-08-05 Jim Meyering <jim@meyering.net>
1275 * tests/misc/Makefile.am (TESTS): Add nice and pathchk1.
1277 2002-08-04 Jim Meyering <jim@meyering.net>
1279 * src/Makefile.am (check-README): New target/rule.
1280 (check): Depend on it.
1282 * configure.ac (AC_CONFIG_FILES): Add old/Makefile and old/*/Makefile.
1284 2002-08-03 Jim Meyering <jim@meyering.net>
1286 * Makefile.am (SUBDIRS): Add old.
1287 * old/: New directory, containing legacy ChangeLog* and NEWS files
1288 from the fileutils, sh-utils, and textutils packages.
1290 * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false.
1292 2002-08-02 Paul Eggert <eggert@twinsun.com>
1294 * NEWS, doc/coreutils.texi: uniq now obeys LC_COLLATE.
1296 * src/uniq.c: Include hard-locale.h, xmemcoll.h.
1297 (hard_LC_COLLATE): New var.
1298 (different): Args are now char *, not const char *.
1299 Use xmemcoll instead of memcmp to compare lines, so that
1300 LC_COLLATE has effect. However, use memcmp if it is an
1302 (check_file): Do not include newline in comparison, so that
1303 xmemcoll has a byte to stomp on temporarily.
1304 (main): Set hard_LC_COLLATE.
1306 2002-07-29 Jim Meyering <jim@meyering.net>
1308 * Makefile.am (SUBDIRS): Remove djgpp, for now.
1310 2002-07-08 Jim Meyering <jim@meyering.net>
1312 * src/Makefile.am (uninstall-local): Search for @GNU_PACKAGE@,
1313 rather than the hard-coded `sh-utils'.
1315 2002-07-01 Jim Meyering <jim@meyering.net>
1317 * configure.ac: Merge the three files from fileutils,
1318 textutils, and sh-utils.
1319 * Makefile.am: Likewise.
1320 * src/Makefile.am: Likewise.
1323 version-control: never