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

Put CTerm_Version into bbs.mods

parent f4a6f610
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,8 @@
*/
load("sbbsdefs.js");
if(this.CTerm_Version==undefined)
js.global.CTerm_Version=null;
if(bbs.mods.CTerm_Version==undefined)
bbs.mods.CTerm_Version=null;
loadfont();
function loadfont()
......@@ -71,7 +71,7 @@ function loadfont()
// Check if it's CTerm and supports font loading...
var ver=new Array(0,0);
if(CTerm_Version == undefined || CTerm_Version == null) {
if(bbs.mods.CTerm_Version == undefined || bbs.mods.CTerm_Version == null) {
// Disable parsed input... we need to do ESC processing ourselves here.
var oldctrl=console.ctrlkey_passthru;
console.ctrlkey_passthru=-1;
......@@ -92,14 +92,14 @@ function loadfont()
// alert("Response: "+printable);
if(response.substr(0,21) != "\x1b[=67;84;101;114;109;") { // Not CTerm
CTerm_Version=0;
bbs.mods.CTerm_Version=0;
console.ctrlkey_passthru=oldctrl;
if(showprogress)
writeln("Not detected.");
return(0);
}
if(response.substr(-1) != "c") { // Not a DA
CTerm_Version=0;
bbs.mods.CTerm_Version=0;
console.ctrlkey_passthru=oldctrl;
if(showprogress)
writeln("Not detected.");
......@@ -107,12 +107,12 @@ function loadfont()
}
var version=response.substr(21);
version=version.replace(/c/,"");
CTerm_Version=version;
bbs.mods.CTerm_Version=version;
ver=version.split(/;/);
console.ctrlkey_passthru=oldctrl;
}
else {
ver=CTerm_Version.split(/;/);
ver=bbs.mods.CTerm_Version.split(/;/);
if(parseInt(ver[0]) < 1 || (parseInt(ver[0])==1 && parseInt(ver[1]) < 61)) {
// Too old for dynamic fonts
if(showprogress)
......
......@@ -2,8 +2,8 @@
// Pass the desired fotn slot on the command line
// If nothing passed, changes to font 0 (CP437)
if(this.CTerm_Version==undefined)
js.global.CTerm_Version=null;
if(bbs.mods.CTerm_Version==undefined)
bbs.mods.CTerm_Version=null;
pickfont();
function pickfont()
......@@ -22,7 +22,7 @@ function pickfont()
// Check if it's CTerm and supports font loading...
var ver=new Array(0,0);
if(CTerm_Version==undefined || CTerm_Version==null) {
if(bbs.mods.CTerm_Version==undefined || bbs.mods.CTerm_Version==null) {
if(detect) {
// Disable parsed input... we need to do ESC processing ourselves here.
var oldctrl=console.ctrlkey_passthru;
......@@ -44,24 +44,24 @@ function pickfont()
// alert("Response: "+printable);
if(response.substr(0,21) != "\x1b[=67;84;101;114;109;") { // Not CTerm
CTerm_Version=0;
bbs.mods.CTerm_Version=0;
console.ctrlkey_passthru=oldctrl;
return(0);
}
if(response.substr(-1) != "c") { // Not a DA
CTerm_Version=0;
bbs.mods.CTerm_Version=0;
console.ctrlkey_passthru=oldctrl;
return(0);
}
var version=response.substr(21);
version=version.replace(/c/,"");
CTerm_Version=version;
bbs.mods.CTerm_Version=version;
ver=version.split(/;/);
console.ctrlkey_passthru=oldctrl;
}
}
else {
ver=CTerm_Version.split(/;/);
ver=bbs.mods.CTerm_Version.split(/;/);
if(parseInt(ver[0]) < 1 || (parseInt(ver[0])==1 && parseInt(ver[1]) < 61)) {
// Too old for dynamic fonts
return(0);
......
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