Jim Meyering [Wed, 5 Feb 2003 20:37:22 +0000 (20:37 +0000)]
Use new form of @direntry.
Put unlink in its proper place. Adjust wording in some
dir entry descriptions, mainly so they fit in 80 columns.
Don't use mark-up like @acronym{POSIX} in direntries.
Jim Meyering [Wed, 5 Feb 2003 20:19:31 +0000 (20:19 +0000)]
(ftw_startup): When using FTW_DEPTH, call `func', the
user-supplied callback, once for the current directory before calling
ftw_dir, in case that part of the hierarchy should be pruned.
`func' does that by setting `data->skip'.
Jim Meyering [Wed, 5 Feb 2003 16:35:07 +0000 (16:35 +0000)]
Include <limits.h>.
(PATH_MAX): Define to 1024, if not already defined.
(process_entry): Allocate enough space to hold the resulting
file name. Don't presume that 2*dirbufsize is enough.
(ftw_startup): Always use PATH_MAX to compute buffer size, now that
it is guaranteed to be defined.
Jim Meyering [Wed, 5 Feb 2003 15:08:15 +0000 (15:08 +0000)]
(process_entry): When using FTW_DEPTH, call `func',
the user-supplied callback, once before any of its entries,
in case that part of the hierarchy should be pruned. `func'
does that by setting `data->skip'.
Jim Meyering [Tue, 4 Feb 2003 11:48:27 +0000 (11:48 +0000)]
`df /dev/block-or-char-device-file--not-mounted' now reports
the name of the file system on which the file resides, usually `/'.
Before, it would leave the `Mounted on' field blank.
(show_disk): Add parameter: STATP.
If we don't find a matching device name, then resort to calling
find_mount_point.
Jim Meyering [Sun, 2 Feb 2003 20:14:53 +0000 (20:14 +0000)]
Use @PATH_SEPARATOR@ instead of hard-coding the path-separator.
Also double-quote the new PATH, to avoid problems when the
path-separator is a semi-colon or when `pwd` contains e.g. a space.
Jim Meyering [Sun, 2 Feb 2003 20:11:33 +0000 (20:11 +0000)]
Use @PATH_SEPARATOR@ instead of hard-coding the path-separator.
Also double-quote the new PATH, to avoid problems when the
path-separator is a semi-colon or when `pwd` contains e.g. a space.
Jim Meyering [Fri, 31 Jan 2003 18:28:39 +0000 (18:28 +0000)]
Include "file-type.h"
(print_human_type): Remove function.
(human_access): Rename from print_human_access. Return a string.
(human_time): Rename from print_human_time. Return a string.
(print_stat): Arrange so that field width and an alignment specifier
are honored for the %A, %F, %x, %y, and %z formats.
[%F]: Use file_type; this gives slightly different file type strings,
e.g., `directory' instead of `Directory' and `regular file' or
`regular empty file' instead of `Regular file'.
Jim Meyering [Fri, 31 Jan 2003 13:35:25 +0000 (13:35 +0000)]
(main): Upon processing a bad --exclude-from or --max-depth
option argument, don't exit right away, in case there are others.
Rather record the failure and exit after processing other options.
Jim Meyering [Fri, 31 Jan 2003 10:39:33 +0000 (10:39 +0000)]
Rewrite to perform directory traversal using nftw.
Include "dirname.h", "ftw.h", and "quotearg.h".
(AUTHORS): Add self.
(opt_one_file_system): Move global into `main'.
(path, xstat, exit_status): Remove declarations.
(arg_length, suffix_length): New globals.
(G_fail): New global, sort of like the old `exit_status'.
(IS_FTW_DIR_TYPE): Define.
(print_only_size): New function.
(process_file): New function.
(str_init, ensure_space, str_copyc, str_concatc): Remove functions.
(str_trunc, pop_dir, count_entry): Likewise.
(du_files): Rewrite to use nftw.