summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 16:07:32 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 16:07:32 -0700
commit1f3442ce5c035d22e2cc9fffc203892f2f749373 (patch)
tree7c66063cf1e29cc48c81ca84e9d766a2e23f4b95 /core/src/fxcodec/jbig2
parent2f2ffece124e4ed4b96d2846263015d4b5ad6c00 (diff)
downloadpdfium-1f3442ce5c035d22e2cc9fffc203892f2f749373.tar.xz
Merge to XFA: FX_BOOL combo patch.
Original Review URL: https://codereview.chromium.org/1257503002 Original Review URL: https://codereview.chromium.org/1253603002 Manual merge for: core/include/fxge/fx_font.h core/src/fxcodec/codec/codec_int.h fpdfsdk/src/javascript/PublicMethods.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1248153004 .
Diffstat (limited to 'core/src/fxcodec/jbig2')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Context.cpp22
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp7
3 files changed, 19 insertions, 12 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp
index ed26ec6833..68c973547c 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp
@@ -873,7 +873,7 @@ failed:
return nRet;
}
-FX_BOOL CJBig2_Context::parseTextRegion(CJBig2_Segment *pSegment)
+int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment *pSegment)
{
FX_DWORD dwTemp;
FX_WORD wFlags;
@@ -1239,7 +1239,7 @@ failed:
return nRet;
}
-FX_BOOL CJBig2_Context::parsePatternDict(CJBig2_Segment *pSegment, IFX_Pause* pPause)
+int32_t CJBig2_Context::parsePatternDict(CJBig2_Segment *pSegment, IFX_Pause* pPause)
{
FX_DWORD dwTemp;
uint8_t cFlags;
@@ -1293,7 +1293,7 @@ failed:
delete pPDD;
return nRet;
}
-FX_BOOL CJBig2_Context::parseHalftoneRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause)
+int32_t CJBig2_Context::parseHalftoneRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause)
{
FX_DWORD dwTemp;
uint8_t cFlags;
@@ -1387,7 +1387,7 @@ failed:
return nRet;
}
-FX_BOOL CJBig2_Context::parseGenericRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause)
+int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment *pSegment, IFX_Pause* pPause)
{
FX_DWORD dwTemp;
uint8_t cFlags;
@@ -1504,7 +1504,7 @@ failed:
return nRet;
}
-FX_BOOL CJBig2_Context::parseGenericRefinementRegion(CJBig2_Segment *pSegment)
+int32_t CJBig2_Context::parseGenericRefinementRegion(CJBig2_Segment *pSegment)
{
FX_DWORD dwTemp;
JBig2RegionInfo ri;
@@ -1591,7 +1591,7 @@ failed:
delete pGRRD;
return nRet;
}
-FX_BOOL CJBig2_Context::parseTable(CJBig2_Segment *pSegment)
+int32_t CJBig2_Context::parseTable(CJBig2_Segment *pSegment)
{
pSegment->m_nResultType = JBIG2_HUFFMAN_TABLE_POINTER;
JBIG2_ALLOC(pSegment->m_Result.ht, CJBig2_HuffmanTable(m_pStream));
@@ -1618,9 +1618,15 @@ JBig2HuffmanCode *CJBig2_Context::decodeSymbolIDHuffmanTable(CJBig2_BitStream *p
FX_DWORD SBNUMSYMS)
{
JBig2HuffmanCode *SBSYMCODES;
- int32_t runcodes[35], runcodes_len[35], runcode;
- int32_t i, j, nTemp, nVal, nBits;
+ int32_t runcodes[35];
+ int32_t runcodes_len[35];
+ int32_t runcode;
+ int32_t i;
+ int32_t j;
+ int32_t nVal;
+ int32_t nBits;
int32_t run;
+ FX_DWORD nTemp;
SBSYMCODES = (JBig2HuffmanCode*)m_pModule->JBig2_Malloc2(sizeof(JBig2HuffmanCode), SBNUMSYMS);
for (i = 0; i < 35; i ++) {
if(pStream->readNBits(4, &runcodes_len[i]) != 0) {
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index 622f04b160..cabcd4c634 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -2101,7 +2101,7 @@ CJBig2_Image *CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder *pArithDecoder, J
CJBig2_Image *IBI;
FX_DWORD WI, HI;
int32_t IDS;
- FX_BOOL RI;
+ int RI;
int32_t RDWI, RDHI, RDXI, RDYI;
CJBig2_Image *IBOI;
FX_DWORD WOI, HOI;
diff --git a/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp
index dd820ae4ca..ef84547992 100644
--- a/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp
@@ -14,9 +14,10 @@ CJBig2_HuffmanDecoder::~CJBig2_HuffmanDecoder()
}
int CJBig2_HuffmanDecoder::decodeAValue(CJBig2_HuffmanTable *pTable, int *nResult)
{
- int nVal, nTmp, i, nBits;
- nVal = 0;
- nBits = 0;
+ int i;
+ int nVal = 0;
+ int nBits = 0;
+ FX_DWORD nTmp;
while(1) {
if(m_pStream->read1Bit(&nTmp) == -1) {
return -1;