Jim Meyering
5ff0d49b27
(usage): Mention that, with its current meaning, -H is deprecated.
2004-01-04 20:59:31 +00:00
Jim Meyering
ee1a768122
Accept new option (-0, --null) that makes it so each
...
output line is NUL-terminated rather than newline-terminated.
2003-12-20 11:29:30 +00:00
Jim Meyering
55186d55b0
(FTS_CROSS_CHECK, DEBUG_OPT): Define.
...
(main): Make fts use FTS_TIGHT_CYCLE_CHECK.
(main) [DU_DEBUG]: Accept -d option.
2003-12-19 12:52:33 +00:00
Jim Meyering
c965791d3e
(entry_hash): Adjust to reflect
...
type changes (unsigned int -> size_t) in hash.c.
2003-10-25 15:33:05 +00:00
Jim Meyering
cf4fdf373f
Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
...
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.
* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-10-18 10:05:47 +00:00
Jim Meyering
ae7d7b4ad4
(main): Simply assign to bit_flags.
...
Don't bother with bit arithmetic.
2003-10-17 13:34:46 +00:00
Jim Meyering
433a4c3059
Include "xfts.h".
...
(du_files): Use xfts_open, rather than fts_open.
2003-10-17 11:12:11 +00:00
Jim Meyering
5788d8e9b2
tweak comment
2003-10-17 10:50:13 +00:00
Jim Meyering
d681c9a662
tweak comments
2003-10-09 08:43:15 +00:00
Jim Meyering
77549cb5c3
s/nftw/fts/g in a comment
2003-10-05 15:35:27 +00:00
Jim Meyering
875c32f4e6
(du_files): Mark diagnostic for translation.
2003-10-05 11:42:55 +00:00
Jim Meyering
7da7011b65
(du_files): Ignore any failure of fts_close.
2003-10-04 19:56:32 +00:00
Jim Meyering
e2d3450c72
(du_files): Give better diagnostics for failed fts_open.
2003-10-04 17:01:13 +00:00
Jim Meyering
b5eef18d40
(MAX_N_DESCRIPTORS): Remove now-unused definition.
2003-10-04 12:16:00 +00:00
Jim Meyering
2331952ff1
(enum) [HUMAN_SI_OPTION]: New member.
...
[long_options]: Use HUMAN_SI_OPTION, not 'H'.
(main): Warn that the meaning of -H will soon change.
2003-10-04 12:11:51 +00:00
Jim Meyering
3e2474e7c4
Accept --no-dereference (-P).
2003-10-03 20:17:18 +00:00
Jim Meyering
95c948b06a
Include "fts_.h", not ftw.h.
...
(opt_dereference_arguments, arg_length, suffix_length): Remove globals.
(IS_FTW_DIR_TYPE): Remove definition.
(IS_DIR_TYPE): Define.
(is_symlink_to_dir): Remove now-unnecessary function.
(process_file, du_files): Rewrite to use fts.
2003-10-02 20:26:41 +00:00
Jim Meyering
969d9407d3
`du -D symlink-to-dir' would mistakenly omit the slash in
...
lines like this: 24 symlink-to-dir/subdir
(process_file): Fix offset calculation.
Reported by Jeff Sheinberg as Debian bug #211591 ;
http://bugs.debian.org/205251
2003-09-19 07:39:04 +00:00
Jim Meyering
32eccc9d08
(process_file): Remove useless disjunct.
2003-09-19 06:51:59 +00:00
Jim Meyering
bafd927f03
(WRITTEN_BY): Rename from AUTHORS.
...
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
2003-09-18 22:19:03 +00:00
Jim Meyering
c6ec144494
revert previous change
2003-09-18 19:39:12 +00:00
Jim Meyering
3280bf4b55
Update AUTHORS definition to be a comma-separated list of strings and/or update
...
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
2003-09-18 18:22:23 +00:00
Jim Meyering
6f3fcc3168
(AUTHORS): Remove Larry McVoy's name, since the relatively
...
small amount of code from him was first moved to lib/human.c, and was
subsequently rewritten entirely.
2003-09-03 08:53:19 +00:00
Jim Meyering
6bcd4b08ba
(main): Call initialize_main.
2003-06-17 18:13:23 +00:00
Jim Meyering
dc7b620a31
(usage): Don't use `,' as the thousands separator
...
in e.g. 1,000,000 and 1,048,576. Instead, do this:
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
2003-05-14 09:13:26 +00:00
Jim Meyering
74de8e29a8
Handle argc < optind.
2003-05-10 19:56:10 +00:00
Jim Meyering
ab69f41a76
Remove SPC in SPC-TAB sequence.
2003-04-11 12:37:58 +00:00
Jim Meyering
6c93bdeeaa
Remove anachronistic casts of xmalloc,
...
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-04-11 10:51:56 +00:00
Jim Meyering
66bada849b
(process_file): If a file's size is not being counted
...
e.g., because it's a hard link to a file we've already counted,
then don't print a line for it.
2003-03-08 10:21:19 +00:00
Jim Meyering
6c1a78b5d6
`du -S' didn't work
...
Revert most of the `reorganization' change of 2003-02-20,
and make the two-array approach work.
2003-03-08 10:18:19 +00:00
Jim Meyering
6d1bd5a97d
Remove everything associated with mmap-stack.c.
...
This reverts the change of 2003-02-19.
2003-03-07 19:47:18 +00:00
Jim Meyering
64baf18b09
(process_file): Sizes must all be of type uintmax_t.
...
Otherwise, for files or totals that are too big, numbers would
be truncated. Patch mostly by Michael Stone.
2003-03-05 06:35:18 +00:00
Jim Meyering
47fa65c648
(MAX_N_DESCRIPTORS): Use 3 * UTILS_OPEN_MAX / 4.
2003-03-04 23:02:08 +00:00
Jim Meyering
6fe8f2a831
New option: --apparent-size.
...
(enum) [APPARENT_SIZE_OPTION]: New member.
(long_options): Add it.
(usage): Describe it.
(main): Handle it.
['b']: Set apparent_size.
2003-02-21 08:30:18 +00:00
Jim Meyering
f1f8ca7ddc
(apparent_size): New global.
...
(print_only_size): Reflect the fact that we're printing byte counts,
not ST_NBLOCKSIZE-byte-block counts.
(print_size): Call print_only_size rather than duplicating its code.
(process_file): Accumulate byte counts, rather than block counts.
2003-02-21 07:47:06 +00:00
Jim Meyering
12508c923f
(process_file): Always reset size_to_propagate_to_parent for
...
--separate-dirs (-S).
2003-02-21 07:15:16 +00:00
Jim Meyering
eb63743d48
(process_file): Reorganize the code to use only
...
one `sum' array, and change how -S works back to the way it was
before 2003-01-31. Patch by Bruno Haible.
2003-02-20 23:13:11 +00:00
Jim Meyering
5c629d9ef4
(process_file): Set info->skip before any possible return.
...
Report correct usage for directories, not 0.
(process_file): Return for `file_type == FTW_DPRE'
_before_ recording the dev/ino of a directory.
2003-02-20 15:03:22 +00:00
Jim Meyering
ac823e21c0
Include "mmap-stack.h".
...
(du_files): Add prototype with ATTRIBUTE_NORETURN.
Exit from this function, not from...
(main): ...here.
Instead, if possible, invoke du_files through a macro that
runs it with a large, mmap'd stack.
2003-02-19 22:20:45 +00:00
Jim Meyering
a47615d2ed
(process_file): Don't return early for excluded files
...
or for files whose dev/inode we've already seen.
2003-02-06 08:14:01 +00:00
Jim Meyering
a881942cca
Don't put decl after non-decl.
2003-02-01 22:52:45 +00:00
Jim Meyering
d606b47598
(MAX_N_DESCRIPTORS): Define.
2003-02-01 15:20:36 +00:00
Jim Meyering
d85b93c0fb
ditto for invalid options
2003-01-31 13:37:08 +00:00
Jim Meyering
4bee27ae43
(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.
2003-01-31 13:35:25 +00:00
Jim Meyering
de49951491
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.
2003-01-31 10:39:33 +00:00
Jim Meyering
fd5d4e6d54
remove blank line
2003-01-04 08:55:30 +00:00
Jim Meyering
1cf764991f
(count_entry) [S_ISLNK]: Don't define.
...
It's already defined in sys2.h.
2003-01-04 08:55:19 +00:00
Jim Meyering
7b352458d0
(lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:
...
Define to rpl_lstat, so that even on systems like Solaris 5.8,
du honors (per POSIX) the trailing slash on an argument referring
to a symlink-to-directory.
2002-12-08 20:51:55 +00:00
Jim Meyering
ce2fb08258
More clean-up, not that / means /.
2002-11-24 16:25:26 +00:00
Jim Meyering
4b8fa5d8ad
(du_files): Don't strip any trailing slash.
...
Rewrite so that `/' is no longer represented internally as
the empty string.
(count_entry): When appending a file name component,
account for the fact that the current path may end in `/'.
François Pinard reported that `du symlink-to-dir/' was not
equivalent to `du symlink-to-dir/.'. Now it is.
2002-11-24 16:12:52 +00:00