From 9cb44b58e235c88bfd4a9243d1862a32b1097efe Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 24 Nov 2003 19:33:31 +0000 Subject: Re-sync with mozilla. 2003-11-24 Christian Persch * embed/mozilla/nsUnicharUtils.cpp: * embed/mozilla/nsUnicharUtils.h: Re-sync with mozilla. --- embed/mozilla/nsUnicharUtils.cpp | 2 +- embed/mozilla/nsUnicharUtils.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'embed/mozilla') 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__ */ -- cgit v1.2.3