summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxbarcode')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp5
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp27
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp4
3 files changed, 8 insertions, 28 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
index 61cacc1612..c719fb9e4f 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_Base256Encoder.cpp
@@ -49,12 +49,7 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
}
int32_t dataCount = buffer.GetLength() - 1;
FX_CHAR buf[128];
-#if defined(_FX_WINAPI_PARTITION_APP_)
- memset(buf, 0, sizeof(FX_CHAR) * 128);
- _itoa_s(dataCount, buf, 128, 10);
-#else
FXSYS_itoa(dataCount, buf, 10);
-#endif
buffer.SetAt(0, FX_WCHAR(*buf) - '0');
int32_t lengthFieldSize = 1;
int32_t currentSize =
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
index 79e47177a6..f378fff05d 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
@@ -121,12 +121,7 @@ int32_t CBC_DataMatrixDecodedBitStreamParser::DecodeAsciiSegment(
return PAD_ENCODE;
} else if (oneByte <= 229) {
int32_t value = oneByte - 130;
-#if defined(_FX_WINAPI_PARTITION_APP_)
- memset(buffer, 0, sizeof(FX_CHAR) * 128);
- _itoa_s(value, buffer, 128, 10);
-#else
FXSYS_itoa(value, buffer, 10);
-#endif
if (value < 10) {
result += '0';
buffer[1] = '\0';
@@ -401,6 +396,7 @@ void CBC_DataMatrixDecodedBitStreamParser::ParseTwoBytes(
result[1] = temp;
result[2] = fullBitValue - temp * 40;
}
+
void CBC_DataMatrixDecodedBitStreamParser::DecodeEdifactSegment(
CBC_CommonBitSource* bits,
CFX_ByteString& result,
@@ -408,31 +404,24 @@ void CBC_DataMatrixDecodedBitStreamParser::DecodeEdifactSegment(
FX_CHAR buffer[128];
FX_BOOL unlatch = FALSE;
do {
- if (bits->Available() <= 16) {
+ if (bits->Available() <= 16)
return;
- }
- int32_t i;
- for (i = 0; i < 4; i++) {
+
+ for (int32_t i = 0; i < 4; i++) {
int32_t edifactValue = bits->ReadBits(6, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- if (edifactValue == 0x1F) {
+ if (edifactValue == 0x1F)
unlatch = TRUE;
- }
+
if (!unlatch) {
- if ((edifactValue & 32) == 0) {
+ if ((edifactValue & 32) == 0)
edifactValue |= 64;
- }
-#if defined(_FX_WINAPI_PARTITION_APP_)
- memset(buffer, 0, sizeof(FX_CHAR) * 128);
- _itoa_s(edifactValue, buffer, 128, 10);
- result += buffer;
-#else
result += FXSYS_itoa(edifactValue, buffer, 10);
-#endif
}
}
} while (!unlatch && bits->Available() > 0);
}
+
void CBC_DataMatrixDecodedBitStreamParser::DecodeBase256Segment(
CBC_CommonBitSource* bits,
CFX_ByteString& result,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
index 582f93bc15..33be8c57d7 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
@@ -306,11 +306,7 @@ CFX_ByteString CBC_OnedCode128Reader::DecodeRow(int32_t rowNumber,
result += '0';
}
FX_CHAR temp[128];
-#if defined(_FX_WINAPI_PARTITION_APP_)
- sprintf_s(temp, 128, "%d", code);
-#else
sprintf(temp, "%d", code);
-#endif
result += temp;
} else {
if (code != CODE_STOP) {