Age | Commit message (Collapse) | Author |
|
|
|
(queue_directory): Remove just-added 3rd parameter
and associated code, and update callers.
(print_dir): Get dev/inode pair via `fstat (dirfd (reading), ...',
and call visit_dir to detect cycles here.
Push the dev/inode pair onto the new stack.
(dev_ino_obstack): New global.
(DEV_INO_PUSH): New macro.
(dev_ino_pop): New function.
(ASSERT_MATCHING_DEV_INO): New macro.
(visit_dir): Take two parameters (dev,ino), not one `pending'.
(main): Initialized the dev_ino_obstack.
Don't call visit_dir here.
Get the dev/ino pair from the new stack, not from the pending entry.
|
|
|
|
Include hash.h, same.h, and xalloc.h.
(INITIAL_TABLE_SIZE, LOOP_DETECT): Define.
(active_dir_set): New global.
(struct dev_ino): Declare.
(dev_ino_hash, dev_ino_compare, dev_ino_free): New functions.
(visit_dir, free_pending_ent): New functions.
(main): Initialize the active_dir_set hash table, if necessary.
Don't confuse a marker entry with a real one.
Detect loops.
Manage the set of active directories.
Free the hash table.
(queue_directory): Add a new parameter.
Ensure that we set the new dev/ino members for each enqueued directory.
Update all callers.
(print_dir): Don't confuse a marker entry with a real one.
(extract_dirs_from_files): Insert a marker entry before inserting
the entries for subdirectories.
|
|
|
|
|
|
(main): Don't use ARGMATCH_TO_ARGUMENT.
This reverts part of the 1998-12-31 change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(ROTATE_RIGHT): Remove; it was slow and the comment was
misleading anyway.
(bsd_sum_file): Avoid unsigned and long when they're not needed.
Compute total input bytes as uintmax_t, not long, so that the
code works even with files whose size does not fit in 'long'.
(sysv_sum_file): Likewise.
(sysv_sum_file): Do not reduce checksum until the end; this is
what System V does.
|
|
|
|
|
|
|
|
|
|
(string_to_integer): Check explicitly for overflow,
and lump everything else together as `invalid'.
|
|
possible, as some of them were not conforming to ANSI C, and
they made the code hard to read. Avoiding 'unsigned' cuts
down on the number of casts.
(newline_character, space_character, save_char):
Now char, not unsigned char.
(obuf): Now char *, not unsigned char *.
(ascii_to_ebcdic, ascii_to_ibm, ebcdic_to_ascii):
Now char[], not unsigned char[].
(translate_charset, translate_buffer, swab_buffer, skip, copy_simple,
copy_with_block, copy_with_unblock):
Arg now points to char, not unsigned char.
All callers changed.
(translate_charset, parse_conversion, apply_translations):
Use int index, not unsigned int.
(bit_count): Arg is now int, not unsigned int.
Callers not changed, as they already assumed this.
(translate_buffer): Cast char to unsigned char before using
it as a subscript.
(swab_buffer): Returns char *, not unsigned char *.
(dd_copy): Use char, not unsigned char, for buffers.
Use size_t for possibly-large index, not unsigned int.
|
|
|
|
|
|
|
|
|
|
|
|
to avoid a warning if -Wall.
|
|
to avoid a warning if -Wall.
|
|
|
|
|
|
|
|
|
|
gcc-3.0 didn't complain.
|
|
|
|
|
|
|
|
|
|
(copy_internal): Don't use PATH_MAX.
Rewrite the symlink-copying code to use xreadlink.
|
|
|
|
|
|
this code would end up calling gettext even in packages built
with --disable-nls.
|
|
|
|
|
|
|
|
this code would end up calling gettext even in packages built
with --disable-nls.
|
|
|
|
this code would end up calling gettext even in packages built
with --disable-nls.
|
|
|
|
Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
Use strerror_r that is only a macro, even if it is not a function.
(strerror): Check for HAVE_DECL_STRERROR before declaring.
(private_strerror): Use prototypes, not old-style function definition.
(print_errno_message): New function.
Support the POSIX 'int'-flavored strerror_r, as well as the traditional
char*-flavored one.
(error_tail, error, error_at_line): Use it.
|
|
|
|
Do not invoke AC_CHECK_FUNCS with strerror_r, as
AC_FUNC_STRERROR_R does that.
|