1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-26 02:30:35 +02:00
Commit Graph

11819 Commits

Author SHA1 Message Date
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
Jim Meyering 8e763221fd *** empty log message *** 2001-10-28 08:20:01 +00:00
Jim Meyering df5b9c4dc3 *** empty log message *** 2001-10-27 16:43:52 +00:00
Jim Meyering cda8d2a9af *** empty log message *** 2001-10-27 14:24:56 +00:00
Jim Meyering 58b5f108f2 Give an accurate diagnostic when `head --bytes=30M' fails.
(string_to_integer): Check explicitly for overflow,
and lump everything else together as `invalid'.
2001-10-27 14:24:42 +00:00
Jim Meyering 93a207af8d 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.
2001-10-24 10:38:53 +00:00
Jim Meyering fd77bc4a78 *** empty log message *** 2001-10-24 07:38:33 +00:00
Jim Meyering 1e2d216c9e (main): Free hash table storage. 2001-10-24 07:38:26 +00:00
Jim Meyering df1b3c4948 (forget_all): Use hash_free, not hash_clear. 2001-10-24 07:36:53 +00:00
Jim Meyering 0b765fd547 . 2001-10-22 08:02:38 +00:00
Jim Meyering 8229e0dbef *** empty log message *** 2001-10-22 08:02:09 +00:00
Jim Meyering 05c446084e (alloca): Define to __builtin_alloca if __GNUC__,
to avoid a warning if -Wall.
2001-10-22 08:01:43 +00:00
Jim Meyering e28263f673 (alloca): Define to __builtin_alloca if __GNUC__,
to avoid a warning if -Wall.
2001-10-22 08:01:22 +00:00
Jim Meyering b96c3e6a5d *** empty log message *** 2001-10-22 06:56:44 +00:00
Jim Meyering ddd7e2a0b8 (uintptr_t): Remove macro and decl; it's config.h's job. 2001-10-22 06:56:31 +00:00
Jim Meyering b7bf622acb . 2001-10-21 21:46:09 +00:00
Jim Meyering 48cab72bd1 (isaac_seed_machdep): Handle SIGSEGV, too. Ick. 2001-10-21 19:52:12 +00:00
Jim Meyering e735c8f6e0 yikes. put the preserve_metadata assignment *after* declarations.
gcc-3.0 didn't complain.
2001-10-21 18:50:16 +00:00
Jim Meyering 7436273688 . 2001-10-21 17:06:36 +00:00
Jim Meyering 79e188a2ec *** empty log message *** 2001-10-21 17:03:50 +00:00
Jim Meyering 17232a74f2 (TESTS): Remove i-3. It's not portable. 2001-10-21 17:03:31 +00:00
Jim Meyering 7af1f21709 *** empty log message *** 2001-10-21 15:21:34 +00:00
Jim Meyering b9bda3c30d Include xreadlink.h.
(copy_internal): Don't use PATH_MAX.
Rewrite the symlink-copying code to use xreadlink.
2001-10-21 15:21:28 +00:00
Jim Meyering bd0070c191 whoops! fix comment on first line :-) 2001-10-21 15:12:39 +00:00
Jim Meyering a43c0607ac *** empty log message *** 2001-10-21 13:39:20 +00:00
Jim Meyering 2a1279c26d (_): Honor the setting of ENABLE_NLS. Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
2001-10-21 13:39:12 +00:00
Jim Meyering 9ff208503c *** empty log message *** 2001-10-21 12:33:26 +00:00
Jim Meyering c73398fa51 (cp invocation): Describe --reply=... 2001-10-21 12:33:21 +00:00
Jim Meyering 25839c6c48 *** empty log message *** 2001-10-21 10:55:36 +00:00
Jim Meyering 9d8ec0121c (_): Honor the setting of ENABLE_NLS. Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
2001-10-21 10:55:29 +00:00
Jim Meyering 9c0e765d5a *** empty log message *** 2001-10-21 09:01:31 +00:00
Jim Meyering 8f67d26ec0 (_): Honor the setting of ENABLE_NLS. Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
2001-10-21 09:01:24 +00:00
Jim Meyering b96446bf59 *** empty log message *** 2001-10-21 07:59:09 +00:00