- Implement IS_TEXT_UNICODE_DBCS_LEADBYTE flag

* Fixes 4 new tests in advapi32_apitest

svn path=/trunk/; revision=72488
This commit is contained in:
Dmitry Chapyshev 2016-08-28 16:08:25 +00:00
parent 85d39f7ebe
commit 75ece18c55

View file

@ -1307,11 +1307,6 @@ RtlIsTextUnicode(CONST VOID* buf, INT len, INT* pf)
}
}
if (lo_byte_diff < 127 && !hi_byte_diff)
{
out_flags |= IS_TEXT_UNICODE_ASCII16;
}
if (NlsMbCodePageTag)
{
for (i = 0; i < len; i++)
@ -1333,9 +1328,27 @@ RtlIsTextUnicode(CONST VOID* buf, INT len, INT* pf)
weight = 2;
else
weight = 1;
if (*pf && (*pf & IS_TEXT_UNICODE_DBCS_LEADBYTE))
out_flags |= IS_TEXT_UNICODE_DBCS_LEADBYTE;
}
}
if (lo_byte_diff < 127 && !hi_byte_diff)
{
out_flags |= IS_TEXT_UNICODE_ASCII16;
}
if (hi_byte_diff && !lo_byte_diff)
{
out_flags |= IS_TEXT_UNICODE_REVERSE_ASCII16;
}
if ((weight * lo_byte_diff) < hi_byte_diff)
{
out_flags |= IS_TEXT_UNICODE_REVERSE_STATISTICS;
}
/* apply some statistical analysis */
if ((flags & IS_TEXT_UNICODE_STATISTICS) &&
((weight * hi_byte_diff) < lo_byte_diff))
@ -1378,16 +1391,6 @@ RtlIsTextUnicode(CONST VOID* buf, INT len, INT* pf)
break;
}
}
if (hi_byte_diff && !lo_byte_diff)
{
out_flags |= IS_TEXT_UNICODE_REVERSE_ASCII16;
}
if ((weight * lo_byte_diff) < hi_byte_diff)
{
out_flags |= IS_TEXT_UNICODE_REVERSE_STATISTICS;
}
}
if (pf)