update for HEAD-2003091401
[reactos.git] / lib / msvcrt / 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 /*
10  * @unimplemented
11  */
12 int strcoll(const char* s1, const char* s2)
13 {
14     return strcmp(s1, s2);
15 }
16
17 /*
18  * @unimplemented
19  */
20 int _stricoll(const char* s1, const char* s2)
21 {
22     return _stricmp(s1, s2);
23 }
24
25 #else
26 int strcoll (const char* s1,const char* s2)
27 {
28     int ret;
29     ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
30     if (ret == 0)
31         return 0;
32     else 
33         return ret - 2;
34     return 0;
35 }
36 #endif