mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 21:44:13 -04:00
Change PDF417TRUNC -> PDF417COMP and version 2.8 -> 2.9
This commit is contained in:
parent
0004cfb35a
commit
e9652df70c
15 changed files with 45 additions and 26 deletions
|
@ -516,7 +516,7 @@ static int supports_eci(const int symbology) {
|
|||
case BARCODE_MAXICODE:
|
||||
case BARCODE_MICROPDF417:
|
||||
case BARCODE_PDF417:
|
||||
case BARCODE_PDF417TRUNC:
|
||||
case BARCODE_PDF417COMP:
|
||||
case BARCODE_QRCODE:
|
||||
case BARCODE_DOTCODE:
|
||||
case BARCODE_GRIDMATRIX:
|
||||
|
@ -570,7 +570,7 @@ int ZBarcode_ValidID(int symbol_id) {
|
|||
case BARCODE_PZN:
|
||||
case BARCODE_PHARMA_TWO:
|
||||
case BARCODE_PDF417:
|
||||
case BARCODE_PDF417TRUNC:
|
||||
case BARCODE_PDF417COMP:
|
||||
case BARCODE_MAXICODE:
|
||||
case BARCODE_QRCODE:
|
||||
case BARCODE_CODE128B:
|
||||
|
@ -830,7 +830,7 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour
|
|||
case BARCODE_DATAMATRIX: error_number = dmatrix(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_PDF417:
|
||||
case BARCODE_PDF417TRUNC:
|
||||
case BARCODE_PDF417COMP:
|
||||
error_number = pdf417enc(symbol, preprocessed, in_length);
|
||||
break;
|
||||
case BARCODE_MICROPDF417: error_number = micro_pdf417(symbol, preprocessed, in_length);
|
||||
|
|
|
@ -272,7 +272,7 @@ static int quiet_zones(struct zint_symbol *symbol, int *left, int *right, int *t
|
|||
break;
|
||||
|
||||
case BARCODE_PDF417:
|
||||
case BARCODE_PDF417TRUNC:
|
||||
case BARCODE_PDF417COMP:
|
||||
case BARCODE_HIBC_PDF:
|
||||
/* ISO/IEC 15438:2015 Section 5.8.3 */
|
||||
*left = *right = *top = *bottom = 2;
|
||||
|
|
|
@ -796,7 +796,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const size
|
|||
strcat(pattern, "0");
|
||||
}
|
||||
|
||||
if (symbol->symbology != BARCODE_PDF417TRUNC) {
|
||||
if (symbol->symbology != BARCODE_PDF417COMP) {
|
||||
bin_append(pdf_bitpattern[offset + dummy[j]], 16, pattern);
|
||||
strcat(pattern, "0");
|
||||
bin_append(0x3FA29, 18, pattern); /* Row Stop */
|
||||
|
|
|
@ -166,11 +166,11 @@ static void test_reduced_charset_input(int index, int debug) {
|
|||
/* 31*/ { BARCODE_PDF417, UNICODE_MODE, 20, "テ", ZINT_ERROR_INVALID_DATA, -1, "テ in ECI 20 but that conversion not currently supported in Zint for non-extended barcodes" },
|
||||
/* 32*/ { BARCODE_PDF417, UNICODE_MODE, 900, "é", 0, 900, "ECI > 899 ignored for character set conversion" },
|
||||
/* 33*/ { BARCODE_PDF417, UNICODE_MODE, 900, "β", ZINT_ERROR_INVALID_DATA, 900, "But ECI > 899 suppresses auto-ECI `get_best_eci()`" },
|
||||
/* 34*/ { BARCODE_PDF417TRUNC, UNICODE_MODE, 0, "é", 0, 0, "" },
|
||||
/* 35*/ { BARCODE_PDF417TRUNC, UNICODE_MODE, 3, "é", 0, 3, "Supports ECI" },
|
||||
/* 36*/ { BARCODE_PDF417TRUNC, UNICODE_MODE, 0, "β", ZINT_WARN_USES_ECI, 9, "" },
|
||||
/* 37*/ { BARCODE_PDF417TRUNC, UNICODE_MODE, 9, "β", 0, 9, "" },
|
||||
/* 38*/ { BARCODE_PDF417TRUNC, UNICODE_MODE, 26, "テ", 0, 26, "" },
|
||||
/* 34*/ { BARCODE_PDF417COMP, UNICODE_MODE, 0, "é", 0, 0, "" },
|
||||
/* 35*/ { BARCODE_PDF417COMP, UNICODE_MODE, 3, "é", 0, 3, "Supports ECI" },
|
||||
/* 36*/ { BARCODE_PDF417COMP, UNICODE_MODE, 0, "β", ZINT_WARN_USES_ECI, 9, "" },
|
||||
/* 37*/ { BARCODE_PDF417COMP, UNICODE_MODE, 9, "β", 0, 9, "" },
|
||||
/* 38*/ { BARCODE_PDF417COMP, UNICODE_MODE, 26, "テ", 0, 26, "" },
|
||||
/* 39*/ { BARCODE_MAXICODE, UNICODE_MODE, 0, "é", 0, 0, "" },
|
||||
/* 40*/ { BARCODE_MAXICODE, UNICODE_MODE, 3, "é", 0, 3, "Supports ECI" },
|
||||
/* 41*/ { BARCODE_MAXICODE, UNICODE_MODE, 0, "β", ZINT_WARN_USES_ECI, 9, "" },
|
||||
|
|
|
@ -385,7 +385,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1111111101010100011010111000001000101111110101100001011111101011000011001011111001110111100100100100001011111101011000011101011100110000111111101000101001"
|
||||
"1111111101010100011111010111100110110111110110011001101001011111000010101110011111100100100001000111101011000000101110011110101111101100111111101000101001"
|
||||
},
|
||||
/* 10*/ { BARCODE_PDF417TRUNC, UNICODE_MODE, 1, 2, "PDF417 APK", 0, 6, 69, 0, "ISO 15438:2015 Figure G.1, same, BWIPP uses different encodation, same codeword count",
|
||||
/* 10*/ { BARCODE_PDF417COMP, UNICODE_MODE, 1, 2, "PDF417 APK", 0, 6, 69, 0, "ISO 15438:2015 Figure G.1, same, BWIPP uses different encodation, same codeword count",
|
||||
"111111110101010001111010101111000011010100001100000111011101100110001"
|
||||
"111111110101010001111010100010000011010000111000100111101000101000001"
|
||||
"111111110101010001110101011111100010110011011110000100111110011000101"
|
||||
|
@ -393,7 +393,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"111111110101010001111010111000111011011000001111010110010011101000001"
|
||||
"111111110101010001111010111101000011110100111101000110010010011111001"
|
||||
},
|
||||
/* 11*/ { BARCODE_PDF417TRUNC, UNICODE_MODE, 4, 4, "ABCDEFG", 0, 10, 103, 1, "",
|
||||
/* 11*/ { BARCODE_PDF417COMP, UNICODE_MODE, 4, 4, "ABCDEFG", 0, 10, 103, 1, "",
|
||||
"1111111101010100011101010011100000110101000011000001111010101111000010100111001110000110100000101100001"
|
||||
"1111111101010100011110101000000100110100000011100101011111101011000010111111010110000101111110101100001"
|
||||
"1111111101010100011010100111110000101111001100011001000001111010100010011111001100100111001011111001001"
|
||||
|
@ -705,7 +705,7 @@ static void test_fuzz(int index, int debug) {
|
|||
"\204\060\214\060\204\060\075\060\073\060\075\060\204\060\103\204\060\075\060\204\060\204\060\122\060\000\060\075\060\000\076\060\100\000\060\004\060\103\204\060"
|
||||
"\204\060\003\060\204\075\060\120\214\060\204\060\004\060\103\204\060\204\060\003\060\211\074\060\120\060\124\060\351\060\120\060\075\060\351\060\072\375\060\204\060",
|
||||
1001, -1, ZINT_ERROR_TOO_LONG }, // Original OSS-Fuzz triggering data
|
||||
/* 1*/ { BARCODE_PDF417TRUNC,
|
||||
/* 1*/ { BARCODE_PDF417COMP,
|
||||
"\060\075\204\060\204\060\204\041\060\075\060\204\060\075\060\075\204\060\075\060\103\204\060\204\060\003\120\060\075\060\004\060\204\060\074\204\060\204\060\075"
|
||||
"\204\060\075\060\103\204\060\214\060\204\060\075\060\031\060\073\060\025\060\075\060\204\060\103\204\060\075\060\204\060\000\075\060\226\060\100\204\060\204\060"
|
||||
"\204\060\075\204\060\120\214\060\204\060\074\377\060\075\204\060\075\060\103\204\060\214\060\204\060\075\060\041\060\000\060\204\060\120\214\060\204\060\074\204"
|
||||
|
|
|
@ -173,7 +173,7 @@ static void test_buffer(int index, int generate, int debug) {
|
|||
/* 54*/ { BARCODE_PZN, "123456", "", 50, 1, 142, 284, 118 },
|
||||
/* 55*/ { BARCODE_PHARMA_TWO, "12345678", "", 10, 2, 29, 58, 20 },
|
||||
/* 56*/ { BARCODE_PDF417, "0000000000", "", 21, 7, 103, 206, 42 },
|
||||
/* 57*/ { BARCODE_PDF417TRUNC, "0000000000", "", 21, 7, 69, 138, 42 },
|
||||
/* 57*/ { BARCODE_PDF417COMP, "0000000000", "", 21, 7, 69, 138, 42 },
|
||||
/* 58*/ { BARCODE_MAXICODE, "0000000000", "", 165, 33, 30, 300, 300 }, // Differs from vector
|
||||
/* 59*/ { BARCODE_QRCODE, "1234567890AB", "", 21, 21, 21, 42, 42 },
|
||||
/* 60*/ { BARCODE_CODE128B, "0000000000", "", 50, 1, 145, 290, 118 },
|
||||
|
|
|
@ -195,7 +195,7 @@ static void test_buffer_vector(int index, int generate, int debug) {
|
|||
/* 54*/ { BARCODE_PZN, "123456", "", 50, 1, 142, 284, 118 },
|
||||
/* 55*/ { BARCODE_PHARMA_TWO, "12345678", "", 10, 2, 29, 58, 20 },
|
||||
/* 56*/ { BARCODE_PDF417, "0000000000", "", 21, 7, 103, 206, 42 },
|
||||
/* 57*/ { BARCODE_PDF417TRUNC, "0000000000", "", 21, 7, 69, 138, 42 },
|
||||
/* 57*/ { BARCODE_PDF417COMP, "0000000000", "", 21, 7, 69, 138, 42 },
|
||||
/* 58*/ { BARCODE_MAXICODE, "0000000000", "", 165, 33, 30, 74, 72 }, // Differs from raster
|
||||
/* 59*/ { BARCODE_QRCODE, "1234567890AB", "", 21, 21, 21, 42, 42 },
|
||||
/* 60*/ { BARCODE_CODE128B, "0000000000", "", 50, 1, 145, 290, 118 },
|
||||
|
|
|
@ -286,7 +286,7 @@ char *testUtilBarcodeName(int symbology) {
|
|||
{ "BARCODE_PHARMA_TWO", BARCODE_PHARMA_TWO, 53 },
|
||||
{ "", -1, 54 },
|
||||
{ "BARCODE_PDF417", BARCODE_PDF417, 55 },
|
||||
{ "BARCODE_PDF417TRUNC", BARCODE_PDF417TRUNC, 56 },
|
||||
{ "BARCODE_PDF417COMP", BARCODE_PDF417COMP, 56 },
|
||||
{ "BARCODE_MAXICODE", BARCODE_MAXICODE, 57 },
|
||||
{ "BARCODE_QRCODE", BARCODE_QRCODE, 58 },
|
||||
{ "", -1, 59 },
|
||||
|
@ -1523,7 +1523,7 @@ static char *testUtilBwippName(int symbology, int option_1, int option_2, int op
|
|||
{ "pharmacode2", BARCODE_PHARMA_TWO, 53, 0, 0, 0, 0, 0, },
|
||||
{ "", -1, 54, 0, 0, 0, 0, 0, },
|
||||
{ "pdf417", BARCODE_PDF417, 55, 1, 1, 0, 0, 0, },
|
||||
{ "pdf417compact", BARCODE_PDF417TRUNC, 56, 1, 1, 0, 0, 0, },
|
||||
{ "pdf417compact", BARCODE_PDF417COMP, 56, 1, 1, 0, 0, 0, },
|
||||
{ "maxicode", BARCODE_MAXICODE, 57, 0, 0, 0, 0, 0, },
|
||||
{ "qrcode", BARCODE_QRCODE, 58, 0, 0, 0, 0, 0, },
|
||||
{ "", -1, 59, 0, 0, 0, 0, 0, },
|
||||
|
@ -1875,7 +1875,7 @@ int testUtilBwipp(const struct zint_symbol *symbol, int option_1, int option_2,
|
|||
}
|
||||
bwipp_opts = bwipp_opts_buf; /* Set always as option_2 == 2 is bwipp default */
|
||||
}
|
||||
} else if (symbology == BARCODE_PDF417 || symbology == BARCODE_PDF417TRUNC || symbology == BARCODE_HIBC_PDF
|
||||
} else if (symbology == BARCODE_PDF417 || symbology == BARCODE_PDF417COMP || symbology == BARCODE_HIBC_PDF
|
||||
|| symbology == BARCODE_MICROPDF417 || symbology == BARCODE_HIBC_MICPDF) {
|
||||
for (r = 0; r < symbol->rows; r++) bwipp_row_height[r] = 1; /* Change from 3 */
|
||||
if (option_1 >= 0) {
|
||||
|
|
|
@ -136,7 +136,7 @@ extern "C" {
|
|||
};
|
||||
|
||||
#define ZINT_VERSION_MAJOR 2
|
||||
#define ZINT_VERSION_MINOR 8
|
||||
#define ZINT_VERSION_MINOR 9
|
||||
#define ZINT_VERSION_RELEASE 0
|
||||
|
||||
/* Tbarcode 7 codes */
|
||||
|
@ -180,7 +180,8 @@ extern "C" {
|
|||
#define BARCODE_PZN 52
|
||||
#define BARCODE_PHARMA_TWO 53
|
||||
#define BARCODE_PDF417 55
|
||||
#define BARCODE_PDF417TRUNC 56
|
||||
#define BARCODE_PDF417COMP 56
|
||||
#define BARCODE_PDF417TRUNC 56 // Legacy
|
||||
#define BARCODE_MAXICODE 57
|
||||
#define BARCODE_QRCODE 58
|
||||
#define BARCODE_CODE128B 60
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue