mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -1848,7 +1848,7 @@ char *did_set_spelllang(win_T *wp)
|
||||
region = NULL;
|
||||
len = (int)STRLEN(lang);
|
||||
|
||||
if (!valid_spelllang(lang)) {
|
||||
if (!valid_spelllang((char *)lang)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3545,18 +3545,18 @@ int expand_spelling(linenr_T lnum, char_u *pat, char ***matchp)
|
||||
return ga.ga_len;
|
||||
}
|
||||
|
||||
/// Return true if "val" is a valid 'spelllang' value.
|
||||
bool valid_spelllang(const char_u *val)
|
||||
/// @return true if "val" is a valid 'spelllang' value.
|
||||
bool valid_spelllang(const char *val)
|
||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
return valid_name(val, ".-_,@");
|
||||
}
|
||||
|
||||
/// Return true if "val" is a valid 'spellfile' value.
|
||||
bool valid_spellfile(const char_u *val)
|
||||
/// @return true if "val" is a valid 'spellfile' value.
|
||||
bool valid_spellfile(const char *val)
|
||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
for (const char_u *s = val; *s != NUL; s++) {
|
||||
for (const char_u *s = (char_u *)val; *s != NUL; s++) {
|
||||
if (!vim_isfilec(*s) && *s != ',' && *s != ' ') {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user