diff options
Diffstat (limited to 'sys/cmd/cc/cc.c')
-rw-r--r-- | sys/cmd/cc/cc.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/cmd/cc/cc.c b/sys/cmd/cc/cc.c index 00cd4a5..cb37af4 100644 --- a/sys/cmd/cc/cc.c +++ b/sys/cmd/cc/cc.c @@ -113,8 +113,6 @@ openio(byte *path) // TODO: See if we have already loaded the file // - printf("OPENING PATH %s\n", path); - if ((C.io - C.iostk) >= arrlen(C.iostk)-1) panicf("out of I/O space!"); @@ -124,7 +122,7 @@ openio(byte *path) C.io->kind = IOfile; C.io->path = path; - bufio·initreader(&C.io->buf, asrdr(io·read), C.io->f); + bufio·initreader(&C.io->rdr, asrdr(io·read), C.io->f); return C.io++; } @@ -136,16 +134,16 @@ makeio(byte *name) panicf("out of I/O space!"); C.io->path = name; - C.io->buf = (io·Buffer) { + C.io->rdr = (io·Buffer) { .state = bufio·rdr | bufio·end, .runesize = 0, .h = nil, .size = bufio·size, - .beg = C.io->buf.buf + bufio·ungets, - .pos = C.io->buf.buf + bufio·ungets, - .end = C.io->buf.buf + bufio·ungets, + .beg = C.io->rdr.buf + bufio·ungets, + .pos = C.io->rdr.buf + bufio·ungets, + .end = C.io->rdr.buf + bufio·ungets, }; - C.io->b = C.io->buf.beg; + C.io->b = C.io->rdr.beg; return C.io++; } @@ -158,7 +156,7 @@ freeio(Io *io) io·close(io->f); } - io->buf.state = 0; + io->rdr.state = 0; io->kind = 0; io->link = nil; io->path = nil; |