summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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
2001-10-06Rewrite to use the functions in lib/hash.c.Jim Meyering
2001-10-06(record_dest): Fix test for whether to free `ent'.Jim Meyering
Thank heavens for regression tests.
2001-10-06(main): Reflect that hash_init now takes no arguments.Jim Meyering
2001-10-06(do_move): Reflect that hash_init now takes no arguments.Jim Meyering
2001-10-06(record_dest): Avoid a small leak.Jim Meyering
(copy_internal): Call remember_copied only for if the source file has 1 < st_nlink, or if it's a directory. Now that EARLIER_FILE is set conditionally, initialize it to NULL.
2001-10-05Include hash-pjw.h and remove definition of hash_pjw.Jim Meyering
2001-10-04Rename --all-repeated argument `precede' to `prepend'.Jim Meyering
* src/uniq.c (enum delimit_method): s/DM_PRECEDE/DM_PREPEND/ and change all uses. (delimit_method_string): s/precede/prepend/ Patch by Padraig Brady. * src/uniq.c (usage): Correct typo in description of --all-repeated. Patch by Padraig Brady.
2001-09-30tail -F would segfaultJim Meyering
(parse_options): Add missing `break;' from last change.
2001-09-29(copy_internal): Call record_dest for all types ofJim Meyering
files (for which this makes sense), not just regular ones.
2001-09-28(main): Call dest_info_init if necessary.Jim Meyering
2001-09-28(main): Call dest_info_init if necessary.Jim Meyering
2001-09-28(do_copy): Call dest_info_init if necessary.Jim Meyering
2001-09-28(dest_info_init): Declare.Jim Meyering
2001-09-28Include "hash.h" and "same.h".Jim Meyering
(struct Dest_info): Define. (dest_info): Declare global. (DEST_INFO_INITIAL_CAPACITY): Define. (hash_pjw): New function. (dest_info_hash): Likewise. (dest_info_compare): Likewise. (dest_info_init): Likewise. (seen_dest): Likewise. (record_dest): Likewise. (copy_internal): If the destination exists, fail if it's in the set of files that have already been created as part of this mv or cp. (copy_internal) [move_mode]: Record the destination dev/ino/filename. (copy_internal) [!move_mode, regular file]: Likewise.
2001-09-28Accept new option: --reply={yes,no,query}Jim Meyering
(enum) [REPLY_OPTION]: Define. (usage): Describe new option. Split long usage string into smaller pieces. (main): Handle new option.
2001-09-22Mostly clean-up (modulo the better diagnostic).Jim Meyering
(copy_internal): Rename parameter, move_mode, to command_line_arg, and adjust caller. Now, move_mode is a local that is derived from command_line_arg. Factor some involved code to produce something slightly more readable. Use x->move_mode, not move_mode in determining which diagnostic to give (`backing up %s would destroy source; %s not moved').
2001-09-20(MAX_ADDRESS_LENGTH, pseudo_offset, format_address,Jim Meyering
n_bytes_to_skip, skip, format_address_none, format_address_std, format_address_paren, format_address_label, write_block, parse_old_offset, dump, dump_strings, main): Use uintmax_t, not off_t, for file addresses, so that we can handle multiple large files even if the sum of their sizes exceeds off_t limits. (print_s_char, print_char, print_s_short, print_short, print_int, print_long, print_long_long, print_float, print_double, print_long_double, dump_hexl_mode_trailer, print_named_ascii, print_ascii, decode_one_format): Use size_t, not off_t, for in-memory byte counts. (end_offset): New var. (dump, dump_strings): Use it. (main): Set it, but check for overflow while doing so. (skip): Report an error if an in-range lseek fails on a regular file, as something's seriously wrong. Check for negative regular file sizes (possible with some broken NFS implementations). (parse_old_offset): Now all offsets are valid, so return a success boolean and take a pointer to an offset as an argument. All callers changed. (dump_strings): Check for overflow when computing end_offset - string_min. (main): Remove OFF_T_MAX checks that are no longer needed. Don't bother assigning through temporary when there's no size limit to check.
2001-09-19(open_next_file): Use SETVBUF, not setbuf.Jim Meyering
(skip): Revert part of last change: use lseek, not fseek.
2001-09-19When --read-bytes=N (-N N) is used, disable input buffering inJim Meyering
the standard I/O library. Otherwise, od would read more input than requested. This could have caused problems when reading from pipes, character devices, and open file descriptors inherited from a parent process. * src/od.c (open_next_file): New function, factored out of... (skip): Adapt to use open_next_file. (read_char): Likewise. (read_block): Likewise. (main): Likewise. (dump): Fix an off-by-one error that could have made od fail to report a read error when reading from a named file (not stdin). (check_and_close): Account for the fact that in_stream may now be NULL. (usage): Correct descriptions of -j and -N options. Patch by Ian Bruce.
2001-09-17(usage): Fix typo in -g usage.Jim Meyering
-H now means --dereference-command-line.
2001-09-17(main): Change the `ignoring excess arguments' diagnosticJim Meyering
to list the first one we're ignoring. Suggestion from Karl Berry.
2001-09-16(usage): Prefix each line with a space, so thatJim Meyering
help2man produces a better stty.1 man page.
2001-09-16(usage): Describe -h option.Jim Meyering
From Michael Stone. http://bugs.debian.org/99272
2001-09-16tweak line in help outputJim Meyering
2001-09-16(digest_check): On systems for which setmode actuallyJim Meyering
does something, arrange to read the file containing checksum strings in text mode. Based on a patch from Chris Faylor.
2001-09-16(SET_MODE): Define.Jim Meyering
2001-09-15(EISDIR): Define to 0, if not already defined.Jim Meyering
(touch): Give a better diagnostic for e.g., `touch /' by non-root. Based on a patch from Michael Stone. Reported by Jeff Sheinberg as Debian bug #101677.
2001-09-15(UNWRITABLE): Define (factored out of copy_internal).Jim Meyering
(copy_internal): Use UNWRITABLE.
2001-09-15(copy_internal) [move_mode]: Support the newJim Meyering
--reply=... option.