summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/inp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/inp.c')
-rw-r--r--usr.bin/patch/inp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index 9e81fd9b2be..77ad4b66cb3 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: inp.c,v 1.20 2003/07/28 19:15:34 deraadt Exp $ */
+/* $OpenBSD: inp.c,v 1.21 2003/07/31 14:10:21 otto Exp $ */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: inp.c,v 1.20 2003/07/28 19:15:34 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: inp.c,v 1.21 2003/07/31 14:10:21 otto Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -329,7 +329,10 @@ char *
ifetch(LINENUM line, int whichbuf)
{
if (line < 1 || line > input_lines) {
- say("No such line %ld in input file, ignoring\n", line);
+ if (warn_on_invalid_line) {
+ say("No such line %ld in input file, ignoring\n", line);
+ warn_on_invalid_line = FALSE;
+ }
return NULL;
}
if (using_plan_a)