Alexandre Julliard : libport: Move wine_cp_wcstombs implementation back to libwine and make it obsolete.

Alexandre Julliard julliard at winehq.org
Wed Feb 12 16:21:04 CST 2020


Module: wine
Branch: master
Commit: d81f96a8fc73c4abab3cf04f76e43e34d98512b5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d81f96a8fc73c4abab3cf04f76e43e34d98512b5

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Feb 12 09:06:25 2020 +0100

libport: Move wine_cp_wcstombs implementation back to libwine and make it obsolete.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index cfb8d9b28c..d831f6282c 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 26674d285d..4fc81fbbcb 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 da9c3cdecc..569fd0869a 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 b170d7293b..1c345b5cd3 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 65e4aa04f7..bde4aa2746 100644
--- a/libs/port/wctomb.c
+++ b/libs/wine/wctomb.c
@@ -20,6 +20,10 @@
 
 #include <string.h>
 
+#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 2893ffbaf0..aeb9e2963b 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;




More information about the wine-cvs mailing list