diff --git a/gnu/usr.bin/patch/inp.c b/gnu/usr.bin/patch/inp.c index c99054f3da20..0d0e6af719bb 100644 --- a/gnu/usr.bin/patch/inp.c +++ b/gnu/usr.bin/patch/inp.c @@ -1,6 +1,9 @@ -/* $Header: inp.c,v 2.0.1.1 88/06/03 15:06:13 lwall Locked $ +/* $Header: /home/ncvs/src/gnu/usr.bin/patch/inp.c,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ + * + * $Log: inp.c,v $ + * Revision 1.1.1.1 1993/06/19 14:21:52 paul + * b-maked patch-2.10 * - * $Log: inp.c,v $ * Revision 2.0.1.1 88/06/03 15:06:13 lwall * patch10: made a little smarter about sccs files * @@ -81,15 +84,21 @@ char *filename; Reg2 LINENUM iline; char lbuf[MAXLINELEN]; int output_elsewhere = strcmp(filename, outname); + extern int check_patch; statfailed = stat(filename, &filestat); if (statfailed && ok_to_create_file) { if (verbose) say2("(Creating file %s...)\n",filename); + if (check_patch) + return TRUE; makedirs(filename, TRUE); close(creat(filename, 0666)); statfailed = stat(filename, &filestat); } + if (statfailed && check_patch) { + fatal2("%s not found and in check_patch mode.", filename); + } /* For nonexistent or read-only files, look for RCS or SCCS versions. */ if (statfailed || (! output_elsewhere diff --git a/gnu/usr.bin/patch/patch.c b/gnu/usr.bin/patch/patch.c index 626c4535233a..c34ca83330d8 100644 --- a/gnu/usr.bin/patch/patch.c +++ b/gnu/usr.bin/patch/patch.c @@ -1,5 +1,5 @@ char rcsid[] = - "$Header: /home/cvs/386BSD/src/gnu/usr.bin/patch/patch.c,v 1.3 1994/02/17 22:20:34 jkh Exp $"; + "$Header: /home/ncvs/src/gnu/usr.bin/patch/patch.c,v 1.4 1994/02/25 21:46:04 phk Exp $"; /* patch - a program to apply diffs to original files * @@ -9,6 +9,9 @@ char rcsid[] = * money off of it, or pretend that you wrote it. * * $Log: patch.c,v $ + * Revision 1.4 1994/02/25 21:46:04 phk + * added the -C/-check again. + * * Revision 1.3 1994/02/17 22:20:34 jkh * Put this back - I was somehow under the erroneous impression that patch was in * ports, until I saw the the commit messages, that is! :-) All changed backed out. @@ -135,7 +138,7 @@ static int remove_empty_files = FALSE; static int reverse_flag_specified = FALSE; /* TRUE if -C was specified on command line. */ -static int check_patch = FALSE; +int check_patch = FALSE; /* Apply a set of diffs as appropriate. */