libport: Move the codepage table functions back to libwine and make them obsolete.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Alexandre Julliard 2020-02-12 09:06:51 +01:00
parent d81f96a8fc
commit 831f58caa5
7 changed files with 21 additions and 43 deletions

View File

@ -79,9 +79,6 @@ union cptable
struct dbcs_table dbcs;
};
extern const union cptable *wine_cp_get_table( unsigned int codepage );
extern const union cptable *wine_cp_enum_table( unsigned int index );
extern int strcmpiW( const WCHAR *str1, const WCHAR *str2 );
extern int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n );
extern int memicmpW( const WCHAR *str1, const WCHAR *str2, int n );
@ -93,11 +90,6 @@ extern int snprintfW( WCHAR *str, size_t len, const WCHAR *format, ... );
extern int vsprintfW( WCHAR *str, const WCHAR *format, va_list valist );
extern int vsnprintfW( WCHAR *str, size_t len, const WCHAR *format, va_list valist );
WINE_UNICODE_INLINE int wine_is_dbcs_leadbyte( const union cptable *table, unsigned char ch )
{
return (table->info.char_size == 2) && (table->dbcs.cp2uni_leadbytes[ch]);
}
WINE_UNICODE_INLINE WCHAR tolowerW( WCHAR ch )
{
extern const WCHAR wine_casemap_lower[];

View File

@ -68,7 +68,6 @@ C_SRCS = \
c_950.c \
casemap.c \
compose.c \
cptable.c \
decompose.c \
ffs.c \
fstatvfs.c \

View File

@ -4,6 +4,7 @@ C_SRCS = \
collation.c \
config.c \
cpsymbol.c \
cptable.c \
debug.c \
digitmap.c \
fold.c \

View File

@ -20,6 +20,10 @@
#include <stdlib.h>
#include "wine/asm.h"
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
/* Everything below this line is generated automatically by make_unicode */
@ -169,7 +173,7 @@ static int cmp_codepage( const void *codepage, const void *entry )
/* get the table of a given code page */
const union cptable *wine_cp_get_table( unsigned int codepage )
const union cptable *wine_cp_get_table_obsolete( unsigned int codepage )
{
const union cptable **res;
@ -180,8 +184,19 @@ const union cptable *wine_cp_get_table( unsigned int codepage )
/* enum valid codepages */
const union cptable *wine_cp_enum_table( unsigned int index )
const union cptable *wine_cp_enum_table_obsolete( unsigned int index )
{
if (index >= ARRAY_SIZE( cptables )) return NULL;
return cptables[index];
}
int wine_is_dbcs_leadbyte_obsolete( const union cptable *table, unsigned char ch )
{
return (table->info.char_size == 2) && (table->dbcs.cp2uni_leadbytes[ch]);
}
__ASM_OBSOLETE(wine_cp_get_table);
__ASM_OBSOLETE(wine_cp_enum_table);
__ASM_OBSOLETE(wine_is_dbcs_leadbyte);
#endif /* __ASM_OBSOLETE */

View File

@ -38,8 +38,6 @@ const void *libwine_port_functions[] =
{
strtolW,
vsnprintfW,
wine_cp_enum_table,
wine_cp_get_table,
};
/* no longer used, for backwards compatibility only */

View File

@ -9,8 +9,6 @@ WINE_1.0
wine_anon_mmap;
wine_casemap_lower;
wine_casemap_upper;
wine_cp_enum_table;
wine_cp_get_table;
wine_dlclose;
wine_dll_enum_load_path;
wine_dll_set_callback;
@ -32,7 +30,6 @@ WINE_1.0
wine_get_version;
wine_init;
wine_init_argv0_path;
wine_is_dbcs_leadbyte;
wine_ldt_alloc_entries;
wine_ldt_alloc_fs;
wine_ldt_copy;
@ -100,6 +97,8 @@ WINE_1.0
vsprintfW;
wine_call_on_stack;
wine_compare_string;
wine_cp_enum_table;
wine_cp_get_table;
wine_cp_mbstowcs;
wine_cp_wcstombs;
wine_cpsymbol_mbstowcs;
@ -115,6 +114,7 @@ WINE_1.0
wine_dll_unload;
wine_fold_string;
wine_get_sortkey;
wine_is_dbcs_leadbyte;
wine_pthread_get_functions;
wine_pthread_set_functions;
wine_switch_to_stack;

View File

@ -2556,31 +2556,6 @@ sub save_file($)
}
################################################################
# output the list of codepage tables into the cptable.c file
sub output_cptable($)
{
my $output = shift;
my @tables_decl = ();
printf "Building %s\n", $output;
foreach my $file (@allfiles)
{
my ($codepage,$filename) = @$file;
push @tables_decl, sprintf("extern union cptable cptable_%03d;\n",$codepage);
}
push @tables_decl, sprintf("\nstatic const union cptable * const cptables[%d] =\n{\n",$#allfiles+1);
foreach my $file (@allfiles)
{
my ($codepage,$filename) = @$file;
push @tables_decl, sprintf(" &cptable_%03d,\n", $codepage);
}
push @tables_decl, "};";
REPLACE_IN_FILE( $output, @tables_decl );
}
################################################################
# replace the contents of a file between ### cpmap ### marks
@ -2641,8 +2616,6 @@ dump_intl_nls("nls/l_intl.nls");
foreach my $file (@allfiles) { handle_codepage_file( @{$file} ); }
output_cptable("libs/port/cptable.c");
exit 0;
# Local Variables: