From 3297ca7f3a3313e80e49547c857e1593286316b8 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 31 May 2020 14:53:10 -0700 Subject: minor changes --- sys/cmd/cc/lex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/cmd/cc/lex.c') diff --git a/sys/cmd/cc/lex.c b/sys/cmd/cc/lex.c index 97e19e4..1396358 100644 --- a/sys/cmd/cc/lex.c +++ b/sys/cmd/cc/lex.c @@ -32,7 +32,6 @@ Io* openio(Lexer *lx, byte *path) { string *it, *end; - Stream *f; intern(&path); @@ -441,7 +440,7 @@ Dispatch: else { r = v; b = utf8·runelen(r); - utf8·runetochar(lx->buf, &r); + utf8·runetobyte(lx->buf, &r); str·appendlen(&s, b, lx->buf); } } @@ -725,7 +724,7 @@ Dispatch: if (!utf8·isletter(r) && !utf8·isdigit(r) && r != 0xb7) { errorat(lx->pos, "invalid identifier character %d", r); } - s += utf8·runetochar(s, &r); + s += utf8·runetobyte(s, &r); } else if (!isalnum(b) && b != '_') break; else @@ -778,6 +777,7 @@ Return: Nospace: panicf("aborting compilation"); + exit(1); } #undef CASE4 -- cgit v1.2.1