Jim Meyering [Sat, 3 Nov 2001 08:24:27 +0000 (08:24 +0000)]
*** empty log message ***
Jim Meyering [Sat, 3 Nov 2001 08:23:54 +0000 (08:23 +0000)]
(hash_clear): Fix a bug that could lead to an infloop or
e.g., a fault due to an attempt to free a NULL pointer.
Jim Meyering [Sat, 3 Nov 2001 07:33:41 +0000 (07:33 +0000)]
*** empty log message ***
Jim Meyering [Sat, 3 Nov 2001 07:33:32 +0000 (07:33 +0000)]
(DEV_INO_PUSH): Avoid unnecessary copies.
(dev_ino_pop): Likewise.
Jim Meyering [Fri, 2 Nov 2001 13:19:11 +0000 (13:19 +0000)]
*** empty log message ***
Jim Meyering [Fri, 2 Nov 2001 13:16:21 +0000 (13:16 +0000)]
*** empty log message ***
Jim Meyering [Fri, 2 Nov 2001 13:16:10 +0000 (13:16 +0000)]
(dev_ino_pop): Cast 2nd arg of obstack_blank to `int'
before negating to avoid warning from gcc on systems with 64-bit size_t.
Rename global: s/trace_dirs/recursive/.
(extract_dirs_from_files): Rename parameter:
s/recursive/ignore_dot_and_dot_dot/.
Jim Meyering [Fri, 2 Nov 2001 11:10:25 +0000 (11:10 +0000)]
*** empty log message ***
Jim Meyering [Fri, 2 Nov 2001 08:25:43 +0000 (08:25 +0000)]
*** empty log message ***
Jim Meyering [Fri, 2 Nov 2001 08:04:37 +0000 (08:04 +0000)]
Use XREALLOC. It's cleaner.
Jim Meyering [Fri, 2 Nov 2001 07:38:56 +0000 (07:38 +0000)]
Use XMALLOC in a several places. It's cleaner.
Jim Meyering [Fri, 2 Nov 2001 07:37:19 +0000 (07:37 +0000)]
put `const' back, now that the .m4 test works
Jim Meyering [Fri, 2 Nov 2001 07:36:35 +0000 (07:36 +0000)]
Use the replacement only if we have neither the function
nor a declaration.
Jim Meyering [Thu, 1 Nov 2001 22:16:43 +0000 (22:16 +0000)]
remove const
Jim Meyering [Thu, 1 Nov 2001 22:14:26 +0000 (22:14 +0000)]
whoops
Jim Meyering [Thu, 1 Nov 2001 21:40:07 +0000 (21:40 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 21:40:01 +0000 (21:40 +0000)]
Include dirfd.h.
(print_dir): If dirfd fails, resort to using stat.
Jim Meyering [Thu, 1 Nov 2001 17:58:23 +0000 (17:58 +0000)]
.
Jim Meyering [Thu, 1 Nov 2001 17:58:09 +0000 (17:58 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 17:57:56 +0000 (17:57 +0000)]
(libfetish_a_SOURCES): Add dirfd.h.
Jim Meyering [Thu, 1 Nov 2001 17:57:09 +0000 (17:57 +0000)]
.
Jim Meyering [Thu, 1 Nov 2001 17:44:43 +0000 (17:44 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 16:57:18 +0000 (16:57 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 16:55:16 +0000 (16:55 +0000)]
use AC_HEADER_DIRECT and all the associated cruft
Jim Meyering [Thu, 1 Nov 2001 16:47:00 +0000 (16:47 +0000)]
don't indent the #include directive
Jim Meyering [Thu, 1 Nov 2001 16:46:06 +0000 (16:46 +0000)]
check for decl, too
Jim Meyering [Thu, 1 Nov 2001 16:43:02 +0000 (16:43 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 16:42:53 +0000 (16:42 +0000)]
(jm_MACROS): Require UTILS_FUNC_DIRFD.
Jim Meyering [Thu, 1 Nov 2001 16:41:57 +0000 (16:41 +0000)]
(UTILS_FUNC_DIRFD): New macro.
Jim Meyering [Thu, 1 Nov 2001 15:55:59 +0000 (15:55 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 15:55:53 +0000 (15:55 +0000)]
(hash_print) [TESTING]: Clean up.
Jim Meyering [Thu, 1 Nov 2001 15:54:36 +0000 (15:54 +0000)]
Redirect cmp's stderr to /dev/null.
Jim Meyering [Thu, 1 Nov 2001 15:52:27 +0000 (15:52 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 15:51:53 +0000 (15:51 +0000)]
(struct pending) [st_ino, st_dev]: Remove just-added members.
(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.
Jim Meyering [Thu, 1 Nov 2001 11:31:26 +0000 (11:31 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 11:31:19 +0000 (11:31 +0000)]
Make ls -R detect directory cycles.
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.
Jim Meyering [Thu, 1 Nov 2001 10:56:41 +0000 (10:56 +0000)]
*** empty log message ***
Jim Meyering [Thu, 1 Nov 2001 10:56:25 +0000 (10:56 +0000)]
(TESTS): Add dired.
Jim Meyering [Thu, 1 Nov 2001 10:43:23 +0000 (10:43 +0000)]
Don't try to print a NULL pointer.
(main): Don't use ARGMATCH_TO_ARGUMENT.
This reverts part of the 1998-12-31 change.
Jim Meyering [Sun, 28 Oct 2001 10:01:07 +0000 (10:01 +0000)]
update copyright year
Jim Meyering [Sun, 28 Oct 2001 09:40:57 +0000 (09:40 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Oct 2001 09:40:25 +0000 (09:40 +0000)]
.
Jim Meyering [Sun, 28 Oct 2001 09:39:52 +0000 (09:39 +0000)]
test Paul's fix
Jim Meyering [Sun, 28 Oct 2001 09:39:26 +0000 (09:39 +0000)]
(TESTS): Add sysv.
Jim Meyering [Sun, 28 Oct 2001 08:31:39 +0000 (08:31 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Oct 2001 08:31:08 +0000 (08:31 +0000)]
Include human.h.
(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.
Jim Meyering [Sun, 28 Oct 2001 08:26:53 +0000 (08:26 +0000)]
*** empty log message ***
Jim Meyering [Sun, 28 Oct 2001 08:20:01 +0000 (08:20 +0000)]
*** empty log message ***
Jim Meyering [Sat, 27 Oct 2001 16:43:52 +0000 (16:43 +0000)]
*** empty log message ***
Jim Meyering [Sat, 27 Oct 2001 14:24:56 +0000 (14:24 +0000)]
*** empty log message ***
Jim Meyering [Sat, 27 Oct 2001 14:24:42 +0000 (14:24 +0000)]
Give an accurate diagnostic when `head --bytes=30M' fails.
(string_to_integer): Check explicitly for overflow,
and lump everything else together as `invalid'.
Jim Meyering [Wed, 24 Oct 2001 10:38:53 +0000 (10:38 +0000)]
Remove as many instances of 'unsigned' as
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.
Jim Meyering [Wed, 24 Oct 2001 07:38:33 +0000 (07:38 +0000)]
*** empty log message ***
Jim Meyering [Wed, 24 Oct 2001 07:38:26 +0000 (07:38 +0000)]
(main): Free hash table storage.
Jim Meyering [Wed, 24 Oct 2001 07:36:53 +0000 (07:36 +0000)]
(forget_all): Use hash_free, not hash_clear.
Jim Meyering [Mon, 22 Oct 2001 08:02:38 +0000 (08:02 +0000)]
.
Jim Meyering [Mon, 22 Oct 2001 08:02:09 +0000 (08:02 +0000)]
*** empty log message ***
Jim Meyering [Mon, 22 Oct 2001 08:01:43 +0000 (08:01 +0000)]
(alloca): Define to __builtin_alloca if __GNUC__,
to avoid a warning if -Wall.
Jim Meyering [Mon, 22 Oct 2001 08:01:22 +0000 (08:01 +0000)]
(alloca): Define to __builtin_alloca if __GNUC__,
to avoid a warning if -Wall.
Jim Meyering [Mon, 22 Oct 2001 06:56:44 +0000 (06:56 +0000)]
*** empty log message ***
Jim Meyering [Mon, 22 Oct 2001 06:56:31 +0000 (06:56 +0000)]
(uintptr_t): Remove macro and decl; it's config.h's job.
Jim Meyering [Sun, 21 Oct 2001 21:46:09 +0000 (21:46 +0000)]
.
Jim Meyering [Sun, 21 Oct 2001 19:52:12 +0000 (19:52 +0000)]
(isaac_seed_machdep): Handle SIGSEGV, too. Ick.
Jim Meyering [Sun, 21 Oct 2001 18:50:16 +0000 (18:50 +0000)]
yikes. put the preserve_metadata assignment *after* declarations.
gcc-3.0 didn't complain.
Jim Meyering [Sun, 21 Oct 2001 17:06:36 +0000 (17:06 +0000)]
.
Jim Meyering [Sun, 21 Oct 2001 17:03:50 +0000 (17:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 17:03:31 +0000 (17:03 +0000)]
(TESTS): Remove i-3. It's not portable.
Jim Meyering [Sun, 21 Oct 2001 15:21:34 +0000 (15:21 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 15:21:28 +0000 (15:21 +0000)]
Include xreadlink.h.
(copy_internal): Don't use PATH_MAX.
Rewrite the symlink-copying code to use xreadlink.
Jim Meyering [Sun, 21 Oct 2001 15:12:39 +0000 (15:12 +0000)]
whoops! fix comment on first line :-)
Jim Meyering [Sun, 21 Oct 2001 13:39:20 +0000 (13:39 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 13:39:12 +0000 (13:39 +0000)]
(_): Honor the setting of ENABLE_NLS. Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
Jim Meyering [Sun, 21 Oct 2001 12:33:26 +0000 (12:33 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 12:33:21 +0000 (12:33 +0000)]
(cp invocation): Describe --reply=...
Jim Meyering [Sun, 21 Oct 2001 10:55:36 +0000 (10:55 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 10:55:29 +0000 (10:55 +0000)]
(_): Honor the setting of ENABLE_NLS. Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
Jim Meyering [Sun, 21 Oct 2001 09:01:31 +0000 (09:01 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 09:01:24 +0000 (09:01 +0000)]
(_): Honor the setting of ENABLE_NLS. Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
Jim Meyering [Sun, 21 Oct 2001 07:59:09 +0000 (07:59 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 07:59:04 +0000 (07:59 +0000)]
(strerror_r): Do not declare unless !_LIBC.
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.
Jim Meyering [Sun, 21 Oct 2001 07:49:37 +0000 (07:49 +0000)]
*** empty log message ***
Jim Meyering [Sun, 21 Oct 2001 07:49:27 +0000 (07:49 +0000)]
(jm_PREREQ_ERROR):
Do not invoke AC_CHECK_FUNCS with strerror_r, as
AC_FUNC_STRERROR_R does that.
Jim Meyering [Sun, 21 Oct 2001 07:49:13 +0000 (07:49 +0000)]
Add copyright notice, as nontrivial m4 files
are supposed to have them these days.
(AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
Merge changes from latest Autoconf CVS.
Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
POSIX decided to standardize on the int flavor of strerror_r.
Jim Meyering [Sat, 20 Oct 2001 19:13:41 +0000 (19:13 +0000)]
*** empty log message ***
Jim Meyering [Sat, 20 Oct 2001 14:59:07 +0000 (14:59 +0000)]
*** empty log message ***
Jim Meyering [Sat, 20 Oct 2001 14:58:59 +0000 (14:58 +0000)]
(usage): Improve the description of --dereference (-L).
Jim Meyering [Sat, 20 Oct 2001 14:57:39 +0000 (14:57 +0000)]
Declare some local variables to be `const', where appropriate.
Jim Meyering [Sat, 20 Oct 2001 14:54:07 +0000 (14:54 +0000)]
*** empty log message ***
Jim Meyering [Sat, 20 Oct 2001 14:53:45 +0000 (14:53 +0000)]
(usage): Clarify description of --directory (-d).
Based on a patch from Michael Stone.
Jim Meyering [Sat, 20 Oct 2001 14:41:31 +0000 (14:41 +0000)]
*** empty log message ***
Jim Meyering [Sat, 20 Oct 2001 14:41:23 +0000 (14:41 +0000)]
tweak
Jim Meyering [Sat, 20 Oct 2001 14:40:12 +0000 (14:40 +0000)]
Describe sticky files and directories.
Jim Meyering [Sat, 20 Oct 2001 14:01:33 +0000 (14:01 +0000)]
*** empty log message ***
Jim Meyering [Sat, 20 Oct 2001 14:01:23 +0000 (14:01 +0000)]
Don't use a umask that removes owner read/write.
Use a stricter test for permissions.
Jim Meyering [Sat, 20 Oct 2001 13:59:57 +0000 (13:59 +0000)]
Don't use a umask that removes owner
read/write. That induces spurious failures in a probably-old
version of purify.
Jim Meyering [Thu, 18 Oct 2001 20:29:57 +0000 (20:29 +0000)]
split a long line into two
Jim Meyering [Thu, 18 Oct 2001 08:14:45 +0000 (08:14 +0000)]
*** empty log message ***
Jim Meyering [Thu, 18 Oct 2001 08:13:28 +0000 (08:13 +0000)]
(movefile): Now that remember_copied xstrdup's the file name, free `new_dest'.
Jim Meyering [Thu, 18 Oct 2001 07:45:00 +0000 (07:45 +0000)]
*** empty log message ***
Jim Meyering [Thu, 18 Oct 2001 07:44:41 +0000 (07:44 +0000)]
Plug a leak.
(remember_copied): Use src_to_dest_free to free the entry we couldn't insert.