|
|
@@ -366,7 +366,7 @@ Tput.prototype.parseTerminfo = function(data, file) { |
|
|
o = 0;
|
|
|
for (; i < l; i += 2) {
|
|
|
v = Tput.numbers[o++];
|
|
|
- if (data[i + 1] === 0377 && data[i] === 0377) {
|
|
|
+ if (data[i + 1] === 0xff && data[i] === 0xff) {
|
|
|
info.numbers[v] = -1;
|
|
|
} else {
|
|
|
info.numbers[v] = (data[i + 1] << 8) | data[i];
|
|
|
@@ -379,7 +379,7 @@ Tput.prototype.parseTerminfo = function(data, file) { |
|
|
o = 0;
|
|
|
for (; i < l; i += 2) {
|
|
|
v = Tput.strings[o++];
|
|
|
- if (data[i + 1] === 0377 && data[i] === 0377) {
|
|
|
+ if (data[i + 1] === 0xff && data[i] === 0xff) {
|
|
|
info.strings[v] = -1;
|
|
|
} else {
|
|
|
info.strings[v] = (data[i + 1] << 8) | data[i];
|
|
|
@@ -533,7 +533,7 @@ Tput.prototype.parseExtended = function(data) { |
|
|
var _numbers = [];
|
|
|
l = i + h.numCount * 2;
|
|
|
for (; i < l; i += 2) {
|
|
|
- if (data[i + 1] === 0377 && data[i] === 0377) {
|
|
|
+ if (data[i + 1] === 0xff && data[i] === 0xff) {
|
|
|
_numbers.push(-1);
|
|
|
} else {
|
|
|
_numbers.push((data[i + 1] << 8) | data[i]);
|
|
|
@@ -544,7 +544,7 @@ Tput.prototype.parseExtended = function(data) { |
|
|
var _strings = [];
|
|
|
l = i + h.strCount * 2;
|
|
|
for (; i < l; i += 2) {
|
|
|
- if (data[i + 1] === 0377 && data[i] === 0377) {
|
|
|
+ if (data[i + 1] === 0xff && data[i] === 0xff) {
|
|
|
_strings.push(-1);
|
|
|
} else {
|
|
|
_strings.push((data[i + 1] << 8) | data[i]);
|
|
|
@@ -884,7 +884,7 @@ Tput.prototype._compile = function(info, key, str) { |
|
|
ch = ':';
|
|
|
break;
|
|
|
case '0':
|
|
|
- ch = '\200';
|
|
|
+ ch = '\x80';
|
|
|
break;
|
|
|
case 'a':
|
|
|
ch = '\x07';
|
|
|
@@ -2098,10 +2098,10 @@ Tput.prototype.detectBrokenACS = function(info) { |
|
|
&& process.env.TERMCAP
|
|
|
&& ~process.env.TERMCAP.indexOf('screen')
|
|
|
&& ~process.env.TERMCAP.indexOf('hhII00')) {
|
|
|
- if (~info.strings.enter_alt_charset_mode.indexOf('\016')
|
|
|
- || ~info.strings.enter_alt_charset_mode.indexOf('\017')
|
|
|
- || ~info.strings.set_attributes.indexOf('\016')
|
|
|
- || ~info.strings.set_attributes.indexOf('\017')) {
|
|
|
+ if (~info.strings.enter_alt_charset_mode.indexOf('\x0e')
|
|
|
+ || ~info.strings.enter_alt_charset_mode.indexOf('\x0f')
|
|
|
+ || ~info.strings.set_attributes.indexOf('\x0e')
|
|
|
+ || ~info.strings.set_attributes.indexOf('\x0f')) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
@@ -2280,7 +2280,7 @@ function sprintf(src) { |
|
|
break;
|
|
|
case 'c': // char
|
|
|
param = isFinite(param)
|
|
|
- ? String.fromCharCode(param || 0200)
|
|
|
+ ? String.fromCharCode(param || 0x80)
|
|
|
: '';
|
|
|
break;
|
|
|
}
|
|
|
|
0 comments on commit
eab243f