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

@@ -434,7 +434,7 @@ static int cin_is_cpp_namespace(char_u *s)
if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9]))) {
p = cin_skipcomment(skipwhite(s + 9));
while (*p != NUL) {
if (vim_iswhite(*p)) {
if (ascii_iswhite(*p)) {
has_name = TRUE; /* found end of a name */
p = cin_skipcomment(skipwhite(p));
} else if (*p == '{') {
@@ -561,15 +561,15 @@ static int cin_first_id_amount(void)
else if ((len == 8 && STRNCMP(p, "unsigned", 8) == 0)
|| (len == 6 && STRNCMP(p, "signed", 6) == 0)) {
s = skipwhite(p + len);
if ((STRNCMP(s, "int", 3) == 0 && vim_iswhite(s[3]))
|| (STRNCMP(s, "long", 4) == 0 && vim_iswhite(s[4]))
|| (STRNCMP(s, "short", 5) == 0 && vim_iswhite(s[5]))
|| (STRNCMP(s, "char", 4) == 0 && vim_iswhite(s[4])))
if ((STRNCMP(s, "int", 3) == 0 && ascii_iswhite(s[3]))
|| (STRNCMP(s, "long", 4) == 0 && ascii_iswhite(s[4]))
|| (STRNCMP(s, "short", 5) == 0 && ascii_iswhite(s[5]))
|| (STRNCMP(s, "char", 4) == 0 && ascii_iswhite(s[4])))
p = s;
}
for (len = 0; vim_isIDc(p[len]); ++len)
;
if (len == 0 || !vim_iswhite(p[len]) || cin_nocode(p))
if (len == 0 || !ascii_iswhite(p[len]) || cin_nocode(p))
return 0;
p = skipwhite(p + len);
@@ -889,7 +889,7 @@ static int cin_is_if_for_while_before_offset(char_u *line, int *poffset)
if (offset-- < 2)
return 0;
while (offset > 2 && vim_iswhite(line[offset]))
while (offset > 2 && ascii_iswhite(line[offset]))
--offset;
offset -= 1;
@@ -1942,7 +1942,7 @@ int get_c_indent(void)
our_paren_pos.col++;
else {
col = our_paren_pos.col + 1;
while (vim_iswhite(l[col]))
while (ascii_iswhite(l[col]))
col++;
if (l[col] != NUL) /* In case of trailing space */
our_paren_pos.col = col;