From 4e0fc575d77017694622d8d9048026059c8a3835 Mon Sep 17 00:00:00 2001 From: Hinidu Date: Wed, 9 Apr 2014 00:07:24 +0300 Subject: [PATCH] Remove FEAT_MBYTE Multi-byte character handling. --- config/config.h.in | 1 - src/nvim/misc1.c | 3 --- src/nvim/option.c | 5 ++--- src/nvim/strings.c | 3 +-- src/nvim/testdir/test95.in | 3 +-- src/nvim/ui.c | 5 +---- 6 files changed, 5 insertions(+), 15 deletions(-) diff --git a/config/config.h.in b/config/config.h.in index c110dfdb03..b46bf595b1 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -133,7 +133,6 @@ #define FEAT_LISP #define FEAT_LISTCMDS #define FEAT_LOCALMAP -#define FEAT_MBYTE #define FEAT_MENU #define FEAT_MODIFY_FNAME #define FEAT_MOUSE diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index e63ca008bc..5e40ea12f8 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1378,8 +1378,6 @@ void ins_bytes(char_u *p) ins_bytes_len(p, (int)STRLEN(p)); } -#if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) \ - || defined(FEAT_COMMENTS) || defined(FEAT_MBYTE) || defined(PROTO) /* * Insert string "p" with length "len" at the cursor position. * Handles Replace mode and multi-byte characters. @@ -1402,7 +1400,6 @@ void ins_bytes_len(char_u *p, int len) for (i = 0; i < len; ++i) ins_char(p[i]); } -#endif /* * Insert or replace a single character at the cursor position. diff --git a/src/nvim/option.c b/src/nvim/option.c index f922b8646d..1baf24fcd9 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -7561,9 +7561,8 @@ static int wc_use_keyname(char_u *varp, long *wcp) * * langmap_mapchar[] maps any of 256 chars to an ASCII char used for Vim * commands. - * When FEAT_MBYTE is defined langmap_mapga.ga_data is a sorted table of - * langmap_entry_T. This does the same as langmap_mapchar[] for characters >= - * 256. + * langmap_mapga.ga_data is a sorted table of langmap_entry_T. + * This does the same as langmap_mapchar[] for characters >= 256. */ /* * With multi-byte support use growarray for 'langmap' chars >= 256 diff --git a/src/nvim/strings.c b/src/nvim/strings.c index d8a14c1883..e90909314a 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -500,8 +500,7 @@ void sort_strings(char_u **files, int count) qsort((void *)files, (size_t)count, sizeof(char_u *), sort_compare); } -#if (defined(FEAT_MBYTE) && defined(FEAT_QUICKFIX)) \ - || defined(FEAT_SPELL) || defined(PROTO) +#if defined(FEAT_QUICKFIX) || defined(FEAT_SPELL) || defined(PROTO) /* * Return TRUE if string "s" contains a non-ASCII character (128 or higher). * When "s" is NULL FALSE is returned. diff --git a/src/nvim/testdir/test95.in b/src/nvim/testdir/test95.in index 90fa69945a..9afcc7fa6a 100644 --- a/src/nvim/testdir/test95.in +++ b/src/nvim/testdir/test95.in @@ -19,8 +19,7 @@ STARTTEST :" When there is no match use only the first two items. :let tl = [] -:"""" Multi-byte character tests. These will fail unless vim is compiled -:"""" with Multibyte (FEAT_MBYTE) or BIG/HUGE features. +:"""" Multi-byte character tests. :call add(tl, [2, '[[:alpha:][=a=]]\+', '879 aiaãâaiuvna ', 'aiaãâaiuvna']) :call add(tl, [2, '[[=a=]]\+', 'ddaãâbcd', 'aãâ']) " equivalence classes :call add(tl, [2, '[^ม ]\+', 'มม oijasoifjos ifjoisj f osij j มมมมม abcd', 'oijasoifjos']) diff --git a/src/nvim/ui.c b/src/nvim/ui.c index ef61117126..1ef76d516c 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -328,7 +328,7 @@ void add_to_input_buf(char_u *s, int len) #if ((defined(FEAT_XIM) || defined(FEAT_DND)) && defined(FEAT_GUI_GTK)) \ || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MAC) \ - || (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) \ + || defined(FEAT_MBYTE_IME) \ || (defined(FEAT_GUI) && (!defined(USE_ON_FLY_SCROLL) \ || defined(FEAT_MENU))) \ || defined(PROTO) @@ -494,8 +494,6 @@ void ui_cursor_shape(void) conceal_check_cursur_line(); } -#if defined(FEAT_GUI) || defined(FEAT_RIGHTLEFT) \ - || defined(FEAT_MBYTE) || defined(PROTO) /* * Check bounds for column number */ @@ -519,7 +517,6 @@ int check_row(int row) return (int)screen_Rows - 1; return row; } -#endif /* * Stuff for the X clipboard. Shared between VMS and Unix.