summaryrefslogtreecommitdiff
path: root/src/cp.c
AgeCommit message (Collapse)Author
1998-05-11reflect additional parameter to copyJim Meyering
initialize new member: move_mode.
1998-05-10(cp_option_init): Likewise.Jim Meyering
(main): Set new preserve_* options.
1998-04-26Don't define NDEBUG.Jim Meyering
1998-03-13(do_copy): Add unused arg in calls to copy.Jim Meyering
1998-01-25(re_protect): Don't fail for non-root when chown fails dueJim Meyering
not only to lack of permission (EPERM), but also to lack of support (EINVAL). Reported by Bengt Martensson.
1998-01-22(do_copy): Add unreachable `return 0' to stifle warning.Jim Meyering
1998-01-22[NDEBUG]: Comment out definition.Jim Meyering
(do_copy): Use x->backup_type, not the global.
1998-01-04(main, usage): Check for write error to stdout before exiting.Jim Meyering
Include "closeout.h".
1997-10-25Remove old-style xmalloc and xrealloc decls.Jim Meyering
1997-10-23Remove stpcpy decl.Jim Meyering
1997-10-07update bug-reporting addressJim Meyering
1997-10-06(cp_option_init): Initialize it.Jim Meyering
(main): Set to 1 for -a and for -p.
1997-07-06declare stpcpyJim Meyering
1997-05-27Use base_name, not basename.Jim Meyering
Use X, not CP_OPTIONS.
1997-02-27(re_protect): When there is any potential for ambiguity in a diagnostic,Jim Meyering
give explanatory diagnostic in addition to file name.
1997-02-02Gutted code -- pieces are in copy.[ch].Jim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.
1997-01-26(is_ancestor): Add it.Jim Meyering
1996-12-18(ROOT_CHOWN_AFFECTS_SYMLINKS): New macro.Jim Meyering
(DO_CHOWN): Take an additional parameter. (LINK_CHOWN): Remove macro. (copy): When preserving owner and group of a symlink, use chown only if ROOT_CHOWN_AFFECTS_SYMLINKS and EUID == 0. Otherwise, the chown would affect the file referenced through the symlink.
1996-11-23(copy): With -i and not -f, prompt for any type ofJim Meyering
(non-directory) source file before overwriting an existing target. Reported by Mark A. Thomas.
1996-10-05(main): update --version output to conform to coding standardJim Meyering
1996-10-04(main): update --version output to conform to coding standardJim Meyering
1996-09-30(do_copy): Give better error message when copying multipleJim Meyering
files and the last one is not a directory. From Karl Berry. Call error (0, 0, ... then usage (1) -- instead of calling usage with two arguments.
1996-09-10(do_copy): Describe in a little *more* detail the codeJim Meyering
that makes `cp non-directory file/' (eventually) fail.
1996-09-10(do_copy): Describe in a little more detail the codeJim Meyering
that makes `cp non-directory file/' (eventually) fail.
1996-09-08(do_copy): Set backup_type to `none' only *after*Jim Meyering
calling to find_backup_file_name. Reported by Eli Zaretskii.
1996-09-05(do_copy): When concatenating DEST (with a trailing `/') and the basenameJim Meyering
part of non-directory SOURCE, don't add a slash between them.
1996-08-19Include path-concat.h.Jim Meyering
(do_copy): Check path_concat return value. (path_concat): Remove function.
1996-07-31(DO_CHOWN): New macro -- derived from code in copy.Jim Meyering
(copy): Use DO_CHOWN to assure that any newly-created symbolic links have proper owner and group.
1996-07-20(path_concat): Rewrite to return new parameter.Jim Meyering
(do_copy): Update uses of path_concat to use new parameter. Use that new pointer to compute correct offset for make_path_private. Before, cp --recursive --parents SRC DEST failed when SRC was an absolute file name. E.g., % cd /tmp; rm -rf d f; mkdir d; touch f; cp -PR /tmp/f d cp: tmp: No such file or directory Reported by Horst von Brand vonbrand@sleipnir.valparaiso.cl.
1996-06-23Add comma after e.g. in comment.Jim Meyering
From Karl B.
1996-06-19(copy_reg): Cast both sides of comparison to size_t to avoid warningJim Meyering
about `comparison between signed and unsigned' from gcc -Wall.
1996-06-19(do_copy): Use STREQ here instead of strcmp(...) == 0.Jim Meyering
Declare pointer parameters const as appropriate.
1996-06-19(do_copy): Change message from `missing file argument' toJim Meyering
more precise `missing destination file'. From Karl Berry.
1996-06-19(do_copy): When the force and backup options have beenJim Meyering
specified and the source and destination are the same name for an existing, regular file, convert the user's command, e.g. `cp --force --backup foo foo' to `cp --force foo fooSUFFIX' where SUFFIX is determined by any version control options used. At urging of (most recently) Karl Berry.
1996-04-24update Copyright years for 1996Jim Meyering
1996-04-24[HAVE_LCHOWN]: Define chown to lchown.Jim Meyering
1996-04-21Remove obsolete FIXME.Jim Meyering
1996-04-19(copy_reg): Rearrange arithmetic in conditional to avoidJim Meyering
integer overflow with large files.
1996-04-03(copy_reg): Use `ST_NBLOCKS (sb) * 512', not `sb.st_blocks *Jim Meyering
DEV_BSIZE.' From H.J. Lu (hjl@lucon.org).
1996-04-03Include assert.h (disabled).Jim Meyering
(path_concat): New function. (do_copy): Use path_concat instead of open-coding part of its functionality in two places. This has the additional benefit of avoiding forming destination names like `D//file' when the destination directory D includes a trailing slash -- as would happen when cp is used like this: mkdir D; touch file D/file; cp -i file D/ Reported by François Pinard.
1996-03-24Update FSF's address.Jim Meyering
1996-03-21(main): Declare to be of type int, not void.Jim Meyering
1996-03-16Don't include version.h.Jim Meyering
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-12(main): Initialize for internationalized message support: call setlocale,Jim Meyering
bindtextdomain, and textdomain.
1996-03-09(copy): Comment change to avoid overwriting source with backup.Jim Meyering
1996-02-16(copy): Detect (and fail) when creating backup file would destroy source.Jim Meyering
Reported by Martin C. Martin <mcm@cs.cmu.edu>.
1995-12-22(main): Accept new option, --sparse={never,auto,always},Jim Meyering
to control creation of sparse files. (copy_reg): Set local, make_holes, from global flag_sparse. Include argmatch.h.
1995-11-29Mark all translatable strings using po-mode.el.Jim Meyering
1995-11-27s/non-zero/nonzero/gJim Meyering