summaryrefslogtreecommitdiff
path: root/src/cp.c
AgeCommit message (Collapse)Author
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-03-09fix typo in commentJim Meyering
2003-03-07Remove everything associated with mmap-stack.c.Jim Meyering
This reverts the two changes of 2003-02-21.
2003-02-21Include "mmap-stack.h".Jim Meyering
(main): Invoke `run' through a macro that (when possible) runs it with a large, mmap'd stack.
2003-02-17(run): New function, preparing for use ofJim Meyering
RUN_WITH_BIG_STACK_*
2003-01-03(do_copy): Tweak diagnostic to be consistent with the oneJim Meyering
from mv: s/missing file arguments/missing file argument/. With --target-directory=DIR, cp and mv work with a single file argument. Reported by Karl Berry.
2002-12-11Fix a bug whereby cp would fail to parse an option likeJim Meyering
--preserve=mode,ownership. (decode_preserve_arg): Advance `comma' to point the character following the comma.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-06-21Change all `preserving ...' diagnostics toJim Meyering
`failed to preserve ...' to make the failure clearer.
2002-03-10(do_copy): Change wording in diagnostic.Jim Meyering
2002-03-03(COPY_CONTENTS_OPTION): New enum value.Jim Meyering
(long_opts): Add --copy-contents. (usage): Describe new behavior. Sort options. (main): Implement new behavior. Remove diagnostics for -a and -r; no longer needed.
2002-03-02(main): Warn when -r is specified before --archive (-a).Jim Meyering
2002-03-02(main): Revert change of 2001-12-29. With this change,Jim Meyering
cp -r once again preserves symlinks. (usage): Document the original (now-restored) behavior.
2002-03-02(main): Fail if -r is specified after --archive (-a) on the command line.Jim Meyering
2001-12-29(main): With -r, always dereference symlinks.Jim Meyering
2001-12-11(re_protect):Jim Meyering
Include the word `fail' in some diagnostics to make it clearer that they indicate a failure. s/getting attributes/failed to get attributes/
2001-12-02Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23(usage): Note that ``Mandatory arguments to long options are mandatoryJim Meyering
for short options too.''
2001-11-23Split usage strings so that --help and --versionJim Meyering
descriptions are alone in their own string.
2001-11-23(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-11-22(cp_option_init): Likewise.Jim Meyering
(do_copy): Call src_info_init.
2001-11-22(cp_option_init): Initialize new member.Jim Meyering
(do_copy): Remove const attribute from declaration of parameter, x. dest_info_init now takes a parameter.
2001-10-24(main): Free hash table storage.Jim Meyering
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(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): Don't set it.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-07(do_copy): Don't clear the hash table after processingJim Meyering
each command line argument.
2001-10-06(main): Reflect that hash_init now takes no arguments.Jim Meyering
2001-09-28(do_copy): Call dest_info_init if necessary.Jim Meyering
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-16tweak line in help outputJim Meyering
2001-09-15(main): Reflect renaming: s/I_ON/I_ASK_USER/.Jim Meyering
2001-08-14(AUTHORS): Mark string for translation, since it contains the English word ↵Jim Meyering
`and'.
2001-08-13(cp_option_init): Adjust initialization of `interactive',Jim Meyering
and initialize new member, stdin_tty. (main): Adjust initialization(s) of `interactive',
2001-05-12(strip_trailing_slashes): Remove; now in dirname.h.Jim Meyering
(make_path_private): Use dir_len instead of dir_name, and avoid an extra mealloc call.
2001-02-03(long_opts): Use `strip-trailing-slashes',Jim Meyering
per the documetation, not `strip-trailing-slash'.
2001-01-07(usage): Split a string that was longer than 2048 bytes.Jim Meyering
2000-10-29(do_copy): When constructing dst_path for use with theJim Meyering
--parents option, first remove any trailing slashes from the command line argument. Otherwise, tests/cp/cp-parent would fail on NetBSD.
2000-10-22(make_path_private): Add a FIXME comment.Jim Meyering
2000-09-25(usage): Match revised documentation better.Jim Meyering
2000-09-24(main): Tweak a relatively new diagnostic.Jim Meyering
2000-09-22(main): When used with --force, each of the --link andJim Meyering
--symbolic-link options now implies --remove-destination.
2000-09-04Move declaractions of lstat, stat, and rpl_lstatJim Meyering
as well as the definition of lstat from here to copy.h.
2000-09-03(enum): Add UNLINK_DEST_BEFORE_OPENING.Jim Meyering
[long_options]: Add an entry for --remove-destination. (usage): Describe --remove-destination. (do_copy): Use unlink_dest_after_failed_open member, not `force.' (cp_option_init): Initialize new members. (main): Handle UNLINK_DEST_BEFORE_OPENING (aka --remove-destination).
2000-08-26(usage): --force is independent of --interactive.Jim Meyering
2000-08-20(long_opts): Add --dereference, -L.Jim Meyering
(usage): Describe -L and -H. (cp_option_init): Initialize to DEREF_UNDEFINED, not `1'. (main): Add `H' and `-L' to getopt spec string. [case 'a']: Initialize `dereference' to DEREF_NEVER, not 0. [case 'd']: Likewise. [case 'H']: New case. [case 'L']: New case. [case 'R']: Don't set dereference to `0' here. If it's not yet defined, set x.dereference to DEREF_NEVER if -R was specified, else set it to DEREF_ALWAYS. Set x.xstat accordingly for -H.
2000-08-08(usage, main): For cp -P messages, mention the new behavior as well as the old.Jim Meyering