Commit d0578c08 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Map the new detailed direction information back to the Windows constants.

parent dc0e712d
...@@ -2261,6 +2261,26 @@ DWORD WINAPI VerLanguageNameW( DWORD wLang, LPWSTR szLang, DWORD nSize ) ...@@ -2261,6 +2261,26 @@ DWORD WINAPI VerLanguageNameW( DWORD wLang, LPWSTR szLang, DWORD nSize )
*/ */
BOOL WINAPI GetStringTypeW( DWORD type, LPCWSTR src, INT count, LPWORD chartype ) BOOL WINAPI GetStringTypeW( DWORD type, LPCWSTR src, INT count, LPWORD chartype )
{ {
static const unsigned char type2_map[16] =
{
C2_NOTAPPLICABLE, /* unassigned */
C2_LEFTTORIGHT, /* L */
C2_RIGHTTOLEFT, /* R */
C2_EUROPENUMBER, /* EN */
C2_EUROPESEPARATOR, /* ES */
C2_EUROPETERMINATOR, /* ET */
C2_ARABICNUMBER, /* AN */
C2_COMMONSEPARATOR, /* CS */
C2_BLOCKSEPARATOR, /* B */
C2_SEGMENTSEPARATOR, /* S */
C2_WHITESPACE, /* WS */
C2_OTHERNEUTRAL, /* ON */
C2_RIGHTTOLEFT, /* AL */
C2_NOTAPPLICABLE, /* NSM */
C2_NOTAPPLICABLE, /* BN */
C2_OTHERNEUTRAL /* LRE, LRO, RLE, RLO, PDF */
};
if (count == -1) count = strlenW(src) + 1; if (count == -1) count = strlenW(src) + 1;
switch(type) switch(type)
{ {
...@@ -2268,7 +2288,7 @@ BOOL WINAPI GetStringTypeW( DWORD type, LPCWSTR src, INT count, LPWORD chartype ...@@ -2268,7 +2288,7 @@ BOOL WINAPI GetStringTypeW( DWORD type, LPCWSTR src, INT count, LPWORD chartype
while (count--) *chartype++ = get_char_typeW( *src++ ) & 0xfff; while (count--) *chartype++ = get_char_typeW( *src++ ) & 0xfff;
break; break;
case CT_CTYPE2: case CT_CTYPE2:
while (count--) *chartype++ = get_char_typeW( *src++ ) >> 12; while (count--) *chartype++ = type2_map[get_char_typeW( *src++ ) >> 12];
break; break;
case CT_CTYPE3: case CT_CTYPE3:
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment