0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.1-202

This commit is contained in:
Bram Moolenaar 2008-01-04 16:47:25 +00:00
parent 690ffc0384
commit c048f672ee
2 changed files with 7 additions and 4 deletions

View File

@ -1642,7 +1642,7 @@ utf_byte2len(b)
* Get the length of UTF-8 byte sequence "p[size]". Does not include any * Get the length of UTF-8 byte sequence "p[size]". Does not include any
* following composing characters. * following composing characters.
* Returns 1 for "". * Returns 1 for "".
* Returns 1 for an illegal byte sequence. * Returns 1 for an illegal byte sequence (also in incomplete byte seq.).
* Returns number > "size" for an incomplete byte sequence. * Returns number > "size" for an incomplete byte sequence.
*/ */
int int
@ -1652,13 +1652,14 @@ utf_ptr2len_len(p, size)
{ {
int len; int len;
int i; int i;
int m;
if (*p == NUL) if (*p == NUL)
return 1; return 1;
len = utf8len_tab[*p]; m = len = utf8len_tab[*p];
if (len > size) if (len > size)
return len; /* incomplete byte sequence. */ m = size; /* incomplete byte sequence. */
for (i = 1; i < len; ++i) for (i = 1; i < m; ++i)
if ((p[i] & 0xc0) != 0x80) if ((p[i] & 0xc0) != 0x80)
return 1; return 1;
return len; return len;

View File

@ -666,6 +666,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
202,
/**/ /**/
201, 201,
/**/ /**/