diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-07-31 14:10:22 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-07-31 14:10:22 +0000 |
commit | 83c16a4e5f6e6862d561ad4a420a41a351bda93e (patch) | |
tree | f43d337397edc9d56d0bffe3ac4eff46e190f088 /usr.bin/patch/patch.c | |
parent | 87cb163f1136e08c5e634db351d78c086412b239 (diff) |
Print a maximum of one invalid line number warning per patch in a patch file.
Thanks to espie@ for spotting the problem.
ok millert@ henning@ espie@
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r-- | usr.bin/patch/patch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index b88036cb324..5415ad2acf1 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: patch.c,v 1.32 2003/07/30 16:45:44 millert Exp $ */ +/* $OpenBSD: patch.c,v 1.33 2003/07/31 14:10:21 otto Exp $ */ /* * patch - a program to apply diffs to original files @@ -27,7 +27,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: patch.c,v 1.32 2003/07/30 16:45:44 millert Exp $"; +static const char rcsid[] = "$OpenBSD: patch.c,v 1.33 2003/07/31 14:10:21 otto Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -68,6 +68,7 @@ char *TMPREJNAME; char *TMPPATNAME; bool toutkeep = FALSE; bool trejkeep = FALSE; +bool warn_on_invalid_line; #ifdef DEBUGGING int debug = 0; @@ -210,6 +211,7 @@ main(int argc, char *argv[]) /* for each patch in patch file */ patch_seen = TRUE; + warn_on_invalid_line = TRUE; if (outname == NULL) outname = savestr(filearg[0]); |