From c878e4340f70f3ccafea25a9735aca259207d38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 20 Jul 2021 16:02:39 +0200 Subject: Improve error reporting --- fref.lex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fref.lex b/fref.lex index 9f58b69..0541e1e 100644 --- a/fref.lex +++ b/fref.lex @@ -215,7 +215,8 @@ harvard() /* Reset state. */ e.a = 0; #define DO(s,n,m) if(*m){ \ - fprintf(stderr, "%s: unused field %%"s" at line %d\n", \ + fprintf(stderr, "%s: unused field %%" s \ + " in reference at line %d\n", \ name, line); \ *m = 0; \ } @@ -267,7 +268,9 @@ gettrans(char *lg) } return lsv; }else{ - fprintf(stderr, "%s: invalid language %s\n", name, lg); + fprintf(stderr, "%s: unrecognized language %s" + " in reference at line %d\n", + name, lg, line); exit(1); } } -- cgit v1.2.3