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

Alexandre Julliard julliard at winehq.org
Wed Feb 5 16:53:34 CST 2020


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Feb  5 09:00:14 2020 +0100

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

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

---

 include/wine/unicode.h        |  3 ---
 libs/port/Makefile.in         |  1 -
 libs/wine/Makefile.in         |  3 ++-
 libs/wine/port.c              |  1 -
 libs/{port => wine}/sortkey.c | 16 +++++++++++++---
 libs/wine/wine.map            |  4 ++--
 6 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/include/wine/unicode.h b/include/wine/unicode.h
index d2b852fafb..b956fcff44 100644
--- a/include/wine/unicode.h
+++ b/include/wine/unicode.h
@@ -93,9 +93,6 @@ extern int wine_cpsymbol_wcstombs( const WCHAR *src, int srclen, char *dst, int
 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 wine_compare_string( int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2 );
-extern int wine_get_sortkey( 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 );
 extern int memicmpW( const WCHAR *str1, const WCHAR *str2, int n );
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 4e3f23cde9..c70bd98099 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -96,7 +96,6 @@ C_SRCS = \
 	pwrite.c \
 	readlink.c \
 	rint.c \
-	sortkey.c \
 	spawn.c \
 	statvfs.c \
 	string.c \
diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
index d0b2d1e7b6..eb4ba330b4 100644
--- a/libs/wine/Makefile.in
+++ b/libs/wine/Makefile.in
@@ -8,7 +8,8 @@ C_SRCS = \
 	ldt.c \
 	loader.c \
 	mmap.c \
-	port.c
+	port.c \
+	sortkey.c
 
 EXTRA_OBJS = version.o
 
diff --git a/libs/wine/port.c b/libs/wine/port.c
index 43355719c2..bccbf93c19 100644
--- a/libs/wine/port.c
+++ b/libs/wine/port.c
@@ -38,7 +38,6 @@ const void *libwine_port_functions[] =
 {
     strtolW,
     vsnprintfW,
-    wine_compare_string,
     wine_cp_enum_table,
     wine_cp_get_table,
     wine_cp_mbstowcs,
diff --git a/libs/port/sortkey.c b/libs/wine/sortkey.c
similarity index 96%
rename from libs/port/sortkey.c
rename to libs/wine/sortkey.c
index 090aaf0b19..eb132e5361 100644
--- a/libs/port/sortkey.c
+++ b/libs/wine/sortkey.c
@@ -17,6 +17,11 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+
+#include "wine/asm.h"
+
+#ifdef __ASM_OBSOLETE
+
 #include "wine/unicode.h"
 
 extern const unsigned int collation_table[];
@@ -38,7 +43,7 @@ static const WCHAR *get_decomposition( WCHAR ch, unsigned int *len )
  *
  * FIXME: 'variable' flag not handled
  */
-int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
+int wine_get_sortkey_obsolete(int flags, const WCHAR *src, int srclen, char *dst, int dstlen)
 {
     WCHAR dummy[4]; /* no decomposition is larger than 4 chars */
     int key_len[4];
@@ -289,8 +294,8 @@ static inline int compare_weights(int flags, const WCHAR *str1, int len1,
     return len1 - len2;
 }
 
-int wine_compare_string(int flags, const WCHAR *str1, int len1,
-                        const WCHAR *str2, int len2)
+int wine_compare_string_obsolete(int flags, const WCHAR *str1, int len1,
+                                 const WCHAR *str2, int len2)
 {
     int ret;
 
@@ -304,3 +309,8 @@ int wine_compare_string(int flags, const WCHAR *str1, int len1,
     }
     return ret;
 }
+
+__ASM_OBSOLETE(wine_get_sortkey);
+__ASM_OBSOLETE(wine_compare_string);
+
+#endif /* __ASM_OBSOLETE */
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 08de127cff..9458cd89f3 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -9,7 +9,6 @@ WINE_1.0
     wine_anon_mmap;
     wine_casemap_lower;
     wine_casemap_upper;
-    wine_compare_string;
     wine_cp_enum_table;
     wine_cp_get_table;
     wine_cp_mbstowcs;
@@ -32,7 +31,6 @@ WINE_1.0
     wine_get_fs;
     wine_get_gs;
     wine_get_server_dir;
-    wine_get_sortkey;
     wine_get_ss;
     wine_get_user_name;
     wine_get_version;
@@ -107,6 +105,7 @@ WINE_1.0
     vsnprintfW;
     vsprintfW;
     wine_call_on_stack;
+    wine_compare_string;
     wine_dbg_log;
     wine_dbg_printf;
     wine_dbg_sprintf;
@@ -117,6 +116,7 @@ WINE_1.0
     wine_dll_load_main_exe;
     wine_dll_unload;
     wine_fold_string;
+    wine_get_sortkey;
     wine_pthread_get_functions;
     wine_pthread_set_functions;
     wine_switch_to_stack;




More information about the wine-cvs mailing list