xref: /reactos/sdk/lib/crt/string/strcoll.c (revision 40462c92)
1 /*
2  * COPYRIGHT:   See COPYING in the top level directory
3  * PROJECT:     ReactOS system libraries
4  * FILE:        lib/sdk/crt/string/strcoll.c
5  * PURPOSE:     Unknown
6  * PROGRAMER:   Unknown
7  * UPDATE HISTORY:
8  *              25/11/05: Added license header
9  */
10 
11 #include <precomp.h>
12 
13 /* Compare S1 and S2, returning less than, equal to or
14    greater than zero if the collated form of S1 is lexicographically
15    less than, equal to or greater than the collated form of S2.  */
16 
17 #if 1
18 /*
19  * @unimplemented
20  */
21 int strcoll(const char* s1, const char* s2)
22 {
23     return strcmp(s1, s2);
24 }
25 
26 /*
27  * @unimplemented
28  */
29 int _stricoll(const char* s1, const char* s2)
30 {
31     return _stricmp(s1, s2);
32 }
33 
34 #else
35 int strcoll (const char* s1,const char* s2)
36 {
37     int ret;
38     ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
39     if (ret == 0)
40         return 0;
41     else
42         return ret - 2;
43     return 0;
44 }
45 #endif
46