diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-05-03 11:06:27 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-05-04 15:25:54 +0200 |
commit | 5576d30e89153c817fb1a8d23c30cfc0432bc7c6 (patch) | |
tree | 3a1457be276d95ffccbb760e79c708ab11b2cd54 /src/nvim/cursor_shape.c | |
parent | 3ec93ca92cb08faed342586e86a6f21b35264376 (diff) | |
download | rneovim-5576d30e89153c817fb1a8d23c30cfc0432bc7c6.tar.gz rneovim-5576d30e89153c817fb1a8d23c30cfc0432bc7c6.tar.bz2 rneovim-5576d30e89153c817fb1a8d23c30cfc0432bc7c6.zip |
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/cursor_shape.c')
-rw-r--r-- | src/nvim/cursor_shape.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c index 82c3a714b1..b092873a35 100644 --- a/src/nvim/cursor_shape.c +++ b/src/nvim/cursor_shape.c @@ -94,11 +94,11 @@ Array mode_style_array(void) /// @returns error message for an illegal option, NULL otherwise. char *parse_shape_opt(int what) { - char_u *colonp; - char_u *commap; - char_u *slashp; - char_u *p = NULL; - char_u *endp; + char *colonp; + char *commap; + char *slashp; + char *p = NULL; + char *endp; int idx = 0; // init for GCC int all_idx; int len; @@ -118,10 +118,10 @@ char *parse_shape_opt(int what) } } // Repeat for all comma separated parts. - char_u *modep = p_guicursor; + char *modep = (char *)p_guicursor; while (modep != NULL && *modep != NUL) { - colonp = vim_strchr(modep, ':'); - commap = vim_strchr(modep, ','); + colonp = (char *)vim_strchr((char_u *)modep, ':'); + commap = (char *)vim_strchr((char_u *)modep, ','); if (colonp == NULL || (commap != NULL && commap < colonp)) { return N_("E545: Missing colon"); @@ -169,7 +169,7 @@ char *parse_shape_opt(int what) for (p = colonp + 1; *p && *p != ',';) { { // First handle the ones with a number argument. - i = *p; + i = (uint8_t)(*p); len = 0; if (STRNICMP(p, "ver", 3) == 0) { len = 3; @@ -187,7 +187,7 @@ char *parse_shape_opt(int what) if (!ascii_isdigit(*p)) { return N_("E548: digit expected"); } - int n = getdigits_int(&p, false, 0); + int n = getdigits_int((char_u **)&p, false, 0); if (len == 3) { // "ver" or "hor" if (n == 0) { return N_("E549: Illegal percentage"); @@ -215,7 +215,7 @@ char *parse_shape_opt(int what) } p += 5; } else { // must be a highlight group name then - endp = vim_strchr(p, '-'); + endp = (char *)vim_strchr((char_u *)p, '-'); if (commap == NULL) { // last part if (endp == NULL) { endp = p + STRLEN(p); // find end of part @@ -223,14 +223,14 @@ char *parse_shape_opt(int what) } else if (endp > commap || endp == NULL) { endp = commap; } - slashp = vim_strchr(p, '/'); + slashp = (char *)vim_strchr((char_u *)p, '/'); if (slashp != NULL && slashp < endp) { // "group/langmap_group" - i = syn_check_group((char *)p, (size_t)(slashp - p)); + i = syn_check_group(p, (size_t)(slashp - p)); p = slashp + 1; } if (round == 2) { - shape_table[idx].id = syn_check_group((char *)p, (size_t)(endp - p)); + shape_table[idx].id = syn_check_group(p, (size_t)(endp - p)); shape_table[idx].id_lm = shape_table[idx].id; if (slashp != NULL && slashp < endp) { shape_table[idx].id = i; |