Mercurial > vim
changeset 27490:fb4c30606b4a v8.2.4273
patch 8.2.4273: the EBCDIC support is outdated
Commit: https://github.com/vim/vim/commit/424bcae1fb0f69e0aef5e0cf84fd771cf34a0fb7
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 31 14:59:41 2022 +0000
patch 8.2.4273: the EBCDIC support is outdated
Problem: The EBCDIC support is outdated.
Solution: Remove the EBCDIC support.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 31 Jan 2022 16:00:09 +0100 |
parents | 9f00e1edb43c |
children | 1836c6b25222 |
files | src/ascii.h src/charset.c src/cindent.c src/digraph.c src/edit.c src/eval.c src/evalfunc.c src/ex_cmds.c src/feature.h src/filepath.c src/findfile.c src/getchar.c src/gui.c src/gui_motif.c src/hardcopy.c src/help.c src/macros.h src/map.c src/mark.c src/misc2.c src/normal.c src/ops.c src/option.c src/option.h src/optiondefs.h src/os_unix.c src/proto/evalfunc.pro src/regexp.c src/regexp_bt.c src/regexp_nfa.c src/register.c src/screen.c src/spell.c src/strings.c src/structs.h src/term.c src/testdir/test_edit.vim src/testdir/test_exec_while_if.vim src/testdir/test_expr.vim src/testdir/test_gf.vim src/testdir/test_regexp_utf8.vim src/version.c src/viminfo.c |
diffstat | 43 files changed, 433 insertions(+), 1306 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ascii.h +++ b/src/ascii.h @@ -8,14 +8,8 @@ /* * Definitions of various common control characters. - * For EBCDIC we have to use different values. */ -#ifndef EBCDIC - -// IF_EB(ASCII_constant, EBCDIC_constant) -#define IF_EB(a, b) a - #define CharOrd(x) ((x) < 'a' ? (x) - 'A' : (x) - 'a') #define CharOrdLow(x) ((x) - 'a') #define CharOrdUp(x) ((x) - 'A') @@ -77,94 +71,6 @@ #define Ctrl_HAT 30 // ^ #define Ctrl__ 31 -#else - -// EBCDIC - -// IF_EB(ASCII_constant, EBCDIC_constant) -#define IF_EB(a, b) b - -/* - * Finding the position in the alphabet is not straightforward in EBCDIC. - * There are gaps in the code table. - * 'a' + 1 == 'b', but: 'i' + 7 == 'j' and 'r' + 8 == 's' - */ -#define CharOrd__(c) ((c) < ('j' - 'a') ? (c) : ((c) < ('s' - 'a') ? (c) - 7 : (c) - 7 - 8)) -#define CharOrdLow(x) (CharOrd__((x) - 'a')) -#define CharOrdUp(x) (CharOrd__((x) - 'A')) -#define CharOrd(x) (isupper(x) ? CharOrdUp(x) : CharOrdLow(x)) - -#define EBCDIC_CHAR_ADD_(x) ((x) < 0?'a':(x)>25?'z':"abcdefghijklmnopqrstuvwxyz"[x]) -#define EBCDIC_CHAR_ADD(c,s) (isupper(c) ? toupper(EBCDIC_CHAR_ADD_(CharOrdUp(c)+(s))) : EBCDIC_CHAR_ADD_(CharOrdLow(c)+(s))) - -#define R13_(c) ("abcdefghijklmnopqrstuvwxyz"[((c) + 13) % 26]) -#define ROT13(c, a) (isupper(c) ? toupper(R13_(CharOrdUp(c))) : R13_(CharOrdLow(c))) - -#define NUL '\000' -#define BELL '\x2f' -#define BS '\x16' -#define TAB '\x05' -#define NL '\x15' -#define NL_STR (char_u *)"\x15" -#define FF '\x0C' -#define CAR '\x0D' -#define ESC '\x27' -#define ESC_STR (char_u *)"\x27" -#define ESC_STR_nc "\x27" -#define DEL 0x07 -#define DEL_STR (char_u *)"\007" - -#define POUND 0xB1 - -#define CTRL_F_STR "\056" -#define CTRL_H_STR "\026" -#define CTRL_V_STR "\062" - -#define Ctrl_AT 0x00 // @ -#define Ctrl_A 0x01 -#define Ctrl_B 0x02 -#define Ctrl_C 0x03 -#define Ctrl_D 0x37 -#define Ctrl_E 0x2D -#define Ctrl_F 0x2E -#define Ctrl_G 0x2F -#define Ctrl_H 0x16 -#define Ctrl_I 0x05 -#define Ctrl_J 0x15 -#define Ctrl_K 0x0B -#define Ctrl_L 0x0C -#define Ctrl_M 0x0D -#define Ctrl_N 0x0E -#define Ctrl_O 0x0F -#define Ctrl_P 0x10 -#define Ctrl_Q 0x11 -#define Ctrl_R 0x12 -#define Ctrl_S 0x13 -#define Ctrl_T 0x3C -#define Ctrl_U 0x3D -#define Ctrl_V 0x32 -#define Ctrl_W 0x26 -#define Ctrl_X 0x18 -#define Ctrl_Y 0x19 -#define Ctrl_Z 0x3F - // CTRL- [ Left Square Bracket == ESC -#define Ctrl_RSB 0x1D // ] Right Square Bracket -#define Ctrl_BSL 0x1C // \ BackSLash -#define Ctrl_HAT 0x1E // ^ -#define Ctrl__ 0x1F - -#define Ctrl_chr(x) (CtrlTable[(x)]) -extern char CtrlTable[]; - -#define CtrlChar(x) ((x < ' ') ? CtrlCharTable[(x)] : 0) -extern char CtrlCharTable[]; - -#define MetaChar(x) ((x < ' ') ? MetaCharTable[(x)] : 0) -extern char MetaCharTable[]; - -#endif // defined EBCDIC - -// TODO: EBCDIC Code page dependent (here 1047) #define CSI 0x9b // Control Sequence Introducer #define CSI_STR "\233" #define DCS 0x90 // Device Control String
--- a/src/charset.c +++ b/src/charset.c @@ -87,18 +87,11 @@ buf_init_chartab( * Set the default size for printable characters: * From <Space> to '~' is 1 (printable), others are 2 (not printable). * This also inits all 'isident' and 'isfname' flags to FALSE. - * - * EBCDIC: all chars below ' ' are not printable, all others are - * printable. */ c = 0; while (c < ' ') g_chartab[c++] = (dy_flags & DY_UHEX) ? 4 : 2; -#ifdef EBCDIC - while (c < 255) -#else while (c <= '~') -#endif g_chartab[c++] = 1 + CT_PRINT_CHAR; while (c < 256) { @@ -221,10 +214,7 @@ buf_init_chartab( } else if (i == 1) // (re)set printable { - if ((c < ' ' -#ifndef EBCDIC - || c > '~' -#endif + if ((c < ' ' || c > '~' // For double-byte we keep the cell width, so // that we can detect it from the first byte. ) && !(enc_dbcs && MB_BYTE2LEN(c) == 2)) @@ -519,13 +509,8 @@ transchar_buf(buf_T *buf, int c) c = K_SECOND(c); } - if ((!chartab_initialized && ( -#ifdef EBCDIC - (c >= 64 && c < 255) -#else - (c >= ' ' && c <= '~') -#endif - )) || (c < 256 && vim_isprintc_strict(c))) + if ((!chartab_initialized && ((c >= ' ' && c <= '~'))) + || (c < 256 && vim_isprintc_strict(c))) { // printable character transchar_charbuf[i] = c; @@ -567,56 +552,26 @@ transchar_nonprint(buf_T *buf, char_u *c if (dy_flags & DY_UHEX) // 'display' has "uhex" transchar_hex(charbuf, c); -#ifdef EBCDIC - // For EBCDIC only the characters 0-63 and 255 are not printable - else if (CtrlChar(c) != 0 || c == DEL) -#else else if (c <= 0x7f) // 0x00 - 0x1f and 0x7f -#endif { charbuf[0] = '^'; -#ifdef EBCDIC - if (c == DEL) - charbuf[1] = '?'; // DEL displayed as ^? - else - charbuf[1] = CtrlChar(c); -#else charbuf[1] = c ^ 0x40; // DEL displayed as ^? -#endif - charbuf[2] = NUL; } else if (enc_utf8 && c >= 0x80) { transchar_hex(charbuf, c); } -#ifndef EBCDIC else if (c >= ' ' + 0x80 && c <= '~' + 0x80) // 0xa0 - 0xfe { charbuf[0] = '|'; charbuf[1] = c - 0x80; charbuf[2] = NUL; } -#else - else if (c < 64) - { - charbuf[0] = '~'; - charbuf[1] = MetaChar(c); - charbuf[2] = NUL; - } -#endif else // 0x80 - 0x9f and 0xff { - /* - * TODO: EBCDIC I don't know what to do with this chars, so I display - * them as '~?' for now - */ charbuf[0] = '~'; -#ifdef EBCDIC - charbuf[1] = '?'; // 0xff displayed as ~? -#else charbuf[1] = (c - 0x80) ^ 0x40; // 0xff displayed as ~? -#endif charbuf[2] = NUL; } } @@ -2134,59 +2089,3 @@ backslash_halve_save(char_u *p) backslash_halve(res); return res; } - -#if (defined(EBCDIC) && defined(FEAT_POSTSCRIPT)) || defined(PROTO) -/* - * Table for EBCDIC to ASCII conversion unashamedly taken from xxd.c! - * The first 64 entries have been added to map control characters defined in - * ascii.h - */ -static char_u ebcdic2ascii_tab[256] = -{ - 0000, 0001, 0002, 0003, 0004, 0011, 0006, 0177, - 0010, 0011, 0012, 0013, 0014, 0015, 0016, 0017, - 0020, 0021, 0022, 0023, 0024, 0012, 0010, 0027, - 0030, 0031, 0032, 0033, 0033, 0035, 0036, 0037, - 0040, 0041, 0042, 0043, 0044, 0045, 0046, 0047, - 0050, 0051, 0052, 0053, 0054, 0055, 0056, 0057, - 0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067, - 0070, 0071, 0072, 0073, 0074, 0075, 0076, 0077, - 0040, 0240, 0241, 0242, 0243, 0244, 0245, 0246, - 0247, 0250, 0325, 0056, 0074, 0050, 0053, 0174, - 0046, 0251, 0252, 0253, 0254, 0255, 0256, 0257, - 0260, 0261, 0041, 0044, 0052, 0051, 0073, 0176, - 0055, 0057, 0262, 0263, 0264, 0265, 0266, 0267, - 0270, 0271, 0313, 0054, 0045, 0137, 0076, 0077, - 0272, 0273, 0274, 0275, 0276, 0277, 0300, 0301, - 0302, 0140, 0072, 0043, 0100, 0047, 0075, 0042, - 0303, 0141, 0142, 0143, 0144, 0145, 0146, 0147, - 0150, 0151, 0304, 0305, 0306, 0307, 0310, 0311, - 0312, 0152, 0153, 0154, 0155, 0156, 0157, 0160, - 0161, 0162, 0136, 0314, 0315, 0316, 0317, 0320, - 0321, 0345, 0163, 0164, 0165, 0166, 0167, 0170, - 0171, 0172, 0322, 0323, 0324, 0133, 0326, 0327, - 0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337, - 0340, 0341, 0342, 0343, 0344, 0135, 0346, 0347, - 0173, 0101, 0102, 0103, 0104, 0105, 0106, 0107, - 0110, 0111, 0350, 0351, 0352, 0353, 0354, 0355, - 0175, 0112, 0113, 0114, 0115, 0116, 0117, 0120, - 0121, 0122, 0356, 0357, 0360, 0361, 0362, 0363, - 0134, 0237, 0123, 0124, 0125, 0126, 0127, 0130, - 0131, 0132, 0364, 0365, 0366, 0367, 0370, 0371, - 0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067, - 0070, 0071, 0372, 0373, 0374, 0375, 0376, 0377 -}; - -/* - * Convert a buffer worth of characters from EBCDIC to ASCII. Only useful if - * wanting 7-bit ASCII characters out the other end. - */ - void -ebcdic2ascii(char_u *buffer, int len) -{ - int i; - - for (i = 0; i < len; i++) - buffer[i] = ebcdic2ascii_tab[buffer[i]]; -} -#endif
--- a/src/cindent.c +++ b/src/cindent.c @@ -3946,13 +3946,7 @@ in_cinkeys( try_match_word = FALSE; // does it look like a control character? - if (*look == '^' -#ifdef EBCDIC - && (Ctrl_chr(look[1]) != 0) -#else - && look[1] >= '?' && look[1] <= '_' -#endif - ) + if (*look == '^' && look[1] >= '?' && look[1] <= '_') { if (try_match && keytyped == Ctrl_chr(look[1])) return TRUE;
--- a/src/digraph.c +++ b/src/digraph.c @@ -138,119 +138,7 @@ static digr_T digraphdefault[] = }; #else // !HPUX_DIGRAPHS - -# ifdef EBCDIC - - /* - * EBCDIC - ISO digraphs - * TODO: EBCDIC Table is Code-Page 1047 - */ - {{'a', '^', 66}, // â - {'a', '"', 67}, // ä - {'a', '`', 68}, // à - {'a', '\'', 69}, // á - {'a', '~', 70}, // ã - {'a', '@', 71}, // å - {'a', 'a', 71}, // å - {'c', ',', 72}, // ç - {'n', '~', 73}, // ñ - {'c', '|', 74}, // ¢ - {'e', '\'', 81}, // é - {'e', '^', 82}, // ê - {'e', '"', 83}, // ë - {'e', '`', 84}, // è - {'i', '\'', 85}, // í - {'i', '^', 86}, // î - {'i', '"', 87}, // ï - {'i', '`', 88}, // ì - {'s', 's', 89}, // ß - {'A', '^', 98}, // Â - {'A', '"', 99}, // Ä - {'A', '`', 100}, // À - {'A', '\'', 101}, // Á - {'A', '~', 102}, // Ã - {'A', '@', 103}, // Å - {'A', 'A', 103}, // Å - {'C', ',', 104}, // Ç - {'N', '~', 105}, // Ñ - {'|', '|', 106}, // ¦ - {'o', '/', 112}, // ø - {'E', '\'', 113}, // É - {'E', '^', 114}, // Ê - {'E', '"', 115}, // Ë - {'E', '`', 116}, // È - {'I', '\'', 117}, // Í - {'I', '^', 118}, // Î - {'I', '"', 119}, // Ï - {'I', '`', 120}, // Ì - {'O', '/', 128}, // 0/ XX - {'<', '<', 138}, // « - {'>', '>', 139}, // » - {'d', '-', 140}, // ð - {'y', '\'', 141}, // ý - {'i', 'p', 142}, // þ - {'+', '-', 143}, // ± - {'~', 'o', 144}, // ° - {'a', '-', 154}, // ª - {'o', '-', 155}, // º - {'a', 'e', 156}, // æ - {',', ',', 157}, // , XX - {'A', 'E', 158}, // Æ - {'o', 'x', 159}, // ¤ - currency symbol in ISO 8859-1 - {'e', '=', 159}, // ¤ - euro symbol in ISO 8859-15 - {'E', 'u', 159}, // ¤ - euro symbol in ISO 8859-15 - {'j', 'u', 160}, // µ - {'y', '"', 167}, // x XX - {'~', '!', 170}, // ¡ - {'~', '?', 171}, // ¿ - {'D', '-', 172}, // Ð - {'I', 'p', 174}, // Þ - {'r', 'O', 175}, // ® - {'-', ',', 176}, // ¬ - {'$', '$', 177}, // £ - {'Y', '-', 178}, // ¥ - {'~', '.', 179}, // · - {'c', 'O', 180}, // © - {'p', 'a', 181}, // § - {'p', 'p', 182}, // ¶ - {'1', '4', 183}, // ¼ - {'1', '2', 184}, // ½ - {'3', '4', 185}, // ¾ - {'Y', '\'', 186}, // Ý - {'"', '"', 187}, // ¨ - {'-', '=', 188}, // ¯ - {'\'', '\'', 190}, // ´ - {'O', 'E', 191}, // × - OE in ISO 8859-15 - {'/', '\\', 191}, // × - multiplication symbol in ISO 8859-1 - {'-', '-', 202}, // - {'o', '^', 203}, // ô - {'o', '"', 204}, // ö - {'o', '`', 205}, // ò - {'o', '\'', 206}, // ó - {'o', '~', 207}, // õ - {'1', '1', 218}, // ¹ - {'u', '^', 219}, // û - {'u', '"', 220}, // ü - {'u', '`', 221}, // ù - {'u', '\'', 222}, // ú - {':', '-', 225}, // ÷ - division symbol in ISO 8859-1 - {'o', 'e', 225}, // ÷ - oe in ISO 8859-15 - {'2', '2', 234}, // ² - {'O', '^', 235}, // Ô - {'O', '"', 236}, // Ö - {'O', '`', 237}, // Ò - {'O', '\'', 238}, // Ó - {'O', '~', 239}, // Õ - {'3', '3', 250}, // ³ - {'U', '^', 251}, // Û - {'U', '"', 252}, // Ü - {'U', '`', 253}, // Ù - {'U', '\'', 254}, // Ú - {NUL, NUL, NUL} - }; - -# else // EBCDIC -# ifdef OLD_DIGRAPHS +# ifdef OLD_DIGRAPHS /* * digraphs compatible with Vim 5.x @@ -357,7 +245,7 @@ static digr_T digraphdefault[] = {'y', '"', 255}, // x XX {NUL, NUL, NUL} }; -# else // OLD_DIGRAPHS +# else // OLD_DIGRAPHS /* * digraphs for Unicode from RFC1345 @@ -1761,8 +1649,7 @@ static digr_T digraphdefault[] = {NUL, NUL, NUL} }; -# endif // OLD_DIGRAPHS -# endif // EBCDIC +# endif // OLD_DIGRAPHS #endif // !HPUX_DIGRAPHS /*
--- a/src/edit.c +++ b/src/edit.c @@ -2052,11 +2052,7 @@ insert_special( * stop and defer processing to the "normal" mechanism. * '0' and '^' are special, because they can be followed by CTRL-D. */ -#ifdef EBCDIC -# define ISSPECIAL(c) ((c) < ' ' || (c) == '0' || (c) == '^') -#else -# define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^') -#endif +#define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^') /* * "flags": INSCHAR_FORMAT - force formatting @@ -2926,9 +2922,8 @@ stuff_inserted( stuffReadbuff(ptr); // a trailing "0" is inserted as "<C-V>048", "^" as "<C-V>^" if (last) - stuffReadbuff((char_u *)(last == '0' - ? IF_EB("\026\060\064\070", CTRL_V_STR "xf0") - : IF_EB("\026^", CTRL_V_STR "^"))); + stuffReadbuff( + (char_u *)(last == '0' ? "\026\060\064\070" : "\026^")); } while (--count > 0); @@ -3316,15 +3311,11 @@ hkmap(int c) return ' '; // \"a --> ' ' -- / -- else if (c == 252) return ' '; // \"u --> ' ' -- / -- -#ifdef EBCDIC - else if (islower(c)) -#else // NOTE: islower() does not do the right thing for us on Linux so we // do this the same was as 5.7 and previous, so it works correctly on // all systems. Specifically, the e.g. Delete and Arrow keys are // munged and won't work if e.g. searching for Hebrew text. else if (c >= 'a' && c <= 'z') -#endif return (int)(map[CharOrdLow(c)] + p_aleph); else return c; @@ -3346,12 +3337,7 @@ hkmap(int c) default: { static char str[] = "zqbcxlsjphmkwonu ydafe rig"; -#ifdef EBCDIC - // see note about islower() above - if (!islower(c)) -#else if (c < 'a' || c > 'z') -#endif return c; c = str[CharOrdLow(c)]; break; @@ -4224,7 +4210,7 @@ ins_bs( } else want_vcol = tabstop_start(want_vcol, get_sts_value(), - curbuf->b_p_vsts_array); + curbuf->b_p_vsts_array); #else if (p_sta && in_indent) ts = (int)get_sw_value(curbuf);
--- a/src/eval.c +++ b/src/eval.c @@ -111,13 +111,6 @@ eval_init(void) { evalvars_init(); func_init(); - -#ifdef EBCDIC - /* - * Sort the function table, to enable binary search. - */ - sortFunctions(); -#endif } #if defined(EXITFREE) || defined(PROTO)
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2467,33 +2467,6 @@ static funcentry_T global_functions[] = ret_number, f_xor}, }; -#if defined(EBCDIC) || defined(PROTO) -/* - * Compare funcentry_T by function name. - */ - static int -compare_func_name(const void *s1, const void *s2) -{ - funcentry_T *p1 = (funcentry_T *)s1; - funcentry_T *p2 = (funcentry_T *)s2; - - return STRCMP(p1->f_name, p2->f_name); -} - -/* - * Sort the function table by function name. - * The sorting of the table above is ASCII dependent. - * On machines using EBCDIC we have to sort it. - */ - void -sortFunctions(void) -{ - size_t funcCnt = ARRAY_LENGTH(global_functions); - - qsort(global_functions, funcCnt, sizeof(funcentry_T), compare_func_name); -} -#endif - /* * Function given to ExpandGeneric() to obtain the list of internal * or user defined function names. @@ -5101,13 +5074,7 @@ f_has(typval_T *argvars, typval_T *rettv 0 #endif }, - {"ebcdic", -#ifdef EBCDIC - 1 -#else - 0 -#endif - }, + {"ebcdic", 0 }, {"fname_case", #ifndef CASE_INSENSITIVE_FILENAME 1
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -61,23 +61,17 @@ do_ascii(exarg_T *eap UNUSED) cval = NL; // NL is stored as CR else cval = c; - if (vim_isprintc_strict(c) && (c < ' ' -#ifndef EBCDIC - || c > '~' -#endif - )) + if (vim_isprintc_strict(c) && (c < ' ' || c > '~')) { transchar_nonprint(curbuf, buf3, c); vim_snprintf(buf1, sizeof(buf1), " <%s>", (char *)buf3); } else buf1[0] = NUL; -#ifndef EBCDIC if (c >= 0x80) vim_snprintf(buf2, sizeof(buf2), " <M-%s>", (char *)transchar(c & 0x7f)); else -#endif buf2[0] = NUL; #ifdef FEAT_DIGRAPHS dig = get_digraph_for_char(cval); @@ -1506,7 +1500,7 @@ do_shell( } else if (term_console) { - OUT_STR(IF_EB("\033[0 q", ESC_STR "[0 q")); // get window size + OUT_STR("\033[0 q"); // get window size if (got_int && msg_silent == 0) redraw_later_clear(); // if got_int is TRUE, redraw needed else
--- a/src/feature.h +++ b/src/feature.h @@ -222,20 +222,16 @@ /* * +rightleft Right-to-left editing/typing support. - * - * Disabled for EBCDIC as it requires multibyte. */ -#if defined(FEAT_BIG) && !defined(DISABLE_RIGHTLEFT) && !defined(EBCDIC) +#if defined(FEAT_BIG) && !defined(DISABLE_RIGHTLEFT) # define FEAT_RIGHTLEFT #endif /* * +arabic Arabic keymap and shaping support. * Requires FEAT_RIGHTLEFT - * - * Disabled for EBCDIC as it requires multibyte. */ -#if defined(FEAT_BIG) && !defined(DISABLE_ARABIC) && !defined(EBCDIC) +#if defined(FEAT_BIG) && !defined(DISABLE_ARABIC) # define FEAT_ARABIC #endif #ifdef FEAT_ARABIC @@ -254,16 +250,8 @@ /* * +tag_binary Can use a binary search for the tags file. - * - * Disabled for EBCDIC: - * On z/OS Unix we have the problem that /bin/sort sorts ASCII instead of - * EBCDIC. With this binary search doesn't work, as VIM expects a tag file - * sorted by character values. I'm not sure how to fix this. Should we really - * do a EBCDIC to ASCII conversion for this?? */ -#if !defined(EBCDIC) -# define FEAT_TAG_BINS -#endif +#define FEAT_TAG_BINS /* * +cscope Unix only: Cscope support. @@ -416,10 +404,8 @@ /* * +spell spell checking - * - * Disabled for EBCDIC: * Doesn't work (SIGSEGV). */ -#if (defined(FEAT_NORMAL) || defined(PROTO)) && !defined(EBCDIC) +#if (defined(FEAT_NORMAL) || defined(PROTO)) # define FEAT_SPELL #endif
--- a/src/filepath.c +++ b/src/filepath.c @@ -2208,16 +2208,7 @@ f_tempname(typval_T *argvars UNUSED, typ else if (x == '9') x = 'A'; else - { -#ifdef EBCDIC - if (x == 'I') - x = 'J'; - else if (x == 'R') - x = 'S'; - else -#endif - ++x; - } + ++x; } while (x == 'I' || x == 'O'); }
--- a/src/findfile.c +++ b/src/findfile.c @@ -489,7 +489,6 @@ vim_findfile_init( * The octet after a '**' is used as a (binary) counter. * So '**3' is transposed to '**^C' ('^C' is ASCII value 3) * or '**76' is transposed to '**N'( 'N' is ASCII value 76). - * For EBCDIC you get different character values. * If no restrict is given after '**' the default is used. * Due to this technique the path looks awful if you print it as a * string.
--- a/src/getchar.c +++ b/src/getchar.c @@ -571,11 +571,7 @@ AppendToRedobuffLit( // Put a string of normal characters in the redo buffer (that's // faster). start = s; - while (*s >= ' ' -#ifndef EBCDIC - && *s < DEL // EBCDIC: all chars above space are normal -#endif - && (len < 0 || s - str < len)) + while (*s >= ' ' && *s < DEL && (len < 0 || s - str < len)) ++s; // Don't put '0' or '^' as last character, just in case a CTRL-D is @@ -597,13 +593,9 @@ AppendToRedobuffLit( if (c < ' ' || c == DEL || (*s == NUL && (c == '0' || c == '^'))) add_char_buff(&redobuff, Ctrl_V); - // CTRL-V '0' must be inserted as CTRL-V 048 (EBCDIC: xf0) + // CTRL-V '0' must be inserted as CTRL-V 048 if (*s == NUL && c == '0') -#ifdef EBCDIC - add_buff(&redobuff, (char_u *)"xf0", 3L); -#else add_buff(&redobuff, (char_u *)"048", 3L); -#endif else add_char_buff(&redobuff, c); } @@ -721,11 +713,7 @@ stuffescaped(char_u *arg, int literally) // stuff K_SPECIAL to get the effect of a special key when "literally" // is TRUE. start = arg; - while ((*arg >= ' ' -#ifndef EBCDIC - && *arg < DEL // EBCDIC: chars above space are normal -#endif - ) + while ((*arg >= ' ' && *arg < DEL) || (*arg == K_SPECIAL && !literally)) ++arg; if (arg > start)
--- a/src/gui.c +++ b/src/gui.c @@ -1835,7 +1835,7 @@ gui_clear_block( void gui_update_cursor_later(void) { - OUT_STR(IF_EB("\033|s", ESC_STR "|s")); + OUT_STR("\033|s"); } void @@ -1962,12 +1962,7 @@ gui_write( len -= (int)(++p - s); s = p; } - else if ( -#ifdef EBCDIC - CtrlChar(s[0]) != 0 // Ctrl character -#else - s[0] < 0x20 // Ctrl character -#endif + else if (s[0] < 0x20 // Ctrl character #ifdef FEAT_SIGN_ICONS && s[0] != SIGN_BYTE # ifdef FEAT_NETBEANS_INTG @@ -2010,11 +2005,7 @@ gui_write( { p = s; while (len > 0 && ( -#ifdef EBCDIC - CtrlChar(*p) == 0 -#else *p >= 0x20 -#endif #ifdef FEAT_SIGN_ICONS || *p == SIGN_BYTE # ifdef FEAT_NETBEANS_INTG
--- a/src/gui_motif.c +++ b/src/gui_motif.c @@ -1259,10 +1259,6 @@ gui_mch_add_menu_item(vimmenu_T *menu, i XmString label; vimmenu_T *parent = menu->parent; -# ifdef EBCDIC - menu->mnemonic = 0; -# endif - # if (XmVersion <= 1002) // Don't add Popup menu items when the popup menu isn't used. if (menu_is_child_of_popup(menu) && !mouse_model_popup())
--- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -1419,9 +1419,6 @@ prt_write_file(char_u *buffer) static void prt_write_file_len(char_u *buffer, int bytes) { -#ifdef EBCDIC - ebcdic2ascii(buffer, bytes); -#endif prt_write_file_raw_len(buffer, bytes); } @@ -1626,8 +1623,6 @@ prt_flush_buffer(void) prt_write_string("ul\n"); } // Draw the text - // Note: we write text out raw - EBCDIC conversion is handled in the - // PostScript world via the font encoding vector. if (prt_out_mbyte) prt_write_string("<"); else @@ -3119,7 +3114,7 @@ mch_print_end(prt_settings_T *psettings) // Write CTRL-D to close serial communication link if used. // NOTHING MUST BE WRITTEN AFTER THIS! - prt_write_file((char_u *)IF_EB("\004", "\067")); + prt_write_file((char_u *)"\004"); if (!prt_file_error && psettings->outfile == NULL && !got_int && !psettings->user_abort) @@ -3379,26 +3374,21 @@ mch_print_text_out(char_u *textp, int le { // Convert non-printing characters to either their escape or octal // sequence, ensures PS sent over a serial line does not interfere - // with the comms protocol. Note: For EBCDIC we need to write out - // the escape sequences as ASCII codes! - // Note 2: Char codes < 32 are identical in EBCDIC and ASCII AFAIK! - ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); + // with the comms protocol. + ga_append(&prt_ps_buffer, '\\'); switch (ch) { - case BS: ga_append(&prt_ps_buffer, IF_EB('b', 0142)); break; - case TAB: ga_append(&prt_ps_buffer, IF_EB('t', 0164)); break; - case NL: ga_append(&prt_ps_buffer, IF_EB('n', 0156)); break; - case FF: ga_append(&prt_ps_buffer, IF_EB('f', 0146)); break; - case CAR: ga_append(&prt_ps_buffer, IF_EB('r', 0162)); break; - case '(': ga_append(&prt_ps_buffer, IF_EB('(', 0050)); break; - case ')': ga_append(&prt_ps_buffer, IF_EB(')', 0051)); break; - case '\\': ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); break; + case BS: ga_append(&prt_ps_buffer, 'b'); break; + case TAB: ga_append(&prt_ps_buffer, 't'); break; + case NL: ga_append(&prt_ps_buffer, 'n'); break; + case FF: ga_append(&prt_ps_buffer, 'f'); break; + case CAR: ga_append(&prt_ps_buffer, 'r'); break; + case '(': ga_append(&prt_ps_buffer, '('); break; + case ')': ga_append(&prt_ps_buffer, ')'); break; + case '\\': ga_append(&prt_ps_buffer, '\\'); break; default: sprintf((char *)ch_buff, "%03o", (unsigned int)ch); -#ifdef EBCDIC - ebcdic2ascii(ch_buff, 3); -#endif ga_append(&prt_ps_buffer, ch_buff[0]); ga_append(&prt_ps_buffer, ch_buff[1]); ga_append(&prt_ps_buffer, ch_buff[2]);
--- a/src/help.c +++ b/src/help.c @@ -481,11 +481,7 @@ find_help_tags( d += 5; if (*s < ' ') { -#ifdef EBCDIC - *d++ = CtrlChar(*s); -#else *d++ = *s + '@'; -#endif if (d[-1] == '\\') *d++ = '\\'; // double a backslash } @@ -651,12 +647,7 @@ prepare_help_buffer(void) // Accept all ASCII chars for keywords, except ' ', '*', '"', '|', and // latin1 word characters (for translated help files). // Only set it when needed, buf_init_chartab() is some work. - p = -#ifdef EBCDIC - (char_u *)"65-255,^*,^|,^\""; -#else - (char_u *)"!-~,^*,^|,^\",192-255"; -#endif + p = (char_u *)"!-~,^*,^|,^\",192-255"; if (STRCMP(curbuf->b_p_isk, p) != 0) { set_string_option_direct((char_u *)"isk", -1, p, OPT_FREE|OPT_LOCAL, 0);
--- a/src/macros.h +++ b/src/macros.h @@ -77,13 +77,8 @@ #endif // toupper() and tolower() for ASCII only and ignore the current locale. -#ifdef EBCDIC -# define TOUPPER_ASC(c) (islower(c) ? toupper(c) : (c)) -# define TOLOWER_ASC(c) (isupper(c) ? tolower(c) : (c)) -#else -# define TOUPPER_ASC(c) (((c) < 'a' || (c) > 'z') ? (c) : (c) - ('a' - 'A')) -# define TOLOWER_ASC(c) (((c) < 'A' || (c) > 'Z') ? (c) : (c) + ('a' - 'A')) -#endif +#define TOUPPER_ASC(c) (((c) < 'a' || (c) > 'z') ? (c) : (c) - ('a' - 'A')) +#define TOLOWER_ASC(c) (((c) < 'A' || (c) > 'Z') ? (c) : (c) + ('a' - 'A')) /* * MB_ISLOWER() and MB_ISUPPER() are to be used on multi-byte characters. But @@ -102,17 +97,10 @@ // Like isalpha() but reject non-ASCII characters. Can't be used with a // special key (negative value). -#ifdef EBCDIC -# define ASCII_ISALPHA(c) isalpha(c) -# define ASCII_ISALNUM(c) isalnum(c) -# define ASCII_ISLOWER(c) islower(c) -# define ASCII_ISUPPER(c) isupper(c) -#else -# define ASCII_ISLOWER(c) ((unsigned)(c) - 'a' < 26) -# define ASCII_ISUPPER(c) ((unsigned)(c) - 'A' < 26) -# define ASCII_ISALPHA(c) (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) -# define ASCII_ISALNUM(c) (ASCII_ISALPHA(c) || VIM_ISDIGIT(c)) -#endif +#define ASCII_ISLOWER(c) ((unsigned)(c) - 'a' < 26) +#define ASCII_ISUPPER(c) ((unsigned)(c) - 'A' < 26) +#define ASCII_ISALPHA(c) (ASCII_ISUPPER(c) || ASCII_ISLOWER(c)) +#define ASCII_ISALNUM(c) (ASCII_ISALPHA(c) || VIM_ISDIGIT(c)) // Returns empty string if it is NULL. #define EMPTY_IF_NULL(x) ((x) ? (x) : (char_u *)"")
--- a/src/map.c +++ b/src/map.c @@ -2018,7 +2018,7 @@ put_escstr(FILE *fd, char_u *strstart, i { if (what == 2) { - if (fprintf(fd, IF_EB("\\\026\n", "\\" CTRL_V_STR "\n")) < 0) + if (fprintf(fd, "\\\026\n") < 0) return FAIL; } else
--- a/src/mark.c +++ b/src/mark.c @@ -310,12 +310,9 @@ getmark_buf_fnum( // to crash. if (c < 0) return posp; -#ifndef EBCDIC if (c > '~') // check for islower()/isupper() ; - else -#endif - if (c == '\'' || c == '`') // previous context mark + else if (c == '\'' || c == '`') // previous context mark { pos_copy = curwin->w_pcmark; // need to make a copy because posp = &pos_copy; // w_pcmark may be changed soon
--- a/src/misc2.c +++ b/src/misc2.c @@ -1201,11 +1201,7 @@ get_special_key_name(int c, int modifier } if (table_idx < 0 && !vim_isprintc(c) && c < ' ') { -#ifdef EBCDIC - c = CtrlChar(c); -#else c += '@'; -#endif modifiers |= MOD_MASK_CTRL; } } @@ -1560,16 +1556,7 @@ extract_modifiers(int key, int *modp, in key = TOUPPER_ASC(key); if (simplify && (modifiers & MOD_MASK_CTRL) -#ifdef EBCDIC - // TODO: EBCDIC Better use: - // && (Ctrl_chr(key) || key == '?') - // ??? - && strchr("?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_", key) - != NULL -#else - && ((key >= '?' && key <= '_') || ASCII_ISALPHA(key)) -#endif - ) + && ((key >= '?' && key <= '_') || ASCII_ISALPHA(key))) { key = Ctrl_chr(key); modifiers &= ~MOD_MASK_CTRL;
--- a/src/normal.c +++ b/src/normal.c @@ -4426,13 +4426,7 @@ nv_brackets(cmdarg_T *cap) // fwd bwd fwd bwd fwd bwd // identifier "]i" "[i" "]I" "[I" "]^I" "[^I" // define "]d" "[d" "]D" "[D" "]^D" "[^D" - if (vim_strchr((char_u *) -# ifdef EBCDIC - "iI\005dD\067", -# else - "iI\011dD\004", -# endif - cap->nchar) != NULL) + if (vim_strchr((char_u *)"iI\011dD\004", cap->nchar) != NULL) { char_u *ptr; int len; @@ -5925,12 +5919,6 @@ nv_g_cmd(cmdarg_T *cap) case 'h': case 'H': case Ctrl_H: -# ifdef EBCDIC - // EBCDIC: 'v'-'h' != '^v'-'^h' - if (cap->nchar == Ctrl_H) - cap->cmdchar = Ctrl_V; - else -# endif cap->cmdchar = cap->nchar + ('v' - 'h'); cap->arg = TRUE; nv_visual(cap);
--- a/src/ops.c +++ b/src/ops.c @@ -2674,11 +2674,7 @@ do_addsub( firstdigit = 'a'; } else -#ifdef EBCDIC - firstdigit = EBCDIC_CHAR_ADD(firstdigit, -Prenum1); -#else firstdigit -= Prenum1; -#endif } else { @@ -2690,11 +2686,7 @@ do_addsub( firstdigit = 'z'; } else -#ifdef EBCDIC - firstdigit = EBCDIC_CHAR_ADD(firstdigit, Prenum1); -#else firstdigit += Prenum1; -#endif } curwin->w_cursor.col = col; if (!did_change)
--- a/src/option.c +++ b/src/option.c @@ -266,7 +266,7 @@ set_init_1(int clean_arg) } #endif -#if defined(FEAT_POSTSCRIPT) && (defined(MSWIN) || defined(VMS) || defined(EBCDIC) || defined(MAC) || defined(hpux)) +#if defined(FEAT_POSTSCRIPT) && (defined(MSWIN) || defined(VMS) || defined(MAC) || defined(hpux)) // Set print encoding on platforms that don't default to latin1 set_string_default("penc", # if defined(MSWIN) @@ -275,14 +275,10 @@ set_init_1(int clean_arg) # ifdef VMS (char_u *)"dec-mcs" # else -# ifdef EBCDIC - (char_u *)"ebcdic-uk" -# else -# ifdef MAC +# ifdef MAC (char_u *)"mac-roman" -# else // HPUX +# else // HPUX (char_u *)"hp-roman8" -# endif # endif # endif # endif @@ -3920,11 +3916,7 @@ findoption(char_u *arg) /* * Check for name starting with an illegal character. */ -#ifdef EBCDIC - if (!islower(arg[0])) -#else if (arg[0] < 'a' || arg[0] > 'z') -#endif return -1; is_term_opt = (arg[0] == 't' && arg[1] == '_');
--- a/src/option.h +++ b/src/option.h @@ -89,11 +89,7 @@ typedef enum { # ifdef VMS # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m" # else // Unix, probably -# ifdef EBCDIC -#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m" -# else #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m" -# endif # endif # endif # endif
--- a/src/optiondefs.h +++ b/src/optiondefs.h @@ -1437,11 +1437,7 @@ static struct vimoption options[] = # ifdef VMS (char_u *)"@,48-57,/,.,-,_,+,,,#,$,%,<,>,[,],:,;,~", # else // UNIX et al. -# ifdef EBCDIC - (char_u *)"@,240-249,/,.,-,_,+,,,#,$,%,~,=", -# else (char_u *)"@,48-57,/,.,-,_,+,,,#,$,%,~,=", -# endif # endif # endif #endif @@ -1452,34 +1448,17 @@ static struct vimoption options[] = #if defined(MSWIN) (char_u *)"@,48-57,_,128-167,224-235", #else -# ifdef EBCDIC - // TODO: EBCDIC Check this! @ == isalpha() - (char_u *)"@,240-249,_,66-73,81-89,98-105," - "112-120,128,140-142,156,158,172," - "174,186,191,203-207,219-225,235-239," - "251-254", -# else (char_u *)"@,48-57,_,192-255", -# endif #endif (char_u *)0L} SCTX_INIT}, {"iskeyword", "isk", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP, (char_u *)&p_isk, PV_ISK, { -#ifdef EBCDIC - (char_u *)"@,240-249,_", - // TODO: EBCDIC Check this! @ == isalpha() - (char_u *)"@,240-249,_,66-73,81-89,98-105," - "112-120,128,140-142,156,158,172," - "174,186,191,203-207,219-225,235-239," - "251-254", + (char_u *)"@,48-57,_", +#if defined(MSWIN) + (char_u *)"@,48-57,_,128-167,224-235" #else - (char_u *)"@,48-57,_", -# if defined(MSWIN) - (char_u *)"@,48-57,_,128-167,224-235" -# else ISK_LATIN1 -# endif #endif } SCTX_INIT}, {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP, @@ -1488,12 +1467,7 @@ static struct vimoption options[] = #if defined(MSWIN) || defined(VMS) (char_u *)"@,~-255", #else -# ifdef EBCDIC - // all chars above 63 are printable - (char_u *)"63-255", -# else ISP_LATIN1, -# endif #endif (char_u *)0L} SCTX_INIT}, {"joinspaces", "js", P_BOOL|P_VI_DEF|P_VIM,
--- a/src/os_unix.c +++ b/src/os_unix.c @@ -3773,10 +3773,7 @@ mch_setmouse(int on) #ifdef FEAT_MOUSE_URXVT if (ttym_flags == TTYM_URXVT) { - out_str_nf((char_u *) - (on - ? IF_EB("\033[?1015h", ESC_STR "[?1015h") - : IF_EB("\033[?1015l", ESC_STR "[?1015l"))); + out_str_nf((char_u *)(on ? "\033[?1015h" : "\033[?1015l")); mouse_ison = on; } #endif @@ -3784,10 +3781,7 @@ mch_setmouse(int on) if (ttym_flags == TTYM_SGR) { // SGR mode supports columns above 223 - out_str_nf((char_u *) - (on - ? IF_EB("\033[?1006h", ESC_STR "[?1006h") - : IF_EB("\033[?1006l", ESC_STR "[?1006l"))); + out_str_nf((char_u *)(on ? "\033[?1006h" : "\033[?1006l")); mouse_ison = on; } @@ -3797,8 +3791,7 @@ mch_setmouse(int on) bevalterm_ison = (p_bevalterm && on); if (xterm_mouse_vers > 1 && !bevalterm_ison) // disable mouse movement events, enabling is below - out_str_nf((char_u *) - (IF_EB("\033[?1003l", ESC_STR "[?1003l"))); + out_str_nf((char_u *)("\033[?1003l")); } #endif @@ -3809,16 +3802,13 @@ mch_setmouse(int on) (xterm_mouse_vers > 1 ? ( #ifdef FEAT_BEVAL_TERM - bevalterm_ison - ? IF_EB("\033[?1003h", ESC_STR "[?1003h") : -#endif - IF_EB("\033[?1002h", ESC_STR "[?1002h")) - : IF_EB("\033[?1000h", ESC_STR "[?1000h"))); + bevalterm_ison ? "\033[?1003h" : +#endif + "\033[?1002h") + : "\033[?1000h")); else // disable mouse events, could probably always send the same out_str_nf((char_u *) - (xterm_mouse_vers > 1 - ? IF_EB("\033[?1002l", ESC_STR "[?1002l") - : IF_EB("\033[?1000l", ESC_STR "[?1000l"))); + (xterm_mouse_vers > 1 ? "\033[?1002l" : "\033[?1000l")); mouse_ison = on; } @@ -3886,18 +3876,15 @@ mch_setmouse(int on) // 5 = Windows UP Arrow # ifdef JSBTERM_MOUSE_NONADVANCED // Disables full feedback of pointer movements - out_str_nf((char_u *)IF_EB("\033[0~ZwLMRK1Q\033\\", - ESC_STR "[0~ZwLMRK1Q" ESC_STR "\\")); + out_str_nf((char_u *)"\033[0~ZwLMRK1Q\033\\"); # else - out_str_nf((char_u *)IF_EB("\033[0~ZwLMRK+1Q\033\\", - ESC_STR "[0~ZwLMRK+1Q" ESC_STR "\\")); + out_str_nf((char_u *)"\033[0~ZwLMRK+1Q\033\\"); # endif mouse_ison = TRUE; } else { - out_str_nf((char_u *)IF_EB("\033[0~ZwQ\033\\", - ESC_STR "[0~ZwQ" ESC_STR "\\")); + out_str_nf((char_u *)"\033[0~ZwQ\033\\"); mouse_ison = FALSE; } } @@ -3943,8 +3930,7 @@ check_mouse_termcode(void) ) { set_mouse_termcode(KS_MOUSE, (char_u *)(term_is_8bit(T_NAME) - ? IF_EB("\233M", CSI_STR "M") - : IF_EB("\033[M", ESC_STR "[M"))); + ? "\233M" : "\033[M")); if (*p_mouse != NUL) { // force mouse off and maybe on to send possibly new mouse @@ -3963,8 +3949,7 @@ check_mouse_termcode(void) && !gui.in_use # endif ) - set_mouse_termcode(KS_GPM_MOUSE, - (char_u *)IF_EB("\033MG", ESC_STR "MG")); + set_mouse_termcode(KS_GPM_MOUSE, (char_u *)"\033MG"); else del_mouse_termcode(KS_GPM_MOUSE); # endif @@ -3975,7 +3960,7 @@ check_mouse_termcode(void) && !gui.in_use # endif ) - set_mouse_termcode(KS_MOUSE, (char_u *)IF_EB("\033MS", ESC_STR "MS")); + set_mouse_termcode(KS_MOUSE, (char_u *)"\033MS"); # endif # ifdef FEAT_MOUSE_JSB @@ -3985,8 +3970,7 @@ check_mouse_termcode(void) && !gui.in_use # endif ) - set_mouse_termcode(KS_JSBTERM_MOUSE, - (char_u *)IF_EB("\033[0~zw", ESC_STR "[0~zw")); + set_mouse_termcode(KS_JSBTERM_MOUSE, (char_u *)"\033[0~zw"); else del_mouse_termcode(KS_JSBTERM_MOUSE); # endif @@ -3999,8 +3983,7 @@ check_mouse_termcode(void) && !gui.in_use # endif ) - set_mouse_termcode(KS_NETTERM_MOUSE, - (char_u *)IF_EB("\033}", ESC_STR "}")); + set_mouse_termcode(KS_NETTERM_MOUSE, (char_u *)"\033}"); else del_mouse_termcode(KS_NETTERM_MOUSE); # endif @@ -4013,7 +3996,7 @@ check_mouse_termcode(void) # endif ) set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME) - ? IF_EB("\233", CSI_STR) : IF_EB("\033[", ESC_STR "["))); + ? "\233" : "\033[")); else del_mouse_termcode(KS_DEC_MOUSE); # endif @@ -4024,8 +4007,7 @@ check_mouse_termcode(void) && !gui.in_use # endif ) - set_mouse_termcode(KS_PTERM_MOUSE, - (char_u *) IF_EB("\033[", ESC_STR "[")); + set_mouse_termcode(KS_PTERM_MOUSE, (char_u *)"\033["); else del_mouse_termcode(KS_PTERM_MOUSE); # endif @@ -4037,8 +4019,7 @@ check_mouse_termcode(void) ) { set_mouse_termcode(KS_URXVT_MOUSE, (char_u *)(term_is_8bit(T_NAME) - ? IF_EB("\233*M", CSI_STR "*M") - : IF_EB("\033[*M", ESC_STR "[*M"))); + ? "\233*M" : "\033[*M")); if (*p_mouse != NUL) { @@ -4056,12 +4037,10 @@ check_mouse_termcode(void) ) { set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME) - ? IF_EB("\233<*M", CSI_STR "<*M") - : IF_EB("\033[<*M", ESC_STR "[<*M"))); + ? "\233<*M" : "\033[<*M")); set_mouse_termcode(KS_SGR_MOUSE_RELEASE, (char_u *)(term_is_8bit(T_NAME) - ? IF_EB("\233<*m", CSI_STR "<*m") - : IF_EB("\033[<*m", ESC_STR "[<*m"))); + ? "\233<*m" : "\033[<*m")); if (*p_mouse != NUL) { @@ -6104,7 +6083,7 @@ WaitForCharOrMouse(long msec, int *inter { WantQueryMouse = FALSE; if (!no_query_mouse_for_testing) - mch_write((char_u *)IF_EB("\033[1'|", ESC_STR "[1'|"), 5); + mch_write((char_u *)"\033[1'|", 5); } #endif @@ -8207,114 +8186,3 @@ xsmp_close(void) } } #endif // USE_XSMP - - -#ifdef EBCDIC -// Translate character to its CTRL- value -char CtrlTable[] = -{ -/* 00 - 5E */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* ^ */ 0x1E, -/* - */ 0x1F, -/* 61 - 6C */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* _ */ 0x1F, -/* 6E - 80 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* a */ 0x01, -/* b */ 0x02, -/* c */ 0x03, -/* d */ 0x37, -/* e */ 0x2D, -/* f */ 0x2E, -/* g */ 0x2F, -/* h */ 0x16, -/* i */ 0x05, -/* 8A - 90 */ - 0, 0, 0, 0, 0, 0, 0, -/* j */ 0x15, -/* k */ 0x0B, -/* l */ 0x0C, -/* m */ 0x0D, -/* n */ 0x0E, -/* o */ 0x0F, -/* p */ 0x10, -/* q */ 0x11, -/* r */ 0x12, -/* 9A - A1 */ - 0, 0, 0, 0, 0, 0, 0, 0, -/* s */ 0x13, -/* t */ 0x3C, -/* u */ 0x3D, -/* v */ 0x32, -/* w */ 0x26, -/* x */ 0x18, -/* y */ 0x19, -/* z */ 0x3F, -/* AA - AC */ - 0, 0, 0, -/* [ */ 0x27, -/* AE - BC */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* ] */ 0x1D, -/* BE - C0 */ 0, 0, 0, -/* A */ 0x01, -/* B */ 0x02, -/* C */ 0x03, -/* D */ 0x37, -/* E */ 0x2D, -/* F */ 0x2E, -/* G */ 0x2F, -/* H */ 0x16, -/* I */ 0x05, -/* CA - D0 */ 0, 0, 0, 0, 0, 0, 0, -/* J */ 0x15, -/* K */ 0x0B, -/* L */ 0x0C, -/* M */ 0x0D, -/* N */ 0x0E, -/* O */ 0x0F, -/* P */ 0x10, -/* Q */ 0x11, -/* R */ 0x12, -/* DA - DF */ 0, 0, 0, 0, 0, 0, -/* \ */ 0x1C, -/* E1 */ 0, -/* S */ 0x13, -/* T */ 0x3C, -/* U */ 0x3D, -/* V */ 0x32, -/* W */ 0x26, -/* X */ 0x18, -/* Y */ 0x19, -/* Z */ 0x3F, -/* EA - FF*/ 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -char MetaCharTable[]= -{// 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 0, 0, 0,'\\', 0,'F', 0,'W','M','N', 0, 0, 0, 0, 0, - 0, 0, 0, 0,']', 0, 0,'G', 0, 0,'R','O', 0, 0, 0, 0, - '@','A','B','C','D','E', 0, 0,'H','I','J','K','L', 0, 0, 0, - 'P','Q', 0,'S','T','U','V', 0,'X','Y','Z','[', 0, 0,'^', 0 -}; - - -// TODO: Use characters NOT numbers!!! -char CtrlCharTable[]= -{// 0 1 2 3 4 5 6 7 8 9 A B C D E F - 124,193,194,195, 0,201, 0, 0, 0, 0, 0,210,211,212,213,214, - 215,216,217,226, 0,209,200, 0,231,232, 0, 0,224,189, 95,109, - 0, 0, 0, 0, 0, 0,230,173, 0, 0, 0, 0, 0,197,198,199, - 0, 0,229, 0, 0, 0, 0,196, 0, 0, 0, 0,227,228, 0,233, -}; - - -#endif
--- a/src/proto/evalfunc.pro +++ b/src/proto/evalfunc.pro @@ -1,5 +1,4 @@ /* evalfunc.c */ -void sortFunctions(void); char_u *get_function_name(expand_T *xp, int idx); char_u *get_expr_name(expand_T *xp, int idx); int find_internal_func(char_u *name);
--- a/src/regexp.c +++ b/src/regexp.c @@ -231,21 +231,11 @@ init_class_tab(void) class_tab[i] = RI_DIGIT + RI_HEX + RI_WORD; else if (i >= 'a' && i <= 'f') class_tab[i] = RI_HEX + RI_WORD + RI_HEAD + RI_ALPHA + RI_LOWER; -#ifdef EBCDIC - else if ((i >= 'g' && i <= 'i') || (i >= 'j' && i <= 'r') - || (i >= 's' && i <= 'z')) -#else else if (i >= 'g' && i <= 'z') -#endif class_tab[i] = RI_WORD + RI_HEAD + RI_ALPHA + RI_LOWER; else if (i >= 'A' && i <= 'F') class_tab[i] = RI_HEX + RI_WORD + RI_HEAD + RI_ALPHA + RI_UPPER; -#ifdef EBCDIC - else if ((i >= 'G' && i <= 'I') || ( i >= 'J' && i <= 'R') - || (i >= 'S' && i <= 'Z')) -#else else if (i >= 'G' && i <= 'Z') -#endif class_tab[i] = RI_WORD + RI_HEAD + RI_ALPHA + RI_UPPER; else if (i == '_') class_tab[i] = RI_WORD + RI_HEAD; @@ -300,9 +290,6 @@ static int reg_strict; // "[abc" is ille * META contains all characters that may be magic, except '^' and '$'. */ -#ifdef EBCDIC -static char_u META[] = "%&()*+.123456789<=>?@ACDFHIKLMOPSUVWX[_acdfhiklmnopsuvwxz{|~"; -#else // META[] is used often enough to justify turning it into a table. static char_u META_flags[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -320,7 +307,6 @@ static char_u META_flags[] = { // p s u v w x z { | ~ 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1 }; -#endif static int curchr; // currently parsed character // Previous character. Note: prevchr is sometimes -1 when we are not at the @@ -409,30 +395,6 @@ get_equi_class(char_u **pp) return 0; } -#ifdef EBCDIC -/* - * Table for equivalence class "c". (IBM-1047) - */ -static char *EQUIVAL_CLASS_C[16] = { - "A\x62\x63\x64\x65\x66\x67", - "C\x68", - "E\x71\x72\x73\x74", - "I\x75\x76\x77\x78", - "N\x69", - "O\xEB\xEC\xED\xEE\xEF\x80", - "U\xFB\xFC\xFD\xFE", - "Y\xBA", - "a\x42\x43\x44\x45\x46\x47", - "c\x48", - "e\x51\x52\x53\x54", - "i\x55\x56\x57\x58", - "n\x49", - "o\xCB\xCC\xCD\xCE\xCF\x70", - "u\xDB\xDC\xDD\xDE", - "y\x8D\xDF", -}; -#endif - /* * Check for a collating element "[.a.]". "pp" points to the '['. * Returns a character. Zero means that no item was recognized. Otherwise @@ -788,13 +750,7 @@ peekchr(void) if (c == NUL) curchr = '\\'; // trailing '\' - else if ( -#ifdef EBCDIC - vim_strchr(META, c) -#else - c <= '~' && META_flags[c] -#endif - ) + else if (c <= '~' && META_flags[c]) { /* * META contains everything that may be magic sometimes,
--- a/src/regexp_bt.c +++ b/src/regexp_bt.c @@ -533,22 +533,6 @@ reg_equi_class(int c) if (enc_utf8 || STRCMP(p_enc, "latin1") == 0 || STRCMP(p_enc, "iso-8859-15") == 0) { -#ifdef EBCDIC - int i; - - // This might be slower than switch/case below. - for (i = 0; i < 16; i++) - { - if (vim_strchr(EQUIVAL_CLASS_C[i], c) != NULL) - { - char *p = EQUIVAL_CLASS_C[i]; - - while (*p != 0) - regmbc(*p++); - return; - } - } -#else switch (c) { // Do not use '\300' style, it results in a negative number. @@ -1012,7 +996,6 @@ reg_equi_class(int c) regmbc(0x1e95); regmbc(0x2c6c); return; } -#endif } regmbc(c); } @@ -1794,19 +1777,8 @@ collection: } else { -#ifdef EBCDIC - int alpha_only = FALSE; - - // for alphabetical range skip the gaps - // 'i'-'j', 'r'-'s', 'I'-'J' and 'R'-'S'. - if (isalpha(startc) && isalpha(endc)) - alpha_only = TRUE; -#endif while (++startc <= endc) -#ifdef EBCDIC - if (!alpha_only || isalpha(startc)) -#endif - regc(startc); + regc(startc); } startc = -1; }
--- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -698,119 +698,61 @@ nfa_emit_equi_class(int c) if (enc_utf8 || STRCMP(p_enc, "latin1") == 0 || STRCMP(p_enc, "iso-8859-15") == 0) { -#ifdef EBCDIC -# define A_circumflex 0x62 -# define A_diaeresis 0x63 -# define A_grave 0x64 -# define A_acute 0x65 -# define A_virguilla 0x66 -# define A_ring 0x67 -# define C_cedilla 0x68 -# define E_acute 0x71 -# define E_circumflex 0x72 -# define E_diaeresis 0x73 -# define E_grave 0x74 -# define I_acute 0x75 -# define I_circumflex 0x76 -# define I_diaeresis 0x77 -# define I_grave 0x78 -# define N_virguilla 0x69 -# define O_circumflex 0xeb -# define O_diaeresis 0xec -# define O_grave 0xed -# define O_acute 0xee -# define O_virguilla 0xef -# define O_slash 0x80 -# define U_circumflex 0xfb -# define U_diaeresis 0xfc -# define U_grave 0xfd -# define U_acute 0xfe -# define Y_acute 0xba -# define a_grave 0x42 -# define a_acute 0x43 -# define a_circumflex 0x44 -# define a_virguilla 0x45 -# define a_diaeresis 0x46 -# define a_ring 0x47 -# define c_cedilla 0x48 -# define e_grave 0x51 -# define e_acute 0x52 -# define e_circumflex 0x53 -# define e_diaeresis 0x54 -# define i_grave 0x55 -# define i_acute 0x56 -# define i_circumflex 0x57 -# define i_diaeresis 0x58 -# define n_virguilla 0x49 -# define o_grave 0xcb -# define o_acute 0xcc -# define o_circumflex 0xcd -# define o_virguilla 0xce -# define o_diaeresis 0xcf -# define o_slash 0x70 -# define u_grave 0xdb -# define u_acute 0xdc -# define u_circumflex 0xdd -# define u_diaeresis 0xde -# define y_acute 0x8d -# define y_diaeresis 0xdf -#else -# define A_grave 0xc0 -# define A_acute 0xc1 -# define A_circumflex 0xc2 -# define A_virguilla 0xc3 -# define A_diaeresis 0xc4 -# define A_ring 0xc5 -# define C_cedilla 0xc7 -# define E_grave 0xc8 -# define E_acute 0xc9 -# define E_circumflex 0xca -# define E_diaeresis 0xcb -# define I_grave 0xcc -# define I_acute 0xcd -# define I_circumflex 0xce -# define I_diaeresis 0xcf -# define N_virguilla 0xd1 -# define O_grave 0xd2 -# define O_acute 0xd3 -# define O_circumflex 0xd4 -# define O_virguilla 0xd5 -# define O_diaeresis 0xd6 -# define O_slash 0xd8 -# define U_grave 0xd9 -# define U_acute 0xda -# define U_circumflex 0xdb -# define U_diaeresis 0xdc -# define Y_acute 0xdd -# define a_grave 0xe0 -# define a_acute 0xe1 -# define a_circumflex 0xe2 -# define a_virguilla 0xe3 -# define a_diaeresis 0xe4 -# define a_ring 0xe5 -# define c_cedilla 0xe7 -# define e_grave 0xe8 -# define e_acute 0xe9 -# define e_circumflex 0xea -# define e_diaeresis 0xeb -# define i_grave 0xec -# define i_acute 0xed -# define i_circumflex 0xee -# define i_diaeresis 0xef -# define n_virguilla 0xf1 -# define o_grave 0xf2 -# define o_acute 0xf3 -# define o_circumflex 0xf4 -# define o_virguilla 0xf5 -# define o_diaeresis 0xf6 -# define o_slash 0xf8 -# define u_grave 0xf9 -# define u_acute 0xfa -# define u_circumflex 0xfb -# define u_diaeresis 0xfc -# define y_acute 0xfd -# define y_diaeresis 0xff -#endif +#define A_grave 0xc0 +#define A_acute 0xc1 +#define A_circumflex 0xc2 +#define A_virguilla 0xc3 +#define A_diaeresis 0xc4 +#define A_ring 0xc5 +#define C_cedilla 0xc7 +#define E_grave 0xc8 +#define E_acute 0xc9 +#define E_circumflex 0xca +#define E_diaeresis 0xcb +#define I_grave 0xcc +#define I_acute 0xcd +#define I_circumflex 0xce +#define I_diaeresis 0xcf +#define N_virguilla 0xd1 +#define O_grave 0xd2 +#define O_acute 0xd3 +#define O_circumflex 0xd4 +#define O_virguilla 0xd5 +#define O_diaeresis 0xd6 +#define O_slash 0xd8 +#define U_grave 0xd9 +#define U_acute 0xda +#define U_circumflex 0xdb +#define U_diaeresis 0xdc +#define Y_acute 0xdd +#define a_grave 0xe0 +#define a_acute 0xe1 +#define a_circumflex 0xe2 +#define a_virguilla 0xe3 +#define a_diaeresis 0xe4 +#define a_ring 0xe5 +#define c_cedilla 0xe7 +#define e_grave 0xe8 +#define e_acute 0xe9 +#define e_circumflex 0xea +#define e_diaeresis 0xeb +#define i_grave 0xec +#define i_acute 0xed +#define i_circumflex 0xee +#define i_diaeresis 0xef +#define n_virguilla 0xf1 +#define o_grave 0xf2 +#define o_acute 0xf3 +#define o_circumflex 0xf4 +#define o_virguilla 0xf5 +#define o_diaeresis 0xf6 +#define o_slash 0xf8 +#define u_grave 0xf9 +#define u_acute 0xfa +#define u_circumflex 0xfb +#define u_diaeresis 0xfc +#define y_acute 0xfd +#define y_diaeresis 0xff switch (c) { case 'A': case A_grave: case A_acute: case A_circumflex: @@ -2041,24 +1983,13 @@ collection: } else { -#ifdef EBCDIC - int alpha_only = FALSE; - - // for alphabetical range skip the gaps - // 'i'-'j', 'r'-'s', 'I'-'J' and 'R'-'S'. - if (isalpha(startc) && isalpha(endc)) - alpha_only = TRUE; -#endif // Emit the range. "startc" was already emitted, so // skip it. for (c = startc + 1; c <= endc; c++) -#ifdef EBCDIC - if (!alpha_only || isalpha(startc)) -#endif - { - EMIT(c); - EMIT(NFA_CONCAT); - } + { + EMIT(c); + EMIT(NFA_CONCAT); + } } emit_range = FALSE; startc = -1;
--- a/src/register.c +++ b/src/register.c @@ -2297,21 +2297,7 @@ get_register_name(int num) return '+'; #endif else - { -#ifdef EBCDIC - int i; - - // EBCDIC is really braindead ... - i = 'a' + (num - 10); - if (i > 'i') - i += 7; - if (i > 'r') - i += 8; - return i; -#else return num + 'a' - 10; -#endif - } } #if defined(FEAT_EVAL) || defined(PROTO)
--- a/src/screen.c +++ b/src/screen.c @@ -1796,7 +1796,7 @@ screen_start_highlight(int attr) char buf[20]; // The GUI handles this internally. - sprintf(buf, IF_EB("\033|%dh", ESC_STR "|%dh"), attr); + sprintf(buf, "\033|%dh", attr); OUT_STR(buf); } else @@ -1946,7 +1946,7 @@ screen_stop_highlight(void) char buf[20]; // use internal GUI code - sprintf(buf, IF_EB("\033|%dH", ESC_STR "|%dH"), screen_attr); + sprintf(buf, "\033|%dH", screen_attr); OUT_STR(buf); } else
--- a/src/spell.c +++ b/src/spell.c @@ -2534,7 +2534,6 @@ close_spellbuf(buf_T *buf) /* * Init the chartab used for spelling for ASCII. - * EBCDIC is not supported! */ void clear_spell_chartab(spelltab_T *sp)
--- a/src/strings.c +++ b/src/strings.c @@ -342,11 +342,7 @@ vim_strup( { p2 = p; while ((c = *p2) != NUL) -#ifdef EBCDIC - *p2++ = isalpha(c) ? toupper(c) : c; -#else *p2++ = (c < 'a' || c > 'z') ? c : (c - 0x20); -#endif } }
--- a/src/structs.h +++ b/src/structs.h @@ -136,9 +136,6 @@ typedef struct { * (a normal mark is a lnum/col pair, the same as a file position) */ -// (Note: for EBCDIC there are more than 26, because there are gaps in the -// alphabet coding. To minimize changes to the code, I decided to just -// increase the number of possible marks. #define NMARKS ('z' - 'a' + 1) // max. # of named marks #define EXTRA_MARKS 10 // marks 0-9 #define JUMPLISTSIZE 100 // max. # of marks in jump list
--- a/src/term.c +++ b/src/term.c @@ -222,48 +222,48 @@ static struct builtin_term builtin_termc * GUI pseudo term-cap. */ {(int)KS_NAME, "gui"}, - {(int)KS_CE, IF_EB("\033|$", ESC_STR "|$")}, - {(int)KS_AL, IF_EB("\033|i", ESC_STR "|i")}, + {(int)KS_CE, "\033|$"}, + {(int)KS_AL, "\033|i"}, # ifdef TERMINFO - {(int)KS_CAL, IF_EB("\033|%p1%dI", ESC_STR "|%p1%dI")}, + {(int)KS_CAL, "\033|%p1%dI"}, # else - {(int)KS_CAL, IF_EB("\033|%dI", ESC_STR "|%dI")}, + {(int)KS_CAL, "\033|%dI"}, # endif - {(int)KS_DL, IF_EB("\033|d", ESC_STR "|d")}, + {(int)KS_DL, "\033|d"}, # ifdef TERMINFO - {(int)KS_CDL, IF_EB("\033|%p1%dD", ESC_STR "|%p1%dD")}, - {(int)KS_CS, IF_EB("\033|%p1%d;%p2%dR", ESC_STR "|%p1%d;%p2%dR")}, - {(int)KS_CSV, IF_EB("\033|%p1%d;%p2%dV", ESC_STR "|%p1%d;%p2%dV")}, + {(int)KS_CDL, "\033|%p1%dD"}, + {(int)KS_CS, "\033|%p1%d;%p2%dR"}, + {(int)KS_CSV, "\033|%p1%d;%p2%dV"}, # else - {(int)KS_CDL, IF_EB("\033|%dD", ESC_STR "|%dD")}, - {(int)KS_CS, IF_EB("\033|%d;%dR", ESC_STR "|%d;%dR")}, - {(int)KS_CSV, IF_EB("\033|%d;%dV", ESC_STR "|%d;%dV")}, + {(int)KS_CDL, "\033|%dD"}, + {(int)KS_CS, "\033|%d;%dR"}, + {(int)KS_CSV, "\033|%d;%dV"}, # endif - {(int)KS_CL, IF_EB("\033|C", ESC_STR "|C")}, + {(int)KS_CL, "\033|C"}, // attributes switched on with 'h', off with * 'H' - {(int)KS_ME, IF_EB("\033|31H", ESC_STR "|31H")}, // HL_ALL - {(int)KS_MR, IF_EB("\033|1h", ESC_STR "|1h")}, // HL_INVERSE - {(int)KS_MD, IF_EB("\033|2h", ESC_STR "|2h")}, // HL_BOLD - {(int)KS_SE, IF_EB("\033|16H", ESC_STR "|16H")}, // HL_STANDOUT - {(int)KS_SO, IF_EB("\033|16h", ESC_STR "|16h")}, // HL_STANDOUT - {(int)KS_UE, IF_EB("\033|8H", ESC_STR "|8H")}, // HL_UNDERLINE - {(int)KS_US, IF_EB("\033|8h", ESC_STR "|8h")}, // HL_UNDERLINE - {(int)KS_UCE, IF_EB("\033|8C", ESC_STR "|8C")}, // HL_UNDERCURL - {(int)KS_UCS, IF_EB("\033|8c", ESC_STR "|8c")}, // HL_UNDERCURL - {(int)KS_STE, IF_EB("\033|4C", ESC_STR "|4C")}, // HL_STRIKETHROUGH - {(int)KS_STS, IF_EB("\033|4c", ESC_STR "|4c")}, // HL_STRIKETHROUGH - {(int)KS_CZR, IF_EB("\033|4H", ESC_STR "|4H")}, // HL_ITALIC - {(int)KS_CZH, IF_EB("\033|4h", ESC_STR "|4h")}, // HL_ITALIC - {(int)KS_VB, IF_EB("\033|f", ESC_STR "|f")}, + {(int)KS_ME, "\033|31H"}, // HL_ALL + {(int)KS_MR, "\033|1h"}, // HL_INVERSE + {(int)KS_MD, "\033|2h"}, // HL_BOLD + {(int)KS_SE, "\033|16H"}, // HL_STANDOUT + {(int)KS_SO, "\033|16h"}, // HL_STANDOUT + {(int)KS_UE, "\033|8H"}, // HL_UNDERLINE + {(int)KS_US, "\033|8h"}, // HL_UNDERLINE + {(int)KS_UCE, "\033|8C"}, // HL_UNDERCURL + {(int)KS_UCS, "\033|8c"}, // HL_UNDERCURL + {(int)KS_STE, "\033|4C"}, // HL_STRIKETHROUGH + {(int)KS_STS, "\033|4c"}, // HL_STRIKETHROUGH + {(int)KS_CZR, "\033|4H"}, // HL_ITALIC + {(int)KS_CZH, "\033|4h"}, // HL_ITALIC + {(int)KS_VB, "\033|f"}, {(int)KS_MS, "y"}, {(int)KS_UT, "y"}, {(int)KS_XN, "y"}, {(int)KS_LE, "\b"}, // cursor-left = BS {(int)KS_ND, "\014"}, // cursor-right = CTRL-L # ifdef TERMINFO - {(int)KS_CM, IF_EB("\033|%p1%d;%p2%dM", ESC_STR "|%p1%d;%p2%dM")}, + {(int)KS_CM, "\033|%p1%d;%p2%dM"}, # else - {(int)KS_CM, IF_EB("\033|%d;%dM", ESC_STR "|%d;%dM")}, + {(int)KS_CM, "\033|%d;%dM"}, # endif // there are no key sequences here, the GUI sequences are recognized // in check_termcode() @@ -438,34 +438,34 @@ static struct builtin_term builtin_termc * standard ANSI terminal, default for unix */ {(int)KS_NAME, "ansi"}, - {(int)KS_CE, IF_EB("\033[K", ESC_STR "[K")}, - {(int)KS_AL, IF_EB("\033[L", ESC_STR "[L")}, + {(int)KS_CE, "\033[K"}, + {(int)KS_AL, "\033[L"}, # ifdef TERMINFO - {(int)KS_CAL, IF_EB("\033[%p1%dL", ESC_STR "[%p1%dL")}, + {(int)KS_CAL, "\033[%p1%dL"}, # else - {(int)KS_CAL, IF_EB("\033[%dL", ESC_STR "[%dL")}, + {(int)KS_CAL, "\033[%dL"}, # endif - {(int)KS_DL, IF_EB("\033[M", ESC_STR "[M")}, + {(int)KS_DL, "\033[M"}, # ifdef TERMINFO - {(int)KS_CDL, IF_EB("\033[%p1%dM", ESC_STR "[%p1%dM")}, + {(int)KS_CDL, "\033[%p1%dM"}, # else - {(int)KS_CDL, IF_EB("\033[%dM", ESC_STR "[%dM")}, + {(int)KS_CDL, "\033[%dM"}, # endif - {(int)KS_CL, IF_EB("\033[H\033[2J", ESC_STR "[H" ESC_STR_nc "[2J")}, - {(int)KS_ME, IF_EB("\033[0m", ESC_STR "[0m")}, - {(int)KS_MR, IF_EB("\033[7m", ESC_STR "[7m")}, + {(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"}, # ifdef TERMINFO - {(int)KS_CM, IF_EB("\033[%i%p1%d;%p2%dH", ESC_STR "[%i%p1%d;%p2%dH")}, + {(int)KS_CM, "\033[%i%p1%d;%p2%dH"}, # else - {(int)KS_CM, IF_EB("\033[%i%d;%dH", ESC_STR "[%i%d;%dH")}, + {(int)KS_CM, "\033[%i%d;%dH"}, # endif # ifdef TERMINFO - {(int)KS_CRI, IF_EB("\033[%p1%dC", ESC_STR "[%p1%dC")}, + {(int)KS_CRI, "\033[%p1%dC"}, # else - {(int)KS_CRI, IF_EB("\033[%dC", ESC_STR "[%dC")}, + {(int)KS_CRI, "\033[%dC"}, # endif # endif @@ -691,98 +691,97 @@ static struct builtin_term builtin_termc * - keyboard languages (CSI ? 26 n) */ {(int)KS_NAME, "vt320"}, - {(int)KS_CE, IF_EB("\033[K", ESC_STR "[K")}, - {(int)KS_AL, IF_EB("\033[L", ESC_STR "[L")}, + {(int)KS_CE, "\033[K"}, + {(int)KS_AL, "\033[L"}, # ifdef TERMINFO - {(int)KS_CAL, IF_EB("\033[%p1%dL", ESC_STR "[%p1%dL")}, + {(int)KS_CAL, "\033[%p1%dL"}, # else - {(int)KS_CAL, IF_EB("\033[%dL", ESC_STR "[%dL")}, + {(int)KS_CAL, "\033[%dL"}, # endif - {(int)KS_DL, IF_EB("\033[M", ESC_STR "[M")}, + {(int)KS_DL, "\033[M"}, # ifdef TERMINFO - {(int)KS_CDL, IF_EB("\033[%p1%dM", ESC_STR "[%p1%dM")}, + {(int)KS_CDL, "\033[%p1%dM"}, # else - {(int)KS_CDL, IF_EB("\033[%dM", ESC_STR "[%dM")}, + {(int)KS_CDL, "\033[%dM"}, # endif - {(int)KS_CL, IF_EB("\033[H\033[2J", ESC_STR "[H" ESC_STR_nc "[2J")}, - {(int)KS_CD, IF_EB("\033[J", ESC_STR "[J")}, + {(int)KS_CL, "\033[H\033[2J"}, + {(int)KS_CD, "\033[J"}, {(int)KS_CCO, "8"}, // allow 8 colors - {(int)KS_ME, IF_EB("\033[0m", ESC_STR "[0m")}, - {(int)KS_MR, IF_EB("\033[7m", ESC_STR "[7m")}, - {(int)KS_MD, IF_EB("\033[1m", ESC_STR "[1m")}, // bold mode - {(int)KS_SE, IF_EB("\033[22m", ESC_STR "[22m")},// normal mode - {(int)KS_UE, IF_EB("\033[24m", ESC_STR "[24m")},// exit underscore mode - {(int)KS_US, IF_EB("\033[4m", ESC_STR "[4m")}, // underscore mode - {(int)KS_CZH, IF_EB("\033[34;43m", ESC_STR "[34;43m")}, // italic mode: blue text on yellow - {(int)KS_CZR, IF_EB("\033[0m", ESC_STR "[0m")}, // italic mode end - {(int)KS_CAB, IF_EB("\033[4%dm", ESC_STR "[4%dm")}, // set background color (ANSI) - {(int)KS_CAF, IF_EB("\033[3%dm", ESC_STR "[3%dm")}, // set foreground color (ANSI) - {(int)KS_CSB, IF_EB("\033[102;%dm", ESC_STR "[102;%dm")}, // set screen background color - {(int)KS_CSF, IF_EB("\033[101;%dm", ESC_STR "[101;%dm")}, // set screen foreground color + {(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_XN, "y"}, {(int)KS_LE, "\b"}, # ifdef TERMINFO - {(int)KS_CM, IF_EB("\033[%i%p1%d;%p2%dH", - ESC_STR "[%i%p1%d;%p2%dH")}, + {(int)KS_CM, "\033[%i%p1%d;%p2%dH"}, # else - {(int)KS_CM, IF_EB("\033[%i%d;%dH", ESC_STR "[%i%d;%dH")}, + {(int)KS_CM, "\033[%i%d;%dH"}, # endif # ifdef TERMINFO - {(int)KS_CRI, IF_EB("\033[%p1%dC", ESC_STR "[%p1%dC")}, + {(int)KS_CRI, "\033[%p1%dC"}, # else - {(int)KS_CRI, IF_EB("\033[%dC", ESC_STR "[%dC")}, + {(int)KS_CRI, "\033[%dC"}, # endif - {K_UP, IF_EB("\033[A", ESC_STR "[A")}, - {K_DOWN, IF_EB("\033[B", ESC_STR "[B")}, - {K_RIGHT, IF_EB("\033[C", ESC_STR "[C")}, - {K_LEFT, IF_EB("\033[D", ESC_STR "[D")}, + {K_UP, "\033[A"}, + {K_DOWN, "\033[B"}, + {K_RIGHT, "\033[C"}, + {K_LEFT, "\033[D"}, // Note: cursor key sequences for application cursor mode are omitted, // because they interfere with typed commands: <Esc>OA. - {K_F1, IF_EB("\033[11~", ESC_STR "[11~")}, - {K_F2, IF_EB("\033[12~", ESC_STR "[12~")}, - {K_F3, IF_EB("\033[13~", ESC_STR "[13~")}, - {K_F4, IF_EB("\033[14~", ESC_STR "[14~")}, - {K_F5, IF_EB("\033[15~", ESC_STR "[15~")}, - {K_F6, IF_EB("\033[17~", ESC_STR "[17~")}, - {K_F7, IF_EB("\033[18~", ESC_STR "[18~")}, - {K_F8, IF_EB("\033[19~", ESC_STR "[19~")}, - {K_F9, IF_EB("\033[20~", ESC_STR "[20~")}, - {K_F10, IF_EB("\033[21~", ESC_STR "[21~")}, - {K_F11, IF_EB("\033[23~", ESC_STR "[23~")}, - {K_F12, IF_EB("\033[24~", ESC_STR "[24~")}, - {K_F13, IF_EB("\033[25~", ESC_STR "[25~")}, - {K_F14, IF_EB("\033[26~", ESC_STR "[26~")}, - {K_F15, IF_EB("\033[28~", ESC_STR "[28~")}, // Help - {K_F16, IF_EB("\033[29~", ESC_STR "[29~")}, // Select - {K_F17, IF_EB("\033[31~", ESC_STR "[31~")}, - {K_F18, IF_EB("\033[32~", ESC_STR "[32~")}, - {K_F19, IF_EB("\033[33~", ESC_STR "[33~")}, - {K_F20, IF_EB("\033[34~", ESC_STR "[34~")}, - {K_INS, IF_EB("\033[2~", ESC_STR "[2~")}, - {K_DEL, IF_EB("\033[3~", ESC_STR "[3~")}, - {K_HOME, IF_EB("\033[1~", ESC_STR "[1~")}, - {K_END, IF_EB("\033[4~", ESC_STR "[4~")}, - {K_PAGEUP, IF_EB("\033[5~", ESC_STR "[5~")}, - {K_PAGEDOWN, IF_EB("\033[6~", ESC_STR "[6~")}, + {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~"}, // These sequences starting with <Esc> O may interfere with what the user // is typing. Remove these if that bothers you. - {K_KPLUS, IF_EB("\033Ok", ESC_STR "Ok")}, // keypad plus - {K_KMINUS, IF_EB("\033Om", ESC_STR "Om")}, // keypad minus - {K_KDIVIDE, IF_EB("\033Oo", ESC_STR "Oo")}, // keypad / - {K_KMULTIPLY, IF_EB("\033Oj", ESC_STR "Oj")}, // keypad * - {K_KENTER, IF_EB("\033OM", ESC_STR "OM")}, // keypad Enter - {K_K0, IF_EB("\033Op", ESC_STR "Op")}, // keypad 0 - {K_K1, IF_EB("\033Oq", ESC_STR "Oq")}, // keypad 1 - {K_K2, IF_EB("\033Or", ESC_STR "Or")}, // keypad 2 - {K_K3, IF_EB("\033Os", ESC_STR "Os")}, // keypad 3 - {K_K4, IF_EB("\033Ot", ESC_STR "Ot")}, // keypad 4 - {K_K5, IF_EB("\033Ou", ESC_STR "Ou")}, // keypad 5 - {K_K6, IF_EB("\033Ov", ESC_STR "Ov")}, // keypad 6 - {K_K7, IF_EB("\033Ow", ESC_STR "Ow")}, // keypad 7 - {K_K8, IF_EB("\033Ox", ESC_STR "Ox")}, // keypad 8 - {K_K9, IF_EB("\033Oy", ESC_STR "Oy")}, // keypad 9 + {K_KPLUS, "\033Ok"}, // keypad plus + {K_KMINUS, "\033Om"}, // keypad minus + {K_KDIVIDE, "\033Oo"}, // keypad / + {K_KMULTIPLY, "\033Oj"}, // keypad * + {K_KENTER, "\033OM"}, // keypad Enter + {K_K0, "\033Op"}, // keypad 0 + {K_K1, "\033Oq"}, // keypad 1 + {K_K2, "\033Or"}, // keypad 2 + {K_K3, "\033Os"}, // keypad 3 + {K_K4, "\033Ot"}, // keypad 4 + {K_K5, "\033Ou"}, // keypad 5 + {K_K6, "\033Ov"}, // keypad 6 + {K_K7, "\033Ow"}, // keypad 7 + {K_K8, "\033Ox"}, // keypad 8 + {K_K9, "\033Oy"}, // keypad 9 {K_BS, "\x7f"}, // for some reason 0177 doesn't work # endif @@ -791,226 +790,220 @@ static struct builtin_term builtin_termc * Ordinary vt52 */ {(int)KS_NAME, "vt52"}, - {(int)KS_CE, IF_EB("\033K", ESC_STR "K")}, - {(int)KS_CD, IF_EB("\033J", ESC_STR "J")}, + {(int)KS_CE, "\033K"}, + {(int)KS_CD, "\033J"}, # ifdef TERMINFO - {(int)KS_CM, IF_EB("\033Y%p1%' '%+%c%p2%' '%+%c", - ESC_STR "Y%p1%' '%+%c%p2%' '%+%c")}, + {(int)KS_CM, "\033Y%p1%' '%+%c%p2%' '%+%c"}, # else - {(int)KS_CM, IF_EB("\033Y%+ %+ ", ESC_STR "Y%+ %+ ")}, + {(int)KS_CM, "\033Y%+ %+ "}, # endif {(int)KS_LE, "\b"}, - {(int)KS_SR, IF_EB("\033I", ESC_STR "I")}, - {(int)KS_AL, IF_EB("\033L", ESC_STR "L")}, - {(int)KS_DL, IF_EB("\033M", ESC_STR "M")}, - {K_UP, IF_EB("\033A", ESC_STR "A")}, - {K_DOWN, IF_EB("\033B", ESC_STR "B")}, - {K_LEFT, IF_EB("\033D", ESC_STR "D")}, - {K_RIGHT, IF_EB("\033C", ESC_STR "C")}, - {K_F1, IF_EB("\033P", ESC_STR "P")}, - {K_F2, IF_EB("\033Q", ESC_STR "Q")}, - {K_F3, IF_EB("\033R", ESC_STR "R")}, - {(int)KS_CL, IF_EB("\033H\033J", ESC_STR "H" ESC_STR_nc "J")}, + {(int)KS_SR, "\033I"}, + {(int)KS_AL, "\033L"}, + {(int)KS_DL, "\033M"}, + {K_UP, "\033A"}, + {K_DOWN, "\033B"}, + {K_LEFT, "\033D"}, + {K_RIGHT, "\033C"}, + {K_F1, "\033P"}, + {K_F2, "\033Q"}, + {K_F3, "\033R"}, + {(int)KS_CL, "\033H\033J"}, {(int)KS_MS, "y"}, # endif # if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) {(int)KS_NAME, "xterm"}, - {(int)KS_CE, IF_EB("\033[K", ESC_STR "[K")}, - {(int)KS_AL, IF_EB("\033[L", ESC_STR "[L")}, + {(int)KS_CE, "\033[K"}, + {(int)KS_AL, "\033[L"}, # ifdef TERMINFO - {(int)KS_CAL, IF_EB("\033[%p1%dL", ESC_STR "[%p1%dL")}, + {(int)KS_CAL, "\033[%p1%dL"}, # else - {(int)KS_CAL, IF_EB("\033[%dL", ESC_STR "[%dL")}, + {(int)KS_CAL, "\033[%dL"}, # endif - {(int)KS_DL, IF_EB("\033[M", ESC_STR "[M")}, + {(int)KS_DL, "\033[M"}, # ifdef TERMINFO - {(int)KS_CDL, IF_EB("\033[%p1%dM", ESC_STR "[%p1%dM")}, + {(int)KS_CDL, "\033[%p1%dM"}, # else - {(int)KS_CDL, IF_EB("\033[%dM", ESC_STR "[%dM")}, + {(int)KS_CDL, "\033[%dM"}, # endif # ifdef TERMINFO - {(int)KS_CS, IF_EB("\033[%i%p1%d;%p2%dr", - ESC_STR "[%i%p1%d;%p2%dr")}, + {(int)KS_CS, "\033[%i%p1%d;%p2%dr"}, # else - {(int)KS_CS, IF_EB("\033[%i%d;%dr", ESC_STR "[%i%d;%dr")}, + {(int)KS_CS, "\033[%i%d;%dr"}, # endif - {(int)KS_CL, IF_EB("\033[H\033[2J", ESC_STR "[H" ESC_STR_nc "[2J")}, - {(int)KS_CD, IF_EB("\033[J", ESC_STR "[J")}, - {(int)KS_ME, IF_EB("\033[m", ESC_STR "[m")}, - {(int)KS_MR, IF_EB("\033[7m", ESC_STR "[7m")}, - {(int)KS_MD, IF_EB("\033[1m", ESC_STR "[1m")}, - {(int)KS_UE, IF_EB("\033[m", ESC_STR "[m")}, - {(int)KS_US, IF_EB("\033[4m", ESC_STR "[4m")}, - {(int)KS_STE, IF_EB("\033[29m", ESC_STR "[29m")}, - {(int)KS_STS, IF_EB("\033[9m", ESC_STR "[9m")}, + {(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_STE, "\033[29m"}, + {(int)KS_STS, "\033[9m"}, {(int)KS_MS, "y"}, {(int)KS_UT, "y"}, {(int)KS_LE, "\b"}, - {(int)KS_VI, IF_EB("\033[?25l", ESC_STR "[?25l")}, - {(int)KS_VE, IF_EB("\033[?25h", ESC_STR "[?25h")}, - {(int)KS_VS, IF_EB("\033[?12h", ESC_STR "[?12h")}, - {(int)KS_CVS, IF_EB("\033[?12l", ESC_STR "[?12l")}, + {(int)KS_VI, "\033[?25l"}, + {(int)KS_VE, "\033[?25h"}, + {(int)KS_VS, "\033[?12h"}, + {(int)KS_CVS, "\033[?12l"}, # ifdef TERMINFO - {(int)KS_CSH, IF_EB("\033[%p1%d q", ESC_STR "[%p1%d q")}, + {(int)KS_CSH, "\033[%p1%d q"}, # else - {(int)KS_CSH, IF_EB("\033[%d q", ESC_STR "[%d q")}, + {(int)KS_CSH, "\033[%d q"}, # endif - {(int)KS_CRC, IF_EB("\033[?12$p", ESC_STR "[?12$p")}, - {(int)KS_CRS, IF_EB("\033P$q q\033\\", ESC_STR "P$q q" ESC_STR "\\")}, + {(int)KS_CRC, "\033[?12$p"}, + {(int)KS_CRS, "\033P$q q\033\\"}, # ifdef TERMINFO - {(int)KS_CM, IF_EB("\033[%i%p1%d;%p2%dH", - ESC_STR "[%i%p1%d;%p2%dH")}, + {(int)KS_CM, "\033[%i%p1%d;%p2%dH"}, # else - {(int)KS_CM, IF_EB("\033[%i%d;%dH", ESC_STR "[%i%d;%dH")}, + {(int)KS_CM, "\033[%i%d;%dH"}, # endif - {(int)KS_SR, IF_EB("\033M", ESC_STR "M")}, + {(int)KS_SR, "\033M"}, # ifdef TERMINFO - {(int)KS_CRI, IF_EB("\033[%p1%dC", ESC_STR "[%p1%dC")}, + {(int)KS_CRI, "\033[%p1%dC"}, # else - {(int)KS_CRI, IF_EB("\033[%dC", ESC_STR "[%dC")}, + {(int)KS_CRI, "\033[%dC"}, # endif - {(int)KS_KS, IF_EB("\033[?1h\033=", ESC_STR "[?1h" ESC_STR_nc "=")}, - {(int)KS_KE, IF_EB("\033[?1l\033>", ESC_STR "[?1l" ESC_STR_nc ">")}, + {(int)KS_KS, "\033[?1h\033="}, + {(int)KS_KE, "\033[?1l\033>"}, # ifdef FEAT_XTERM_SAVE - {(int)KS_TI, IF_EB("\0337\033[?47h", ESC_STR "7" ESC_STR_nc "[?47h")}, - {(int)KS_TE, IF_EB("\033[?47l\0338", - ESC_STR_nc "[?47l" ESC_STR_nc "8")}, + {(int)KS_TI, "\0337\033[?47h"}, + {(int)KS_TE, "\033[?47l\0338"}, # endif - {(int)KS_CTI, IF_EB("\033[>4;2m", ESC_STR_nc "[>4;2m")}, - {(int)KS_CTE, IF_EB("\033[>4;m", ESC_STR_nc "[>4;m")}, - {(int)KS_CIS, IF_EB("\033]1;", ESC_STR "]1;")}, + {(int)KS_CTI, "\033[>4;2m"}, + {(int)KS_CTE, "\033[>4;m"}, + {(int)KS_CIS, "\033]1;"}, {(int)KS_CIE, "\007"}, - {(int)KS_TS, IF_EB("\033]2;", ESC_STR "]2;")}, + {(int)KS_TS, "\033]2;"}, {(int)KS_FS, "\007"}, - {(int)KS_CSC, IF_EB("\033]12;", ESC_STR "]12;")}, + {(int)KS_CSC, "\033]12;"}, {(int)KS_CEC, "\007"}, # ifdef TERMINFO - {(int)KS_CWS, IF_EB("\033[8;%p1%d;%p2%dt", - ESC_STR "[8;%p1%d;%p2%dt")}, - {(int)KS_CWP, IF_EB("\033[3;%p1%d;%p2%dt", - ESC_STR "[3;%p1%d;%p2%dt")}, - {(int)KS_CGP, IF_EB("\033[13t", ESC_STR "[13t")}, + {(int)KS_CWS, "\033[8;%p1%d;%p2%dt"}, + {(int)KS_CWP, "\033[3;%p1%d;%p2%dt"}, + {(int)KS_CGP, "\033[13t"}, # else - {(int)KS_CWS, IF_EB("\033[8;%d;%dt", ESC_STR "[8;%d;%dt")}, - {(int)KS_CWP, IF_EB("\033[3;%d;%dt", ESC_STR "[3;%d;%dt")}, - {(int)KS_CGP, IF_EB("\033[13t", ESC_STR "[13t")}, + {(int)KS_CWS, "\033[8;%d;%dt"}, + {(int)KS_CWP, "\033[3;%d;%dt"}, + {(int)KS_CGP, "\033[13t"}, # endif - {(int)KS_CRV, IF_EB("\033[>c", ESC_STR "[>c")}, - {(int)KS_RFG, IF_EB("\033]10;?\007", ESC_STR "]10;?\007")}, - {(int)KS_RBG, IF_EB("\033]11;?\007", ESC_STR "]11;?\007")}, - {(int)KS_U7, IF_EB("\033[6n", ESC_STR "[6n")}, + {(int)KS_CRV, "\033[>c"}, + {(int)KS_RFG, "\033]10;?\007"}, + {(int)KS_RBG, "\033]11;?\007"}, + {(int)KS_U7, "\033[6n"}, # ifdef FEAT_TERMGUICOLORS // These are printf strings, not terminal codes. - {(int)KS_8F, IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR "[38;2;%lu;%lu;%lum")}, - {(int)KS_8B, IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR "[48;2;%lu;%lu;%lum")}, - {(int)KS_8U, IF_EB("\033[58;2;%lu;%lu;%lum", ESC_STR "[58;2;%lu;%lu;%lum")}, + {(int)KS_8F, "\033[38;2;%lu;%lu;%lum"}, + {(int)KS_8B, "\033[48;2;%lu;%lu;%lum"}, + {(int)KS_8U, "\033[58;2;%lu;%lu;%lum"}, # endif - {(int)KS_CAU, IF_EB("\033[58;5;%dm", ESC_STR "[58;5;%dm")}, - {(int)KS_CBE, IF_EB("\033[?2004h", ESC_STR "[?2004h")}, - {(int)KS_CBD, IF_EB("\033[?2004l", ESC_STR "[?2004l")}, - {(int)KS_CST, IF_EB("\033[22;2t", ESC_STR "[22;2t")}, - {(int)KS_CRT, IF_EB("\033[23;2t", ESC_STR "[23;2t")}, - {(int)KS_SSI, IF_EB("\033[22;1t", ESC_STR "[22;1t")}, - {(int)KS_SRI, IF_EB("\033[23;1t", ESC_STR "[23;1t")}, + {(int)KS_CAU, "\033[58;5;%dm"}, + {(int)KS_CBE, "\033[?2004h"}, + {(int)KS_CBD, "\033[?2004l"}, + {(int)KS_CST, "\033[22;2t"}, + {(int)KS_CRT, "\033[23;2t"}, + {(int)KS_SSI, "\033[22;1t"}, + {(int)KS_SRI, "\033[23;1t"}, # if (defined(UNIX) || defined(VMS)) - {(int)KS_FD, IF_EB("\033[?1004l", ESC_STR "[?1004l")}, - {(int)KS_FE, IF_EB("\033[?1004h", ESC_STR "[?1004h")}, + {(int)KS_FD, "\033[?1004l"}, + {(int)KS_FE, "\033[?1004h"}, # endif - {K_UP, IF_EB("\033O*A", ESC_STR "O*A")}, - {K_DOWN, IF_EB("\033O*B", ESC_STR "O*B")}, - {K_RIGHT, IF_EB("\033O*C", ESC_STR "O*C")}, - {K_LEFT, IF_EB("\033O*D", ESC_STR "O*D")}, + {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, IF_EB("\033[@;*A", ESC_STR "[@;*A")}, - {K_XDOWN, IF_EB("\033[@;*B", ESC_STR "[@;*B")}, - {K_XRIGHT, IF_EB("\033[@;*C", ESC_STR "[@;*C")}, - {K_XLEFT, IF_EB("\033[@;*D", ESC_STR "[@;*D")}, + {K_XUP, "\033[@;*A"}, + {K_XDOWN, "\033[@;*B"}, + {K_XRIGHT, "\033[@;*C"}, + {K_XLEFT, "\033[@;*D"}, // An extra set of function keys for vt100 mode - {K_XF1, IF_EB("\033O*P", ESC_STR "O*P")}, - {K_XF2, IF_EB("\033O*Q", ESC_STR "O*Q")}, - {K_XF3, IF_EB("\033O*R", ESC_STR "O*R")}, - {K_XF4, IF_EB("\033O*S", ESC_STR "O*S")}, - {K_F1, IF_EB("\033[11;*~", ESC_STR "[11;*~")}, - {K_F2, IF_EB("\033[12;*~", ESC_STR "[12;*~")}, - {K_F3, IF_EB("\033[13;*~", ESC_STR "[13;*~")}, - {K_F4, IF_EB("\033[14;*~", ESC_STR "[14;*~")}, - {K_F5, IF_EB("\033[15;*~", ESC_STR "[15;*~")}, - {K_F6, IF_EB("\033[17;*~", ESC_STR "[17;*~")}, - {K_F7, IF_EB("\033[18;*~", ESC_STR "[18;*~")}, - {K_F8, IF_EB("\033[19;*~", ESC_STR "[19;*~")}, - {K_F9, IF_EB("\033[20;*~", ESC_STR "[20;*~")}, - {K_F10, IF_EB("\033[21;*~", ESC_STR "[21;*~")}, - {K_F11, IF_EB("\033[23;*~", ESC_STR "[23;*~")}, - {K_F12, IF_EB("\033[24;*~", ESC_STR "[24;*~")}, - {K_S_TAB, IF_EB("\033[Z", ESC_STR "[Z")}, - {K_HELP, IF_EB("\033[28;*~", ESC_STR "[28;*~")}, - {K_UNDO, IF_EB("\033[26;*~", ESC_STR "[26;*~")}, - {K_INS, IF_EB("\033[2;*~", ESC_STR "[2;*~")}, - {K_HOME, IF_EB("\033[1;*H", ESC_STR "[1;*H")}, - // {K_S_HOME, IF_EB("\033O2H", ESC_STR "O2H")}, - // {K_C_HOME, IF_EB("\033O5H", ESC_STR "O5H")}, - {K_KHOME, IF_EB("\033[1;*~", ESC_STR "[1;*~")}, - {K_XHOME, IF_EB("\033O*H", ESC_STR "O*H")}, // other Home - {K_ZHOME, IF_EB("\033[7;*~", ESC_STR "[7;*~")}, // other Home - {K_END, IF_EB("\033[1;*F", ESC_STR "[1;*F")}, - // {K_S_END, IF_EB("\033O2F", ESC_STR "O2F")}, - // {K_C_END, IF_EB("\033O5F", ESC_STR "O5F")}, - {K_KEND, IF_EB("\033[4;*~", ESC_STR "[4;*~")}, - {K_XEND, IF_EB("\033O*F", ESC_STR "O*F")}, // other End - {K_ZEND, IF_EB("\033[8;*~", ESC_STR "[8;*~")}, - {K_PAGEUP, IF_EB("\033[5;*~", ESC_STR "[5;*~")}, - {K_PAGEDOWN, IF_EB("\033[6;*~", ESC_STR "[6;*~")}, - {K_KPLUS, IF_EB("\033O*k", ESC_STR "O*k")}, // keypad plus - {K_KMINUS, IF_EB("\033O*m", ESC_STR "O*m")}, // keypad minus - {K_KDIVIDE, IF_EB("\033O*o", ESC_STR "O*o")}, // keypad / - {K_KMULTIPLY, IF_EB("\033O*j", ESC_STR "O*j")}, // keypad * - {K_KENTER, IF_EB("\033O*M", ESC_STR "O*M")}, // keypad Enter - {K_KPOINT, IF_EB("\033O*n", ESC_STR "O*n")}, // keypad . - {K_K0, IF_EB("\033O*p", ESC_STR "O*p")}, // keypad 0 - {K_K1, IF_EB("\033O*q", ESC_STR "O*q")}, // keypad 1 - {K_K2, IF_EB("\033O*r", ESC_STR "O*r")}, // keypad 2 - {K_K3, IF_EB("\033O*s", ESC_STR "O*s")}, // keypad 3 - {K_K4, IF_EB("\033O*t", ESC_STR "O*t")}, // keypad 4 - {K_K5, IF_EB("\033O*u", ESC_STR "O*u")}, // keypad 5 - {K_K6, IF_EB("\033O*v", ESC_STR "O*v")}, // keypad 6 - {K_K7, IF_EB("\033O*w", ESC_STR "O*w")}, // keypad 7 - {K_K8, IF_EB("\033O*x", ESC_STR "O*x")}, // keypad 8 - {K_K9, IF_EB("\033O*y", ESC_STR "O*y")}, // keypad 9 - {K_KDEL, IF_EB("\033[3;*~", ESC_STR "[3;*~")}, // keypad Del - {K_PS, IF_EB("\033[200~", ESC_STR "[200~")}, // paste start - {K_PE, IF_EB("\033[201~", ESC_STR "[201~")}, // paste end + {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_K0, "\033O*p"}, // keypad 0 + {K_K1, "\033O*q"}, // keypad 1 + {K_K2, "\033O*r"}, // keypad 2 + {K_K3, "\033O*s"}, // keypad 3 + {K_K4, "\033O*t"}, // keypad 4 + {K_K5, "\033O*u"}, // keypad 5 + {K_K6, "\033O*v"}, // keypad 6 + {K_K7, "\033O*w"}, // keypad 7 + {K_K8, "\033O*x"}, // keypad 8 + {K_K9, "\033O*y"}, // keypad 9 + {K_KDEL, "\033[3;*~"}, // keypad Del + {K_PS, "\033[200~"}, // paste start + {K_PE, "\033[201~"}, // paste end {BT_EXTRA_KEYS, ""}, - {TERMCAP2KEY('k', '0'), IF_EB("\033[10;*~", ESC_STR "[10;*~")}, // F0 - {TERMCAP2KEY('F', '3'), IF_EB("\033[25;*~", ESC_STR "[25;*~")}, // F13 + {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'), IF_EB("\033[29;*~", ESC_STR "[29;*~")}, // F16 - {TERMCAP2KEY('F', '7'), IF_EB("\033[31;*~", ESC_STR "[31;*~")}, // F17 - {TERMCAP2KEY('F', '8'), IF_EB("\033[32;*~", ESC_STR "[32;*~")}, // F18 - {TERMCAP2KEY('F', '9'), IF_EB("\033[33;*~", ESC_STR "[33;*~")}, // F19 - {TERMCAP2KEY('F', 'A'), IF_EB("\033[34;*~", ESC_STR "[34;*~")}, // F20 - - {TERMCAP2KEY('F', 'B'), IF_EB("\033[42;*~", ESC_STR "[42;*~")}, // F21 - {TERMCAP2KEY('F', 'C'), IF_EB("\033[43;*~", ESC_STR "[43;*~")}, // F22 - {TERMCAP2KEY('F', 'D'), IF_EB("\033[44;*~", ESC_STR "[44;*~")}, // F23 - {TERMCAP2KEY('F', 'E'), IF_EB("\033[45;*~", ESC_STR "[45;*~")}, // F24 - {TERMCAP2KEY('F', 'F'), IF_EB("\033[46;*~", ESC_STR "[46;*~")}, // F25 - {TERMCAP2KEY('F', 'G'), IF_EB("\033[47;*~", ESC_STR "[47;*~")}, // F26 - {TERMCAP2KEY('F', 'H'), IF_EB("\033[48;*~", ESC_STR "[48;*~")}, // F27 - {TERMCAP2KEY('F', 'I'), IF_EB("\033[49;*~", ESC_STR "[49;*~")}, // F28 - {TERMCAP2KEY('F', 'J'), IF_EB("\033[50;*~", ESC_STR "[50;*~")}, // F29 - {TERMCAP2KEY('F', 'K'), IF_EB("\033[51;*~", ESC_STR "[51;*~")}, // F30 - - {TERMCAP2KEY('F', 'L'), IF_EB("\033[52;*~", ESC_STR "[52;*~")}, // F31 - {TERMCAP2KEY('F', 'M'), IF_EB("\033[53;*~", ESC_STR "[53;*~")}, // F32 - {TERMCAP2KEY('F', 'N'), IF_EB("\033[54;*~", ESC_STR "[54;*~")}, // F33 - {TERMCAP2KEY('F', 'O'), IF_EB("\033[55;*~", ESC_STR "[55;*~")}, // F34 - {TERMCAP2KEY('F', 'P'), IF_EB("\033[56;*~", ESC_STR "[56;*~")}, // F35 - {TERMCAP2KEY('F', 'Q'), IF_EB("\033[57;*~", ESC_STR "[57;*~")}, // F36 - {TERMCAP2KEY('F', 'R'), IF_EB("\033[58;*~", ESC_STR "[58;*~")}, // F37 + {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(UNIX) || defined(ALL_BUILTIN_TCAPS) @@ -1323,10 +1316,9 @@ static struct builtin_term builtin_termc {(int)KS_NAME, "dumb"}, {(int)KS_CL, "\014"}, #ifdef TERMINFO - {(int)KS_CM, IF_EB("\033[%i%p1%d;%p2%dH", - ESC_STR "[%i%p1%d;%p2%dH")}, + {(int)KS_CM, "\033[%i%p1%d;%p2%dH"}, #else - {(int)KS_CM, IF_EB("\033[%i%d;%dH", ESC_STR "[%i%d;%dH")}, + {(int)KS_CM, "\033[%i%d;%dH"}, #endif /* @@ -2970,9 +2962,9 @@ term_color(char_u *s, int n) #endif char *lead = i == 2 ? ( #if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS) - s[1] == '|' ? IF_EB("\033|", ESC_STR "|") : + s[1] == '|' ? "\033|" : #endif - IF_EB("\033[", ESC_STR "[")) : "\233"; + "\033[") : "\233"; char *tail = s[i] == '3' ? (n >= 16 ? "38;5;" : "9") : (n >= 16 ? "48;5;" : "10"); @@ -6523,11 +6515,9 @@ update_tcap(int attr) struct builtin_term *p; p = find_builtin_term(DEFAULT_TERM); - sprintf(ksme_str, IF_EB("\033|%dm", ESC_STR "|%dm"), attr); - sprintf(ksmd_str, IF_EB("\033|%dm", ESC_STR "|%dm"), - attr | 0x08); // FOREGROUND_INTENSITY - sprintf(ksmr_str, IF_EB("\033|%dm", ESC_STR "|%dm"), - ((attr & 0x0F) << 4) | ((attr & 0xF0) >> 4)); + sprintf(ksme_str, "\033|%dm", attr); + sprintf(ksmd_str, "\033|%dm", attr | 0x08); // FOREGROUND_INTENSITY + sprintf(ksmr_str, "\033|%dm", ((attr & 0x0F) << 4) | ((attr & 0xF0) >> 4)); while (p->bt_string != NULL) {
--- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -1073,8 +1073,6 @@ func Test_edit_DROP() endfunc func Test_edit_CTRL_V() - CheckNotFeature ebcdic - new call setline(1, ['abc']) call cursor(2, 1) @@ -1631,11 +1629,7 @@ endfunc func Test_edit_special_chars() new - if has("ebcdic") - let t = "o\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>" - else - let t = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>" - endif + let t = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>" exe "normal " . t call assert_equal("ABC !a\<C-O>g\<C-G>8", getline(2))
--- a/src/testdir/test_exec_while_if.vim +++ b/src/testdir/test_exec_while_if.vim @@ -6,11 +6,7 @@ func Test_exec_while_if() let i = 0 while i < 12 let i = i + 1 - if has("ebcdic") - execute "normal o" . i . "\047" - else - execute "normal o" . i . "\033" - endif + execute "normal o" . i . "\033" if i % 2 normal Ax if i == 9 @@ -21,21 +17,13 @@ func Test_exec_while_if() else let j = 9 while j > 0 - if has("ebcdic") - execute "normal" j . "a" . j . "\x27" - else - execute "normal" j . "a" . j . "\x1b" - endif + execute "normal" j . "a" . j . "\x1b" let j = j - 1 endwhile endif endif if i == 9 - if has("ebcdic") - execute "normal Az\047" - else - execute "normal Az\033" - endif + execute "normal Az\033" endif endwhile unlet i j
--- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -245,11 +245,7 @@ func Test_printf_misc() call assert_equal('65535', printf('%ld', 0xFFFF)) call assert_equal('131071', printf('%ld', 0x1FFFF)) - if has('ebcdic') - call assert_equal('#', printf('%c', 123)) - else - call assert_equal('{', printf('%c', 123)) - endif + call assert_equal('{', printf('%c', 123)) call assert_equal('abc', printf('%s', 'abc')) call assert_equal('abc', printf('%S', 'abc'))
--- a/src/testdir/test_gf.vim +++ b/src/testdir/test_gf.vim @@ -19,11 +19,7 @@ func Test_gf_url() call search("^second") call search("URL") call assert_equal("URL://machine.name/tmp/vimtest2b", expand("<cfile>")) - if has("ebcdic") - set isf=@,240-249,/,.,-,_,+,,,$,:,~,\ - else - set isf=@,48-57,/,.,-,_,+,,,$,~,\ - endif + set isf=@,48-57,/,.,-,_,+,,,$,~,\ call search("^third") call search("name") call assert_equal("URL:\\\\machine.name\\vimtest2c", expand("<cfile>")) @@ -90,11 +86,7 @@ endfunc " Test for invoking 'gf' on a ${VAR} variable func Test_gf() - if has("ebcdic") - set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,} - else - set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,} - endif + set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,} call writefile(["Test for gf command"], "Xtest1") if has("unix")
--- a/src/testdir/test_regexp_utf8.vim +++ b/src/testdir/test_regexp_utf8.vim @@ -152,9 +152,6 @@ func s:classes_test() if has('win32') let identchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz ¡¢£¤¥¦§µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ' let kwordchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' - elseif has('ebcdic') - let identchars_ok = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz¬®µº¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' - let kwordchars_ok = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz¬®µº¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' else let identchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' let kwordchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' @@ -166,8 +163,6 @@ func s:classes_test() let fnamechars_ok = '$+,-./0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' elseif has('vms') let fnamechars_ok = '#$%+,-./0123456789:;<>ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' - elseif has('ebcdic') - let fnamechars_ok = '#$%+,-./=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' else let fnamechars_ok = '#$%+,-./0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' endif
--- a/src/version.c +++ b/src/version.c @@ -231,11 +231,7 @@ static char *(features[]) = #else "-dnd", #endif -#ifdef EBCDIC - "+ebcdic", -#else "-ebcdic", -#endif #ifdef FEAT_EMACS_TAGS "+emacs_tags", #else @@ -751,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4273, +/**/ 4272, /**/ 4271,
--- a/src/viminfo.c +++ b/src/viminfo.c @@ -162,7 +162,7 @@ viminfo_writestring(FILE *fd, char_u *p) // the string (e.g., variable name). Add something to the length for the // '<', NL and trailing NUL. if (len > LSIZE / 2) - fprintf(fd, IF_EB("\026%d\n<", CTRL_V_STR "%d\n<"), len + 3); + fprintf(fd, "\026%d\n<", len + 3); while ((c = *p++) != NUL) { @@ -2485,11 +2485,9 @@ read_viminfo_filemark(vir_T *virp, int f // We only get here if line[0] == '\'' or '-'. // Illegal mark names are ignored (for future expansion). str = virp->vir_line + 1; - if ( -#ifndef EBCDIC - *str <= 127 && -#endif - ((*virp->vir_line == '\'' && (VIM_ISDIGIT(*str) || isupper(*str))) + if (*str <= 127 + && ((*virp->vir_line == '\'' + && (VIM_ISDIGIT(*str) || isupper(*str))) || (*virp->vir_line == '-' && *str == '\''))) { if (*str == '\'')