mirror of
https://github.com/boostorg/regex.git
synced 2025-07-05 16:46:31 +02:00
A few corrections to the WinCE patches
[SVN r41350]
This commit is contained in:
@ -182,11 +182,29 @@ BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(char c, lcid_type id)
|
|||||||
|
|
||||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t c, lcid_type id)
|
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t c, lcid_type id)
|
||||||
{
|
{
|
||||||
#ifndef BOOST_NO_ANSI_APIS
|
|
||||||
WORD mask;
|
WORD mask;
|
||||||
if(::GetStringTypeExW(id, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
|
if(::GetStringTypeExW(id, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
|
||||||
|
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(unsigned short ca, lcid_type id)
|
||||||
|
{
|
||||||
|
WORD mask;
|
||||||
|
wchar_t c = ca;
|
||||||
|
if(::GetStringTypeExW(id, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char c, lcid_type id)
|
||||||
|
{
|
||||||
|
#ifndef BOOST_NO_ANSI_APIS
|
||||||
|
WORD mask;
|
||||||
|
if(::GetStringTypeExA(id, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
#else
|
#else
|
||||||
UINT code_page = get_code_page_for_locale_id(id);
|
UINT code_page = get_code_page_for_locale_id(id);
|
||||||
if (code_page == 0)
|
if (code_page == 0)
|
||||||
@ -202,24 +220,6 @@ BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t c, lcid_type id)
|
|||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
|
|
||||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(unsigned short ca, lcid_type id)
|
|
||||||
{
|
|
||||||
WORD mask;
|
|
||||||
wchar_t c = ca;
|
|
||||||
if(::GetStringTypeExW(id, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char c, lcid_type id)
|
|
||||||
{
|
|
||||||
WORD mask;
|
|
||||||
if(::GetStringTypeExA(id, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t c, lcid_type id)
|
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t c, lcid_type id)
|
||||||
{
|
{
|
||||||
@ -255,6 +255,7 @@ BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name)
|
|||||||
return cat_type();
|
return cat_type();
|
||||||
|
|
||||||
cat_type result(::LoadLibraryW(wide_name), &free_module);
|
cat_type result(::LoadLibraryW(wide_name), &free_module);
|
||||||
|
return result;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user