diff options
| author | tjg <tjg> | 2001-10-12 10:22:05 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:20 +0100 |
| commit | 692977070514082a226f256e8df7dfea33b31bc2 (patch) | |
| tree | 7f9151d86255611ffb88dc0f39a854476337cdd9 /lex.c | |
| parent | f5e2a8522f34b56018b77520738fb15fab083ee6 (diff) | |
fix a few more warnings
Diffstat (limited to 'lex.c')
| -rw-r--r-- | lex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -321,13 +321,13 @@ extern void yyerror(const char *s) { if (!interactive) { if (w != NW) tok = realbuf; - else if (last == EOF) + else if (lastchar == EOF) tok = "eof"; - else if (last == '\n') + else if (lastchar == '\n') tok = "end of line"; else - tok = nprint((last < 32 || last > 126) ? "(decimal %d)" : "'%c'", last); - fprint(2, "line %d: %s near %s\n", lineno - (last == '\n'), s, tok); + tok = nprint((lastchar < 32 || lastchar > 126) ? "(decimal %d)" : "'%c'", lastchar); + fprint(2, "line %d: %s near %s\n", lineno - (lastchar == '\n'), s, tok); } else fprint(2, "%s\n", s); } |