aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorDundar Goc <gocdundar@gmail.com>2022-05-04 22:35:50 +0200
committerDundar Goc <gocdundar@gmail.com>2022-05-07 14:54:01 +0200
commit2a378e6e82cececb12339f2df51ffe107039d867 (patch)
treeacf9250e683b303d2a22ff32455100cc4f6802cf /src/nvim/option.c
parentd9ec57e16a13f66a4b17edd872786e2c67348752 (diff)
downloadrneovim-2a378e6e82cececb12339f2df51ffe107039d867.tar.gz
rneovim-2a378e6e82cececb12339f2df51ffe107039d867.tar.bz2
rneovim-2a378e6e82cececb12339f2df51ffe107039d867.zip
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 16c4abfa2a..ec2a6dc1ea 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1502,7 +1502,7 @@ int do_set(char_u *arg, int opt_flags)
) {
arg++; // remove backslash
}
- i = utfc_ptr2len(arg);
+ i = utfc_ptr2len((char *)arg);
if (i > 1) {
// copy multibyte char
memmove(s, arg, (size_t)i);
@@ -2664,13 +2664,13 @@ ambw_end:
int x2 = -1;
int x3 = -1;
- p += utfc_ptr2len(p);
+ p += utfc_ptr2len((char *)p);
if (*p != NUL) {
x2 = *p++;
}
if (*p != NUL) {
- x3 = utf_ptr2char(p);
- p += utfc_ptr2len(p);
+ x3 = utf_ptr2char((char *)p);
+ p += utfc_ptr2len((char *)p);
}
if (x2 != ':' || x3 == -1 || (*p != NUL && *p != ',')) {
errmsg = e_invarg;
@@ -3526,7 +3526,7 @@ static int get_encoded_char_adv(char_u **p)
}
// TODO(bfredl): use schar_T representation and utfc_ptr2len
- int clen = utf_ptr2len(s);
+ int clen = utf_ptr2len((char *)s);
int c = mb_cptr2char_adv((const char_u **)p);
if (clen == 1 && c > 127) { // Invalid UTF-8 byte
return 0;
@@ -7140,7 +7140,7 @@ static void langmap_set(void)
if (p[0] == '\\' && p[1] != NUL) {
p++;
}
- from = utf_ptr2char(p);
+ from = utf_ptr2char((char *)p);
to = NUL;
if (p2 == NULL) {
MB_PTR_ADV(p);
@@ -7148,14 +7148,14 @@ static void langmap_set(void)
if (p[0] == '\\') {
p++;
}
- to = utf_ptr2char(p);
+ to = utf_ptr2char((char *)p);
}
} else {
if (p2[0] != ',') {
if (p2[0] == '\\') {
p2++;
}
- to = utf_ptr2char(p2);
+ to = utf_ptr2char((char *)p2);
}
}
if (to == NUL) {