Commit Graph
22888 Commits
Author SHA1 Message Date
Jim Meyering e2017655a1 *** empty log message *** 2000-09-04 07:25:10 +00:00
Jim Meyering 09af7ed5f7 *** empty log message *** 2000-09-04 07:09:08 +00:00
Jim Meyering 2c663e070c *** empty log message *** 2000-09-03 18:50:55 +00:00
Jim Meyering 799114aa8c (cp_option_init): Initialize new members. 2000-09-03 18:50:49 +00:00
Jim Meyering 8ed20d830e . 2000-09-03 18:50:14 +00:00
Jim Meyering a513c6c10e . 2000-09-03 18:49:37 +00:00
Jim Meyering 35640da77d tweak comment 2000-09-03 15:25:11 +00:00
Jim Meyering b8fbc41536 Remove obsolete comment block.
(cp_option_init): Initialize new members.
(usage): Reflect the fact that --force (-f) relates only to whether
mv prompts.
(main): Remove uses of old `force' option member.
2000-09-03 14:36:50 +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 b1bf91b67d correct description of unlink_dest_after_failed_open 2000-09-03 13:56:15 +00:00
Jim Meyering e2a422b8ef comment 2000-09-03 13:18:22 +00:00
Jim Meyering 81ab1beb52 Use strcoll (not strcmp) when comparing file names. 2000-09-03 13:06:41 +00:00
Jim Meyering c199939348 (struct cp_options) [force]: Remove member.
[unlink_dest_before_opening]: Add member.
[unlink_dest_after_failed_open]: Add member.
2000-09-03 13:04:44 +00:00
Jim Meyering 76685fb1e9 (same_file_ok): New function, extracted from copy_internal,
and partially rewritten.
(copy_internal): Unlink destination file when unlink_dest_before_opening
option is set, and when the source is neither a regular file nor a directory.
2000-09-03 13:01:49 +00:00
Jim Meyering 3e8dff57b2 *** empty log message *** 2000-09-02 09:44:47 +00:00
Jim Meyering 1207fe6788 *** empty log message *** 2000-09-02 09:32:01 +00:00
Jim Meyering 24946d8604 *** empty log message *** 2000-09-02 09:30:03 +00:00
Jim Meyering aa8f9f7e67 *** empty log message *** 2000-09-02 09:28:31 +00:00
Jim Meyering 9136c97143 *** empty log message *** 2000-09-02 09:08:31 +00:00
Jim Meyering 976d5c8a3f add basic test 2000-09-02 07:55:32 +00:00
Jim Meyering 3b023926b1 *** empty log message *** 2000-08-30 07:58:05 +00:00
Jim Meyering 048aa98ba8 Merge in changes from GNU libc. 2000-08-30 07:58:01 +00:00
Jim Meyering 3c5e612fce declare __fpending only if necessary 2000-08-28 14:55:18 +00:00
Jim Meyering 92452ed0a0 check for __fpending declaration 2000-08-28 14:53:10 +00:00
Jim Meyering edc1ebe9e7 include stdio_ext.h 2000-08-28 14:50:37 +00:00
Jim Meyering 96719d7999 *** empty log message *** 2000-08-27 09:50:08 +00:00
Jim Meyering 739185ba74 . 2000-08-27 09:30:11 +00:00
Jim Meyering 6bf3479c9f (copy_reg): New parameters: X and NEW_DST.
Remove the SPARSE_MODE parameter.  Update caller.
Perform POSIX-mandated (for cp) open-with-O_WRONLY|O_TRUNC when
the regular destination file exists;  upon failure, unlink
that existing file, then open again, but with O_WRONLY|O_CREAT.
(copy_internal): `force' in not related to interactive; remove
the conjunct.
Remove the entire `else if (x->force)' block;  justifying
removal of the non-directory part is easy:  POSIX requires we try
to open an existing regular file, so we can't unlink it beforehand.
The part that changes the mode on a directory to allow overwriting
isn't necessary.
2000-08-27 09:30:00 +00:00
Jim Meyering 2c8881fa4e (copy_internal): Set `new_dst' when the move_mode rename fails,
since we then unlink the destination file.
2000-08-27 08:46:21 +00:00
Jim Meyering a246888987 (copy_reg): Rename two goto labels. 2000-08-27 08:33:35 +00:00
Jim Meyering 5f4e35a42a . 2000-08-26 22:24:50 +00:00
Jim Meyering 004fa32b78 (usage): --force is independent of --interactive. 2000-08-26 22:24:31 +00:00
Jim Meyering b679f078af . 2000-08-26 15:40:01 +00:00
Jim Meyering 64c38128cb . 2000-08-26 15:39:39 +00:00
Jim Meyering 47ffae51d2 *** empty log message *** 2000-08-26 12:05:55 +00:00
Jim Meyering dc93e67305 Include "__fpending.h".
(close_stdout_status): Return right away if there's nothing to flush.
2000-08-26 12:05:50 +00:00
Jim Meyering 04b3f8c73f *** empty log message *** 2000-08-26 12:04:46 +00:00
Jim Meyering 15da58e940 *** empty log message *** 2000-08-26 12:04:13 +00:00
Jim Meyering 2c45ec8870 (noinst_HEADERS): Add __fpending.h. 2000-08-26 12:04:01 +00:00
Jim Meyering b0a76138e8 *** empty log message *** 2000-08-26 11:59:55 +00:00
Jim Meyering f48d309e1f *** empty log message *** 2000-08-26 11:58:08 +00:00
Jim Meyering 9f29c127ad Use jm_FUNC_FPENDING. 2000-08-26 11:56:54 +00:00
Jim Meyering 4edc4fdd20 *** empty log message *** 2000-08-26 11:56:20 +00:00
Jim Meyering bf25ff5686 *** empty log message *** 2000-08-26 11:55:12 +00:00
Jim Meyering 5dee541de5 *** empty log message *** 2000-08-26 11:46:21 +00:00
Jim Meyering 9ca4b0ce4c *** empty log message *** 2000-08-26 11:44:00 +00:00
Jim Meyering 86d77d28f6 *** empty log message *** 2000-08-26 11:26:11 +00:00
Jim Meyering 5fec9dcd63 *** empty log message *** 2000-08-26 11:25:48 +00:00
Jim Meyering 5cd332146d *** empty log message *** 2000-08-25 07:43:45 +00:00
Jim Meyering f35a629b10 *** empty log message *** 2000-08-25 07:39:22 +00:00