summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2001-11-10(proc_text): Use `puts' to output a string of spaces, not printf.Jim Meyering
2001-11-10(usage): Document %u.Jim Meyering
2001-11-06Remove duplicate entry for .png.Jim Meyering
2001-11-05(usage): Don't recommend setting LC_COLLATE=C.Jim Meyering
That can cause problems (now documented in coreutils.texi).
2001-11-04(usage): Say thatJim Meyering
``Mandatory arguments to long options are mandatory for short options too.\n\''
2001-11-04(usage): Add one-line description.Jim Meyering
2001-11-03(DEV_INO_PUSH): Avoid unnecessary copies.Jim Meyering
(dev_ino_pop): Likewise.
2001-11-02(dev_ino_pop): Cast 2nd arg of obstack_blank to `int'Jim Meyering
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-02Use XREALLOC. It's cleaner.Jim Meyering
2001-11-02Use XMALLOC in a several places. It's cleaner.Jim Meyering
2001-11-01Include dirfd.h.Jim Meyering
(print_dir): If dirfd fails, resort to using stat.
2001-11-01(struct pending) [st_ino, st_dev]: Remove just-added members.Jim Meyering
(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-01Make ls -R detect directory cycles.Jim Meyering
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-01Don't try to print a NULL pointer.Jim Meyering
(main): Don't use ARGMATCH_TO_ARGUMENT. This reverts part of the 1998-12-31 change.
2001-10-28update copyright yearJim Meyering
2001-10-28Include human.h.Jim Meyering
(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-27Give an accurate diagnostic when `head --bytes=30M' fails.Jim Meyering
(string_to_integer): Check explicitly for overflow, and lump everything else together as `invalid'.
2001-10-24Remove as many instances of 'unsigned' asJim Meyering
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(main): Free hash table storage.Jim Meyering
2001-10-24(forget_all): Use hash_free, not hash_clear.Jim Meyering
2001-10-22(alloca): Define to __builtin_alloca if __GNUC__,Jim Meyering
to avoid a warning if -Wall.
2001-10-21(isaac_seed_machdep): Handle SIGSEGV, too. Ick.Jim Meyering
2001-10-21yikes. put the preserve_metadata assignment *after* declarations.Jim Meyering
gcc-3.0 didn't complain.
2001-10-21Include xreadlink.h.Jim Meyering
(copy_internal): Don't use PATH_MAX. Rewrite the symlink-copying code to use xreadlink.
2001-10-20*** empty log message ***Jim Meyering
2001-10-20(usage): Improve the description of --dereference (-L).Jim Meyering
2001-10-20Declare some local variables to be `const', where appropriate.Jim Meyering
2001-10-20(usage): Clarify description of --directory (-d).Jim Meyering
Based on a patch from Michael Stone.
2001-10-18split a long line into twoJim Meyering
2001-10-18(movefile): Now that remember_copied xstrdup's the file name, free `new_dest'.Jim Meyering
2001-10-18Plug a leak.Jim Meyering
(remember_copied): Use src_to_dest_free to free the entry we couldn't insert.
2001-10-18(dest_info_free): New function.Jim Meyering
(dest_info_init): Make the hash table code use it. (record_dest): Store each DEST in malloc'd memory. Hence the above. Use dest_info_free to free the `ent' we couldn't insert.
2001-10-14Now, -P is the same as --no-dereference, per POSIX.Jim Meyering
Use --parents to get the old meaning. (enum) [NO_DEREFERENCE_OPTION]: Remove member. (long_opts): Associate --no-dereference with `-P'. (usage): Update description of -P. (main): Remove local, used_P_option, and code to warn that the meaning of -P would be changing.
2001-10-13(copy_internal): Tighten up and add commentsJim Meyering
describing the test for when to record (via remember_copied) a <dst_path, source_dev, source_ino> triple. Relax the test that guards the hard-linked-dir check and the hard-link-preserving code.
2001-10-13(enum) [NO_DEREFERENCE_OPTION]: New member.Jim Meyering
(enum) [NO_PRESERVE_ATTRIBUTES_OPTION]: New member. (enum) [PRESERVE_ATTRIBUTES_OPTION]: New member. (long_opts): Separate -d and --no-dereference options. Add `no-preserve'. Separate -p and --preserve options. The long-named --preserve now accepts optional arguments; -p doesn't. (usage): Describe additions and changes. (cp_option_init): Initialize new member, preserve_links, to 0. (decode_preserve_arg): New function. (main) [case 'a']: Set preserve_links to 1. [case 'd']: Set preserve_links to 1. Add `case' for long-named --no-dereference. Handle long-named --no-preserve and --preserve.
2001-10-13(cp_option_init): Initialize new member to 1.Jim Meyering
2001-10-13(cp_option_init): Initialize new member, preserve_links.Jim Meyering
2001-10-13(enum Dereference_symlink): Add comments.Jim Meyering
(struct cp_options) [preserve_links]: New member.
2001-10-13(cp_option_init): Don't set it.Jim Meyering
2001-10-13(struct cp_options) [failed_unlink_is_fatal]: Remove unused member.Jim Meyering
2001-10-13* src/copy.h (struct cp_options): Rename members:Jim Meyering
s/preserve_owner_and_group/preserve_ownership/, and s/preserve_chmod_bits/preserve_mode/. * src/copy.c, src/cp.c, src/install.c, src/mv.c: Update all uses.
2001-10-13* src/copy.h (struct cp_options): Rename members:Jim Meyering
s/preserve_owner_and_group/preserve_ownership/, and s/preserve_chmod_bits/preserve_mode/. * src/copy.c, src/cp.c, src/install.c, src/mv.c: Update all uses.
2001-10-13(struct cp_options): Rename members:Jim Meyering
s/preserve_owner_and_group/preserve_ownership/, and s/preserve_chmod_bits/preserve_mode/.
2001-10-12(main): Tell what's wrong with `mknod c zero 1 5' ratherJim Meyering
than saying just `Try `./mknod --help' for more information.'.
2001-10-07(remember_copied): Make a local copy of the file name.Jim Meyering
(src_to_dest_free): New function (to free the above). (hash_init): Register src_to_dest_free.
2001-10-07(copy_dir): Now that remember_copied copies theJim Meyering
file name, free the temporary `dst_path' allocated here.
2001-10-07(do_copy): Don't clear the hash table after processingJim Meyering
each command line argument.
2001-10-06Convert du.c to use the functions in lib/hash.c, not private,Jim Meyering
slightly-modified copies of those that used to be in cp-hash.c. (struct entry) [coll_link]: Remove member. (struct htab): Remove. (hash_reset, hash_init, hash_insert2, hash_insert): Remove functions. Include hash.h and same.h. (htab): Change type of global to `struct hash'; (entry_hash, entry_compare, hash_ins): New functions. (count_entry): Use hash_ins instead of hash_insert.
2001-10-06(hash_init): Die if hash_initialize fails.Jim Meyering
2001-10-06Update prototype for hash_init.Jim Meyering