[ENHANCEMENT] Make files in uchardet folder conform with compiling warning level 4.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1197 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-03-08 22:11:15 +00:00
parent 11847747b5
commit ffccd13944
12 changed files with 714 additions and 778 deletions

View File

@ -226,20 +226,18 @@ static const PRUint8 BulgarianLangModel[] =
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,1, 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,1,
}; };
const SequenceModel Latin5BulgarianModel = const SequenceModel Latin5BulgarianModel(
{
Latin5_BulgarianCharToOrderMap, Latin5_BulgarianCharToOrderMap,
BulgarianLangModel, BulgarianLangModel,
(float)0.969392, (float)0.969392,
PR_FALSE, PR_FALSE,
"ISO-8859-5" "ISO-8859-5"
}; );
const SequenceModel Win1251BulgarianModel = const SequenceModel Win1251BulgarianModel(
{
win1251BulgarianCharToOrderMap, win1251BulgarianCharToOrderMap,
BulgarianLangModel, BulgarianLangModel,
(float)0.969392, (float)0.969392,
PR_FALSE, PR_FALSE,
"windows-1251" "windows-1251"
}; );

View File

@ -300,56 +300,50 @@ static const PRUint8 RussianLangModel[] =
}; };
const SequenceModel Koi8rModel = const SequenceModel Koi8rModel(
{
KOI8R_CharToOrderMap, KOI8R_CharToOrderMap,
RussianLangModel, RussianLangModel,
(float)0.976601, (float)0.976601,
PR_FALSE, PR_FALSE,
"KOI8-R" "KOI8-R"
}; );
const SequenceModel Win1251Model = const SequenceModel Win1251Model(
{
win1251_CharToOrderMap, win1251_CharToOrderMap,
RussianLangModel, RussianLangModel,
(float)0.976601, (float)0.976601,
PR_FALSE, PR_FALSE,
"windows-1251" "windows-1251"
}; );
const SequenceModel Latin5Model = const SequenceModel Latin5Model(
{
latin5_CharToOrderMap, latin5_CharToOrderMap,
RussianLangModel, RussianLangModel,
(float)0.976601, (float)0.976601,
PR_FALSE, PR_FALSE,
"ISO-8859-5" "ISO-8859-5"
}; );
const SequenceModel MacCyrillicModel = const SequenceModel MacCyrillicModel(
{
macCyrillic_CharToOrderMap, macCyrillic_CharToOrderMap,
RussianLangModel, RussianLangModel,
(float)0.976601, (float)0.976601,
PR_FALSE, PR_FALSE,
"x-mac-cyrillic" "x-mac-cyrillic"
}; );
const SequenceModel Ibm866Model = const SequenceModel Ibm866Model(
{
IBM866_CharToOrderMap, IBM866_CharToOrderMap,
RussianLangModel, RussianLangModel,
(float)0.976601, (float)0.976601,
PR_FALSE, PR_FALSE,
"IBM866" "IBM866"
}; );
const SequenceModel Ibm855Model = const SequenceModel Ibm855Model(
{
IBM855_CharToOrderMap, IBM855_CharToOrderMap,
RussianLangModel, RussianLangModel,
(float)0.976601, (float)0.976601,
PR_FALSE, PR_FALSE,
"IBM855" "IBM855"
}; );

View File

@ -225,20 +225,18 @@ static const PRUint8 GreekLangModel[] =
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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}; };
const SequenceModel Latin7Model = const SequenceModel Latin7Model (
{
Latin7_CharToOrderMap, Latin7_CharToOrderMap,
GreekLangModel, GreekLangModel,
(float)0.982851, (float)0.982851,
PR_FALSE, PR_FALSE,
"ISO-8859-7" "ISO-8859-7"
}; );
const SequenceModel Win1253Model = const SequenceModel Win1253Model(
{
win1253_CharToOrderMap, win1253_CharToOrderMap,
GreekLangModel, GreekLangModel,
(float)0.982851, (float)0.982851,
PR_FALSE, PR_FALSE,
"windows-1253" "windows-1253"
}; );

View File

@ -208,12 +208,10 @@ static const PRUint8 HebrewLangModel[] =
0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0, 0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0,
}; };
const SequenceModel Win1255Model = const SequenceModel Win1255Model(
{
win1255_CharToOrderMap, win1255_CharToOrderMap,
HebrewLangModel, HebrewLangModel,
(float)0.984004, (float)0.984004,
PR_FALSE, PR_FALSE,
"windows-1255" "windows-1255");
};

View File

@ -223,20 +223,16 @@ static const PRUint8 HungarianLangModel[] =
0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0, 0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
}; };
const SequenceModel Latin2HungarianModel = const SequenceModel Latin2HungarianModel(
{
Latin2_HungarianCharToOrderMap, Latin2_HungarianCharToOrderMap,
HungarianLangModel, HungarianLangModel,
(float)0.947368, (float)0.947368,
PR_TRUE, PR_TRUE,
"ISO-8859-2" "ISO-8859-2");
};
const SequenceModel Win1250HungarianModel = const SequenceModel Win1250HungarianModel(
{
win1250HungarianCharToOrderMap, win1250HungarianCharToOrderMap,
HungarianLangModel, HungarianLangModel,
(float)0.947368, (float)0.947368,
PR_TRUE, PR_TRUE,
"windows-1250" "windows-1250");
};

View File

@ -211,11 +211,10 @@ static const PRUint8 ThaiLangModel[] =
}; };
const SequenceModel TIS620ThaiModel = const SequenceModel TIS620ThaiModel(
{
TIS620CharToOrderMap, TIS620CharToOrderMap,
ThaiLangModel, ThaiLangModel,
(float)0.926386, (float)0.926386,
PR_FALSE, PR_FALSE,
"TIS-620" "TIS-620"
}; );

View File

@ -48,14 +48,17 @@ typedef enum {
#define GETCLASS(c) GETFROMPCK(((unsigned char)(c)), mModel->classTable) #define GETCLASS(c) GETFROMPCK(((unsigned char)(c)), mModel->classTable)
//state machine model //state machine model
typedef struct struct SMModel
{ {
nsPkgInt classTable; nsPkgInt classTable;
PRUint32 classFactor; PRUint32 classFactor;
nsPkgInt stateTable; nsPkgInt stateTable;
const PRUint32* charLenTable; const PRUint32* charLenTable;
const char* name; const char* name;
} SMModel; SMModel(){};
SMModel(nsPkgInt a,PRUint32 b,nsPkgInt c,const PRUint32* d, const char* e):
classTable(a), classFactor(b), stateTable(c), charLenTable(d), name(e){};
} ;
class nsCodingStateMachine { class nsCodingStateMachine {
public: public:

View File

@ -83,13 +83,12 @@ PCK4BITS( 4,eItsMe,eStart,eStart,eStart,eStart,eStart,eStart) //28-2f
static const PRUint32 HZCharLenTable[] = {0, 0, 0, 0, 0, 0}; static const PRUint32 HZCharLenTable[] = {0, 0, 0, 0, 0, 0};
const SMModel HZSMModel = { const SMModel HZSMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, HZ_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, HZ_cls),
6, 6,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, HZ_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, HZ_st),
HZCharLenTable, HZCharLenTable,
"HZ-GB-2312", "HZ-GB-2312");
};
static const PRUint32 ISO2022CN_cls [ 256 / 8 ] = { static const PRUint32 ISO2022CN_cls [ 256 / 8 ] = {
@ -141,13 +140,12 @@ PCK4BITS(eError,eError,eError,eError,eError,eItsMe,eError,eStart) //38-3f
static const PRUint32 ISO2022CNCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; static const PRUint32 ISO2022CNCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
const SMModel ISO2022CNSMModel = { const SMModel ISO2022CNSMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022CN_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022CN_cls),
9, 9,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022CN_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022CN_st),
ISO2022CNCharLenTable, ISO2022CNCharLenTable,
"ISO-2022-CN", "ISO-2022-CN");
};
static const PRUint32 ISO2022JP_cls [ 256 / 8 ] = { static const PRUint32 ISO2022JP_cls [ 256 / 8 ] = {
PCK4BITS(2,0,0,0,0,0,0,0), // 00 - 07 PCK4BITS(2,0,0,0,0,0,0,0), // 00 - 07
@ -199,13 +197,12 @@ PCK4BITS(eError,eError,eError,eError,eItsMe,eError,eStart,eStart) //40-47
static const PRUint32 ISO2022JPCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0}; static const PRUint32 ISO2022JPCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0};
const SMModel ISO2022JPSMModel = { const SMModel ISO2022JPSMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_cls),
10, 10,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_st),
ISO2022JPCharLenTable, ISO2022JPCharLenTable,
"ISO-2022-JP", "ISO-2022-JP");
};
static const PRUint32 ISO2022KR_cls [ 256 / 8 ] = { static const PRUint32 ISO2022KR_cls [ 256 / 8 ] = {
PCK4BITS(2,0,0,0,0,0,0,0), // 00 - 07 PCK4BITS(2,0,0,0,0,0,0,0), // 00 - 07
@ -253,11 +250,10 @@ PCK4BITS(eError,eError,eError,eItsMe,eStart,eStart,eStart,eStart) //20-27
static const PRUint32 ISO2022KRCharLenTable[] = {0, 0, 0, 0, 0, 0}; static const PRUint32 ISO2022KRCharLenTable[] = {0, 0, 0, 0, 0, 0};
const SMModel ISO2022KRSMModel = { const SMModel ISO2022KRSMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022KR_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022KR_cls),
6, 6,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022KR_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022KR_st),
ISO2022KRCharLenTable, ISO2022KRCharLenTable,
"ISO-2022-KR", "ISO-2022-KR");
};

View File

@ -89,13 +89,12 @@ PCK4BITS(eError,eStart,eStart,eStart,eStart,eStart,eStart,eStart) //10-17
static const PRUint32 Big5CharLenTable[] = {0, 1, 1, 2, 0}; static const PRUint32 Big5CharLenTable[] = {0, 1, 1, 2, 0};
SMModel const Big5SMModel = { const SMModel Big5SMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, BIG5_cls }, nsPkgInt( eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, BIG5_cls ),
5, 5,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, BIG5_st }, nsPkgInt( eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, BIG5_st ),
Big5CharLenTable, Big5CharLenTable,
"Big5", "Big5");
};
static const PRUint32 EUCJP_cls [ 256 / 8 ] = { static const PRUint32 EUCJP_cls [ 256 / 8 ] = {
//PCK4BITS(5,4,4,4,4,4,4,4), // 00 - 07 //PCK4BITS(5,4,4,4,4,4,4,4), // 00 - 07
@ -144,13 +143,12 @@ PCK4BITS( 3,eError,eError,eError,eStart,eStart,eStart,eStart) //20-27
static const PRUint32 EUCJPCharLenTable[] = {2, 2, 2, 3, 1, 0}; static const PRUint32 EUCJPCharLenTable[] = {2, 2, 2, 3, 1, 0};
const SMModel EUCJPSMModel = { const SMModel EUCJPSMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCJP_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCJP_cls),
6, 6,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCJP_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCJP_st),
EUCJPCharLenTable, EUCJPCharLenTable,
"EUC-JP", "EUC-JP");
};
static const PRUint32 EUCKR_cls [ 256 / 8 ] = { static const PRUint32 EUCKR_cls [ 256 / 8 ] = {
//PCK4BITS(0,1,1,1,1,1,1,1), // 00 - 07 //PCK4BITS(0,1,1,1,1,1,1,1), // 00 - 07
@ -196,13 +194,12 @@ PCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,eStart) //08-0f
static const PRUint32 EUCKRCharLenTable[] = {0, 1, 2, 0}; static const PRUint32 EUCKRCharLenTable[] = {0, 1, 2, 0};
const SMModel EUCKRSMModel = { const SMModel EUCKRSMModel (
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCKR_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCKR_cls),
4, 4,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCKR_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCKR_st),
EUCKRCharLenTable, EUCKRCharLenTable,
"EUC-KR", "EUC-KR");
};
static const PRUint32 EUCTW_cls [ 256 / 8 ] = { static const PRUint32 EUCTW_cls [ 256 / 8 ] = {
//PCK4BITS(0,2,2,2,2,2,2,2), // 00 - 07 //PCK4BITS(0,2,2,2,2,2,2,2), // 00 - 07
@ -252,13 +249,12 @@ PCK4BITS(eStart,eError,eStart,eStart,eStart,eStart,eStart,eStart) //28-2f
static const PRUint32 EUCTWCharLenTable[] = {0, 0, 1, 2, 2, 2, 3}; static const PRUint32 EUCTWCharLenTable[] = {0, 0, 1, 2, 2, 2, 3};
const SMModel EUCTWSMModel = { const SMModel EUCTWSMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCTW_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCTW_cls),
7, 7,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCTW_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, EUCTW_st),
EUCTWCharLenTable, EUCTWCharLenTable,
"x-euc-tw", "x-euc-tw");
};
/* obsolete GB2312 by gb18030 /* obsolete GB2312 by gb18030
static PRUint32 GB2312_cls [ 256 / 8 ] = { static PRUint32 GB2312_cls [ 256 / 8 ] = {
@ -368,13 +364,12 @@ PCK4BITS(eError,eError,eStart,eStart,eStart,eStart,eStart,eStart) //28-2f
// 2 here. // 2 here.
static const PRUint32 GB18030CharLenTable[] = {0, 1, 1, 1, 1, 1, 2}; static const PRUint32 GB18030CharLenTable[] = {0, 1, 1, 1, 1, 1, 2};
const SMModel GB18030SMModel = { const SMModel GB18030SMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB18030_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB18030_cls ),
7, 7,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB18030_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, GB18030_st ),
GB18030CharLenTable, GB18030CharLenTable,
"GB18030", "GB18030");
};
// sjis // sjis
@ -425,13 +420,12 @@ PCK4BITS(eItsMe,eItsMe,eError,eError,eStart,eStart,eStart,eStart) //10-17
static const PRUint32 SJISCharLenTable[] = {0, 1, 1, 2, 0, 0}; static const PRUint32 SJISCharLenTable[] = {0, 1, 1, 2, 0, 0};
const SMModel SJISSMModel = { const SMModel SJISSMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, SJIS_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, SJIS_cls),
6, 6,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, SJIS_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, SJIS_st),
SJISCharLenTable, SJISCharLenTable,
"Shift_JIS", "Shift_JIS");
};
static const PRUint32 UTF8_cls [ 256 / 8 ] = { static const PRUint32 UTF8_cls [ 256 / 8 ] = {
@ -503,11 +497,10 @@ PCK4BITS(eError,eError,eError,eError,eError,eError,eError,eError) //c8-cf
static const PRUint32 UTF8CharLenTable[] = {0, 1, 0, 0, 0, 0, 2, 3, static const PRUint32 UTF8CharLenTable[] = {0, 1, 0, 0, 0, 0, 2, 3,
3, 3, 4, 4, 5, 5, 6, 6 }; 3, 3, 4, 4, 5, 5, 6, 6 };
const SMModel UTF8SMModel = { const SMModel UTF8SMModel(
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, UTF8_cls }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, UTF8_cls),
16, 16,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, UTF8_st }, nsPkgInt(eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, UTF8_st),
UTF8CharLenTable, UTF8CharLenTable,
"UTF-8", "UTF-8");
};

View File

@ -63,13 +63,17 @@ typedef enum {
eUnitMsk16bits = 0x0000FFFFL eUnitMsk16bits = 0x0000FFFFL
} nsUnitMsk; } nsUnitMsk;
typedef struct nsPkgInt { struct nsPkgInt {
nsIdxSft idxsft; nsIdxSft idxsft;
nsSftMsk sftmsk; nsSftMsk sftmsk;
nsBitSft bitsft; nsBitSft bitsft;
nsUnitMsk unitmsk; nsUnitMsk unitmsk;
const PRUint32* const data; const PRUint32* const data;
} nsPkgInt; nsPkgInt(nsIdxSft a,nsSftMsk b, nsBitSft c,nsUnitMsk d,const PRUint32* const e)
:idxsft(a), sftmsk(b), bitsft(c), unitmsk(d), data(e){}
nsPkgInt();
nsPkgInt operator= (const nsPkgInt&);
};
#define PCK16BITS(a,b) ((PRUint32)(((b) << 16) | (a))) #define PCK16BITS(a,b) ((PRUint32)(((b) << 16) | (a)))

View File

@ -49,14 +49,18 @@
#define POSITIVE_CAT (NUMBER_OF_SEQ_CAT-1) #define POSITIVE_CAT (NUMBER_OF_SEQ_CAT-1)
#define NEGATIVE_CAT 0 #define NEGATIVE_CAT 0
typedef struct struct SequenceModel
{ {
const unsigned char* const charToOrderMap; // [256] table use to find a char's order const unsigned char* const charToOrderMap; // [256] table use to find a char's order
const PRUint8* const precedenceMatrix; // [SAMPLE_SIZE][SAMPLE_SIZE]; table to find a 2-char sequence's frequency const PRUint8* const precedenceMatrix; // [SAMPLE_SIZE][SAMPLE_SIZE]; table to find a 2-char sequence's frequency
float mTypicalPositiveRatio; // = freqSeqs / totalSeqs float mTypicalPositiveRatio; // = freqSeqs / totalSeqs
PRBool keepEnglishLetter; // says if this script contains English characters (not implemented) PRBool keepEnglishLetter; // says if this script contains English characters (not implemented)
const char* const charsetName; const char* const charsetName;
} SequenceModel; SequenceModel(void);
SequenceModel(const unsigned char* const a, const PRUint8* const b,float c,PRBool d,const char* const e)
: charToOrderMap(a), precedenceMatrix(b), mTypicalPositiveRatio(c), keepEnglishLetter(d), charsetName(e){}
SequenceModel& operator=(const SequenceModel&);
} ;
class nsSingleByteCharSetProber : public nsCharSetProber{ class nsSingleByteCharSetProber : public nsCharSetProber{
@ -65,7 +69,7 @@ public:
:mModel(model), mReversed(PR_FALSE), mNameProber(0) { Reset(); } :mModel(model), mReversed(PR_FALSE), mNameProber(0) { Reset(); }
nsSingleByteCharSetProber(const SequenceModel *model, PRBool reversed, nsCharSetProber* nameProber) nsSingleByteCharSetProber(const SequenceModel *model, PRBool reversed, nsCharSetProber* nameProber)
:mModel(model), mReversed(reversed), mNameProber(nameProber) { Reset(); } :mModel(model), mReversed(reversed), mNameProber(nameProber) { Reset(); }
nsSingleByteCharSetProber(): mModel(0), mReversed(0){};
virtual const char* GetCharSetName(); virtual const char* GetCharSetName();
virtual nsProbingState HandleData(const char* aBuf, PRUint32 aLen); virtual nsProbingState HandleData(const char* aBuf, PRUint32 aLen);
virtual nsProbingState GetState(void) {return mState;} virtual nsProbingState GetState(void) {return mState;}
@ -80,6 +84,7 @@ public:
// prober has a hard-coded call to FilterWithoutEnglishLetters which gets rid // prober has a hard-coded call to FilterWithoutEnglishLetters which gets rid
// of the English letters. // of the English letters.
PRBool KeepEnglishLetters() {return mModel->keepEnglishLetter;} // (not implemented) PRBool KeepEnglishLetters() {return mModel->keepEnglishLetter;} // (not implemented)
nsSingleByteCharSetProber operator=(const nsSingleByteCharSetProber&){};
#ifdef DEBUG_chardet #ifdef DEBUG_chardet
virtual void DumpStatus(); virtual void DumpStatus();

View File

@ -358,7 +358,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -367,7 +366,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -380,7 +378,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -389,7 +386,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -402,7 +398,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -411,7 +406,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -424,7 +418,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -433,7 +426,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -446,7 +438,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -455,7 +446,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -468,7 +458,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -477,7 +466,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -490,7 +478,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -499,7 +486,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -556,7 +542,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -565,7 +550,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -598,7 +582,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -607,7 +590,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -620,7 +602,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -629,7 +610,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -642,7 +622,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -651,7 +630,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -664,7 +642,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -673,7 +650,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -686,7 +662,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -695,7 +670,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -708,7 +682,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -717,7 +690,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -730,7 +702,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -739,7 +710,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -752,7 +722,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -761,7 +730,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -774,7 +742,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -783,7 +750,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -796,7 +762,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -805,7 +770,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -818,7 +782,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -827,7 +790,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -840,7 +802,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -849,7 +810,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -862,7 +822,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -871,7 +830,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -884,7 +842,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -893,7 +850,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -906,7 +862,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -915,7 +870,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@ -1068,7 +1022,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
@ -1077,7 +1030,6 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>