diff options
| author | tgoodwin <tgoodwin> | 1998-10-29 14:13:51 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:12 +0100 |
| commit | 600c45ab9ac6bf6a0257997d4c21d49c868ec0bb (patch) | |
| tree | 506e5f57b1e213103b35d2e967fc4a7e76eaf5f8 /utils.c | |
| parent | 3b225b2f889a79e3b3dfef6a962e5655c91c1a96 (diff) | |
pr_error now takes a line number offset
Diffstat (limited to 'utils.c')
| -rw-r--r-- | utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } } |