lint: fix clint errors around mb_tolower calls

This commit is contained in:
Björn Linse
2017-04-09 10:08:26 +02:00
parent acc06b0b7b
commit c1cf033981
10 changed files with 67 additions and 75 deletions

View File

@@ -335,23 +335,26 @@ int pat_has_uppercase(char_u *pat)
while (*p != NUL) {
int l;
if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1) {
if (enc_utf8 && mb_isupper(utf_ptr2char(p)))
return TRUE;
if ((l = mb_ptr2len(p)) > 1) {
if (mb_isupper(utf_ptr2char(p))) {
return true;
}
p += l;
} else if (*p == '\\') {
if (p[1] == '_' && p[2] != NUL) /* skip "\_X" */
if (p[1] == '_' && p[2] != NUL) { // skip "\_X"
p += 3;
else if (p[1] == '%' && p[2] != NUL) /* skip "\%X" */
} else if (p[1] == '%' && p[2] != NUL) { // skip "\%X"
p += 3;
else if (p[1] != NUL) /* skip "\X" */
} else if (p[1] != NUL) { // skip "\X"
p += 2;
else
} else {
p += 1;
} else if (mb_isupper(*p))
return TRUE;
else
++p;
}
} else if (mb_isupper(*p)) {
return true;
} else {
p++;
}
}
return FALSE;
}