Commit fb87398b authored by Alexandre Julliard's avatar Alexandre Julliard

unicode: Use a standard two-level mapping table for the mirror map.

parent 31360d47
......@@ -161,7 +161,8 @@ static void bidi_classify(const WCHAR *string, UINT8 *chartype, UINT32 count)
WCHAR bidi_get_mirrored_char(WCHAR ch)
{
extern const WCHAR wine_mirror_map[] DECLSPEC_HIDDEN;
return ch + wine_mirror_map[wine_mirror_map[ch >> 8] + (ch & 0xff)];
WCHAR mirror = get_table_entry( wine_mirror_map, ch );
return mirror ? mirror : ch;
}
/* RESOLVE EXPLICIT */
......
......@@ -937,7 +937,8 @@ static HRESULT init_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
static WCHAR mirror_char( WCHAR ch )
{
extern const WCHAR wine_mirror_map[] DECLSPEC_HIDDEN;
return ch + wine_mirror_map[wine_mirror_map[ch >> 8] + (ch & 0xff)];
WCHAR mirror = get_table_entry( wine_mirror_map, ch );
return mirror ? mirror : ch;
}
static DWORD decode_surrogate_pair(const WCHAR *str, unsigned int index, unsigned int end)
......
......@@ -1638,7 +1638,7 @@ sub dump_mirroring($)
print OUTPUT "/* generated from $UNIDATA/BidiMirroring.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"windef.h\"\n\n";
dump_case_table( "DECLSPEC_HIDDEN wine_mirror_map", @mirror_table );
dump_two_level_mapping( "wine_mirror_map", 0, @mirror_table );
close OUTPUT;
save_file($filename);
}
......
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