From 419da839e0cbdf6251bc31dc218fa629ccc91b44 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 13 Feb 2015 12:06:19 -0300 Subject: [PATCH] cleanup: Remove unused functions and builtin termcaps --- src/nvim/option.c | 32 --- src/nvim/os_unix.c | 11 - src/nvim/term.c | 643 --------------------------------------------- 3 files changed, 686 deletions(-) diff --git a/src/nvim/option.c b/src/nvim/option.c index f026663ae5..7242c2d925 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -5951,27 +5951,6 @@ set_option_value ( return NULL; } -/* - * Get the terminal code for a terminal option. - * Returns NULL when not found. - */ -char_u *get_term_code(char_u *tname) -{ - int opt_idx; - char_u *varp; - - if (tname[0] != 't' || tname[1] != '_' || - tname[2] == NUL || tname[3] == NUL) - return NULL; - if ((opt_idx = findoption(tname)) >= 0) { - varp = get_varp(&(options[opt_idx])); - if (varp != NULL) - varp = *(char_u **)(varp); - return varp; - } - return find_termcode(tname + 2); -} - char_u *get_highlight_default(void) { int i; @@ -7811,17 +7790,6 @@ int option_was_set(char_u *name) return FALSE; } -/* - * Reset the flag indicating option "name" was set. - */ -void reset_option_was_set(char_u *name) -{ - int idx = findoption(name); - - if (idx >= 0) - options[idx].flags &= ~P_WAS_SET; -} - /* * fill_breakat_flags() -- called when 'breakat' changes value. */ diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 3bf67c2290..455ed737ff 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -163,17 +163,6 @@ int vim_is_xterm(char_u *name) || STRCMP(name, "builtin_xterm") == 0; } -/* - * Return TRUE if "name" appears to be that of a terminal - * known to support the xterm-style mouse protocol. - * Relies on term_is_xterm having been set to its correct value. - */ -int use_xterm_like_mouse(char_u *name) -{ - return name != NULL - && (term_is_xterm || STRNICMP(name, "screen", 6) == 0); -} - /* * Return non-zero when using an xterm mouse, according to 'ttymouse'. * Return 1 for "xterm". diff --git a/src/nvim/term.c b/src/nvim/term.c index d302493d62..fa85860cb0 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -121,624 +121,6 @@ static struct builtin_term builtin_termcaps[] = {(int)KS_CM, "\033|%p1%d;%p2%dM"}, // there are no key sequences here, for "abstract_ui" vim key codes are // parsed directly in input_enqueue() - - -#ifndef NO_BUILTIN_TCAPS - -# if defined(ALL_BUILTIN_TCAPS) - /* - * Amiga console window, default for Amiga - */ - {(int)KS_NAME, "amiga"}, - {(int)KS_CE, "\033[K"}, - {(int)KS_CD, "\033[J"}, - {(int)KS_AL, "\033[L"}, - {(int)KS_CAL, "\033[%dL"}, - {(int)KS_DL, "\033[M"}, - {(int)KS_CDL, "\033[%dM"}, - {(int)KS_CL, "\014"}, - {(int)KS_VI, "\033[0 p"}, - {(int)KS_VE, "\033[1 p"}, - {(int)KS_ME, "\033[0m"}, - {(int)KS_MR, "\033[7m"}, - {(int)KS_MD, "\033[1m"}, - {(int)KS_SE, "\033[0m"}, - {(int)KS_SO, "\033[33m"}, - {(int)KS_US, "\033[4m"}, - {(int)KS_UE, "\033[0m"}, - {(int)KS_CZH, "\033[3m"}, - {(int)KS_CZR, "\033[0m"}, - {(int)KS_MS, "y"}, - {(int)KS_UT, "y"}, /* guessed */ - {(int)KS_LE, "\b"}, - {(int)KS_CM, "\033[%i%d;%dH"}, - {(int)KS_CRI, "\033[%dC"}, - {K_UP, "\233A"}, - {K_DOWN, "\233B"}, - {K_LEFT, "\233D"}, - {K_RIGHT, "\233C"}, - {K_S_UP, "\233T"}, - {K_S_DOWN, "\233S"}, - {K_S_LEFT, "\233 A"}, - {K_S_RIGHT, "\233 @"}, - {K_S_TAB, "\233Z"}, - {K_F1, "\233\060~"}, /* some compilers don't dig "\2330" */ - {K_F2, "\233\061~"}, - {K_F3, "\233\062~"}, - {K_F4, "\233\063~"}, - {K_F5, "\233\064~"}, - {K_F6, "\233\065~"}, - {K_F7, "\233\066~"}, - {K_F8, "\233\067~"}, - {K_F9, "\233\070~"}, - {K_F10, "\233\071~"}, - {K_S_F1, "\233\061\060~"}, - {K_S_F2, "\233\061\061~"}, - {K_S_F3, "\233\061\062~"}, - {K_S_F4, "\233\061\063~"}, - {K_S_F5, "\233\061\064~"}, - {K_S_F6, "\233\061\065~"}, - {K_S_F7, "\233\061\066~"}, - {K_S_F8, "\233\061\067~"}, - {K_S_F9, "\233\061\070~"}, - {K_S_F10, "\233\061\071~"}, - {K_HELP, "\233?~"}, - {K_INS, "\233\064\060~"}, /* 101 key keyboard */ - {K_PAGEUP, "\233\064\061~"}, /* 101 key keyboard */ - {K_PAGEDOWN, "\233\064\062~"}, /* 101 key keyboard */ - {K_HOME, "\233\064\064~"}, /* 101 key keyboard */ - {K_END, "\233\064\065~"}, /* 101 key keyboard */ - - {BT_EXTRA_KEYS, ""}, - {TERMCAP2KEY('#', '2'), "\233\065\064~"}, /* shifted home key */ - {TERMCAP2KEY('#', '3'), "\233\065\060~"}, /* shifted insert key */ - {TERMCAP2KEY('*', '7'), "\233\065\065~"}, /* shifted end key */ -# endif - -# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) - /* - * standard ANSI terminal, default for unix - */ - {(int)KS_NAME, "ansi"}, - {(int)KS_CE, "\033[K"}, - {(int)KS_AL, "\033[L"}, - {(int)KS_CAL, "\033[%dL"}, - {(int)KS_DL, "\033[M"}, - {(int)KS_CDL, "\033[%dM"}, - {(int)KS_CL, "\033[H\033[2J"}, - {(int)KS_ME, "\033[0m"}, - {(int)KS_MR, "\033[7m"}, - {(int)KS_MS, "y"}, - {(int)KS_UT, "y"}, /* guessed */ - {(int)KS_LE, "\b"}, - {(int)KS_CM, "\033[%i%d;%dH"}, - {(int)KS_CRI, "\033[%dC"}, -# endif - -# if defined(ALL_BUILTIN_TCAPS) - /* - * These codes are valid when nansi.sys or equivalent has been installed. - * Function keys on a PC are preceded with a NUL. These are converted into - * K_NUL '\316' in os_inchar(), because we cannot handle NULs in key codes. - * CTRL-arrow is used instead of SHIFT-arrow. - */ - {(int)KS_NAME, "pcansi"}, - {(int)KS_DL, "\033[M"}, - {(int)KS_AL, "\033[L"}, - {(int)KS_CE, "\033[K"}, - {(int)KS_CL, "\033[2J"}, - {(int)KS_ME, "\033[0m"}, - {(int)KS_MR, "\033[5m"}, /* reverse: black on lightgrey */ - {(int)KS_MD, "\033[1m"}, /* bold: white text */ - {(int)KS_SE, "\033[0m"}, /* standout end */ - {(int)KS_SO, "\033[31m"}, /* standout: white on blue */ - {(int)KS_CZH, "\033[34;43m"}, /* italic mode: blue text on yellow */ - {(int)KS_CZR, "\033[0m"}, /* italic mode end */ - {(int)KS_US, "\033[36;41m"}, /* underscore mode: cyan text on red */ - {(int)KS_UE, "\033[0m"}, /* underscore mode end */ - {(int)KS_CCO, "8"}, /* allow 8 colors */ - {(int)KS_CAB, "\033[4%dm"}, /* set background color */ - {(int)KS_CAF, "\033[3%dm"}, /* set foreground color */ - {(int)KS_OP, "\033[0m"}, /* reset colors */ - {(int)KS_MS, "y"}, - {(int)KS_UT, "y"}, /* guessed */ - {(int)KS_LE, "\b"}, - {(int)KS_CM, "\033[%i%d;%dH"}, - {(int)KS_CRI, "\033[%dC"}, - {K_UP, "\316H"}, - {K_DOWN, "\316P"}, - {K_LEFT, "\316K"}, - {K_RIGHT, "\316M"}, - {K_S_LEFT, "\316s"}, - {K_S_RIGHT, "\316t"}, - {K_F1, "\316;"}, - {K_F2, "\316<"}, - {K_F3, "\316="}, - {K_F4, "\316>"}, - {K_F5, "\316?"}, - {K_F6, "\316@"}, - {K_F7, "\316A"}, - {K_F8, "\316B"}, - {K_F9, "\316C"}, - {K_F10, "\316D"}, - {K_F11, "\316\205"}, /* guessed */ - {K_F12, "\316\206"}, /* guessed */ - {K_S_F1, "\316T"}, - {K_S_F2, "\316U"}, - {K_S_F3, "\316V"}, - {K_S_F4, "\316W"}, - {K_S_F5, "\316X"}, - {K_S_F6, "\316Y"}, - {K_S_F7, "\316Z"}, - {K_S_F8, "\316["}, - {K_S_F9, "\316\\"}, - {K_S_F10, "\316]"}, - {K_S_F11, "\316\207"}, /* guessed */ - {K_S_F12, "\316\210"}, /* guessed */ - {K_INS, "\316R"}, - {K_DEL, "\316S"}, - {K_HOME, "\316G"}, - {K_END, "\316O"}, - {K_PAGEDOWN, "\316Q"}, - {K_PAGEUP, "\316I"}, -# endif - - -# if defined(WIN3264) || defined(ALL_BUILTIN_TCAPS) - /* - * These codes are valid for the Win32 Console . The entries that start with - * ESC | are translated into console calls in os_win32.c. The function keys - * are also translated in os_win32.c. - */ - {(int)KS_NAME, "win32"}, - {(int)KS_CE, "\033|K"}, /* clear to end of line */ - {(int)KS_AL, "\033|L"}, /* add new blank line */ - {(int)KS_CAL, "\033|%dL"}, /* add number of new blank lines */ - {(int)KS_DL, "\033|M"}, /* delete line */ - {(int)KS_CDL, "\033|%dM"}, /* delete number of lines */ - {(int)KS_CL, "\033|J"}, /* clear screen */ - {(int)KS_CD, "\033|j"}, /* clear to end of display */ - {(int)KS_VI, "\033|v"}, /* cursor invisible */ - {(int)KS_VE, "\033|V"}, /* cursor visible */ - - {(int)KS_ME, "\033|0m"}, /* normal */ - {(int)KS_MR, "\033|112m"}, /* reverse: black on lightgray */ - {(int)KS_MD, "\033|15m"}, /* bold: white on black */ - {(int)KS_SO, "\033|31m"}, /* standout: white on blue */ - {(int)KS_SE, "\033|0m"}, /* standout end */ - {(int)KS_CZH, "\033|225m"}, /* italic: blue text on yellow */ - {(int)KS_CZR, "\033|0m"}, /* italic end */ - {(int)KS_US, "\033|67m"}, /* underscore: cyan text on red */ - {(int)KS_UE, "\033|0m"}, /* underscore end */ - {(int)KS_CCO, "16"}, /* allow 16 colors */ - {(int)KS_CAB, "\033|%db"}, /* set background color */ - {(int)KS_CAF, "\033|%df"}, /* set foreground color */ - - {(int)KS_MS, "y"}, /* save to move cur in reverse mode */ - {(int)KS_UT, "y"}, - {(int)KS_LE, "\b"}, - {(int)KS_CM, "\033|%i%d;%dH"}, /* cursor motion */ - {(int)KS_VB, "\033|B"}, /* visual bell */ - {(int)KS_TI, "\033|S"}, /* put terminal in termcap mode */ - {(int)KS_TE, "\033|E"}, /* out of termcap mode */ - {(int)KS_CS, "\033|%i%d;%dr"}, /* scroll region */ - - {K_UP, "\316H"}, - {K_DOWN, "\316P"}, - {K_LEFT, "\316K"}, - {K_RIGHT, "\316M"}, - {K_S_UP, "\316\304"}, - {K_S_DOWN, "\316\317"}, - {K_S_LEFT, "\316\311"}, - {K_C_LEFT, "\316s"}, - {K_S_RIGHT, "\316\313"}, - {K_C_RIGHT, "\316t"}, - {K_S_TAB, "\316\017"}, - {K_F1, "\316;"}, - {K_F2, "\316<"}, - {K_F3, "\316="}, - {K_F4, "\316>"}, - {K_F5, "\316?"}, - {K_F6, "\316@"}, - {K_F7, "\316A"}, - {K_F8, "\316B"}, - {K_F9, "\316C"}, - {K_F10, "\316D"}, - {K_F11, "\316\205"}, - {K_F12, "\316\206"}, - {K_S_F1, "\316T"}, - {K_S_F2, "\316U"}, - {K_S_F3, "\316V"}, - {K_S_F4, "\316W"}, - {K_S_F5, "\316X"}, - {K_S_F6, "\316Y"}, - {K_S_F7, "\316Z"}, - {K_S_F8, "\316["}, - {K_S_F9, "\316\\"}, - {K_S_F10, "\316]"}, - {K_S_F11, "\316\207"}, - {K_S_F12, "\316\210"}, - {K_INS, "\316R"}, - {K_DEL, "\316S"}, - {K_HOME, "\316G"}, - {K_S_HOME, "\316\302"}, - {K_C_HOME, "\316w"}, - {K_END, "\316O"}, - {K_S_END, "\316\315"}, - {K_C_END, "\316u"}, - {K_PAGEDOWN, "\316Q"}, - {K_PAGEUP, "\316I"}, - {K_KPLUS, "\316N"}, - {K_KMINUS, "\316J"}, - {K_KMULTIPLY, "\316\067"}, - {K_K0, "\316\332"}, - {K_K1, "\316\336"}, - {K_K2, "\316\342"}, - {K_K3, "\316\346"}, - {K_K4, "\316\352"}, - {K_K5, "\316\356"}, - {K_K6, "\316\362"}, - {K_K7, "\316\366"}, - {K_K8, "\316\372"}, - {K_K9, "\316\376"}, -# endif - -# if defined(ALL_BUILTIN_TCAPS) - /* - * VT320 is working as an ANSI terminal compatible DEC terminal. - * (it covers VT1x0, VT2x0 and VT3x0 up to VT320 on VMS as well) - * Note: K_F1...K_F5 are for internal use, should not be defined. - * TODO:- rewrite ESC[ codes to CSI - * - keyboard languages (CSI ? 26 n) - */ - {(int)KS_NAME, "vt320"}, - {(int)KS_CE, "\033[K"}, - {(int)KS_AL, "\033[L"}, - {(int)KS_CAL, "\033[%dL"}, - {(int)KS_DL, "\033[M"}, - {(int)KS_CDL, "\033[%dM"}, - {(int)KS_CL, "\033[H\033[2J"}, - {(int)KS_CD, "\033[J"}, - {(int)KS_CCO, "8"}, /* allow 8 colors */ - {(int)KS_ME, "\033[0m"}, - {(int)KS_MR, "\033[7m"}, - {(int)KS_MD, "\033[1m"}, /* bold mode */ - {(int)KS_SE, "\033[22m"}, /* normal mode */ - {(int)KS_UE, "\033[24m"}, /* exit underscore mode */ - {(int)KS_US, "\033[4m"}, /* underscore mode */ - {(int)KS_CZH, "\033[34;43m"}, /* italic mode: blue text on yellow */ - {(int)KS_CZR, "\033[0m"}, /* italic mode end */ - {(int)KS_CAB, "\033[4%dm"}, /* set background color (ANSI) */ - {(int)KS_CAF, "\033[3%dm"}, /* set foreground color (ANSI) */ - {(int)KS_CSB, "\033[102;%dm"}, /* set screen background color */ - {(int)KS_CSF, "\033[101;%dm"}, /* set screen foreground color */ - {(int)KS_MS, "y"}, - {(int)KS_UT, "y"}, - {(int)KS_LE, "\b"}, - {(int)KS_CM, "\033[%i%d;%dH"}, - {(int)KS_CRI, "\033[%dC"}, - {K_UP, "\033[A"}, - {K_DOWN, "\033[B"}, - {K_RIGHT, "\033[C"}, - {K_LEFT, "\033[D"}, - {K_F1, "\033[11~"}, - {K_F2, "\033[12~"}, - {K_F3, "\033[13~"}, - {K_F4, "\033[14~"}, - {K_F5, "\033[15~"}, - {K_F6, "\033[17~"}, - {K_F7, "\033[18~"}, - {K_F8, "\033[19~"}, - {K_F9, "\033[20~"}, - {K_F10, "\033[21~"}, - {K_F11, "\033[23~"}, - {K_F12, "\033[24~"}, - {K_F13, "\033[25~"}, - {K_F14, "\033[26~"}, - {K_F15, "\033[28~"}, /* Help */ - {K_F16, "\033[29~"}, /* Select */ - {K_F17, "\033[31~"}, - {K_F18, "\033[32~"}, - {K_F19, "\033[33~"}, - {K_F20, "\033[34~"}, - {K_INS, "\033[2~"}, - {K_DEL, "\033[3~"}, - {K_HOME, "\033[1~"}, - {K_END, "\033[4~"}, - {K_PAGEUP, "\033[5~"}, - {K_PAGEDOWN, "\033[6~"}, - {K_KPLUS, "\033Ok"}, /* keypad plus */ - {K_KMINUS, "\033Om"}, /* keypad minus */ - {K_KDIVIDE, "\033Oo"}, /* keypad / */ - {K_KMULTIPLY, "\033Oj"}, /* keypad * */ - {K_KENTER, "\033OM"}, /* keypad Enter */ - {K_BS, "\x7f"}, /* for some reason 0177 doesn't work */ -# endif - -# if defined(ALL_BUILTIN_TCAPS) - /* - * Ordinary vt52 - */ - {(int)KS_NAME, "vt52"}, - {(int)KS_CE, "\033K"}, - {(int)KS_CD, "\033J"}, - {(int)KS_CM, "\033Y%+ %+ "}, - {(int)KS_LE, "\b"}, - {(int)KS_AL, "\033T"}, - {(int)KS_DL, "\033U"}, - {(int)KS_CL, "\033H\033J"}, - {(int)KS_ME, "\033SO"}, - {(int)KS_MR, "\033S2"}, - {(int)KS_MS, "y"}, -# endif - -# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) - {(int)KS_NAME, "xterm"}, - {(int)KS_CE, "\033[K"}, - {(int)KS_AL, "\033[L"}, - {(int)KS_CAL, "\033[%dL"}, - {(int)KS_DL, "\033[M"}, - {(int)KS_CDL, "\033[%dM"}, - {(int)KS_CS, "\033[%i%d;%dr"}, - {(int)KS_CL, "\033[H\033[2J"}, - {(int)KS_CD, "\033[J"}, - {(int)KS_ME, "\033[m"}, - {(int)KS_MR, "\033[7m"}, - {(int)KS_MD, "\033[1m"}, - {(int)KS_UE, "\033[m"}, - {(int)KS_US, "\033[4m"}, - {(int)KS_MS, "y"}, - {(int)KS_UT, "y"}, - {(int)KS_LE, "\b"}, - {(int)KS_CM, "\033[%i%d;%dH"}, - {(int)KS_SR, "\033M"}, - {(int)KS_CRI, "\033[%dC"}, - {(int)KS_KS, "\033[?1h\033="}, - {(int)KS_KE, "\033[?1l\033>"}, - {(int)KS_CIS, "\033]1;"}, - {(int)KS_CIE, "\007"}, - {(int)KS_TS, "\033]2;"}, - {(int)KS_FS, "\007"}, - {(int)KS_CWS, "\033[8;%d;%dt"}, - {(int)KS_CWP, "\033[3;%d;%dt"}, - {(int)KS_CRV, "\033[>c"}, - {(int)KS_U7, "\033[6n"}, - - {K_UP, "\033O*A"}, - {K_DOWN, "\033O*B"}, - {K_RIGHT, "\033O*C"}, - {K_LEFT, "\033O*D"}, - /* An extra set of cursor keys for vt100 mode */ - {K_XUP, "\033[1;*A"}, - {K_XDOWN, "\033[1;*B"}, - {K_XRIGHT, "\033[1;*C"}, - {K_XLEFT, "\033[1;*D"}, - /* An extra set of function keys for vt100 mode */ - {K_XF1, "\033O*P"}, - {K_XF2, "\033O*Q"}, - {K_XF3, "\033O*R"}, - {K_XF4, "\033O*S"}, - {K_F1, "\033[11;*~"}, - {K_F2, "\033[12;*~"}, - {K_F3, "\033[13;*~"}, - {K_F4, "\033[14;*~"}, - {K_F5, "\033[15;*~"}, - {K_F6, "\033[17;*~"}, - {K_F7, "\033[18;*~"}, - {K_F8, "\033[19;*~"}, - {K_F9, "\033[20;*~"}, - {K_F10, "\033[21;*~"}, - {K_F11, "\033[23;*~"}, - {K_F12, "\033[24;*~"}, - {K_S_TAB, "\033[Z"}, - {K_HELP, "\033[28;*~"}, - {K_UNDO, "\033[26;*~"}, - {K_INS, "\033[2;*~"}, - {K_HOME, "\033[1;*H"}, - /* {K_S_HOME, "\033O2H"}, */ - /* {K_C_HOME, "\033O5H"}, */ - {K_KHOME, "\033[1;*~"}, - {K_XHOME, "\033O*H"}, /* other Home */ - {K_ZHOME, "\033[7;*~"}, /* other Home */ - {K_END, "\033[1;*F"}, - /* {K_S_END, "\033O2F"}, */ - /* {K_C_END, "\033O5F"}, */ - {K_KEND, "\033[4;*~"}, - {K_XEND, "\033O*F"}, /* other End */ - {K_ZEND, "\033[8;*~"}, - {K_PAGEUP, "\033[5;*~"}, - {K_PAGEDOWN, "\033[6;*~"}, - {K_KPLUS, "\033O*k"}, /* keypad plus */ - {K_KMINUS, "\033O*m"}, /* keypad minus */ - {K_KDIVIDE, "\033O*o"}, /* keypad / */ - {K_KMULTIPLY, "\033O*j"}, /* keypad * */ - {K_KENTER, "\033O*M"}, /* keypad Enter */ - {K_KPOINT, "\033O*n"}, /* keypad . */ - {K_KDEL, "\033[3;*~"}, /* keypad Del */ - - {BT_EXTRA_KEYS, ""}, - {TERMCAP2KEY('k', '0'), "\033[10;*~"}, /* F0 */ - {TERMCAP2KEY('F', '3'), "\033[25;*~"}, /* F13 */ - /* F14 and F15 are missing, because they send the same codes as the undo - * and help key, although they don't work on all keyboards. */ - {TERMCAP2KEY('F', '6'), "\033[29;*~"}, /* F16 */ - {TERMCAP2KEY('F', '7'), "\033[31;*~"}, /* F17 */ - {TERMCAP2KEY('F', '8'), "\033[32;*~"}, /* F18 */ - {TERMCAP2KEY('F', '9'), "\033[33;*~"}, /* F19 */ - {TERMCAP2KEY('F', 'A'), "\033[34;*~"}, /* F20 */ - - {TERMCAP2KEY('F', 'B'), "\033[42;*~"}, /* F21 */ - {TERMCAP2KEY('F', 'C'), "\033[43;*~"}, /* F22 */ - {TERMCAP2KEY('F', 'D'), "\033[44;*~"}, /* F23 */ - {TERMCAP2KEY('F', 'E'), "\033[45;*~"}, /* F24 */ - {TERMCAP2KEY('F', 'F'), "\033[46;*~"}, /* F25 */ - {TERMCAP2KEY('F', 'G'), "\033[47;*~"}, /* F26 */ - {TERMCAP2KEY('F', 'H'), "\033[48;*~"}, /* F27 */ - {TERMCAP2KEY('F', 'I'), "\033[49;*~"}, /* F28 */ - {TERMCAP2KEY('F', 'J'), "\033[50;*~"}, /* F29 */ - {TERMCAP2KEY('F', 'K'), "\033[51;*~"}, /* F30 */ - - {TERMCAP2KEY('F', 'L'), "\033[52;*~"}, /* F31 */ - {TERMCAP2KEY('F', 'M'), "\033[53;*~"}, /* F32 */ - {TERMCAP2KEY('F', 'N'), "\033[54;*~"}, /* F33 */ - {TERMCAP2KEY('F', 'O'), "\033[55;*~"}, /* F34 */ - {TERMCAP2KEY('F', 'P'), "\033[56;*~"}, /* F35 */ - {TERMCAP2KEY('F', 'Q'), "\033[57;*~"}, /* F36 */ - {TERMCAP2KEY('F', 'R'), "\033[58;*~"}, /* F37 */ -# endif - -# if defined(DEBUG) || defined(ALL_BUILTIN_TCAPS) - /* - * for debugging - */ - {(int)KS_NAME, "debug"}, - {(int)KS_CE, "[CE]"}, - {(int)KS_CD, "[CD]"}, - {(int)KS_AL, "[AL]"}, - {(int)KS_CAL, "[CAL%d]"}, - {(int)KS_DL, "[DL]"}, - {(int)KS_CDL, "[CDL%d]"}, - {(int)KS_CS, "[%dCS%d]"}, - {(int)KS_CSV, "[%dCSV%d]"}, - {(int)KS_CAB, "[CAB%d]"}, - {(int)KS_CAF, "[CAF%d]"}, - {(int)KS_CSB, "[CSB%d]"}, - {(int)KS_CSF, "[CSF%d]"}, - {(int)KS_OP, "[OP]"}, - {(int)KS_LE, "[LE]"}, - {(int)KS_CL, "[CL]"}, - {(int)KS_VI, "[VI]"}, - {(int)KS_VE, "[VE]"}, - {(int)KS_VS, "[VS]"}, - {(int)KS_ME, "[ME]"}, - {(int)KS_MR, "[MR]"}, - {(int)KS_MB, "[MB]"}, - {(int)KS_MD, "[MD]"}, - {(int)KS_SE, "[SE]"}, - {(int)KS_SO, "[SO]"}, - {(int)KS_UE, "[UE]"}, - {(int)KS_US, "[US]"}, - {(int)KS_UCE, "[UCE]"}, - {(int)KS_UCS, "[UCS]"}, - {(int)KS_MS, "[MS]"}, - {(int)KS_UT, "[UT]"}, - {(int)KS_CM, "[%dCM%d]"}, - {(int)KS_SR, "[SR]"}, - {(int)KS_CRI, "[CRI%d]"}, - {(int)KS_VB, "[VB]"}, - {(int)KS_KS, "[KS]"}, - {(int)KS_KE, "[KE]"}, - {(int)KS_TI, "[TI]"}, - {(int)KS_TE, "[TE]"}, - {(int)KS_CIS, "[CIS]"}, - {(int)KS_CIE, "[CIE]"}, - {(int)KS_TS, "[TS]"}, - {(int)KS_FS, "[FS]"}, - {(int)KS_CWS, "[%dCWS%d]"}, - {(int)KS_CWP, "[%dCWP%d]"}, - {(int)KS_CRV, "[CRV]"}, - {(int)KS_U7, "[U7]"}, - {K_UP, "[KU]"}, - {K_DOWN, "[KD]"}, - {K_LEFT, "[KL]"}, - {K_RIGHT, "[KR]"}, - {K_XUP, "[xKU]"}, - {K_XDOWN, "[xKD]"}, - {K_XLEFT, "[xKL]"}, - {K_XRIGHT, "[xKR]"}, - {K_S_UP, "[S-KU]"}, - {K_S_DOWN, "[S-KD]"}, - {K_S_LEFT, "[S-KL]"}, - {K_C_LEFT, "[C-KL]"}, - {K_S_RIGHT, "[S-KR]"}, - {K_C_RIGHT, "[C-KR]"}, - {K_F1, "[F1]"}, - {K_XF1, "[xF1]"}, - {K_F2, "[F2]"}, - {K_XF2, "[xF2]"}, - {K_F3, "[F3]"}, - {K_XF3, "[xF3]"}, - {K_F4, "[F4]"}, - {K_XF4, "[xF4]"}, - {K_F5, "[F5]"}, - {K_F6, "[F6]"}, - {K_F7, "[F7]"}, - {K_F8, "[F8]"}, - {K_F9, "[F9]"}, - {K_F10, "[F10]"}, - {K_F11, "[F11]"}, - {K_F12, "[F12]"}, - {K_S_F1, "[S-F1]"}, - {K_S_XF1, "[S-xF1]"}, - {K_S_F2, "[S-F2]"}, - {K_S_XF2, "[S-xF2]"}, - {K_S_F3, "[S-F3]"}, - {K_S_XF3, "[S-xF3]"}, - {K_S_F4, "[S-F4]"}, - {K_S_XF4, "[S-xF4]"}, - {K_S_F5, "[S-F5]"}, - {K_S_F6, "[S-F6]"}, - {K_S_F7, "[S-F7]"}, - {K_S_F8, "[S-F8]"}, - {K_S_F9, "[S-F9]"}, - {K_S_F10, "[S-F10]"}, - {K_S_F11, "[S-F11]"}, - {K_S_F12, "[S-F12]"}, - {K_HELP, "[HELP]"}, - {K_UNDO, "[UNDO]"}, - {K_BS, "[BS]"}, - {K_INS, "[INS]"}, - {K_KINS, "[KINS]"}, - {K_DEL, "[DEL]"}, - {K_KDEL, "[KDEL]"}, - {K_HOME, "[HOME]"}, - {K_S_HOME, "[C-HOME]"}, - {K_C_HOME, "[C-HOME]"}, - {K_KHOME, "[KHOME]"}, - {K_XHOME, "[XHOME]"}, - {K_ZHOME, "[ZHOME]"}, - {K_END, "[END]"}, - {K_S_END, "[C-END]"}, - {K_C_END, "[C-END]"}, - {K_KEND, "[KEND]"}, - {K_XEND, "[XEND]"}, - {K_ZEND, "[ZEND]"}, - {K_PAGEUP, "[PAGEUP]"}, - {K_PAGEDOWN, "[PAGEDOWN]"}, - {K_KPAGEUP, "[KPAGEUP]"}, - {K_KPAGEDOWN, "[KPAGEDOWN]"}, - {K_MOUSE, "[MOUSE]"}, - {K_KPLUS, "[KPLUS]"}, - {K_KMINUS, "[KMINUS]"}, - {K_KDIVIDE, "[KDIVIDE]"}, - {K_KMULTIPLY, "[KMULTIPLY]"}, - {K_KENTER, "[KENTER]"}, - {K_KPOINT, "[KPOINT]"}, - {K_K0, "[K0]"}, - {K_K1, "[K1]"}, - {K_K2, "[K2]"}, - {K_K3, "[K3]"}, - {K_K4, "[K4]"}, - {K_K5, "[K5]"}, - {K_K6, "[K6]"}, - {K_K7, "[K7]"}, - {K_K8, "[K8]"}, - {K_K9, "[K9]"}, -# endif - -#endif /* NO_BUILTIN_TCAPS */ - - /* - * The most minimal terminal: only clear screen and cursor positioning - * Always included. - */ - {(int)KS_NAME, "dumb"}, - {(int)KS_CL, "\014"}, - {(int)KS_CM, "\033[%i%d;%dH"}, - - /* - * end marker - */ {(int)KS_NAME, NULL} }; /* end of builtin_termcaps */ @@ -1029,31 +411,6 @@ int set_termname(char_u *term) # define HMT_URXVT 16 # define HMT_SGR 32 -void -set_mouse_termcode ( - char_u n, /* KS_MOUSE, KS_NETTERM_MOUSE or KS_DEC_MOUSE */ - char_u *s -) -{ - char_u name[2] = { n, KE_FILLER }; - - add_termcode(name, s, FALSE); -} - -# if (defined(UNIX) && defined(FEAT_MOUSE_TTY)) -void -del_mouse_termcode ( - char_u n /* KS_MOUSE, KS_NETTERM_MOUSE or KS_DEC_MOUSE */ -) -{ - char_u name[2] = { n, KE_FILLER }; - - del_termcode(name); -} -# endif - - - /* * Get a string entry from the termcap and add it to the list of termcodes. * Used for special keys.