1: #include <X/mit-copyright.h> 2: 3: /* $Header: esctable.h,v 10.4 86/02/01 16:06:18 tony Rel $ */ 4: 5: #define DECKPAM 1 6: #define DECKPNM 2 7: #define DECTC1 3 8: #define DECSC 4 9: #define DECAC1 5 10: #define S7C1T 6 11: #define S8C1T 7 12: #define DECRC 8 13: #define LS2 9 14: #define LS3 10 15: #define LS3R 11 16: #define LS2R 12 17: #define LS1R 13 18: #define DESIGNATE 14 19: #define DA1 15 20: #define TBC 16 21: #define SET 17 22: #define DECSET 18 23: #define RST 19 24: #define DECRST 20 25: #define SGR 21 26: #define CPR 22 27: #define DECSTBM 23 28: #define ICH 24 29: #define CUU 25 30: #define CUD 26 31: #define CUF 27 32: #define CUB 28 33: #define HVP 29 34: #define CUP 30 35: #define ED 31 36: #define EL 32 37: #define IL 33 38: #define DL 34 39: #define DCH 35 40: #define SCRINC 36 41: #define DECALN 37 42: #define TEKESCFF 38 43: #define TEKESCSUB 39 44: #define TEKESCINQ 40 45: #define TEKCSIUS 41 46: 47: 48: #define KEY(type, private, final) ((final<<16) | (private<<8) | type) 49: #define WILD -1 50: 51: /* 52: * the following table of longwords is organized as: 53: * - seq. type, final, and any private introducer (formed with KEY macro) 54: * - intermediate(s) or WILD (match any intermediates) 55: * - dispatch value 56: * - number of default parameters (followed by the default values, if any) 57: * 58: * NOTE: since this table is searched linearly for a match, the entries 59: * should really be in order of frequency of use (for performance) 60: */ 61: long esctable[] = { 62: KEY(ESC, 0, '='), 0, DECKPAM, 0, 63: KEY(ESC, 0, '>'), 0, DECKPNM, 0, 64: KEY(ESC, 0, '6'), ' ', DECTC1, 0, 65: KEY(ESC, 0, '7'), 0, DECSC, 0, 66: KEY(ESC, 0, '7'), ' ', DECAC1, 0, 67: KEY(ESC, 0, 'F'), ' ', S7C1T, 0, 68: KEY(ESC, 0, 'G'), ' ', S8C1T, 0, 69: KEY(ESC, 0, '8'), 0, DECRC, 0, 70: KEY(ESC, 0, '8'), '#', DECALN, 0, 71: KEY(ESC, 0, 'n'), 0, LS2, 0, 72: KEY(ESC, 0, 'o'), 0, LS3, 0, 73: KEY(ESC, 0, '|'), 0, LS3R, 0, 74: KEY(ESC, 0, '}'), 0, LS2R, 0, 75: KEY(ESC, 0, '~'), 0, LS1R, 0, 76: KEY(ESC, 0, 'B'), WILD, DESIGNATE, 0, 77: KEY(ESC, 0, 'A'), WILD, DESIGNATE, 0, 78: KEY(ESC, 0, '0'), WILD, DESIGNATE, 0, 79: KEY(ESC, 0, '1'), WILD, DESIGNATE, 0, 80: KEY(ESC, 0, '2'), WILD, DESIGNATE, 0, 81: KEY(ESC, 0, '<'), WILD, DESIGNATE, 0, 82: KEY(CSI, 0, 'c'), 0, DA1, 1, 0, 83: KEY(CSI, 0, 'g'), 0, TBC, 1, 0, 84: KEY(CSI, 0, 'h'), 0, SET, 0, 85: KEY(CSI, '?', 'h'), 0, DECSET, 0, 86: KEY(CSI, 0, 'l'), 0, RST, 0, 87: KEY(CSI, '?', 'l'), 0, DECRST, 0, 88: KEY(CSI, 0, 'm'), 0, SGR, 1, 0, 89: KEY(CSI, 0, 'n'), 0, CPR, 1, 0, 90: KEY(CSI, 0, 'r'), 0, DECSTBM, 2, 1, 255, 91: KEY(CSI, 0, 't'), 0, SCRINC, 1, 0, 92: KEY(CSI, 0, '@'), 0, ICH, 1, 1, 93: KEY(CSI, 0, 'A'), 0, CUU, 1, 1, 94: KEY(CSI, 0, 'B'), 0, CUD, 1, 1, 95: KEY(CSI, 0, 'C'), 0, CUF, 1, 1, 96: KEY(CSI, 0, 'D'), 0, CUB, 1, 1, 97: KEY(CSI, 0, 'f'), 0, HVP, 2, 1, 1, 98: KEY(CSI, 0, 'H'), 0, CUP, 2, 1, 1, 99: KEY(CSI, 0, 'J'), 0, ED, 1, 0, 100: KEY(CSI, 0, 'K'), 0, EL, 1, 0, 101: KEY(CSI, 0, 'L'), 0, IL, 1, 1, 102: KEY(CSI, 0, 'M'), 0, DL, 1, 1, 103: KEY(CSI, 0, 'P'), 0, DCH, 1, 1, 104: KEY(ESC, 0, FF), 0, TEKESCFF, 0, 105: KEY(ESC, 0, SUB), 0, TEKESCSUB, 0, 106: KEY(ESC, 0, INQ), 0, TEKESCINQ, 0, 107: KEY(CSI, 0, US), 0, TEKCSIUS, 0, 108: 0 109: };