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