From 6ae8a7d0d8fa04aa029028277eccbd6f573fe097 Mon Sep 17 00:00:00 2001 From: hooper114 Date: Tue, 18 Nov 2008 08:52:43 +0000 Subject: [PATCH] Syncronize QZint --- CMakeLists.txt | 4 ++-- backend/CMakeLists.txt | 2 +- backend/Makefile | 2 +- backend/dmatrix.c | 3 ++- backend/micqr.c | 3 +++ backend_qt4/backend_qt4.pro | 6 +++++- frontend_qt4/mainwindow.cpp | 4 ++-- frontend_qt4/mainwindow.h | 2 ++ 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09d41e6c..4f73f98c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) #set(CMAKE_VERBOSE_MAKEFILE ON) #comment or remove the above line before release -set (ZINT_VERSION_MAJOR 1) -set (ZINT_VERSION_MINOR 99) +set (ZINT_VERSION_MAJOR 2) +set (ZINT_VERSION_MINOR 0) set (ZINT_VERSION_RELEASE 1) set (ZINT_VERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}.${ZINT_VERSION_RELEASE}" ) diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt index 3e7ea256..8a52851c 100644 --- a/backend/CMakeLists.txt +++ b/backend/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(Qr) set(zint_COMMON_SRCS common.c library.c ps.c large.c reedsol.c) set(zint_ONEDIM_SRCS code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c) set(zint_POSTAL_SRCS postal.c auspost.c imail.c) -set(zint_TWODIM_SRCS code16k.c blockf.c dmatrix.c dm200.c pdf417.c qr.c maxicode.c composite.c aztec.c) +set(zint_TWODIM_SRCS code16k.c blockf.c dmatrix.c dm200.c pdf417.c qr.c micqr.c maxicode.c composite.c aztec.c) set(zint_SRCS ${zint_COMMON_SRCS} ${zint_ONEDIM_SRCS} ${zint_POSTAL_SRCS} ${zint_TWODIM_SRCS} ) if(PNG_FOUND) diff --git a/backend/Makefile b/backend/Makefile index 23d51dbc..c9a84c28 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -7,7 +7,7 @@ # make clean cleans up a previous compilation and any object or editor files # -ZINT_VERSION:=-DZINT_VERSION=\"1.99.1\" +ZINT_VERSION:=-DZINT_VERSION=\"2.0.1\" CC := gcc diff --git a/backend/dmatrix.c b/backend/dmatrix.c index c42e2bee..9665f772 100644 --- a/backend/dmatrix.c +++ b/backend/dmatrix.c @@ -561,7 +561,7 @@ void protect_ecc050(char protected_stream[], char unprotected_stream[]) char mid_reg[4]; char low_reg[4]; char u1, u2, u3; - char output[4]; + char output[6]; char gate_input[8]; int i, blocks, j, count; @@ -1073,6 +1073,7 @@ int matrix89(struct zint_symbol *symbol, unsigned char source[]) char header[20]; int symbol_size, hex_segment, width; + symbol_size = 0; for(i = 0; i < input_length; i++) { if(source[i] > 127) { strcpy(symbol->errtxt, "Data Matrix ECC 000 - 140 doesn't support extended ASCII"); diff --git a/backend/micqr.c b/backend/micqr.c index 588b84ff..4c3c863b 100644 --- a/backend/micqr.c +++ b/backend/micqr.c @@ -39,6 +39,7 @@ void qrnumeric_encode(char binary[], unsigned char source[]) char block_binary[11]; int block_value; + block_value = 0; input_length = ustrlen(source); blocks = input_length / 3; remainder = input_length % 3; @@ -597,6 +598,8 @@ int microqr(struct zint_symbol *symbol, unsigned char source[]) symbol_size = 0; if(is_sane(QRSET, source) == 0) { char_system = ALPHANUM; } if(is_sane(NESET, source) == 0) { char_system = NUMERIC; } + width = 0; + format = 0; if(symbol->option_1 == 4) { strcpy(symbol->errtxt, "Error correction level H not available for Micro QR symbols"); diff --git a/backend_qt4/backend_qt4.pro b/backend_qt4/backend_qt4.pro index 0af22f11..cca9e22a 100644 --- a/backend_qt4/backend_qt4.pro +++ b/backend_qt4/backend_qt4.pro @@ -45,12 +45,15 @@ SOURCES += qrencode/bitstream.c \ qrencode/split.c } -HEADERS += ../backend/common.h \ +HEADERS += ../backend/aztec.h \ + ../backend/common.h \ ../backend/composite.h \ ../backend/dm200.h \ + ../backend/dmatrix.h \ ../backend/large.h \ ../backend/maxicode.h \ ../backend/maxipng.h \ + ../backend/micqr.h \ ../backend/pdf417.h \ ../backend/reedsol.h \ ../backend/rss.h \ @@ -73,6 +76,7 @@ SOURCES += ../backend/2of5.c \ ../backend/library.c \ ../backend/maxicode.c \ ../backend/medical.c \ + ../backend/micqr.c \ ../backend/pdf417.c \ ../backend/plessey.c \ ../backend/postal.c \ diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index 1c3eaaf0..60bbfafe 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -38,8 +38,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) "Data Matrix", "EAN-14", "Codablock-F", "NVE-18", "Databar Stacked", "Databar Stacked Omni", "Databar Expanded Stacked", "PLANET", "MicroPDF417", "USPS One Code", "UK Plessey", "Telepen Numeric", - "ITF-14", "Dutch Post KIX", "Aztec Code", "Code 32", - "Composite EAN", "Composite EAN-128", "Composite Databar", + "ITF-14", "Dutch Post KIX", "Aztec Code", "Micro QR Code", "Aztec Runes", + "Code 32", "Composite EAN", "Composite EAN-128", "Composite Databar", "Composite Databar Limited", "Composite Databar Expanded", "Composite UPC-A", "Composite UPC-E", "Composite Databar Stacked", "Composite Databar Stacked Omni", "Composite Databar Expanded Stacked" diff --git a/frontend_qt4/mainwindow.h b/frontend_qt4/mainwindow.h index 65b26355..60bb4446 100644 --- a/frontend_qt4/mainwindow.h +++ b/frontend_qt4/mainwindow.h @@ -90,8 +90,10 @@ public: ITF14 =89, KIX =90, AZTEC =92, + MICROQR =97, /* Zint specific */ + AZRUNE =128, CODE32 =129, EANX_CC =130, EAN128_CC =131,