Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs

This commit is contained in:
Bryan Ashby 2016-09-04 11:43:25 -06:00
commit 2584fa24e4
3 changed files with 18 additions and 13 deletions

View File

@ -49,7 +49,7 @@ function getFontNameFromSAUCE(sauce) {
function sliceAtEOF(data, eofMarker) { function sliceAtEOF(data, eofMarker) {
let eof = data.length; let eof = data.length;
const stopPos = Math.max(data.length - (256), 0); // 256 = 2 * sizeof(SAUCE) const stopPos = Math.max(data.length - (256), 0); // 256 = 2 * sizeof(SAUCE)
for(let i = eof - 1; i > stopPos; i--) { for(let i = eof - 1; i > stopPos; i--) {
if(eofMarker === data[i]) { if(eofMarker === data[i]) {
eof = i; eof = i;
@ -256,16 +256,17 @@ function display(client, art, options, cb) {
let mciMap; let mciMap;
const mciCprQueue = []; const mciCprQueue = [];
let artHash; let artHash;
let mciMapFromCache;
function completed() { function completed() {
if(cprListener) { if(cprListener) {
client.removeListener('cursor position report', cprListener); client.removeListener('cursor position report', cprListener);
} }
if(!options.disableMciCache) { if(!options.disableMciCache && !mciMapFromCache) {
// cache our MCI findings... // cache our MCI findings...
client.mciCache[artHash] = mciMap; client.mciCache[artHash] = mciMap;
client.log.trace( { artHash : artHash, mciMap : mciMap }, 'Added MCI map from cache'); client.log.trace( { artHash : artHash, mciMap : mciMap }, 'Added MCI map to cache');
} }
ansiParser.removeAllListeners(); // :TODO: Necessary??? ansiParser.removeAllListeners(); // :TODO: Necessary???
@ -288,6 +289,7 @@ function display(client, art, options, cb) {
} }
if(mciMap) { if(mciMap) {
mciMapFromCache = true;
client.log.trace( { artHash : artHash, mciMap : mciMap }, 'Loaded MCI map from cache'); client.log.trace( { artHash : artHash, mciMap : mciMap }, 'Loaded MCI map from cache');
} else { } else {
// no cached MCI info // no cached MCI info

View File

@ -59,16 +59,19 @@
} }
} }
"menuCommand" : { menuCommand: {
art: MNUPRMT art: MNUPRMT
"mci" : { mci: {
"ET2" : { TL1: {
"argName" : "command", // theme me!
"width" : 20, }
"maxLength" : 20, ET2: {
"submit" : true, argName: command
"textStyle" : "U", width: 20
"focus" : true maxLength: 20
submit: true
textStyle: upper
focus: true
} }
} }
}, },

View File

@ -32,7 +32,7 @@
"temp": "^0.8.3", "temp": "^0.8.3",
"inquirer" : "^1.1.0", "inquirer" : "^1.1.0",
"fs-extra" : "0.26.x", "fs-extra" : "0.26.x",
"farmhash" : "^1.2.0" "farmhash" : "^1.2.1"
}, },
"engines": { "engines": {
"node": ">=4.2.0" "node": ">=4.2.0"