mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.1-061
This commit is contained in:
parent
48cc5fe8b6
commit
a245a5bb06
@ -2320,7 +2320,7 @@ mb_strnicmp(s1, s2, nn)
|
|||||||
/* Single byte: first check normally, then with ignore case. */
|
/* Single byte: first check normally, then with ignore case. */
|
||||||
if (s1[i] != s2[i])
|
if (s1[i] != s2[i])
|
||||||
{
|
{
|
||||||
cdiff = TOLOWER_LOC(s1[i]) - TOLOWER_LOC(s2[i]);
|
cdiff = MB_TOLOWER(s1[i]) - MB_TOLOWER(s2[i]);
|
||||||
if (cdiff != 0)
|
if (cdiff != 0)
|
||||||
return cdiff;
|
return cdiff;
|
||||||
}
|
}
|
||||||
|
29
src/regexp.c
29
src/regexp.c
@ -2220,7 +2220,7 @@ collection:
|
|||||||
break;
|
break;
|
||||||
case CLASS_LOWER:
|
case CLASS_LOWER:
|
||||||
for (cu = 1; cu <= 255; cu++)
|
for (cu = 1; cu <= 255; cu++)
|
||||||
if (islower(cu))
|
if (MB_ISLOWER(cu))
|
||||||
regc(cu);
|
regc(cu);
|
||||||
break;
|
break;
|
||||||
case CLASS_PRINT:
|
case CLASS_PRINT:
|
||||||
@ -2240,7 +2240,7 @@ collection:
|
|||||||
break;
|
break;
|
||||||
case CLASS_UPPER:
|
case CLASS_UPPER:
|
||||||
for (cu = 1; cu <= 255; cu++)
|
for (cu = 1; cu <= 255; cu++)
|
||||||
if (isupper(cu))
|
if (MB_ISUPPER(cu))
|
||||||
regc(cu);
|
regc(cu);
|
||||||
break;
|
break;
|
||||||
case CLASS_XDIGIT:
|
case CLASS_XDIGIT:
|
||||||
@ -3465,7 +3465,7 @@ vim_regexec_both(line, col)
|
|||||||
(enc_utf8 && utf_fold(prog->regstart) == utf_fold(c)))
|
(enc_utf8 && utf_fold(prog->regstart) == utf_fold(c)))
|
||||||
|| (c < 255 && prog->regstart < 255 &&
|
|| (c < 255 && prog->regstart < 255 &&
|
||||||
#endif
|
#endif
|
||||||
TOLOWER_LOC(prog->regstart) == TOLOWER_LOC(c)))))
|
MB_TOLOWER(prog->regstart) == MB_TOLOWER(c)))))
|
||||||
retval = regtry(prog, col);
|
retval = regtry(prog, col);
|
||||||
else
|
else
|
||||||
retval = 0;
|
retval = 0;
|
||||||
@ -4200,7 +4200,7 @@ regmatch(scan)
|
|||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
!enc_utf8 &&
|
!enc_utf8 &&
|
||||||
#endif
|
#endif
|
||||||
TOLOWER_LOC(*opnd) != TOLOWER_LOC(*reginput))))
|
MB_TOLOWER(*opnd) != MB_TOLOWER(*reginput))))
|
||||||
status = RA_NOMATCH;
|
status = RA_NOMATCH;
|
||||||
else if (*opnd == NUL)
|
else if (*opnd == NUL)
|
||||||
{
|
{
|
||||||
@ -4733,10 +4733,10 @@ regmatch(scan)
|
|||||||
rst.nextb = *OPERAND(next);
|
rst.nextb = *OPERAND(next);
|
||||||
if (ireg_ic)
|
if (ireg_ic)
|
||||||
{
|
{
|
||||||
if (isupper(rst.nextb))
|
if (MB_ISUPPER(rst.nextb))
|
||||||
rst.nextb_ic = TOLOWER_LOC(rst.nextb);
|
rst.nextb_ic = MB_TOLOWER(rst.nextb);
|
||||||
else
|
else
|
||||||
rst.nextb_ic = TOUPPER_LOC(rst.nextb);
|
rst.nextb_ic = MB_TOUPPER(rst.nextb);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rst.nextb_ic = rst.nextb;
|
rst.nextb_ic = rst.nextb;
|
||||||
@ -5558,11 +5558,12 @@ do_class:
|
|||||||
int cu, cl;
|
int cu, cl;
|
||||||
|
|
||||||
/* This doesn't do a multi-byte character, because a MULTIBYTECODE
|
/* This doesn't do a multi-byte character, because a MULTIBYTECODE
|
||||||
* would have been used for it. */
|
* would have been used for it. It does handle single-byte
|
||||||
|
* characters, such as latin1. */
|
||||||
if (ireg_ic)
|
if (ireg_ic)
|
||||||
{
|
{
|
||||||
cu = TOUPPER_LOC(*opnd);
|
cu = MB_TOUPPER(*opnd);
|
||||||
cl = TOLOWER_LOC(*opnd);
|
cl = MB_TOLOWER(*opnd);
|
||||||
while (count < maxcount && (*scan == cu || *scan == cl))
|
while (count < maxcount && (*scan == cu || *scan == cl))
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
@ -6490,10 +6491,10 @@ cstrchr(s, c)
|
|||||||
cc = utf_fold(c);
|
cc = utf_fold(c);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (isupper(c))
|
if (MB_ISUPPER(c))
|
||||||
cc = TOLOWER_LOC(c);
|
cc = MB_TOLOWER(c);
|
||||||
else if (islower(c))
|
else if (MB_ISLOWER(c))
|
||||||
cc = TOUPPER_LOC(c);
|
cc = MB_TOUPPER(c);
|
||||||
else
|
else
|
||||||
return vim_strchr(s, c);
|
return vim_strchr(s, c);
|
||||||
|
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
61,
|
||||||
/**/
|
/**/
|
||||||
60,
|
60,
|
||||||
/**/
|
/**/
|
||||||
|
10
src/vim.h
10
src/vim.h
@ -1380,8 +1380,14 @@ typedef enum
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
# define MB_STRICMP(d, s) (has_mbyte ? mb_strnicmp((char_u *)(d), (char_u *)(s), (int)MAXCOL) : STRICMP((d), (s)))
|
/* We need to call mb_stricmp() even when we aren't dealing with a multi-byte
|
||||||
# define MB_STRNICMP(d, s, n) (has_mbyte ? mb_strnicmp((char_u *)(d), (char_u *)(s), (int)(n)) : STRNICMP((d), (s), (n)))
|
* encoding because mb_stricmp() takes care of all ascii and non-ascii
|
||||||
|
* encodings, including characters with umluats in latin1, etc., while
|
||||||
|
* STRICMP() only handles the system locale version, which often does not
|
||||||
|
* handle non-ascii properly. */
|
||||||
|
|
||||||
|
# define MB_STRICMP(d, s) mb_strnicmp((char_u *)(d), (char_u *)(s), (int)MAXCOL)
|
||||||
|
# define MB_STRNICMP(d, s, n) mb_strnicmp((char_u *)(d), (char_u *)(s), (int)(n))
|
||||||
#else
|
#else
|
||||||
# define MB_STRICMP(d, s) STRICMP((d), (s))
|
# define MB_STRICMP(d, s) STRICMP((d), (s))
|
||||||
# define MB_STRNICMP(d, s, n) STRNICMP((d), (s), (n))
|
# define MB_STRNICMP(d, s, n) STRNICMP((d), (s), (n))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user