summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
commitbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (patch)
tree4cfbe682869d89900f33751c37f6a84865beeb0a /xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
parentb116136da234afcad018bb44a3ccb64b9ad2a554 (diff)
downloadpdfium-bfa9a824a20f37c2dd7111012b46c929cf2ed8a0.tar.xz
Merge to XFA: Use stdint.h types throughout PDFium.
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
Diffstat (limited to 'xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
index d896cf6445..7a68fcaef6 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
@@ -34,11 +34,11 @@ CBC_Base256Encoder::CBC_Base256Encoder()
CBC_Base256Encoder::~CBC_Base256Encoder()
{
}
-FX_INT32 CBC_Base256Encoder::getEncodingMode()
+int32_t CBC_Base256Encoder::getEncodingMode()
{
return BASE256_ENCODATION;
}
-void CBC_Base256Encoder::Encode(CBC_EncoderContext &context, FX_INT32 &e)
+void CBC_Base256Encoder::Encode(CBC_EncoderContext &context, int32_t &e)
{
CFX_WideString buffer;
buffer += (FX_WCHAR)'\0';
@@ -46,13 +46,13 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext &context, FX_INT32 &e)
FX_WCHAR c = context.getCurrentChar();
buffer += c;
context.m_pos++;
- FX_INT32 newMode = CBC_HighLevelEncoder::lookAheadTest(context.m_msg, context.m_pos, getEncodingMode());
+ int32_t newMode = CBC_HighLevelEncoder::lookAheadTest(context.m_msg, context.m_pos, getEncodingMode());
if (newMode != getEncodingMode()) {
context.signalEncoderChange(newMode);
break;
}
}
- FX_INT32 dataCount = buffer.GetLength() - 1;
+ int32_t dataCount = buffer.GetLength() - 1;
FX_CHAR buf[128];
#if defined(_FX_WINAPI_PARTITION_APP_)
memset(buf, 0, sizeof(FX_CHAR) * 128);
@@ -61,8 +61,8 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext &context, FX_INT32 &e)
FXSYS_itoa(dataCount, buf, 10);
#endif
buffer.SetAt(0, FX_WCHAR(*buf) - '0');
- FX_INT32 lengthFieldSize = 1;
- FX_INT32 currentSize = context.getCodewordCount() + dataCount + lengthFieldSize;
+ int32_t lengthFieldSize = 1;
+ int32_t currentSize = context.getCodewordCount() + dataCount + lengthFieldSize;
context.updateSymbolInfo(currentSize, e);
if (e != BCExceptionNO) {
return;
@@ -79,14 +79,14 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext &context, FX_INT32 &e)
return;
}
}
- for (FX_INT32 i = 0, c = buffer.GetLength(); i < c; i++) {
+ for (int32_t i = 0, c = buffer.GetLength(); i < c; i++) {
context.writeCodeword(randomize255State(buffer.GetAt(i), context.getCodewordCount() + 1));
}
}
-FX_WCHAR CBC_Base256Encoder::randomize255State(FX_WCHAR ch, FX_INT32 codewordPosition)
+FX_WCHAR CBC_Base256Encoder::randomize255State(FX_WCHAR ch, int32_t codewordPosition)
{
- FX_INT32 pseudoRandom = ((149 * codewordPosition) % 255) + 1;
- FX_INT32 tempVariable = ch + pseudoRandom;
+ int32_t pseudoRandom = ((149 * codewordPosition) % 255) + 1;
+ int32_t tempVariable = ch + pseudoRandom;
if (tempVariable <= 255) {
return (FX_WCHAR) tempVariable;
} else {