ReactOS 0.4.16-dev-937-g7afcd2a
mbsnbico.cpp File Reference
#include <corecrt_internal_mbstring.h>
#include <locale.h>
Include dependency graph for mbsnbico.cpp:

Go to the source code of this file.

Functions

int __cdecl _mbsnbicoll_l (const unsigned char *s1, const unsigned char *s2, size_t n, _locale_t plocinfo)
 
int __cdecl _mbsnbicoll (const unsigned char *s1, const unsigned char *s2, size_t n)
 

Function Documentation

◆ _mbsnbicoll()

int __cdecl _mbsnbicoll ( const unsigned char s1,
const unsigned char s2,
size_t  n 
)

Definition at line 75 of file mbsnbico.cpp.

80{
81 return _mbsnbicoll_l(s1, s2, n, nullptr);
82}
GLdouble n
Definition: glext.h:7729
int __cdecl _mbsnbicoll_l(const unsigned char *s1, const unsigned char *s2, size_t n, _locale_t plocinfo)
Definition: mbsnbico.cpp:41
struct S1 s1
struct S2 s2

◆ _mbsnbicoll_l()

int __cdecl _mbsnbicoll_l ( const unsigned char s1,
const unsigned char s2,
size_t  n,
_locale_t  plocinfo 
)

Definition at line 41 of file mbsnbico.cpp.

47{
48 int ret;
49 _LocaleUpdate _loc_update(plocinfo);
50
51 if (n == 0)
52 return 0;
53
54 /* validation section */
58
59 if (_loc_update.GetLocaleT()->mbcinfo->ismbcodepage == 0)
60 return _strnicoll_l((const char *)s1, (const char *)s2, n, plocinfo);
61
62 if ( 0 == (ret = __acrt_CompareStringA(_loc_update.GetLocaleT(),
63 _loc_update.GetLocaleT()->mbcinfo->mblocalename,
65 (const char *)s1,
66 (int)n,
67 (char *)s2,
68 (int)n,
69 _loc_update.GetLocaleT()->mbcinfo->mbcodepage )) )
70 return _NLSCMPERROR;
71
72 return ret - 2;
73
74}
#define EINVAL
Definition: acclib.h:90
int __cdecl __acrt_CompareStringA(_In_opt_ _locale_t _Plocinfo, _In_ LPCWSTR _LocaleName, _In_ DWORD _DwCmpFlags, _In_CRT_NLS_string_(_CchCount1) PCCH _LpString1, _In_ int _CchCount1, _In_CRT_NLS_string_(_CchCount2) PCCH _LpString2, _In_ int _CchCount2, _In_ int _CodePage)
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
_Check_return_ _CRTIMP int __cdecl _strnicoll_l(_In_z_ const char *str1, _In_z_ const char *str2, _In_ size_t maxcount, _In_opt_ _locale_t locale)
Definition: stubs.c:564
#define INT_MAX
Definition: intsafe.h:150
_locale_t plocinfo
Definition: ismbbyte.cpp:75
#define _NLSCMPERROR
Definition: string.h:19
int ret
#define NORM_IGNORECASE
Definition: winnls.h:178
#define SORT_STRINGSORT
Definition: winnls.h:185

Referenced by _mbsnbicoll().