libport: Move the char type table back to libwine and stop updating it.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-11-29 21:38:12 +01:00
parent c7196dc945
commit 875f506b33
6 changed files with 13 additions and 46 deletions

View File

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

View File

@ -18,5 +18,4 @@ C_SRCS = \
statvfs.c \
strnlen.c \
symlink.c \
usleep.c \
wctype.c
usleep.c

View File

@ -84,7 +84,8 @@ C_SRCS = \
sortkey.c \
string.c \
utf8.c \
wctomb.c
wctomb.c \
wctype.c
config_EXTRADEFS = \
-DBINDIR='"${bindir}"' \

View File

@ -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 */

View File

@ -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: *;
};

View File

@ -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" );