From 890f585f35cdf218b7ea94d4382e503e147f23a0 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Sat, 14 Nov 2015 07:00:08 +0000
Subject: [PATCH] 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.

---
 exec/dorkit/jsexec_console.js | 3 ++-
 exec/dorkit/jsexec_input.js   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec/dorkit/jsexec_console.js b/exec/dorkit/jsexec_console.js
index ed2e877815..717492975e 100644
--- a/exec/dorkit/jsexec_console.js
+++ b/exec/dorkit/jsexec_console.js
@@ -1,5 +1,6 @@
 load("ansi_console.js");
 
 dk.console.remote_io.print = function(string) {
-	write(string);
+	stdout.write(string);
+	stdout.flush();
 };
diff --git a/exec/dorkit/jsexec_input.js b/exec/dorkit/jsexec_input.js
index 833d3db3d9..2d6b842d1a 100644
--- a/exec/dorkit/jsexec_input.js
+++ b/exec/dorkit/jsexec_input.js
@@ -6,6 +6,6 @@ var k;
 while(!js.terminated) {
 	if (parent_queue.poll(0))
 		break;
-	k = read(1);
+	k = stdin.read(1);
 	ai.add(k);
 }
-- 
GitLab