aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spell.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-08-25 22:35:20 +0200
committerGitHub <noreply@github.com>2022-08-25 22:35:20 +0200
commit6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0 (patch)
tree163d6c0553e6c9f7a91d7d0d97e369722dca75be /src/nvim/spell.c
parentbfd1adc62c615e7b65bdfe6d3c21158708eb4314 (diff)
parent40855b0143a864739a6037921e15699445dcf8a7 (diff)
downloadrneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.tar.gz
rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.tar.bz2
rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.zip
Merge pull request #19628 from dundargoc/refactor/char_u/2
refactor: replace char_u with char
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r--src/nvim/spell.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index ecb97afd02..439fcff8a0 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -1837,7 +1837,7 @@ char *did_set_spelllang(win_T *wp)
// Make a copy of 'spelllang', the SpellFileMissing autocommands may change
// it under our fingers.
- spl_copy = vim_strsave(wp->w_s->b_p_spl);
+ spl_copy = vim_strsave((char_u *)wp->w_s->b_p_spl);
wp->w_s->b_cjk = 0;
@@ -1966,7 +1966,7 @@ char *did_set_spelllang(win_T *wp)
// round 1: load first name in 'spellfile'.
// round 2: load second name in 'spellfile.
// etc.
- spf = (char *)curwin->w_s->b_p_spf;
+ spf = curwin->w_s->b_p_spf;
for (round = 0; round == 0 || *spf != NUL; round++) {
if (round == 0) {
// Internal wordlist, if there is one.
@@ -2120,13 +2120,13 @@ static void use_midword(slang_T *lp, win_T *wp)
wp->w_s->b_spell_ismw[c] = true;
} else if (wp->w_s->b_spell_ismw_mb == NULL) {
// First multi-byte char in "b_spell_ismw_mb".
- wp->w_s->b_spell_ismw_mb = vim_strnsave(p, (size_t)l);
+ wp->w_s->b_spell_ismw_mb = (char *)vim_strnsave(p, (size_t)l);
} else {
// Append multi-byte chars to "b_spell_ismw_mb".
const int n = (int)STRLEN(wp->w_s->b_spell_ismw_mb);
- char_u *bp = vim_strnsave(wp->w_s->b_spell_ismw_mb, (size_t)n + (size_t)l);
+ char_u *bp = vim_strnsave((char_u *)wp->w_s->b_spell_ismw_mb, (size_t)n + (size_t)l);
xfree(wp->w_s->b_spell_ismw_mb);
- wp->w_s->b_spell_ismw_mb = bp;
+ wp->w_s->b_spell_ismw_mb = (char *)bp;
STRLCPY(bp + n, p, l + 1);
}
p += l;
@@ -2359,7 +2359,7 @@ bool spell_iswordp(const char_u *p, const win_T *wp)
if (c < 256
? wp->w_s->b_spell_ismw[c]
: (wp->w_s->b_spell_ismw_mb != NULL
- && vim_strchr((char *)wp->w_s->b_spell_ismw_mb, c) != NULL)) {
+ && vim_strchr(wp->w_s->b_spell_ismw_mb, c) != NULL)) {
s = p + l;
}
}
@@ -2405,7 +2405,7 @@ static bool spell_iswordp_w(const int *p, const win_T *wp)
if (*p <
256 ? wp->w_s->b_spell_ismw[*p] : (wp->w_s->b_spell_ismw_mb != NULL
- && vim_strchr((char *)wp->w_s->b_spell_ismw_mb,
+ && vim_strchr(wp->w_s->b_spell_ismw_mb,
*p) != NULL)) {
s = p + 1;
} else {
@@ -3599,7 +3599,7 @@ char *compile_cap_prog(synblock_T *synblock)
synblock->b_cap_prog = NULL;
} else {
// Prepend a ^ so that we only match at one column
- char_u *re = concat_str((char_u *)"^", synblock->b_p_spc);
+ char_u *re = concat_str((char_u *)"^", (char_u *)synblock->b_p_spc);
synblock->b_cap_prog = vim_regcomp((char *)re, RE_MAGIC);
xfree(re);
if (synblock->b_cap_prog == NULL) {