Jim Meyering
4006f4e672
Change exit (0)' to exit (EXIT_SUCCESS)',
...
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-31 08:52:10 +00:00
Jim Meyering
7488703199
Change error (1, ...' to error (EXIT_FAILURE, ...'.
2002-08-30 23:04:53 +00:00
Jim Meyering
d23970e52e
(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.
2002-07-02 09:05:33 +00:00
Jim Meyering
071b36fd90
Change all `preserving ...' diagnostics to
...
`failed to preserve ...' to make the failure clearer.
2002-06-21 12:10:02 +00:00
Jim Meyering
48f998c0e8
(do_copy): Change wording in diagnostic.
2002-03-10 22:22:33 +00:00
Jim Meyering
246e147a6a
(COPY_CONTENTS_OPTION): New enum value.
...
(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-03 22:28:48 +00:00
Jim Meyering
b9d1d9e98e
(main): Warn when -r is specified before --archive (-a).
2002-03-02 17:23:34 +00:00
Jim Meyering
7a5c83d8d5
(main): Revert change of 2001-12-29. With this change,
...
cp -r once again preserves symlinks.
(usage): Document the original (now-restored) behavior.
2002-03-02 17:15:42 +00:00
Jim Meyering
baea296b94
(main): Fail if -r is specified after --archive (-a) on the command line.
2002-03-02 16:44:02 +00:00
Jim Meyering
c672e2892b
(main): With -r, always dereference symlinks.
2001-12-29 22:58:40 +00:00
Jim Meyering
d5654c49bd
(re_protect):
...
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-11 11:47:25 +00:00
Jim Meyering
f3ac2e7839
Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
...
instead of hard-coding --help and --version descriptions.
2001-12-02 22:26:57 +00:00
Jim Meyering
072b27d4d2
(usage): Note that ``Mandatory arguments to long options are mandatory
...
for short options too.''
2001-11-23 20:29:56 +00:00
Jim Meyering
b78de3e724
Split usage strings so that --help and --version
...
descriptions are alone in their own string.
2001-11-23 20:10:25 +00:00
Jim Meyering
a5f1ced62a
(usage): Split --help output into smaller pieces.
...
Use fputs, not printf.
2001-11-23 15:41:16 +00:00
Jim Meyering
669102ec61
(cp_option_init): Likewise.
...
(do_copy): Call src_info_init.
2001-11-22 19:49:01 +00:00
Jim Meyering
c5ad355677
(cp_option_init): Initialize new member.
...
(do_copy): Remove const attribute from declaration of parameter, x.
dest_info_init now takes a parameter.
2001-11-22 10:55:40 +00:00
Jim Meyering
1e2d216c9e
(main): Free hash table storage.
2001-10-24 07:38:26 +00:00
Jim Meyering
af51884dac
Now, -P is the same as --no-dereference, per POSIX.
...
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-14 20:54:44 +00:00
Jim Meyering
ed759a47cb
(enum) [NO_DEREFERENCE_OPTION]: New member.
...
(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 19:57:08 +00:00
Jim Meyering
6d334f8f62
(cp_option_init): Don't set it.
2001-10-13 19:12:52 +00:00
Jim Meyering
66372e29eb
* src/copy.h (struct cp_options): Rename members:
...
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 17:24:38 +00:00
Jim Meyering
38e11fdc5d
(do_copy): Don't clear the hash table after processing
...
each command line argument.
2001-10-07 08:39:43 +00:00
Jim Meyering
e1b81c9b74
(main): Reflect that hash_init now takes no arguments.
2001-10-06 16:46:06 +00:00
Jim Meyering
679295f1de
(do_copy): Call dest_info_init if necessary.
2001-09-28 19:52:34 +00:00
Jim Meyering
e60f34c475
Accept new option: --reply={yes,no,query}
...
(enum) [REPLY_OPTION]: Define.
(usage): Describe new option.
Split long usage string into smaller pieces.
(main): Handle new option.
2001-09-28 19:43:17 +00:00
Jim Meyering
c0e0779f61
tweak line in help output
2001-09-16 16:07:07 +00:00
Jim Meyering
6b6a9cd8c4
(main): Reflect renaming: s/I_ON/I_ASK_USER/.
2001-09-15 11:21:23 +00:00
Jim Meyering
43a6f9d2d8
(AUTHORS): Mark string for translation, since it contains the English word `and'.
2001-08-14 06:54:27 +00:00
Jim Meyering
ebb48992c0
(cp_option_init): Adjust initialization of `interactive',
...
and initialize new member, stdin_tty.
(main): Adjust initialization(s) of `interactive',
2001-08-13 08:33:04 +00:00
Jim Meyering
98e643ab3b
(strip_trailing_slashes): Remove; now in dirname.h.
...
(make_path_private): Use dir_len instead of
dir_name, and avoid an extra mealloc call.
2001-05-12 10:00:52 +00:00
Jim Meyering
c036ffc1cc
(long_opts): Use `strip-trailing-slashes',
...
per the documetation, not `strip-trailing-slash'.
2001-02-03 16:50:34 +00:00
Jim Meyering
aaf9e9a820
(usage): Split a string that was longer than 2048 bytes.
2001-01-07 16:11:14 +00:00
Jim Meyering
78abfe5da3
(do_copy): When constructing dst_path for use with the
...
--parents option, first remove any trailing slashes from the command
line argument. Otherwise, tests/cp/cp-parent would fail on NetBSD.
2000-10-29 12:25:03 +00:00
Jim Meyering
f0d9306c78
(make_path_private): Add a FIXME comment.
2000-10-22 13:10:20 +00:00
Jim Meyering
3283bb8b93
(usage): Match revised documentation better.
2000-09-25 00:09:10 +00:00
Jim Meyering
65b0c96d46
(main): Tweak a relatively new diagnostic.
2000-09-24 11:57:36 +00:00
Jim Meyering
a04e5b9dbc
(main): When used with --force, each of the --link and
...
--symbolic-link options now implies --remove-destination.
2000-09-22 20:41:40 +00:00
Jim Meyering
25e0824d28
Move declaractions of lstat, stat, and rpl_lstat
...
as well as the definition of lstat from here to copy.h.
2000-09-04 20:50:45 +00:00
Jim Meyering
475fb2e732
(enum): Add UNLINK_DEST_BEFORE_OPENING.
...
[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-09-03 14:09:23 +00:00
Jim Meyering
004fa32b78
(usage): --force is independent of --interactive.
2000-08-26 22:24:31 +00:00
Jim Meyering
c93a607f05
(long_opts): Add --dereference, -L.
...
(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-20 20:48:57 +00:00
Jim Meyering
c64d3aaf18
(usage, main): For cp -P messages, mention the new behavior as well as the old.
2000-08-08 06:55:47 +00:00
Jim Meyering
b6bacc5dcf
Invoke xalloc_die instead of printing our own message.
2000-08-08 06:53:14 +00:00
Jim Meyering
0ef1ebe00e
(enum) [PARENTS_OPTION]: New member.
...
(long_opts): Update "parents" and deprecated "path" entries to use
`PARENTS_OPTION', not `P'.
(usage): Update --help output.
(main): Warn that the meaning of `-P' will soon change.
2000-08-07 08:55:50 +00:00
Jim Meyering
493d6182eb
tweak diagnostic
2000-07-30 16:01:48 +00:00
Jim Meyering
289dacfa49
tweak diagnostic
2000-07-25 12:28:33 +00:00
Jim Meyering
cb1df652a7
Convert "`%s'" in format strings to "%s", and wrap each
...
corresponding argument in a `quote (...)' call.
Add more precise diagnostics.
2000-07-25 12:26:52 +00:00
Jim Meyering
9993d4141c
Fix cp so that `cp -r DIR1/ DIR2' works once again.
...
(ASSIGN_BASENAME_STRDUPA): New macro.
(do_copy): Use it here (so we always strip trailing slashes before
calling base_name).
2000-07-23 10:54:01 +00:00
Jim Meyering
7f8c02a4fb
Convert "`%s'" in format strings to "%s", and wrap each
...
corresponding argument in a `quote (...)' call -- if there's only one.
If there are more than one, then use `quote_n (0, ...),
quote_n (1, ...), ...'.
2000-07-15 10:11:18 +00:00