Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in error message when unexpected attribute #43

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions historical/tn3270-with-whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -101849,11 +101849,11 @@ tr(Xo, No, []),
this.mn = n;
break;
case 65:
if ((0 !== n && (i = n - 240), 3 == i || i > 4 || i < 0)) return Za.warn("Unexpected invaild attribute type=0x" + Uh(n)), { code: "753", type: "ext_highlingting", status: !1, gs: "1003" };
if ((0 !== n && (i = n - 240), 3 == i || i > 4 || i < 0)) return Za.warn("Unexpected invalid attribute type=0x" + Uh(n)), { code: "753", type: "ext_highlingting", status: !1, gs: "1003" };
this.wn = n;
break;
case 66:
if ((0 !== n && (i = n - 240), i > 15 || i < 0)) return Za.warn("Unexpected invaild attribute type=0x" + Uh(n)), { code: "753", type: "ext_color", status: !1, gs: "1003" };
if ((0 !== n && (i = n - 240), i > 15 || i < 0)) return Za.warn("Unexpected invalid attribute type=0x" + Uh(n)), { code: "753", type: "ext_color", status: !1, gs: "1003" };
this.color = n;
break;
case 67:
Expand Down
59 changes: 29 additions & 30 deletions src/Model3270.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,27 +366,27 @@ class CharacterAttributes3270 extends CharacterAttributes { // minified as Xo
case CharacterAttributes3270.ATTRIBUTE_OUTLINING:
this.outlining = attributeValue;
break;
case CharacterAttributes3270.ATTRIBUTE_HIGHLIGHTING:
if (0 !== attributeValue){
let i = attributeValue - 240;
if (3 == i || i > 4 || i < 0){
logger.warn("Unexpected invaild attribute type=0x" +
Utils.hexString(attributeValue));
return { code: "753", type: "ext_highlingting", status: !1, gs: "1003" };
}
}
this.highlighting = attributeValue;;
break;
case CharacterAttributes3270.ATTRIBUTE_COLOR:
if (0 !== attributeValue){
let i = attributeValue - 240;
if (i > 15 || i < 0) {
logger.warn("Unexpected invaild attribute type=0x" +
Utils.hexString(attributeValue));
return { code: "753", type: "ext_color", status: !1, gs: "1003" };
}
}
this.color = attributeValue;
case CharacterAttributes3270.ATTRIBUTE_HIGHLIGHTING:
if (attributeValue !== 0) {
let i = attributeValue - 240;
if (3 == i || i > 4 || i < 0) {
logger.warn("[ATTRIBUTE_HIGHLIGHTING] Unexpected invalid attribute type=0x" + Utils.hexString(attributeValue));
attributeValue = 0;
//return { code: "753", type: "ext_highlingting", status: !1, gs: "1003" };
}
}
this.highlighting = attributeValue;;
break;
case CharacterAttributes3270.ATTRIBUTE_COLOR:
if (attributeValue !== 0) {
let i = attributeValue - 240;
if (i > 15 || i < 0) {
logger.warn("[ATTRIBUTE_COLOR] Unexpected invalid attribute type=0x" + Utils.hexString(attributeValue));
attributeValue = 0;
// return { code: "753", type: "ext_color", status: !1, gs: "1003" };
}
}
this.color = attributeValue;
break;
case CharacterAttributes3270.ATTRIBUTE_CHARSET:
this.characterSet = attributeValue;
Expand Down Expand Up @@ -3403,20 +3403,19 @@ export class VirtualScreen3270 extends PagedVirtualScreen { // minified as lc

/* Pl() wants throw up some alerts for pending errors in the screen.$s map */
Pl(){ // lc.prototype.Pl = function () {
this.$s &&
0 !== this.$s.size &&
setTimeout(() => {
this.$s.forEach((t, l) => {
alert(VirtualScreen3270.Mh[t.type]);
}),
this.$s.clear();
}, 0);
let logger = Utils.protocolLogger;
this.$s && 0 !== this.$s.size && setTimeout(() => {
this.$s.forEach((t, l) => {
logger.debug(VirtualScreen3270.Mh[t.type]);
}),
this.$s.clear();
}, 0);
}

processTN3270Command(t:any){ // (lc.prototype.Kh = function (t) {
let logger = Utils.protocolLogger;
logger.debug("Processing parsed TN3270 command. ");
console.log("JOE command is "+JSON.stringify(t));
console.log("Command is " + JSON.stringify(t));
if (t != null){
if (t.orders) logger.debug("-- Order count=" + t.orders.length);
switch ( t.key) {
Expand Down
Loading