From: Sami Kerola Date: Sun, 1 May 2016 22:56:04 +0000 (+0100) Subject: scriptreplay: improve error message X-Git-Tag: v2.29-rc1~259 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba660b99110d5d7fc018a1bdbea314be0bba98a4;p=thirdparty%2Futil-linux.git 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 --- diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c index b4549ef16e..51985cda8f 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;