#define TER_ROWS 24
#define TER_COLS 80
/* at UMIST we have to have handshaking so ^q and ^s are lost,
   hence duplication of LASTPAGE and LSTART as <rs> and <us>.
   escape is (almost) allways used as start of special sequence.
*/

/* table of characters for input (INMODE) mode */
char  ictab[] =
 {  /* 000 - 007, null - ^G */
#ifdef INTCOMP
    IGN, WRIGHT, WLEFT, IGN, READPIPE, LEND, TAILERASE, WERASE,
#else
    IGN, WRIGHT, WLEFT, IGN, IGN, LEND, TAILERASE, WERASE,
#endif
    /* 010 - 017, ^H - ^O */
    LEFT, TAB, NL, UP, DOWN, CR, BOTSCREEN, OVER,
    /* 020 - 027, ^P - ^W */
    NEXTPAGE, LASTPAGE, ERASE, LSTART, TOPSCREEN, HEADRUBOUT, SEND, WRUBOUT,
    /* 030 - 037, ^X - ^_ */
    RIGHT, CHMODE, CONTROL, SPECIAL, IGN, LINEERASE, LASTPAGE, LSTART,
    SPACE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, RUBOUT
 };

/* table of characters for edit (EDMODE) mode. Much the same
 * as ictab, except for the absence of UP, DOWN, TOPSCREEN,
 * BOTSCREEN and LINEERASE. CR is also COMMAND in this mode,
 * LF is CMDSTAY
 */
char  ectab[] =
 {  /* 000 - 007, null - ^G */
#ifdef INTCOMP
    IGN, WRIGHT, WLEFT, IGN, READPIPE, LEND, TAILERASE, WERASE,
#else
    IGN, WRIGHT, WLEFT, IGN, IGN, LEND, TAILERASE, WERASE,
#endif
    /* 010 - 017, ^H - ^O */
    LEFT, TAB, CMDSTAY, IGN, IGN, COMMAND, IGN, OVER,
    /* 020 - 027, ^P - ^W */
    IGN, IGN, ERASE, LSTART, IGN, HEADRUBOUT, SEND, WRUBOUT,
    /* 030 - 037, ^X - ^_ */
    RIGHT, CHMODE, CONTROL, SPECIAL, IGN, IGN, IGN, LSTART,
    SPACE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, ONE,
    ONE, ONE, ONE, ONE, ONE, ONE, ONE, RUBOUT
 };
