make_unicode: Mark most data tables as hidden.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-02-24 13:39:01 +09:00
parent 34174e2ca8
commit 0bbeaae678
22 changed files with 59 additions and 32 deletions

View File

@ -28,8 +28,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
extern const unsigned short wine_linebreak_table[];
extern const unsigned short wine_scripts_table[];
extern const unsigned short wine_linebreak_table[] DECLSPEC_HIDDEN;
extern const unsigned short wine_scripts_table[] DECLSPEC_HIDDEN;
struct dwritescript_properties {
DWRITE_SCRIPT_PROPERTIES props;

View File

@ -52,7 +52,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(bidi);
extern const unsigned short bidi_bracket_table[];
extern const unsigned short bidi_bracket_table[] DECLSPEC_HIDDEN;
#define ASSERT(x) do { if (!(x)) FIXME("assert failed: %s\n", #x); } while(0)
#define MAX_DEPTH 125
@ -199,7 +199,7 @@ static void bidi_classify(const WCHAR *string, UINT8 *chartype, UINT32 count)
WCHAR bidi_get_mirrored_char(WCHAR ch)
{
extern const WCHAR wine_mirror_map[];
extern const WCHAR wine_mirror_map[] DECLSPEC_HIDDEN;
return ch + wine_mirror_map[wine_mirror_map[ch >> 8] + (ch & 0xff)];
}

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/8.0.0/ucd/BidiBrackets.txt */
/* DO NOT EDIT!! */
const unsigned short bidi_bracket_table[768] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN bidi_bracket_table[768] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110,

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/8.0.0/ucd/LineBreak.txt */
/* DO NOT EDIT!! */
const unsigned short wine_linebreak_table[7216] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN wine_linebreak_table[7216] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, 0x0170,

View File

@ -4,7 +4,7 @@
#include "wine/unicode.h"
const WCHAR wine_mirror_map[3292] =
const WCHAR DECLSPEC_HIDDEN wine_mirror_map[3292] =
{
/* index */
0x01d8, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/8.0.0/ucd/Scripts.txt */
/* DO NOT EDIT!! */
const unsigned short wine_scripts_table[6336] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN wine_scripts_table[6336] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, 0x0170,

View File

@ -6439,7 +6439,7 @@ static inline BYTE get_max_level( UINT format )
return 255;
}
extern const unsigned short vertical_orientation_table[];
extern const unsigned short vertical_orientation_table[] DECLSPEC_HIDDEN;
static BOOL check_unicode_tategaki(WCHAR uchar)
{

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/vertical/revision-15/VerticalOrientation-15.txt */
/* DO NOT EDIT!! */
const unsigned short vertical_orientation_table[1600] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN vertical_orientation_table[1600] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0120, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110,

View File

@ -5018,8 +5018,8 @@ INT WINAPI IdnToNameprepUnicode(DWORD dwFlags, LPCWSTR lpUnicodeCharStr, INT cch
BIDI_L = 0x8
};
extern const unsigned short nameprep_char_type[];
extern const WCHAR nameprep_mapping[];
extern const unsigned short nameprep_char_type[] DECLSPEC_HIDDEN;
extern const WCHAR nameprep_mapping[] DECLSPEC_HIDDEN;
const WCHAR *ptr;
WORD flags;
WCHAR buf[64], *map_str, norm_str[64], ch;

View File

@ -2,7 +2,9 @@
/* generated from http://www.rfc-editor.org/rfc/rfc3454.txt */
/* DO NOT EDIT!! */
const unsigned short nameprep_char_type[4432] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN nameprep_char_type[4432] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, 0x0170,
@ -562,7 +564,7 @@ const unsigned short nameprep_char_type[4432] =
0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,
0x0001, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002
};
const unsigned short nameprep_mapping[5856] =
const unsigned short DECLSPEC_HIDDEN nameprep_mapping[5856] =
{
/* index */
0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, 0x0100, 0x0100,

View File

@ -56,7 +56,7 @@
#include "usp10_internal.h"
extern const unsigned short bidi_bracket_table[];
extern const unsigned short bidi_bracket_table[] DECLSPEC_HIDDEN;
WINE_DEFAULT_DEBUG_CHANNEL(bidi);

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/8.0.0/ucd/BidiBrackets.txt */
/* DO NOT EDIT!! */
const unsigned short bidi_bracket_table[768] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN bidi_bracket_table[768] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110,

View File

@ -36,7 +36,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
extern const unsigned short wine_linebreak_table[];
extern const unsigned short wine_linebreak_table[] DECLSPEC_HIDDEN;
enum breaking_types { b_BK=1, b_CR, b_LF, b_CM, b_SG, b_GL, b_CB, b_SP, b_ZW, b_NL, b_WJ, b_JL, b_JV, b_JT, b_H2, b_H3, b_XX, b_OP, b_CL, b_CP, b_QU, b_NS, b_EX, b_SY, b_IS, b_PR, b_PO, b_NU, b_AL, b_ID, b_IN, b_HY, b_BB, b_BA, b_SA, b_AI, b_B2, b_HL, b_CJ, b_RI};

View File

@ -3,7 +3,9 @@
/* and from http://www.unicode.org/Public/8.0.0/ucd/IndicPositionalCategory.txt */
/* DO NOT EDIT!! */
const unsigned short indic_syllabic_table[3264] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN indic_syllabic_table[3264] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110,

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/8.0.0/ucd/LineBreak.txt */
/* DO NOT EDIT!! */
const unsigned short wine_linebreak_table[7216] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN wine_linebreak_table[7216] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, 0x0170,

View File

@ -4,7 +4,7 @@
#include "wine/unicode.h"
const WCHAR wine_mirror_map[3292] =
const WCHAR DECLSPEC_HIDDEN wine_mirror_map[3292] =
{
/* index */
0x01d8, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,

View File

@ -84,9 +84,9 @@ static void ShapeCharGlyphProp_Kannada( HDC hdc, ScriptCache *psc, SCRIPT_ANALYS
static void ShapeCharGlyphProp_Malayalam( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp );
static void ShapeCharGlyphProp_Khmer( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp );
extern const unsigned short indic_syllabic_table[];
extern const unsigned short wine_shaping_table[];
extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4];
extern const unsigned short indic_syllabic_table[] DECLSPEC_HIDDEN;
extern const unsigned short wine_shaping_table[] DECLSPEC_HIDDEN;
extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4] DECLSPEC_HIDDEN;
enum joining_types {
jtU,

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/8.0.0/ucd/ArabicShaping.txt */
/* DO NOT EDIT!! */
const unsigned short wine_shaping_table[2848] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN wine_shaping_table[2848] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160,
@ -365,7 +367,7 @@ const unsigned short wine_shaping_table[2848] =
0x0000, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000
};
const unsigned short wine_shaping_forms[256][4] =
const unsigned short DECLSPEC_HIDDEN wine_shaping_forms[256][4] =
{
{ 0x0600, 0x0600, 0x0600, 0x0600 },
{ 0x0601, 0x0601, 0x0601, 0x0601 },

View File

@ -873,7 +873,7 @@ static HRESULT init_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
static WCHAR mirror_char( WCHAR ch )
{
extern const WCHAR wine_mirror_map[];
extern const WCHAR wine_mirror_map[] DECLSPEC_HIDDEN;
return ch + wine_mirror_map[wine_mirror_map[ch >> 8] + (ch & 0xff)];
}

View File

@ -40,7 +40,7 @@ static BOOL PSDRV_Text(PHYSDEV dev, INT x, INT y, UINT flags,
LPCWSTR str, UINT count,
BOOL bDrawBackground, const INT *lpDx);
extern const unsigned short vertical_orientation_table[];
extern const unsigned short vertical_orientation_table[] DECLSPEC_HIDDEN;
static BOOL check_unicode_tategaki(WCHAR uchar)
{

View File

@ -2,7 +2,9 @@
/* generated from http://www.unicode.org/Public/vertical/revision-15/VerticalOrientation-15.txt */
/* DO NOT EDIT!! */
const unsigned short vertical_orientation_table[1600] =
#include "wine/unicode.h"
const unsigned short DECLSPEC_HIDDEN vertical_orientation_table[1600] =
{
/* level 1 offsets */
0x0100, 0x0110, 0x0120, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110,

View File

@ -1244,6 +1244,7 @@ sub dump_indic($)
print OUTPUT "/* generated from $UNIDATA/IndicSyllabicCategory.txt */\n";
print OUTPUT "/* and from $UNIDATA/IndicPositionalCategory.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
dump_two_level_mapping( "indic_syllabic_table", $indic_types{'Other'}, @indic_table );
@ -1291,6 +1292,7 @@ sub dump_linebreak($)
print OUTPUT "/* Unicode Line Break Properties */\n";
print OUTPUT "/* generated from $UNIDATA/LineBreak.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
dump_two_level_mapping( "wine_linebreak_table", $break_types{'XX'}, @break_table );
@ -1410,6 +1412,7 @@ sub dump_scripts($)
print OUTPUT "/* Unicode Script IDs */\n";
print OUTPUT "/* generated from $UNIDATA/Scripts.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
dump_two_level_mapping( "wine_scripts_table", 0, @scripts_table );
close OUTPUT;
@ -1444,7 +1447,7 @@ sub dump_mirroring($)
print OUTPUT "/* generated from $UNIDATA/BidiMirroring.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
DUMP_CASE_TABLE( "wine_mirror_map", @mirror_table );
DUMP_CASE_TABLE( "DECLSPEC_HIDDEN wine_mirror_map", @mirror_table );
close OUTPUT;
save_file($filename);
}
@ -1480,6 +1483,7 @@ sub dump_bracket($)
print OUTPUT "/* Unicode Bidirectional Bracket table */\n";
print OUTPUT "/* generated from $UNIDATA/BidiBrackets.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
dump_two_level_mapping( "bidi_bracket_table", 0, @bracket_table );
@ -1520,10 +1524,11 @@ sub dump_shaping($)
print OUTPUT "/* Unicode Arabic shaping */\n";
print OUTPUT "/* generated from $UNIDATA/ArabicShaping.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
dump_two_level_mapping( "wine_shaping_table", 0, @joining_table );
print OUTPUT "\nconst unsigned short wine_shaping_forms[256][4] =\n{\n";
print OUTPUT "\nconst unsigned short DECLSPEC_HIDDEN wine_shaping_forms[256][4] =\n{\n";
for (my $i = 0x600; $i <= 0x6ff; $i++)
{
printf OUTPUT " { 0x%04x, 0x%04x, 0x%04x, 0x%04x },\n",
@ -1580,6 +1585,7 @@ sub dump_vertical($)
print OUTPUT "/* Unicode Vertical Orientation */\n";
print OUTPUT "/* generated from $VERTICALDATA/VerticalOrientation-15.txt */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
dump_two_level_mapping( "vertical_orientation_table", $vertical_types{'R'}, @vertical_table );
@ -1750,7 +1756,7 @@ sub dump_two_level_mapping($$@)
for (my $i = 256; $i < @array; $i++) { $array[$i] += @array - 4096; }
printf OUTPUT "const unsigned short %s[%d] =\n{\n", $name, @array + @row_array - 4096;
printf OUTPUT "const unsigned short DECLSPEC_HIDDEN %s[%d] =\n{\n", $name, @array + @row_array - 4096;
printf OUTPUT " /* level 1 offsets */\n%s,\n", DUMP_ARRAY( "0x%04x", 0, @array[0..255] );
printf OUTPUT " /* level 2 offsets */\n%s,\n", DUMP_ARRAY( "0x%04x", 0, @array[256..$#array] );
printf OUTPUT " /* values */\n%s\n};\n", DUMP_ARRAY( "0x%04x", 0, @row_array[4096..$#row_array] );
@ -1939,6 +1945,7 @@ sub dump_nameprep($)
print OUTPUT "/* Nameprep algorithm related data */\n";
print OUTPUT "/* generated from $RFCS/$STRINGPREP */\n";
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
dump_two_level_mapping( "nameprep_char_type", 0, @flags_table );
@ -1976,7 +1983,7 @@ sub dump_nameprep($)
}
# dump the main index
printf OUTPUT "const unsigned short nameprep_mapping[%d] =\n", $total;
printf OUTPUT "const unsigned short DECLSPEC_HIDDEN nameprep_mapping[%d] =\n", $total;
printf OUTPUT "{\n /* index */\n";
printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, @filled_idx );
printf OUTPUT ",\n /* null sub-index */\n%s", DUMP_ARRAY( "0x%04x", 0, ($null_offset) x 16 );