libwine: Move casemap tables to libwine_port.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-03-24 10:21:57 +01:00
parent a67dca1bc8
commit 9de388258f
5 changed files with 14 additions and 14 deletions

View File

@ -124,13 +124,13 @@ WINE_UNICODE_INLINE int wine_is_dbcs_leadbyte( const union cptable *table, unsig
WINE_UNICODE_INLINE WCHAR tolowerW( WCHAR ch )
{
extern WINE_UNICODE_API const WCHAR wine_casemap_lower[];
extern const WCHAR wine_casemap_lower[];
return ch + wine_casemap_lower[wine_casemap_lower[ch >> 8] + (ch & 0xff)];
}
WINE_UNICODE_INLINE WCHAR toupperW( WCHAR ch )
{
extern WINE_UNICODE_API const WCHAR wine_casemap_upper[];
extern const WCHAR wine_casemap_upper[];
return ch + wine_casemap_upper[wine_casemap_upper[ch >> 8] + (ch & 0xff)];
}

View File

@ -73,6 +73,7 @@ C_SRCS = \
c_936.c \
c_949.c \
c_950.c \
casemap.c \
combclass.c \
compose.c \
cpsymbol.c \

View File

@ -4,7 +4,7 @@
#include "wine/unicode.h"
const WCHAR wine_casemap_lower[4259] =
const WCHAR DECLSPEC_HIDDEN wine_casemap_lower[4259] =
{
/* index */
0x01bf, 0x02bf, 0x03bf, 0x044f, 0x054f, 0x064f, 0x0100, 0x0100,
@ -562,7 +562,7 @@ const WCHAR wine_casemap_lower[4259] =
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
const WCHAR wine_casemap_upper[4828] =
const WCHAR DECLSPEC_HIDDEN wine_casemap_upper[4828] =
{
/* index */
0x019f, 0x029f, 0x039f, 0x045a, 0x0556, 0x0656, 0x0100, 0x0100,

View File

@ -2,7 +2,6 @@ EXTRALIBS = $(DL_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS)
EXTRADEFS = -DWINE_UNICODE_API=""
C_SRCS = \
casemap.c \
collation.c \
config.c \
debug.c \

View File

@ -1598,7 +1598,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( "DECLSPEC_HIDDEN wine_mirror_map", @mirror_table );
dump_case_table( "wine_mirror_map", @mirror_table );
close OUTPUT;
save_file($filename);
}
@ -1756,9 +1756,9 @@ sub dump_digit_folding($)
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
DUMP_CASE_TABLE( "DECLSPEC_HIDDEN wine_digitmap", @digitmap_table );
dump_case_table( "wine_digitmap", @digitmap_table );
print OUTPUT "\n";
DUMP_CASE_TABLE( "DECLSPEC_HIDDEN wine_compatmap", @compatmap_table );
dump_case_table( "wine_compatmap", @compatmap_table );
close OUTPUT;
save_file($filename);
}
@ -1766,7 +1766,7 @@ sub dump_digit_folding($)
################################################################
# dump the case mapping tables
sub DUMP_CASE_MAPPINGS($)
sub dump_case_mappings($)
{
my $filename = shift;
open OUTPUT,">$filename.new" or die "Cannot create $filename";
@ -1776,9 +1776,9 @@ sub DUMP_CASE_MAPPINGS($)
print OUTPUT "/* DO NOT EDIT!! */\n\n";
print OUTPUT "#include \"wine/unicode.h\"\n\n";
DUMP_CASE_TABLE( "wine_casemap_lower", @tolower_table );
dump_case_table( "wine_casemap_lower", @tolower_table );
print OUTPUT "\n";
DUMP_CASE_TABLE( "wine_casemap_upper", @toupper_table );
dump_case_table( "wine_casemap_upper", @toupper_table );
close OUTPUT;
save_file($filename);
}
@ -1786,7 +1786,7 @@ sub DUMP_CASE_MAPPINGS($)
################################################################
# dump a case mapping table
sub DUMP_CASE_TABLE($@)
sub dump_case_table($@)
{
my ($name,@table) = @_;
@ -1835,7 +1835,7 @@ sub DUMP_CASE_TABLE($@)
# dump the table
printf OUTPUT "const WCHAR %s[%d] =\n", $name, $index * 256 + 512 - $removed;
printf OUTPUT "const WCHAR DECLSPEC_HIDDEN %s[%d] =\n", $name, $index * 256 + 512 - $removed;
printf OUTPUT "{\n /* index */\n";
printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", 256, @filled );
printf OUTPUT " /* defaults */\n";
@ -2766,7 +2766,7 @@ sub REPLACE_IN_FILE($@)
chdir ".." if -f "./make_unicode";
READ_DEFAULTS( $DEFAULTS );
DUMP_CASE_MAPPINGS( "libs/wine/casemap.c" );
dump_case_mappings( "libs/port/casemap.c" );
DUMP_SORTKEYS( "libs/wine/collation.c", READ_SORTKEYS_FILE() );
dump_compose_table( "libs/port/compose.c" );
dump_decompose_table( "libs/port/decompose.c" );