From d81f96a8fc73c4abab3cf04f76e43e34d98512b5 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 12 Feb 2020 09:06:25 +0100 Subject: [PATCH] libport: Move wine_cp_wcstombs implementation back to libwine and make it obsolete. Signed-off-by: Alexandre Julliard --- include/wine/unicode.h | 4 ---- libs/port/Makefile.in | 1 - libs/wine/Makefile.in | 3 ++- libs/wine/port.c | 1 - libs/{port => wine}/wctomb.c | 14 +++++++++++--- libs/wine/wine.map | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) rename libs/{port => wine}/wctomb.c (97%) diff --git a/include/wine/unicode.h b/include/wine/unicode.h index cfb8d9b28ce..d831f6282cf 100644 --- a/include/wine/unicode.h +++ b/include/wine/unicode.h @@ -82,10 +82,6 @@ union cptable extern const union cptable *wine_cp_get_table( unsigned int codepage ); extern const union cptable *wine_cp_enum_table( unsigned int index ); -extern int wine_cp_wcstombs( const union cptable *table, int flags, - const WCHAR *src, int srclen, - char *dst, int dstlen, const char *defchar, int *used ); - 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 ); diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 26674d285d7..4fc81fbbcb8 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -91,5 +91,4 @@ C_SRCS = \ stubs.c \ symlink.c \ usleep.c \ - wctomb.c \ wctype.c diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index da9c3cdeccd..569fd0869a8 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -13,7 +13,8 @@ C_SRCS = \ mmap.c \ port.c \ sortkey.c \ - utf8.c + utf8.c \ + wctomb.c EXTRA_OBJS = version.o diff --git a/libs/wine/port.c b/libs/wine/port.c index b170d7293ba..1c345b5cd3e 100644 --- a/libs/wine/port.c +++ b/libs/wine/port.c @@ -40,7 +40,6 @@ const void *libwine_port_functions[] = vsnprintfW, wine_cp_enum_table, wine_cp_get_table, - wine_cp_wcstombs, }; /* no longer used, for backwards compatibility only */ diff --git a/libs/port/wctomb.c b/libs/wine/wctomb.c similarity index 97% rename from libs/port/wctomb.c rename to libs/wine/wctomb.c index 65e4aa04f73..bde4aa27460 100644 --- a/libs/port/wctomb.c +++ b/libs/wine/wctomb.c @@ -20,6 +20,10 @@ #include +#include "wine/asm.h" + +#ifdef __ASM_OBSOLETE + #include "wine/unicode.h" extern WCHAR wine_compose( const WCHAR *str ) DECLSPEC_HIDDEN; @@ -408,9 +412,9 @@ static int wcstombs_dbcs_slow( const struct dbcs_table *table, int flags, /* wide char to multi byte string conversion */ /* return -1 on dst buffer overflow */ -int wine_cp_wcstombs( const union cptable *table, int flags, - const WCHAR *src, int srclen, - char *dst, int dstlen, const char *defchar, int *used ) +int wine_cp_wcstombs_obsolete( const union cptable *table, int flags, + const WCHAR *src, int srclen, + char *dst, int dstlen, const char *defchar, int *used ) { if (table->info.char_size == 1) { @@ -432,3 +436,7 @@ int wine_cp_wcstombs( const union cptable *table, int flags, return wcstombs_dbcs( &table->dbcs, src, srclen, dst, dstlen ); } } + +__ASM_OBSOLETE(wine_cp_wcstombs); + +#endif /* __ASM_OBSOLETE */ diff --git a/libs/wine/wine.map b/libs/wine/wine.map index 2893ffbaf0f..aeb9e2963b1 100644 --- a/libs/wine/wine.map +++ b/libs/wine/wine.map @@ -11,7 +11,6 @@ WINE_1.0 wine_casemap_upper; wine_cp_enum_table; wine_cp_get_table; - wine_cp_wcstombs; wine_dlclose; wine_dll_enum_load_path; wine_dll_set_callback; @@ -102,6 +101,7 @@ WINE_1.0 wine_call_on_stack; wine_compare_string; wine_cp_mbstowcs; + wine_cp_wcstombs; wine_cpsymbol_mbstowcs; wine_cpsymbol_wcstombs; wine_dbg_log;