diff options
Diffstat (limited to 'JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp')
-rw-r--r-- | JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp index b52b05c..96dac7d 100644 --- a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp +++ b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp @@ -27,62 +27,62 @@ namespace WTF { namespace Unicode { -wchar_t toLower(wchar_t c) +UChar toLower(UChar c) { return towlower(c); } -wchar_t toUpper(wchar_t c) +UChar toUpper(UChar c) { return towupper(c); } -wchar_t foldCase(wchar_t c) +UChar foldCase(UChar c) { return towlower(c); } -bool isPrintableChar(wchar_t c) +bool isPrintableChar(UChar c) { return !!iswprint(c); } -bool isSpace(wchar_t c) +bool isSpace(UChar c) { return !!iswspace(c); } -bool isLetter(wchar_t c) +bool isLetter(UChar c) { return !!iswalpha(c); } -bool isUpper(wchar_t c) +bool isUpper(UChar c) { return !!iswupper(c); } -bool isLower(wchar_t c) +bool isLower(UChar c) { return !!iswlower(c); } -bool isDigit(wchar_t c) +bool isDigit(UChar c) { return !!iswdigit(c); } -bool isPunct(wchar_t c) +bool isPunct(UChar c) { return !!iswpunct(c); } -bool isAlphanumeric(wchar_t c) +bool isAlphanumeric(UChar c) { return !!iswalnum(c); } -int toLower(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError) +int toLower(UChar* result, int resultLength, const UChar* source, int sourceLength, bool* isError) { const UChar* sourceIterator = source; const UChar* sourceEnd = source + sourceLength; @@ -99,14 +99,14 @@ int toLower(wchar_t* result, int resultLength, const wchar_t* source, int source if (sourceIterator < sourceEnd) remainingCharacters += sourceEnd - sourceIterator; - *isError = (remainingCharacters != 0); + *isError = !!remainingCharacters; if (resultIterator < resultEnd) *resultIterator = 0; return (resultIterator - result) + remainingCharacters; } -int toUpper(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError) +int toUpper(UChar* result, int resultLength, const UChar* source, int sourceLength, bool* isError) { const UChar* sourceIterator = source; const UChar* sourceEnd = source + sourceLength; @@ -123,14 +123,14 @@ int toUpper(wchar_t* result, int resultLength, const wchar_t* source, int source if (sourceIterator < sourceEnd) remainingCharacters += sourceEnd - sourceIterator; - *isError = (remainingCharacters != 0); + *isError = !!remainingCharacters; if (resultIterator < resultEnd) *resultIterator = 0; return (resultIterator - result) + remainingCharacters; } -int foldCase(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError) +int foldCase(UChar* result, int resultLength, const UChar* source, int sourceLength, bool* isError) { *isError = false; if (resultLength < sourceLength) { @@ -142,7 +142,7 @@ int foldCase(wchar_t* result, int resultLength, const wchar_t* source, int sourc return sourceLength; } -wchar_t toTitleCase(wchar_t c) +UChar toTitleCase(UChar c) { return towupper(c); } @@ -167,12 +167,12 @@ unsigned char combiningClass(UChar32 c) return UnicodeCE::combiningClass(c); } -wchar_t mirroredChar(UChar32 c) +UChar mirroredChar(UChar32 c) { return UnicodeCE::mirroredChar(c); } -int digitValue(wchar_t c) +int digitValue(UChar c) { return UnicodeCE::digitValue(c); } |