/************************************************************************ * * * copyright Richard Bornat 1981 * * * ************************************************************************/ /************************************************************************ * * * default settings for a terminal structure * * * ************************************************************************/ #define TER_ROWS ... #define TER_COLS ... xxx_move(srow, scol) register int srow, scol; { ... } int xxx_special(typein, c) int typein; register char c; /* used to return the character type corresponding to * tvi 'ctrl-a, character, return' combination. * On input usually returns class IGN (which will treat character as * control character) */ { ... } struct TERMINAL xxx_ter = { /* nrows, ncols - size of the screen */ TER_ROWS, TER_COLS, /* up, left, c_MODIFY, c_CONTROL, c_BLOB - single characters */ { 0, 0, 0, 0, 0 }, /* onechar */ /* rollup, pushdown, pushup, pulldown, pullup STRINGS */ /* and hardscroll boolean */ /* you MUST have rollup */ { "\n", 0, 0, 0, 0, false }, /* scrseq */ /* scrollup, scrolldown PROCEDURES */ /* scr1_ is pushup, pulldown */ /* scr2_ is pushdown, pullup */ /* scr3_ is both */ /* scr0_ is neither (and in that case hardscroll is false) */ scr0_up, scr0_down, /* splitdown, splitup, joindown, joinup STRINGS */ { 0, 0, 0, 0 }, /* splitseq */ /* split_row, join_row PROCEDURES */ split0, join0, /* clearscreen, *clearhead, *cleartail STRINGS */ /* I assume ^L for clear screen, but it isn't important */ { "\014", 0, 0 }, /* clrseq */ /* clr_screen, clr_head, clr_tail PROCEDURES */ /* I assume hardware support for clear screen at least */ clrs1, clrh0, clrt0, /* inspace, makespace, rubout, erase STRINGS */ /* inspace puts a space and moves the cursor right, * makespace doesn't move it. Likewise rubout moves the * cursor left, erase doesn't move it */ { 0, 0, 0, 0 }, /* charseq */ /* ins_char, del_char PROCEDURES */ /* insc1 uses inspace, insc2 makespace */ /* delc1 uses rubout, delc2 erase */ /* insc0, delc0 use neither */ insc0, delc0, /* bright, normal STRINGS */ { 0, 0 }, /* vidseq */ /* in_two, out_two PROCEDURES */ no_char, no_char, /* move PROCEDURE and nmove integer */ no_int, 50000, /* setup, special, pad PROCEDURES */ no_int, no_int, no_int }; /* the following comes from the file chars.def */ /* table of characters for input (INMODE) mode */ char ictab[] = { /* 000 - 007, null - ^G */ IGN, WRIGHT, WLEFT, IGN, IGN, DOWN, TAILERASE, WERASE, /* 010 - 017, ^H - ^O */ LEFT, TAB, NL, LSTART, LEND, CR, BOTSCREEN, TOPSCREEN, /* 020 - 027, ^P - ^W */ IGN, RIGHT, ERASE, UP, IGN, LEFT, SEND, WRUBOUT, /* 030 - 037, ^X - ^_ */ HEADRUBOUT, CHMODE, CONTROL, ENTERedit, IGN, LINEERASE, IGN, IGN, 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 or LF are also COMMAND in this mode */ char ectab[] = { /* 000 - 007, null - ^G */ IGN, WRIGHT, WLEFT, IGN, IGN, IGN, TAILERASE, WERASE, /* 010 - 017, ^H - ^O */ LEFT, TAB, COMMAND, LSTART, LEND, COMMAND, IGN, IGN, /* 020 - 027, ^P - ^W */ IGN, RIGHT, ERASE, IGN, IGN, LEFT, SEND, WRUBOUT, /* 030 - 037, ^X - ^_ */ HEADRUBOUT, CHMODE, CONTROL, ENTERedit, IGN, IGN, IGN, IGN, 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 };