PATCH: mbsicoll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Ciao, Marcus

Changelog:
	Implemented mbsicoll (without locale handling)

Index: dlls/msvcrt/mbcs.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/mbcs.c,v
retrieving revision 1.21
diff -u -r1.21 mbcs.c
--- dlls/msvcrt/mbcs.c	19 Dec 2002 04:21:30 -0000	1.21
+++ dlls/msvcrt/mbcs.c	30 Jan 2003 00:34:47 -0000
@@ -307,6 +307,32 @@
 }
 
 /*********************************************************************
+ *		_mbsicoll(MSVCRT.@)
+ * FIXME: handle locales.
+ */
+int _mbsicoll(const unsigned char* str, const unsigned char* cmp)
+{
+  if(MSVCRT___mb_cur_max > 1)
+  {
+    unsigned int strc, cmpc;
+    do {
+      if(!*str)
+        return *cmp ? -1 : 0;
+      if(!*cmp)
+        return 1;
+      strc = _mbctolower(_mbsnextc(str));
+      cmpc = _mbctolower(_mbsnextc(cmp));
+      if(strc != cmpc)
+        return strc < cmpc ? -1 : 1;
+      str +=(strc > 255) ? 2 : 1;
+      cmp +=(strc > 255) ? 2 : 1; /* equal, use same increment */
+    } while(1);
+  }
+  return strcasecmp(str, cmp); /* ASCII CP */
+}
+
+
+/*********************************************************************
  *		_mbsicmp(MSVCRT.@)
  */
 int _mbsicmp(const unsigned char* str, const unsigned char* cmp)
Index: dlls/msvcrt/msvcrt.spec
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/msvcrt.spec,v
retrieving revision 1.59
diff -u -r1.59 msvcrt.spec
--- dlls/msvcrt/msvcrt.spec	11 Jan 2003 21:01:04 -0000	1.59
+++ dlls/msvcrt/msvcrt.spec	30 Jan 2003 00:34:47 -0000
@@ -355,7 +355,7 @@
 @ cdecl _mbsdec(ptr ptr) _mbsdec
 @ cdecl _mbsdup(str) _strdup
 @ cdecl _mbsicmp(str str) _mbsicmp
-@ stub _mbsicoll #(str str)
+@ cdecl _mbsicoll(str str) _mbsicoll
 @ cdecl _mbsinc(str) _mbsinc
 @ cdecl _mbslen(str) _mbslen
 @ cdecl _mbslwr(str) _mbslwr


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux