Alexandre Julliard : libport: Move the char type table back to libwine and stop updating it.
Alexandre Julliard
julliard at winehq.org
Mon Nov 30 16:13:44 CST 2020
Module: wine
Branch: master
Commit: 875f506b33ad11f563de4ed710b7a174b0e9fcfc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=875f506b33ad11f563de4ed710b7a174b0e9fcfc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sun Nov 29 21:38:12 2020 +0100
libport: Move the char type table back to libwine and stop updating it.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wine/unicode.h | 5 +++--
libs/port/Makefile.in | 3 +--
libs/wine/Makefile.in | 3 ++-
libs/{port => wine}/wctype.c | 6 ++++++
libs/wine/wine.map | 2 +-
tools/make_unicode | 40 ----------------------------------------
6 files changed, 13 insertions(+), 46 deletions(-)
diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index 011aacf7386..7a9e07fa1bc 100644
--- a/include/wine/unicode.h
+++ b/include/wine/unicode.h
@@ -58,8 +58,9 @@ WINE_UNICODE_INLINE WCHAR toupperW( WCHAR ch )
/* and the C2_* type in the high 4 bits */
WINE_UNICODE_INLINE unsigned short get_char_typeW( WCHAR ch )
{
- extern const unsigned short wine_wctype_table[];
- return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)];
+ unsigned short type;
+ GetStringTypeW( CT_CTYPE1, &ch, 1, &type );
+ return type;
}
WINE_UNICODE_INLINE int iscntrlW( WCHAR wc )
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 5d1019aa801..51cfdb4df54 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -18,5 +18,4 @@ C_SRCS = \
statvfs.c \
strnlen.c \
symlink.c \
- usleep.c \
- wctype.c
+ usleep.c
diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
index f4086b1a763..885a7326568 100644
--- a/libs/wine/Makefile.in
+++ b/libs/wine/Makefile.in
@@ -84,7 +84,8 @@ C_SRCS = \
sortkey.c \
string.c \
utf8.c \
- wctomb.c
+ wctomb.c \
+ wctype.c
config_EXTRADEFS = \
-DBINDIR='"${bindir}"' \
diff --git a/libs/port/wctype.c b/libs/wine/wctype.c
similarity index 99%
rename from libs/port/wctype.c
rename to libs/wine/wctype.c
index 9b38bd0a0e2..e384e573f64 100644
--- a/libs/port/wctype.c
+++ b/libs/wine/wctype.c
@@ -1,6 +1,10 @@
/* Unicode ctype tables */
/* Automatically generated; DO NOT EDIT!! */
+#include "wine/asm.h"
+
+#ifdef __ASM_OBSOLETE
+
#include "windef.h"
const unsigned short wine_wctype_table[16242] =
@@ -2039,3 +2043,5 @@ const unsigned short wine_wctype_table[16242] =
0x0000, 0x0000, 0x0000, 0xb220, 0xb220, 0xb220, 0xb200, 0xb200,
0x0000, 0x0000
};
+
+#endif /* __ASM_OBSOLETE */
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 6147dccc77e..1b0df15eef5 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -14,7 +14,6 @@ WINE_1.0
wine_mmap_enum_reserved_areas;
wine_mmap_is_in_reserved_area;
wine_mmap_remove_reserved_area;
- wine_wctype_table;
/* the following functions are obsolete and only exported for backwards compatibility */
@@ -120,6 +119,7 @@ WINE_1.0
wine_switch_to_stack;
wine_utf8_mbstowcs;
wine_utf8_wcstombs;
+ wine_wctype_table;
local: *;
};
diff --git a/tools/make_unicode b/tools/make_unicode
index c454c74440f..02bb0afdb66 100755
--- a/tools/make_unicode
+++ b/tools/make_unicode
@@ -1753,19 +1753,6 @@ sub compress_array($$@)
return @array, unpack "U*", $data;
}
-################################################################
-# dump a simple char -> 16-bit value mapping table
-sub dump_simple_mapping($$@)
-{
- my $name = shift;
- my $def = shift;
- my @array = compress_array( 256, $def, @_[0..65535] );
-
- printf OUTPUT "const unsigned short %s[%d] =\n{\n", $name, $#array+1;
- printf OUTPUT " /* offsets */\n%s,\n", dump_array( 16, 0, @array[0..255] );
- printf OUTPUT " /* values */\n%s\n};\n", dump_array( 16, 0, @array[256..$#array] );
-}
-
################################################################
# dump a char -> 16-bit value mapping table using two-level tables
sub dump_two_level_mapping($$@)
@@ -1882,32 +1869,6 @@ sub dump_bidi_dir_table($)
}
-################################################################
-# dump the ctype tables
-sub dump_ctype_tables($)
-{
- my $filename = shift;
- open OUTPUT,">$filename.new" or die "Cannot create $filename";
- printf "Building $filename\n";
- printf OUTPUT "/* Unicode ctype tables */\n";
- printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n";
- printf OUTPUT "#include \"windef.h\"\n\n";
-
- my @table = map { ($_ || 0) & 0xffff; } @category_table;
-
- # add the direction in the high 4 bits of the category
- for (my $i = 0; $i < 65536; $i++)
- {
- $table[$i] |= $directions{$direction_table[$i]} << 12 if defined $direction_table[$i];
- }
-
- dump_simple_mapping( "wine_wctype_table", 0, @table );
-
- close OUTPUT;
- save_file($filename);
-}
-
-
sub rol($$)
{
my ($byte, $count) = @_;
@@ -2739,7 +2700,6 @@ sub save_file($)
chdir ".." if -f "./make_unicode";
load_data();
dump_sortkeys( "dlls/kernelbase/collation.c" );
-dump_ctype_tables( "libs/port/wctype.c" );
dump_bidi_dir_table( "dlls/gdi32/uniscribe/direction.c" );
dump_bidi_dir_table( "dlls/dwrite/direction.c" );
dump_digit_folding( "dlls/kernelbase/digitmap.c" );
More information about the wine-cvs
mailing list