Constify static vars in intl. Bug 207542, patch by ataylor@its.to (Andrew
Taylor), r=bzbarsky, sr=alecf
This commit is contained in:
Родитель
1bb105a48f
Коммит
6403264340
|
@ -40,7 +40,7 @@
|
|||
/* PLEASE DO NOT EDIT THIS FILE DIRECTLY. THIS FILE IS GENERATED BY
|
||||
GenCyrllicClass found in mozilla/intl/chardet/tools
|
||||
*/
|
||||
static PRUint8 KOI8Map [128] = {
|
||||
static const PRUint8 KOI8Map [128] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -50,7 +50,7 @@ static PRUint8 KOI8Map [128] = {
|
|||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
||||
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
||||
};
|
||||
static PRUint8 CP1251Map [128] = {
|
||||
static const PRUint8 CP1251Map [128] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -60,7 +60,7 @@ static PRUint8 CP1251Map [128] = {
|
|||
2, 3, 24, 8, 5, 6, 23, 27, 10, 11, 12, 13, 14, 15, 16, 17,
|
||||
19, 20, 21, 22, 7, 9, 4, 31, 28, 30, 32, 26, 25, 29, 1, 18,
|
||||
};
|
||||
static PRUint8 IBM866Map [128] = {
|
||||
static const PRUint8 IBM866Map [128] = {
|
||||
2, 3, 24, 8, 5, 6, 23, 27, 10, 11, 12, 13, 14, 15, 16, 17,
|
||||
19, 20, 21, 22, 7, 9, 4, 31, 28, 30, 32, 26, 25, 29, 1, 18,
|
||||
2, 3, 24, 8, 5, 6, 23, 27, 10, 11, 12, 13, 14, 15, 16, 17,
|
||||
|
@ -70,7 +70,7 @@ static PRUint8 IBM866Map [128] = {
|
|||
19, 20, 21, 22, 7, 9, 4, 31, 28, 30, 32, 26, 25, 29, 1, 18,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
static PRUint8 ISO88595Map [128] = {
|
||||
static const PRUint8 ISO88595Map [128] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -80,7 +80,7 @@ static PRUint8 ISO88595Map [128] = {
|
|||
19, 20, 21, 22, 7, 9, 4, 31, 28, 30, 32, 26, 25, 29, 1, 18,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
static PRUint8 MacCyrillicMap [128] = {
|
||||
static const PRUint8 MacCyrillicMap [128] = {
|
||||
2, 3, 24, 8, 5, 6, 23, 27, 10, 11, 12, 13, 14, 15, 16, 17,
|
||||
19, 20, 21, 22, 7, 9, 4, 31, 28, 30, 32, 26, 25, 29, 1, 18,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
|
|
@ -105,7 +105,7 @@ void nsCyrillicDetector::DataEnd()
|
|||
|
||||
//---------------------------------------------------------------------
|
||||
nsCyrXPCOMDetector:: nsCyrXPCOMDetector(PRUint8 aItems,
|
||||
PRUint8 ** aCyrillicClass,
|
||||
const PRUint8 ** aCyrillicClass,
|
||||
const char **aCharsets)
|
||||
: nsCyrillicDetector(aItems, aCyrillicClass, aCharsets)
|
||||
{
|
||||
|
@ -160,7 +160,7 @@ void nsCyrXPCOMDetector::Report(const char* aCharset)
|
|||
|
||||
//---------------------------------------------------------------------
|
||||
nsCyrXPCOMStringDetector:: nsCyrXPCOMStringDetector(PRUint8 aItems,
|
||||
PRUint8 ** aCyrillicClass,
|
||||
const PRUint8 ** aCyrillicClass,
|
||||
const char **aCharsets)
|
||||
: nsCyrillicDetector(aItems, aCyrillicClass, aCharsets)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
#define NS_UK_STRING_PROBDETECTOR_CID \
|
||||
{ 0x2002f784, 0x3960, 0x11d3, { 0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
|
||||
|
||||
static PRUint8 *gCyrillicCls[5] =
|
||||
static const PRUint8 *gCyrillicCls[5] =
|
||||
{
|
||||
CP1251Map,
|
||||
KOI8Map,
|
||||
|
@ -91,7 +91,7 @@ class nsCyrillicDetector
|
|||
{
|
||||
public:
|
||||
nsCyrillicDetector(PRUint8 aItems,
|
||||
PRUint8 ** aCyrillicClass,
|
||||
const PRUint8 ** aCyrillicClass,
|
||||
const char **aCharsets) {
|
||||
mItems = aItems;
|
||||
mCyrillicClass = aCyrillicClass;
|
||||
|
@ -109,7 +109,7 @@ class nsCyrillicDetector
|
|||
|
||||
private:
|
||||
PRUint8 mItems;
|
||||
PRUint8 ** mCyrillicClass;
|
||||
const PRUint8 ** mCyrillicClass;
|
||||
const char** mCharsets;
|
||||
PRUint32 mProb[NUM_CYR_CHARSET];
|
||||
PRUint8 mLastCls[NUM_CYR_CHARSET];
|
||||
|
@ -123,7 +123,7 @@ class nsCyrXPCOMDetector :
|
|||
// nsISupports interface
|
||||
NS_DECL_ISUPPORTS
|
||||
nsCyrXPCOMDetector(PRUint8 aItems,
|
||||
PRUint8 ** aCyrillicClass,
|
||||
const PRUint8 ** aCyrillicClass,
|
||||
const char **aCharsets);
|
||||
virtual ~nsCyrXPCOMDetector();
|
||||
NS_IMETHOD Init(nsICharsetDetectionObserver* aObserver);
|
||||
|
@ -143,7 +143,7 @@ class nsCyrXPCOMStringDetector :
|
|||
// nsISupports interface
|
||||
NS_DECL_ISUPPORTS
|
||||
nsCyrXPCOMStringDetector(PRUint8 aItems,
|
||||
PRUint8 ** aCyrillicClass,
|
||||
const PRUint8 ** aCyrillicClass,
|
||||
const char **aCharsets);
|
||||
virtual ~nsCyrXPCOMStringDetector();
|
||||
NS_IMETHOD DoIt(const char* aBuf, PRUint32 aLen,
|
||||
|
|
Загрузка…
Ссылка в новой задаче