Alexandre Julliard : libport: Move wine_utf8 functions back to libwine and make them obsolete.
Alexandre Julliard
julliard at winehq.org
Wed Feb 5 16:53:34 CST 2020
Module: wine
Branch: master
Commit: 473914f6a5943c4abfc8d0e394c71f395063d89f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=473914f6a5943c4abfc8d0e394c71f395063d89f
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Feb 5 09:00:30 2020 +0100
libport: Move wine_utf8 functions back to libwine and make them obsolete.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wine/unicode.h | 2 --
libs/port/Makefile.in | 1 -
libs/wine/Makefile.in | 3 ++-
libs/wine/port.c | 2 --
libs/{port => wine}/utf8.c | 13 +++++++++++--
libs/wine/wine.map | 4 ++--
6 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index 216e36b38d..f4bf717892 100644
--- a/include/wine/unicode.h
+++ b/include/wine/unicode.h
@@ -88,8 +88,6 @@ extern int wine_cp_mbstowcs( const union cptable *table, int flags,
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 wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int dstlen );
-extern int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int dstlen );
extern int strcmpiW( const WCHAR *str1, const WCHAR *str2 );
extern int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n );
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index e4cd7c4f99..6e3edcf719 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -102,6 +102,5 @@ C_SRCS = \
stubs.c \
symlink.c \
usleep.c \
- utf8.c \
wctomb.c \
wctype.c
diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
index 0b862455ac..9b2b8f643d 100644
--- a/libs/wine/Makefile.in
+++ b/libs/wine/Makefile.in
@@ -10,7 +10,8 @@ C_SRCS = \
loader.c \
mmap.c \
port.c \
- sortkey.c
+ sortkey.c \
+ utf8.c
EXTRA_OBJS = version.o
diff --git a/libs/wine/port.c b/libs/wine/port.c
index 7c91bfc2d0..1ee754b6b9 100644
--- a/libs/wine/port.c
+++ b/libs/wine/port.c
@@ -42,8 +42,6 @@ const void *libwine_port_functions[] =
wine_cp_get_table,
wine_cp_mbstowcs,
wine_cp_wcstombs,
- wine_utf8_mbstowcs,
- wine_utf8_wcstombs
};
/* no longer used, for backwards compatibility only */
diff --git a/libs/port/utf8.c b/libs/wine/utf8.c
similarity index 96%
rename from libs/port/utf8.c
rename to libs/wine/utf8.c
index f47561e4bf..27e05818c3 100644
--- a/libs/port/utf8.c
+++ b/libs/wine/utf8.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;
@@ -95,7 +99,7 @@ static inline int get_length_wcs_utf8( int flags, const WCHAR *src, unsigned int
/* wide char to UTF-8 string conversion */
/* return -1 on dst buffer overflow, -2 on invalid input char */
-int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int dstlen )
+int wine_utf8_wcstombs_obsolete( int flags, const WCHAR *src, int srclen, char *dst, int dstlen )
{
int len;
@@ -301,7 +305,7 @@ static inline int get_length_mbs_utf8( int flags, const char *src, int srclen )
/* UTF-8 to wide char string conversion */
/* return -1 on dst buffer overflow, -2 on invalid input char */
-int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int dstlen )
+int wine_utf8_mbstowcs_obsolete( int flags, const char *src, int srclen, WCHAR *dst, int dstlen )
{
unsigned int res;
const char *srcend = src + srclen;
@@ -336,3 +340,8 @@ int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int
if (src < srcend) return -1; /* overflow */
return dstlen - (dstend - dst);
}
+
+__ASM_OBSOLETE(wine_utf8_wcstombs);
+__ASM_OBSOLETE(wine_utf8_mbstowcs);
+
+#endif /* __ASM_OBSOLETE */
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 9898e61820..f0c94a950f 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -53,8 +53,6 @@ WINE_1.0
wine_mmap_remove_reserved_area;
wine_set_fs;
wine_set_gs;
- wine_utf8_mbstowcs;
- wine_utf8_wcstombs;
wine_wctype_table;
/* the following functions are obsolete and only exported for backwards compatibility */
@@ -120,6 +118,8 @@ WINE_1.0
wine_pthread_get_functions;
wine_pthread_set_functions;
wine_switch_to_stack;
+ wine_utf8_mbstowcs;
+ wine_utf8_wcstombs;
local: *;
};
More information about the wine-cvs
mailing list