mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
Update RtlIsTextUnicode, ntdll rtlstr winetest failure down by 10, one remaining
svn path=/trunk/; revision=38051
This commit is contained in:
parent
681e0e0b24
commit
d7b72f79a2
1 changed files with 36 additions and 8 deletions
|
@ -15,6 +15,8 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#include <wine/unicode.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
extern BOOLEAN NlsMbCodePageTag;
|
||||
|
@ -1059,6 +1061,8 @@ BOOLEAN
|
|||
NTAPI
|
||||
RtlIsTextUnicode( PVOID buf, INT len, INT *pf )
|
||||
{
|
||||
static const WCHAR std_control_chars[] = {'\r','\n','\t',' ',0x3000,0};
|
||||
static const WCHAR byterev_control_chars[] = {0x0d00,0x0a00,0x0900,0x2000,0};
|
||||
const WCHAR *s = buf;
|
||||
int i;
|
||||
unsigned int flags = ~0U, out_flags = 0;
|
||||
|
@ -1118,6 +1122,30 @@ RtlIsTextUnicode( PVOID buf, INT len, INT *pf )
|
|||
}
|
||||
}
|
||||
|
||||
if (flags & IS_TEXT_UNICODE_CONTROLS)
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
if (strchrW(std_control_chars, s[i]))
|
||||
{
|
||||
out_flags |= IS_TEXT_UNICODE_CONTROLS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & IS_TEXT_UNICODE_REVERSE_CONTROLS)
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
if (strchrW(byterev_control_chars, s[i]))
|
||||
{
|
||||
out_flags |= IS_TEXT_UNICODE_REVERSE_CONTROLS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pf)
|
||||
{
|
||||
out_flags &= *pf;
|
||||
|
|
Loading…
Reference in a new issue