summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
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);
}
}