aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/patch/inp.c
diff options
context:
space:
mode:
authorJeffrey Hsu <hsu@FreeBSD.org>1995-01-12 22:09:40 +0000
committerJeffrey Hsu <hsu@FreeBSD.org>1995-01-12 22:09:40 +0000
commitadd65270a04a5b1d81edb41f07c9dcde8a7fa88e (patch)
tree4a908318d7f884e54582841828e1ec86e6fb35c0 /gnu/usr.bin/patch/inp.c
parent7ba7177c6e5090bc87b7aefc3db5460871981291 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/patch/inp.c')
-rw-r--r--gnu/usr.bin/patch/inp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/usr.bin/patch/inp.c b/gnu/usr.bin/patch/inp.c
index c99054f3da20b..0d0e6af719bba 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