| OLD | NEW | 
|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 
| 6 | 6 | 
| 7 #include <stdlib.h> | 7 #include <stdlib.h> | 
| 8 #include "barcode.h" | 8 #include "barcode.h" | 
| 9 #include "include/BC_DecoderResult.h" | 9 #include "include/BC_DecoderResult.h" | 
| 10 #include "include/BC_PDF417ResultMetadata.h" | 10 #include "include/BC_PDF417ResultMetadata.h" | 
| 11 #include "include/BC_CommonDecoderResult.h" | 11 #include "include/BC_CommonDecoderResult.h" | 
| 12 #include "include/BC_PDF417DecodedBitStreamParser.h" | 12 #include "include/BC_PDF417DecodedBitStreamParser.h" | 
|  | 13 #include "../../../../third_party/bigint/BigIntegerLibrary.hh" | 
| 13 #define    TEXT_COMPACTION_MODE_LATCH            900 | 14 #define    TEXT_COMPACTION_MODE_LATCH            900 | 
| 14 #define    BYTE_COMPACTION_MODE_LATCH            901 | 15 #define    BYTE_COMPACTION_MODE_LATCH            901 | 
| 15 #define    NUMERIC_COMPACTION_MODE_LATCH         902 | 16 #define    NUMERIC_COMPACTION_MODE_LATCH         902 | 
| 16 #define    BYTE_COMPACTION_MODE_LATCH_6          924 | 17 #define    BYTE_COMPACTION_MODE_LATCH_6          924 | 
| 17 #define    BEGIN_MACRO_PDF417_CONTROL_BLOCK      928 | 18 #define    BEGIN_MACRO_PDF417_CONTROL_BLOCK      928 | 
| 18 #define    BEGIN_MACRO_PDF417_OPTIONAL_FIELD     923 | 19 #define    BEGIN_MACRO_PDF417_OPTIONAL_FIELD     923 | 
| 19 #define    MACRO_PDF417_TERMINATOR               922 | 20 #define    MACRO_PDF417_TERMINATOR               922 | 
| 20 #define    MODE_SHIFT_TO_BYTE_COMPACTION_MODE    913 | 21 #define    MODE_SHIFT_TO_BYTE_COMPACTION_MODE    913 | 
| 21 | 22 | 
| 22 FX_INT32 CBC_DecodedBitStreamPaser::MAX_NUMERIC_CODEWORDS = 15; | 23 FX_INT32 CBC_DecodedBitStreamPaser::MAX_NUMERIC_CODEWORDS = 15; | 
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 459     for (FX_INT32 i = 0; i < count; i++) { | 460     for (FX_INT32 i = 0; i < count; i++) { | 
| 460         result = result * nineHundred + BigInteger(codewords[i]); | 461         result = result * nineHundred + BigInteger(codewords[i]); | 
| 461     } | 462     } | 
| 462     CFX_ByteString resultString(bigIntegerToString(result).c_str()); | 463     CFX_ByteString resultString(bigIntegerToString(result).c_str()); | 
| 463     if (resultString.GetAt(0) != '1') { | 464     if (resultString.GetAt(0) != '1') { | 
| 464         e =  BCExceptionFormatInstance; | 465         e =  BCExceptionFormatInstance; | 
| 465         return ' '; | 466         return ' '; | 
| 466     } | 467     } | 
| 467     return resultString.Mid(1, resultString.GetLength() - 1); | 468     return resultString.Mid(1, resultString.GetLength() - 1); | 
| 468 } | 469 } | 
| OLD | NEW | 
|---|