Merge branch 'hanxin'

Add new symbology Han Xin according to AIMD-015:2010
Implementation may change when this becomes an ISO standard.
This commit is contained in:
Robin Stuart 2016-06-19 09:14:52 +01:00
commit c709b08da5
16 changed files with 34835 additions and 113 deletions

246
Makefile
View File

@ -1,18 +1,240 @@
# Make libzint and zint together
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.2
zint:
$(MAKE) -C backend/
$(MAKE) -C frontend/
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
install:
$(MAKE) install -C backend/
$(MAKE) install -C frontend/
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
uninstall:
$(MAKE) uninstall -C frontend/
$(MAKE) uninstall -C backend/
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/hooper/zint/zint-code
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/hooper/zint/zint-code
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: install/strip
.PHONY : install/strip/fast
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Devel\" \"Unspecified\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
# Special rule for the target install/local
install/local/fast: install/local
.PHONY : install/local/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles /home/hooper/zint/zint-code/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) clean -C backend/
$(MAKE) clean -C frontend/
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named uninstall
# Build rule for target.
uninstall: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 uninstall
.PHONY : uninstall
# fast build rule for target.
uninstall/fast:
$(MAKE) -f CMakeFiles/uninstall.dir/build.make CMakeFiles/uninstall.dir/build
.PHONY : uninstall/fast
#=============================================================================
# Target rules for targets named zint
# Build rule for target.
zint: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 zint
.PHONY : zint
# fast build rule for target.
zint/fast:
$(MAKE) -f backend/CMakeFiles/zint.dir/build.make backend/CMakeFiles/zint.dir/build
.PHONY : zint/fast
#=============================================================================
# Target rules for targets named zint_frontend
# Build rule for target.
zint_frontend: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 zint_frontend
.PHONY : zint_frontend
# fast build rule for target.
zint_frontend/fast:
$(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/build
.PHONY : zint_frontend/fast
#=============================================================================
# Target rules for targets named QZint
# Build rule for target.
QZint: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 QZint
.PHONY : QZint
# fast build rule for target.
QZint/fast:
$(MAKE) -f backend_qt4/CMakeFiles/QZint.dir/build.make backend_qt4/CMakeFiles/QZint.dir/build
.PHONY : QZint/fast
#=============================================================================
# Target rules for targets named zint-qt
# Build rule for target.
zint-qt: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 zint-qt
.PHONY : zint-qt
# fast build rule for target.
zint-qt/fast:
$(MAKE) -f frontend_qt4/CMakeFiles/zint-qt.dir/build.make frontend_qt4/CMakeFiles/zint-qt.dir/build
.PHONY : zint-qt/fast
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... install/strip"
@echo "... uninstall"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... install"
@echo "... list_install_components"
@echo "... install/local"
@echo "... zint"
@echo "... zint_frontend"
@echo "... QZint"
@echo "... zint-qt"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@ -7,7 +7,7 @@ find_package(PNG)
set(zint_COMMON_SRCS common.c library.c render.c ps.c large.c reedsol.c gs1.c svg.c png.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 dmatrix.c pdf417.c qr.c maxicode.c composite.c aztec.c code49.c code1.c gridmtx.c)
set(zint_TWODIM_SRCS code16k.c dmatrix.c pdf417.c qr.c maxicode.c composite.c aztec.c code49.c code1.c gridmtx.c hanxin.c)
set(zint_SRCS ${zint_COMMON_SRCS} ${zint_ONEDIM_SRCS} ${zint_POSTAL_SRCS} ${zint_TWODIM_SRCS} )
if(PNG_FOUND)

File diff suppressed because it is too large Load Diff

30769
backend/gb18030.h Normal file

File diff suppressed because it is too large Load Diff

1585
backend/hanxin.c Normal file

File diff suppressed because it is too large Load Diff

460
backend/hanxin.h Normal file
View File

@ -0,0 +1,460 @@
/* hanxin.h - definitions for Han Xin code
libzint - the open source barcode library
Copyright (C) 2009-2016 Robin Stuart <rstuart114@gmail.com>
Copyright (C) 2016 Zoe Stuart
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
/* Data from table B1: Data capacity of Han Xin Code */
static int hx_total_codewords[] = {
25, 37, 50, 54, 69, 84, 100, 117, 136, 155, 161, 181, 203, 225, 249,
273, 299, 325, 353, 381, 411, 422, 453, 485, 518, 552, 587, 623, 660,
698, 737, 754, 794, 836, 878, 922, 966, 1011, 1058, 1105, 1126, 1175,
1224, 1275, 1327, 1380, 1434, 1489, 1513, 1569, 1628, 1686, 1745, 1805,
1867, 1929, 1992, 2021, 2086, 2151, 2218, 2286, 2355, 2425, 2496, 2528,
2600, 2673, 2749, 2824, 2900, 2977, 3056, 3135, 3171, 3252, 3334, 3416,
3500, 3585, 3671, 3758, 3798, 3886
};
static int hx_data_codewords_L1[] = {
21, 31, 42, 46, 57, 70, 84, 99, 114, 131, 135, 153, 171, 189, 209, 229,
251, 273, 297, 321, 345, 354, 381, 407, 436, 464, 493, 523, 554, 586, 619,
634, 666, 702, 738, 774, 812, 849, 888, 929, 946, 987, 1028, 1071, 1115,
1160, 1204, 1251, 1271, 1317, 1368, 1416, 1465, 1517, 1569, 1621, 1674,
1697, 1752, 1807, 1864, 1920, 1979, 2037, 2096, 2124, 2184, 2245, 2309,
2372, 2436, 2501, 2568, 2633, 2663, 2732, 2800, 2870, 2940, 3011,
3083, 3156, 3190, 3264
};
static int hx_data_codewords_L2[] = {
17, 25, 34, 38, 49, 58, 70, 81, 96, 109, 113, 127, 143, 157, 175,191, 209,
227, 247, 267, 287, 296, 317, 339, 362, 386, 411, 437, 462, 488, 515, 528,
556, 586, 614, 646, 676, 707, 740, 773, 788, 823, 856, 893, 929, 966, 1004,
1043, 1059, 1099, 1140, 1180, 1221, 1263, 1307, 1351, 1394, 1415, 1460,
1505, 1552, 1600, 1649, 1697, 1748, 1770, 1820, 1871, 1925, 1976, 2030,
2083, 2140, 2195, 2219, 2276, 2334, 2392, 2450, 2509, 2569, 2630, 2658,
2720
};
static int hx_data_codewords_L3[] = {
13, 19, 26, 30, 37, 46, 54, 63, 74, 83, 87, 97, 109, 121, 135, 147, 161,
175, 191, 205, 221, 228, 245, 261, 280, 298, 317, 337, 358, 376, 397, 408,
428, 452, 474, 498, 522, 545, 572, 597, 608, 635, 660, 689, 717, 746, 774,
805, 817, 847, 880, 910, 943, 975, 1009, 1041, 1076, 1091, 1126, 1161, 1198,
1234, 1271, 1309, 1348, 1366, 1404, 1443, 1485, 1524, 1566, 1607,1650, 1693,
1713, 1756, 1800, 1844, 1890, 1935, 1983, 2030, 2050, 2098
};
static int hx_data_codewords_L4[] = {
9, 15, 20, 22, 27, 34, 40, 47, 54, 61, 65, 73, 81, 89, 99, 109, 119, 129,
141, 153, 165, 168, 181, 195, 208, 220, 235, 251, 264, 280, 295, 302, 318,
334, 352, 368, 386, 405, 424, 441, 450, 469, 490, 509, 531, 552, 574, 595, 605,
627, 652, 674, 697, 721, 747, 771, 796, 809, 834, 861, 892, 914, 941, 969, 998,
1012, 1040, 1069, 1099, 1130, 1160, 1191, 1222, 1253, 1269, 1300, 1334,
1366, 1400, 1433, 1469, 1504, 1520, 1554
};
/* Value 'k' from Annex A */
static int hx_module_k[] = {
0, 0, 0, 14, 16, 16, 17, 18, 19, 20,
14, 15, 16, 16, 17, 17, 18, 19, 20, 20,
21, 16, 17, 17, 18, 18, 19, 19, 20, 20,
21, 17, 17, 18, 18, 19, 19, 19, 20, 20,
17, 17, 18, 18, 18, 19, 19, 19, 17, 17,
18, 18, 18, 18, 19, 19, 19, 17, 17, 18,
18, 18, 18, 19, 19, 17, 17, 17, 18, 18,
18, 18, 19, 19, 17, 17, 17, 18, 18, 18,
18, 18, 17, 17
};
/* Value 'r' from Annex A */
static int hx_module_r[] = {
0, 0, 0, 15, 15, 17, 18, 19, 20, 21,
15, 15, 15, 17, 17, 19, 19, 19, 19, 21,
21, 17, 16, 18, 17, 19, 18, 20, 19, 21,
20, 17, 19, 17, 19, 17, 19, 21, 19, 21,
18, 20, 17, 19, 21, 18, 20, 22, 17, 19,
15, 17, 19, 21, 17, 19, 21, 18, 20, 15,
17, 19, 21, 16, 18, 17, 19, 21, 15, 17,
19, 21, 15, 17, 18, 20, 22, 15, 17, 19,
21, 23, 17, 19
};
/* Value of 'm' from Annex A */
static int hx_module_m[] = {
0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 4, 4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 6, 6,
6, 6, 6, 6, 6, 6, 6, 7, 7, 7,
7, 7, 7, 7, 7, 8, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
9, 9, 10, 10
};
/* Error correction block sizes from Table D1 */
static int hx_table_d1[] = {
/* #blocks, k, 2t, #blocks, k, 2t, #blocks, k, 2t */
1, 21, 4, 0, 0, 0, 0, 0, 0, // version 1
1, 17, 8, 0, 0, 0, 0, 0, 0,
1, 13, 12, 0, 0, 0, 0, 0, 0,
1, 9, 16, 0, 0, 0, 0, 0, 0,
1, 31, 6, 0, 0, 0, 0, 0, 0, // version 2
1, 25, 12, 0, 0, 0, 0, 0, 0,
1, 19, 18, 0, 0, 0, 0, 0, 0,
1, 15, 22, 0, 0, 0, 0, 0, 0,
1, 42, 8, 0, 0, 0, 0, 0, 0, // version 3
1, 34, 16, 0, 0, 0, 0, 0, 0,
1, 26, 24, 0, 0, 0, 0, 0, 0,
1, 20, 30, 0, 0, 0, 0, 0, 0,
1, 46, 8, 0, 0, 0, 0, 0, 0, // version 4
1, 38, 16, 0, 0, 0, 0, 0, 0,
1, 30, 24, 0, 0, 0, 0, 0, 0,
1, 22, 32, 0, 0, 0, 0, 0, 0,
1, 57, 12, 0, 0, 0, 0, 0, 0, // version 5
1, 49, 20, 0, 0, 0, 0, 0, 0,
1, 37, 32, 0, 0, 0, 0, 0, 0,
1, 14, 20, 1, 13, 22, 0, 0, 0,
1, 70, 14, 0, 0, 0, 0, 0, 0, // version 6
1, 58, 26, 0, 0, 0, 0, 0, 0,
1, 24, 20, 1, 22, 18, 0, 0, 0,
1, 16, 24, 1, 18, 26, 0, 0, 0,
1, 84, 16, 0, 0, 0, 0, 0, 0, // version 7
1, 70, 30, 0, 0, 0, 0, 0, 0,
1, 26, 22, 1, 28, 24, 0, 0, 0,
2, 14, 20, 1, 12, 20, 0, 0, 0,
1, 99, 18, 0, 0, 0, 0, 0, 0, // version 8
1, 40, 18, 1, 41, 18, 0, 0, 0,
1, 31, 26, 1, 32, 28, 0, 0, 0,
2, 16, 24, 1, 15, 22, 0, 0, 0,
1, 114, 22, 0, 0, 0, 0, 0, 0, // version 9
2, 48, 20, 0, 0, 0, 0, 0, 0,
2, 24, 20, 1, 26, 22, 0, 0, 0,
2, 18, 28, 1, 18, 26, 0, 0, 0,
1, 131, 24, 0, 0, 0, 0, 0, 0, // version 10
1, 52, 22, 1, 57, 24, 0, 0, 0,
2, 27, 24, 1, 29, 24, 0, 0, 0,
2, 21, 32, 1, 19, 30, 0, 0, 0,
1, 135, 26, 0, 0, 0, 0, 0, 0, // version 11
1, 56, 24, 1, 57, 24, 0, 0, 0,
2, 28, 24, 1, 31, 26, 0, 0, 0,
2, 22, 32, 1, 21, 32, 0, 0, 0,
1, 153, 28, 0, 0, 0, 0, 0, 0, // version 12
1, 62, 26, 1, 65, 28, 0, 0, 0,
2, 32, 28, 1, 33, 28, 0, 0, 0,
3, 17, 26, 1, 22, 30, 0, 0, 0,
1, 86, 16, 1, 85, 16, 0, 0, 0, // version 13
1, 71, 30, 1, 72, 30, 0, 0, 0,
2, 37, 32, 1, 35, 30, 0, 0, 0,
3, 20, 30, 1, 21, 32, 0, 0, 0,
1, 94, 18, 1, 95, 18, 0, 0, 0, // version 14
2, 51, 22, 1, 55, 24, 0, 0, 0,
3, 30, 26, 1, 31, 26, 0, 0, 0,
4, 18, 28, 1, 17, 24, 0, 0, 0,
1, 104, 20, 1, 105, 20, 0, 0, 0, // version 15
2, 57, 24, 1, 61, 26, 0, 0, 0,
3, 33, 28, 1, 36, 30, 0, 0, 0,
4, 20, 30, 1, 19, 30, 0, 0, 0,
1, 115, 22, 1, 114, 22, 0, 0, 0, // version 16
2, 65, 28, 1, 61, 26, 0, 0, 0,
3, 38, 32, 1, 33, 30, 0, 0, 0,
5, 19, 28, 1, 14, 24, 0, 0, 0,
1, 126, 24, 1, 125, 24, 0, 0, 0, // version 17
2, 70, 30, 1, 69, 30, 0, 0, 0,
4, 33, 28, 1, 29, 26, 0, 0, 0,
5, 20, 30, 1, 19, 30, 0, 0, 0,
1, 136, 26, 1, 137, 26, 0, 0, 0, //version 18
3, 56, 24, 1, 59, 26, 0, 0, 0,
5, 35, 30, 0, 0, 0, 0, 0, 0,
6, 18, 28, 1, 21, 28, 0, 0, 0,
1, 148, 28, 1, 149, 28, 0, 0, 0, // version 19
3, 61, 26, 1, 64, 28, 0, 0, 0,
7, 24, 20, 1, 23, 22, 0, 0, 0,
6, 20, 30, 1, 21, 32, 0, 0, 0,
3, 107, 20, 0, 0, 0, 0, 0, 0, // version 20
3, 65, 28, 1, 72, 30, 0, 0, 0,
7, 26, 22, 1, 23, 22, 0, 0, 0,
7, 19, 28, 1, 20, 32, 0, 0, 0,
3, 115, 22, 0, 0, 0, 0, 0, 0, // version 21
4, 56, 24, 1, 63, 28, 0, 0, 0,
7, 28, 24, 1, 25, 22, 0, 0, 0,
8, 18, 28, 1, 21, 22, 0, 0, 0,
2, 116, 22, 1, 122, 24, 0, 0, 0, // version 22
4, 56, 24, 1, 72, 30, 0, 0, 0,
7, 28, 24, 1, 32, 26, 0, 0, 0,
8, 18, 28, 1, 24, 30, 0, 0, 0,
3, 127, 24, 0, 0, 0, 0, 0, 0, // version 23
5, 51, 22, 1, 62, 26, 0, 0, 0,
7, 30, 26, 1, 35, 26, 0, 0, 0,
8, 20, 30, 1, 21, 32, 0, 0, 0,
2, 135, 26, 1, 137, 26, 0, 0, 0, // version 24
5, 56, 24, 1, 59, 26, 0, 0, 0,
7, 33, 28, 1, 30, 28, 0, 0, 0,
11, 16, 24, 1, 19, 26, 0, 0, 0,
3, 105, 20, 1, 121, 22, 0, 0, 0, // version 25
5, 61, 26, 1, 57, 26, 0, 0, 0,
9, 28, 24, 1, 28, 22, 0, 0, 0,
10, 19, 28, 1, 18, 30, 0, 0, 0,
2, 157, 30, 1, 150, 28, 0, 0, 0, // version 26
5, 65, 28, 1, 61, 26, 0, 0, 0,
8, 33, 28, 1, 34, 30, 0, 0, 0,
10, 19, 28, 2, 15, 26, 0, 0, 0,
3, 126, 24, 1, 115, 22, 0, 0, 0, // version 27
7, 51, 22, 1, 54, 22, 0, 0, 0,
8, 35, 30, 1, 37, 30, 0, 0, 0,
15, 15, 22, 1, 10, 22, 0, 0, 0,
4, 105, 20, 1, 103, 20, 0, 0, 0, // version 28
7, 56, 24, 1, 45, 18, 0, 0, 0,
10, 31, 26, 1, 27, 26, 0, 0, 0,
10, 17, 26, 3, 20, 28, 1, 21, 28,
3, 139, 26, 1, 137, 28, 0, 0, 0, // version 29
6, 66, 28, 1, 66, 30, 0, 0, 0,
9, 36, 30, 1, 34, 32, 0, 0, 0,
13, 19, 28, 1, 17, 32, 0, 0, 0,
6, 84, 16, 1, 82, 16, 0, 0, 0, // version 30
6, 70, 30, 1, 68, 30, 0, 0, 0,
7, 35, 30, 3, 33, 28, 1, 32, 28,
13, 20, 30, 1, 20, 28, 0, 0, 0,
5, 105, 20, 1, 94, 18, 0, 0, 0, // version 31
6, 74, 32, 1, 71, 30, 0, 0, 0,
11, 33, 28, 1, 34, 32, 0, 0, 0,
13, 19, 28, 3, 16, 26, 0, 0, 0,
4, 127, 24, 1, 126, 24, 0, 0, 0, // version 32
7, 66, 28, 1, 66, 30, 0, 0, 0,
12, 30,24, 1, 24, 28, 1, 24, 30,
15, 19, 28, 1, 17, 32, 0, 0, 0,
7, 84, 16, 1, 78, 16, 0, 0, 0, // version 33
7, 70, 30, 1, 66, 28, 0, 0, 0,
12, 33, 28, 1, 32, 30, 0, 0, 0,
14, 21, 32, 1, 24, 28, 0, 0, 0,
5, 117, 22, 1, 117, 24, 0, 0, 0, // version 34
8, 66, 28, 1, 58, 26, 0, 0, 0,
11, 38, 32, 1, 34, 32, 0, 0, 0,
15, 20, 30, 2, 17, 26, 0, 0, 0,
4, 148, 28, 1, 146, 28, 0, 0, 0, // version 35
8, 68, 30, 1, 70, 24, 0, 0, 0,
10, 36, 32, 3, 38, 28, 0, 0, 0,
16, 19, 28, 3, 16, 26, 0, 0, 0,
4, 126, 24, 2, 135, 26, 0, 0, 0, // version 36
8, 70, 28, 2, 43, 26, 0, 0, 0,
13, 32, 28, 2, 41, 30, 0, 0, 0,
17, 19, 28, 3, 15, 26, 0, 0, 0,
5, 136, 26, 1, 132, 24, 0, 0, 0, // version 37
5, 67, 30, 4, 68, 28, 1, 69, 28,
14, 35, 30, 1, 32, 24, 0, 0, 0,
18, 18, 26, 3, 16, 28, 1, 14, 28,
3, 142, 26, 3, 141, 28, 0, 0, 0, // version 38
8, 70, 30, 1, 73, 32, 1, 74, 32,
12, 34, 30, 3, 34, 26, 1, 35, 28,
18, 21, 32, 1, 27, 30, 0, 0, 0,
5, 116, 22, 2, 103, 20, 1, 102, 20, // version 39
9, 74, 32, 1, 74, 30, 0, 0, 0,
14, 34, 28, 2, 32, 32, 1, 32, 30,
19, 21, 32, 1, 25, 26, 0, 0, 0,
7, 116, 22, 1, 117, 22, 0, 0, 0, // version 40
11, 65, 28, 1, 58, 24, 0, 0, 0,
15, 38, 32, 1, 27, 28, 0, 0, 0,
20, 20, 30, 1, 20, 32, 1, 21, 32,
6, 136, 26, 1, 130, 24, 0, 0, 0, // version 41
11, 66, 28, 1, 62, 30, 0, 0, 0,
14, 34, 28, 3, 34, 32, 1, 30, 30,
18, 20, 30, 3, 20, 28, 2, 15, 26,
5, 105, 20, 2, 115, 22, 2, 116, 22, // version 42
10, 75, 32, 1, 73, 32, 0, 0, 0,
16, 38, 32, 1, 27, 28, 0, 0, 0,
22, 19, 28, 2, 16, 30, 1, 19, 30,
6, 147, 28, 1, 146, 28, 0, 0, 0, // version 43
11, 66, 28, 2, 65, 30, 0, 0, 0,
18, 33, 28, 2, 33, 30, 0, 0, 0,
22, 21, 32, 1, 28, 30, 0, 0, 0,
6, 116, 22, 3, 125, 24, 0, 0, 0, // version 44
11, 75, 32, 1, 68, 30, 0, 0, 0,
13, 35, 28, 6, 34, 32, 1, 30, 30,
23, 21, 32, 1, 26, 30, 0, 0, 0,
7, 105, 20, 4, 95, 18, 0, 0, 0, // version 45
12, 67, 28, 1, 63, 30, 1, 62, 32,
21, 31, 26, 2, 33, 32, 0, 0, 0,
23, 21, 32, 2, 24, 30, 0, 0, 0,
10, 116, 22, 0, 0, 0, 0, 0, 0, // version 46
12, 74, 32, 1, 78, 30, 0, 0, 0,
18, 37, 32, 1, 39, 30, 1, 41, 28,
25, 21, 32, 1, 27, 28, 0, 0, 0,
5, 126, 24, 4, 115, 22, 1, 114, 22, // version 47
12, 67, 28, 2, 66, 32, 1, 68, 30,
21, 35, 30, 1, 39, 30, 0, 0, 0,
26, 21, 32, 1, 28, 28, 0, 0, 0,
9, 126, 24, 1, 117, 22, 0, 0, 0, // version 48
13, 75, 32, 1, 68, 30, 0, 0, 0,
20, 35, 30, 3, 35, 28, 0, 0, 0,
27, 21, 32, 1, 28, 30, 0, 0, 0,
9, 126, 24, 1, 137, 26, 0, 0, 0, // version 49
13, 71, 30, 2, 68, 32, 0, 0, 0,
20, 37, 32, 1, 39, 28, 1, 38, 28,
24, 20, 32, 5, 25, 28, 0, 0, 0,
8, 147, 28, 1, 141, 28, 0, 0, 0, // version 50
10, 73, 32, 4, 74, 30, 1, 73, 30,
16, 36, 32, 6, 39, 30, 1, 37, 30,
27, 21, 32, 3, 20, 26, 0, 0, 0,
9, 137, 26, 1, 135, 26, 0, 0, 0, // version 51
12, 70, 30, 4, 75, 32, 0, 0, 0,
24, 35, 30, 1, 40, 28, 0, 0, 0,
23, 20, 32, 8, 24, 30, 0, 0, 0,
14, 95, 18, 1, 86, 18, 0, 0, 0, // version 52
13, 73, 32, 3, 77, 30, 0, 0, 0,
24, 35, 30, 2, 35, 28, 0, 0, 0,
26, 21, 32, 5, 21, 30, 1, 23, 30,
9, 147, 28, 1, 142, 28, 0, 0, 0, // version 53
10, 73, 30, 6, 70, 32, 1, 71, 32,
25, 35, 30, 2, 34, 26, 0, 0, 0,
29, 21, 32, 4, 22, 30, 0, 0, 0,
11, 126, 24, 1, 131, 24, 0, 0, 0, // version 54
16, 74, 32, 1, 79, 30, 0, 0, 0,
25, 38, 32, 1, 25, 30, 0, 0, 0,
33, 21, 32, 1, 28, 28, 0, 0, 0,
14, 105, 20, 1, 99, 18, 0, 0, 0, // version 55
19, 65, 28, 1, 72, 28, 0, 0, 0,
24, 37, 32, 2, 40, 30, 1, 41, 30,
31, 21, 32, 4, 24, 32, 0, 0, 0,
10, 147, 28, 1, 151, 28, 0, 0, 0, // version 56
15, 71, 30, 3, 71, 32, 1, 73, 32,
24, 37, 32, 3, 38, 30, 1, 39, 30,
36, 19, 30, 3, 29, 26, 0, 0, 0,
15, 105, 20, 1, 99, 18, 0, 0, 0, // version 57
19, 70, 30, 1, 64, 28, 0, 0, 0,
27, 38, 32, 2, 25, 26, 0, 0, 0,
38, 20, 30, 2, 18, 28, 0, 0, 0,
14, 105, 20, 1, 113, 22, 1, 114, 22, // version 58
17, 67, 30, 3, 92, 32, 0, 0, 0,
30, 35, 30, 1, 41, 30, 0, 0, 0,
36, 21, 32, 1, 26, 30, 1, 27, 30,
11, 146, 28, 1, 146, 26, 0, 0, 0, // version 59
20, 70, 30, 1, 60, 26, 0, 0, 0,
29, 38, 32, 1, 24, 32, 0, 0, 0,
40, 20, 30, 2, 17, 26, 0, 0, 0,
3, 137, 26, 1, 136, 26, 10, 126, 24, // version 60
22, 65, 28, 1, 75, 30, 0, 0, 0,
30, 37, 32, 1, 51, 30, 0, 0, 0,
42, 20, 30, 1, 21, 30, 0, 0, 0,
12, 126, 24, 2, 118, 22, 1, 116, 22, // version 61
19, 74, 32, 1, 74, 30, 1, 72, 28,
30, 38, 32, 2, 29, 30, 0, 0, 0,
39, 20, 32, 2, 37, 26, 1, 38, 26,
12, 126, 24, 3, 136, 26, 0, 0, 0, // version 62
21, 70, 30, 2, 65, 28, 0, 0, 0,
34, 35, 30, 1, 44, 32, 0, 0, 0,
42, 20, 30, 2, 19, 28, 2, 18, 28,
12, 126, 24, 3, 117, 22, 1, 116, 22, // version 63
25, 61, 26, 2, 62, 28, 0, 0, 0,
34, 35, 30, 1, 40, 32, 1, 41, 32,
45, 20, 30, 1, 20, 32, 1, 21, 32,
15, 105, 20, 2, 115, 22, 2, 116, 22, // version 64
25, 65, 28, 1, 72, 28, 0, 0, 0,
18, 35, 30, 17, 37, 32, 1, 50, 32,
42, 20, 30, 6, 19, 28, 1, 15, 28,
19, 105, 20, 1, 101, 20, 0, 0, 0, // version 65
33, 51, 22, 1, 65, 22, 0, 0, 0,
40, 33, 28, 1, 28, 28, 0, 0, 0,
49, 20, 30, 1, 18, 28, 0, 0, 0,
18, 105, 20, 2, 117, 22, 0, 0, 0, // version 66
26, 65, 28, 1, 80, 30, 0, 0, 0,
35, 35, 30, 3, 35, 28, 1, 36, 28,
52, 18, 28, 2, 38, 30, 0, 0, 0,
26, 84, 16, 0, 0, 0, 0, 0, 0, // version 67
26, 70, 30, 0, 0, 0, 0, 0, 0,
45, 31, 26, 1, 9, 26, 0, 0, 0,
52, 20, 30, 0, 0, 0, 0, 0, 0,
16, 126, 24, 1, 114, 22, 1, 115, 22, // version 68
23, 70, 30, 3, 65, 28, 1, 66, 28,
40, 35, 30, 1, 43, 30, 0, 0, 0,
46, 20, 30, 7, 19, 28, 1, 16, 28,
19, 116, 22, 1, 105, 22, 0, 0, 0, // version 69
20, 70, 30, 7, 66, 28, 1, 63, 28,
40, 35, 30, 1, 42, 32, 1, 43, 32,
54, 20, 30, 1, 19, 30, 0, 0, 0,
17, 126, 24, 2, 115, 22, 0, 0, 0, // version 70
24, 70, 30, 4, 74, 32, 0, 0, 0,
48, 31, 26, 2, 18, 26, 0, 0, 0,
54, 19, 28, 6, 15, 26, 1, 14, 26,
29, 84, 16, 0, 0, 0, 0, 0, 0, // version 71
29, 70, 30, 0, 0, 0, 0, 0, 0,
6, 34, 30, 3, 36, 30, 38, 33, 28,
58, 20, 30, 0, 0, 0, 0, 0, 0,
16, 147, 28, 1, 149, 28, 0, 0, 0, // version 72
31, 66, 28, 1, 37, 26, 0, 0, 0,
48, 33, 28, 1, 23, 26, 0, 0, 0,
53, 20, 30, 6, 19, 28, 1, 17, 28,
20, 115, 22, 2, 134, 24, 0, 0, 0, // verdion 73
29, 66, 28, 2, 56, 26, 2, 57, 26,
45, 36, 30, 2, 15, 28, 0, 0, 0,
59, 20, 30, 2, 21, 32, 0, 0, 0,
17, 147, 28, 1, 134, 26, 0, 0, 0, // version 74
26, 70, 30, 5, 75, 32, 0, 0, 0,
47, 35, 30, 1, 48, 32, 0, 0, 0,
64, 18, 28, 2, 33, 30, 1, 35, 30,
22, 115, 22, 1, 133, 24, 0, 0, 0, // version 75
33, 65, 28, 1, 74, 28, 0, 0, 0,
43, 36, 30, 5, 27, 28, 1, 30, 28,
57, 20, 30, 5, 21, 32, 1, 24, 32,
18, 136, 26, 2, 142, 26, 0, 0, 0, // version 76
33, 66, 28, 2, 49, 26, 0, 0, 0,
48, 35, 30, 2, 38, 28, 0, 0, 0,
64, 20, 30, 1, 20, 32, 0, 0, 0,
19, 126, 24, 2, 135, 26, 1, 136, 26, // version 77
32, 66, 28, 2, 55, 26, 2, 56, 26,
49, 36, 30, 2, 18, 32, 0, 0, 0,
65, 18, 28, 5, 27, 30, 1, 29, 30,
20, 137, 26, 1, 130, 26, 0, 0, 0, // version 78
30, 75, 32, 2, 71, 32, 0, 0, 0,
46, 35, 30, 6, 39, 32, 0, 0, 0,
3, 12, 30, 70, 19, 28, 0, 0, 0,
20, 147, 28, 0, 0, 0, 0, 0, 0, // version 79
35, 70, 30, 0, 0, 0, 0, 0, 0,
49, 35, 30, 5, 35, 28, 0, 0, 0,
70, 20, 30, 0, 0, 0, 0, 0, 0,
21, 136, 26, 1, 155, 28, 0, 0, 0, // version 80
34, 70, 30, 1, 64, 28, 1, 65, 28,
54, 35, 30, 1, 45, 30, 0, 0, 0,
68, 20, 30, 3, 18, 28, 1, 19, 28,
19, 126, 24, 5, 115, 22, 1, 114, 22, // version 81
33, 70, 30, 3, 65, 28, 1, 64, 28,
52, 35, 30, 3, 41, 32, 1, 40, 32,
67, 20, 30, 5, 21, 32, 1, 24, 32,
2, 150, 28, 21, 136, 26, 0, 0, 0, // version 82
32, 70, 30, 6, 65, 28, 0, 0, 0,
52, 38, 32, 2, 27, 32, 0, 0, 0,
73, 20, 30, 2, 22, 32, 0, 0, 0,
21, 126, 24, 4, 136, 26, 0, 0, 0, // version 83
30, 74, 32, 6, 73, 30, 0, 0, 0,
54, 35, 30, 4, 40, 32, 0, 0, 0,
75, 20, 30, 1, 20, 28, 0, 0, 0,
30, 105, 20, 1, 114, 22, 0, 0, 0, // version 84
3, 45, 22, 55, 47, 20, 0, 0, 0,
2, 26, 26, 62, 33, 28, 0, 0, 0,
79, 18, 28, 4, 33, 30, 0, 0, 0
};

View File

@ -181,6 +181,7 @@ extern int code_49(struct zint_symbol *symbol, unsigned char source[], const int
extern int channel_code(struct zint_symbol *symbol, unsigned char source[], int length); /* Channel Code */
extern int code_one(struct zint_symbol *symbol, unsigned char source[], int length); /* Code One */
extern int grid_matrix(struct zint_symbol *symbol, const unsigned char source[], int length); /* Grid Matrix */
extern int han_xin(struct zint_symbol * symbol, const unsigned char source[], int length); /* Han Xin */
#ifndef NO_PNG
extern int png_handle(struct zint_symbol *symbol, int rotate_angle);
@ -473,6 +474,7 @@ int ZBarcode_ValidID(int symbol_id) {
case BARCODE_CHANNEL:
case BARCODE_CODEONE:
case BARCODE_GRIDMATRIX:
case BARCODE_HANXIN:
result = 1;
break;
}
@ -491,6 +493,8 @@ static int extended_charset(struct zint_symbol *symbol, const unsigned char *sou
break;
case BARCODE_GRIDMATRIX: error_number = grid_matrix(symbol, source, length);
break;
case BARCODE_HANXIN: error_number = han_xin(symbol, source, length);
break;
}
return error_number;
@ -829,7 +833,17 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
if (symbol->symbology == 111) {
symbol->symbology = BARCODE_HIBC_BLOCKF;
}
if ((symbol->symbology >= 113) && (symbol->symbology <= 127)) {
if ((symbol->symbology == 113) || (symbol->symbology == 114)) {
strcpy(symbol->errtxt, "Symbology out of range, using Code 128");
symbol->symbology = BARCODE_CODE128;
error_number = ZINT_WARN_INVALID_OPTION;
}
if (symbol->symbology == 115) {
strcpy(symbol->errtxt, "Dot Code not supported");
symbol->symbology = BARCODE_CODE128;
error_number = ZINT_WARN_INVALID_OPTION;
}
if ((symbol->symbology >= 117) && (symbol->symbology <= 127)) {
strcpy(symbol->errtxt, "Symbology out of range, using Code 128");
symbol->symbology = BARCODE_CODE128;
error_number = ZINT_WARN_INVALID_OPTION;
@ -882,6 +896,7 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
case BARCODE_QRCODE:
case BARCODE_MICROQR:
case BARCODE_GRIDMATRIX:
case BARCODE_HANXIN:
error_number = extended_charset(symbol, local_source, length);
break;
default:

View File

@ -170,6 +170,10 @@ extern "C" {
#define BARCODE_HIBC_MICPDF 108
#define BARCODE_HIBC_BLOCKF 110
#define BARCODE_HIBC_AZTEC 112
/* Tbarcode 10 codes */
#define BARCODE_DOTCODE 115
#define BARCODE_HANXIN 116
/* Zint specific */
#define BARCODE_AZRUNE 128

View File

@ -1,40 +1,212 @@
# Linux makefile for zint - requires libzint
#
# make compiles zint
# make install copies binary to /usr/local/bin
# make uninstall removes the binary
# make clean cleans up a previous compilation and any object or editor files
#
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.2
ZINT_VERSION:=-DZINT_VERSION=\"2.4.4\"
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
CC := gcc
INCLUDE := -I/usr/include
CFLAGS := -g
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
prefix := /usr
bindir := $(prefix)/bin
DESTDIR :=
LIBS:= -lz -lm -lpng
#=============================================================================
# Special targets provided by cmake.
all: zint zint-static
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
main.o: main.c
$(CC) -c -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend main.c -o main.o
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
zint: main.o
$(CC) -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend -L../backend main.o -o zint -lzint
.SUFFIXES: .hpux_make_needs_suffix_list
zint-static: main.c
$(CC) -Wall $(INCLUDE) $(CFLAGS) $(ZINT_VERSION) -I../backend main.o -o zint-static ../backend/libzint.a $(LIBS)
# Suppress display of executed commands.
$(VERBOSE).SILENT:
.PHONY: install uninstall clean dist
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/hooper/zint/zint-code
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/hooper/zint/zint-code
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: install/strip
.PHONY : install/strip/fast
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Devel\" \"Unspecified\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
# Special rule for the target install/local
install/local/fast: install/local
.PHONY : install/local/fast
# The main all target
all: cmake_check_build_system
cd /home/hooper/zint/zint-code && $(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles /home/hooper/zint/zint-code/frontend/CMakeFiles/progress.marks
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/hooper/zint/zint-code/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
rm -f zint zint-static *.o *.a *~ *.png *.eps *.svg *.log
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/clean
.PHONY : clean
install:
install -D -p zint $(DESTDIR)$(bindir)/zint
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/hooper/zint/zint-code && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
frontend/CMakeFiles/zint_frontend.dir/rule:
cd /home/hooper/zint/zint-code && $(MAKE) -f CMakeFiles/Makefile2 frontend/CMakeFiles/zint_frontend.dir/rule
.PHONY : frontend/CMakeFiles/zint_frontend.dir/rule
# Convenience name for target.
zint_frontend: frontend/CMakeFiles/zint_frontend.dir/rule
.PHONY : zint_frontend
# fast build rule for target.
zint_frontend/fast:
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/build
.PHONY : zint_frontend/fast
main.o: main.c.o
.PHONY : main.o
# target to build an object file
main.c.o:
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/main.c.o
.PHONY : main.c.o
main.i: main.c.i
.PHONY : main.i
# target to preprocess a source file
main.c.i:
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/main.c.i
.PHONY : main.c.i
main.s: main.c.s
.PHONY : main.s
# target to generate assembly for a file
main.c.s:
cd /home/hooper/zint/zint-code && $(MAKE) -f frontend/CMakeFiles/zint_frontend.dir/build.make frontend/CMakeFiles/zint_frontend.dir/main.c.s
.PHONY : main.c.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... install/strip"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... install"
@echo "... zint_frontend"
@echo "... list_install_components"
@echo "... install/local"
@echo "... main.o"
@echo "... main.i"
@echo "... main.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/hooper/zint/zint-code && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
uninstall:
rm $(DESTDIR)$(bindir)/zint

View File

@ -48,22 +48,22 @@ void types(void) {
"13: EAN 63: AP Standard Customer 106: HIBC PDF417\n"
"16: GS1-128 66: AP Reply Paid 108: HIBC MicroPDF417\n"
"18: Codabar 67: AP Routing 112: HIBC Aztec Code\n"
"20: Code 128 68: AP Redirection 128: Aztec Runes\n"
"21: Leitcode 69: ISBN 129: Code 23\n"
"22: Identcode 70: RM4SCC 130: Comp EAN\n"
"23: Code 16k 71: Data Matrix 131: Comp GS1-128\n"
"24: Code 49 72: EAN-14 132: Comp DataBar Omni\n"
"25: Code 93 75: NVE-18 133: Comp DataBar Ltd\n"
"28: Flattermarken 76: Japanese Post 134: Comp DataBar ExpOm\n"
"29: GS1 DataBar Omni 77: Korea Post 135: Comp UPC-A\n"
"30: GS1 DataBar Ltd 79: GS1 DataBar Stack 136: Comp UPC-E\n"
"31: GS1 DataBar ExpOm 80: GS1 DataBar Stack Omni 137: Comp DataBar Stack\n"
"32: Telepen Alpha 81: GS1 DataBar ESO 138: Comp DataBar Stack Omni\n"
"34: UPC-A 82: Planet 139: Comp DataBar ESO\n"
"37: UPC-E 84: MicroPDF 140: Channel Code\n"
"40: Postnet 85: USPS OneCode 141: Code One\n"
"47: MSI Plessey 86: UK Plessey 142: Grid Matrix\n"
"49: FIM 87: Telepen Numeric\n"
"20: Code 128 68: AP Redirection 116: Han Xin Code\n"
"21: Leitcode 69: ISBN 128: Aztec Runes\n"
"22: Identcode 70: RM4SCC 129: Code 32\n"
"23: Code 16k 71: Data Matrix 130: Comp EAN\n"
"24: Code 49 72: EAN-14 131: Comp GS1-128\n"
"25: Code 93 75: NVE-18 132: Comp DataBar Omni\n"
"28: Flattermarken 76: Japanese Post 133: Comp DataBar Ltd\n"
"29: GS1 DataBar Omni 77: Korea Post 134: Comp DataBar ExpOm\n"
"30: GS1 DataBar Ltd 79: GS1 DataBar Stack 135: Comp UPC-A\n"
"31: GS1 DataBar ExpOm 80: GS1 DataBar Stack Omni 136: Comp UPC-E\n"
"32: Telepen Alpha 81: GS1 DataBar ESO 137: Comp DataBar Stack\n"
"34: UPC-A 82: Planet 138: Comp DataBar Stack Omni\n"
"37: UPC-E 84: MicroPDF 139: Comp DataBar ESO\n"
"40: Postnet 85: USPS OneCode 140: Channel Code\n"
"47: MSI Plessey 86: UK Plessey 141: Code One\n"
"49: FIM 87: Telepen Numeric 142: Grid Matrix\n"
"50: Logmars 89: ITF-14\n"
);
}

View File

@ -34,6 +34,7 @@ FORMS += extData.ui \
grpMSICheck.ui \
grpPDF417.ui \
grpQR.ui \
grpHX.ui \
mainWindow.ui
SOURCES += barcodeitem.cpp \

509
frontend_qt4/grpHX.ui Normal file
View File

@ -0,0 +1,509 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpHX</class>
<widget class="QWidget" name="grpHX">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>421</width>
<height>100</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radHXAuto">
<property name="text">
<string>A&amp;utomatic Resizing</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radHXSize">
<property name="text">
<string>Adjust Si&amp;ze To:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cmbHXSize">
<property name="enabled">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>23 x 23 (Version 1)</string>
</property>
</item>
<item>
<property name="text">
<string>25 x 25 (Version 2)</string>
</property>
</item>
<item>
<property name="text">
<string>27 x 27 (Version 3)</string>
</property>
</item>
<item>
<property name="text">
<string>29 x 29 (Version 4)</string>
</property>
</item>
<item>
<property name="text">
<string>31 x 31 (Version 5)</string>
</property>
</item>
<item>
<property name="text">
<string>33 x 33 (Version 6)</string>
</property>
</item>
<item>
<property name="text">
<string>35 x 35 (Version 7)</string>
</property>
</item>
<item>
<property name="text">
<string>37 x 37 (Version 8)</string>
</property>
</item>
<item>
<property name="text">
<string>39 x 39 (Version 9)</string>
</property>
</item>
<item>
<property name="text">
<string>41 x 41 (Version 10)</string>
</property>
</item>
<item>
<property name="text">
<string>43 x 43 (Version 11)</string>
</property>
</item>
<item>
<property name="text">
<string>45 x 45 (Version 12)</string>
</property>
</item>
<item>
<property name="text">
<string>47 x 47 (Version 13)</string>
</property>
</item>
<item>
<property name="text">
<string>49 x 49 (Version 14)</string>
</property>
</item>
<item>
<property name="text">
<string>51 x 51 (Version 15)</string>
</property>
</item>
<item>
<property name="text">
<string>53 x 53 (Version 16)</string>
</property>
</item>
<item>
<property name="text">
<string>55 x 55 (Version 17)</string>
</property>
</item>
<item>
<property name="text">
<string>57 x 57 (Version 18)</string>
</property>
</item>
<item>
<property name="text">
<string>59 x 59 (Version 19)</string>
</property>
</item>
<item>
<property name="text">
<string>61 x 61 (Version 20)</string>
</property>
</item>
<item>
<property name="text">
<string>63 x 63 (Version 21)</string>
</property>
</item>
<item>
<property name="text">
<string>65 x 65 (Version 22)</string>
</property>
</item>
<item>
<property name="text">
<string>67 x 67 (Version 23)</string>
</property>
</item>
<item>
<property name="text">
<string>69 x 69 (Version 24)</string>
</property>
</item>
<item>
<property name="text">
<string>71 x 71 (Version 25)</string>
</property>
</item>
<item>
<property name="text">
<string>73 x 73 (Version 26)</string>
</property>
</item>
<item>
<property name="text">
<string>75 x 75 (Version 27)</string>
</property>
</item>
<item>
<property name="text">
<string>77 x 77 (Version 28)</string>
</property>
</item>
<item>
<property name="text">
<string>79 x 79 (Version 29)</string>
</property>
</item>
<item>
<property name="text">
<string>81 x 81 (Version 30)</string>
</property>
</item>
<item>
<property name="text">
<string>83 x 83 (Version 31)</string>
</property>
</item>
<item>
<property name="text">
<string>85 x 85 (Version 32)</string>
</property>
</item>
<item>
<property name="text">
<string>87 x 87 (Version 33)</string>
</property>
</item>
<item>
<property name="text">
<string>89 x 89 (Version 34)</string>
</property>
</item>
<item>
<property name="text">
<string>91 x 91 (Version 35)</string>
</property>
</item>
<item>
<property name="text">
<string>93 x 93 (Version 36)</string>
</property>
</item>
<item>
<property name="text">
<string>95 x 95 (Version 37)</string>
</property>
</item>
<item>
<property name="text">
<string>97 x 97 (Version 38)</string>
</property>
</item>
<item>
<property name="text">
<string>99 x 99 (Version 39)</string>
</property>
</item>
<item>
<property name="text">
<string>101 x 101 (Version 40)</string>
</property>
</item>
<item>
<property name="text">
<string>103 x 103 (Version 41)</string>
</property>
</item>
<item>
<property name="text">
<string>105 x 105 (Version 42)</string>
</property>
</item>
<item>
<property name="text">
<string>107 x 107 (Version 43)</string>
</property>
</item>
<item>
<property name="text">
<string>109 x 109 (Version 44)</string>
</property>
</item>
<item>
<property name="text">
<string>111 x 111 (Version 45)</string>
</property>
</item>
<item>
<property name="text">
<string>113 x 113 (Version 46)</string>
</property>
</item>
<item>
<property name="text">
<string>115 x 115 (Version 47)</string>
</property>
</item>
<item>
<property name="text">
<string>117 x 117 (Version 48)</string>
</property>
</item>
<item>
<property name="text">
<string>119 x 119 (Version 49)</string>
</property>
</item>
<item>
<property name="text">
<string>121 x 121 (Version 50)</string>
</property>
</item>
<item>
<property name="text">
<string>123 x 123 (Version 51)</string>
</property>
</item>
<item>
<property name="text">
<string>125 x 125 (Version 52)</string>
</property>
</item>
<item>
<property name="text">
<string>127 x 127 (Version 53)</string>
</property>
</item>
<item>
<property name="text">
<string>129 x 129 (Version 54)</string>
</property>
</item>
<item>
<property name="text">
<string>131 x 131 (Version 55)</string>
</property>
</item>
<item>
<property name="text">
<string>133 x 133 (Version 56)</string>
</property>
</item>
<item>
<property name="text">
<string>135 x 135 (Version 57)</string>
</property>
</item>
<item>
<property name="text">
<string>137 x 137 (Version 58)</string>
</property>
</item>
<item>
<property name="text">
<string>139 x 139 (Version 59)</string>
</property>
</item>
<item>
<property name="text">
<string>141 x 141 (Version 60)</string>
</property>
</item>
<item>
<property name="text">
<string>143 x 143 (Version 61)</string>
</property>
</item>
<item>
<property name="text">
<string>145 x 145 (Version 62)</string>
</property>
</item>
<item>
<property name="text">
<string>147 x 147 (Version 63)</string>
</property>
</item>
<item>
<property name="text">
<string>149 x 149 (Version 64)</string>
</property>
</item>
<item>
<property name="text">
<string>151 x 151 (Version 65)</string>
</property>
</item>
<item>
<property name="text">
<string>153 x 153 (Version 66)</string>
</property>
</item>
<item>
<property name="text">
<string>155 x 155 (Version 67)</string>
</property>
</item>
<item>
<property name="text">
<string>157 x 157 (Version 68)</string>
</property>
</item>
<item>
<property name="text">
<string>159 x 159 (Version 69)</string>
</property>
</item>
<item>
<property name="text">
<string>161 x 161 (Version 70)</string>
</property>
</item>
<item>
<property name="text">
<string>163 x 163 (Version 71)</string>
</property>
</item>
<item>
<property name="text">
<string>165 x 165 (Version 72)</string>
</property>
</item>
<item>
<property name="text">
<string>167 x 167 (Version 73)</string>
</property>
</item>
<item>
<property name="text">
<string>169 x 169 (Version 74)</string>
</property>
</item>
<item>
<property name="text">
<string>171 x 171 (Version 75)</string>
</property>
</item>
<item>
<property name="text">
<string>173 x 173 (Version 76)</string>
</property>
</item>
<item>
<property name="text">
<string>175 x 175 (Version 77)</string>
</property>
</item>
<item>
<property name="text">
<string>177 x 177 (Version 78)</string>
</property>
</item>
<item>
<property name="text">
<string>179 x 179 (Version 79)</string>
</property>
</item>
<item>
<property name="text">
<string>181 x 181 (Version 80)</string>
</property>
</item>
<item>
<property name="text">
<string>183 x 183 (Version 81)</string>
</property>
</item>
<item>
<property name="text">
<string>185 x 185 (Version 82)</string>
</property>
</item>
<item>
<property name="text">
<string>187 x 187 (Version 83)</string>
</property>
</item>
<item>
<property name="text">
<string>189 x 189 (Version 84)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radHXECC">
<property name="text">
<string>Add &amp;Error Correction:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="cmbHXECC">
<property name="enabled">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>~8% (Level L1)</string>
</property>
</item>
<item>
<property name="text">
<string>~15% (Level L2)</string>
</property>
</item>
<item>
<property name="text">
<string>~23% (Level L3)</string>
</property>
</item>
<item>
<property name="text">
<string>~30% (Level L4)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -277,7 +277,7 @@
</layout>
</item>
<item>
<widget class="QGroupBox" name="grpAztecMode">
<widget class="QGroupBox" name="grpQRMode">
<property name="minimumSize">
<size>
<width>0</width>
@ -329,8 +329,6 @@
</item>
</layout>
</widget>
<zorder>gridLayoutWidget</zorder>
<zorder></zorder>
</widget>
</item>
</layout>

View File

@ -68,7 +68,8 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
"GS1 DataBar Omnidirectional",
"GS1 DataBar Stacked",
"GS1 DataBar Stacked Omnidirectional",
"ITF-14",
"Han Xin (Chinese Sensible) Code",
"ITF-14",
"International Standard Book Number (ISBN)",
"Japanese Postal Barcode",
"Korean Postal Barcode",
@ -382,6 +383,21 @@ void MainWindow::change_options()
connect(m_optionWidget->findChild<QObject*>("radQRGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radQRHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_HANXIN)
{
QFile file (":/grpHX.ui");
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget=uiload.load(&file);
file.close();
tabMain->insertTab(1,m_optionWidget,tr("Han Xin Code"));
connect(m_optionWidget->findChild<QObject*>("radHXAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radHXSize"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radHXECC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbHXSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbHXECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROQR)
{
@ -676,7 +692,7 @@ void MainWindow::update_preview()
m_bc.bc.setSymbol(BARCODE_HIBC_AZTEC);
break;
case MSI_PLESSEY:
case BARCODE_MSI_PLESSEY:
m_bc.bc.setSymbol(BARCODE_MSI_PLESSEY);
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbMSICheck")->currentIndex());
break;
@ -792,7 +808,16 @@ void MainWindow::update_preview()
if(m_optionWidget->findChild<QRadioButton*>("radC49GS1")->isChecked())
m_bc.bc.setInputMode(GS1_MODE);
break;
case BARCODE_HANXIN:
m_bc.bc.setSymbol(BARCODE_HANXIN);
if(m_optionWidget->findChild<QRadioButton*>("radHXSize")->isChecked())
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbHXSize")->currentIndex() + 1);
if(m_optionWidget->findChild<QRadioButton*>("radHXECC")->isChecked())
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbHXECC")->currentIndex() + 1);
break;
default:
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
break;

View File

@ -74,7 +74,8 @@ public:
RSS_LTD =30,
RSS14 =29,
RSS14STACK =79,
RSS14STACK_OMNI =80,
RSS14STACK_OMNI =80,
HANXIN =116,
ITF14 =89,
ISBNX =69,
JAPANPOST =76,

View File

@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/" >
<qresource prefix="/">
<file>images/zoomout.png</file>
<file>images/rotateleft.png</file>
<file>images/rotateright.png</file>
@ -19,7 +19,8 @@
<file>grpCodeOne.ui</file>
<file>grpC49.ui</file>
<file>grpGrid.ui</file>
<file>grpDBExtend.ui</file>
<file>grpDBExtend.ui</file>
<file>images/zint.png</file>
<file>grpHX.ui</file>
</qresource>
</RCC>