html: add zmodem.js patch

This commit is contained in:
Shuanglei Tao
2022-11-03 01:29:01 +08:00
parent 048246dfe2
commit eca54c728a
4 changed files with 3222 additions and 3176 deletions

View File

@@ -0,0 +1,34 @@
diff --git a/src/zsession.js b/src/zsession.js
index 5f0b8f9d8afa6fba0acd6dd0477afa186f7aad9a..c7ea98e0f08c97d63d321f784a5dd8bf66888743 100644
--- a/src/zsession.js
+++ b/src/zsession.js
@@ -548,20 +548,17 @@ Zmodem.Session.Receive = class ZmodemReceiveSession extends Zmodem.Session {
if (this._got_ZFIN) {
if (this._input_buffer.length < 2) return;
- //if its OO, then set this._bytes_after_OO
- if (Zmodem.ZMLIB.find_subarray(this._input_buffer, OVER_AND_OUT) === 0) {
+ if (Zmodem.ZMLIB.find_subarray(this._input_buffer, OVER_AND_OUT) !== 0) {
+ console.warn( "PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: " + this._input_buffer.join() );
+ }
- //This doubles as an indication that the session has ended.
- //We need to set this right away so that handlers like
- //"session_end" will have access to it.
- this._bytes_after_OO = _trim_OO(this._bytes_being_consumed.slice(0));
- this._on_session_end();
+ //This doubles as an indication that the session has ended.
+ //We need to set this right away so that handlers like
+ //"session_end" will have access to it.
+ this._bytes_after_OO = _trim_OO(this._bytes_being_consumed.slice(0));
+ this._on_session_end();
- return;
- }
- else {
- throw( "PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: " + this._input_buffer.join() );
- }
+ return;
}
var parsed;

View File

@@ -60,5 +60,8 @@
"xterm-addon-web-links": "^0.7.0",
"xterm-addon-webgl": "^0.13.0",
"zmodem.js": "^0.1.10"
},
"resolutions": {
"zmodem.js@^0.1.10": "patch:zmodem.js@npm%3A0.1.10#./.yarn/patches/zmodem.js-npm-0.1.10-e5537fa2ed.patch"
}
}

View File

@@ -10584,7 +10584,7 @@ __metadata:
languageName: node
linkType: hard
"zmodem.js@npm:^0.1.10":
"zmodem.js@npm:0.1.10":
version: 0.1.10
resolution: "zmodem.js@npm:0.1.10"
dependencies:
@@ -10592,3 +10592,12 @@ __metadata:
checksum: d6cd400a4d6439b653519305518eb46a11bd0b48a744a12471c35f18b795fd253f3f6fe50247883f430b067c41b79d43f777532f728be66a8dd384df5f9d6f4f
languageName: node
linkType: hard
"zmodem.js@patch:zmodem.js@npm%3A0.1.10#./.yarn/patches/zmodem.js-npm-0.1.10-e5537fa2ed.patch::locator=ttyd%40workspace%3A.":
version: 0.1.10
resolution: "zmodem.js@patch:zmodem.js@npm%3A0.1.10#./.yarn/patches/zmodem.js-npm-0.1.10-e5537fa2ed.patch::version=0.1.10&hash=7aa19a&locator=ttyd%40workspace%3A."
dependencies:
crc-32: ^1.1.1
checksum: ca52c5fad8a2e7df8aae678d50bf82701e94543547368470998c39af0a2e01908252d89a976c6748a89048dc332def688ad845082090035a18387c8611abe70b
languageName: node
linkType: hard

6350
src/html.h generated

File diff suppressed because it is too large Load Diff