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.
Jim Meyering [Mon, 27 Jan 2003 13:42:26 +0000 (13:42 +0000)]
(quote_name): Add fourth parameter, width, into which to
store the screen columns, and return the number of bytes instead.
(print_dir): Pass NULL as fourth parameter of quote_name.
(print_name_with_quoting): Likewise.
(length_of_file_name_and_frills): Get the width from the fourth
parameter of quote_name instead of return value.
Jim Meyering [Mon, 27 Jan 2003 10:45:48 +0000 (10:45 +0000)]
(decode_switches): If `dired' is set without
`format == long_format', then silently reset dired. This doesn't
change the behavior of ls (all prior uses of dired were protected
by `&& format == long_format'), and lets us...
(DIRED_INDENT): ... remove `format == long_format' conjunct.
(PUSH_CURRENT_DIRED_POS): Likewise.
(main): Likewise.
Jim Meyering [Sat, 25 Jan 2003 20:32:44 +0000 (20:32 +0000)]
[_LIBC] (ISSLASH, FILESYSTEM_PREFIX_LEN): Define.
(base_name): New function.
(ftw_startup): Don't strip trailing slashes.
Use base_name to find the offset of the basename.