1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-06-06 17:56:21 +02:00
Commit Graph

157 Commits

Author SHA1 Message Date
Jim Meyering b1b5fb67fc (count_entry): Don't set errno before
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-27 13:12:12 +00:00
Jim Meyering a6b9441450 (print_size): Round disk usage up. 2000-06-16 12:50:27 +00:00
Jim Meyering 81b16373ae Arrange to call close_stdout only upon exit. 2000-05-13 06:49:53 +00:00
Jim Meyering 4954d34c14 (pop_dir): Remove through_symlink arg; use null cwd
for that purpose instead.
(count_entry): Also save the directory if we're saving more
than one level.
Fix file descriptor and memory leak when chdir fails.
2000-04-27 12:23:59 +00:00
Jim Meyering 6a7e32b137 (pop_dir): New function.
(count_entry): Factor out common code (pop_dir), and call the new
function instead.
Move declaration of global, `stat_buf' into this function.
(du_files): Don't stat `.' or call save_cwd, since count_entry
never returns with a changed working directory.
2000-02-15 13:17:36 +00:00
Jim Meyering 59457bee16 (count_entry): Adjust to new calling convention for excluded_filename.
(main): Likewise, for add_exclude_file.
2000-01-12 06:36:56 +00:00
Jim Meyering 46b6c26e4f (BLOCK_SIZE_OPTION, EXCLUDE_OPTION, MAX_DEPTH_OPTION):
Define these and use them instead of `CHAR_MAX + n'.
1999-12-09 15:46:39 +00:00
Jim Meyering 8fd9cfdd3c (count_entry): Remove cast of savedir arg. 1999-08-08 10:15:06 +00:00
Jim Meyering abdc079cd5 Remove prototypes and tsort function definitions. 1999-04-01 05:05:17 +00:00
Jim Meyering 667799f7e2 Don't include closeout.h or version-etc.h explicitly. Now, they're included via sys2.h. 1999-03-31 05:59:13 +00:00
Jim Meyering f42367c3e7 No longer include long-options.h.
Include version-etc.h instead.
(PROGRAM_NAME, AUTHORS): Define.
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
1999-03-26 14:22:51 +00:00
Jim Meyering 61fa70ac19 Include long-options.h
[long_options]: Remove the "help" and "version" entries.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
1999-03-04 05:09:05 +00:00
Jim Meyering 07c6f5e387 update copyright dates 1999-02-16 04:14:17 +00:00
Jim Meyering 20bc02752b (usage): Don't make it static so that it can be called from libfu.a by xargmatch. 1999-01-16 15:34:59 +00:00
Jim Meyering 08cfef16a2 update bug-reporting address 1998-09-19 17:17:58 +00:00
Jim Meyering 1fc1a65968 (long_options): Use corresponding short-option character
in place of `1', and `NULL' in place of opt_* pointer in initialization.
1998-08-30 02:50:28 +00:00
Jim Meyering fa59cde3fe Don't assume ASCII. 1998-08-30 02:33:25 +00:00
Jim Meyering 83d4b736d2 revert back to using lower case _unlocked wrapper names 1998-06-29 15:59:39 +00:00
Jim Meyering 09d344df5b (human_readable_base, output_units): Remove;
replace with new variable output_block_size.  All uses changed.
(long_options, usage, main): Add --block-size.
(main, decode_switches): Use new human_block_size function to
initialize output block size consistently with other programs.

From Paul Eggert.
1998-06-29 15:34:54 +00:00
Jim Meyering 02fc5fa0d0 Change all uses of unlocked-wrapped functions to their upper case wrapper names. 1998-06-29 02:10:24 +00:00
Jim Meyering 713c315978 Use STREQ in string equality tests, not strcmp. 1998-04-14 15:17:32 +00:00
Jim Meyering 5d4f8ebdfd (main, usage): Check for write error to stdout before exiting.
Include "closeout.h".
1998-01-04 22:45:28 +00:00
Jim Meyering 134ed86e33 (usage): Replace TABs with spaces in --help message. 1997-12-29 12:05:36 +00:00
Jim Meyering ea0f644cdd (S_ISLNK): Define this instead of S_ISDIR. 1997-12-25 17:01:35 +00:00
Jim Meyering bdcaa361bc Include exclude.h.
(exclude): New static var.
(long_options, usage, main): Add --exclude and --exclude-from or -X.
(count_entry): Skip excluded entries.
1997-12-21 12:05:42 +00:00
Jim Meyering ac5fc8ea73 Include exclude.h.
(exclude): New static var.
(long_options, usage, main): Add --exclude and --exclude-from or -X.
(count_entry): Skip excluded entries.
1997-12-21 11:47:27 +00:00
Jim Meyering 03f9f3dbec s/__P/PARAMS/g 1997-12-16 15:32:32 +00:00
Jim Meyering 04c29cd1db Separate struct dcl and typedef.
(String *): Rename from parameter-shadowed `string'.
(stringstruct): Remove typedef.
1997-12-06 08:57:14 +00:00
Jim Meyering bca6f1740d remove trailing blank 1997-11-30 11:15:27 +00:00
Jim Meyering 6ed8115087 (<inttypes.h>): Include if HAVE_INTTYPES_H.
("human.h"): Include.
(LONGEST_HUMAN_READABLE, enum Output_units): Remove.
(count_entry): Now returns uintmax_t, not long.
(human_readable_base): Renamed from opt_human_readable; value is now
zero or positive integer, not just zero or nonzero.
(output_units): Now an integer giving output size.
(tot_size): Now uintmax_t, not long.
(long_options, usage): Add --si or -H.
(main): Adjust to renamed option variables.
Use -H if BLOCKSIZE is SI.  Add -H.
(human_readable): Remove; rewritten and now in lib/human.c.
(print_size): Rewrite in terms of human_readable.
Accept extra arg to be printed after size; all callers changed.
1997-11-30 10:25:07 +00:00
Jim Meyering df445b0891 Remove old-style xmalloc and xrealloc decls. 1997-10-25 22:03:55 +00:00
Jim Meyering 05bbdbd786 update bug-reporting address 1997-10-07 23:53:36 +00:00
Jim Meyering 03ae2c6b97 Remove old-style savedir dcl.
Include savedir.h for prototype.
1997-10-04 01:57:12 +00:00
Jim Meyering 0cc1681a5b Remove global variable opt_human_readable.
(enum Output_units): Rename from output_size.
Rename size_* to Unit_*.
Add Unit_variable to correspond to --human-readable.
(convert_blocks): Remove now-unused definition.
(human_readable): Rename paramater n_bytes to n_blocks.
Adjust conversions to reflect fact that input is now number of
512-byte blocks, not bytes.
(print_size): New function.
(du_files): Use print_size instead of open coding it.
(count_entry): Always count in units of 512-byte blocks to delay.
This lets du accumulate totals corresponding to a terabyte before
overflowing 32-bit long int.
Use print_size instead of open coding it.
1997-05-25 21:23:15 +00:00
Jim Meyering 1b71b3372e (convert_blocks): Remove now-unnecessary #undef.
(du_files): Pass output_size unchanged to convert_blocks.  No need
to test output_size for size_bytes, convert_blocks handles that
correctly.
(count_entry): Likewise.
1997-05-25 14:21:41 +00:00
Jim Meyering 1ba34180d7 (main): Implement new --max-depth=N option.
Based on the idea and a patch from Torbjorn Lindgren.
(du_files): Likewise.
(count_entry): Likewise.
[AIX]: Remove unused #pragma alloca.
1997-05-25 14:11:50 +00:00
Jim Meyering cc093a9945 (main): Implement new --max-depth=N option.
Based on the idea and a patch from Torbjorn Lindgren.
(du_files): Likewise.
(count_entry): Likewise.
1997-03-27 05:47:56 +00:00
Jim Meyering b7ffe8cdaf update copyrights for 1997 1997-02-09 04:52:50 +00:00
Jim Meyering 1d286acd9a (hash_insert2): Rename local HTAB to HT to avoid shadowing global. 1997-02-02 20:44:10 +00:00
Jim Meyering a882d55b52 bracket bug address with <> and append a period 1997-02-01 04:24:08 +00:00
Jim Meyering 4f51b86bfb Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call. 1997-02-01 03:03:44 +00:00
Jim Meyering 7f798f5f4f (count_entry): Fix blatant bug (typo?) that made
--megabytes report numbers in units of kilobytes.
Reported by Galen Hazelwood.
1997-01-26 05:05:06 +00:00
Jim Meyering 5582e6dad3 change bug-reporting address 1996-11-03 03:16:27 +00:00
Jim Meyering b8e689dc67 change bug-reporting address 1996-11-02 20:44:15 +00:00
Jim Meyering 4f28f318d8 (main): update --version output to conform to coding standard 1996-10-05 13:14:11 +00:00
Jim Meyering de05a873ec (main): update --version output to conform to coding standard 1996-10-04 04:16:01 +00:00
Jim Meyering c9fff51897 (usage): remove spurious trailing \n in puts. 1996-08-31 04:44:31 +00:00
Jim Meyering 7e294bac78 (usage): Tell where to report bugs. 1996-08-29 05:05:57 +00:00
Jim Meyering d38f60e27c (usage): Sort option descriptions in dictionary order. 1996-07-14 12:54:12 +00:00
Jim Meyering 272f8d891e (usage): The long-named arg is --human-readable, not --human. 1996-04-24 05:05:34 +00:00