branch update for HEAD-2003021201
[reactos.git] / lib / crtdll / string / strcoll.c
1 #include <windows.h>
2 #include <msvcrt/string.h>
3
4 /* Compare S1 and S2, returning less than, equal to or
5    greater than zero if the collated form of S1 is lexicographically
6    less than, equal to or greater than the collated form of S2.  */
7
8 #if 1
9 int strcoll(const char* s1, const char* s2)
10 {
11     return strcmp(s1, s2);
12 }
13
14 int _stricoll(const char* s1, const char* s2)
15 {
16     return _stricmp(s1, s2);
17 }
18
19 #else
20 int strcoll (const char* s1,const char* s2)
21 {
22     int ret;
23     ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
24     if (ret == 0)
25         return 0;
26     else 
27         return ret - 2;
28     return 0;
29 }
30 #endif