diff --git a/kermit/k95/ckoco3.c b/kermit/k95/ckoco3.c index ebac126d..d6aba1e0 100644 --- a/kermit/k95/ckoco3.c +++ b/kermit/k95/ckoco3.c @@ -530,12 +530,14 @@ extern int send_c1_usr ; /* User default for send_c1 */ * 13 - Local editing 15 - Technical character set * 16 - Locator device port + ? 17 - Terminal state interrogation (is this an xterm extension??) * 18 - Windowing Capability * 19 - Dual sessions * 21 - Horizontal Scrolling 22 - Color 23 - Greek * 24 - Turkish + ? 28 - Rectangular editing (is this an xterm extension??) 42 - ISO Latin-2 44 - PC Term 45 - Soft-key mapping @@ -584,17 +586,31 @@ struct tt_info_rec tt_info[] = { /* Indexed by terminal type */ "WY370", {"WYSE-370","WYSE370","WY350",NULL},"[?63;1;2;6;8;9;15;44c", /* WYSE 370 (same as VT320) */ "97801", {"SNI-97801",NULL}, "[?62;1;2;6;8;9;15;44c", /* Sinix 97801 */ "AAA", { "ANNARBOR", "AMBASSADOR",NULL}, "11;00;00", /* Ann Arbor Ambassador */ -#ifdef COMMENT - "VT420", {"DEC-VT420","DEC-VT400","VT400",NULL}, "[?64;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT420 */ - "VT525", {"DEC-VT525","DEC-VT500","VT500",NULL}, "[?65;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT520 */ -#endif /* COMMENT */ + + "VT420", {"DEC-VT420","DEC-VT400","VT400",NULL}, "[?64;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT420 */ + "VT420PC", {"DEC-VT420","DEC-VT400","VT400",NULL}, "[?64;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT420 w/ PC keyboard*/ + "VT525", {"DEC-VT525","DEC-VT500","VT500",NULL}, "[?65;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT520 */ + "VT525PC", {"DEC-VT525","DEC-VT500","VT500",NULL}, "[?65;1;2;6;8;9;15;22;23;42;44;45;46c", /* DEC VT520 w/ PC keyboard*/ + "TVI910", {"TELEVIDEO-910","TVI910+""910",NULL}, "TVS 910 REV.I\r", /* TVI 910+ */ "TVI925", {"TELEVIDEO-925","925",NULL}, "TVS 925 REV.I\r", /* TVI 925 */ "TVI950", {"TELEVIDEO-950","950",NULL}, "1.0,0\r", /* TVI 950 */ "ADM3A", {NULL}, "", /* LSI ADM 3A */ "ADM5", {NULL}, "", /* LSI ADM 5 */ - "VTNT", {NULL}, "", /* Microsoft NT VT */ + "VTNT", {NULL}, "" /* Microsoft NT VT */ +#ifdef COMMENT "IBM3101",{"I3101",NULL}, "" /* IBM 31xx */ +#endif +#ifdef CK_XTERM_EMULATION + ,"XTERM", {NULL}, "[?64;1;2;6;8;9;15;22c", /* XTerm */ + /* TODO: Xterm also supports (as of 2023-05-08): + * 16; Locator port + * 17; Terminal state interrogation + * 18; User windows + * 21; Horizontal scrolling + * 28 Rectangular editing + * */ +#endif }; int max_tt = TT_MAX; /* Highest terminal type */ @@ -7893,7 +7909,7 @@ doreset(int x) { /* x = 0 (soft), nonzero (hard) */ vtnt_index = 0; vtnt_read = VTNT_MIN_READ; - /* Disable y active mouse reporting modes */ + /* Disable any active mouse reporting modes */ mouse_reporting_mode &= ~(MOUSEREPORTING_ACTIVE | MOUSEREPORTING_UNSUPPORTED); dokverb(VTERM,K_ENDSCN); @@ -16047,12 +16063,14 @@ vtcsi(void) } else /* ANSI.SYS save cursor position */ if ( ISANSI(tt_type_mode) || - IS97801(tt_type_mode)) + IS97801(tt_type_mode) || + ISXTERM(tt_type_mode)) savecurpos(VTERM,0); break; case 'u': /* ANSI.SYS restore cursor position */ if ( ISANSI(tt_type_mode) || - IS97801(tt_type_mode)) + IS97801(tt_type_mode) || + ISXTERM(tt_type_mode)) restorecurpos(VTERM,0); break; case 'U': /* SCO ANSI Reset Initial Screen */ @@ -16067,8 +16085,14 @@ vtcsi(void) break; } break; - case '$': - achar = (escnext<=esclast)?escbuffer[escnext++]:0; + case '$': {/* These things below should probably only appear in a DCS string */ + int acharTmp = (escnext <= esclast) ? escbuffer[escnext + 1] : 0; + if (acharTmp != '}' && acharTmp != '-' && acharTmp != '~') { + /* Next character isn't something we handle here - skip ahead */ + goto LB2003; + } + + achar = (escnext <= esclast) ? escbuffer[escnext++] : 0; switch (achar) { case '}': /* DECSASD - Select Active Status Display */ @@ -16081,6 +16105,7 @@ vtcsi(void) break; } break; + } case 'S': if ( private && ISAIXTERM(tt_type_mode) ) { /* Show Status Line */ @@ -16380,7 +16405,7 @@ vtcsi(void) } break; case 'r': /* DECCARA - Change Attr in Rect Area */ - if ( ISVT420(tt_type_mode) ) + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode)) { int w, h, x, y, z; /* @@ -16503,7 +16528,7 @@ vtcsi(void) } break; case 't': /* DECRARA - Reverse Attr in Rect Area */ - if ( ISVT420(tt_type_mode) ) + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode)) { int w, h, x, y, z; /* @@ -16613,7 +16638,7 @@ vtcsi(void) } break; case 'v': /* DECCRA - Copy Rect Area */ - if ( ISVT420( tt_type_mode) ) + if ( ISVT420( tt_type_mode) || ISXTERM(tt_type_mode)) { USHORT * data = NULL; int w, h, x, y; @@ -16675,7 +16700,7 @@ vtcsi(void) } break; case 'x': /* DECFRA - Fill Rect Area */ - if ( ISVT420(tt_type_mode) ) { + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode) ) { /* pn[1] - fill char */ /* pn[2] - top-line border default=1 */ /* pn[3] - left-col border default=1 */ @@ -16700,29 +16725,55 @@ vtcsi(void) } break; case 'z': /* DECERA - Erase Rect Area */ - if ( ISVT420(tt_type_mode) ) { + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode) ) { /* pn[1] - top-line border default=1 */ /* pn[2] - left-col border default=1 */ /* pn[3] - bot-line border default=Height */ /* pn[4] - Right border default=Width */ - if ( k < 4 || pn[4] > VscrnGetWidth(VTERM) || - pn[4] < 1 ) - pn[4] = VscrnGetWidth(VTERM); - if ( k < 3 || pn[3] > VscrnGetHeight(VTERM) - -(tt_status[VTERM]?1:0) || pn[3] < 1 ) - pn[3] = VscrnGetHeight(VTERM) - -(tt_status[VTERM]?1:0); - if ( k < 2 || pn[2] < 1 ) - pn[2] = 1 ; - if ( k < 1 || pn[1] < 1 ) - pn[1] = 1 ; - clrrect_escape( VTERM, pn[1], pn[2], - pn[3], pn[4], SP ) ; - VscrnIsDirty(VTERM); + + int maxHeight, maxWidth; + int top, left, bot, right; + + maxHeight = VscrnGetHeight(VTERM) + -(tt_status[VTERM]?1:0); + maxWidth = VscrnGetWidth(VTERM); + + top = pn[1]; + left = pn[2]; + bot = pn[3]; + right = pn[4]; + + /* Defaults: the entire screen */ + if (k < 4 || right < 1) right = maxWidth; + if (k < 3 || bot < 1) bot = maxHeight; + if (k < 2 || left < 1) left = 1; + if (k < 1 || top < 1) top = 1; + + /* Coordinates are all relative to DECOM setting */ + if (relcursor) { + top += margintop - 1; + bot += margintop - 1; + left += marginleft - 1; + right += marginleft - 1; + } + + if (right > maxWidth) right = maxWidth; + if (bot > maxHeight) bot = maxHeight; + + /* Do nothing if the rect is invalid (bottom > top + * or left > right) */ + if (top <= bot && left <= right + && top > 0 && left > 0) { + clrrect_escape(VTERM, top, left, + bot, right, SP); + VscrnIsDirty(VTERM); + } else { + debug(F111, "DECERA", "bad parameter(s) - ignore", 0); + } } break; case '{': /* DECSERA - Selective Erase Rect Area */ - if ( ISVT420(tt_type_mode) ) { + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode) ) { /* pn[1] - top-line border default=1 */ /* pn[2] - left-col border default=1 */ /* pn[3] - bot-line border default=Height */ @@ -16777,7 +16828,7 @@ vtcsi(void) achar = (escnext<=esclast)?escbuffer[escnext++]:0; switch (achar) { case 'x': /* DECSACE - Select Attribute Change Extent */ - if ( ISVT420(tt_type_mode) ) + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode) ) { /* * 0 - DECCARA or DECRARA affect the stream of character @@ -17584,7 +17635,8 @@ vtcsi(void) case 9: /* DECINLM - Interlace */ /* XTERM - Send Mouse X & Y on button press */ #ifdef OS2MOUSE - if (ISLINUX(tt_type_mode) || ISANSI(tt_type_mode)) { + if (ISLINUX(tt_type_mode) || ISANSI(tt_type_mode) || + ISXTERM(tt_type_mode)) { /* The linux console terminal, as well as many * other terminal emulators, implement XTERM * mouse tracking */ @@ -18206,7 +18258,8 @@ vtcsi(void) case 9: /* DECINLM - Interlace */ /* XTERM - Don't Send Mouse X&Y on button press */ #ifdef OS2MOUSE - if (ISLINUX(tt_type_mode) || ISANSI(tt_type_mode)) { + if (ISLINUX(tt_type_mode) || ISANSI(tt_type_mode) || + ISXTERM(tt_type_mode)) { /* The linux console terminal, as well as many * other terminal emulators, implement XTERM * mouse tracking */ @@ -19551,8 +19604,14 @@ vtcsi(void) /* 8 - 12 are ANSI X3.64 */ case 8: /* Turn on INVISIBLE */ - case 9: /* Turn on INVISIBLE (QANSI) */ attrib.invisible = TRUE; /* see wrtch */ + break; + case 9: + if (ISXTERM(tt_type_mode)) { /* ECMA-48 3rd edition */ + /* TODO: XTERM: crossed-out characters */ + } else { /* Turn on INVISIBLE (QANSI) */ + attrib.invisible = TRUE; /* see wrtch */ + } break; case 10: /* Select Primary font */ @@ -19670,12 +19729,14 @@ vtcsi(void) charset(cs94,'U',&G[i]); } - case 21: { /* Set Normal Intensity */ - if (ISLINUX(tt_type_mode)) { + case 21: { + if (ISXTERM(tt_type_mode)) { /* ECMA-48 3rd */ + /* TODO: XTERM: Doubly-underlined */ + } else if (ISLINUX(tt_type_mode)) { /* Since linux 4.17. Prior to this, it was normal * intensity */ attrib.underlined = TRUE; - } else { + } else { /* Set Normal Intensity */ if (attrib.bold) attrib.bold = FALSE; if (attrib.dim) @@ -19723,10 +19784,18 @@ vtcsi(void) attrib.reversed = FALSE; break; case 28:/* Turn INVISIBLE Off */ - case 29:/* QANSI */ if (!attrib.invisible) break; - attrib.invisible = FALSE; + attrib.invisible = FALSE; + break; + case 29: + if (ISXTERM(tt_type_mode)) { + /* TODO: XTERM: Not corssed-out (ECMA-48 3rd) */ + } else { /* QANSI - Turn INVISIBLE off */ + if (!attrib.invisible) + break; + attrib.invisible = FALSE; + } break; case 30: /* Colors */ @@ -19747,7 +19816,7 @@ vtcsi(void) if ( 0 && ISQANSI(tt_type_mode) ) l = pn[j] - 30; else */ - l = sgrcols[pn[j] - 30]; + l = sgrcols[(pn[j] - 30)%8]; if (decscnm) { attribute = cell_video_attr_set_3bit_bg_color(attribute, l); @@ -19877,6 +19946,7 @@ vtcsi(void) break; } case 39: /* disable underline option */ + /* TODO: XTERM: Set foreground color to default, ECMA-48 */ /* Supported by SCO ANSI */ /* QANSI - restore fg color saved with */ /* CSI = Pn F */ @@ -19986,6 +20056,7 @@ vtcsi(void) } break; case 49: + /* TODO: XTERM: Set background color to default, ECMA-48 */ /* Supported by SCO ANSI */ /* QANSI - restore bg color saved with */ /* CSI = Pn G */ @@ -20076,7 +20147,7 @@ vtcsi(void) */ break; } - case 90: /* Colors */ + case 90: /* Bright Colors (aixterm?) */ case 91: case 92: case 93: @@ -20092,7 +20163,7 @@ vtcsi(void) * disabled -- DG if ( 0 && ISQANSI(tt_type_mode) ) l = pn[j] - 90; - else */ + else l = sgrcols[pn[j] - 90]; l += 8; /* 8th bit high */ if (decscnm @@ -20130,7 +20201,10 @@ vtcsi(void) } } break; - case 100: + case 100: /* TODO: For aixterm and perhaps others, these should set + * bright foreground/background colours ( + /* TODO: rxvt: set forground and background to default + * Aixterm (and probably others): set background to black */ case 101: case 102: case 103: @@ -20147,7 +20221,7 @@ vtcsi(void) * branch is disabled -- DG if ( 0 && ISQANSI(tt_type_mode) ) l = pn[j] - 100; - else */ + else l = sgrcols[pn[j] - 100]; l += 8; /* 8th bit high */ if (!decscnm @@ -21641,7 +21715,7 @@ vtcsi(void) sendescseq(buf); #endif break; - } + } } } break; @@ -21975,7 +22049,7 @@ vtcsi(void) achar = (escnext<=esclast)?escbuffer[escnext++]:0; switch (achar) { case '~': - if ( ISVT420(tt_type_mode) ) { + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode) ) { /* DECDC - Delete Column */ viocell cell ; cell.c = SP ; @@ -21997,7 +22071,7 @@ vtcsi(void) } break; case '}': - if ( ISVT420(tt_type_mode) ) { + if ( ISVT420(tt_type_mode) || ISXTERM(tt_type_mode) ) { /* DECIC - Insert Column */ viocell cell ; cell.c = SP ; diff --git a/kermit/k95/ckokey.c b/kermit/k95/ckokey.c index 340b2826..e63fec31 100644 --- a/kermit/k95/ckokey.c +++ b/kermit/k95/ckokey.c @@ -7694,6 +7694,8 @@ defaultkeymap( int terminal ) { return defvt100km(terminal); case TT_BEOS: return defbetermkm( terminal ); + case TT_XTERM: /* TODO: What should the default xterm keymap be? */ + return defvtpckm( terminal ); case TT_LINUX: return deflinuxkm( terminal ); case TT_SCOANSI: @@ -7706,10 +7708,14 @@ defaultkeymap( int terminal ) { return defannarbor( terminal ); case TT_VT220: case TT_VT320: + case TT_VT420: + case TT_VT520: case TT_WY370: return defvt200km( terminal ); case TT_VT220PC: case TT_VT320PC: + case TT_VT420PC: + case TT_VT520PC: return defvtpckm( terminal ); case TT_97801: return defsnikm( terminal ); diff --git a/kermit/k95/ckuus5.c b/kermit/k95/ckuus5.c index 19336838..a9f755b8 100644 --- a/kermit/k95/ckuus5.c +++ b/kermit/k95/ckuus5.c @@ -5367,6 +5367,12 @@ struct keytab shokeymtab[] = { "vt220pc", TT_VT220PC, 0, "vt320", TT_VT320, 0, "vt320pc", TT_VT320PC, 0, +#ifdef CK_VT420_520_EMULATION + "vt420", TT_VT420, 0, + "vt420pc", TT_VT420PC, 0, + "vt520", TT_VT520, 0, + "vt520pc", TT_VT520PC, 0 , +#endif /* CK_VT420_520_EMULATION */ "vt52", TT_VT52, 0, "wp", TT_KBM_WP, 0, "wy160", TT_WY160, 0, @@ -5377,7 +5383,10 @@ struct keytab shokeymtab[] = { "wyse30", TT_WY30, CM_INV, "wyse370", TT_WY370, CM_INV, "wyse50", TT_WY50, CM_INV, - "wyse60", TT_WY60, CM_INV + "wyse60", TT_WY60, CM_INV, +#ifdef CK_XTERM_EMULATION + "xterm", TT_XTERM, 0 +#endif }; int nshokeym = (sizeof(shokeymtab) / sizeof(struct keytab)); #endif /* OS2 */ diff --git a/kermit/k95/ckuus7.c b/kermit/k95/ckuus7.c index 37dc4e62..a5c3d537 100644 --- a/kermit/k95/ckuus7.c +++ b/kermit/k95/ckuus7.c @@ -1653,6 +1653,12 @@ struct keytab ttyptab[] = { { "vt220pc", TT_VT220PC,0 }, { "vt320", TT_VT320, 0 }, { "vt320pc", TT_VT320PC,0 }, +#ifdef CK_VT420_520_EMULATION + { "vt420", TT_VT420, 0 }, + { "vt420pc", TT_VT420PC, 0 }, + { "vt520", TT_VT520, 0 }, + { "vt520pc", TT_VT520PC, 0 }, +#endif /* CK_VT420_520_EMULATION */ { "vt52", TT_VT52, 0 }, #ifdef NT { "vtnt", TT_VTNT, 0 }, @@ -1667,7 +1673,10 @@ struct keytab ttyptab[] = { { "wyse30", TT_WY30, CM_INV }, { "wyse370", TT_WY370, CM_INV }, { "wyse50", TT_WY50, CM_INV }, - { "wyse60", TT_WY60, CM_INV } + { "wyse60", TT_WY60, CM_INV }, +#ifdef CK_XTERM_EMULATION + { "xterm", TT_XTERM, 0 } +#endif }; int nttyp = (sizeof(ttyptab) / sizeof(struct keytab)); @@ -1724,6 +1733,12 @@ struct keytab ttkeytab[] = { { "vt220pc", TT_VT220PC, 0 }, { "vt320", TT_VT320, 0 }, { "vt320pc", TT_VT320PC, 0 }, +#ifdef CK_VT420_520_EMULATION + { "vt420", TT_VT420, 0 }, + { "vt420pc", TT_VT420PC, 0 }, + { "vt520", TT_VT520, 0 }, + { "vt520pc", TT_VT520PC, 0 }, +#endif /* CK_VT420_520_EMULATION */ { "vt52", TT_VT52, 0 }, { "vtnt", TT_VTNT, CM_INV }, { "wp", TT_KBM_WP, 0 }, /* Word Perfect mode */ @@ -1735,7 +1750,10 @@ struct keytab ttkeytab[] = { { "wyse30", TT_WY30, CM_INV }, { "wyse370", TT_WY370, CM_INV }, { "wyse50", TT_WY50, CM_INV }, - { "wyse60", TT_WY60, CM_INV } + { "wyse60", TT_WY60, CM_INV }, +#ifdef CK_XTERM_EMULATION + { "xterm", TT_XTERM, 0 } +#endif }; int nttkey = (sizeof(ttkeytab) / sizeof(struct keytab)); diff --git a/kermit/k95/ckuusr.h b/kermit/k95/ckuusr.h index 5e2e8fdb..17eece41 100644 --- a/kermit/k95/ckuusr.h +++ b/kermit/k95/ckuusr.h @@ -1056,18 +1056,51 @@ struct stringint { /* String and (wide) integer */ #define TT_WY370 33 /* WYSE 370 ANSI Terminal */ #define TT_97801 34 /* Sinix 97801-5xx terminal */ #define TT_AAA 35 /* Ann Arbor Ambassador */ -#define TT_TVI910 36 /* TVI 910+ */ -#define TT_TVI925 37 /* TVI 925 */ -#define TT_TVI950 38 /* TVI950 */ -#define TT_ADM3A 39 /* LSI ADM 3A */ -#define TT_ADM5 40 /* LSI ADM 5 */ -#define TT_VTNT 41 /* Microsoft NT Virtual Terminal */ + +#define TT_VT420 36 /* DEC VT-420 */ +#define TT_VT420PC 37 /* DEC VT-420 with PC keyboard */ +#define TT_VT520 38 /* DEC VT-520/525 */ +#define TT_VT520PC 39 /* DEC VT-520/525 with PC keyboard */ + +#define TT_TVI910 40 /* TVI 910+ */ +#define TT_TVI925 41 /* TVI 925 */ +#define TT_TVI950 42 /* TVI950 */ +#define TT_ADM3A 43 /* LSI ADM 3A */ +#define TT_ADM5 44 /* LSI ADM 5 */ +#define TT_VTNT 45 /* Microsoft NT Virtual Terminal */ + +#ifdef CK_XTERM_EMULATION +#define TT_XTERM 46 /* xterm! */ +#else /* CK_XTERM_EMULATION */ +#define TT_XTERM 97 /* xterm! */ +#endif /* CK_XTERM_EMULATION */ + +/* TODO: Graphics! + * -> This would be Windows/KUI only - no way of supporting it in + * the console or OS/2 versions + * -> Need to figure out how to implement graphics at all + * -> How do we represent graphics in the screen buffer? + * -> How do we render and scroll text + graphics? + * -> Sixel is the priority and probably the easiest. The rest are rarely used. + * -> The following graphics terminals require: + * VT125: ReGIS + * VT241: All of the above plus Sixel (VT240: no colour) + * VT340: All of the above plus Tektronix 4010 graphics (VT330: no colour) + * TEK40: 4010, 4014 emulation. If 4010 gets implemented for VT340 emulation + * we may as well go all the way and provide Tektronix emulation directly too. + * VT55, VT105: waveform graphics + * XTerm: Sixel, ReGIS, Tektronix 4015 + */ + +#ifdef CK_XTERM_EMULATION +#define TT_MAX TT_XTERM +#else /* CK_XTERM_EMULATION */ #define TT_MAX TT_VTNT -#define TT_VT420 96 /* DEC VT-420 */ -#define TT_VT520 97 /* DEC VT-520/525 */ -#define TT_XTERM 98 /* XTerm */ -#define TT_TEK40 99 /* Tektronix 401x */ -#define TT_K95 100 /* Kermit 95 self-personality */ +#endif /* CK_XTERM_EMULATION */ + +#define TT_IBM3101 98 /* IBM 3101 - not implemented */ +#define TT_TEK40 99 /* Tektronix 401x */ +#define TT_K95 100 /* K95 native personality */ #define TT_KBM_EMACS TT_MAX+1 #define TT_KBM_HEBREW TT_MAX+2 #define TT_KBM_RUSSIAN TT_MAX+3 @@ -1094,21 +1127,22 @@ struct stringint { /* String and (wide) integer */ #define ISTVI910(x) (x == TT_TVI910) #define ISTVI925(x) (x == TT_TVI925) #define ISTVI950(x) (x == TT_TVI950) +#define ISXTERM(x) (x == TT_XTERM) #define ISVT52(x) (x == TT_VT52 || x == TT_H19) -#ifdef COMMENT +#ifdef CK_VT420_520_EMULATION +#define ISVT520(x) (x == TT_VT520 || x == TT_VT520PC) +#define ISVT420(x) (x >= TT_VT420 && x <= TT_VT520PC) #define ISVT525(x) (x == TT_VT525) -#define ISVT520(x) (x == TT_VT520) -#define ISVT420(x) (x >= TT_VT420 && x <= TT_VT520) -#else /* COMMENT */ +#else /* CK_VT420_520_EMULATION */ /* Since we do not yet support 420/520/525 extend 320 */ #define ISVT525(x) (ISVT320(x)) #define ISVT520(x) (ISVT320(x)) #define ISVT420(x) (ISVT320(x)) -#endif /* COMMENT */ +#endif /* CK_VT420_520_EMULATION */ #define ISVT320(x) (x >= TT_VT320 && x <= TT_AAA) #define ISVT220(x) (x >= TT_VT220 && x <= TT_AAA || \ ISBEOS(x) || ISQANSI(x) || \ - ISLINUX(x) || ISSUN(x)) + ISLINUX(x) || ISSUN(x) || ISXTERM(x)) #define ISVT102(x) (x >= TT_VIP7809 && x <= TT_BA80 || \ x == TT_VT102 || ISVT220(x)) #define ISVT100(x) (x == TT_VT100 || ISVT102(x)) @@ -1129,7 +1163,6 @@ struct stringint { /* String and (wide) integer */ #define ISVTNT(x) (x == TT_VTNT) #define ISADM3A(x) (x == TT_ADM3A) #define ISADM5(x) (x == TT_ADM5) -#define ISXTERM(x) (x == TT_XTERM) #endif /* OS2 */ #define XYTCS 2 /* Terminal Character Set */ diff --git a/kermit/k95/feature_flags.mak b/kermit/k95/feature_flags.mak index 41784eca..afc13f5d 100644 --- a/kermit/k95/feature_flags.mak +++ b/kermit/k95/feature_flags.mak @@ -700,6 +700,18 @@ ENABLED_FEATURES = $(ENABLED_FEATURES) Windows-Unicode ENABLED_FEATURE_DEFS = $(ENABLED_FEATURE_DEFS) -DCK_NT_UNICODE -DUNICODE -D_UNICODE !endif +# Enable xterm emulation option +!if "$(CKF_XTERM_EMULATION)" == "yes" +ENABLED_FEATURES = $(ENABLED_FEATURES) Xterm-emulation +ENABLED_FEATURE_DEFS = $(ENABLED_FEATURE_DEFS) -DCK_XTERM_EMULATION +!endif + +# Enable VT420 and VT520 emulation options +!if "$(CKF_VT420_520_EMULATION)" == "yes" +ENABLED_FEATURES = $(ENABLED_FEATURES) vt420-vt520-emulation +ENABLED_FEATURE_DEFS = $(ENABLED_FEATURE_DEFS) -DCK_VT420_520_EMULATION +!endif + !if "$(CKF_REXX)" == "yes" ENABLED_FEATURES = $(ENABLED_FEATURES) REXX !else