1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 10:16:53 +02:00
Commit Graph

11851 Commits

Author SHA1 Message Date
Jim Meyering 7e1e127680 *** empty log message *** 2001-11-03 18:51:38 +00:00
Jim Meyering 4f2e8e8b2b (dirfd): Reflect the fact that DIR_TO_FD now takes an argument. 2001-11-03 18:50:53 +00:00
Jim Meyering ef991b4aa3 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
know the name of the variable in the macro definition.
2001-11-03 18:49:27 +00:00
Jim Meyering dbc3f75efa *** empty log message *** 2001-11-03 08:24:27 +00:00
Jim Meyering 8cb947f707 (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.
2001-11-03 08:23:54 +00:00
Jim Meyering 361446c55b *** empty log message *** 2001-11-03 07:33:41 +00:00
Jim Meyering 93b4e4074f (DEV_INO_PUSH): Avoid unnecessary copies.
(dev_ino_pop): Likewise.
2001-11-03 07:33:32 +00:00
Jim Meyering f1bafaa237 *** empty log message *** 2001-11-02 13:19:11 +00:00
Jim Meyering 1941ce9f42 *** empty log message *** 2001-11-02 13:16:21 +00:00
Jim Meyering 7b8da9264b (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/.
2001-11-02 13:16:10 +00:00
Jim Meyering 07d71b97ce *** empty log message *** 2001-11-02 11:10:25 +00:00
Jim Meyering c07abd1655 *** empty log message *** 2001-11-02 08:25:43 +00:00
Jim Meyering 71e6aca3b2 Use XREALLOC. It's cleaner. 2001-11-02 08:04:37 +00:00
Jim Meyering 81679a0c34 Use XMALLOC in a several places. It's cleaner. 2001-11-02 07:38:56 +00:00
Jim Meyering 3e06bb8549 put `const' back, now that the .m4 test works 2001-11-02 07:37:19 +00:00
Jim Meyering a427fa83f6 Use the replacement only if we have neither the function
nor a declaration.
2001-11-02 07:36:35 +00:00
Jim Meyering 594350107d remove const 2001-11-01 22:16:43 +00:00
Jim Meyering d73c55e449 whoops 2001-11-01 22:14:26 +00:00
Jim Meyering f8b38d358b *** empty log message *** 2001-11-01 21:40:07 +00:00
Jim Meyering 6fa5979ccb Include dirfd.h.
(print_dir): If dirfd fails, resort to using stat.
2001-11-01 21:40:01 +00:00
Jim Meyering 866d4b9e59 . 2001-11-01 17:58:23 +00:00
Jim Meyering 24e2617917 *** empty log message *** 2001-11-01 17:58:09 +00:00
Jim Meyering 533999f0fe (libfetish_a_SOURCES): Add dirfd.h. 2001-11-01 17:57:56 +00:00
Jim Meyering eaa95f208b . 2001-11-01 17:57:09 +00:00
Jim Meyering 9d874c09f6 *** empty log message *** 2001-11-01 17:44:43 +00:00
Jim Meyering b701bf8a30 *** empty log message *** 2001-11-01 16:57:18 +00:00
Jim Meyering 7c102d03c7 use AC_HEADER_DIRECT and all the associated cruft 2001-11-01 16:55:16 +00:00
Jim Meyering 0c0ad8da77 don't indent the #include directive 2001-11-01 16:47:00 +00:00
Jim Meyering 8d503b5362 check for decl, too 2001-11-01 16:46:06 +00:00
Jim Meyering 274003219b *** empty log message *** 2001-11-01 16:43:02 +00:00
Jim Meyering 0bba57ce8c (jm_MACROS): Require UTILS_FUNC_DIRFD. 2001-11-01 16:42:53 +00:00
Jim Meyering afd8381b51 (UTILS_FUNC_DIRFD): New macro. 2001-11-01 16:41:57 +00:00
Jim Meyering 76ffae0660 *** empty log message *** 2001-11-01 15:55:59 +00:00
Jim Meyering 74b63f68dd (hash_print) [TESTING]: Clean up. 2001-11-01 15:55:53 +00:00
Jim Meyering 85431d93ed Redirect cmp's stderr to /dev/null. 2001-11-01 15:54:36 +00:00
Jim Meyering 186af758eb *** empty log message *** 2001-11-01 15:52:27 +00:00
Jim Meyering c4dbc53ec4 (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.
2001-11-01 15:51:53 +00:00
Jim Meyering 00fc6c9262 *** empty log message *** 2001-11-01 11:31:26 +00:00
Jim Meyering 9e2756872d 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.
2001-11-01 11:31:19 +00:00
Jim Meyering c1c9a579e3 *** empty log message *** 2001-11-01 10:56:41 +00:00
Jim Meyering e3f8ccf486 (TESTS): Add dired. 2001-11-01 10:56:25 +00:00
Jim Meyering 3eeda5b2bf Don't try to print a NULL pointer.
(main): Don't use ARGMATCH_TO_ARGUMENT.
This reverts part of the 1998-12-31 change.
2001-11-01 10:43:23 +00:00
Jim Meyering 09edea7381 update copyright year 2001-10-28 10:01:07 +00:00
Jim Meyering 02da289e42 *** empty log message *** 2001-10-28 09:40:57 +00:00
Jim Meyering 6d81e0f580 . 2001-10-28 09:40:25 +00:00
Jim Meyering 1c7b8f6e85 test Paul's fix 2001-10-28 09:39:52 +00:00
Jim Meyering af6ce0f12c (TESTS): Add sysv. 2001-10-28 09:39:26 +00:00
Jim Meyering 904404bfd2 *** empty log message *** 2001-10-28 08:31:39 +00:00
Jim Meyering a4d1bdafd6 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.
2001-10-28 08:31:08 +00:00
Jim Meyering e922107a25 *** empty log message *** 2001-10-28 08:26:53 +00:00