From 70155122921fcc93be28fbae8218e79e5733fbbc Mon Sep 17 00:00:00 2001 From: David Deakins Date: Sun, 25 Nov 2007 04:30:02 +0000 Subject: [PATCH] A few corrections to the WinCE patches [SVN r41350] --- src/w32_regex_traits.cpp | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/w32_regex_traits.cpp b/src/w32_regex_traits.cpp index 47f8d05d..365fccc0 100644 --- a/src/w32_regex_traits.cpp +++ b/src/w32_regex_traits.cpp @@ -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) { -#ifndef BOOST_NO_ANSI_APIS WORD mask; if(::GetStringTypeExW(id, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER)) return true; 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 UINT code_page = get_code_page_for_locale_id(id); 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; #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) { @@ -255,6 +255,7 @@ BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name) return cat_type(); cat_type result(::LoadLibraryW(wide_name), &free_module); + return result; #endif }