aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/cc/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/cc/lex.c')
-rw-r--r--sys/cmd/cc/lex.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/cmd/cc/lex.c b/sys/cmd/cc/lex.c
index 4cc1259..7a08373 100644
--- a/sys/cmd/cc/lex.c
+++ b/sys/cmd/cc/lex.c
@@ -28,7 +28,7 @@ puttok(Token tok)
int
getbyte(Lexer *lx)
{
- return bufio·getbyte(&lx->io->buf);
+ return bufio·getbyte(&lx->io->rdr);
}
int
@@ -58,20 +58,20 @@ getnsbyte(Lexer *lx)
rune
getrune(Lexer *lx)
{
- return bufio·getrune(&lx->io->buf);
+ return bufio·getrune(&lx->io->rdr);
}
byte
ungetbyte(Lexer *lx)
{
byte b;
- return bufio·ungetbyte(&lx->io->buf, b);
+ return bufio·ungetbyte(&lx->io->rdr, b);
}
rune
ungetrune(Lexer *l, rune r)
{
- return bufio·ungetrune(&l->io->buf, r);
+ return bufio·ungetrune(&l->io->rdr, r);
}
// -----------------------------------------------------------------------
@@ -637,9 +637,8 @@ Dispatch:
sym = lookup(&lx->sym, tok.val.s);
if (sym && ((uintptr)sym->name != (uintptr)lx->io->path)) {
io = makeio(sym->name);
- printf("EXPANDING MACRO %s\n", sym->name);
- io->buf.end += expandmacro(lx, sym, io->b);
- *io->buf.end++ = EOF;
+ io->rdr.end += expandmacro(lx, sym, io->b);
+ *io->rdr.end++ = EOF;
pushio(lx, io);
goto GetByte;
}