Use free Windows DDK and compile with latest MinGW releases.
[reactos.git] / reactos / lib / msvcrt / string / strcoll.c
1 #include <msvcrti.h>
2
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 int _strncoll (const char *s1, const char *s2, size_t c)
20 {
21 return strncmp(s1,s2,c);
22 }
23
24 int _strnicoll (const char *s1, const char *s2, size_t c)
25 {
26 return _strnicmp(s1,s2,c);
27 }
28 #else
29 int strcoll (const char *s1,const char *s2)
30 {
31 int ret;
32 ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
33 if (ret == 0)
34 return 0;
35 else
36 return ret - 2;
37 return 0;
38 }
39 #endif