[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

paroga at webkit.org paroga at webkit.org
Wed Dec 22 14:46:01 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit abdfaa558db9e8c6431b2bf908869d1091a12da0
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 19 19:23:49 2010 +0000

    2010-10-19  Patrick Gansterer  <paroga at webkit.org>
    
            Reviewed by David Kilzer.
    
            Use UChar instead of wchar_t in UnicodeWinCE
            https://bugs.webkit.org/show_bug.cgi?id=47904
    
            Make UnicodeWinCE more portable, so we can use it for other ports too.
    
            * wtf/unicode/wince/UnicodeWinCE.cpp:
            (WTF::Unicode::toLower):
            (WTF::Unicode::toUpper):
            (WTF::Unicode::foldCase):
            (WTF::Unicode::isPrintableChar):
            (WTF::Unicode::isSpace):
            (WTF::Unicode::isLetter):
            (WTF::Unicode::isUpper):
            (WTF::Unicode::isLower):
            (WTF::Unicode::isDigit):
            (WTF::Unicode::isPunct):
            (WTF::Unicode::isAlphanumeric):
            (WTF::Unicode::toTitleCase):
            (WTF::Unicode::mirroredChar):
            (WTF::Unicode::digitValue):
            * wtf/unicode/wince/UnicodeWinCE.h:
            (WTF::Unicode::isSeparatorSpace):
            (WTF::Unicode::isHighSurrogate):
            (WTF::Unicode::isLowSurrogate):
            (WTF::Unicode::umemcasecmp):
            (WTF::Unicode::surrogateToUcs4):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70074 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 0aa9680..e6cdd96 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,36 @@
 2010-10-19  Patrick Gansterer  <paroga at webkit.org>
 
+        Reviewed by David Kilzer.
+
+        Use UChar instead of wchar_t in UnicodeWinCE
+        https://bugs.webkit.org/show_bug.cgi?id=47904
+
+        Make UnicodeWinCE more portable, so we can use it for other ports too.
+
+        * wtf/unicode/wince/UnicodeWinCE.cpp:
+        (WTF::Unicode::toLower):
+        (WTF::Unicode::toUpper):
+        (WTF::Unicode::foldCase):
+        (WTF::Unicode::isPrintableChar):
+        (WTF::Unicode::isSpace):
+        (WTF::Unicode::isLetter):
+        (WTF::Unicode::isUpper):
+        (WTF::Unicode::isLower):
+        (WTF::Unicode::isDigit):
+        (WTF::Unicode::isPunct):
+        (WTF::Unicode::isAlphanumeric):
+        (WTF::Unicode::toTitleCase):
+        (WTF::Unicode::mirroredChar):
+        (WTF::Unicode::digitValue):
+        * wtf/unicode/wince/UnicodeWinCE.h:
+        (WTF::Unicode::isSeparatorSpace):
+        (WTF::Unicode::isHighSurrogate):
+        (WTF::Unicode::isLowSurrogate):
+        (WTF::Unicode::umemcasecmp):
+        (WTF::Unicode::surrogateToUcs4):
+
+2010-10-19  Patrick Gansterer  <paroga at webkit.org>
+
         Reviewed by Andreas Kling.
 
         Fix style of UnicodeWinCE
diff --git a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp
index ddc9e4e..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;
@@ -106,7 +106,7 @@ int toLower(wchar_t* result, int resultLength, const wchar_t* source, int source
     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;
@@ -130,7 +130,7 @@ int toUpper(wchar_t* result, int resultLength, const wchar_t* source, int source
     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);
 }
diff --git a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h
index 8577495..2688aa9 100644
--- a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h
+++ b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h
@@ -119,29 +119,29 @@ enum CharCategory {
 
 CharCategory category(unsigned int);
 
-bool isSpace(wchar_t);
-bool isLetter(wchar_t);
-bool isPrintableChar(wchar_t);
-bool isUpper(wchar_t);
-bool isLower(wchar_t);
-bool isPunct(wchar_t);
-bool isDigit(wchar_t);
-bool isAlphanumeric(wchar_t);
-inline bool isSeparatorSpace(wchar_t c) { return category(c) == Separator_Space; }
-inline bool isHighSurrogate(wchar_t c) { return (c & 0xfc00) == 0xd800; }
-inline bool isLowSurrogate(wchar_t c) { return (c & 0xfc00) == 0xdc00; }
-
-wchar_t toLower(wchar_t);
-wchar_t toUpper(wchar_t);
-wchar_t foldCase(wchar_t);
-wchar_t toTitleCase(wchar_t);
-int toLower(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
-int toUpper(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
-int foldCase(UChar* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
-
-int digitValue(wchar_t);
-
-wchar_t mirroredChar(UChar32);
+bool isSpace(UChar);
+bool isLetter(UChar);
+bool isPrintableChar(UChar);
+bool isUpper(UChar);
+bool isLower(UChar);
+bool isPunct(UChar);
+bool isDigit(UChar);
+bool isAlphanumeric(UChar);
+inline bool isSeparatorSpace(UChar c) { return category(c) == Separator_Space; }
+inline bool isHighSurrogate(UChar c) { return (c & 0xfc00) == 0xd800; }
+inline bool isLowSurrogate(UChar c) { return (c & 0xfc00) == 0xdc00; }
+
+UChar toLower(UChar);
+UChar toUpper(UChar);
+UChar foldCase(UChar);
+UChar toTitleCase(UChar);
+int toLower(UChar* result, int resultLength, const UChar* source, int sourceLength, bool* isError);
+int toUpper(UChar* result, int resultLength, const UChar* source, int sourceLength, bool* isError);
+int foldCase(UChar* result, int resultLength, const UChar* source, int sourceLength, bool* isError);
+
+int digitValue(UChar);
+
+UChar mirroredChar(UChar32);
 unsigned char combiningClass(UChar32);
 DecompositionType decompositionType(UChar32);
 Direction direction(UChar32);
@@ -155,18 +155,18 @@ inline bool hasLineBreakingPropertyComplexContext(UChar32)
     return false; // FIXME: implement!
 }
 
-inline int umemcasecmp(const wchar_t* a, const wchar_t* b, int len)
+inline int umemcasecmp(const UChar* a, const UChar* b, int len)
 {
     for (int i = 0; i < len; ++i) {
-        wchar_t c1 = foldCase(a[i]);
-        wchar_t c2 = foldCase(b[i]);
+        UChar c1 = foldCase(a[i]);
+        UChar c2 = foldCase(b[i]);
         if (c1 != c2)
             return c1 - c2;
     }
     return 0;
 }
 
-inline UChar32 surrogateToUcs4(wchar_t high, wchar_t low)
+inline UChar32 surrogateToUcs4(UChar high, UChar low)
 {
     return (UChar32(high) << 10) + low - 0x35fdc00;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list