Lines Matching defs:to
4 * patch - a program to apply diffs to original files
49 move_file(const char *from, const char *to)
54 /* to stdout? */
56 if (strEQ(to, "-")) {
59 say("Moving %s to stdout.\n", from);
70 if (backup_file(to) < 0) {
71 say("Can't backup %s, output is in %s: %s\n", to, from,
77 say("Moving %s to %s.\n", from, to);
79 if (rename(from, to) == -1) {
80 if (errno != EXDEV || copy_file(from, to) < 0) {
82 to, from, strerror(errno));
100 return 0; /* nothing to do */
139 say("Moving %s to %s.\n", orig, bakname);
152 copy_file(const char *from, const char *to)
157 tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
165 pfatal("write to %s failed", to);
282 * How to handle certain events when not in a critical region.
302 * How to handle certain events when in a critical region.
312 * Make sure we'll have the directories to create a file. If `striplast' is
328 return; /* nothing to be done */
361 /* Strip off up to `strip_leading' path components and NUL terminate. */