Commit 875f506b authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent c7196dc9
...@@ -58,8 +58,9 @@ WINE_UNICODE_INLINE WCHAR toupperW( WCHAR ch ) ...@@ -58,8 +58,9 @@ WINE_UNICODE_INLINE WCHAR toupperW( WCHAR ch )
/* and the C2_* type in the high 4 bits */ /* and the C2_* type in the high 4 bits */
WINE_UNICODE_INLINE unsigned short get_char_typeW( WCHAR ch ) WINE_UNICODE_INLINE unsigned short get_char_typeW( WCHAR ch )
{ {
extern const unsigned short wine_wctype_table[]; unsigned short type;
return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)]; GetStringTypeW( CT_CTYPE1, &ch, 1, &type );
return type;
} }
WINE_UNICODE_INLINE int iscntrlW( WCHAR wc ) WINE_UNICODE_INLINE int iscntrlW( WCHAR wc )
......
...@@ -18,5 +18,4 @@ C_SRCS = \ ...@@ -18,5 +18,4 @@ C_SRCS = \
statvfs.c \ statvfs.c \
strnlen.c \ strnlen.c \
symlink.c \ symlink.c \
usleep.c \ usleep.c
wctype.c
...@@ -84,7 +84,8 @@ C_SRCS = \ ...@@ -84,7 +84,8 @@ C_SRCS = \
sortkey.c \ sortkey.c \
string.c \ string.c \
utf8.c \ utf8.c \
wctomb.c wctomb.c \
wctype.c
config_EXTRADEFS = \ config_EXTRADEFS = \
-DBINDIR='"${bindir}"' \ -DBINDIR='"${bindir}"' \
......
/* Unicode ctype tables */ /* Unicode ctype tables */
/* Automatically generated; DO NOT EDIT!! */ /* Automatically generated; DO NOT EDIT!! */
#include "wine/asm.h"
#ifdef __ASM_OBSOLETE
#include "windef.h" #include "windef.h"
const unsigned short wine_wctype_table[16242] = const unsigned short wine_wctype_table[16242] =
...@@ -2039,3 +2043,5 @@ 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, 0x0000, 0xb220, 0xb220, 0xb220, 0xb200, 0xb200,
0x0000, 0x0000 0x0000, 0x0000
}; };
#endif /* __ASM_OBSOLETE */
...@@ -14,7 +14,6 @@ WINE_1.0 ...@@ -14,7 +14,6 @@ WINE_1.0
wine_mmap_enum_reserved_areas; wine_mmap_enum_reserved_areas;
wine_mmap_is_in_reserved_area; wine_mmap_is_in_reserved_area;
wine_mmap_remove_reserved_area; wine_mmap_remove_reserved_area;
wine_wctype_table;
/* the following functions are obsolete and only exported for backwards compatibility */ /* the following functions are obsolete and only exported for backwards compatibility */
...@@ -120,6 +119,7 @@ WINE_1.0 ...@@ -120,6 +119,7 @@ WINE_1.0
wine_switch_to_stack; wine_switch_to_stack;
wine_utf8_mbstowcs; wine_utf8_mbstowcs;
wine_utf8_wcstombs; wine_utf8_wcstombs;
wine_wctype_table;
local: *; local: *;
}; };
...@@ -1754,19 +1754,6 @@ sub compress_array($$@) ...@@ -1754,19 +1754,6 @@ sub compress_array($$@)
} }
################################################################ ################################################################
# 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 # dump a char -> 16-bit value mapping table using two-level tables
sub dump_two_level_mapping($$@) sub dump_two_level_mapping($$@)
{ {
...@@ -1882,32 +1869,6 @@ sub dump_bidi_dir_table($) ...@@ -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($$) sub rol($$)
{ {
my ($byte, $count) = @_; my ($byte, $count) = @_;
...@@ -2739,7 +2700,6 @@ sub save_file($) ...@@ -2739,7 +2700,6 @@ sub save_file($)
chdir ".." if -f "./make_unicode"; chdir ".." if -f "./make_unicode";
load_data(); load_data();
dump_sortkeys( "dlls/kernelbase/collation.c" ); 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/gdi32/uniscribe/direction.c" );
dump_bidi_dir_table( "dlls/dwrite/direction.c" ); dump_bidi_dir_table( "dlls/dwrite/direction.c" );
dump_digit_folding( "dlls/kernelbase/digitmap.c" ); dump_digit_folding( "dlls/kernelbase/digitmap.c" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment