summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authortgoodwin <tgoodwin>1998-10-29 14:13:51 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:12 +0100
commit600c45ab9ac6bf6a0257997d4c21d49c868ec0bb (patch)
tree506e5f57b1e213103b35d2e967fc4a7e76eaf5f8 /utils.c
parent3b225b2f889a79e3b3dfef6a962e5655c91c1a96 (diff)
pr_error now takes a line number offset
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c4
1 files changed, 2 insertions, 2 deletions
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);
}
}