From 600c45ab9ac6bf6a0257997d4c21d49c868ec0bb Mon Sep 17 00:00:00 2001 From: tgoodwin Date: Thu, 29 Oct 1998 14:13:51 +0000 Subject: pr_error now takes a line number offset --- utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils.c') diff --git a/utils.c b/utils.c index a139324..ded0c03 100644 --- a/utils.c +++ b/utils.c @@ -7,12 +7,12 @@ /* print error with line number on noninteractive shells (i.e., scripts) */ -extern void pr_error(char *s) { +extern void pr_error(char *s, int offset) { if (s != NULL) { if (interactive) fprint(2, "%s\n", s); else - fprint(2, "line %d: %s\n", lineno - 1, s); + fprint(2, "line %d: %s\n", lineno + offset, s); } } -- cgit v1.2.3