Alexandre Julliard : libwine: Move casemap tables to libwine_port.

Alexandre Julliard julliard at winehq.org
Mon Mar 25 16:54:56 CDT 2019


Module: wine
Branch: master
Commit: 9de388258f55ca82e794a234e36550c30b33ed1b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9de388258f55ca82e794a234e36550c30b33ed1b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sun Mar 24 10:21:57 2019 +0100

libwine: Move casemap tables to libwine_port.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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(-)

diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index de3ac56..d0bbdcc 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 45ce182..e2b265d 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 1c975db..d440fce 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 e544d99..b8f26af 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 d674570..a9acc27 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, at 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" );




More information about the wine-cvs mailing list