[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

@ -208,14 +208,13 @@ static const PRUint8 ThaiLangModel[] =
0,0,0,0,0,0,0,0,2,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,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}; };
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

@ -1,104 +1,107 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK ***** /* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
* *
* The contents of this file are subject to the Mozilla Public License Version * The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with * 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is mozilla.org code. * The Original Code is mozilla.org code.
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* Netscape Communications Corporation. * Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998 * Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead * in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only * of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to * under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your * use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice * decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete * and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under * the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL. * the terms of any one of the MPL, the GPL or the LGPL.
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#ifndef nsCodingStateMachine_h__ #ifndef nsCodingStateMachine_h__
#define nsCodingStateMachine_h__ #define nsCodingStateMachine_h__
#include "nsPkgInt.h" #include "nsPkgInt.h"
typedef enum { typedef enum {
eStart = 0, eStart = 0,
eError = 1, eError = 1,
eItsMe = 2 eItsMe = 2
} nsSMState; } nsSMState;
#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):
class nsCodingStateMachine { classTable(a), classFactor(b), stateTable(c), charLenTable(d), name(e){};
public: } ;
nsCodingStateMachine(const SMModel* sm) : mModel(sm) { mCurrentState = eStart; }
nsSMState NextState(char c){ class nsCodingStateMachine {
//for each byte we get its class , if it is first byte, we also get byte length public:
PRUint32 byteCls = GETCLASS(c); nsCodingStateMachine(const SMModel* sm) : mModel(sm) { mCurrentState = eStart; }
if (mCurrentState == eStart) nsSMState NextState(char c){
{ //for each byte we get its class , if it is first byte, we also get byte length
mCurrentBytePos = 0; PRUint32 byteCls = GETCLASS(c);
mCurrentCharLen = mModel->charLenTable[byteCls]; if (mCurrentState == eStart)
} {
//from byte's class and stateTable, we get its next state mCurrentBytePos = 0;
mCurrentState=(nsSMState)GETFROMPCK(mCurrentState*(mModel->classFactor)+byteCls, mCurrentCharLen = mModel->charLenTable[byteCls];
mModel->stateTable); }
mCurrentBytePos++; //from byte's class and stateTable, we get its next state
return mCurrentState; mCurrentState=(nsSMState)GETFROMPCK(mCurrentState*(mModel->classFactor)+byteCls,
} mModel->stateTable);
PRUint32 GetCurrentCharLen(void) {return mCurrentCharLen;} mCurrentBytePos++;
void Reset(void) {mCurrentState = eStart;} return mCurrentState;
const char * GetCodingStateMachine() {return mModel->name;} }
PRUint32 GetCurrentCharLen(void) {return mCurrentCharLen;}
protected: void Reset(void) {mCurrentState = eStart;}
nsSMState mCurrentState; const char * GetCodingStateMachine() {return mModel->name;}
PRUint32 mCurrentCharLen;
PRUint32 mCurrentBytePos; protected:
nsSMState mCurrentState;
const SMModel *mModel; PRUint32 mCurrentCharLen;
}; PRUint32 mCurrentBytePos;
extern const SMModel UTF8SMModel; const SMModel *mModel;
extern const SMModel Big5SMModel; };
extern const SMModel EUCJPSMModel;
extern const SMModel EUCKRSMModel; extern const SMModel UTF8SMModel;
extern const SMModel EUCTWSMModel; extern const SMModel Big5SMModel;
extern const SMModel GB18030SMModel; extern const SMModel EUCJPSMModel;
extern const SMModel SJISSMModel; extern const SMModel EUCKRSMModel;
extern const SMModel EUCTWSMModel;
extern const SMModel GB18030SMModel;
extern const SMModel HZSMModel; extern const SMModel SJISSMModel;
extern const SMModel ISO2022CNSMModel;
extern const SMModel ISO2022JPSMModel;
extern const SMModel ISO2022KRSMModel; extern const SMModel HZSMModel;
extern const SMModel ISO2022CNSMModel;
#endif /* nsCodingStateMachine_h__ */ extern const SMModel ISO2022JPSMModel;
extern const SMModel ISO2022KRSMModel;
#endif /* nsCodingStateMachine_h__ */

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");
};

File diff suppressed because it is too large Load Diff

View File

@ -60,19 +60,23 @@ typedef enum {
typedef enum { typedef enum {
eUnitMsk4bits = 0x0000000FL, eUnitMsk4bits = 0x0000000FL,
eUnitMsk8bits = 0x000000FFL, eUnitMsk8bits = 0x000000FFL,
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();
#define PCK16BITS(a,b) ((PRUint32)(((b) << 16) | (a))) nsPkgInt operator= (const nsPkgInt&);
};
#define PCK16BITS(a,b) ((PRUint32)(((b) << 16) | (a)))
#define PCK8BITS(a,b,c,d) PCK16BITS( ((PRUint32)(((b) << 8) | (a))), \ #define PCK8BITS(a,b,c,d) PCK16BITS( ((PRUint32)(((b) << 8) | (a))), \
((PRUint32)(((d) << 8) | (c)))) ((PRUint32)(((d) << 8) | (c))))

View File

@ -46,29 +46,33 @@
#define NEGATIVE_SHORTCUT_THRESHOLD (float)0.05 #define NEGATIVE_SHORTCUT_THRESHOLD (float)0.05
#define SYMBOL_CAT_ORDER 250 #define SYMBOL_CAT_ORDER 250
#define NUMBER_OF_SEQ_CAT 4 #define NUMBER_OF_SEQ_CAT 4
#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){}
class nsSingleByteCharSetProber : public nsCharSetProber{ SequenceModel& operator=(const SequenceModel&);
} ;
class nsSingleByteCharSetProber : public nsCharSetProber{
public: public:
nsSingleByteCharSetProber(const SequenceModel *model) nsSingleByteCharSetProber(const SequenceModel *model)
: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;}
virtual void Reset(void); virtual void Reset(void);
virtual float GetConfidence(void); virtual float GetConfidence(void);
virtual void SetOpion() {} virtual void SetOpion() {}
@ -77,12 +81,13 @@ public:
// contain this parameter as PR_FALSE. No one is looking at this // contain this parameter as PR_FALSE. No one is looking at this
// parameter or calling this method. // parameter or calling this method.
// Moreover, the nsSBCSGroupProber which calls the HandleData of this // Moreover, the nsSBCSGroupProber which calls the HandleData of this
// 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
virtual void DumpStatus(); #ifdef DEBUG_chardet
virtual void DumpStatus();
#endif #endif
protected: protected:

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>