From ba660b99110d5d7fc018a1bdbea314be0bba98a4 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 1 May 2016 23:56:04 +0100 Subject: scriptreplay: improve error message Use human numbering for lines - that is start counting from 1. And tell in error message what the number means. Signed-off-by: Sami Kerola --- term-utils/scriptreplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'term-utils/scriptreplay.c') diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c index b4549ef16..51985cda8 100644 --- a/term-utils/scriptreplay.c +++ b/term-utils/scriptreplay.c @@ -211,7 +211,7 @@ main(int argc, char *argv[]) /* ignore the first typescript line */ while((c = fgetc(sfile)) != EOF && c != '\n'); - for(line = 0; ; line++) { + for(line = 1; ; line++) { double delay; size_t blk; char nl; @@ -223,7 +223,7 @@ main(int argc, char *argv[]) err(EXIT_FAILURE, _("failed to read timing file %s"), tname); errx(EXIT_FAILURE, - _("timings file %s: %lu: unexpected format"), + _("timing file %s: line %lu: unexpected format"), tname, line); } delay /= divi; -- cgit v1.2.3-55-g7522