diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 17:43:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-14 17:43:21 +0100 |
commit | 2f37ffb71920d0b50f658108736a1465e1e5f280 (patch) | |
tree | 1971f1f0f146e16cc8d0f52c97e6b9a0c21f27c6 /src/nvim/path.c | |
parent | ede00b29d175625479060c5c52e256ec6fc445c1 (diff) | |
parent | 1450a6f7534147e3d7252594cf06e2a1cc14b79b (diff) | |
download | rneovim-2f37ffb71920d0b50f658108736a1465e1e5f280.tar.gz rneovim-2f37ffb71920d0b50f658108736a1465e1e5f280.tar.bz2 rneovim-2f37ffb71920d0b50f658108736a1465e1e5f280.zip |
Merge pull request #16316 from bfredl/macroman
refactor(macros): delete multibyte macros which just are aliases
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index 6f0f715a25..1085f7a10c 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -359,8 +359,8 @@ int path_fnamencmp(const char *const fname1, const char *const fname2, size_t le const char *p1 = fname1; const char *p2 = fname2; while (len > 0) { - c1 = PTR2CHAR((const char_u *)p1); - c2 = PTR2CHAR((const char_u *)p2); + c1 = utf_ptr2char((const char_u *)p1); + c2 = utf_ptr2char((const char_u *)p2); if ((c1 == NUL || c2 == NUL || (!((c1 == '/' || c1 == '\\') && (c2 == '\\' || c2 == '/')))) && (p_fic ? (c1 != c2 && CH_FOLD(c1) != CH_FOLD(c2)) : c1 != c2)) { @@ -631,7 +631,7 @@ static size_t do_path_expand(garray_T *gap, const char_u *path, size_t wildoff, && (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL #ifndef WIN32 || (!p_fic && (flags & EW_ICASE) - && isalpha(PTR2CHAR(path_end))) + && isalpha(utf_ptr2char(path_end))) #endif )) { e = p; @@ -1937,8 +1937,8 @@ int pathcmp(const char *p, const char *q, int maxlen) const char *s = NULL; for (i = 0, j = 0; maxlen < 0 || (i < maxlen && j < maxlen);) { - c1 = PTR2CHAR((char_u *)p + i); - c2 = PTR2CHAR((char_u *)q + j); + c1 = utf_ptr2char((char_u *)p + i); + c2 = utf_ptr2char((char_u *)q + j); // End of "p": check if "q" also ends or just has a slash. if (c1 == NUL) { @@ -1980,8 +1980,8 @@ int pathcmp(const char *p, const char *q, int maxlen) return 0; } - c1 = PTR2CHAR((char_u *)s + i); - c2 = PTR2CHAR((char_u *)s + i + utfc_ptr2len((char_u *)s + i)); + c1 = utf_ptr2char((char_u *)s + i); + c2 = utf_ptr2char((char_u *)s + i + utfc_ptr2len((char_u *)s + i)); // ignore a trailing slash, but not "//" or ":/" if (c2 == NUL && i > 0 |