bug 213899 : disable encoders for X11 font encoding in ucvtw2 and ucvcn on non-Unix platforms (r=smontagu, sr=alecf)

This commit is contained in:
jshin%mailaps.org 2003-07-29 04:34:26 +00:00
Родитель 540bb806ee
Коммит 15871c0819
7 изменённых файлов: 37 добавлений и 1 удалений

Просмотреть файл

@ -252,6 +252,7 @@
#include "nsUCvTW2Dll.h"
#include "nsEUCTWToUnicode.h"
#include "nsUnicodeToEUCTW.h"
#ifdef MOZ_EXTRA_X11CONVERTERS
#include "nsUnicodeToCNS11643p1.h"
#include "nsUnicodeToCNS11643p2.h"
#include "nsUnicodeToCNS11643p3.h"
@ -259,6 +260,7 @@
#include "nsUnicodeToCNS11643p5.h"
#include "nsUnicodeToCNS11643p6.h"
#include "nsUnicodeToCNS11643p7.h"
#endif
// ucvtw
#include "nsUCvTWCID.h"
@ -303,7 +305,9 @@
#include "nsUnicodeToCP936.h"
#include "nsGB2312ToUnicodeV2.h"
#include "nsUnicodeToGB2312V2.h"
#ifdef MOZ_EXTRA_X11CONVERTERS
#include "nsUnicodeToGB2312GL.h"
#endif
#include "nsISO2022CNToUnicode.h"
#include "nsUnicodeToISO2022CN.h"
#include "gbku.h"
@ -412,6 +416,7 @@ NS_UCONV_REG_UNREG_ENCODER("jis_0212-1990" , NS_UNICODETOJISX0212_CID)
// ucvtw2
NS_UCONV_REG_UNREG("x-euc-tw", NS_EUCTWTOUNICODE_CID, NS_UNICODETOEUCTW_CID)
#ifdef MOZ_EXTRA_X11CONVERTERS
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-1" , NS_UNICODETOCNS11643P1_CID)
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-2" , NS_UNICODETOCNS11643P2_CID)
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-3" , NS_UNICODETOCNS11643P3_CID)
@ -419,6 +424,7 @@ NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-4" , NS_UNICODETOCNS11643P4_CID)
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-5" , NS_UNICODETOCNS11643P5_CID)
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-6" , NS_UNICODETOCNS11643P6_CID)
NS_UCONV_REG_UNREG_ENCODER("x-cns-11643-7" , NS_UNICODETOCNS11643P7_CID)
#endif
// ucvtw
NS_UCONV_REG_UNREG("Big5", NS_BIG5TOUNICODE_CID, NS_UNICODETOBIG5_CID)
@ -450,10 +456,14 @@ NS_UCONV_REG_UNREG("x-gbk", NS_GBKTOUNICODE_CID, NS_UNICODETOGBK_CID)
NS_UCONV_REG_UNREG_ENCODER("x-gbk-noascii", NS_UNICODETOGBKNOASCII_CID)
#endif
NS_UCONV_REG_UNREG("HZ-GB-2312", NS_HZTOUNICODE_CID, NS_UNICODETOHZ_CID)
#ifdef MOZ_EXTRA_X11CONVERTERS
NS_UCONV_REG_UNREG_ENCODER("gb_2312-80", NS_UNICODETOGB2312GL_CID)
#endif
NS_UCONV_REG_UNREG("gb18030", NS_GB18030TOUNICODE_CID, NS_UNICODETOGB18030_CID)
#ifdef MOZ_EXTRA_X11CONVERTERS
NS_UCONV_REG_UNREG_ENCODER("gb18030.2000-0", NS_UNICODETOGB18030Font0_CID)
NS_UCONV_REG_UNREG_ENCODER("gb18030.2000-1", NS_UNICODETOGB18030Font1_CID)
#endif
NS_UCONV_REG_UNREG_DECODER("ISO-2022-CN", NS_ISO2022CNTOUNICODE_CID)
NS_CONVERTER_REGISTRY_END
@ -523,11 +533,15 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGBKNoAscii);
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHZToUnicode);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToHZ);
#ifdef MOZ_EXTRA_X11CONVERTERS
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB2312GL);
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGB18030ToUnicode);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB18030);
#ifdef MOZ_EXTRA_X11CONVERTERS
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB18030Font0);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB18030Font1);
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022CNToUnicode);
@ -1570,6 +1584,7 @@ static const nsModuleComponentInfo components[] =
NS_UNICODEENCODER_CONTRACTID_BASE "x-euc-tw",
nsUnicodeToEUCTWConstructor,
},
#ifdef MOZ_EXTRA_X11CONVERTERS
{
ENCODER_NAME_BASE "x-cns-11643-1" , NS_UNICODETOCNS11643P1_CID,
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-1",
@ -1605,6 +1620,7 @@ static const nsModuleComponentInfo components[] =
NS_UNICODEENCODER_CONTRACTID_BASE "x-cns-11643-7",
nsUnicodeToCNS11643p7Constructor,
},
#endif
// ucvtw
{
@ -1746,16 +1762,19 @@ static const nsModuleComponentInfo components[] =
NS_UNICODEENCODER_CONTRACTID_BASE "HZ-GB-2312",
nsUnicodeToHZConstructor,
},
#ifdef MOZ_EXTRA_X11CONVERTERS
{
ENCODER_NAME_BASE "gb_2312-80" , NS_UNICODETOGB2312GL_CID,
NS_UNICODEENCODER_CONTRACTID_BASE "gb_2312-80",
nsUnicodeToGB2312GLConstructor,
},
#endif
{
DECODER_NAME_BASE "gb18030" , NS_GB18030TOUNICODE_CID,
NS_UNICODEDECODER_CONTRACTID_BASE "gb18030",
nsGB18030ToUnicodeConstructor ,
},
#ifdef MOZ_EXTRA_X11CONVERTERS
{
ENCODER_NAME_BASE "gb18030.2000-0" , NS_UNICODETOGB18030Font0_CID,
NS_UNICODEENCODER_CONTRACTID_BASE "gb18030.2000-0",
@ -1766,6 +1785,7 @@ static const nsModuleComponentInfo components[] =
NS_UNICODEENCODER_CONTRACTID_BASE "gb18030.2000-1",
nsUnicodeToGB18030Font1Constructor,
},
#endif
{
ENCODER_NAME_BASE "gb18030" , NS_UNICODETOGB18030_CID,
NS_UNICODEENCODER_CONTRACTID_BASE "gb18030",

Просмотреть файл

@ -39,7 +39,6 @@ REQUIRES = xpcom \
CPPSRCS = \
nsGB2312ToUnicodeV2.cpp \
nsUnicodeToGB2312V2.cpp \
nsUnicodeToGB2312GL.cpp \
nsGBKToUnicode.cpp \
nsUnicodeToGBK.cpp \
nsISO2022CNToUnicode.cpp \
@ -54,6 +53,7 @@ CPPSRCS = \
ifdef MOZ_EXTRA_X11CONVERTERS
CPPSRCS += \
nsUnicodeToGBKNoAscii.cpp \
nsUnicodeToGB2312GL.cpp \
$(NULL)
endif

Просмотреть файл

@ -65,10 +65,12 @@
#define NS_UNICODETOGB2312_CID \
{ 0x379c2777, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#ifdef MOZ_EXTRA_X11CONVERTERS
// Class ID for our UnicodeToGB2312GL charset converter
// {BA615196-1DFA-11d3-B3BF-00805F8A6670}
#define NS_UNICODETOGB2312GL_CID \
{ 0xba615196, 0x1dfa, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
#endif
// Class ID for our UnicodeToGBK charset converter
// {BA61519B-1DFA-11d3-B3BF-00805F8A6670}
@ -107,6 +109,7 @@
#define NS_UNICODETOGB18030_CID \
{ 0xa59da932, 0x4091, 0x11d5, { 0xa1, 0x45, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
#ifdef MOZ_EXTRA_X11CONVERTERS
// Class ID for our UnicodeToGB18030Font0 charset converter
// {A59DA933-4091-11d5-A145-005004832142}
#define NS_UNICODETOGB18030Font0_CID \
@ -116,6 +119,7 @@
// {A59DA934-4091-11d5-A145-005004832142}
#define NS_UNICODETOGB18030Font1_CID \
{ 0xa59da934, 0x4091, 0x11d5, { 0xa1, 0x45, 0x0, 0x50, 0x4, 0x83, 0x21, 0x42 } }
#endif
// Class ID for our GBKToUnicode charset converter
// {A59DA935-4091-11d5-A145-005004832142}

Просмотреть файл

@ -147,6 +147,8 @@ PRBool nsUnicodeToGB18030::EncodeSurrogate(
}
return PR_FALSE;
}
#ifdef MOZ_EXTRA_X11CONVERTERS
//-----------------------------------------------------------------------
// nsUnicodeToGB18030Font0
//-----------------------------------------------------------------------
@ -319,6 +321,7 @@ NS_IMETHODIMP nsUnicodeToGB18030Font1::FillInfo(PRUint32 *aInfo)
// end of Arabic script
return res;
}
#endif
//----------------------------------------------------------------------
// Class nsUnicodeToGBK [implementation]

Просмотреть файл

@ -105,6 +105,7 @@ protected:
virtual PRBool EncodeSurrogate(PRUnichar aSurrogateHigh, PRUnichar aSurrogateLow, char* aDest);
};
#ifdef MOZ_EXTRA_X11CONVERTERS
class nsUnicodeToGB18030Font0: public nsUnicodeToGB18030
{
public:
@ -124,6 +125,7 @@ public:
protected:
NS_IMETHOD FillInfo(PRUint32 *aInfo);
};
#endif
#endif /* nsUnicodeToGBK_h___ */

Просмотреть файл

@ -39,6 +39,10 @@ REQUIRES = xpcom \
CPPSRCS = \
nsEUCTWToUnicode.cpp \
nsUnicodeToEUCTW.cpp \
$(NULL)
ifdef MOZ_EXTRA_X11CONVERTERS
CPPSRCS += \
nsUnicodeToCNS11643p1.cpp \
nsUnicodeToCNS11643p2.cpp \
nsUnicodeToCNS11643p3.cpp \
@ -47,6 +51,7 @@ CPPSRCS = \
nsUnicodeToCNS11643p6.cpp \
nsUnicodeToCNS11643p7.cpp \
$(NULL)
endif
#SHARED_LIBRARY_LIBS = $(DIST)/lib/$(LIB_PREFIX)ucvutil_s.$(LIB_SUFFIX)

Просмотреть файл

@ -52,6 +52,7 @@
{ 0x379c2776, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
#ifdef MOZ_EXTRA_X11CONVERTERS
// Class ID for our UnicodeToCNS11643p1 charset converter
// {BA615197-1DFA-11d3-B3BF-00805F8A6670}
#define NS_UNICODETOCNS11643P1_CID \
@ -81,5 +82,6 @@
// Class ID for our UnicodeToCNS11643p7 charset converter
#define NS_UNICODETOCNS11643P7_CID \
{ 0x9416bfb9, 0x1f93, 0x11d3, {0xb3, 0xbf, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
#endif
#endif /* nsUCvTW2CID_h___ */