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

Modify to allow global vars to be maintained between xjs_load()s.

Add xjs_compile() function.
parent da65f0b9
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,7 @@ var cwd='';
xjs_load(xjs_filename);
function xjs_load(filename) {
var old_cwd=cwd;
function xjs_compile(filename) {
if(cwd != '') {
if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1)
filename=cwd+filename;
......@@ -92,12 +91,17 @@ function xjs_load(filename) {
f.close();
}
}
load(ssjs_filename);
cwd=old_cwd;
return(ssjs_filename);
function escape_quotes(arg) {
return("'"+arg.replace(/'/g,"'+"+'"'+"'"+'"+'+"'")+"'");
}
}
function xjs_load(filename)
{
var old_cwd=cwd;
load(xjs_compile(filename));
cwd=old_cwd;
}
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