From 9de388258f55ca82e794a234e36550c30b33ed1b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 24 Mar 2019 10:21:57 +0100 Subject: [PATCH] libwine: Move casemap tables to libwine_port. Signed-off-by: Alexandre Julliard --- include/wine/unicode.h | 4 ++-- libs/port/Makefile.in | 1 + libs/{wine => port}/casemap.c | 4 ++-- libs/wine/Makefile.in | 1 - tools/make_unicode | 18 +++++++++--------- 5 files changed, 14 insertions(+), 14 deletions(-) rename libs/{wine => port}/casemap.c (99%) diff --git a/include/wine/unicode.h b/include/wine/unicode.h index de3ac56973a..d0bbdccb98f 100644 --- a/include/wine/unicode.h +++ b/include/wine/unicode.h @@ -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)]; } diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 45ce1827f02..e2b265df5eb 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -73,6 +73,7 @@ C_SRCS = \ c_936.c \ c_949.c \ c_950.c \ + casemap.c \ combclass.c \ compose.c \ cpsymbol.c \ diff --git a/libs/wine/casemap.c b/libs/port/casemap.c similarity index 99% rename from libs/wine/casemap.c rename to libs/port/casemap.c index 1c975dbfd25..d440fce2cb4 100644 --- a/libs/wine/casemap.c +++ b/libs/port/casemap.c @@ -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, diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index e544d998e22..b8f26af1176 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -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 \ diff --git a/tools/make_unicode b/tools/make_unicode index d6745709203..a9acc27c55a 100755 --- a/tools/make_unicode +++ b/tools/make_unicode @@ -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" );