Replace vim_iswhite with ascii_iswhite() defined in ascii.h

This commit is contained in:
Felipe Oliveira Carvalho
2015-04-22 19:12:26 -03:00
parent d350d12a00
commit 93bf201119
33 changed files with 198 additions and 192 deletions

View File

@@ -9501,7 +9501,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
fword_ends = (fword[sp->ts_fidx] == NUL
|| (soundfold
? vim_iswhite(fword[sp->ts_fidx])
? ascii_iswhite(fword[sp->ts_fidx])
: !spell_iswordp(fword + sp->ts_fidx, curwin)));
tword[sp->ts_twordlen] = NUL;
@@ -10915,7 +10915,7 @@ stp_sal_score (
// sounds like "t h" while "the" sounds like "@". Avoid that by
// removing the space. Don't do it when the good word also contains a
// space.
if (vim_iswhite(su->su_badptr[su->su_badlen])
if (ascii_iswhite(su->su_badptr[su->su_badlen])
&& *skiptowhite(stp->st_word) == NUL)
for (p = fword; *(p = skiptowhite(p)) != NUL; )
STRMOVE(p, p + 1);
@@ -11695,7 +11695,7 @@ static void spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res)
// 255, sl_sal the rest.
for (s = inword; *s != NUL; ) {
c = mb_cptr2char_adv(&s);
if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c))
if (enc_utf8 ? utf_class(c) == 0 : ascii_iswhite(c))
c = ' ';
else if (c < 256)
c = slang->sl_sal_first[c];
@@ -11727,7 +11727,7 @@ static void spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res)
} else {
// The sl_sal_first[] table contains the translation.
for (s = inword; (c = *s) != NUL; ++s) {
if (vim_iswhite(c))
if (ascii_iswhite(c))
c = ' ';
else
c = slang->sl_sal_first[c];
@@ -11762,7 +11762,7 @@ static void spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res)
if (slang->sl_rem_accents) {
t = word;
while (*s != NUL) {
if (vim_iswhite(*s)) {
if (ascii_iswhite(*s)) {
*t++ = ' ';
s = skipwhite(s);
} else {
@@ -11955,7 +11955,7 @@ static void spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res)
break;
}
}
} else if (vim_iswhite(c)) {
} else if (ascii_iswhite(c)) {
c = ' ';
k = 1;
}
@@ -12010,7 +12010,7 @@ static void spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res)
t = s;
c = mb_cptr2char_adv(&s);
if (slang->sl_rem_accents) {
if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c)) {
if (enc_utf8 ? utf_class(c) == 0 : ascii_iswhite(c)) {
if (did_white)
continue;
c = ' ';
@@ -12221,7 +12221,7 @@ static void spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res)
break;
}
}
} else if (vim_iswhite(c)) {
} else if (ascii_iswhite(c)) {
c = ' ';
k = 1;
}