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

Fix up load paths to avoid double slashes, each separate user of ansi_console

needs to load its own input script, give unique global names to the different
input queues.
parent 07426fec
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,3 @@ dk.console.remote_io = {
},
};
var input_queue = load(true, "jsexec_input.js");
js.on_exit("input_queue.write(''); input_queue.poll(0x7fffffff);");
......@@ -4,3 +4,6 @@ dk.console.remote_io.print = function(string) {
stdout.write(string);
stdout.flush();
};
var jsexec_input_queue = load(true, "jsexec_input.js");
js.on_exit("jsexec_input_queue.write(''); jsexec_input_queue.poll(0x7fffffff);");
js.load_path_list.unshift(js.exec_dir+"/dorkit/");
js.load_path_list.unshift(system.exec_dir+"/dorkit/");
js.load_path_list.unshift(js.exec_dir+"dorkit/");
if (js.global.system !== undefined)
js.load_path_list.unshift(system.exec_dir+"dorkit/");
load('ansi_input.js');
var k;
......
js.load_path_list.unshift(js.exec_dir+"/dorkit/");
js.load_path_list.unshift(system.exec_dir+"/dorkit/");
js.load_path_list.unshift(js.exec_dir+"dorkit/");
if (js.global.system !== undefined)
js.load_path_list.unshift(system.exec_dir+"dorkit/");
load('ansi_input.js');
var q = new Queue("dorkit_input");
var k;
......
load("ansi_console.js");
dk.console.remote_io.sock = new Socket(true, dk.connection.socket);
if (!dk.console.remote_io.sock.is_connected)
throw("Unable to create socket object");
......@@ -7,3 +5,8 @@ if (!dk.console.remote_io.sock.is_connected)
dk.console.remote_io.print = function(string) {
this.sock.write(string.replace(/\xff/g, "\xff\xff"));
};
load("ansi_console.js");
var socket_input_queue = load(true, "socket_input.js", dk.connection.socket);
js.on_exit("socket_input_queue.write(''); socket_input_queue.poll(0x7fffffff);");
js.load_path_list.unshift(js.exec_dir+"/dorkit/");
js.load_path_list.unshift(system.exec_dir+"/dorkit/");
js.load_path_list.unshift(js.exec_dir+"dorkit/");
if (js.global.system !== undefined)
js.load_path_list.unshift(system.exec_dir+"dorkit/");
load('ansi_input.js');
var i;
var q = new Queue("dorkit_input");
......
js.load_path_list.unshift(js.exec_dir+"/dorkit/");
js.load_path_list.unshift(js.exec_dir+"dorkit/");
if (js.global.system !== undefined)
js.load_path_list.unshift(system.exec_dir+"/dorkit/");
js.load_path_list.unshift(system.exec_dir+"dorkit/");
load("screen.js");
// polyfill the String object with repeat method.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment