# HG changeset patch # User anatofuz # Date 1583141345 -32400 # Node ID 582f538160d8ef761cad3bc13fcb8ac4ab398cea # Parent 1fb6c09db515ffa25c500efe8f922974974a8532 ... diff -r 1fb6c09db515 -r 582f538160d8 src/impl/ConsoleIO.cbc --- a/src/impl/ConsoleIO.cbc Mon Mar 02 18:16:50 2020 +0900 +++ b/src/impl/ConsoleIO.cbc Mon Mar 02 18:29:05 2020 +0900 @@ -34,7 +34,7 @@ goto io->consoleread(__code next(...)); } -__code consoleread(struct ConsoleIO* IO, struct inode* ip, char* dst, int n, __code next(...)) { +__code consoleread(struct ConsoleIO* io, struct inode* ip, char* dst, int n, __code next(...)) { uint target; iunlock(ip); @@ -43,12 +43,12 @@ acquire(&input.lock); if (n > 0) { - goto IO->consoleread2(IO, n, ip, target, dst, ip, next); + goto io->consoleread2(io, n, ip, target, dst, ip, next); } - goto IO->consoleread1(IO, n, target, dst, ip, next); + goto io->consoleread1(io, n, target, dst, ip, next); } -__code consoleread1(struct ConsoleIO* IO, int n, int target, char* dst, struct inode* ip, __code next(...)) { +__code consoleread1(struct ConsoleIO* io, int n, int target, char* dst, struct inode* ip, __code next(...)) { int c = input.buf[input.r++ % INPUT_BUF]; if (c == C('D')) { // EOF @@ -79,7 +79,7 @@ goto next(target - n); } -__code consoleread2(struct ConsoleIO* IO, struct inode* ip, __code next(...)) { +__code consoleread2(struct ConsoleIO* io, struct inode* ip, __code next(...)) { if (input.r == input.w) { // input is global variable if (proc->killed) { release(&input.lock); @@ -88,7 +88,7 @@ } goto cbc_sleep(&input.r, &input.lock, cbc_consoleread2); } - goto IO->consoleread1(); + goto io->consoleread1(); } diff -r 1fb6c09db515 -r 582f538160d8 src/impl/ConsoleIO.h --- a/src/impl/ConsoleIO.h Mon Mar 02 18:16:50 2020 +0900 +++ b/src/impl/ConsoleIO.h Mon Mar 02 18:29:05 2020 +0900 @@ -1,6 +1,6 @@ typedef struct ConsoleIO impl IO { - __code consoleread(Type* IO, struct inode* ip, char* dst, int n, __code next(...)); - __code consoleread1(Type* IO, int n, int target, char* dst, struct inode* ip, __code next(...)); - __code consoleread2(Type* IO, struct inode* ip, __code next(...)); + __code consoleread(Type* io, struct inode* ip, char* dst, int n, __code next(...)); + __code consoleread1(Type* io, int n, int target, char* dst, struct inode* ip, __code next(...)); + __code consoleread2(Type* io, struct inode* ip, __code next(...)); __code next(....); } ConsoleIO;