summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-28 23:53:11 -0700
committerLei Zhang <thestig@chromium.org>2015-08-28 23:53:11 -0700
commitb995afd96136dffde9c44c2dcd81a7dad9711cf7 (patch)
tree9b8e7f58aca8224264ab66ea4942f3d89a327670 /core
parente78eafeabaf35e29a8cba12ac4dd05284d0b1cb2 (diff)
downloadpdfium-b995afd96136dffde9c44c2dcd81a7dad9711cf7.tar.xz
Merge to XFA: Replace signed char with int8_t. Fix Linux ARM build after r7830e9e.
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1321883002 . (cherry picked from commit 5e4a5cc9ad76dc08d62fb1e10bdfb811f3720c43) Review URL: https://codereview.chromium.org/1308163005 .
Diffstat (limited to 'core')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp30
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h12
2 files changed, 20 insertions, 22 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index 33b88bf2ba..a4100320cb 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -39,28 +39,27 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
return pImage;
}
if (GBTEMPLATE == 0) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1) &&
- (GBAT[2] == (signed char)-3) && (GBAT[3] == (signed char)-1) &&
- (GBAT[4] == 2) && (GBAT[5] == (signed char)-2) &&
- (GBAT[6] == (signed char)-2) && (GBAT[7] == (signed char)-2)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1) && (GBAT[2] == (int8_t)-3) &&
+ (GBAT[3] == (int8_t)-1) && (GBAT[4] == 2) && (GBAT[5] == (int8_t)-2) &&
+ (GBAT[6] == (int8_t)-2) && (GBAT[7] == (int8_t)-2)) {
return decode_Arith_Template0_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template0_unopt(pArithDecoder, gbContext);
}
} else if (GBTEMPLATE == 1) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1)) {
return decode_Arith_Template1_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template1_unopt(pArithDecoder, gbContext);
}
} else if (GBTEMPLATE == 2) {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
return decode_Arith_Template2_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template2_unopt(pArithDecoder, gbContext);
}
} else {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
return decode_Arith_Template3_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template3_unopt(pArithDecoder, gbContext);
@@ -1067,8 +1066,8 @@ CJBig2_Image* CJBig2_GRRDProc::decode(CJBig2_ArithDecoder* pArithDecoder,
return pImage;
}
if (GRTEMPLATE == 0) {
- if ((GRAT[0] == (signed char)-1) && (GRAT[1] == (signed char)-1) &&
- (GRAT[2] == (signed char)-1) && (GRAT[3] == (signed char)-1) &&
+ if ((GRAT[0] == (int8_t)-1) && (GRAT[1] == (int8_t)-1) &&
+ (GRAT[2] == (int8_t)-1) && (GRAT[3] == (int8_t)-1) &&
(GRREFERENCEDX == 0) && (GRW == (FX_DWORD)GRREFERENCE->m_nWidth)) {
return decode_Template0_opt(pArithDecoder, grContext);
} else {
@@ -3247,10 +3246,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
int iline = m_loopIndex;
CJBig2_Image* pImage = *m_pImage;
if (GBTEMPLATE == 0) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1) &&
- (GBAT[2] == (signed char)-3) && (GBAT[3] == (signed char)-1) &&
- (GBAT[4] == 2) && (GBAT[5] == (signed char)-2) &&
- (GBAT[6] == (signed char)-2) && (GBAT[7] == (signed char)-2)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1) && (GBAT[2] == (int8_t)-3) &&
+ (GBAT[3] == (int8_t)-1) && (GBAT[4] == 2) && (GBAT[5] == (int8_t)-2) &&
+ (GBAT[6] == (int8_t)-2) && (GBAT[7] == (int8_t)-2)) {
m_ProssiveStatus = decode_Arith_Template0_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {
@@ -3258,7 +3256,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
m_gbContext, pPause);
}
} else if (GBTEMPLATE == 1) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1)) {
m_ProssiveStatus = decode_Arith_Template1_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {
@@ -3266,7 +3264,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
m_gbContext, pPause);
}
} else if (GBTEMPLATE == 2) {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
m_ProssiveStatus = decode_Arith_Template2_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {
@@ -3274,7 +3272,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
m_gbContext, pPause);
}
} else {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
m_ProssiveStatus = decode_Arith_Template3_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
index 1b933d7443..0b087a0ec1 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
@@ -59,7 +59,7 @@ class CJBig2_GRDProc : public CJBig2_Object {
FX_BOOL TPGDON;
FX_BOOL USESKIP;
CJBig2_Image* SKIP;
- char GBAT[8];
+ int8_t GBAT[8];
private:
FXCODEC_STATUS decode_Arith(IFX_Pause* pPause);
@@ -183,7 +183,7 @@ class CJBig2_GRRDProc : public CJBig2_Object {
int32_t GRREFERENCEDX;
int32_t GRREFERENCEDY;
FX_BOOL TPGRON;
- signed char GRAT[4];
+ int8_t GRAT[4];
};
typedef struct {
@@ -220,11 +220,11 @@ class CJBig2_TRDProc : public CJBig2_Object {
FX_BOOL TRANSPOSED;
JBig2Corner REFCORNER;
- signed char SBDSOFFSET;
+ int8_t SBDSOFFSET;
CJBig2_HuffmanTable *SBHUFFFS, *SBHUFFDS, *SBHUFFDT, *SBHUFFRDW, *SBHUFFRDH,
*SBHUFFRDX, *SBHUFFRDY, *SBHUFFRSIZE;
FX_BOOL SBRTEMPLATE;
- signed char SBRAT[4];
+ int8_t SBRAT[4];
};
class CJBig2_SDDProc : public CJBig2_Object {
public:
@@ -246,9 +246,9 @@ class CJBig2_SDDProc : public CJBig2_Object {
FX_DWORD SDNUMEXSYMS;
CJBig2_HuffmanTable *SDHUFFDH, *SDHUFFDW, *SDHUFFBMSIZE, *SDHUFFAGGINST;
uint8_t SDTEMPLATE;
- signed char SDAT[8];
+ int8_t SDAT[8];
FX_BOOL SDRTEMPLATE;
- signed char SDRAT[4];
+ int8_t SDRAT[4];
};
class CJBig2_HTRDProc : public CJBig2_Object {
public: