strings: Remove vim_strbyte

Ref #1476
This commit is contained in:
ZyX
2017-04-06 21:31:37 +03:00
parent 19044a15f9
commit 171baaee93
6 changed files with 29 additions and 67 deletions

View File

@@ -5087,14 +5087,13 @@ static void helptags_one(char_u *dir, char_u *ext, char_u *tagfname,
}
p1 = vim_strchr(IObuff, '*'); /* find first '*' */
while (p1 != NULL) {
/* Use vim_strbyte() instead of vim_strchr() so that when
* 'encoding' is dbcs it still works, don't find '*' in the
* second byte. */
p2 = vim_strbyte(p1 + 1, '*'); /* find second '*' */
if (p2 != NULL && p2 > p1 + 1) { /* skip "*" and "**" */
for (s = p1 + 1; s < p2; ++s)
if (*s == ' ' || *s == '\t' || *s == '|')
p2 = (char_u *)strchr((const char *)p1 + 1, '*'); // Find second '*'.
if (p2 != NULL && p2 > p1 + 1) { // Skip "*" and "**".
for (s = p1 + 1; s < p2; s++) {
if (*s == ' ' || *s == '\t' || *s == '|') {
break;
}
}
/*
* Only accept a *tag* when it consists of valid