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