diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-20 16:02:39 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-21 11:19:55 +0200 |
commit | c878e4340f70f3ccafea25a9735aca259207d38b (patch) | |
tree | 5d6357ad0e73287c84ea15ce0a9eeabe49d34591 | |
parent | ea968820ef31dc77eae9b4219ae5930b34f6d0bd (diff) | |
download | fref-c878e4340f70f3ccafea25a9735aca259207d38b.tar.gz |
Improve error reporting
-rw-r--r-- | fref.lex | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); } } |