Consolidate Viewdata/ANSItex specific modules to use consistent method names, our session is now initialised at startup as either

This commit is contained in:
2023-12-26 09:17:19 +11:00
parent 701dd9f5e8
commit 7b34decb49
4 changed files with 22 additions and 29 deletions

View File

@@ -129,10 +129,10 @@ const FRAME_SAVE_ATTRS = [
];
/* The page that has our echomail area reading template */
const MAIL_TEMPLATE_FRAME = '199a';
const MAIL_TEMPLATE_FRAME = {frame: 199,index: 'a'};
/* The page that has our echomail area summary template */
const MAIL_TEMPLATE_AREA_SUMMARY = '198a';
const MAIL_TEMPLATE_AREA_SUMMARY = {frame: 198,index: 'a'};
// The maximum size of embedded dynamic fields in frames
const DYNAMIC_FIELD_SIZE_MAX = 50;

View File

@@ -431,7 +431,7 @@ function rawtoattrs(contents,width,yoffset,xoffset,debug) {
load('ansitex/load/session.js');
// Our frame object
function SessionAnsitex() {
function SessionProtocol() {
Session.apply(this,arguments);
this.settings.MSG_SENDORNOT = '\1n\1h\1GKEY 1 TO SEND, 2 NOT TO SEND';
@@ -590,5 +590,5 @@ function SessionAnsitex() {
};
}
SessionAnsitex.prototype = Session.prototype;
SessionAnsitex.prototype.constructor = SessionAnsitex;
SessionProtocol.prototype = Session.prototype;
SessionProtocol.prototype.constructor = SessionProtocol;

View File

@@ -435,7 +435,7 @@ function rawtoattrs(contents,width,yoffset,xoffset,debug) {
load('ansitex/load/session.js');
// Our frame object
function SessionViewdata() {
function SessionProtocol() {
Session.apply(this,arguments);
this.settings.MSG_SENDORNOT = ascii(27)+'BKEY 1 TO SEND, 2 NOT TO SEND';
@@ -674,5 +674,5 @@ function videotex(data) {
return output;
}
SessionViewdata.prototype = Session.prototype;
SessionViewdata.prototype.constructor = SessionViewdata;
SessionProtocol.prototype = Session.prototype;
SessionProtocol.prototype.constructor = SessionProtocol;