src: build new charset prober for Johab Korean.

CMake build was not completed and enum state nsSMState disappeared in
commit 53f7ad0.
Also fixing a few coding style bugs.

See discussion in MR !1.
This commit is contained in:
Jehan 2021-03-14 12:59:25 +01:00
parent 417013219c
commit b1f6c88792
6 changed files with 8 additions and 6 deletions

View File

@ -45,6 +45,7 @@ set(
nsEscCharsetProber.cpp nsEscCharsetProber.cpp
nsEscSM.cpp nsEscSM.cpp
nsGB2312Prober.cpp nsGB2312Prober.cpp
nsJohabProber.cpp
nsMBCSGroupProber.cpp nsMBCSGroupProber.cpp
nsMBCSSM.cpp nsMBCSSM.cpp
nsSBCSGroupProber.cpp nsSBCSGroupProber.cpp

View File

@ -47,7 +47,7 @@ void nsJohabProber::Reset(void)
nsProbingState nsJohabProber::HandleData(const char* aBuf, PRUint32 aLen) nsProbingState nsJohabProber::HandleData(const char* aBuf, PRUint32 aLen)
{ {
nsSMState codingState; PRUint32 codingState;
for (PRUint32 i = 0; i < aLen; i++) for (PRUint32 i = 0; i < aLen; i++)
{ {

View File

@ -74,7 +74,8 @@ nsMBCSGroupProber::nsMBCSGroupProber(PRUint32 aLanguageFilter)
} }
if (aLanguageFilter & NS_FILTER_CHINESE_SIMPLIFIED) if (aLanguageFilter & NS_FILTER_CHINESE_SIMPLIFIED)
mProbers[3] = new nsGB18030Prober(aLanguageFilter == NS_FILTER_CHINESE_SIMPLIFIED); mProbers[3] = new nsGB18030Prober(aLanguageFilter == NS_FILTER_CHINESE_SIMPLIFIED);
if (aLanguageFilter & NS_FILTER_KOREAN) { if (aLanguageFilter & NS_FILTER_KOREAN)
{
mProbers[4] = new nsEUCKRProber(aLanguageFilter == NS_FILTER_KOREAN); mProbers[4] = new nsEUCKRProber(aLanguageFilter == NS_FILTER_KOREAN);
mProbers[7] = new nsJohabProber(aLanguageFilter == NS_FILTER_KOREAN); mProbers[7] = new nsJohabProber(aLanguageFilter == NS_FILTER_KOREAN);
} }