aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/nsUnicharUtils.cpp2
-rw-r--r--embed/mozilla/nsUnicharUtils.h6
3 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bf5b6a7ea..153e12e99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-11-24 Christian Persch <chpe@cvs.gnome.org>
+ * embed/mozilla/nsUnicharUtils.cpp:
+ * embed/mozilla/nsUnicharUtils.h:
+
+ Re-sync with mozilla.
+
+2003-11-24 Christian Persch <chpe@cvs.gnome.org>
+
* embed/mozilla/ContentHandler.cpp:
* embed/mozilla/EphyEventListener.cpp:
* embed/mozilla/ExternalProtocolHandlers.cpp:
diff --git a/embed/mozilla/nsUnicharUtils.cpp b/embed/mozilla/nsUnicharUtils.cpp
index d70619303..ce469250a 100644
--- a/embed/mozilla/nsUnicharUtils.cpp
+++ b/embed/mozilla/nsUnicharUtils.cpp
@@ -53,7 +53,7 @@ static nsICaseConversion *gCaseConv = nsnull;
class nsShutdownObserver : public nsIObserver
{
public:
- nsShutdownObserver() { NS_INIT_ISUPPORTS(); }
+ nsShutdownObserver() { }
virtual ~nsShutdownObserver() {}
NS_DECL_ISUPPORTS
diff --git a/embed/mozilla/nsUnicharUtils.h b/embed/mozilla/nsUnicharUtils.h
index 6ae9a238d..17b3f4666 100644
--- a/embed/mozilla/nsUnicharUtils.h
+++ b/embed/mozilla/nsUnicharUtils.h
@@ -85,12 +85,16 @@ inline PRBool IsLowerCase(PRUnichar c) {
#define SURROGATE_TO_UCS4(h, l) ((((PRUint32)(h)-(PRUint32)0xd800) << 10) + \
(PRUint32)(l) - (PRUint32)(0xdc00) + 0x10000)
+#define H_SURROGATE(s) ((PRUnichar)(((PRUint32)s - (PRUint32)0x10000) >> 10) + (PRUnichar)0xd800)
+#define L_SURROGATE(s) ((PRUnichar)(((PRUint32)s - (PRUint32)0x10000) & 0x3ff) + (PRUnichar)0xdc00)
+#define IS_IN_BMP(ucs) ((PRUint32)ucs < 0x10000)
+
/* (0x3131u <= (u) && (u) <= 0x318eu) => Hangul Compatibility Jamo */
/* (0xac00u <= (u) && (u) <= 0xd7a3u) => Hangul Syllables */
#define IS_CJ_CHAR(u) \
((0x2e80u <= (u) && (u) <= 0x312fu) || \
(0x3190u <= (u) && (u) <= 0xabffu) || \
(0xf900u <= (u) && (u) <= 0xfaffu) || \
- (0xff00u <= (u) && (u) <= 0xffffu) )
+ (0xff00u <= (u) && (u) <= 0xffefu) )
#endif /* nsUnicharUtils_h__ */