Jim Meyering [Mon, 13 Oct 2003 20:50:46 +0000 (20:50 +0000)]
*** empty log message ***
Jim Meyering [Mon, 13 Oct 2003 20:50:40 +0000 (20:50 +0000)]
(init_column_info): Add another FIXME comment.
Jim Meyering [Mon, 13 Oct 2003 16:02:08 +0000 (16:02 +0000)]
*** empty log message ***
Jim Meyering [Mon, 13 Oct 2003 15:59:11 +0000 (15:59 +0000)]
*** empty log message ***
Jim Meyering [Mon, 13 Oct 2003 15:28:36 +0000 (15:28 +0000)]
*** empty log message ***
Jim Meyering [Mon, 13 Oct 2003 15:28:29 +0000 (15:28 +0000)]
Import latest version from gnulib.
Jim Meyering [Mon, 13 Oct 2003 15:27:18 +0000 (15:27 +0000)]
*** empty log message ***
Jim Meyering [Mon, 13 Oct 2003 15:27:11 +0000 (15:27 +0000)]
Import latest version from gnulib.
Jim Meyering [Mon, 13 Oct 2003 15:26:45 +0000 (15:26 +0000)]
Import latest version from gnulib.
Jim Meyering [Mon, 13 Oct 2003 15:17:05 +0000 (15:17 +0000)]
Import latest version from gnulib.
Jim Meyering [Mon, 13 Oct 2003 15:16:27 +0000 (15:16 +0000)]
(struct bin_str.len, length_of_file_name_and_frills, indent,
nfiles, files_index, tabsize, line_length, struct column_info.line_len,
struct column_info.col_arr[0], max_idx):
Now size_t, not int.
(get_funky_string): Return bool indicating success, instead of
a negative count to indicate failure. Store number of columns
through new parameter OUTPUT_COUNT; that way, they can never
go negative. Change equals_end from int to bool. All uses
changed.
(struct column_info.valid_len): Now bool, not int. All uses changed.
(dired_dump_obstack, get_funky_string, clear_files,
extract_dirs_from_files, print_current_files,
print_many_per_line, print_horizontal, init_column_info,
put_indicator, length_of_file_name_and_frills,
print_with_commas): Use size_t, not int, for local variables
that count sizes.
(decode_switches): Decode sizes using xstrtoul, not xstrtol.
Check for TIOCGWINSZ returing negative values (or values greater
than SIZE_MAX!).
(visit_dir, main, parse_ls_color, queue_directory, add_ignore_pattern,
init_column_info):
Use xmalloc and xnmalloc, not XMALLOC.
(gobble_file): Use xnrealloc, not XREALLOC.
(print_color_indicator): Remove now-unnecessary cast to size_t.
Jim Meyering [Mon, 13 Oct 2003 14:26:50 +0000 (14:26 +0000)]
(print_many_per_line): Add FIXME comment.
Jim Meyering [Mon, 13 Oct 2003 06:56:47 +0000 (06:56 +0000)]
Change wording of diagnostic to match latest du.c.
Jim Meyering [Mon, 13 Oct 2003 06:56:40 +0000 (06:56 +0000)]
*** empty log message ***
Jim Meyering [Mon, 13 Oct 2003 06:54:23 +0000 (06:54 +0000)]
*** empty log message ***
Jim Meyering [Mon, 13 Oct 2003 06:53:50 +0000 (06:53 +0000)]
Remove from CVS; assume that people
brave enough to check coreutils out from CVS can rebuild it.
Jim Meyering [Sun, 12 Oct 2003 14:20:14 +0000 (14:20 +0000)]
*** empty log message ***
Jim Meyering [Sun, 12 Oct 2003 14:19:25 +0000 (14:19 +0000)]
New options: --preserve-root and --no-preserve-root.
(change_file_mode): Honor new option.
(change_file_mode): Strip trailing slashes on directory
argument passed to change_dir_mode.
(get_root_dev_ino): New function.
(main): Initialize global, root_dev_ino.
Jim Meyering [Sun, 12 Oct 2003 07:05:30 +0000 (07:05 +0000)]
*** empty log message ***
Jim Meyering [Sun, 12 Oct 2003 07:05:16 +0000 (07:05 +0000)]
(change_file_mode): Don't #ifdef-out a simple use of
S_ISLNK. The S_IS* macros are guaranteed to be defined
via system.h.
Jim Meyering [Sun, 12 Oct 2003 07:03:57 +0000 (07:03 +0000)]
(copy_internal): Don't #ifdef-out simple uses of
S_ISLNK or S_ISSOCK. The S_IS* macros are guaranteed to be defined
via system.h.
Jim Meyering [Thu, 9 Oct 2003 16:16:17 +0000 (16:16 +0000)]
.
Jim Meyering [Thu, 9 Oct 2003 08:43:15 +0000 (08:43 +0000)]
tweak comments
Jim Meyering [Wed, 8 Oct 2003 18:24:15 +0000 (18:24 +0000)]
*** empty log message ***
Jim Meyering [Wed, 8 Oct 2003 18:24:04 +0000 (18:24 +0000)]
(main): Remove obsolete FIXME.
Jim Meyering [Wed, 8 Oct 2003 17:55:26 +0000 (17:55 +0000)]
*** empty log message ***
Jim Meyering [Wed, 8 Oct 2003 17:55:06 +0000 (17:55 +0000)]
*** empty log message ***
Jim Meyering [Wed, 8 Oct 2003 17:55:02 +0000 (17:55 +0000)]
(libfetish_a_SOURCES): Add xstrtoimax.c.
Jim Meyering [Wed, 8 Oct 2003 17:54:19 +0000 (17:54 +0000)]
csplit cleanup.
Be more careful about int widths. For example, remove some
arbitrary limits by replacing 'unsigned' with 'size_t',
'uintmax_t', etc. Use standard bool rather than a homegrown type.
(FALSE, TRUE, boolean): Remove. All uses changed
to <stdbool.h> usage.
(struct control): offset is now intmax_t, not int.
repeat_forever is now bool, not int.
(struct cstring): len is now size_t, not unsigned int.
(struct buffer_record): bytes_alloc, bytes_used, num_lines are now
size_t, not unsigned. start_line, first_available are now
uintmax_t, not unsigned.
(hold_count, control_used): Now size_t, not unsigned.
(last_line_number, current_line, bytes_written):
Now uintmax_t, not unsigned.
(save_to_hold_area, red_input, keep_new_line, record_line_starts,
create_new_buffer, get_new_buffer, load_buffer, find_line,
process_regexp, split_file, new_control_record, extract_regexp,
get_format_width, get_format_prec, max_out):
size args, locals, and returned values are now size_t, not unsigned
or int.
(get_first_line_in_buffer, find_line, write_to_file,
handle_line_error, process_line_count, regexp_error, process_regexp,
split_file):
File line, byte, and repetition counts are now uintmax_t, not unsigned.
(check_for_offset): Don't require a sign before the offset.
Use xstrtoimax to do the real work.
(extract_regexp): Remove harmful cast of size to unsigned.
256 -> 1<<CHAR_BIT, for clarity.
(get_format_flags): Return at most 3, to avoid worries about overflow.
(bytes_to_octal_digits): Remove.
(cleanup): Don't check whether output_stream is NULL, since
close_output_file does that for us.
(new_line_control, create_new_buffer): Use "foo *p = xmalloc
(sizeof *p);" instead of the more long-winded alternatives.
(get_new_buffer): Use O(1) algorithm for resizing a buffer
to a much larger size, instead of an O(N) algorithm.
(process_regexp): Use plain NULL rather than casted 0.
(make_filename): Use %u, not %d, to format unsigned file number.
(new_control_record): Use xrealloc exclusively, since it handles
NULL reliably,
(extract_regexp): Change misspelled word in diagnostic.
(get_format_width): Even if a minimum field width is specified,
allow room for enough octal digits to represent the value of
the maximum representible integer. This fixes a potential
buffer overrun. Calculate this room at compile-time, not
at run-time; this removes the need for bytes_to_octal_digits.
Check for overflow; this removes a FIXME.
(get_format_prec): Don't allow precision to be signed; it's
not ANSI. Check for overflow. Remove hardcoded "11" as
default precision; this fixes a potential buffer overrun
on hosts with wider size_t.
(get_format_conv_type): Change local variable to be of type
unsigned char, not int; this removes a potential subscript
violation on hosts where char is signed.
(max_out): Replace "for (;*p;)" with more-standard "while (*p)".
Allow "%%" in format. Don't overflow when
counting lots of percents.
(usage): Default sprintf format is %02u, not %d.
Jim Meyering [Wed, 8 Oct 2003 17:53:28 +0000 (17:53 +0000)]
*** empty log message ***
Jim Meyering [Wed, 8 Oct 2003 17:53:18 +0000 (17:53 +0000)]
(csplit invocation):
The regexp offset need not have a sign; POSIX requires support
for signless offets.
Jim Meyering [Wed, 8 Oct 2003 12:35:00 +0000 (12:35 +0000)]
.
Jim Meyering [Tue, 7 Oct 2003 15:23:08 +0000 (15:23 +0000)]
.
Jim Meyering [Tue, 7 Oct 2003 13:05:04 +0000 (13:05 +0000)]
.
Jim Meyering [Tue, 7 Oct 2003 07:22:13 +0000 (07:22 +0000)]
*** empty log message ***
Jim Meyering [Tue, 7 Oct 2003 07:21:37 +0000 (07:21 +0000)]
.
Jim Meyering [Mon, 6 Oct 2003 17:42:22 +0000 (17:42 +0000)]
.
Jim Meyering [Mon, 6 Oct 2003 07:55:11 +0000 (07:55 +0000)]
.
Jim Meyering [Mon, 6 Oct 2003 07:54:45 +0000 (07:54 +0000)]
*** empty log message ***
Jim Meyering [Mon, 6 Oct 2003 07:53:44 +0000 (07:53 +0000)]
remove now-unused file
Jim Meyering [Sun, 5 Oct 2003 16:26:51 +0000 (16:26 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Oct 2003 16:26:45 +0000 (16:26 +0000)]
(change_file_owner): Remove set-but-not-used local.
Jim Meyering [Sun, 5 Oct 2003 15:35:27 +0000 (15:35 +0000)]
s/nftw/fts/g in a comment
Jim Meyering [Sun, 5 Oct 2003 11:43:02 +0000 (11:43 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Oct 2003 11:42:55 +0000 (11:42 +0000)]
(du_files): Mark diagnostic for translation.
Jim Meyering [Sun, 5 Oct 2003 11:42:16 +0000 (11:42 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Oct 2003 11:42:11 +0000 (11:42 +0000)]
(jm_MACROS): Don't require AC_FUNC_FTW.
Jim Meyering [Sun, 5 Oct 2003 11:41:18 +0000 (11:41 +0000)]
.
Jim Meyering [Sat, 4 Oct 2003 19:57:06 +0000 (19:57 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Oct 2003 19:56:38 +0000 (19:56 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Oct 2003 19:56:32 +0000 (19:56 +0000)]
(du_files): Ignore any failure of fts_close.
Jim Meyering [Sat, 4 Oct 2003 17:01:22 +0000 (17:01 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Oct 2003 17:01:13 +0000 (17:01 +0000)]
(du_files): Give better diagnostics for failed fts_open.
Jim Meyering [Sat, 4 Oct 2003 12:16:12 +0000 (12:16 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Oct 2003 12:16:00 +0000 (12:16 +0000)]
(MAX_N_DESCRIPTORS): Remove now-unused definition.
Jim Meyering [Sat, 4 Oct 2003 12:14:24 +0000 (12:14 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Oct 2003 12:13:26 +0000 (12:13 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Oct 2003 12:11:51 +0000 (12:11 +0000)]
(enum) [HUMAN_SI_OPTION]: New member.
[long_options]: Use HUMAN_SI_OPTION, not 'H'.
(main): Warn that the meaning of -H will soon change.
Jim Meyering [Sat, 4 Oct 2003 11:58:47 +0000 (11:58 +0000)]
*** empty log message ***
Jim Meyering [Fri, 3 Oct 2003 20:17:29 +0000 (20:17 +0000)]
*** empty log message ***
Jim Meyering [Fri, 3 Oct 2003 20:17:18 +0000 (20:17 +0000)]
Accept --no-dereference (-P).
Jim Meyering [Fri, 3 Oct 2003 20:15:40 +0000 (20:15 +0000)]
*** empty log message ***
Jim Meyering [Fri, 3 Oct 2003 20:15:36 +0000 (20:15 +0000)]
(du invocation): Describe -P, --no-dereference.
Jim Meyering [Thu, 2 Oct 2003 20:30:47 +0000 (20:30 +0000)]
.
Jim Meyering [Thu, 2 Oct 2003 20:30:19 +0000 (20:30 +0000)]
.
Jim Meyering [Thu, 2 Oct 2003 20:30:09 +0000 (20:30 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 20:30:05 +0000 (20:30 +0000)]
(TESTS): Add inaccessible-cwd.
Jim Meyering [Thu, 2 Oct 2003 20:29:21 +0000 (20:29 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 20:29:12 +0000 (20:29 +0000)]
Adjust for slightly different output.
Jim Meyering [Thu, 2 Oct 2003 20:26:41 +0000 (20:26 +0000)]
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.
Jim Meyering [Thu, 2 Oct 2003 20:26:06 +0000 (20:26 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 20:24:00 +0000 (20:24 +0000)]
.
Jim Meyering [Thu, 2 Oct 2003 20:23:49 +0000 (20:23 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 20:23:35 +0000 (20:23 +0000)]
(libfetish_a_SOURCES): Add fts.c fts_.h.
Remove ftw_.h.
Jim Meyering [Thu, 2 Oct 2003 17:56:00 +0000 (17:56 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 17:47:22 +0000 (17:47 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 17:33:54 +0000 (17:33 +0000)]
Don't require that the maximum length of a file name
encountered in a traversal fit in an `unsigned short',
and fix some portability bugs (don't depend on gcc).
Include "fts_.h", not <fts.h>.
(ALIGNBYTES) [!(__GNUC__ >= 2)]: Add a definition that works with
compilers that don't have __alignof__.
(MAX): Use a definition that doesn't depend on gcc.
(fts_build): Make `len' and `maxlen' be of type size_t, not int.
Test for overflow in a less type-dependent manner.
Test HAVE_STRUCT_DIRENT_D_TYPE, rather than
defined DT_DIR && defined _DIRENT_HAVE_D_TYPE.
(fts_palloc): Test for overflow in a less type-dependent manner.
(fts_safe_changedir): Use stat, not stat64.
Use fstat, not __fxstat64(_STAT_VER.
Jim Meyering [Thu, 2 Oct 2003 17:33:42 +0000 (17:33 +0000)]
Don't require that the maximum length of a file name
encountered in a traversal fit in an `unsigned short',
and fix some portability bugs (don't depend on gcc).
[FTS] (fts_pathlen): Change type from int to size_t.
[FTSENT] (fts_pathlen): Change type from u_short to size_t.
(fts_level): Change type from u_short to int.
Jim Meyering [Thu, 2 Oct 2003 17:21:05 +0000 (17:21 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 17:20:04 +0000 (17:20 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 17:15:35 +0000 (17:15 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 17:14:39 +0000 (17:14 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 17:13:50 +0000 (17:13 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Oct 2003 17:05:34 +0000 (17:05 +0000)]
Ensure that du can process a hierarchy
of depth 400 while using no more than 50KB of stack space.
Jim Meyering [Wed, 1 Oct 2003 08:11:45 +0000 (08:11 +0000)]
*** empty log message ***
Jim Meyering [Wed, 1 Oct 2003 08:09:02 +0000 (08:09 +0000)]
(print_news_deltas): New function, extracted from main.
(main): Make `news_file' an array.
Use '...=s' => \@var for --news and --url-directory specs.
Before there were a couple of problems.
Jim Meyering [Tue, 30 Sep 2003 06:44:35 +0000 (06:44 +0000)]
*** empty log message ***
Jim Meyering [Tue, 30 Sep 2003 06:44:32 +0000 (06:44 +0000)]
(tm_diff) [! HAVE_TM_GMTOFF]: Fix arg typo in previous patch.
Jim Meyering [Sun, 28 Sep 2003 12:38:38 +0000 (12:38 +0000)]
.
Jim Meyering [Sun, 28 Sep 2003 12:36:51 +0000 (12:36 +0000)]
.
Jim Meyering [Sun, 28 Sep 2003 08:39:37 +0000 (08:39 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Sep 2003 08:39:31 +0000 (08:39 +0000)]
(sc_cast_of_alloca_return_value): New rule.
(syntax-check-rules): Add it.
Jim Meyering [Sun, 28 Sep 2003 08:25:40 +0000 (08:25 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Sep 2003 08:25:24 +0000 (08:25 +0000)]
(sc_cast_of_x_alloc_return_value): Also check for alloca casts.
Jim Meyering [Sun, 28 Sep 2003 08:23:28 +0000 (08:23 +0000)]
Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).
Jim Meyering [Sun, 28 Sep 2003 08:22:35 +0000 (08:22 +0000)]
Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).
Jim Meyering [Sun, 28 Sep 2003 08:22:15 +0000 (08:22 +0000)]
(ASSIGN_STRDUPA):
Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).
Jim Meyering [Sun, 28 Sep 2003 08:21:35 +0000 (08:21 +0000)]
Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).
Jim Meyering [Sun, 28 Sep 2003 08:21:14 +0000 (08:21 +0000)]
Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).
Jim Meyering [Sun, 28 Sep 2003 08:20:52 +0000 (08:20 +0000)]
Remove unnecessary cast of alloca, since now it's guaranteed to be (void *).