Module: wine Branch: master Commit: 23a50fb0bdbbba21ebf2654a0745060d5b262df9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=23a50fb0bdbbba21ebf2654a0...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Feb 12 09:06:19 2020 +0100
libport: Move wine_cp_mbstowcs implementation back to libwine and make it obsolete.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/wine/unicode.h | 3 --- libs/port/Makefile.in | 1 - libs/wine/Makefile.in | 1 + libs/{port => wine}/mbtowc.c | 13 ++++++++++--- libs/wine/port.c | 1 - libs/wine/wine.map | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/include/wine/unicode.h b/include/wine/unicode.h index f4bf717892..cfb8d9b28c 100644 --- a/include/wine/unicode.h +++ b/include/wine/unicode.h @@ -82,9 +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_mbstowcs( const union cptable *table, int flags, - const char *src, int srclen, - WCHAR *dst, int dstlen ); 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 ); diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index b6720b0271..26674d285d 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -78,7 +78,6 @@ C_SRCS = \ isinf.c \ isnan.c \ lstat.c \ - mbtowc.c \ mkstemps.c \ poll.c \ pread.c \ diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 5850f0299d..da9c3cdecc 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -9,6 +9,7 @@ C_SRCS = \ fold.c \ ldt.c \ loader.c \ + mbtowc.c \ mmap.c \ port.c \ sortkey.c \ diff --git a/libs/port/mbtowc.c b/libs/wine/mbtowc.c similarity index 97% rename from libs/port/mbtowc.c rename to libs/wine/mbtowc.c index b6823d0ee8..5c76401c10 100644 --- a/libs/port/mbtowc.c +++ b/libs/wine/mbtowc.c @@ -20,6 +20,10 @@
#include <string.h>
+#include "wine/asm.h" + +#ifdef __ASM_OBSOLETE + #include "wine/unicode.h"
extern const unsigned short nfd_table[] DECLSPEC_HIDDEN; @@ -279,9 +283,8 @@ static int mbstowcs_dbcs_decompose( const struct dbcs_table *table,
/* return -1 on dst buffer overflow, -2 on invalid input char */ -int wine_cp_mbstowcs( const union cptable *table, int flags, - const char *s, int srclen, - WCHAR *dst, int dstlen ) +int wine_cp_mbstowcs_obsolete( const union cptable *table, int flags, + const char *s, int srclen, WCHAR *dst, int dstlen ) { const unsigned char *src = (const unsigned char*) s;
@@ -310,3 +313,7 @@ int wine_cp_mbstowcs( const union cptable *table, int flags, return mbstowcs_dbcs_decompose( &table->dbcs, src, srclen, dst, dstlen ); } } + +__ASM_OBSOLETE(wine_cp_mbstowcs); + +#endif /* __ASM_OBSOLETE */ diff --git a/libs/wine/port.c b/libs/wine/port.c index 1ee754b6b9..b170d7293b 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_mbstowcs, wine_cp_wcstombs, };
diff --git a/libs/wine/wine.map b/libs/wine/wine.map index f0c94a950f..2893ffbaf0 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_mbstowcs; wine_cp_wcstombs; wine_dlclose; wine_dll_enum_load_path; @@ -102,6 +101,7 @@ WINE_1.0 vsprintfW; wine_call_on_stack; wine_compare_string; + wine_cp_mbstowcs; wine_cpsymbol_mbstowcs; wine_cpsymbol_wcstombs; wine_dbg_log;