diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d47a419..e4ec98ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) #comment or remove the above line before release set (ZINT_VERSION_MAJOR 2) -set (ZINT_VERSION_MINOR 8) +set (ZINT_VERSION_MINOR 9) set (ZINT_VERSION_RELEASE 0) set (ZINT_VERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}.${ZINT_VERSION_RELEASE}" ) diff --git a/README b/README index 60996db7..bb5e5f41 100644 --- a/README +++ b/README @@ -201,6 +201,24 @@ Changes: - RSS14Omni-CC -> GS1DataBarStackedOmni-CC - RSSExpandedStacked-CC -> GS1DataBarExpandedStacked-CC *** Potential incompatibility *** +- API Symbol names changed but old names preserved in zint.h + - BARCODE_C25MATRIX -> BARCODE_C25STANDARD + - BARCODE_EAB128_CC -> BARCODE_GS1_128 + - BARCODE_RSS14 -> BARCODE_DBAR_OMN + - BARCODE_RSS_LTD -> BARCODE_DBAR_LTD + - BARCODE_RSS_EXP -> BARCODE_DBAR_EXP + - BARCODE_PDF417TRUNC -> BARCODE_PDF417COMP + - BARCODE_RSS14STACK -> BARCODE_DBAR_STK + - BARCODE_RSS14STACK_OMNI -> BARCODE_DBAR_OMNSTK + - BARCODE_RSS_EXPSTACK -> BARCODE_DBAR_EXPSTK + - BARCODE_ONECODE -> BARCODE_USPS_IMAIL + - BARCODE_EAN128_CC -> BARCODE_GS1_128_CC + - BARCODE_RSS14_CC -> BARCODE_DBAR_OMN_CC + - BARCODE_RSS_LTD_CC -> BARCODE_DBAR_LTD_CC + - BARCODE_RSS_EXP_CC -> BARCODE_DBAR_EXP_CC + - BARCODE_RSS14STACK_CC -> BARCODE_DBAR_STK_CC + - BARCODE_RSS_EXPSTACK_CC -> BARCODE_DBAR_EXPSTK_CC + Bugs: - Ticket 185 EMF export corrections - fine scaling by the use of float arithmetic diff --git a/backend/library.c b/backend/library.c index 9478035d..51ee5b74 100644 --- a/backend/library.c +++ b/backend/library.c @@ -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); diff --git a/backend/output.c b/backend/output.c index ea358df7..8738d31d 100644 --- a/backend/output.c +++ b/backend/output.c @@ -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; diff --git a/backend/pdf417.c b/backend/pdf417.c index 58a4bed2..3ae87692 100644 --- a/backend/pdf417.c +++ b/backend/pdf417.c @@ -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 */ diff --git a/backend/tests/test_eci.c b/backend/tests/test_eci.c index 137a289d..1d6bc102 100644 --- a/backend/tests/test_eci.c +++ b/backend/tests/test_eci.c @@ -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, "" }, diff --git a/backend/tests/test_pdf417.c b/backend/tests/test_pdf417.c index 206063be..7da093f4 100644 --- a/backend/tests/test_pdf417.c +++ b/backend/tests/test_pdf417.c @@ -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" diff --git a/backend/tests/test_raster.c b/backend/tests/test_raster.c index 8365b8e4..261e3898 100644 --- a/backend/tests/test_raster.c +++ b/backend/tests/test_raster.c @@ -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 }, diff --git a/backend/tests/test_vector.c b/backend/tests/test_vector.c index 2757bd88..87d80c26 100644 --- a/backend/tests/test_vector.c +++ b/backend/tests/test_vector.c @@ -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 }, diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c index 815eb823..efbd2c30 100644 --- a/backend/tests/testcommon.c +++ b/backend/tests/testcommon.c @@ -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) { diff --git a/backend/zint.h b/backend/zint.h index 18c04e74..6c65ab49 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -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 diff --git a/backend_tcl/zint.c b/backend_tcl/zint.c index 23e2cf45..233ac079 100644 --- a/backend_tcl/zint.c +++ b/backend_tcl/zint.c @@ -292,7 +292,7 @@ static int s_code_number[] = { BARCODE_PZN, BARCODE_PHARMA_TWO, BARCODE_PDF417, - BARCODE_PDF417TRUNC, + BARCODE_PDF417COMP, BARCODE_MAXICODE, BARCODE_QRCODE, BARCODE_CODE128B, diff --git a/docs/manual.txt b/docs/manual.txt index 2db4457f..7f561ed4 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -1023,7 +1023,7 @@ Value | 52 | BARCODE_PZN | PZN 53 | BARCODE_PHARMA_TWO | Pharmacode Two-Track 55 | BARCODE_PDF417 | PDF417 -56 | BARCODE_PDF417TRUNC | Compact PDF417 (Truncated PDF417) +56* | BARCODE_PDF417COMP | Compact PDF417 (Truncated PDF417) 57 | BARCODE_MAXICODE | Maxicode 58 | BARCODE_QRCODE | QR Code 60 | BARCODE_CODE128B | Code 128 (Subset B) diff --git a/frontend_qt/mainWindow.ui b/frontend_qt/mainWindow.ui index 3957df64..19bfdfe9 100644 --- a/frontend_qt/mainWindow.ui +++ b/frontend_qt/mainWindow.ui @@ -26,7 +26,7 @@ - Zint Barcode Studio 2.8 + Zint Barcode Studio diff --git a/frontend_qt/mainwindow.cpp b/frontend_qt/mainwindow.cpp index 78c5451e..c25b2e3c 100644 --- a/frontend_qt/mainwindow.cpp +++ b/frontend_qt/mainwindow.cpp @@ -277,7 +277,7 @@ bool MainWindow::save() void MainWindow::about() { QMessageBox::about(this, tr("About Zint"), - tr("

Zint Barcode Studio 2.8.0

" + tr("

Zint Barcode Studio 2.9.0

" "

A free barcode generator" "

Instruction manual is available at the project homepage:
" "http://www.zint.org.uk" @@ -1006,7 +1006,7 @@ void MainWindow::update_preview() m_bc.bc.setSymbol(BARCODE_PDF417); if(m_optionWidget->findChild("radPDFTruncated")->isChecked()) - m_bc.bc.setSymbol(BARCODE_PDF417TRUNC); + m_bc.bc.setSymbol(BARCODE_PDF417COMP); if(m_optionWidget->findChild("radPDFHIBC")->isChecked()) m_bc.bc.setSymbol(BARCODE_HIBC_PDF);