diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-02-12 13:49:02 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-02-18 20:54:13 -0500 |
commit | 7dd48d7af08613255bc95b63f5b6b0f096a98d22 (patch) | |
tree | fb85ab05a011eb6bc23b771569e152410d966811 /src/nvim/mbyte.c | |
parent | 690e43b461491507094da8eeb48a92cf2f38b282 (diff) | |
download | rneovim-7dd48d7af08613255bc95b63f5b6b0f096a98d22.tar.gz rneovim-7dd48d7af08613255bc95b63f5b6b0f096a98d22.tar.bz2 rneovim-7dd48d7af08613255bc95b63f5b6b0f096a98d22.zip |
Enable -Wconversion: mark.c.
Refactoring summary:
- MB_STRNICMP: Inlined.
- MB_STRNCMP: Inlined.
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 123ef377e6..5c89e9d8eb 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -2839,6 +2839,16 @@ int mb_strnicmp(char_u *s1, char_u *s2, size_t nn) return 0; } +/* We need to call mb_stricmp() even when we aren't dealing with a multi-byte + * encoding because mb_stricmp() takes care of all ascii and non-ascii + * encodings, including characters with umlauts in latin1, etc., while + * STRICMP() only handles the system locale version, which often does not + * handle non-ascii properly. */ +int mb_stricmp(char_u *s1, char_u *s2) +{ + return mb_strnicmp(s1, s2, MAXCOL); +} + /* * "g8": show bytes of the UTF-8 char under the cursor. Doesn't matter what * 'encoding' has been set to. |