Skip to content
Snippets Groups Projects
Commit 890f585f authored by deuce's avatar deuce
Browse files

Use stdin/stdout for console I/O... this allows us to call stdout.flush()

after each write so we don't require the -f option.
parent b8c28a13
Branches
Tags
No related merge requests found
load("ansi_console.js"); load("ansi_console.js");
dk.console.remote_io.print = function(string) { dk.console.remote_io.print = function(string) {
write(string); stdout.write(string);
stdout.flush();
}; };
...@@ -6,6 +6,6 @@ var k; ...@@ -6,6 +6,6 @@ var k;
while(!js.terminated) { while(!js.terminated) {
if (parent_queue.poll(0)) if (parent_queue.poll(0))
break; break;
k = read(1); k = stdin.read(1);
ai.add(k); ai.add(k);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment