CMakeLists.txt: cmake min required 3.13 -> 3.5 using CMAKE_REQUIRED_LIBRARIES; add ZINT_COVERAGE option

bmp/emf/ps.c: allow for foreground colour in ULTRA
bmp/gif/pcx.c: allow for BARCODE_STDOUT (fflush/fclose)
emf.c: hexagon rotation field not used; dont't use float index in font loop; Windows stdout binary mode
png.c: remove unused 8-bit; simplify libpng error handling and fclose outfile on error
ps.c: fix buffer overflow on colour_to_pscolor() CMYK
tif.c: fix BLACKISZERO indexes
CODE39: simplify check digit setting
reedsol.c: rs_uint_init_gf() log/alog tables must be zeroed
ZBarcode_Encode: debug: fix access out-of-bounds on non-NUL-terminated source if length < 10
manual.txt/zint.h: document NUL-terminated strings
tests: cover further cases for output (bmp/emf/etc), eci/gb18030/gb2312/sjis, reedsol, AZTEC, CODE39
This commit is contained in:
gitlost 2021-07-26 15:29:05 +01:00
parent 059abdf6a1
commit 3f33ed3eb9
90 changed files with 3754 additions and 863 deletions

View File

@ -2,7 +2,7 @@
# Copyright (C) 2009-2021 Robin Stuart <rstuart114@gmail.com> # Copyright (C) 2009-2021 Robin Stuart <rstuart114@gmail.com>
# vim: set ts=4 sw=4 et : # vim: set ts=4 sw=4 et :
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.5)
project(zint-package) project(zint-package)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ -17,9 +17,10 @@ add_definitions(-DZINT_VERSION=\"${ZINT_VERSION}\")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
option(ZINT_DEBUG "Set debug compile flag" OFF) option(ZINT_DEBUG "Set debug compile flags" OFF)
option(ZINT_SANITIZE "Set sanitize compile/link flags" OFF) option(ZINT_SANITIZE "Set sanitize compile/link flags" OFF)
option(ZINT_TEST "Set test compile flag" OFF) option(ZINT_TEST "Set test compile flag" OFF)
option(ZINT_COVERAGE "Set code coverage flags" OFF)
option(ZINT_STATIC "Build static library" OFF) option(ZINT_STATIC "Build static library" OFF)
option(ZINT_USE_PNG "Build with PNG support" ON) option(ZINT_USE_PNG "Build with PNG support" ON)
option(ZINT_USE_QT "Build with QT support" ON) option(ZINT_USE_QT "Build with QT support" ON)
@ -51,6 +52,7 @@ if(ZINT_DEBUG)
if(CXX_COMPILER_FLAG_G) if(CXX_COMPILER_FLAG_G)
add_compile_options("-g") add_compile_options("-g")
endif() endif()
check_cxx_compiler_flag("-O0" CXX_COMPILER_FLAG_O0) check_cxx_compiler_flag("-O0" CXX_COMPILER_FLAG_O0)
if(CXX_COMPILER_FLAG_O0) if(CXX_COMPILER_FLAG_O0)
add_compile_options("-O0") add_compile_options("-O0")
@ -61,6 +63,21 @@ if(ZINT_TEST)
enable_testing() enable_testing()
endif() endif()
if(ZINT_COVERAGE)
set(CMAKE_REQUIRED_LIBRARIES -fprofile-arcs)
check_cxx_compiler_flag(--coverage CXX_COMPILER_FLAG_COVERAGE)
unset(CMAKE_REQUIRED_LIBRARIES)
if(CXX_COMPILER_FLAG_COVERAGE)
add_compile_options(--coverage)
link_libraries(-fprofile-arcs)
check_cxx_compiler_flag(-O0 CXX_COMPILER_FLAG_O0)
if(CXX_COMPILER_FLAG_O0)
add_compile_options(-O0)
endif()
endif()
endif()
if(ZINT_SANITIZE) if(ZINT_SANITIZE)
if(MSVC) if(MSVC)
if(MSVC_VERSION GREATER_EQUAL 1920) if(MSVC_VERSION GREATER_EQUAL 1920)
@ -70,19 +87,17 @@ if(ZINT_SANITIZE)
message(STATUS "ZINT_SANITIZE: ignoring for MSVC < 2019") message(STATUS "ZINT_SANITIZE: ignoring for MSVC < 2019")
endif() endif()
else() else()
file(WRITE ${CMAKE_BINARY_DIR}/dummy.c "int main() { return 0; }")
set(SANITIZERS address undefined) set(SANITIZERS address undefined)
foreach(sanitizer IN ITEMS ${SANITIZERS}) foreach(sanitizer IN ITEMS ${SANITIZERS})
set(sanitizer_flag "-fsanitize=${sanitizer}") set(CMAKE_REQUIRED_LIBRARIES -fsanitize=${sanitizer})
try_compile(RESULT_VAR ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/dummy.c check_cxx_compiler_flag(-fsanitize=${sanitizer} CXX_COMPILER_FLAG_FSANITIZE_${sanitizer})
COMPILE_DEFINITIONS ${sanitizer_flag} if(CXX_COMPILER_FLAG_FSANITIZE_${sanitizer})
LINK_LIBRARIES ${sanitizer_flag}) add_compile_options(-fsanitize=${sanitizer})
message(STATUS "Support for ${sanitizer_flag} available ... ${RESULT_VAR}") link_libraries(-fsanitize=${sanitizer})
if(RESULT_VAR)
add_compile_options(${sanitizer_flag})
link_libraries(${sanitizer_flag})
endif() endif()
unset(CMAKE_REQUIRED_LIBRARIES)
endforeach() endforeach()
if(NOT ZINT_DEBUG AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") if(NOT ZINT_DEBUG AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# Gives warning on MainWindow::setupUI() and retries (& takes forever) if var-tracking-assignments enabled # Gives warning on MainWindow::setupUI() and retries (& takes forever) if var-tracking-assignments enabled
add_compile_options(-fno-var-tracking-assignments) add_compile_options(-fno-var-tracking-assignments)

View File

@ -192,10 +192,7 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
if (debug) { if (debug) {
printf("First Pass:\n"); printf("First Pass:\n");
for (i = 0; i < src_len; i++) { printf("%.*s\n", src_len, encode_mode);
printf("%c", encode_mode[i]);
}
printf("\n");
} }
// Reduce two letter combinations to one codeword marked as [abcd] in Punct mode // Reduce two letter combinations to one codeword marked as [abcd] in Punct mode
@ -459,14 +456,8 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
} }
if (debug) { if (debug) {
for (i = 0; i < reduced_length; i++) { printf("%.*s\n", reduced_length, reduced_source);
printf("%c", reduced_source[i]); printf("%.*s\n", reduced_length, reduced_encode_mode);
}
printf("\n");
for (i = 0; i < reduced_length; i++) {
printf("%c", reduced_encode_mode[i]);
}
printf("\n");
} }
bp = 0; bp = 0;
@ -840,7 +831,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
char adjusted_string[AZTEC_MAX_CAPACITY]; char adjusted_string[AZTEC_MAX_CAPACITY];
short AztecMap[AZTEC_MAP_SIZE]; short AztecMap[AZTEC_MAP_SIZE];
unsigned char desc_data[4], desc_ecc[6]; unsigned char desc_data[4], desc_ecc[6];
int error_number, ecc_level, compact, data_length, data_maxsize, codeword_size, adjusted_length; int error_number, compact, data_length, data_maxsize, codeword_size, adjusted_length;
int remainder, padbits, count, gs1, adjustment_size; int remainder, padbits, count, gs1, adjustment_size;
int debug = (symbol->debug & ZINT_DEBUG_PRINT), reader = 0; int debug = (symbol->debug & ZINT_DEBUG_PRINT), reader = 0;
int comp_loop = 4; int comp_loop = 4;
@ -878,21 +869,20 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
strcpy(symbol->errtxt, "503: Invalid error correction level - using default instead"); strcpy(symbol->errtxt, "503: Invalid error correction level - using default instead");
if (symbol->warn_level == WARN_FAIL_ALL) { if (symbol->warn_level == WARN_FAIL_ALL) {
return ZINT_ERROR_INVALID_OPTION; return ZINT_ERROR_INVALID_OPTION;
} else { }
error_number = ZINT_WARN_INVALID_OPTION; error_number = ZINT_WARN_INVALID_OPTION;
}
symbol->option_1 = -1; symbol->option_1 = -1;
} }
ecc_level = symbol->option_1;
if ((ecc_level == -1) || (ecc_level == 0)) {
ecc_level = 2;
}
data_maxsize = 0; /* Keep compiler happy! */ data_maxsize = 0; /* Keep compiler happy! */
adjustment_size = 0; adjustment_size = 0;
if (symbol->option_2 == 0) { /* The size of the symbol can be determined by Zint */ if (symbol->option_2 == 0) { /* The size of the symbol can be determined by Zint */
int ecc_level = symbol->option_1;
if ((ecc_level == -1) || (ecc_level == 0)) {
ecc_level = 2;
}
do { do {
/* Decide what size symbol to use - the smallest that fits the data */ /* Decide what size symbol to use - the smallest that fits the data */
compact = 0; /* 1 = Aztec Compact, 0 = Normal Aztec */ compact = 0; /* 1 = Aztec Compact, 0 = Normal Aztec */
@ -1013,6 +1003,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
if (padbits == codeword_size) { if (padbits == codeword_size) {
padbits = 0; padbits = 0;
} }
if (debug) printf("Remainder: %d Pad bits: %d\n", remainder, padbits);
for (i = 0; i < padbits; i++) { for (i = 0; i < padbits; i++) {
adjusted_string[adjusted_length++] = '1'; adjusted_string[adjusted_length++] = '1';
@ -1102,6 +1093,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
if (padbits == codeword_size) { if (padbits == codeword_size) {
padbits = 0; padbits = 0;
} }
if (debug) printf("Remainder: %d Pad bits: %d\n", remainder, padbits);
for (i = 0; i < padbits; i++) { for (i = 0; i < padbits; i++) {
adjusted_string[adjusted_length++] = '1'; adjusted_string[adjusted_length++] = '1';
@ -1132,10 +1124,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
if (debug) { if (debug) {
printf("Codewords:\n"); printf("Codewords:\n");
for (i = 0; i < (adjusted_length / codeword_size); i++) { for (i = 0; i < (adjusted_length / codeword_size); i++) {
for (j = 0; j < codeword_size; j++) { printf("%.*s ", codeword_size, adjusted_string + i * codeword_size);
printf("%c", adjusted_string[(i * codeword_size) + j]);
}
printf(" ");
} }
printf("\n"); printf("\n");
} }
@ -1157,12 +1146,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
if (debug) { if (debug) {
printf("Generating a %s symbol with %d layers\n", compact ? "compact" : "full-size", layers); printf("Generating a %s symbol with %d layers\n", compact ? "compact" : "full-size", layers);
printf("Requires "); printf("Requires %d", compact ? AztecCompactSizes[layers - 1] : AztecSizes[layers - 1]);
if (compact) {
printf("%d", AztecCompactSizes[layers - 1]);
} else {
printf("%d", AztecSizes[layers - 1]);
}
printf(" codewords of %d-bits\n", codeword_size); printf(" codewords of %d-bits\n", codeword_size);
printf(" (%d data words, %d ecc words)\n", data_blocks, ecc_blocks); printf(" (%d data words, %d ecc words)\n", data_blocks, ecc_blocks);
} }
@ -1431,7 +1415,7 @@ INTERNAL int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int
input_value = 0; input_value = 0;
if (length > 3) { if (length > 3) {
strcpy(symbol->errtxt, "507: Input too large (3 character maximum)"); strcpy(symbol->errtxt, "507: Input too large (3 character maximum)");
return ZINT_ERROR_INVALID_DATA; return ZINT_ERROR_TOO_LONG;
} }
error_number = is_sane(NEON, source, length); error_number = is_sane(NEON, source, length);
if (error_number != 0) { if (error_number != 0) {

View File

@ -54,10 +54,30 @@ INTERNAL int bmp_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
color_ref_t bg_color_ref; color_ref_t bg_color_ref;
color_ref_t fg_color_ref; color_ref_t fg_color_ref;
color_ref_t ultra_color_ref[8]; color_ref_t ultra_color_ref[8];
int ultra_fg_index = 9;
const int output_to_stdout = symbol->output_options & BARCODE_STDOUT; /* Suppress gcc -fanalyzer warning */
fg_color_ref.red = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
fg_color_ref.green = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
fg_color_ref.blue = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
fg_color_ref.reserved = 0x00;
bg_color_ref.red = (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]);
bg_color_ref.green = (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]);
bg_color_ref.blue = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]);
bg_color_ref.reserved = 0x00;
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for (i = 0; i < 8; i++) {
ultra_color_ref[i].red = colour_to_red(i + 1);
ultra_color_ref[i].green = colour_to_green(i + 1);
ultra_color_ref[i].blue = colour_to_blue(i + 1);
ultra_color_ref[i].reserved = 0x00;
if (memcmp(&ultra_color_ref[i], &fg_color_ref, sizeof(fg_color_ref)) == 0) {
ultra_fg_index = i + 1;
}
}
bits_per_pixel = 4; bits_per_pixel = 4;
colour_count = 9; colour_count = ultra_fg_index == 9 ? 10 : 9;
} else { } else {
bits_per_pixel = 1; bits_per_pixel = 1;
colour_count = 2; colour_count = 2;
@ -70,29 +90,13 @@ INTERNAL int bmp_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
bitmap_file_start = (unsigned char *) malloc(file_size); bitmap_file_start = (unsigned char *) malloc(file_size);
if (bitmap_file_start == NULL) { if (bitmap_file_start == NULL) {
strcpy(symbol->errtxt, "602: Out of memory"); strcpy(symbol->errtxt, "602: Insufficient memory for BMP file buffer");
return ZINT_ERROR_MEMORY; return ZINT_ERROR_MEMORY;
} }
memset(bitmap_file_start, 0, file_size); /* Not required but keeps padding bytes consistent */ memset(bitmap_file_start, 0, file_size); /* Not required but keeps padding bytes consistent */
bitmap = bitmap_file_start + data_offset; bitmap = bitmap_file_start + data_offset;
fg_color_ref.red = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
fg_color_ref.green = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
fg_color_ref.blue = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
fg_color_ref.reserved = 0x00;
bg_color_ref.red = (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]);
bg_color_ref.green = (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]);
bg_color_ref.blue = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]);
bg_color_ref.reserved = 0x00;
for (i = 0; i < 8; i++) {
ultra_color_ref[i].red = colour_to_red(i + 1);
ultra_color_ref[i].green = colour_to_green(i + 1);
ultra_color_ref[i].blue = colour_to_blue(i + 1);
ultra_color_ref[i].reserved = 0x00;
}
/* Pixel Plotting */ /* Pixel Plotting */
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for (row = 0; row < symbol->bitmap_height; row++) { for (row = 0; row < symbol->bitmap_height; row++) {
@ -123,6 +127,9 @@ INTERNAL int bmp_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
case 'W': // White case 'W': // White
bitmap[i] += 8 << (4 * (1 - (column % 2))); bitmap[i] += 8 << (4 * (1 - (column % 2)));
break; break;
case '1': // Foreground
bitmap[i] += ultra_fg_index << (4 * (1 - (column % 2)));
break;
} }
} }
} }
@ -168,16 +175,20 @@ INTERNAL int bmp_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
bmp_posn += sizeof(color_ref_t); bmp_posn += sizeof(color_ref_t);
memcpy(bmp_posn, &ultra_color_ref[i], sizeof(color_ref_t)); memcpy(bmp_posn, &ultra_color_ref[i], sizeof(color_ref_t));
} }
if (ultra_fg_index == 9) {
bmp_posn += sizeof(color_ref_t);
memcpy(bmp_posn, &fg_color_ref, sizeof(color_ref_t));
}
} else { } else {
bmp_posn += sizeof(color_ref_t); bmp_posn += sizeof(color_ref_t);
memcpy(bmp_posn, &fg_color_ref, sizeof(color_ref_t)); memcpy(bmp_posn, &fg_color_ref, sizeof(color_ref_t));
} }
/* Open output file in binary mode */ /* Open output file in binary mode */
if ((symbol->output_options & BARCODE_STDOUT) != 0) { if (output_to_stdout) {
#ifdef _MSC_VER #ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) { if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
sprintf(symbol->errtxt, "600: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "600: Could not set stdout to binary (%d: %.30s)", errno, strerror(errno));
free(bitmap_file_start); free(bitmap_file_start);
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
@ -186,13 +197,18 @@ INTERNAL int bmp_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
} else { } else {
if (!(bmp_file = fopen(symbol->outfile, "wb"))) { if (!(bmp_file = fopen(symbol->outfile, "wb"))) {
free(bitmap_file_start); free(bitmap_file_start);
sprintf(symbol->errtxt, "601: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "601: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
} }
fwrite(bitmap_file_start, file_header.file_size, 1, bmp_file); fwrite(bitmap_file_start, file_header.file_size, 1, bmp_file);
if (output_to_stdout) {
fflush(bmp_file);
} else {
fclose(bmp_file); fclose(bmp_file);
}
free(bitmap_file_start); free(bitmap_file_start);
return 0; return 0;

View File

@ -259,33 +259,8 @@ INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length)
if (symbol->option_2 == 1) { if (symbol->option_2 == 1) {
char check_digit; char check_digit;
counter = counter % 43; counter %= 43;
if (counter < 10) { check_digit = SILVER[counter];
check_digit = itoc(counter);
} else {
if (counter < 36) {
check_digit = (counter - 10) + 'A';
} else {
switch (counter) {
case 36: check_digit = '-';
break;
case 37: check_digit = '.';
break;
case 38: check_digit = ' ';
break;
case 39: check_digit = '$';
break;
case 40: check_digit = '/';
break;
case 41: check_digit = '+';
break;
case 42: check_digit = 37;
break;
default: check_digit = ' ';
break; /* Keep compiler happy */
}
}
}
lookup(SILVER, C39Table, check_digit, dest); lookup(SILVER, C39Table, check_digit, dest);
/* Display a space check digit as _, otherwise it looks like an error */ /* Display a space check digit as _, otherwise it looks like an error */
@ -727,7 +702,8 @@ INTERNAL int channel_code(struct zint_symbol *symbol, unsigned char source[], in
if (channels == 8) { if (channels == 8) {
sprintf(symbol->errtxt, "305: Value out of range (0 to %d)", max_ranges[channels]); sprintf(symbol->errtxt, "305: Value out of range (0 to %d)", max_ranges[channels]);
} else { } else {
sprintf(symbol->errtxt, "335: Value out of range (0 to %d) for %d channels", max_ranges[channels], channels); sprintf(symbol->errtxt, "335: Value out of range (0 to %d) for %d channels",
max_ranges[channels], channels);
} }
return ZINT_ERROR_INVALID_DATA; return ZINT_ERROR_INVALID_DATA;
} }

View File

@ -38,6 +38,8 @@
#include <assert.h> #include <assert.h>
#include <math.h> #include <math.h>
#ifdef _MSC_VER #ifdef _MSC_VER
#include <io.h>
#include <fcntl.h>
#include <malloc.h> #include <malloc.h>
#endif #endif
#include "common.h" #include "common.h"
@ -172,31 +174,34 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
float previous_diameter; float previous_diameter;
float radius, half_radius, half_sqrt3_radius; float radius, half_radius, half_sqrt3_radius;
int colours_used = 0; int colours_used = 0;
int rectangle_count_bycolour[9]; int rectangle_bycolour[9] = {0};
unsigned char *this_string[6];
int width, height; int width, height;
int utfle_len;
int bumped_len;
int draw_background = 1; int draw_background = 1;
int bold; int bold;
const int output_to_stdout = symbol->output_options & BARCODE_STDOUT;
float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy;
struct zint_vector_rect *rect; struct zint_vector_rect *rect;
struct zint_vector_circle *circ; struct zint_vector_circle *circ;
struct zint_vector_hexagon *hex; struct zint_vector_hexagon *hex;
struct zint_vector_string *str; struct zint_vector_string *str;
/* Allow for up to 6 strings (current max 3 for UPC/EAN) */
unsigned char *this_string[6];
emr_exttextoutw_t text[6];
float text_fsizes[6];
int text_haligns[6];
emr_header_t emr_header; emr_header_t emr_header;
emr_eof_t emr_eof; emr_eof_t emr_eof;
emr_mapmode_t emr_mapmode; emr_mapmode_t emr_mapmode;
emr_setworldtransform_t emr_setworldtransform; emr_setworldtransform_t emr_setworldtransform;
emr_createbrushindirect_t emr_createbrushindirect_fg; emr_createbrushindirect_t emr_createbrushindirect_fg;
emr_createbrushindirect_t emr_createbrushindirect_bg; emr_createbrushindirect_t emr_createbrushindirect_bg;
emr_createbrushindirect_t emr_createbrushindirect_colour[8]; // Used for colour symbols only emr_createbrushindirect_t emr_createbrushindirect_colour[9]; // Used for colour symbols only
emr_selectobject_t emr_selectobject_fgbrush; emr_selectobject_t emr_selectobject_fgbrush;
emr_selectobject_t emr_selectobject_bgbrush; emr_selectobject_t emr_selectobject_bgbrush;
emr_selectobject_t emr_selectobject_colour[8]; // Used for colour symbols only emr_selectobject_t emr_selectobject_colour[9]; // Used for colour symbols only
emr_createpen_t emr_createpen; emr_createpen_t emr_createpen;
emr_selectobject_t emr_selectobject_pen; emr_selectobject_t emr_selectobject_pen;
emr_rectangle_t background; emr_rectangle_t background;
@ -222,11 +227,13 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
emr_rectangle_t *rectangle; emr_rectangle_t *rectangle;
emr_ellipse_t *circle; emr_ellipse_t *circle;
emr_polygon_t *hexagon; emr_polygon_t *hexagon;
emr_exttextoutw_t *text;
float *text_fsizes;
int *text_haligns;
#endif #endif
if (symbol->vector == NULL) {
strcpy(symbol->errtxt, "643: Vector header NULL");
return ZINT_ERROR_INVALID_DATA;
}
fgred = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]); fgred = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
fggrn = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]); fggrn = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
fgblu = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]); fgblu = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
@ -250,36 +257,34 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
emr_rectangle_t rectangle[rectangle_count ? rectangle_count : 1]; emr_rectangle_t rectangle[rectangle_count ? rectangle_count : 1];
emr_ellipse_t circle[circle_count ? circle_count : 1]; emr_ellipse_t circle[circle_count ? circle_count : 1];
emr_polygon_t hexagon[hexagon_count ? hexagon_count : 1]; emr_polygon_t hexagon[hexagon_count ? hexagon_count : 1];
emr_exttextoutw_t text[string_count ? string_count: 1];
float text_fsizes[string_count ? string_count: 1];
int text_haligns[string_count ? string_count: 1];
#else #else
rectangle = (emr_rectangle_t*) _alloca(rectangle_count * sizeof(emr_rectangle_t)); rectangle = (emr_rectangle_t*) _alloca(rectangle_count * sizeof(emr_rectangle_t));
circle = (emr_ellipse_t*) _alloca(circle_count * sizeof(emr_ellipse_t)); circle = (emr_ellipse_t*) _alloca(circle_count * sizeof(emr_ellipse_t));
hexagon = (emr_polygon_t*) _alloca(hexagon_count * sizeof(emr_polygon_t)); hexagon = (emr_polygon_t*) _alloca(hexagon_count * sizeof(emr_polygon_t));
text = (emr_exttextoutw_t*) _alloca(string_count * sizeof(emr_exttextoutw_t));
text_fsizes = (float *) _alloca(string_count * sizeof(float));
text_haligns = (int *) _alloca(string_count * sizeof(int));
#endif #endif
// Calculate how many coloured rectangles // Calculate how many coloured rectangles
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for (i = 0; i <= 8; i++) {
rectangle_count_bycolour[i] = 0;
}
rect = symbol->vector->rectangles; rect = symbol->vector->rectangles;
while (rect) { while (rect) {
if (rectangle_count_bycolour[rect->colour] == 0) { if (rect->colour == -1) { /* Foreground colour */
if (rectangle_bycolour[0] == 0) {
colours_used++; colours_used++;
rectangle_bycolour[0] = 1;
}
} else {
if (rectangle_bycolour[rect->colour] == 0) {
colours_used++;
rectangle_bycolour[rect->colour] = 1;
}
} }
rectangle_count_bycolour[rect->colour]++;
rect = rect->next; rect = rect->next;
} }
} }
width = (int) ceil(symbol->vector->width); width = (int) ceilf(symbol->vector->width);
height = (int) ceil(symbol->vector->height); height = (int) ceilf(symbol->vector->height);
/* Header */ /* Header */
emr_header.type = 0x00000001; // EMR_HEADER emr_header.type = 0x00000001; // EMR_HEADER
@ -295,7 +300,7 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
emr_header.emf_header.record_signature = 0x464d4520; // ENHMETA_SIGNATURE emr_header.emf_header.record_signature = 0x464d4520; // ENHMETA_SIGNATURE
emr_header.emf_header.version = 0x00010000; emr_header.emf_header.version = 0x00010000;
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
emr_header.emf_header.handles = 11; // Number of graphics objects emr_header.emf_header.handles = 12; // Number of graphics objects
} else { } else {
emr_header.emf_header.handles = fsize2 != 0.0f ? 5 : 4; emr_header.emf_header.handles = fsize2 != 0.0f ? 5 : 4;
} }
@ -350,14 +355,20 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
recordcount++; recordcount++;
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for (i = 0; i < 8; i++) { for (i = 0; i < 9; i++) {
emr_createbrushindirect_colour[i].type = 0x00000027; // EMR_CREATEBRUSHINDIRECT emr_createbrushindirect_colour[i].type = 0x00000027; // EMR_CREATEBRUSHINDIRECT
emr_createbrushindirect_colour[i].size = 24; emr_createbrushindirect_colour[i].size = 24;
emr_createbrushindirect_colour[i].ih_brush = 2 + i; emr_createbrushindirect_colour[i].ih_brush = 2 + i;
emr_createbrushindirect_colour[i].log_brush.brush_style = 0x0000; // BS_SOLID emr_createbrushindirect_colour[i].log_brush.brush_style = 0x0000; // BS_SOLID
emr_createbrushindirect_colour[i].log_brush.color.red = colour_to_red(i + 1); if (i == 0) {
emr_createbrushindirect_colour[i].log_brush.color.green = colour_to_green(i + 1); emr_createbrushindirect_colour[i].log_brush.color.red = fgred;
emr_createbrushindirect_colour[i].log_brush.color.blue = colour_to_blue(i + 1); emr_createbrushindirect_colour[i].log_brush.color.green = fggrn;
emr_createbrushindirect_colour[i].log_brush.color.blue = fgblu;
} else {
emr_createbrushindirect_colour[i].log_brush.color.red = colour_to_red(i);
emr_createbrushindirect_colour[i].log_brush.color.green = colour_to_green(i);
emr_createbrushindirect_colour[i].log_brush.color.blue = colour_to_blue(i);
}
emr_createbrushindirect_colour[i].log_brush.color.reserved = 0; emr_createbrushindirect_colour[i].log_brush.color.reserved = 0;
emr_createbrushindirect_colour[i].log_brush.brush_hatch = 0x0006; // HS_SOLIDCLR emr_createbrushindirect_colour[i].log_brush.brush_hatch = 0x0006; // HS_SOLIDCLR
} }
@ -384,7 +395,7 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
recordcount++; recordcount++;
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for (i = 0; i < 8; i++) { for (i = 0; i < 9; i++) {
emr_selectobject_colour[i].type = 0x00000025; // EMR_SELECTOBJECT emr_selectobject_colour[i].type = 0x00000025; // EMR_SELECTOBJECT
emr_selectobject_colour[i].size = 12; emr_selectobject_colour[i].size = 12;
emr_selectobject_colour[i].ih_object = 2 + i; emr_selectobject_colour[i].ih_object = 2 + i;
@ -402,7 +413,7 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
/* Create Pens */ /* Create Pens */
emr_createpen.type = 0x00000026; // EMR_CREATEPEN emr_createpen.type = 0x00000026; // EMR_CREATEPEN
emr_createpen.size = 28; emr_createpen.size = 28;
emr_createpen.ih_pen = 10; emr_createpen.ih_pen = 11;
emr_createpen.log_pen.pen_style = 0x00000005; // PS_NULL emr_createpen.log_pen.pen_style = 0x00000005; // PS_NULL
emr_createpen.log_pen.width.x = 1; emr_createpen.log_pen.width.x = 1;
emr_createpen.log_pen.width.y = 0; // ignored emr_createpen.log_pen.width.y = 0; // ignored
@ -415,7 +426,7 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
emr_selectobject_pen.type = 0x00000025; // EMR_SELECTOBJECT emr_selectobject_pen.type = 0x00000025; // EMR_SELECTOBJECT
emr_selectobject_pen.size = 12; emr_selectobject_pen.size = 12;
emr_selectobject_pen.ih_object = 10; emr_selectobject_pen.ih_object = 11;
bytecount += 12; bytecount += 12;
recordcount++; recordcount++;
@ -483,46 +494,20 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
half_radius = (float) (0.25 * previous_diameter); half_radius = (float) (0.25 * previous_diameter);
half_sqrt3_radius = (float) (0.43301270189221932338 * previous_diameter); half_sqrt3_radius = (float) (0.43301270189221932338 * previous_diameter);
} }
if ((hex->rotation == 0) || (hex->rotation == 180)) {
ay = hex->y + radius;
by = hex->y + half_radius;
cy = hex->y - half_radius;
dy = hex->y - radius;
ey = hex->y - half_radius;
fy = hex->y + half_radius;
ax = hex->x;
bx = hex->x + half_sqrt3_radius;
cx = hex->x + half_sqrt3_radius;
dx = hex->x;
ex = hex->x - half_sqrt3_radius;
fx = hex->x - half_sqrt3_radius;
} else {
ay = hex->y;
by = hex->y + half_sqrt3_radius;
cy = hex->y + half_sqrt3_radius;
dy = hex->y;
ey = hex->y - half_sqrt3_radius;
fy = hex->y - half_sqrt3_radius;
ax = hex->x - radius;
bx = hex->x - half_radius;
cx = hex->x + half_radius;
dx = hex->x + radius;
ex = hex->x + half_radius;
fx = hex->x - half_radius;
}
hexagon[this_hexagon].a_points_a.x = (int32_t) ax; /* Note rotation done via world transform */
hexagon[this_hexagon].a_points_a.y = (int32_t) ay; hexagon[this_hexagon].a_points_a.x = (int32_t) (hex->x);
hexagon[this_hexagon].a_points_b.x = (int32_t) bx; hexagon[this_hexagon].a_points_a.y = (int32_t) (hex->y + radius);
hexagon[this_hexagon].a_points_b.y = (int32_t) by; hexagon[this_hexagon].a_points_b.x = (int32_t) (hex->x + half_sqrt3_radius);
hexagon[this_hexagon].a_points_c.x = (int32_t) cx; hexagon[this_hexagon].a_points_b.y = (int32_t) (hex->y + half_radius);
hexagon[this_hexagon].a_points_c.y = (int32_t) cy; hexagon[this_hexagon].a_points_c.x = (int32_t) (hex->x + half_sqrt3_radius);
hexagon[this_hexagon].a_points_d.x = (int32_t) dx; hexagon[this_hexagon].a_points_c.y = (int32_t) (hex->y - half_radius);
hexagon[this_hexagon].a_points_d.y = (int32_t) dy; hexagon[this_hexagon].a_points_d.x = (int32_t) (hex->x);
hexagon[this_hexagon].a_points_e.x = (int32_t) ex; hexagon[this_hexagon].a_points_d.y = (int32_t) (hex->y - radius);
hexagon[this_hexagon].a_points_e.y = (int32_t) ey; hexagon[this_hexagon].a_points_e.x = (int32_t) (hex->x - half_sqrt3_radius);
hexagon[this_hexagon].a_points_f.x = (int32_t) fx; hexagon[this_hexagon].a_points_e.y = (int32_t) (hex->y - half_radius);
hexagon[this_hexagon].a_points_f.y = (int32_t) fy; hexagon[this_hexagon].a_points_f.x = (int32_t) (hex->x - half_sqrt3_radius);
hexagon[this_hexagon].a_points_f.y = (int32_t) (hex->y + half_radius);
hexagon[this_hexagon].bounds.top = hexagon[this_hexagon].a_points_d.y; hexagon[this_hexagon].bounds.top = hexagon[this_hexagon].a_points_d.y;
hexagon[this_hexagon].bounds.bottom = hexagon[this_hexagon].a_points_a.y; hexagon[this_hexagon].bounds.bottom = hexagon[this_hexagon].a_points_a.y;
@ -541,7 +526,7 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
memset(&emr_extcreatefontindirectw, 0, sizeof(emr_extcreatefontindirectw)); memset(&emr_extcreatefontindirectw, 0, sizeof(emr_extcreatefontindirectw));
emr_extcreatefontindirectw.type = 0x00000052; // EMR_EXTCREATEFONTINDIRECTW emr_extcreatefontindirectw.type = 0x00000052; // EMR_EXTCREATEFONTINDIRECTW
emr_extcreatefontindirectw.size = 104; emr_extcreatefontindirectw.size = 104;
emr_extcreatefontindirectw.ih_fonts = 11; emr_extcreatefontindirectw.ih_fonts = 12;
emr_extcreatefontindirectw.elw.height = (int32_t) fsize; emr_extcreatefontindirectw.elw.height = (int32_t) fsize;
emr_extcreatefontindirectw.elw.width = 0; // automatic emr_extcreatefontindirectw.elw.width = 0; // automatic
emr_extcreatefontindirectw.elw.weight = bold ? 700 : 400; emr_extcreatefontindirectw.elw.weight = bold ? 700 : 400;
@ -555,20 +540,20 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
emr_selectobject_font.type = 0x00000025; // EMR_SELECTOBJECT emr_selectobject_font.type = 0x00000025; // EMR_SELECTOBJECT
emr_selectobject_font.size = 12; emr_selectobject_font.size = 12;
emr_selectobject_font.ih_object = 11; emr_selectobject_font.ih_object = 12;
bytecount += 12; bytecount += 12;
recordcount++; recordcount++;
if (fsize2) { if (fsize2) {
memcpy(&emr_extcreatefontindirectw2, &emr_extcreatefontindirectw, sizeof(emr_extcreatefontindirectw)); memcpy(&emr_extcreatefontindirectw2, &emr_extcreatefontindirectw, sizeof(emr_extcreatefontindirectw));
emr_extcreatefontindirectw2.ih_fonts = 12; emr_extcreatefontindirectw2.ih_fonts = 13;
emr_extcreatefontindirectw2.elw.height = (int32_t) fsize2; emr_extcreatefontindirectw2.elw.height = (int32_t) fsize2;
bytecount += 104; bytecount += 104;
recordcount++; recordcount++;
emr_selectobject_font2.type = 0x00000025; // EMR_SELECTOBJECT emr_selectobject_font2.type = 0x00000025; // EMR_SELECTOBJECT
emr_selectobject_font2.size = 12; emr_selectobject_font2.size = 12;
emr_selectobject_font2.ih_object = 12; emr_selectobject_font2.ih_object = 13;
bytecount += 12; bytecount += 12;
recordcount++; recordcount++;
} }
@ -602,10 +587,12 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
// Text // Text
this_text = 0; this_text = 0;
// Loop over font sizes so that they're grouped together, so only have to select font twice at most // Loop over font sizes so that they're grouped together, so only have to select font twice at most
for (current_fsize = fsize; current_fsize; current_fsize = fsize2) { for (i = 0, current_fsize = fsize; i < 2 && current_fsize; i++, current_fsize = fsize2) {
str = symbol->vector->strings; str = symbol->vector->strings;
current_halign = -1; current_halign = -1;
while (str) { while (str) {
int utfle_len;
int bumped_len;
if (str->fsize != current_fsize) { if (str->fsize != current_fsize) {
str = str->next; str = str->next;
continue; continue;
@ -654,9 +641,6 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
this_text++; this_text++;
str = str->next; str = str->next;
} }
if (current_fsize == fsize2) {
break;
}
} }
/* Create EOF record */ /* Create EOF record */
@ -678,15 +662,20 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
emr_header.emf_header.records = recordcount; emr_header.emf_header.records = recordcount;
/* Send EMF data to file */ /* Send EMF data to file */
if (symbol->output_options & BARCODE_STDOUT) { if (output_to_stdout) {
#ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
sprintf(symbol->errtxt, "642: Could not set stdout to binary (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS;
}
#endif
emf_file = stdout; emf_file = stdout;
} else { } else {
emf_file = fopen(symbol->outfile, "wb"); if (!(emf_file = fopen(symbol->outfile, "wb"))) {
}
if (emf_file == NULL) {
sprintf(symbol->errtxt, "640: Could not open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "640: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
}
fwrite(&emr_header, sizeof(emr_header_t), 1, emf_file); fwrite(&emr_header, sizeof(emr_header_t), 1, emf_file);
@ -699,8 +688,8 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
fwrite(&emr_createbrushindirect_bg, sizeof(emr_createbrushindirect_t), 1, emf_file); fwrite(&emr_createbrushindirect_bg, sizeof(emr_createbrushindirect_t), 1, emf_file);
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for (i = 0; i < 8; i++) { for (i = 0; i < 9; i++) {
if (rectangle_count_bycolour[i + 1]) { if (rectangle_bycolour[i]) {
fwrite(&emr_createbrushindirect_colour[i], sizeof(emr_createbrushindirect_t), 1, emf_file); fwrite(&emr_createbrushindirect_colour[i], sizeof(emr_createbrushindirect_t), 1, emf_file);
} }
} }
@ -724,14 +713,14 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
} }
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for(i = 0; i < 8; i++) { for (i = 0; i < 9; i++) {
if (rectangle_count_bycolour[i + 1]) { if (rectangle_bycolour[i]) {
fwrite(&emr_selectobject_colour[i], sizeof(emr_selectobject_t), 1, emf_file); fwrite(&emr_selectobject_colour[i], sizeof(emr_selectobject_t), 1, emf_file);
rect = symbol->vector->rectangles; rect = symbol->vector->rectangles;
this_rectangle = 0; this_rectangle = 0;
while (rect) { while (rect) {
if (rect->colour == i + 1) { if ((i == 0 && rect->colour == -1) || rect->colour == i) {
fwrite(&rectangle[this_rectangle], sizeof(emr_rectangle_t), 1, emf_file); fwrite(&rectangle[this_rectangle], sizeof(emr_rectangle_t), 1, emf_file);
} }
this_rectangle++; this_rectangle++;
@ -802,7 +791,7 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) {
fwrite(&emr_eof, sizeof(emr_eof_t), 1, emf_file); fwrite(&emr_eof, sizeof(emr_eof_t), 1, emf_file);
if (symbol->output_options & BARCODE_STDOUT) { if (output_to_stdout) {
fflush(emf_file); fflush(emf_file);
} else { } else {
fclose(emf_file); fclose(emf_file);

View File

@ -2888,8 +2888,8 @@ INTERNAL int gb18030_utf8(struct zint_symbol *symbol, const unsigned char source
gbdata[j] = utfdata[i]; gbdata[j] = utfdata[i];
} else { } else {
ret = gb18030_wctomb_zint(gbdata + j, gbdata + j + 1, utfdata[i]); ret = gb18030_wctomb_zint(gbdata + j, gbdata + j + 1, utfdata[i]);
if (ret == 0) { if (ret == 0) { /* Should never happen, as GB 18030 is a UTF i.e. maps all Unicode codepoints */
strcpy(symbol->errtxt, "820: Invalid character in input data"); strcpy(symbol->errtxt, "820: Invalid character in input data"); /* Not reached */
return ZINT_ERROR_INVALID_DATA; return ZINT_ERROR_INVALID_DATA;
} }
if (ret == 4) { if (ret == 4) {

View File

@ -81,7 +81,7 @@ static unsigned char NextPaletteIndex(statestruct *pState)
} }
static char BufferNextByte(statestruct *pState) { static int BufferNextByte(statestruct *pState) {
(pState->OutPosCur)++; (pState->OutPosCur)++;
/* Check if this position is a byte count position /* Check if this position is a byte count position
* fg_f_bytecountbyte_set indicates, if byte count position bytes should be * fg_f_bytecountbyte_set indicates, if byte count position bytes should be
@ -102,11 +102,10 @@ static char BufferNextByte(statestruct *pState) {
return 0; return 0;
} }
static char AddCodeToBuffer(statestruct *pState, unsigned short CodeIn, unsigned char CodeBits) { static int AddCodeToBuffer(statestruct *pState, unsigned short CodeIn, unsigned char CodeBits) {
/* Check, if we may fill up the current byte completely */ /* Check, if we may fill up the current byte completely */
if (CodeBits >= pState->OutBitsFree) { if (CodeBits >= pState->OutBitsFree) {
(pState->pOut)[pState->OutPosCur] |= (unsigned char) (pState->pOut)[pState->OutPosCur] |= (unsigned char) (CodeIn << (8 - pState->OutBitsFree));
(CodeIn << (8 - pState->OutBitsFree));
if (BufferNextByte(pState)) if (BufferNextByte(pState))
return -1; return -1;
CodeIn = (unsigned short) (CodeIn >> pState->OutBitsFree); CodeIn = (unsigned short) (CodeIn >> pState->OutBitsFree);
@ -123,8 +122,7 @@ static char AddCodeToBuffer(statestruct *pState, unsigned short CodeIn, unsigned
} }
/* The remaining bits of CodeIn fit in the current byte. */ /* The remaining bits of CodeIn fit in the current byte. */
if (CodeBits > 0) { if (CodeBits > 0) {
(pState->pOut)[pState->OutPosCur] |= (unsigned char) (pState->pOut)[pState->OutPosCur] |= (unsigned char) (CodeIn << (8 - pState->OutBitsFree));
(CodeIn << (8 - pState->OutBitsFree));
pState->OutBitsFree -= CodeBits; pState->OutBitsFree -= CodeBits;
} }
return 0; return 0;
@ -149,7 +147,7 @@ static unsigned short FindPixelOutlet(statestruct *pState, unsigned short HeadNo
return 0; return 0;
} }
static char NextCode(statestruct *pState, unsigned char * pPixelValueCur, unsigned char CodeBits) { static int NextCode(statestruct *pState, unsigned char *pPixelValueCur, unsigned char CodeBits) {
unsigned short UpNode; unsigned short UpNode;
unsigned short DownNode; unsigned short DownNode;
/* start with the root node for last pixel chain */ /* start with the root node for last pixel chain */
@ -232,7 +230,7 @@ static int gif_lzw(statestruct *pState, int paletteBitSize) {
return 0; return 0;
for (;;) { for (;;) {
char Res; int Res;
/* generate and save the next code, which may consist of multiple input pixels. */ /* generate and save the next code, which may consist of multiple input pixels. */
Res = NextCode(pState, &PixelValueCur, CodeBits); Res = NextCode(pState, &PixelValueCur, CodeBits);
if (Res < 0) if (Res < 0)
@ -249,7 +247,8 @@ static int gif_lzw(statestruct *pState, int paletteBitSize) {
} }
// > Update last bytecount byte; // > Update last bytecount byte;
if (pState->OutByteCountPos < pState->OutPosCur) { if (pState->OutByteCountPos < pState->OutPosCur) {
(pState->pOut)[pState->OutByteCountPos] = (unsigned char) (pState->OutPosCur - pState->OutByteCountPos - 1); (pState->pOut)[pState->OutByteCountPos]
= (unsigned char) (pState->OutPosCur - pState->OutByteCountPos - 1);
} }
pState->OutPosCur++; pState->OutPosCur++;
return pState->OutPosCur; return pState->OutPosCur;
@ -281,12 +280,13 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
int colourCount; int colourCount;
unsigned char paletteRGB[10][3]; unsigned char paletteRGB[10][3];
int paletteCount, paletteCountCur, paletteIndex; int paletteCount, paletteCountCur, paletteIndex;
int pixelIndex; unsigned int pixelIndex;
int paletteBitSize; int paletteBitSize;
int paletteSize; int paletteSize;
statestruct State; statestruct State;
int transparent_index; int transparent_index;
int bgindex = -1, fgindex = -1; int bgindex = -1, fgindex = -1;
const int output_to_stdout = symbol->output_options & BARCODE_STDOUT;
unsigned char backgroundColourIndex; unsigned char backgroundColourIndex;
unsigned char RGBCur[3]; unsigned char RGBCur[3];
@ -297,9 +297,10 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
int fFound; int fFound;
unsigned char pixelColour; unsigned char pixelColour;
unsigned int bitmapSize = symbol->bitmap_height * symbol->bitmap_width;
/* Allow for overhead of 4 == code size + byte count + overflow byte + zero terminator */ /* Allow for overhead of 4 == code size + byte count + overflow byte + zero terminator */
unsigned int lzoutbufSize = symbol->bitmap_height * symbol->bitmap_width + 4; unsigned int lzoutbufSize = bitmapSize + 4;
#ifdef _MSC_VER #ifdef _MSC_VER
char *lzwoutbuf; char *lzwoutbuf;
#endif #endif
@ -344,8 +345,7 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
colourCount = 0; colourCount = 0;
paletteCount = 0; paletteCount = 0;
/* loop over all pixels */ /* loop over all pixels */
for ( pixelIndex = 0; pixelIndex < (symbol->bitmap_height * symbol->bitmap_width); pixelIndex++) for (pixelIndex = 0; pixelIndex < bitmapSize; pixelIndex++) {
{
fFound = 0; fFound = 0;
/* get pixel colour code */ /* get pixel colour code */
pixelColour = pixelbuf[pixelIndex]; pixelColour = pixelbuf[pixelIndex];
@ -434,7 +434,7 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
/* Set transparency */ /* Set transparency */
/* Note: does not allow both transparent foreground and background - /* Note: does not allow both transparent foreground and background -
* background takes prioroty */ * background takes priority */
transparent_index = -1; transparent_index = -1;
if (strlen(symbol->fgcolour) > 6) { if (strlen(symbol->fgcolour) > 6) {
if ((symbol->fgcolour[6] == '0') && (symbol->fgcolour[7] == '0')) { if ((symbol->fgcolour[6] == '0') && (symbol->fgcolour[7] == '0')) {
@ -466,17 +466,17 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
paletteSize = 1 << paletteBitSize; paletteSize = 1 << paletteBitSize;
/* Open output file in binary mode */ /* Open output file in binary mode */
if ((symbol->output_options & BARCODE_STDOUT) != 0) { if (output_to_stdout) {
#ifdef _MSC_VER #ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) { if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
sprintf(symbol->errtxt, "610: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "610: Could not set stdout to binary (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
#endif #endif
gif_file = stdout; gif_file = stdout;
} else { } else {
if (!(gif_file = fopen(symbol->outfile, "wb"))) { if (!(gif_file = fopen(symbol->outfile, "wb"))) {
sprintf(symbol->errtxt, "611: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "611: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
} }
@ -581,21 +581,28 @@ INTERNAL int gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
/* prepare state array */ /* prepare state array */
State.pIn = pixelbuf; State.pIn = pixelbuf;
State.InLen = symbol->bitmap_height * symbol->bitmap_width; State.InLen = bitmapSize;
State.pOut = (unsigned char *) lzwoutbuf; State.pOut = (unsigned char *) lzwoutbuf;
State.OutLength = lzoutbufSize; State.OutLength = lzoutbufSize;
/* call lzw encoding */ /* call lzw encoding */
byte_out = gif_lzw(&State, paletteBitSize); byte_out = gif_lzw(&State, paletteBitSize);
if (byte_out <= 0) { if (byte_out <= 0) {
if (!output_to_stdout) {
fclose(gif_file); fclose(gif_file);
}
strcpy(symbol->errtxt, "613: Insufficient memory for LZW buffer");
return ZINT_ERROR_MEMORY; return ZINT_ERROR_MEMORY;
} }
fwrite(lzwoutbuf, byte_out, 1, gif_file); fwrite(lzwoutbuf, byte_out, 1, gif_file);
/* GIF terminator */ /* GIF terminator */
fputc('\x3b', gif_file); fputc('\x3b', gif_file);
if (output_to_stdout) {
fflush(gif_file);
} else {
fclose(gif_file); fclose(gif_file);
}
return 0; return 0;
} }

View File

@ -907,10 +907,10 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int
if (symbol->debug & ZINT_DEBUG_PRINT) { if (symbol->debug & ZINT_DEBUG_PRINT) {
printf("ZBarcode_Encode: symbology: %d, input_mode: 0x%X, ECI: %d, option_1: %d, option_2: %d," printf("ZBarcode_Encode: symbology: %d, input_mode: 0x%X, ECI: %d, option_1: %d, option_2: %d,"
" option_3: %d, scale: %g\n output_options: 0x%X, fg: %s, bg: %s," " option_3: %d, scale: %g\n output_options: 0x%X, fg: %s, bg: %s,"
" length: %d, First 10 source: \"%.10s\", First 10 primary: \"%.10s\"\n", " length: %d, First 10 source: \"%.*s\", First 10 primary: \"%.10s\"\n",
symbol->symbology, symbol->input_mode, symbol->eci, symbol->option_1, symbol->option_2, symbol->symbology, symbol->input_mode, symbol->eci, symbol->option_1, symbol->option_2,
symbol->option_3, symbol->scale, symbol->output_options, symbol->fgcolour, symbol->bgcolour, symbol->option_3, symbol->scale, symbol->output_options, symbol->fgcolour, symbol->bgcolour,
length, source ? (const char *) source : "<NULL>", symbol->primary); length, length < 10 ? length : 10, source ? (const char *) source : "<NULL>", symbol->primary);
} }
warn_number = 0; warn_number = 0;

View File

@ -51,6 +51,7 @@ INTERNAL int pcx_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
pcx_header_t header; pcx_header_t header;
int bytes_per_line = symbol->bitmap_width + (symbol->bitmap_width & 1); // Must be even int bytes_per_line = symbol->bitmap_width + (symbol->bitmap_width & 1); // Must be even
unsigned char previous; unsigned char previous;
const int output_to_stdout = symbol->output_options & BARCODE_STDOUT; /* Suppress gcc -fanalyzer warning */
#ifdef _MSC_VER #ifdef _MSC_VER
unsigned char *rle_row; unsigned char *rle_row;
#endif #endif
@ -99,17 +100,17 @@ INTERNAL int pcx_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
} }
/* Open output file in binary mode */ /* Open output file in binary mode */
if (symbol->output_options & BARCODE_STDOUT) { if (output_to_stdout) {
#ifdef _MSC_VER #ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) { if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
sprintf(symbol->errtxt, "620: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "620: Could not set stdout to binary (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
#endif #endif
pcx_file = stdout; pcx_file = stdout;
} else { } else {
if (!(pcx_file = fopen(symbol->outfile, "wb"))) { if (!(pcx_file = fopen(symbol->outfile, "wb"))) {
sprintf(symbol->errtxt, "621: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "621: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
} }
@ -215,7 +216,11 @@ INTERNAL int pcx_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
} }
} }
if (output_to_stdout) {
fflush(pcx_file);
} else {
fclose(pcx_file); fclose(pcx_file);
}
return 0; return 0;
} }

View File

@ -48,28 +48,25 @@
#define SSET "0123456789ABCDEF" #define SSET "0123456789ABCDEF"
struct mainprog_info_type { /* Note if change this need to change "backend/tests/test_png.c" definition also */
long width; struct wpng_error_type {
long height; struct zint_symbol *symbol;
FILE *outfile;
jmp_buf jmpbuf; jmp_buf jmpbuf;
}; };
static void writepng_error_handler(png_structp png_ptr, png_const_charp msg) { STATIC_UNLESS_ZINT_TEST void wpng_error_handler(png_structp png_ptr, png_const_charp msg) {
struct mainprog_info_type *graphic; struct wpng_error_type *wpng_error_ptr;
fprintf(stderr, "writepng libpng error: %s (F30)\n", msg); wpng_error_ptr = (struct wpng_error_type *) png_get_error_ptr(png_ptr);
fflush(stderr); if (wpng_error_ptr == NULL) {
graphic = (struct mainprog_info_type*) png_get_error_ptr(png_ptr);
if (graphic == NULL) {
/* we are completely hosed now */ /* we are completely hosed now */
fprintf(stderr, fprintf(stderr, "Error 636: libpng error: %s\n", msg ? msg : "<NULL>");
"writepng severe error: jmpbuf not recoverable; terminating. (F31)\n"); fprintf(stderr, "Error 637: jmpbuf not recoverable, terminating\n");
fflush(stderr); fflush(stderr);
return; return; /* libpng will call abort() */
} }
longjmp(graphic->jmpbuf, 1); sprintf(wpng_error_ptr->symbol->errtxt, "635: libpng error: %.60s", msg ? msg : "<NULL>");
longjmp(wpng_error_ptr->jmpbuf, 1);
} }
/* Guestimate best compression strategy */ /* Guestimate best compression strategy */
@ -93,8 +90,8 @@ static int guess_compression_strategy(struct zint_symbol *symbol, unsigned char
} }
INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf) { INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf) {
struct mainprog_info_type wpng_info; struct wpng_error_type wpng_error;
struct mainprog_info_type *graphic; FILE *outfile;
png_structp png_ptr; png_structp png_ptr;
png_infop info_ptr; png_infop info_ptr;
int i; int i;
@ -109,6 +106,7 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
int bit_depth; int bit_depth;
int compression_strategy; int compression_strategy;
unsigned char *pb; unsigned char *pb;
const int output_to_stdout = symbol->output_options & BARCODE_STDOUT;
#ifndef _MSC_VER #ifndef _MSC_VER
unsigned char outdata[symbol->bitmap_width]; unsigned char outdata[symbol->bitmap_width];
@ -116,10 +114,7 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
unsigned char* outdata = (unsigned char*) _alloca(symbol->bitmap_width); unsigned char* outdata = (unsigned char*) _alloca(symbol->bitmap_width);
#endif #endif
graphic = &wpng_info; wpng_error.symbol = symbol;
graphic->width = symbol->bitmap_width;
graphic->height = symbol->bitmap_height;
fg.red = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]); fg.red = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
fg.green = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]); fg.green = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
@ -143,7 +138,7 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
num_trans = 0; num_trans = 0;
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
static const int ultra_chars[8] = { 'W', 'C', 'B', 'M', 'R', 'Y', 'G', 'K' }; static const int ultra_chars[8] = { 'W', 'C', 'B', 'M', 'R', 'Y', 'G', 'K' };
static png_color ultra_colours[8] = { static const png_color ultra_colours[8] = {
{ 0xff, 0xff, 0xff, }, /* White */ { 0xff, 0xff, 0xff, }, /* White */
{ 0, 0xff, 0xff, }, /* Cyan */ { 0, 0xff, 0xff, }, /* Cyan */
{ 0, 0, 0xff, }, /* Blue */ { 0, 0, 0xff, }, /* Blue */
@ -225,51 +220,57 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
if (num_palette <= 2) { if (num_palette <= 2) {
bit_depth = 1; bit_depth = 1;
} else if (num_palette <= 16) {
bit_depth = 4;
} else { } else {
bit_depth = 8; bit_depth = 4;
} }
/* Open output file in binary mode */ /* Open output file in binary mode */
if (symbol->output_options & BARCODE_STDOUT) { if (output_to_stdout) {
#ifdef _MSC_VER #ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) { if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
sprintf(symbol->errtxt, "631: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "631: Could not set stdout to binary (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
#endif #endif
graphic->outfile = stdout; outfile = stdout;
} else { } else {
if (!(graphic->outfile = fopen(symbol->outfile, "wb"))) { if (!(outfile = fopen(symbol->outfile, "wb"))) {
sprintf(symbol->errtxt, "632: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "632: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
} }
/* Set up error handling routine as proc() above */ /* Set up error handling routine as proc() above */
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, graphic, writepng_error_handler, NULL); png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, &wpng_error, wpng_error_handler, NULL);
if (!png_ptr) { if (!png_ptr) {
strcpy(symbol->errtxt, "633: Out of memory"); strcpy(symbol->errtxt, "633: Insufficient memory for PNG write structure buffer");
if (!output_to_stdout) {
fclose(outfile);
}
return ZINT_ERROR_MEMORY; return ZINT_ERROR_MEMORY;
} }
info_ptr = png_create_info_struct(png_ptr); info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) { if (!info_ptr) {
png_destroy_write_struct(&png_ptr, NULL); png_destroy_write_struct(&png_ptr, NULL);
strcpy(symbol->errtxt, "634: Out of memory"); strcpy(symbol->errtxt, "634: Insufficient memory for PNG info structure buffer");
if (!output_to_stdout) {
fclose(outfile);
}
return ZINT_ERROR_MEMORY; return ZINT_ERROR_MEMORY;
} }
/* catch jumping here */ /* catch jumping here */
if (setjmp(graphic->jmpbuf)) { if (setjmp(wpng_error.jmpbuf)) {
png_destroy_write_struct(&png_ptr, &info_ptr); png_destroy_write_struct(&png_ptr, &info_ptr);
strcpy(symbol->errtxt, "635: libpng error occurred"); if (!output_to_stdout) {
fclose(outfile);
}
return ZINT_ERROR_MEMORY; return ZINT_ERROR_MEMORY;
} }
/* open output file with libpng */ /* open output file with libpng */
png_init_io(png_ptr, graphic->outfile); png_init_io(png_ptr, outfile);
/* set compression */ /* set compression */
png_set_compression_level(png_ptr, 9); png_set_compression_level(png_ptr, 9);
@ -281,7 +282,7 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
} }
/* set Header block */ /* set Header block */
png_set_IHDR(png_ptr, info_ptr, graphic->width, graphic->height, png_set_IHDR(png_ptr, info_ptr, symbol->bitmap_width, symbol->bitmap_height,
bit_depth, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, bit_depth, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
@ -308,7 +309,7 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
/* write row contents to file */ /* write row contents to file */
png_write_row(png_ptr, outdata); png_write_row(png_ptr, outdata);
} }
} else if (bit_depth == 4) { } else { /* Bit depth 4 */
for (row = 0; row < symbol->bitmap_height; row++) { for (row = 0; row < symbol->bitmap_height; row++) {
unsigned char *image_data = outdata; unsigned char *image_data = outdata;
for (column = 0; column < symbol->bitmap_width; column += 2, image_data++) { for (column = 0; column < symbol->bitmap_width; column += 2, image_data++) {
@ -321,26 +322,18 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
/* write row contents to file */ /* write row contents to file */
png_write_row(png_ptr, outdata); png_write_row(png_ptr, outdata);
} }
} else { /* Bit depth 8 */
for (row = 0; row < symbol->bitmap_height; row++) {
unsigned char *image_data = outdata;
for (column = 0; column < symbol->bitmap_width; column++, pb++, image_data++) {
*image_data = map[*pb];
}
/* write row contents to file */
png_write_row(png_ptr, outdata);
}
} }
/* End the file */ /* End the file */
png_write_end(png_ptr, NULL); png_write_end(png_ptr, NULL);
/* make sure we have disengaged */ /* make sure we have disengaged */
if (png_ptr && info_ptr) png_destroy_write_struct(&png_ptr, &info_ptr); png_destroy_write_struct(&png_ptr, &info_ptr);
if (symbol->output_options & BARCODE_STDOUT) {
fflush(wpng_info.outfile); if (output_to_stdout) {
fflush(outfile);
} else { } else {
fclose(wpng_info.outfile); fclose(outfile);
} }
return 0; return 0;

View File

@ -41,7 +41,7 @@
#include "common.h" #include "common.h"
static void colour_to_pscolor(int option, int colour, char *output) { static void colour_to_pscolor(int option, int colour, char *output) {
strcpy(output, ""); *output = '\0';
if ((option & CMYK_COLOUR) == 0) { if ((option & CMYK_COLOUR) == 0) {
// Use RGB colour space // Use RGB colour space
switch (colour) { switch (colour) {
@ -142,8 +142,8 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy; float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy;
float previous_diameter; float previous_diameter;
float radius, half_radius, half_sqrt3_radius; float radius, half_radius, half_sqrt3_radius;
int colour_index, colour_rect_counter; int colour_index, colour_rect_flag;
char ps_color[30]; char ps_color[33]; /* max "1.00 0.00 0.00 0.00 setcmykcolor" = 32 + 1 */
int draw_background = 1; int draw_background = 1;
struct zint_vector_rect *rect; struct zint_vector_rect *rect;
struct zint_vector_hexagon *hex; struct zint_vector_hexagon *hex;
@ -154,25 +154,30 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
int i, len; int i, len;
int ps_len = 0; int ps_len = 0;
int iso_latin1 = 0; int iso_latin1 = 0;
const int output_to_stdout = symbol->output_options & BARCODE_STDOUT;
#ifdef _MSC_VER #ifdef _MSC_VER
unsigned char *ps_string; unsigned char *ps_string;
#endif #endif
if (symbol->vector == NULL) {
strcpy(symbol->errtxt, "646: Vector header NULL");
return ZINT_ERROR_INVALID_DATA;
}
if (strlen(symbol->bgcolour) > 6) { if (strlen(symbol->bgcolour) > 6) {
if ((ctoi(symbol->bgcolour[6]) == 0) && (ctoi(symbol->bgcolour[7]) == 0)) { if ((ctoi(symbol->bgcolour[6]) == 0) && (ctoi(symbol->bgcolour[7]) == 0)) {
draw_background = 0; draw_background = 0;
} }
} }
if (symbol->output_options & BARCODE_STDOUT) { if (output_to_stdout) {
feps = stdout; feps = stdout;
} else { } else {
feps = fopen(symbol->outfile, "w"); if (!(feps = fopen(symbol->outfile, "w"))) {
}
if (feps == NULL) {
sprintf(symbol->errtxt, "645: Could not open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "645: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
}
locale = setlocale(LC_ALL, "C"); locale = setlocale(LC_ALL, "C");
@ -269,7 +274,7 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
fprintf(feps, "%%%%Title: Zint Generated Symbol\n"); fprintf(feps, "%%%%Title: Zint Generated Symbol\n");
fprintf(feps, "%%%%Pages: 0\n"); fprintf(feps, "%%%%Pages: 0\n");
fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n",
(int) ceil(symbol->vector->width), (int) ceil(symbol->vector->height)); (int) ceilf(symbol->vector->width), (int) ceilf(symbol->vector->height));
fprintf(feps, "%%%%EndComments\n"); fprintf(feps, "%%%%EndComments\n");
/* Definitions */ /* Definitions */
@ -306,17 +311,37 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
// Rectangles // Rectangles
if (symbol->symbology == BARCODE_ULTRA) { if (symbol->symbology == BARCODE_ULTRA) {
for (colour_index = 0; colour_index <= 8; colour_index++) { colour_rect_flag = 0;
colour_rect_counter = 0; rect = symbol->vector->rectangles;
while (rect) {
if (rect->colour == -1) { // Foreground
if (colour_rect_flag == 0) {
// Set foreground colour
if ((symbol->output_options & CMYK_COLOUR) == 0) {
fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
} else {
fprintf(feps, "%.2f %.2f %.2f %.2f setcmykcolor\n",
cyan_ink, magenta_ink, yellow_ink, black_ink);
}
colour_rect_flag = 1;
}
fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n",
rect->height, (symbol->vector->height - rect->y) - rect->height, rect->x, rect->width);
fprintf(feps, "TE\n");
}
rect = rect->next;
}
for (colour_index = 1; colour_index <= 8; colour_index++) {
colour_rect_flag = 0;
rect = symbol->vector->rectangles; rect = symbol->vector->rectangles;
while (rect) { while (rect) {
if (rect->colour == colour_index) { if (rect->colour == colour_index) {
if (colour_rect_counter == 0) { if (colour_rect_flag == 0) {
// Set new colour // Set new colour
colour_to_pscolor(symbol->output_options, colour_index, ps_color); colour_to_pscolor(symbol->output_options, colour_index, ps_color);
fprintf(feps, "%s\n", ps_color); fprintf(feps, "%s\n", ps_color);
colour_rect_flag = 1;
} }
colour_rect_counter++;
fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n",
rect->height, (symbol->vector->height - rect->y) - rect->height, rect->x, rect->width); rect->height, (symbol->vector->height - rect->y) - rect->height, rect->x, rect->width);
fprintf(feps, "TE\n"); fprintf(feps, "TE\n");
@ -456,9 +481,7 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
} while (string); } while (string);
} }
//fprintf(feps, "\nshowpage\n"); if (output_to_stdout) {
if (symbol->output_options & BARCODE_STDOUT) {
fflush(feps); fflush(feps);
} else { } else {
fclose(feps); fclose(feps);

View File

@ -127,7 +127,6 @@ INTERNAL void rs_init_code(rs_t *rs, const int nsym, int index) {
/* rs_encode(&rs, datalen, data, res) generates nsym Reed-Solomon codes (nsym as given in rs_init_code()) /* rs_encode(&rs, datalen, data, res) generates nsym Reed-Solomon codes (nsym as given in rs_init_code())
* and places them in reverse order in res */ * and places them in reverse order in res */
INTERNAL void rs_encode(const rs_t *rs, const int datalen, const unsigned char *data, unsigned char *res) { INTERNAL void rs_encode(const rs_t *rs, const int datalen, const unsigned char *data, unsigned char *res) {
int i, k; int i, k;
const unsigned char *logt = rs->logt; const unsigned char *logt = rs->logt;
@ -200,10 +199,10 @@ INTERNAL int rs_uint_init_gf(rs_uint_t *rs_uint, const unsigned int prime_poly,
rs_uint->logt = NULL; rs_uint->logt = NULL;
rs_uint->alog = NULL; rs_uint->alog = NULL;
if (!(logt = (unsigned int *) malloc(sizeof(unsigned int) * b))) { if (!(logt = (unsigned int *) calloc(b, sizeof(unsigned int)))) {
return 0; return 0;
} }
if (!(alog = (unsigned int *) malloc(sizeof(unsigned int) * b * 2))) { if (!(alog = (unsigned int *) calloc(b * 2, sizeof(unsigned int)))) {
free(logt); free(logt);
return 0; return 0;
} }

View File

@ -1071,7 +1071,7 @@ static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char
if (debug) printf("General field data = %s\n", general_field); if (debug) printf("General field data = %s\n", general_field);
if (j != 0) { /* If general field not empty */ if (j != 0) { /* If general field not empty */
if (!general_field_encode(general_field, j, &mode, &last_digit, binary_string, &bp)) { /* Failure should never happen */ if (!general_field_encode(general_field, j, &mode, &last_digit, binary_string, &bp)) { /* Should not happen */
/* Not reachable */ /* Not reachable */
strcpy(symbol->errtxt, "386: Invalid character in General Field data"); strcpy(symbol->errtxt, "386: Invalid character in General Field data");
return ZINT_ERROR_INVALID_DATA; return ZINT_ERROR_INVALID_DATA;

View File

@ -187,17 +187,17 @@ INTERNAL int svg_plot(struct zint_symbol *symbol) {
/* Check for no created vector set */ /* Check for no created vector set */
/* E-Mail Christian Schmitz 2019-09-10: reason unknown Ticket #164*/ /* E-Mail Christian Schmitz 2019-09-10: reason unknown Ticket #164*/
if (symbol->vector == NULL) { if (symbol->vector == NULL) {
strcpy(symbol->errtxt, "681: Vector header NULL");
return ZINT_ERROR_INVALID_DATA; return ZINT_ERROR_INVALID_DATA;
} }
if (symbol->output_options & BARCODE_STDOUT) { if (symbol->output_options & BARCODE_STDOUT) {
fsvg = stdout; fsvg = stdout;
} else { } else {
fsvg = fopen(symbol->outfile, "w"); if (!(fsvg = fopen(symbol->outfile, "w"))) {
}
if (fsvg == NULL) {
sprintf(symbol->errtxt, "680: Could not open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "680: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
}
locale = setlocale(LC_ALL, "C"); locale = setlocale(LC_ALL, "C");
@ -206,7 +206,7 @@ INTERNAL int svg_plot(struct zint_symbol *symbol) {
fprintf(fsvg, "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n"); fprintf(fsvg, "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n");
fprintf(fsvg, " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"); fprintf(fsvg, " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
fprintf(fsvg, "<svg width=\"%d\" height=\"%d\" version=\"1.1\"\n", fprintf(fsvg, "<svg width=\"%d\" height=\"%d\" version=\"1.1\"\n",
(int) ceil(symbol->vector->width), (int) ceil(symbol->vector->height)); (int) ceilf(symbol->vector->width), (int) ceilf(symbol->vector->height));
fprintf(fsvg, " xmlns=\"http://www.w3.org/2000/svg\">\n"); fprintf(fsvg, " xmlns=\"http://www.w3.org/2000/svg\">\n");
fprintf(fsvg, " <desc>Zint Generated Symbol\n"); fprintf(fsvg, " <desc>Zint Generated Symbol\n");
fprintf(fsvg, " </desc>\n"); fprintf(fsvg, " </desc>\n");
@ -214,7 +214,7 @@ INTERNAL int svg_plot(struct zint_symbol *symbol) {
if (bg_alpha != 0) { if (bg_alpha != 0) {
fprintf(fsvg, " <rect x=\"0\" y=\"0\" width=\"%d\" height=\"%d\" fill=\"#%s\"", fprintf(fsvg, " <rect x=\"0\" y=\"0\" width=\"%d\" height=\"%d\" fill=\"#%s\"",
(int) ceil(symbol->vector->width), (int) ceil(symbol->vector->height), bgcolour_string); (int) ceilf(symbol->vector->width), (int) ceilf(symbol->vector->height), bgcolour_string);
if (bg_alpha != 0xff) { if (bg_alpha != 0xff) {
fprintf(fsvg, " opacity=\"%.3f\"", bg_alpha_opacity); fprintf(fsvg, " opacity=\"%.3f\"", bg_alpha_opacity);
} }

View File

@ -90,6 +90,8 @@ INTERNAL int telepen(struct zint_symbol *symbol, unsigned char source[], int src
} }
strcat(dest, TeleTable[check_digit]); strcat(dest, TeleTable[check_digit]);
if (symbol->debug & ZINT_DEBUG_PRINT) printf("Check digit: %d\n", check_digit);
/* Stop character */ /* Stop character */
strcat(dest, TeleTable['z']); strcat(dest, TeleTable['z']);
@ -169,6 +171,8 @@ INTERNAL int telepen_num(struct zint_symbol *symbol, unsigned char source[], int
} }
strcat(dest, TeleTable[check_digit]); strcat(dest, TeleTable[check_digit]);
if (symbol->debug & ZINT_DEBUG_PRINT) printf("Check digit: %d\n", check_digit);
/* Stop character */ /* Stop character */
strcat(dest, TeleTable['z']); strcat(dest, TeleTable['z']);

View File

@ -3,7 +3,7 @@
# Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org> # Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
# vim: set ts=4 sw=4 et : # vim: set ts=4 sw=4 et :
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.5)
project(zint_backend_tests) project(zint_backend_tests)
enable_testing() enable_testing()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 714 B

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,98 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Zint 2.9.1.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 119 224
%%EndComments
/TL { setlinewidth moveto lineto stroke } bind def
/TD { newpath 0 360 arc fill } bind def
/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def
/TB { 2 copy } bind def
/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def
/TE { pop pop } bind def
newpath
1.00 1.00 1.00 setrgbcolor
224.00 0.00 TB 0.00 118.90 TR
TE
0.00 0.00 0.00 setrgbcolor
4.00 220.00 TB 18.90 100.00 TR
TE
2.00 216.00 TB 18.90 100.00 TR
TE
2.00 210.00 TB 18.90 100.00 TR
TE
2.00 200.00 TB 18.90 100.00 TR
TE
8.00 190.00 TB 18.90 100.00 TR
TE
6.00 182.00 TB 18.90 100.00 TR
TE
4.00 176.00 TB 18.90 100.00 TR
TE
2.00 168.00 TB 18.90 100.00 TR
TE
2.00 160.00 TB 18.90 100.00 TR
TE
2.00 156.00 TB 18.90 100.00 TR
TE
4.00 148.00 TB 18.90 100.00 TR
TE
2.00 144.00 TB 18.90 100.00 TR
TE
2.00 134.00 TB 18.90 100.00 TR
TE
4.00 122.00 TB 18.90 100.00 TR
TE
2.00 116.00 TB 18.90 100.00 TR
TE
2.00 112.00 TB 18.90 100.00 TR
TE
2.00 108.00 TB 18.90 100.00 TR
TE
8.00 96.00 TB 18.90 100.00 TR
TE
2.00 90.00 TB 18.90 100.00 TR
TE
2.00 84.00 TB 18.90 100.00 TR
TE
8.00 74.00 TB 18.90 100.00 TR
TE
4.00 66.00 TB 18.90 100.00 TR
TE
4.00 60.00 TB 18.90 100.00 TR
TE
8.00 50.00 TB 18.90 100.00 TR
TE
2.00 46.00 TB 18.90 100.00 TR
TE
4.00 36.00 TB 18.90 100.00 TR
TE
2.00 28.00 TB 18.90 100.00 TR
TE
4.00 22.00 TB 18.90 100.00 TR
TE
6.00 10.00 TB 18.90 100.00 TR
TE
2.00 6.00 TB 18.90 100.00 TR
TE
4.00 0.00 TB 18.90 100.00 TR
TE
/Helvetica-Bold findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Helvetica-ISOLatin1 exch definefont pop
matrix currentmatrix
/Helvetica-ISOLatin1 findfont
14.00 scalefont setfont
0 0 moveto 3.50 112.00 translate 0.00 rotate 0 0 moveto
(Égjpqy) stringwidth
gsave
270 rotate
pop
-2 div 0 rmoveto
(Égjpqy) show
grestore
setmatrix

View File

@ -0,0 +1,76 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Zint 2.9.1.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 128 119
%%EndComments
/TL { setlinewidth moveto lineto stroke } bind def
/TD { newpath 0 360 arc fill } bind def
/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def
/TB { 2 copy } bind def
/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def
/TE { pop pop } bind def
newpath
0.00 0.40 0.81 0.02 setcmykcolor
118.90 0.00 TB 0.00 128.00 TR
TE
0.90 0.41 0.00 0.19 setcmykcolor
100.00 18.90 TB 0.00 2.00 TR
TE
100.00 18.90 TB 6.00 2.00 TR
TE
100.00 18.90 TB 10.00 4.00 TR
TE
100.00 18.90 TB 16.00 4.00 TR
TE
100.00 18.90 TB 22.00 2.00 TR
TE
100.00 18.90 TB 26.00 4.00 TR
TE
100.00 18.90 TB 32.00 2.00 TR
TE
100.00 18.90 TB 38.00 2.00 TR
TE
100.00 18.90 TB 42.00 2.00 TR
TE
100.00 18.90 TB 46.00 4.00 TR
TE
100.00 18.90 TB 52.00 2.00 TR
TE
100.00 18.90 TB 56.00 4.00 TR
TE
100.00 18.90 TB 64.00 2.00 TR
TE
100.00 18.90 TB 68.00 2.00 TR
TE
100.00 18.90 TB 72.00 4.00 TR
TE
100.00 18.90 TB 78.00 4.00 TR
TE
100.00 18.90 TB 84.00 4.00 TR
TE
100.00 18.90 TB 92.00 2.00 TR
TE
100.00 18.90 TB 96.00 2.00 TR
TE
100.00 18.90 TB 100.00 2.00 TR
TE
100.00 18.90 TB 104.00 2.00 TR
TE
100.00 18.90 TB 110.00 2.00 TR
TE
100.00 18.90 TB 114.00 4.00 TR
TE
100.00 18.90 TB 120.00 4.00 TR
TE
100.00 18.90 TB 126.00 2.00 TR
TE
matrix currentmatrix
/Helvetica findfont
14.00 scalefont setfont
0 0 moveto 64.00 3.50 translate 0.00 rotate 0 0 moveto
(*123*) stringwidth
pop
-2 div 0 rmoveto
(*123*) show
setmatrix

View File

@ -0,0 +1,42 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Zint 2.9.1.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 22 16
%%EndComments
/TL { setlinewidth moveto lineto stroke } bind def
/TD { newpath 0 360 arc fill } bind def
/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def
/TB { 2 copy } bind def
/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def
/TE { pop pop } bind def
newpath
1.00 0.00 0.00 setrgbcolor
1.00 15.00 0.80 TD
9.00 15.00 0.80 TD
13.00 15.00 0.80 TD
17.00 15.00 0.80 TD
21.00 15.00 0.80 TD
7.00 13.00 0.80 TD
11.00 13.00 0.80 TD
15.00 13.00 0.80 TD
1.00 11.00 0.80 TD
5.00 11.00 0.80 TD
13.00 11.00 0.80 TD
17.00 11.00 0.80 TD
21.00 11.00 0.80 TD
3.00 9.00 0.80 TD
1.00 7.00 0.80 TD
21.00 7.00 0.80 TD
3.00 5.00 0.80 TD
7.00 5.00 0.80 TD
11.00 5.00 0.80 TD
15.00 5.00 0.80 TD
1.00 3.00 0.80 TD
5.00 3.00 0.80 TD
17.00 3.00 0.80 TD
21.00 3.00 0.80 TD
3.00 1.00 0.80 TD
7.00 1.00 0.80 TD
15.00 1.00 0.80 TD
19.00 1.00 0.80 TD

View File

@ -0,0 +1,382 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Zint 2.9.1.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 58 60
%%EndComments
/TL { setlinewidth moveto lineto stroke } bind def
/TD { newpath 0 360 arc fill } bind def
/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def
/TB { 2 copy } bind def
/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def
/TE { pop pop } bind def
newpath
0.00 0.00 0.00 0.00 setcmykcolor
60.00 0.00 TB 0.00 57.73 TR
TE
0.00 0.00 0.00 1.00 setcmykcolor
0.15 3.00 0.65 3.87 1.65 3.87 2.15 3.00 1.65 2.13 0.65 2.13 TH
0.15 7.00 0.65 7.87 1.65 7.87 2.15 7.00 1.65 6.13 0.65 6.13 TH
0.15 11.00 0.65 11.87 1.65 11.87 2.15 11.00 1.65 10.13 0.65 10.13 TH
0.15 15.00 0.65 15.87 1.65 15.87 2.15 15.00 1.65 14.13 0.65 14.13 TH
0.15 19.00 0.65 19.87 1.65 19.87 2.15 19.00 1.65 18.13 0.65 18.13 TH
0.15 23.00 0.65 23.87 1.65 23.87 2.15 23.00 1.65 22.13 0.65 22.13 TH
0.15 27.00 0.65 27.87 1.65 27.87 2.15 27.00 1.65 26.13 0.65 26.13 TH
0.15 31.00 0.65 31.87 1.65 31.87 2.15 31.00 1.65 30.13 0.65 30.13 TH
0.15 35.00 0.65 35.87 1.65 35.87 2.15 35.00 1.65 34.13 0.65 34.13 TH
0.15 39.00 0.65 39.87 1.65 39.87 2.15 39.00 1.65 38.13 0.65 38.13 TH
0.15 43.00 0.65 43.87 1.65 43.87 2.15 43.00 1.65 42.13 0.65 42.13 TH
0.15 47.00 0.65 47.87 1.65 47.87 2.15 47.00 1.65 46.13 0.65 46.13 TH
0.15 51.00 0.65 51.87 1.65 51.87 2.15 51.00 1.65 50.13 0.65 50.13 TH
0.15 55.00 0.65 55.87 1.65 55.87 2.15 55.00 1.65 54.13 0.65 54.13 TH
0.15 57.00 0.65 57.87 1.65 57.87 2.15 57.00 1.65 56.13 0.65 56.13 TH
0.15 59.00 0.65 59.87 1.65 59.87 2.15 59.00 1.65 58.13 0.65 58.13 TH
3.62 1.00 4.12 1.87 5.12 1.87 5.62 1.00 5.12 0.13 4.12 0.13 TH
3.62 5.00 4.12 5.87 5.12 5.87 5.62 5.00 5.12 4.13 4.12 4.13 TH
3.62 9.00 4.12 9.87 5.12 9.87 5.62 9.00 5.12 8.13 4.12 8.13 TH
3.62 13.00 4.12 13.87 5.12 13.87 5.62 13.00 5.12 12.13 4.12 12.13 TH
3.62 17.00 4.12 17.87 5.12 17.87 5.62 17.00 5.12 16.13 4.12 16.13 TH
3.62 21.00 4.12 21.87 5.12 21.87 5.62 21.00 5.12 20.13 4.12 20.13 TH
3.62 25.00 4.12 25.87 5.12 25.87 5.62 25.00 5.12 24.13 4.12 24.13 TH
3.62 29.00 4.12 29.87 5.12 29.87 5.62 29.00 5.12 28.13 4.12 28.13 TH
3.62 33.00 4.12 33.87 5.12 33.87 5.62 33.00 5.12 32.13 4.12 32.13 TH
3.62 37.00 4.12 37.87 5.12 37.87 5.62 37.00 5.12 36.13 4.12 36.13 TH
3.62 41.00 4.12 41.87 5.12 41.87 5.62 41.00 5.12 40.13 4.12 40.13 TH
3.62 45.00 4.12 45.87 5.12 45.87 5.62 45.00 5.12 44.13 4.12 44.13 TH
3.62 49.00 4.12 49.87 5.12 49.87 5.62 49.00 5.12 48.13 4.12 48.13 TH
3.62 53.00 4.12 53.87 5.12 53.87 5.62 53.00 5.12 52.13 4.12 52.13 TH
3.62 57.00 4.12 57.87 5.12 57.87 5.62 57.00 5.12 56.13 4.12 56.13 TH
5.35 4.00 5.85 4.87 6.85 4.87 7.35 4.00 6.85 3.13 5.85 3.13 TH
5.35 8.00 5.85 8.87 6.85 8.87 7.35 8.00 6.85 7.13 5.85 7.13 TH
5.35 12.00 5.85 12.87 6.85 12.87 7.35 12.00 6.85 11.13 5.85 11.13 TH
5.35 16.00 5.85 16.87 6.85 16.87 7.35 16.00 6.85 15.13 5.85 15.13 TH
5.35 20.00 5.85 20.87 6.85 20.87 7.35 20.00 6.85 19.13 5.85 19.13 TH
5.35 24.00 5.85 24.87 6.85 24.87 7.35 24.00 6.85 23.13 5.85 23.13 TH
5.35 28.00 5.85 28.87 6.85 28.87 7.35 28.00 6.85 27.13 5.85 27.13 TH
5.35 32.00 5.85 32.87 6.85 32.87 7.35 32.00 6.85 31.13 5.85 31.13 TH
5.35 36.00 5.85 36.87 6.85 36.87 7.35 36.00 6.85 35.13 5.85 35.13 TH
5.35 40.00 5.85 40.87 6.85 40.87 7.35 40.00 6.85 39.13 5.85 39.13 TH
5.35 44.00 5.85 44.87 6.85 44.87 7.35 44.00 6.85 43.13 5.85 43.13 TH
5.35 48.00 5.85 48.87 6.85 48.87 7.35 48.00 6.85 47.13 5.85 47.13 TH
5.35 52.00 5.85 52.87 6.85 52.87 7.35 52.00 6.85 51.13 5.85 51.13 TH
5.35 56.00 5.85 56.87 6.85 56.87 7.35 56.00 6.85 55.13 5.85 55.13 TH
5.35 58.00 5.85 58.87 6.85 58.87 7.35 58.00 6.85 57.13 5.85 57.13 TH
7.08 59.00 7.58 59.87 8.58 59.87 9.08 59.00 8.58 58.13 7.58 58.13 TH
8.81 2.00 9.31 2.87 10.31 2.87 10.81 2.00 10.31 1.13 9.31 1.13 TH
8.81 6.00 9.31 6.87 10.31 6.87 10.81 6.00 10.31 5.13 9.31 5.13 TH
8.81 10.00 9.31 10.87 10.31 10.87 10.81 10.00 10.31 9.13 9.31 9.13 TH
8.81 14.00 9.31 14.87 10.31 14.87 10.81 14.00 10.31 13.13 9.31 13.13 TH
8.81 18.00 9.31 18.87 10.31 18.87 10.81 18.00 10.31 17.13 9.31 17.13 TH
8.81 22.00 9.31 22.87 10.31 22.87 10.81 22.00 10.31 21.13 9.31 21.13 TH
8.81 26.00 9.31 26.87 10.31 26.87 10.81 26.00 10.31 25.13 9.31 25.13 TH
8.81 30.00 9.31 30.87 10.31 30.87 10.81 30.00 10.31 29.13 9.31 29.13 TH
8.81 34.00 9.31 34.87 10.31 34.87 10.81 34.00 10.31 33.13 9.31 33.13 TH
8.81 38.00 9.31 38.87 10.31 38.87 10.81 38.00 10.31 37.13 9.31 37.13 TH
8.81 42.00 9.31 42.87 10.31 42.87 10.81 42.00 10.31 41.13 9.31 41.13 TH
8.81 46.00 9.31 46.87 10.31 46.87 10.81 46.00 10.31 45.13 9.31 45.13 TH
8.81 50.00 9.31 50.87 10.31 50.87 10.81 50.00 10.31 49.13 9.31 49.13 TH
8.81 54.00 9.31 54.87 10.31 54.87 10.81 54.00 10.31 53.13 9.31 53.13 TH
10.55 3.00 11.05 3.87 12.05 3.87 12.55 3.00 12.05 2.13 11.05 2.13 TH
10.55 7.00 11.05 7.87 12.05 7.87 12.55 7.00 12.05 6.13 11.05 6.13 TH
10.55 11.00 11.05 11.87 12.05 11.87 12.55 11.00 12.05 10.13 11.05 10.13 TH
10.55 15.00 11.05 15.87 12.05 15.87 12.55 15.00 12.05 14.13 11.05 14.13 TH
10.55 19.00 11.05 19.87 12.05 19.87 12.55 19.00 12.05 18.13 11.05 18.13 TH
10.55 23.00 11.05 23.87 12.05 23.87 12.55 23.00 12.05 22.13 11.05 22.13 TH
10.55 27.00 11.05 27.87 12.05 27.87 12.55 27.00 12.05 26.13 11.05 26.13 TH
10.55 31.00 11.05 31.87 12.05 31.87 12.55 31.00 12.05 30.13 11.05 30.13 TH
10.55 35.00 11.05 35.87 12.05 35.87 12.55 35.00 12.05 34.13 11.05 34.13 TH
10.55 39.00 11.05 39.87 12.05 39.87 12.55 39.00 12.05 38.13 11.05 38.13 TH
10.55 43.00 11.05 43.87 12.05 43.87 12.55 43.00 12.05 42.13 11.05 42.13 TH
10.55 47.00 11.05 47.87 12.05 47.87 12.55 47.00 12.05 46.13 11.05 46.13 TH
10.55 51.00 11.05 51.87 12.05 51.87 12.55 51.00 12.05 50.13 11.05 50.13 TH
10.55 55.00 11.05 55.87 12.05 55.87 12.55 55.00 12.05 54.13 11.05 54.13 TH
10.55 57.00 11.05 57.87 12.05 57.87 12.55 57.00 12.05 56.13 11.05 56.13 TH
12.28 58.00 12.78 58.87 13.78 58.87 14.28 58.00 13.78 57.13 12.78 57.13 TH
14.01 1.00 14.51 1.87 15.51 1.87 16.01 1.00 15.51 0.13 14.51 0.13 TH
14.01 5.00 14.51 5.87 15.51 5.87 16.01 5.00 15.51 4.13 14.51 4.13 TH
14.01 9.00 14.51 9.87 15.51 9.87 16.01 9.00 15.51 8.13 14.51 8.13 TH
14.01 13.00 14.51 13.87 15.51 13.87 16.01 13.00 15.51 12.13 14.51 12.13 TH
14.01 17.00 14.51 17.87 15.51 17.87 16.01 17.00 15.51 16.13 14.51 16.13 TH
14.01 21.00 14.51 21.87 15.51 21.87 16.01 21.00 15.51 20.13 14.51 20.13 TH
14.01 25.00 14.51 25.87 15.51 25.87 16.01 25.00 15.51 24.13 14.51 24.13 TH
14.01 29.00 14.51 29.87 15.51 29.87 16.01 29.00 15.51 28.13 14.51 28.13 TH
14.01 33.00 14.51 33.87 15.51 33.87 16.01 33.00 15.51 32.13 14.51 32.13 TH
14.01 37.00 14.51 37.87 15.51 37.87 16.01 37.00 15.51 36.13 14.51 36.13 TH
14.01 41.00 14.51 41.87 15.51 41.87 16.01 41.00 15.51 40.13 14.51 40.13 TH
14.01 45.00 14.51 45.87 15.51 45.87 16.01 45.00 15.51 44.13 14.51 44.13 TH
14.01 49.00 14.51 49.87 15.51 49.87 16.01 49.00 15.51 48.13 14.51 48.13 TH
14.01 53.00 14.51 53.87 15.51 53.87 16.01 53.00 15.51 52.13 14.51 52.13 TH
14.01 59.00 14.51 59.87 15.51 59.87 16.01 59.00 15.51 58.13 14.51 58.13 TH
15.74 4.00 16.24 4.87 17.24 4.87 17.74 4.00 17.24 3.13 16.24 3.13 TH
15.74 8.00 16.24 8.87 17.24 8.87 17.74 8.00 17.24 7.13 16.24 7.13 TH
15.74 12.00 16.24 12.87 17.24 12.87 17.74 12.00 17.24 11.13 16.24 11.13 TH
15.74 16.00 16.24 16.87 17.24 16.87 17.74 16.00 17.24 15.13 16.24 15.13 TH
15.74 20.00 16.24 20.87 17.24 20.87 17.74 20.00 17.24 19.13 16.24 19.13 TH
15.74 22.00 16.24 22.87 17.24 22.87 17.74 22.00 17.24 21.13 16.24 21.13 TH
15.74 24.00 16.24 24.87 17.24 24.87 17.74 24.00 17.24 23.13 16.24 23.13 TH
15.74 26.00 16.24 26.87 17.24 26.87 17.74 26.00 17.24 25.13 16.24 25.13 TH
15.74 28.00 16.24 28.87 17.24 28.87 17.74 28.00 17.24 27.13 16.24 27.13 TH
15.74 32.00 16.24 32.87 17.24 32.87 17.74 32.00 17.24 31.13 16.24 31.13 TH
15.74 42.00 16.24 42.87 17.24 42.87 17.74 42.00 17.24 41.13 16.24 41.13 TH
15.74 48.00 16.24 48.87 17.24 48.87 17.74 48.00 17.24 47.13 16.24 47.13 TH
15.74 52.00 16.24 52.87 17.24 52.87 17.74 52.00 17.24 51.13 16.24 51.13 TH
15.74 56.00 16.24 56.87 17.24 56.87 17.74 56.00 17.24 55.13 16.24 55.13 TH
17.47 23.00 17.97 23.87 18.97 23.87 19.47 23.00 18.97 22.13 17.97 22.13 TH
17.47 33.00 17.97 33.87 18.97 33.87 19.47 33.00 18.97 32.13 17.97 32.13 TH
17.47 43.00 17.97 43.87 18.97 43.87 19.47 43.00 18.97 42.13 17.97 42.13 TH
19.21 2.00 19.71 2.87 20.71 2.87 21.21 2.00 20.71 1.13 19.71 1.13 TH
19.21 6.00 19.71 6.87 20.71 6.87 21.21 6.00 20.71 5.13 19.71 5.13 TH
19.21 10.00 19.71 10.87 20.71 10.87 21.21 10.00 20.71 9.13 19.71 9.13 TH
19.21 14.00 19.71 14.87 20.71 14.87 21.21 14.00 20.71 13.13 19.71 13.13 TH
19.21 20.00 19.71 20.87 20.71 20.87 21.21 20.00 20.71 19.13 19.71 19.13 TH
19.21 22.00 19.71 22.87 20.71 22.87 21.21 22.00 20.71 21.13 19.71 21.13 TH
19.21 38.00 19.71 38.87 20.71 38.87 21.21 38.00 20.71 37.13 19.71 37.13 TH
19.21 44.00 19.71 44.87 20.71 44.87 21.21 44.00 20.71 43.13 19.71 43.13 TH
19.21 46.00 19.71 46.87 20.71 46.87 21.21 46.00 20.71 45.13 19.71 45.13 TH
19.21 50.00 19.71 50.87 20.71 50.87 21.21 50.00 20.71 49.13 19.71 49.13 TH
19.21 54.00 19.71 54.87 20.71 54.87 21.21 54.00 20.71 53.13 19.71 53.13 TH
19.21 58.00 19.71 58.87 20.71 58.87 21.21 58.00 20.71 57.13 19.71 57.13 TH
20.94 3.00 21.44 3.87 22.44 3.87 22.94 3.00 22.44 2.13 21.44 2.13 TH
20.94 7.00 21.44 7.87 22.44 7.87 22.94 7.00 22.44 6.13 21.44 6.13 TH
20.94 11.00 21.44 11.87 22.44 11.87 22.94 11.00 22.44 10.13 21.44 10.13 TH
20.94 15.00 21.44 15.87 22.44 15.87 22.94 15.00 22.44 14.13 21.44 14.13 TH
20.94 19.00 21.44 19.87 22.44 19.87 22.94 19.00 22.44 18.13 21.44 18.13 TH
20.94 21.00 21.44 21.87 22.44 21.87 22.94 21.00 22.44 20.13 21.44 20.13 TH
20.94 43.00 21.44 43.87 22.44 43.87 22.94 43.00 22.44 42.13 21.44 42.13 TH
20.94 47.00 21.44 47.87 22.44 47.87 22.94 47.00 22.44 46.13 21.44 46.13 TH
20.94 51.00 21.44 51.87 22.44 51.87 22.94 51.00 22.44 50.13 21.44 50.13 TH
20.94 55.00 21.44 55.87 22.44 55.87 22.94 55.00 22.44 54.13 21.44 54.13 TH
20.94 57.00 21.44 57.87 22.44 57.87 22.94 57.00 22.44 56.13 21.44 56.13 TH
22.67 16.00 23.17 16.87 24.17 16.87 24.67 16.00 24.17 15.13 23.17 15.13 TH
22.67 44.00 23.17 44.87 24.17 44.87 24.67 44.00 24.17 43.13 23.17 43.13 TH
24.40 1.00 24.90 1.87 25.90 1.87 26.40 1.00 25.90 0.13 24.90 0.13 TH
24.40 5.00 24.90 5.87 25.90 5.87 26.40 5.00 25.90 4.13 24.90 4.13 TH
24.40 9.00 24.90 9.87 25.90 9.87 26.40 9.00 25.90 8.13 24.90 8.13 TH
24.40 17.00 24.90 17.87 25.90 17.87 26.40 17.00 25.90 16.13 24.90 16.13 TH
24.40 39.00 24.90 39.87 25.90 39.87 26.40 39.00 25.90 38.13 24.90 38.13 TH
24.40 41.00 24.90 41.87 25.90 41.87 26.40 41.00 25.90 40.13 24.90 40.13 TH
24.40 45.00 24.90 45.87 25.90 45.87 26.40 45.00 25.90 44.13 24.90 44.13 TH
24.40 49.00 24.90 49.87 25.90 49.87 26.40 49.00 25.90 48.13 24.90 48.13 TH
24.40 53.00 24.90 53.87 25.90 53.87 26.40 53.00 25.90 52.13 24.90 52.13 TH
26.13 4.00 26.63 4.87 27.63 4.87 28.13 4.00 27.63 3.13 26.63 3.13 TH
26.13 8.00 26.63 8.87 27.63 8.87 28.13 8.00 27.63 7.13 26.63 7.13 TH
26.13 12.00 26.63 12.87 27.63 12.87 28.13 12.00 27.63 11.13 26.63 11.13 TH
26.13 14.00 26.63 14.87 27.63 14.87 28.13 14.00 27.63 13.13 26.63 13.13 TH
26.13 16.00 26.63 16.87 27.63 16.87 28.13 16.00 27.63 15.13 26.63 15.13 TH
26.13 18.00 26.63 18.87 27.63 18.87 28.13 18.00 27.63 17.13 26.63 17.13 TH
26.13 42.00 26.63 42.87 27.63 42.87 28.13 42.00 27.63 41.13 26.63 41.13 TH
26.13 48.00 26.63 48.87 27.63 48.87 28.13 48.00 27.63 47.13 26.63 47.13 TH
26.13 52.00 26.63 52.87 27.63 52.87 28.13 52.00 27.63 51.13 26.63 51.13 TH
26.13 56.00 26.63 56.87 27.63 56.87 28.13 56.00 27.63 55.13 26.63 55.13 TH
26.13 58.00 26.63 58.87 27.63 58.87 28.13 58.00 27.63 57.13 26.63 57.13 TH
27.87 17.00 28.37 17.87 29.37 17.87 29.87 17.00 29.37 16.13 28.37 16.13 TH
27.87 41.00 28.37 41.87 29.37 41.87 29.87 41.00 29.37 40.13 28.37 40.13 TH
27.87 57.00 28.37 57.87 29.37 57.87 29.87 57.00 29.37 56.13 28.37 56.13 TH
29.60 2.00 30.10 2.87 31.10 2.87 31.60 2.00 31.10 1.13 30.10 1.13 TH
29.60 6.00 30.10 6.87 31.10 6.87 31.60 6.00 31.10 5.13 30.10 5.13 TH
29.60 10.00 30.10 10.87 31.10 10.87 31.60 10.00 31.10 9.13 30.10 9.13 TH
29.60 42.00 30.10 42.87 31.10 42.87 31.60 42.00 31.10 41.13 30.10 41.13 TH
29.60 44.00 30.10 44.87 31.10 44.87 31.60 44.00 31.10 43.13 30.10 43.13 TH
29.60 46.00 30.10 46.87 31.10 46.87 31.60 46.00 31.10 45.13 30.10 45.13 TH
29.60 50.00 30.10 50.87 31.10 50.87 31.60 50.00 31.10 49.13 30.10 49.13 TH
29.60 54.00 30.10 54.87 31.10 54.87 31.60 54.00 31.10 53.13 30.10 53.13 TH
31.33 3.00 31.83 3.87 32.83 3.87 33.33 3.00 32.83 2.13 31.83 2.13 TH
31.33 7.00 31.83 7.87 32.83 7.87 33.33 7.00 32.83 6.13 31.83 6.13 TH
31.33 11.00 31.83 11.87 32.83 11.87 33.33 11.00 32.83 10.13 31.83 10.13 TH
31.33 15.00 31.83 15.87 32.83 15.87 33.33 15.00 32.83 14.13 31.83 14.13 TH
31.33 17.00 31.83 17.87 32.83 17.87 33.33 17.00 32.83 16.13 31.83 16.13 TH
31.33 19.00 31.83 19.87 32.83 19.87 33.33 19.00 32.83 18.13 31.83 18.13 TH
31.33 43.00 31.83 43.87 32.83 43.87 33.33 43.00 32.83 42.13 31.83 42.13 TH
31.33 47.00 31.83 47.87 32.83 47.87 33.33 47.00 32.83 46.13 31.83 46.13 TH
31.33 51.00 31.83 51.87 32.83 51.87 33.33 51.00 32.83 50.13 31.83 50.13 TH
31.33 55.00 31.83 55.87 32.83 55.87 33.33 55.00 32.83 54.13 31.83 54.13 TH
31.33 57.00 31.83 57.87 32.83 57.87 33.33 57.00 32.83 56.13 31.83 56.13 TH
31.33 59.00 31.83 59.87 32.83 59.87 33.33 59.00 32.83 58.13 31.83 58.13 TH
33.06 18.00 33.56 18.87 34.56 18.87 35.06 18.00 34.56 17.13 33.56 17.13 TH
33.06 58.00 33.56 58.87 34.56 58.87 35.06 58.00 34.56 57.13 33.56 57.13 TH
34.79 1.00 35.29 1.87 36.29 1.87 36.79 1.00 36.29 0.13 35.29 0.13 TH
34.79 5.00 35.29 5.87 36.29 5.87 36.79 5.00 36.29 4.13 35.29 4.13 TH
34.79 9.00 35.29 9.87 36.29 9.87 36.79 9.00 36.29 8.13 35.29 8.13 TH
34.79 13.00 35.29 13.87 36.29 13.87 36.79 13.00 36.29 12.13 35.29 12.13 TH
34.79 15.00 35.29 15.87 36.29 15.87 36.79 15.00 36.29 14.13 35.29 14.13 TH
34.79 37.00 35.29 37.87 36.29 37.87 36.79 37.00 36.29 36.13 35.29 36.13 TH
34.79 39.00 35.29 39.87 36.29 39.87 36.79 39.00 36.29 38.13 35.29 38.13 TH
34.79 41.00 35.29 41.87 36.29 41.87 36.79 41.00 36.29 40.13 35.29 40.13 TH
34.79 43.00 35.29 43.87 36.29 43.87 36.79 43.00 36.29 42.13 35.29 42.13 TH
34.79 45.00 35.29 45.87 36.29 45.87 36.79 45.00 36.29 44.13 35.29 44.13 TH
34.79 49.00 35.29 49.87 36.29 49.87 36.79 49.00 36.29 48.13 35.29 48.13 TH
34.79 53.00 35.29 53.87 36.29 53.87 36.79 53.00 36.29 52.13 35.29 52.13 TH
34.79 57.00 35.29 57.87 36.29 57.87 36.79 57.00 36.29 56.13 35.29 56.13 TH
34.79 59.00 35.29 59.87 36.29 59.87 36.79 59.00 36.29 58.13 35.29 58.13 TH
36.53 4.00 37.03 4.87 38.03 4.87 38.53 4.00 38.03 3.13 37.03 3.13 TH
36.53 8.00 37.03 8.87 38.03 8.87 38.53 8.00 38.03 7.13 37.03 7.13 TH
36.53 12.00 37.03 12.87 38.03 12.87 38.53 12.00 38.03 11.13 37.03 11.13 TH
36.53 16.00 37.03 16.87 38.03 16.87 38.53 16.00 38.03 15.13 37.03 15.13 TH
36.53 20.00 37.03 20.87 38.03 20.87 38.53 20.00 38.03 19.13 37.03 19.13 TH
36.53 40.00 37.03 40.87 38.03 40.87 38.53 40.00 38.03 39.13 37.03 39.13 TH
36.53 42.00 37.03 42.87 38.03 42.87 38.53 42.00 38.03 41.13 37.03 41.13 TH
36.53 44.00 37.03 44.87 38.03 44.87 38.53 44.00 38.03 43.13 37.03 43.13 TH
36.53 48.00 37.03 48.87 38.03 48.87 38.53 48.00 38.03 47.13 37.03 47.13 TH
36.53 52.00 37.03 52.87 38.03 52.87 38.53 52.00 38.03 51.13 37.03 51.13 TH
36.53 56.00 37.03 56.87 38.03 56.87 38.53 56.00 38.03 55.13 37.03 55.13 TH
38.26 19.00 38.76 19.87 39.76 19.87 40.26 19.00 39.76 18.13 38.76 18.13 TH
38.26 21.00 38.76 21.87 39.76 21.87 40.26 21.00 39.76 20.13 38.76 20.13 TH
38.26 25.00 38.76 25.87 39.76 25.87 40.26 25.00 39.76 24.13 38.76 24.13 TH
38.26 27.00 38.76 27.87 39.76 27.87 40.26 27.00 39.76 26.13 38.76 26.13 TH
38.26 29.00 38.76 29.87 39.76 29.87 40.26 29.00 39.76 28.13 38.76 28.13 TH
38.26 33.00 38.76 33.87 39.76 33.87 40.26 33.00 39.76 32.13 38.76 32.13 TH
38.26 35.00 38.76 35.87 39.76 35.87 40.26 35.00 39.76 34.13 38.76 34.13 TH
38.26 37.00 38.76 37.87 39.76 37.87 40.26 37.00 39.76 36.13 38.76 36.13 TH
38.26 41.00 38.76 41.87 39.76 41.87 40.26 41.00 39.76 40.13 38.76 40.13 TH
38.26 57.00 38.76 57.87 39.76 57.87 40.26 57.00 39.76 56.13 38.76 56.13 TH
38.26 59.00 38.76 59.87 39.76 59.87 40.26 59.00 39.76 58.13 38.76 58.13 TH
39.99 2.00 40.49 2.87 41.49 2.87 41.99 2.00 41.49 1.13 40.49 1.13 TH
39.99 6.00 40.49 6.87 41.49 6.87 41.99 6.00 41.49 5.13 40.49 5.13 TH
39.99 10.00 40.49 10.87 41.49 10.87 41.99 10.00 41.49 9.13 40.49 9.13 TH
39.99 14.00 40.49 14.87 41.49 14.87 41.99 14.00 41.49 13.13 40.49 13.13 TH
39.99 20.00 40.49 20.87 41.49 20.87 41.99 20.00 41.49 19.13 40.49 19.13 TH
39.99 22.00 40.49 22.87 41.49 22.87 41.99 22.00 41.49 21.13 40.49 21.13 TH
39.99 32.00 40.49 32.87 41.49 32.87 41.99 32.00 41.49 31.13 40.49 31.13 TH
39.99 36.00 40.49 36.87 41.49 36.87 41.99 36.00 41.49 35.13 40.49 35.13 TH
39.99 38.00 40.49 38.87 41.49 38.87 41.99 38.00 41.49 37.13 40.49 37.13 TH
39.99 46.00 40.49 46.87 41.49 46.87 41.99 46.00 41.49 45.13 40.49 45.13 TH
39.99 50.00 40.49 50.87 41.49 50.87 41.99 50.00 41.49 49.13 40.49 49.13 TH
39.99 54.00 40.49 54.87 41.49 54.87 41.99 54.00 41.49 53.13 40.49 53.13 TH
39.99 58.00 40.49 58.87 41.49 58.87 41.99 58.00 41.49 57.13 40.49 57.13 TH
41.72 3.00 42.22 3.87 43.22 3.87 43.72 3.00 43.22 2.13 42.22 2.13 TH
41.72 7.00 42.22 7.87 43.22 7.87 43.72 7.00 43.22 6.13 42.22 6.13 TH
41.72 11.00 42.22 11.87 43.22 11.87 43.72 11.00 43.22 10.13 42.22 10.13 TH
41.72 15.00 42.22 15.87 43.22 15.87 43.72 15.00 43.22 14.13 42.22 14.13 TH
41.72 19.00 42.22 19.87 43.22 19.87 43.72 19.00 43.22 18.13 42.22 18.13 TH
41.72 23.00 42.22 23.87 43.22 23.87 43.72 23.00 43.22 22.13 42.22 22.13 TH
41.72 27.00 42.22 27.87 43.22 27.87 43.72 27.00 43.22 26.13 42.22 26.13 TH
41.72 31.00 42.22 31.87 43.22 31.87 43.72 31.00 43.22 30.13 42.22 30.13 TH
41.72 35.00 42.22 35.87 43.22 35.87 43.72 35.00 43.22 34.13 42.22 34.13 TH
41.72 39.00 42.22 39.87 43.22 39.87 43.72 39.00 43.22 38.13 42.22 38.13 TH
41.72 41.00 42.22 41.87 43.22 41.87 43.72 41.00 43.22 40.13 42.22 40.13 TH
41.72 43.00 42.22 43.87 43.22 43.87 43.72 43.00 43.22 42.13 42.22 42.13 TH
41.72 45.00 42.22 45.87 43.22 45.87 43.72 45.00 43.22 44.13 42.22 44.13 TH
41.72 47.00 42.22 47.87 43.22 47.87 43.72 47.00 43.22 46.13 42.22 46.13 TH
41.72 51.00 42.22 51.87 43.22 51.87 43.72 51.00 43.22 50.13 42.22 50.13 TH
41.72 55.00 42.22 55.87 43.22 55.87 43.72 55.00 43.22 54.13 42.22 54.13 TH
41.72 57.00 42.22 57.87 43.22 57.87 43.72 57.00 43.22 56.13 42.22 56.13 TH
41.72 59.00 42.22 59.87 43.22 59.87 43.72 59.00 43.22 58.13 42.22 58.13 TH
43.45 42.00 43.95 42.87 44.95 42.87 45.45 42.00 44.95 41.13 43.95 41.13 TH
43.45 44.00 43.95 44.87 44.95 44.87 45.45 44.00 44.95 43.13 43.95 43.13 TH
43.45 46.00 43.95 46.87 44.95 46.87 45.45 46.00 44.95 45.13 43.95 45.13 TH
43.45 48.00 43.95 48.87 44.95 48.87 45.45 48.00 44.95 47.13 43.95 47.13 TH
43.45 52.00 43.95 52.87 44.95 52.87 45.45 52.00 44.95 51.13 43.95 51.13 TH
43.45 56.00 43.95 56.87 44.95 56.87 45.45 56.00 44.95 55.13 43.95 55.13 TH
43.45 58.00 43.95 58.87 44.95 58.87 45.45 58.00 44.95 57.13 43.95 57.13 TH
45.19 1.00 45.69 1.87 46.69 1.87 47.19 1.00 46.69 0.13 45.69 0.13 TH
45.19 5.00 45.69 5.87 46.69 5.87 47.19 5.00 46.69 4.13 45.69 4.13 TH
45.19 9.00 45.69 9.87 46.69 9.87 47.19 9.00 46.69 8.13 45.69 8.13 TH
45.19 13.00 45.69 13.87 46.69 13.87 47.19 13.00 46.69 12.13 45.69 12.13 TH
45.19 17.00 45.69 17.87 46.69 17.87 47.19 17.00 46.69 16.13 45.69 16.13 TH
45.19 21.00 45.69 21.87 46.69 21.87 47.19 21.00 46.69 20.13 45.69 20.13 TH
45.19 25.00 45.69 25.87 46.69 25.87 47.19 25.00 46.69 24.13 45.69 24.13 TH
45.19 29.00 45.69 29.87 46.69 29.87 47.19 29.00 46.69 28.13 45.69 28.13 TH
45.19 33.00 45.69 33.87 46.69 33.87 47.19 33.00 46.69 32.13 45.69 32.13 TH
45.19 37.00 45.69 37.87 46.69 37.87 47.19 37.00 46.69 36.13 45.69 36.13 TH
45.19 57.00 45.69 57.87 46.69 57.87 47.19 57.00 46.69 56.13 45.69 56.13 TH
46.92 2.00 47.42 2.87 48.42 2.87 48.92 2.00 48.42 1.13 47.42 1.13 TH
46.92 4.00 47.42 4.87 48.42 4.87 48.92 4.00 48.42 3.13 47.42 3.13 TH
46.92 6.00 47.42 6.87 48.42 6.87 48.92 6.00 48.42 5.13 47.42 5.13 TH
46.92 8.00 47.42 8.87 48.42 8.87 48.92 8.00 48.42 7.13 47.42 7.13 TH
46.92 10.00 47.42 10.87 48.42 10.87 48.92 10.00 48.42 9.13 47.42 9.13 TH
46.92 12.00 47.42 12.87 48.42 12.87 48.92 12.00 48.42 11.13 47.42 11.13 TH
46.92 14.00 47.42 14.87 48.42 14.87 48.92 14.00 48.42 13.13 47.42 13.13 TH
46.92 16.00 47.42 16.87 48.42 16.87 48.92 16.00 48.42 15.13 47.42 15.13 TH
46.92 26.00 47.42 26.87 48.42 26.87 48.92 26.00 48.42 25.13 47.42 25.13 TH
46.92 28.00 47.42 28.87 48.42 28.87 48.92 28.00 48.42 27.13 47.42 27.13 TH
46.92 30.00 47.42 30.87 48.42 30.87 48.92 30.00 48.42 29.13 47.42 29.13 TH
46.92 32.00 47.42 32.87 48.42 32.87 48.92 32.00 48.42 31.13 47.42 31.13 TH
46.92 44.00 47.42 44.87 48.42 44.87 48.92 44.00 48.42 43.13 47.42 43.13 TH
46.92 48.00 47.42 48.87 48.42 48.87 48.92 48.00 48.42 47.13 47.42 47.13 TH
48.65 3.00 49.15 3.87 50.15 3.87 50.65 3.00 50.15 2.13 49.15 2.13 TH
48.65 7.00 49.15 7.87 50.15 7.87 50.65 7.00 50.15 6.13 49.15 6.13 TH
48.65 9.00 49.15 9.87 50.15 9.87 50.65 9.00 50.15 8.13 49.15 8.13 TH
48.65 13.00 49.15 13.87 50.15 13.87 50.65 13.00 50.15 12.13 49.15 12.13 TH
48.65 17.00 49.15 17.87 50.15 17.87 50.65 17.00 50.15 16.13 49.15 16.13 TH
48.65 19.00 49.15 19.87 50.15 19.87 50.65 19.00 50.15 18.13 49.15 18.13 TH
48.65 21.00 49.15 21.87 50.15 21.87 50.65 21.00 50.15 20.13 49.15 20.13 TH
48.65 23.00 49.15 23.87 50.15 23.87 50.65 23.00 50.15 22.13 49.15 22.13 TH
48.65 33.00 49.15 33.87 50.15 33.87 50.65 33.00 50.15 32.13 49.15 32.13 TH
48.65 35.00 49.15 35.87 50.15 35.87 50.65 35.00 50.15 34.13 49.15 34.13 TH
48.65 37.00 49.15 37.87 50.15 37.87 50.65 37.00 50.15 36.13 49.15 36.13 TH
48.65 39.00 49.15 39.87 50.15 39.87 50.65 39.00 50.15 38.13 49.15 38.13 TH
48.65 43.00 49.15 43.87 50.15 43.87 50.65 43.00 50.15 42.13 49.15 42.13 TH
48.65 47.00 49.15 47.87 50.15 47.87 50.65 47.00 50.15 46.13 49.15 46.13 TH
48.65 51.00 49.15 51.87 50.15 51.87 50.65 51.00 50.15 50.13 49.15 50.13 TH
48.65 55.00 49.15 55.87 50.15 55.87 50.65 55.00 50.15 54.13 49.15 54.13 TH
50.38 2.00 50.88 2.87 51.88 2.87 52.38 2.00 51.88 1.13 50.88 1.13 TH
50.38 6.00 50.88 6.87 51.88 6.87 52.38 6.00 51.88 5.13 50.88 5.13 TH
50.38 10.00 50.88 10.87 51.88 10.87 52.38 10.00 51.88 9.13 50.88 9.13 TH
50.38 14.00 50.88 14.87 51.88 14.87 52.38 14.00 51.88 13.13 50.88 13.13 TH
50.38 28.00 50.88 28.87 51.88 28.87 52.38 28.00 51.88 27.13 50.88 27.13 TH
50.38 32.00 50.88 32.87 51.88 32.87 52.38 32.00 51.88 31.13 50.88 31.13 TH
50.38 36.00 50.88 36.87 51.88 36.87 52.38 36.00 51.88 35.13 50.88 35.13 TH
50.38 40.00 50.88 40.87 51.88 40.87 52.38 40.00 51.88 39.13 50.88 39.13 TH
50.38 42.00 50.88 42.87 51.88 42.87 52.38 42.00 51.88 41.13 50.88 41.13 TH
50.38 44.00 50.88 44.87 51.88 44.87 52.38 44.00 51.88 43.13 50.88 43.13 TH
50.38 46.00 50.88 46.87 51.88 46.87 52.38 46.00 51.88 45.13 50.88 45.13 TH
50.38 48.00 50.88 48.87 51.88 48.87 52.38 48.00 51.88 47.13 50.88 47.13 TH
50.38 50.00 50.88 50.87 51.88 50.87 52.38 50.00 51.88 49.13 50.88 49.13 TH
50.38 54.00 50.88 54.87 51.88 54.87 52.38 54.00 51.88 53.13 50.88 53.13 TH
50.38 58.00 50.88 58.87 51.88 58.87 52.38 58.00 51.88 57.13 50.88 57.13 TH
52.11 1.00 52.61 1.87 53.61 1.87 54.11 1.00 53.61 0.13 52.61 0.13 TH
52.11 3.00 52.61 3.87 53.61 3.87 54.11 3.00 53.61 2.13 52.61 2.13 TH
52.11 5.00 52.61 5.87 53.61 5.87 54.11 5.00 53.61 4.13 52.61 4.13 TH
52.11 7.00 52.61 7.87 53.61 7.87 54.11 7.00 53.61 6.13 52.61 6.13 TH
52.11 11.00 52.61 11.87 53.61 11.87 54.11 11.00 53.61 10.13 52.61 10.13 TH
52.11 15.00 52.61 15.87 53.61 15.87 54.11 15.00 53.61 14.13 52.61 14.13 TH
52.11 17.00 52.61 17.87 53.61 17.87 54.11 17.00 53.61 16.13 52.61 16.13 TH
52.11 21.00 52.61 21.87 53.61 21.87 54.11 21.00 53.61 20.13 52.61 20.13 TH
52.11 33.00 52.61 33.87 53.61 33.87 54.11 33.00 53.61 32.13 52.61 32.13 TH
52.11 35.00 52.61 35.87 53.61 35.87 54.11 35.00 53.61 34.13 52.61 34.13 TH
52.11 37.00 52.61 37.87 53.61 37.87 54.11 37.00 53.61 36.13 52.61 36.13 TH
52.11 39.00 52.61 39.87 53.61 39.87 54.11 39.00 53.61 38.13 52.61 38.13 TH
52.11 43.00 52.61 43.87 53.61 43.87 54.11 43.00 53.61 42.13 52.61 42.13 TH
52.11 47.00 52.61 47.87 53.61 47.87 54.11 47.00 53.61 46.13 52.61 46.13 TH
52.11 49.00 52.61 49.87 53.61 49.87 54.11 49.00 53.61 48.13 52.61 48.13 TH
52.11 53.00 52.61 53.87 53.61 53.87 54.11 53.00 53.61 52.13 52.61 52.13 TH
52.11 57.00 52.61 57.87 53.61 57.87 54.11 57.00 53.61 56.13 52.61 56.13 TH
53.85 4.00 54.35 4.87 55.35 4.87 55.85 4.00 55.35 3.13 54.35 3.13 TH
53.85 8.00 54.35 8.87 55.35 8.87 55.85 8.00 55.35 7.13 54.35 7.13 TH
53.85 10.00 54.35 10.87 55.35 10.87 55.85 10.00 55.35 9.13 54.35 9.13 TH
53.85 14.00 54.35 14.87 55.35 14.87 55.85 14.00 55.35 13.13 54.35 13.13 TH
53.85 18.00 54.35 18.87 55.35 18.87 55.85 18.00 55.35 17.13 54.35 17.13 TH
53.85 20.00 54.35 20.87 55.35 20.87 55.85 20.00 55.35 19.13 54.35 19.13 TH
53.85 22.00 54.35 22.87 55.35 22.87 55.85 22.00 55.35 21.13 54.35 21.13 TH
53.85 24.00 54.35 24.87 55.35 24.87 55.85 24.00 55.35 23.13 54.35 23.13 TH
53.85 28.00 54.35 28.87 55.35 28.87 55.85 28.00 55.35 27.13 54.35 27.13 TH
53.85 32.00 54.35 32.87 55.35 32.87 55.85 32.00 55.35 31.13 54.35 31.13 TH
53.85 34.00 54.35 34.87 55.35 34.87 55.85 34.00 55.35 33.13 54.35 33.13 TH
53.85 38.00 54.35 38.87 55.35 38.87 55.85 38.00 55.35 37.13 54.35 37.13 TH
53.85 42.00 54.35 42.87 55.35 42.87 55.85 42.00 55.35 41.13 54.35 41.13 TH
53.85 46.00 54.35 46.87 55.35 46.87 55.85 46.00 55.35 45.13 54.35 45.13 TH
53.85 50.00 54.35 50.87 55.35 50.87 55.85 50.00 55.35 49.13 54.35 49.13 TH
53.85 52.00 54.35 52.87 55.35 52.87 55.85 52.00 55.35 51.13 54.35 51.13 TH
53.85 54.00 54.35 54.87 55.35 54.87 55.85 54.00 55.35 53.13 54.35 53.13 TH
53.85 56.00 54.35 56.87 55.35 56.87 55.85 56.00 55.35 55.13 54.35 55.13 TH
55.58 3.00 56.08 3.87 57.08 3.87 57.58 3.00 57.08 2.13 56.08 2.13 TH
55.58 7.00 56.08 7.87 57.08 7.87 57.58 7.00 57.08 6.13 56.08 6.13 TH
55.58 27.00 56.08 27.87 57.08 27.87 57.58 27.00 57.08 26.13 56.08 26.13 TH
55.58 31.00 56.08 31.87 57.08 31.87 57.58 31.00 57.08 30.13 56.08 30.13 TH
55.58 33.00 56.08 33.87 57.08 33.87 57.58 33.00 57.08 32.13 56.08 32.13 TH
55.58 37.00 56.08 37.87 57.08 37.87 57.58 37.00 57.08 36.13 56.08 36.13 TH
55.58 41.00 56.08 41.87 57.08 41.87 57.58 41.00 57.08 40.13 56.08 40.13 TH
55.58 45.00 56.08 45.87 57.08 45.87 57.58 45.00 57.08 44.13 56.08 44.13 TH
55.58 51.00 56.08 51.87 57.08 51.87 57.58 51.00 57.08 50.13 56.08 50.13 TH
55.58 55.00 56.08 55.87 57.08 55.87 57.58 55.00 57.08 54.13 56.08 54.13 TH
28.87 29.00 9.00 TD
0.00 0.00 0.00 0.00 setcmykcolor
28.87 29.00 7.43 TD
0.00 0.00 0.00 1.00 setcmykcolor
28.87 29.00 5.86 TD
0.00 0.00 0.00 0.00 setcmykcolor
28.87 29.00 4.29 TD
0.00 0.00 0.00 1.00 setcmykcolor
28.87 29.00 2.72 TD
0.00 0.00 0.00 0.00 setcmykcolor
28.87 29.00 1.15 TD

View File

@ -0,0 +1,227 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Zint 2.9.1.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 40 30
%%EndComments
/TL { setlinewidth moveto lineto stroke } bind def
/TD { newpath 0 360 arc fill } bind def
/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def
/TB { 2 copy } bind def
/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def
/TE { pop pop } bind def
newpath
1.00 0.00 0.00 setrgbcolor
30.00 0.00 TB 0.00 40.00 TR
TE
0.00 0.00 1.00 setrgbcolor
2.00 28.00 TB 0.00 40.00 TR
TE
2.00 0.00 TB 0.00 40.00 TR
TE
26.00 2.00 TB 0.00 2.00 TR
TE
26.00 2.00 TB 38.00 2.00 TR
TE
0.00 1.00 1.00 setrgbcolor
2.00 24.00 TB 22.00 4.00 TR
TE
2.00 24.00 TB 28.00 4.00 TR
TE
2.00 22.00 TB 18.00 2.00 TR
TE
2.00 20.00 TB 10.00 2.00 TR
TE
2.00 20.00 TB 22.00 2.00 TR
TE
2.00 20.00 TB 28.00 4.00 TR
TE
2.00 16.00 TB 16.00 2.00 TR
TE
2.00 12.00 TB 16.00 2.00 TR
TE
2.00 12.00 TB 20.00 2.00 TR
TE
2.00 12.00 TB 24.00 8.00 TR
TE
2.00 10.00 TB 10.00 2.00 TR
TE
2.00 10.00 TB 22.00 2.00 TR
TE
2.00 8.00 TB 26.00 4.00 TR
TE
2.00 6.00 TB 16.00 6.00 TR
TE
2.00 6.00 TB 30.00 2.00 TR
TE
2.00 4.00 TB 10.00 2.00 TR
TE
1.00 0.00 1.00 setrgbcolor
2.00 24.00 TB 20.00 2.00 TR
TE
2.00 22.00 TB 10.00 2.00 TR
TE
2.00 22.00 TB 16.00 2.00 TR
TE
2.00 22.00 TB 22.00 4.00 TR
TE
2.00 20.00 TB 18.00 2.00 TR
TE
2.00 18.00 TB 20.00 2.00 TR
TE
2.00 18.00 TB 24.00 2.00 TR
TE
2.00 16.00 TB 10.00 2.00 TR
TE
2.00 16.00 TB 22.00 2.00 TR
TE
2.00 16.00 TB 28.00 2.00 TR
TE
2.00 10.00 TB 16.00 2.00 TR
TE
2.00 10.00 TB 24.00 4.00 TR
TE
2.00 10.00 TB 30.00 2.00 TR
TE
2.00 8.00 TB 20.00 2.00 TR
TE
2.00 4.00 TB 16.00 12.00 TR
TE
1.00 1.00 0.00 setrgbcolor
2.00 24.00 TB 10.00 2.00 TR
TE
2.00 24.00 TB 18.00 2.00 TR
TE
2.00 24.00 TB 26.00 2.00 TR
TE
2.00 20.00 TB 20.00 2.00 TR
TE
2.00 20.00 TB 26.00 2.00 TR
TE
2.00 18.00 TB 10.00 2.00 TR
TE
2.00 18.00 TB 16.00 2.00 TR
TE
2.00 18.00 TB 22.00 2.00 TR
TE
2.00 18.00 TB 28.00 2.00 TR
TE
2.00 16.00 TB 18.00 4.00 TR
TE
2.00 16.00 TB 26.00 2.00 TR
TE
2.00 16.00 TB 30.00 2.00 TR
TE
2.00 12.00 TB 22.00 2.00 TR
TE
2.00 10.00 TB 18.00 4.00 TR
TE
2.00 8.00 TB 10.00 2.00 TR
TE
2.00 8.00 TB 16.00 2.00 TR
TE
2.00 8.00 TB 22.00 4.00 TR
TE
2.00 8.00 TB 30.00 2.00 TR
TE
2.00 6.00 TB 28.00 2.00 TR
TE
2.00 4.00 TB 30.00 2.00 TR
TE
0.00 1.00 0.00 setrgbcolor
2.00 24.00 TB 16.00 2.00 TR
TE
2.00 22.00 TB 20.00 2.00 TR
TE
2.00 22.00 TB 26.00 6.00 TR
TE
2.00 20.00 TB 16.00 2.00 TR
TE
2.00 20.00 TB 24.00 2.00 TR
TE
2.00 18.00 TB 18.00 2.00 TR
TE
2.00 18.00 TB 26.00 2.00 TR
TE
2.00 18.00 TB 30.00 2.00 TR
TE
2.00 16.00 TB 24.00 2.00 TR
TE
2.00 12.00 TB 10.00 2.00 TR
TE
2.00 12.00 TB 18.00 2.00 TR
TE
2.00 10.00 TB 28.00 2.00 TR
TE
2.00 8.00 TB 18.00 2.00 TR
TE
2.00 6.00 TB 10.00 2.00 TR
TE
2.00 6.00 TB 22.00 6.00 TR
TE
2.00 4.00 TB 28.00 2.00 TR
TE
0.00 0.00 0.00 setrgbcolor
2.00 26.00 TB 6.00 28.00 TR
TE
2.00 24.00 TB 6.00 2.00 TR
TE
22.00 4.00 TB 12.00 2.00 TR
TE
22.00 4.00 TB 32.00 2.00 TR
TE
2.00 22.00 TB 6.00 4.00 TR
TE
2.00 20.00 TB 6.00 2.00 TR
TE
2.00 18.00 TB 6.00 4.00 TR
TE
2.00 16.00 TB 6.00 2.00 TR
TE
2.00 14.00 TB 6.00 4.00 TR
TE
2.00 14.00 TB 16.00 2.00 TR
TE
2.00 14.00 TB 20.00 2.00 TR
TE
2.00 14.00 TB 24.00 2.00 TR
TE
2.00 14.00 TB 28.00 2.00 TR
TE
2.00 12.00 TB 6.00 2.00 TR
TE
2.00 10.00 TB 6.00 4.00 TR
TE
2.00 8.00 TB 6.00 2.00 TR
TE
2.00 6.00 TB 6.00 4.00 TR
TE
2.00 4.00 TB 6.00 2.00 TR
TE
2.00 2.00 TB 6.00 28.00 TR
TE
1.00 1.00 1.00 setrgbcolor
2.00 24.00 TB 8.00 2.00 TR
TE
22.00 4.00 TB 14.00 2.00 TR
TE
2.00 20.00 TB 8.00 2.00 TR
TE
2.00 16.00 TB 8.00 2.00 TR
TE
2.00 14.00 TB 10.00 2.00 TR
TE
2.00 14.00 TB 18.00 2.00 TR
TE
2.00 14.00 TB 22.00 2.00 TR
TE
2.00 14.00 TB 26.00 2.00 TR
TE
2.00 14.00 TB 30.00 2.00 TR
TE
2.00 12.00 TB 8.00 2.00 TR
TE
2.00 8.00 TB 8.00 2.00 TR
TE
2.00 4.00 TB 8.00 2.00 TR
TE

View File

@ -0,0 +1,227 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Zint 2.9.1.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 40 38
%%EndComments
/TL { setlinewidth moveto lineto stroke } bind def
/TD { newpath 0 360 arc fill } bind def
/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def
/TB { 2 copy } bind def
/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def
/TE { pop pop } bind def
newpath
0.00 1.00 1.00 0.00 setcmykcolor
38.00 0.00 TB 0.00 40.00 TR
TE
1.00 1.00 0.00 0.00 setcmykcolor
4.00 32.00 TB 0.00 40.00 TR
TE
4.00 2.00 TB 0.00 40.00 TR
TE
26.00 6.00 TB 0.00 4.00 TR
TE
26.00 6.00 TB 36.00 4.00 TR
TE
1.00 0.00 0.00 0.00 setcmykcolor
2.00 28.00 TB 22.00 4.00 TR
TE
2.00 28.00 TB 28.00 4.00 TR
TE
2.00 26.00 TB 18.00 2.00 TR
TE
2.00 24.00 TB 10.00 2.00 TR
TE
2.00 24.00 TB 22.00 2.00 TR
TE
2.00 24.00 TB 28.00 4.00 TR
TE
2.00 20.00 TB 16.00 2.00 TR
TE
2.00 16.00 TB 16.00 2.00 TR
TE
2.00 16.00 TB 20.00 2.00 TR
TE
2.00 16.00 TB 24.00 8.00 TR
TE
2.00 14.00 TB 10.00 2.00 TR
TE
2.00 14.00 TB 22.00 2.00 TR
TE
2.00 12.00 TB 26.00 4.00 TR
TE
2.00 10.00 TB 16.00 6.00 TR
TE
2.00 10.00 TB 30.00 2.00 TR
TE
2.00 8.00 TB 10.00 2.00 TR
TE
0.00 1.00 0.00 0.00 setcmykcolor
2.00 28.00 TB 20.00 2.00 TR
TE
2.00 26.00 TB 10.00 2.00 TR
TE
2.00 26.00 TB 16.00 2.00 TR
TE
2.00 26.00 TB 22.00 4.00 TR
TE
2.00 24.00 TB 18.00 2.00 TR
TE
2.00 22.00 TB 20.00 2.00 TR
TE
2.00 22.00 TB 24.00 2.00 TR
TE
2.00 20.00 TB 10.00 2.00 TR
TE
2.00 20.00 TB 22.00 2.00 TR
TE
2.00 20.00 TB 28.00 2.00 TR
TE
2.00 14.00 TB 16.00 2.00 TR
TE
2.00 14.00 TB 24.00 4.00 TR
TE
2.00 14.00 TB 30.00 2.00 TR
TE
2.00 12.00 TB 20.00 2.00 TR
TE
2.00 8.00 TB 16.00 12.00 TR
TE
0.00 0.00 1.00 0.00 setcmykcolor
2.00 28.00 TB 10.00 2.00 TR
TE
2.00 28.00 TB 18.00 2.00 TR
TE
2.00 28.00 TB 26.00 2.00 TR
TE
2.00 24.00 TB 20.00 2.00 TR
TE
2.00 24.00 TB 26.00 2.00 TR
TE
2.00 22.00 TB 10.00 2.00 TR
TE
2.00 22.00 TB 16.00 2.00 TR
TE
2.00 22.00 TB 22.00 2.00 TR
TE
2.00 22.00 TB 28.00 2.00 TR
TE
2.00 20.00 TB 18.00 4.00 TR
TE
2.00 20.00 TB 26.00 2.00 TR
TE
2.00 20.00 TB 30.00 2.00 TR
TE
2.00 16.00 TB 22.00 2.00 TR
TE
2.00 14.00 TB 18.00 4.00 TR
TE
2.00 12.00 TB 10.00 2.00 TR
TE
2.00 12.00 TB 16.00 2.00 TR
TE
2.00 12.00 TB 22.00 4.00 TR
TE
2.00 12.00 TB 30.00 2.00 TR
TE
2.00 10.00 TB 28.00 2.00 TR
TE
2.00 8.00 TB 30.00 2.00 TR
TE
1.00 0.00 1.00 0.00 setcmykcolor
2.00 28.00 TB 16.00 2.00 TR
TE
2.00 26.00 TB 20.00 2.00 TR
TE
2.00 26.00 TB 26.00 6.00 TR
TE
2.00 24.00 TB 16.00 2.00 TR
TE
2.00 24.00 TB 24.00 2.00 TR
TE
2.00 22.00 TB 18.00 2.00 TR
TE
2.00 22.00 TB 26.00 2.00 TR
TE
2.00 22.00 TB 30.00 2.00 TR
TE
2.00 20.00 TB 24.00 2.00 TR
TE
2.00 16.00 TB 10.00 2.00 TR
TE
2.00 16.00 TB 18.00 2.00 TR
TE
2.00 14.00 TB 28.00 2.00 TR
TE
2.00 12.00 TB 18.00 2.00 TR
TE
2.00 10.00 TB 10.00 2.00 TR
TE
2.00 10.00 TB 22.00 6.00 TR
TE
2.00 8.00 TB 28.00 2.00 TR
TE
0.00 0.00 0.00 1.00 setcmykcolor
2.00 30.00 TB 6.00 28.00 TR
TE
2.00 28.00 TB 6.00 2.00 TR
TE
22.00 8.00 TB 12.00 2.00 TR
TE
22.00 8.00 TB 32.00 2.00 TR
TE
2.00 26.00 TB 6.00 4.00 TR
TE
2.00 24.00 TB 6.00 2.00 TR
TE
2.00 22.00 TB 6.00 4.00 TR
TE
2.00 20.00 TB 6.00 2.00 TR
TE
2.00 18.00 TB 6.00 4.00 TR
TE
2.00 18.00 TB 16.00 2.00 TR
TE
2.00 18.00 TB 20.00 2.00 TR
TE
2.00 18.00 TB 24.00 2.00 TR
TE
2.00 18.00 TB 28.00 2.00 TR
TE
2.00 16.00 TB 6.00 2.00 TR
TE
2.00 14.00 TB 6.00 4.00 TR
TE
2.00 12.00 TB 6.00 2.00 TR
TE
2.00 10.00 TB 6.00 4.00 TR
TE
2.00 8.00 TB 6.00 2.00 TR
TE
2.00 6.00 TB 6.00 28.00 TR
TE
0.00 0.00 0.00 0.00 setcmykcolor
2.00 28.00 TB 8.00 2.00 TR
TE
22.00 8.00 TB 14.00 2.00 TR
TE
2.00 24.00 TB 8.00 2.00 TR
TE
2.00 20.00 TB 8.00 2.00 TR
TE
2.00 18.00 TB 10.00 2.00 TR
TE
2.00 18.00 TB 18.00 2.00 TR
TE
2.00 18.00 TB 22.00 2.00 TR
TE
2.00 18.00 TB 26.00 2.00 TR
TE
2.00 18.00 TB 30.00 2.00 TR
TE
2.00 16.00 TB 8.00 2.00 TR
TE
2.00 12.00 TB 8.00 2.00 TR
TE
2.00 8.00 TB 8.00 2.00 TR
TE

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

View File

@ -0,0 +1,380 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="58" height="60" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol
</desc>
<g id="barcode" fill="#121212">
<rect x="0" y="0" width="58" height="60" fill="#EEEEEE" opacity="0.133" />
<path d="M 55.58 25.00 L 56.08 25.87 L 57.08 25.87 L 57.58 25.00 L 57.08 24.13 L 56.08 24.13 Z" opacity="0.867" />
<path d="M 55.58 29.00 L 56.08 29.87 L 57.08 29.87 L 57.58 29.00 L 57.08 28.13 L 56.08 28.13 Z" opacity="0.867" />
<path d="M 55.58 33.00 L 56.08 33.87 L 57.08 33.87 L 57.58 33.00 L 57.08 32.13 L 56.08 32.13 Z" opacity="0.867" />
<path d="M 55.58 37.00 L 56.08 37.87 L 57.08 37.87 L 57.58 37.00 L 57.08 36.13 L 56.08 36.13 Z" opacity="0.867" />
<path d="M 55.58 41.00 L 56.08 41.87 L 57.08 41.87 L 57.58 41.00 L 57.08 40.13 L 56.08 40.13 Z" opacity="0.867" />
<path d="M 55.58 45.00 L 56.08 45.87 L 57.08 45.87 L 57.58 45.00 L 57.08 44.13 L 56.08 44.13 Z" opacity="0.867" />
<path d="M 55.58 49.00 L 56.08 49.87 L 57.08 49.87 L 57.58 49.00 L 57.08 48.13 L 56.08 48.13 Z" opacity="0.867" />
<path d="M 55.58 53.00 L 56.08 53.87 L 57.08 53.87 L 57.58 53.00 L 57.08 52.13 L 56.08 52.13 Z" opacity="0.867" />
<path d="M 55.58 57.00 L 56.08 57.87 L 57.08 57.87 L 57.58 57.00 L 57.08 56.13 L 56.08 56.13 Z" opacity="0.867" />
<path d="M 55.58 59.00 L 56.08 59.87 L 57.08 59.87 L 57.58 59.00 L 57.08 58.13 L 56.08 58.13 Z" opacity="0.867" />
<path d="M 53.85 4.00 L 54.35 4.87 L 55.35 4.87 L 55.85 4.00 L 55.35 3.13 L 54.35 3.13 Z" opacity="0.867" />
<path d="M 53.85 8.00 L 54.35 8.87 L 55.35 8.87 L 55.85 8.00 L 55.35 7.13 L 54.35 7.13 Z" opacity="0.867" />
<path d="M 53.85 10.00 L 54.35 10.87 L 55.35 10.87 L 55.85 10.00 L 55.35 9.13 L 54.35 9.13 Z" opacity="0.867" />
<path d="M 53.85 12.00 L 54.35 12.87 L 55.35 12.87 L 55.85 12.00 L 55.35 11.13 L 54.35 11.13 Z" opacity="0.867" />
<path d="M 53.85 14.00 L 54.35 14.87 L 55.35 14.87 L 55.85 14.00 L 55.35 13.13 L 54.35 13.13 Z" opacity="0.867" />
<path d="M 53.85 16.00 L 54.35 16.87 L 55.35 16.87 L 55.85 16.00 L 55.35 15.13 L 54.35 15.13 Z" opacity="0.867" />
<path d="M 53.85 18.00 L 54.35 18.87 L 55.35 18.87 L 55.85 18.00 L 55.35 17.13 L 54.35 17.13 Z" opacity="0.867" />
<path d="M 53.85 20.00 L 54.35 20.87 L 55.35 20.87 L 55.85 20.00 L 55.35 19.13 L 54.35 19.13 Z" opacity="0.867" />
<path d="M 53.85 22.00 L 54.35 22.87 L 55.35 22.87 L 55.85 22.00 L 55.35 21.13 L 54.35 21.13 Z" opacity="0.867" />
<path d="M 53.85 24.00 L 54.35 24.87 L 55.35 24.87 L 55.85 24.00 L 55.35 23.13 L 54.35 23.13 Z" opacity="0.867" />
<path d="M 53.85 42.00 L 54.35 42.87 L 55.35 42.87 L 55.85 42.00 L 55.35 41.13 L 54.35 41.13 Z" opacity="0.867" />
<path d="M 53.85 46.00 L 54.35 46.87 L 55.35 46.87 L 55.85 46.00 L 55.35 45.13 L 54.35 45.13 Z" opacity="0.867" />
<path d="M 53.85 50.00 L 54.35 50.87 L 55.35 50.87 L 55.85 50.00 L 55.35 49.13 L 54.35 49.13 Z" opacity="0.867" />
<path d="M 53.85 54.00 L 54.35 54.87 L 55.35 54.87 L 55.85 54.00 L 55.35 53.13 L 54.35 53.13 Z" opacity="0.867" />
<path d="M 52.11 3.00 L 52.61 3.87 L 53.61 3.87 L 54.11 3.00 L 53.61 2.13 L 52.61 2.13 Z" opacity="0.867" />
<path d="M 52.11 5.00 L 52.61 5.87 L 53.61 5.87 L 54.11 5.00 L 53.61 4.13 L 52.61 4.13 Z" opacity="0.867" />
<path d="M 52.11 7.00 L 52.61 7.87 L 53.61 7.87 L 54.11 7.00 L 53.61 6.13 L 52.61 6.13 Z" opacity="0.867" />
<path d="M 52.11 13.00 L 52.61 13.87 L 53.61 13.87 L 54.11 13.00 L 53.61 12.13 L 52.61 12.13 Z" opacity="0.867" />
<path d="M 52.11 19.00 L 52.61 19.87 L 53.61 19.87 L 54.11 19.00 L 53.61 18.13 L 52.61 18.13 Z" opacity="0.867" />
<path d="M 52.11 21.00 L 52.61 21.87 L 53.61 21.87 L 54.11 21.00 L 53.61 20.13 L 52.61 20.13 Z" opacity="0.867" />
<path d="M 52.11 23.00 L 52.61 23.87 L 53.61 23.87 L 54.11 23.00 L 53.61 22.13 L 52.61 22.13 Z" opacity="0.867" />
<path d="M 52.11 29.00 L 52.61 29.87 L 53.61 29.87 L 54.11 29.00 L 53.61 28.13 L 52.61 28.13 Z" opacity="0.867" />
<path d="M 52.11 35.00 L 52.61 35.87 L 53.61 35.87 L 54.11 35.00 L 53.61 34.13 L 52.61 34.13 Z" opacity="0.867" />
<path d="M 52.11 37.00 L 52.61 37.87 L 53.61 37.87 L 54.11 37.00 L 53.61 36.13 L 52.61 36.13 Z" opacity="0.867" />
<path d="M 52.11 39.00 L 52.61 39.87 L 53.61 39.87 L 54.11 39.00 L 53.61 38.13 L 52.61 38.13 Z" opacity="0.867" />
<path d="M 52.11 45.00 L 52.61 45.87 L 53.61 45.87 L 54.11 45.00 L 53.61 44.13 L 52.61 44.13 Z" opacity="0.867" />
<path d="M 52.11 51.00 L 52.61 51.87 L 53.61 51.87 L 54.11 51.00 L 53.61 50.13 L 52.61 50.13 Z" opacity="0.867" />
<path d="M 52.11 53.00 L 52.61 53.87 L 53.61 53.87 L 54.11 53.00 L 53.61 52.13 L 52.61 52.13 Z" opacity="0.867" />
<path d="M 52.11 55.00 L 52.61 55.87 L 53.61 55.87 L 54.11 55.00 L 53.61 54.13 L 52.61 54.13 Z" opacity="0.867" />
<path d="M 52.11 57.00 L 52.61 57.87 L 53.61 57.87 L 54.11 57.00 L 53.61 56.13 L 52.61 56.13 Z" opacity="0.867" />
<path d="M 52.11 59.00 L 52.61 59.87 L 53.61 59.87 L 54.11 59.00 L 53.61 58.13 L 52.61 58.13 Z" opacity="0.867" />
<path d="M 50.38 4.00 L 50.88 4.87 L 51.88 4.87 L 52.38 4.00 L 51.88 3.13 L 50.88 3.13 Z" opacity="0.867" />
<path d="M 50.38 8.00 L 50.88 8.87 L 51.88 8.87 L 52.38 8.00 L 51.88 7.13 L 50.88 7.13 Z" opacity="0.867" />
<path d="M 50.38 12.00 L 50.88 12.87 L 51.88 12.87 L 52.38 12.00 L 51.88 11.13 L 50.88 11.13 Z" opacity="0.867" />
<path d="M 50.38 16.00 L 50.88 16.87 L 51.88 16.87 L 52.38 16.00 L 51.88 15.13 L 50.88 15.13 Z" opacity="0.867" />
<path d="M 50.38 20.00 L 50.88 20.87 L 51.88 20.87 L 52.38 20.00 L 51.88 19.13 L 50.88 19.13 Z" opacity="0.867" />
<path d="M 50.38 24.00 L 50.88 24.87 L 51.88 24.87 L 52.38 24.00 L 51.88 23.13 L 50.88 23.13 Z" opacity="0.867" />
<path d="M 50.38 28.00 L 50.88 28.87 L 51.88 28.87 L 52.38 28.00 L 51.88 27.13 L 50.88 27.13 Z" opacity="0.867" />
<path d="M 50.38 32.00 L 50.88 32.87 L 51.88 32.87 L 52.38 32.00 L 51.88 31.13 L 50.88 31.13 Z" opacity="0.867" />
<path d="M 50.38 36.00 L 50.88 36.87 L 51.88 36.87 L 52.38 36.00 L 51.88 35.13 L 50.88 35.13 Z" opacity="0.867" />
<path d="M 50.38 40.00 L 50.88 40.87 L 51.88 40.87 L 52.38 40.00 L 51.88 39.13 L 50.88 39.13 Z" opacity="0.867" />
<path d="M 50.38 44.00 L 50.88 44.87 L 51.88 44.87 L 52.38 44.00 L 51.88 43.13 L 50.88 43.13 Z" opacity="0.867" />
<path d="M 50.38 46.00 L 50.88 46.87 L 51.88 46.87 L 52.38 46.00 L 51.88 45.13 L 50.88 45.13 Z" opacity="0.867" />
<path d="M 50.38 50.00 L 50.88 50.87 L 51.88 50.87 L 52.38 50.00 L 51.88 49.13 L 50.88 49.13 Z" opacity="0.867" />
<path d="M 50.38 54.00 L 50.88 54.87 L 51.88 54.87 L 52.38 54.00 L 51.88 53.13 L 50.88 53.13 Z" opacity="0.867" />
<path d="M 50.38 58.00 L 50.88 58.87 L 51.88 58.87 L 52.38 58.00 L 51.88 57.13 L 50.88 57.13 Z" opacity="0.867" />
<path d="M 48.65 47.00 L 49.15 47.87 L 50.15 47.87 L 50.65 47.00 L 50.15 46.13 L 49.15 46.13 Z" opacity="0.867" />
<path d="M 48.65 51.00 L 49.15 51.87 L 50.15 51.87 L 50.65 51.00 L 50.15 50.13 L 49.15 50.13 Z" opacity="0.867" />
<path d="M 48.65 55.00 L 49.15 55.87 L 50.15 55.87 L 50.65 55.00 L 50.15 54.13 L 49.15 54.13 Z" opacity="0.867" />
<path d="M 48.65 57.00 L 49.15 57.87 L 50.15 57.87 L 50.65 57.00 L 50.15 56.13 L 49.15 56.13 Z" opacity="0.867" />
<path d="M 46.92 2.00 L 47.42 2.87 L 48.42 2.87 L 48.92 2.00 L 48.42 1.13 L 47.42 1.13 Z" opacity="0.867" />
<path d="M 46.92 6.00 L 47.42 6.87 L 48.42 6.87 L 48.92 6.00 L 48.42 5.13 L 47.42 5.13 Z" opacity="0.867" />
<path d="M 46.92 10.00 L 47.42 10.87 L 48.42 10.87 L 48.92 10.00 L 48.42 9.13 L 47.42 9.13 Z" opacity="0.867" />
<path d="M 46.92 14.00 L 47.42 14.87 L 48.42 14.87 L 48.92 14.00 L 48.42 13.13 L 47.42 13.13 Z" opacity="0.867" />
<path d="M 46.92 18.00 L 47.42 18.87 L 48.42 18.87 L 48.92 18.00 L 48.42 17.13 L 47.42 17.13 Z" opacity="0.867" />
<path d="M 46.92 22.00 L 47.42 22.87 L 48.42 22.87 L 48.92 22.00 L 48.42 21.13 L 47.42 21.13 Z" opacity="0.867" />
<path d="M 46.92 26.00 L 47.42 26.87 L 48.42 26.87 L 48.92 26.00 L 48.42 25.13 L 47.42 25.13 Z" opacity="0.867" />
<path d="M 46.92 30.00 L 47.42 30.87 L 48.42 30.87 L 48.92 30.00 L 48.42 29.13 L 47.42 29.13 Z" opacity="0.867" />
<path d="M 46.92 34.00 L 47.42 34.87 L 48.42 34.87 L 48.92 34.00 L 48.42 33.13 L 47.42 33.13 Z" opacity="0.867" />
<path d="M 46.92 38.00 L 47.42 38.87 L 48.42 38.87 L 48.92 38.00 L 48.42 37.13 L 47.42 37.13 Z" opacity="0.867" />
<path d="M 46.92 42.00 L 47.42 42.87 L 48.42 42.87 L 48.92 42.00 L 48.42 41.13 L 47.42 41.13 Z" opacity="0.867" />
<path d="M 46.92 48.00 L 47.42 48.87 L 48.42 48.87 L 48.92 48.00 L 48.42 47.13 L 47.42 47.13 Z" opacity="0.867" />
<path d="M 46.92 50.00 L 47.42 50.87 L 48.42 50.87 L 48.92 50.00 L 48.42 49.13 L 47.42 49.13 Z" opacity="0.867" />
<path d="M 45.19 3.00 L 45.69 3.87 L 46.69 3.87 L 47.19 3.00 L 46.69 2.13 L 45.69 2.13 Z" opacity="0.867" />
<path d="M 45.19 7.00 L 45.69 7.87 L 46.69 7.87 L 47.19 7.00 L 46.69 6.13 L 45.69 6.13 Z" opacity="0.867" />
<path d="M 45.19 11.00 L 45.69 11.87 L 46.69 11.87 L 47.19 11.00 L 46.69 10.13 L 45.69 10.13 Z" opacity="0.867" />
<path d="M 45.19 15.00 L 45.69 15.87 L 46.69 15.87 L 47.19 15.00 L 46.69 14.13 L 45.69 14.13 Z" opacity="0.867" />
<path d="M 45.19 19.00 L 45.69 19.87 L 46.69 19.87 L 47.19 19.00 L 46.69 18.13 L 45.69 18.13 Z" opacity="0.867" />
<path d="M 45.19 23.00 L 45.69 23.87 L 46.69 23.87 L 47.19 23.00 L 46.69 22.13 L 45.69 22.13 Z" opacity="0.867" />
<path d="M 45.19 27.00 L 45.69 27.87 L 46.69 27.87 L 47.19 27.00 L 46.69 26.13 L 45.69 26.13 Z" opacity="0.867" />
<path d="M 45.19 31.00 L 45.69 31.87 L 46.69 31.87 L 47.19 31.00 L 46.69 30.13 L 45.69 30.13 Z" opacity="0.867" />
<path d="M 45.19 35.00 L 45.69 35.87 L 46.69 35.87 L 47.19 35.00 L 46.69 34.13 L 45.69 34.13 Z" opacity="0.867" />
<path d="M 45.19 39.00 L 45.69 39.87 L 46.69 39.87 L 47.19 39.00 L 46.69 38.13 L 45.69 38.13 Z" opacity="0.867" />
<path d="M 45.19 43.00 L 45.69 43.87 L 46.69 43.87 L 47.19 43.00 L 46.69 42.13 L 45.69 42.13 Z" opacity="0.867" />
<path d="M 45.19 47.00 L 45.69 47.87 L 46.69 47.87 L 47.19 47.00 L 46.69 46.13 L 45.69 46.13 Z" opacity="0.867" />
<path d="M 45.19 51.00 L 45.69 51.87 L 46.69 51.87 L 47.19 51.00 L 46.69 50.13 L 45.69 50.13 Z" opacity="0.867" />
<path d="M 45.19 55.00 L 45.69 55.87 L 46.69 55.87 L 47.19 55.00 L 46.69 54.13 L 45.69 54.13 Z" opacity="0.867" />
<path d="M 45.19 57.00 L 45.69 57.87 L 46.69 57.87 L 47.19 57.00 L 46.69 56.13 L 45.69 56.13 Z" opacity="0.867" />
<path d="M 45.19 59.00 L 45.69 59.87 L 46.69 59.87 L 47.19 59.00 L 46.69 58.13 L 45.69 58.13 Z" opacity="0.867" />
<path d="M 41.72 1.00 L 42.22 1.87 L 43.22 1.87 L 43.72 1.00 L 43.22 0.13 L 42.22 0.13 Z" opacity="0.867" />
<path d="M 41.72 5.00 L 42.22 5.87 L 43.22 5.87 L 43.72 5.00 L 43.22 4.13 L 42.22 4.13 Z" opacity="0.867" />
<path d="M 41.72 9.00 L 42.22 9.87 L 43.22 9.87 L 43.72 9.00 L 43.22 8.13 L 42.22 8.13 Z" opacity="0.867" />
<path d="M 41.72 13.00 L 42.22 13.87 L 43.22 13.87 L 43.72 13.00 L 43.22 12.13 L 42.22 12.13 Z" opacity="0.867" />
<path d="M 41.72 17.00 L 42.22 17.87 L 43.22 17.87 L 43.72 17.00 L 43.22 16.13 L 42.22 16.13 Z" opacity="0.867" />
<path d="M 41.72 21.00 L 42.22 21.87 L 43.22 21.87 L 43.72 21.00 L 43.22 20.13 L 42.22 20.13 Z" opacity="0.867" />
<path d="M 41.72 25.00 L 42.22 25.87 L 43.22 25.87 L 43.72 25.00 L 43.22 24.13 L 42.22 24.13 Z" opacity="0.867" />
<path d="M 41.72 29.00 L 42.22 29.87 L 43.22 29.87 L 43.72 29.00 L 43.22 28.13 L 42.22 28.13 Z" opacity="0.867" />
<path d="M 41.72 33.00 L 42.22 33.87 L 43.22 33.87 L 43.72 33.00 L 43.22 32.13 L 42.22 32.13 Z" opacity="0.867" />
<path d="M 41.72 37.00 L 42.22 37.87 L 43.22 37.87 L 43.72 37.00 L 43.22 36.13 L 42.22 36.13 Z" opacity="0.867" />
<path d="M 41.72 41.00 L 42.22 41.87 L 43.22 41.87 L 43.72 41.00 L 43.22 40.13 L 42.22 40.13 Z" opacity="0.867" />
<path d="M 41.72 45.00 L 42.22 45.87 L 43.22 45.87 L 43.72 45.00 L 43.22 44.13 L 42.22 44.13 Z" opacity="0.867" />
<path d="M 41.72 49.00 L 42.22 49.87 L 43.22 49.87 L 43.72 49.00 L 43.22 48.13 L 42.22 48.13 Z" opacity="0.867" />
<path d="M 41.72 53.00 L 42.22 53.87 L 43.22 53.87 L 43.72 53.00 L 43.22 52.13 L 42.22 52.13 Z" opacity="0.867" />
<path d="M 41.72 57.00 L 42.22 57.87 L 43.22 57.87 L 43.72 57.00 L 43.22 56.13 L 42.22 56.13 Z" opacity="0.867" />
<path d="M 39.99 4.00 L 40.49 4.87 L 41.49 4.87 L 41.99 4.00 L 41.49 3.13 L 40.49 3.13 Z" opacity="0.867" />
<path d="M 39.99 8.00 L 40.49 8.87 L 41.49 8.87 L 41.99 8.00 L 41.49 7.13 L 40.49 7.13 Z" opacity="0.867" />
<path d="M 39.99 12.00 L 40.49 12.87 L 41.49 12.87 L 41.99 12.00 L 41.49 11.13 L 40.49 11.13 Z" opacity="0.867" />
<path d="M 39.99 16.00 L 40.49 16.87 L 41.49 16.87 L 41.99 16.00 L 41.49 15.13 L 40.49 15.13 Z" opacity="0.867" />
<path d="M 39.99 20.00 L 40.49 20.87 L 41.49 20.87 L 41.99 20.00 L 41.49 19.13 L 40.49 19.13 Z" opacity="0.867" />
<path d="M 39.99 22.00 L 40.49 22.87 L 41.49 22.87 L 41.99 22.00 L 41.49 21.13 L 40.49 21.13 Z" opacity="0.867" />
<path d="M 39.99 24.00 L 40.49 24.87 L 41.49 24.87 L 41.99 24.00 L 41.49 23.13 L 40.49 23.13 Z" opacity="0.867" />
<path d="M 39.99 42.00 L 40.49 42.87 L 41.49 42.87 L 41.99 42.00 L 41.49 41.13 L 40.49 41.13 Z" opacity="0.867" />
<path d="M 39.99 44.00 L 40.49 44.87 L 41.49 44.87 L 41.99 44.00 L 41.49 43.13 L 40.49 43.13 Z" opacity="0.867" />
<path d="M 39.99 48.00 L 40.49 48.87 L 41.49 48.87 L 41.99 48.00 L 41.49 47.13 L 40.49 47.13 Z" opacity="0.867" />
<path d="M 39.99 52.00 L 40.49 52.87 L 41.49 52.87 L 41.99 52.00 L 41.49 51.13 L 40.49 51.13 Z" opacity="0.867" />
<path d="M 39.99 56.00 L 40.49 56.87 L 41.49 56.87 L 41.99 56.00 L 41.49 55.13 L 40.49 55.13 Z" opacity="0.867" />
<path d="M 38.26 17.00 L 38.76 17.87 L 39.76 17.87 L 40.26 17.00 L 39.76 16.13 L 38.76 16.13 Z" opacity="0.867" />
<path d="M 38.26 21.00 L 38.76 21.87 L 39.76 21.87 L 40.26 21.00 L 39.76 20.13 L 38.76 20.13 Z" opacity="0.867" />
<path d="M 38.26 23.00 L 38.76 23.87 L 39.76 23.87 L 40.26 23.00 L 39.76 22.13 L 38.76 22.13 Z" opacity="0.867" />
<path d="M 38.26 29.00 L 38.76 29.87 L 39.76 29.87 L 40.26 29.00 L 39.76 28.13 L 38.76 28.13 Z" opacity="0.867" />
<path d="M 38.26 33.00 L 38.76 33.87 L 39.76 33.87 L 40.26 33.00 L 39.76 32.13 L 38.76 32.13 Z" opacity="0.867" />
<path d="M 38.26 39.00 L 38.76 39.87 L 39.76 39.87 L 40.26 39.00 L 39.76 38.13 L 38.76 38.13 Z" opacity="0.867" />
<path d="M 38.26 41.00 L 38.76 41.87 L 39.76 41.87 L 40.26 41.00 L 39.76 40.13 L 38.76 40.13 Z" opacity="0.867" />
<path d="M 38.26 59.00 L 38.76 59.87 L 39.76 59.87 L 40.26 59.00 L 39.76 58.13 L 38.76 58.13 Z" opacity="0.867" />
<path d="M 36.53 2.00 L 37.03 2.87 L 38.03 2.87 L 38.53 2.00 L 38.03 1.13 L 37.03 1.13 Z" opacity="0.867" />
<path d="M 36.53 6.00 L 37.03 6.87 L 38.03 6.87 L 38.53 6.00 L 38.03 5.13 L 37.03 5.13 Z" opacity="0.867" />
<path d="M 36.53 10.00 L 37.03 10.87 L 38.03 10.87 L 38.53 10.00 L 38.03 9.13 L 37.03 9.13 Z" opacity="0.867" />
<path d="M 36.53 14.00 L 37.03 14.87 L 38.03 14.87 L 38.53 14.00 L 38.03 13.13 L 37.03 13.13 Z" opacity="0.867" />
<path d="M 36.53 38.00 L 37.03 38.87 L 38.03 38.87 L 38.53 38.00 L 38.03 37.13 L 37.03 37.13 Z" opacity="0.867" />
<path d="M 36.53 40.00 L 37.03 40.87 L 38.03 40.87 L 38.53 40.00 L 38.03 39.13 L 37.03 39.13 Z" opacity="0.867" />
<path d="M 36.53 46.00 L 37.03 46.87 L 38.03 46.87 L 38.53 46.00 L 38.03 45.13 L 37.03 45.13 Z" opacity="0.867" />
<path d="M 36.53 50.00 L 37.03 50.87 L 38.03 50.87 L 38.53 50.00 L 38.03 49.13 L 37.03 49.13 Z" opacity="0.867" />
<path d="M 36.53 54.00 L 37.03 54.87 L 38.03 54.87 L 38.53 54.00 L 38.03 53.13 L 37.03 53.13 Z" opacity="0.867" />
<path d="M 34.79 3.00 L 35.29 3.87 L 36.29 3.87 L 36.79 3.00 L 36.29 2.13 L 35.29 2.13 Z" opacity="0.867" />
<path d="M 34.79 7.00 L 35.29 7.87 L 36.29 7.87 L 36.79 7.00 L 36.29 6.13 L 35.29 6.13 Z" opacity="0.867" />
<path d="M 34.79 11.00 L 35.29 11.87 L 36.29 11.87 L 36.79 11.00 L 36.29 10.13 L 35.29 10.13 Z" opacity="0.867" />
<path d="M 34.79 13.00 L 35.29 13.87 L 36.29 13.87 L 36.79 13.00 L 36.29 12.13 L 35.29 12.13 Z" opacity="0.867" />
<path d="M 34.79 21.00 L 35.29 21.87 L 36.29 21.87 L 36.79 21.00 L 36.29 20.13 L 35.29 20.13 Z" opacity="0.867" />
<path d="M 34.79 47.00 L 35.29 47.87 L 36.29 47.87 L 36.79 47.00 L 36.29 46.13 L 35.29 46.13 Z" opacity="0.867" />
<path d="M 34.79 51.00 L 35.29 51.87 L 36.29 51.87 L 36.79 51.00 L 36.29 50.13 L 35.29 50.13 Z" opacity="0.867" />
<path d="M 34.79 55.00 L 35.29 55.87 L 36.29 55.87 L 36.79 55.00 L 36.29 54.13 L 35.29 54.13 Z" opacity="0.867" />
<path d="M 34.79 57.00 L 35.29 57.87 L 36.29 57.87 L 36.79 57.00 L 36.29 56.13 L 35.29 56.13 Z" opacity="0.867" />
<path d="M 33.06 20.00 L 33.56 20.87 L 34.56 20.87 L 35.06 20.00 L 34.56 19.13 L 33.56 19.13 Z" opacity="0.867" />
<path d="M 33.06 38.00 L 33.56 38.87 L 34.56 38.87 L 35.06 38.00 L 34.56 37.13 L 33.56 37.13 Z" opacity="0.867" />
<path d="M 33.06 42.00 L 33.56 42.87 L 34.56 42.87 L 35.06 42.00 L 34.56 41.13 L 33.56 41.13 Z" opacity="0.867" />
<path d="M 33.06 44.00 L 33.56 44.87 L 34.56 44.87 L 35.06 44.00 L 34.56 43.13 L 33.56 43.13 Z" opacity="0.867" />
<path d="M 31.33 1.00 L 31.83 1.87 L 32.83 1.87 L 33.33 1.00 L 32.83 0.13 L 31.83 0.13 Z" opacity="0.867" />
<path d="M 31.33 5.00 L 31.83 5.87 L 32.83 5.87 L 33.33 5.00 L 32.83 4.13 L 31.83 4.13 Z" opacity="0.867" />
<path d="M 31.33 9.00 L 31.83 9.87 L 32.83 9.87 L 33.33 9.00 L 32.83 8.13 L 31.83 8.13 Z" opacity="0.867" />
<path d="M 31.33 13.00 L 31.83 13.87 L 32.83 13.87 L 33.33 13.00 L 32.83 12.13 L 31.83 12.13 Z" opacity="0.867" />
<path d="M 31.33 17.00 L 31.83 17.87 L 32.83 17.87 L 33.33 17.00 L 32.83 16.13 L 31.83 16.13 Z" opacity="0.867" />
<path d="M 31.33 39.00 L 31.83 39.87 L 32.83 39.87 L 33.33 39.00 L 32.83 38.13 L 31.83 38.13 Z" opacity="0.867" />
<path d="M 31.33 41.00 L 31.83 41.87 L 32.83 41.87 L 33.33 41.00 L 32.83 40.13 L 31.83 40.13 Z" opacity="0.867" />
<path d="M 31.33 43.00 L 31.83 43.87 L 32.83 43.87 L 33.33 43.00 L 32.83 42.13 L 31.83 42.13 Z" opacity="0.867" />
<path d="M 31.33 45.00 L 31.83 45.87 L 32.83 45.87 L 33.33 45.00 L 32.83 44.13 L 31.83 44.13 Z" opacity="0.867" />
<path d="M 31.33 49.00 L 31.83 49.87 L 32.83 49.87 L 33.33 49.00 L 32.83 48.13 L 31.83 48.13 Z" opacity="0.867" />
<path d="M 31.33 53.00 L 31.83 53.87 L 32.83 53.87 L 33.33 53.00 L 32.83 52.13 L 31.83 52.13 Z" opacity="0.867" />
<path d="M 31.33 57.00 L 31.83 57.87 L 32.83 57.87 L 33.33 57.00 L 32.83 56.13 L 31.83 56.13 Z" opacity="0.867" />
<path d="M 31.33 59.00 L 31.83 59.87 L 32.83 59.87 L 33.33 59.00 L 32.83 58.13 L 31.83 58.13 Z" opacity="0.867" />
<path d="M 29.60 4.00 L 30.10 4.87 L 31.10 4.87 L 31.60 4.00 L 31.10 3.13 L 30.10 3.13 Z" opacity="0.867" />
<path d="M 29.60 8.00 L 30.10 8.87 L 31.10 8.87 L 31.60 8.00 L 31.10 7.13 L 30.10 7.13 Z" opacity="0.867" />
<path d="M 29.60 12.00 L 30.10 12.87 L 31.10 12.87 L 31.60 12.00 L 31.10 11.13 L 30.10 11.13 Z" opacity="0.867" />
<path d="M 29.60 16.00 L 30.10 16.87 L 31.10 16.87 L 31.60 16.00 L 31.10 15.13 L 30.10 15.13 Z" opacity="0.867" />
<path d="M 29.60 48.00 L 30.10 48.87 L 31.10 48.87 L 31.60 48.00 L 31.10 47.13 L 30.10 47.13 Z" opacity="0.867" />
<path d="M 29.60 52.00 L 30.10 52.87 L 31.10 52.87 L 31.60 52.00 L 31.10 51.13 L 30.10 51.13 Z" opacity="0.867" />
<path d="M 29.60 56.00 L 30.10 56.87 L 31.10 56.87 L 31.60 56.00 L 31.10 55.13 L 30.10 55.13 Z" opacity="0.867" />
<path d="M 27.87 17.00 L 28.37 17.87 L 29.37 17.87 L 29.87 17.00 L 29.37 16.13 L 28.37 16.13 Z" opacity="0.867" />
<path d="M 27.87 41.00 L 28.37 41.87 L 29.37 41.87 L 29.87 41.00 L 29.37 40.13 L 28.37 40.13 Z" opacity="0.867" />
<path d="M 27.87 57.00 L 28.37 57.87 L 29.37 57.87 L 29.87 57.00 L 29.37 56.13 L 28.37 56.13 Z" opacity="0.867" />
<path d="M 26.13 2.00 L 26.63 2.87 L 27.63 2.87 L 28.13 2.00 L 27.63 1.13 L 26.63 1.13 Z" opacity="0.867" />
<path d="M 26.13 6.00 L 26.63 6.87 L 27.63 6.87 L 28.13 6.00 L 27.63 5.13 L 26.63 5.13 Z" opacity="0.867" />
<path d="M 26.13 10.00 L 26.63 10.87 L 27.63 10.87 L 28.13 10.00 L 27.63 9.13 L 26.63 9.13 Z" opacity="0.867" />
<path d="M 26.13 16.00 L 26.63 16.87 L 27.63 16.87 L 28.13 16.00 L 27.63 15.13 L 26.63 15.13 Z" opacity="0.867" />
<path d="M 26.13 42.00 L 26.63 42.87 L 27.63 42.87 L 28.13 42.00 L 27.63 41.13 L 26.63 41.13 Z" opacity="0.867" />
<path d="M 26.13 46.00 L 26.63 46.87 L 27.63 46.87 L 28.13 46.00 L 27.63 45.13 L 26.63 45.13 Z" opacity="0.867" />
<path d="M 26.13 50.00 L 26.63 50.87 L 27.63 50.87 L 28.13 50.00 L 27.63 49.13 L 26.63 49.13 Z" opacity="0.867" />
<path d="M 26.13 54.00 L 26.63 54.87 L 27.63 54.87 L 28.13 54.00 L 27.63 53.13 L 26.63 53.13 Z" opacity="0.867" />
<path d="M 24.40 3.00 L 24.90 3.87 L 25.90 3.87 L 26.40 3.00 L 25.90 2.13 L 24.90 2.13 Z" opacity="0.867" />
<path d="M 24.40 7.00 L 24.90 7.87 L 25.90 7.87 L 26.40 7.00 L 25.90 6.13 L 24.90 6.13 Z" opacity="0.867" />
<path d="M 24.40 11.00 L 24.90 11.87 L 25.90 11.87 L 26.40 11.00 L 25.90 10.13 L 24.90 10.13 Z" opacity="0.867" />
<path d="M 24.40 15.00 L 24.90 15.87 L 25.90 15.87 L 26.40 15.00 L 25.90 14.13 L 24.90 14.13 Z" opacity="0.867" />
<path d="M 24.40 41.00 L 24.90 41.87 L 25.90 41.87 L 26.40 41.00 L 25.90 40.13 L 24.90 40.13 Z" opacity="0.867" />
<path d="M 24.40 43.00 L 24.90 43.87 L 25.90 43.87 L 26.40 43.00 L 25.90 42.13 L 24.90 42.13 Z" opacity="0.867" />
<path d="M 24.40 47.00 L 24.90 47.87 L 25.90 47.87 L 26.40 47.00 L 25.90 46.13 L 24.90 46.13 Z" opacity="0.867" />
<path d="M 24.40 51.00 L 24.90 51.87 L 25.90 51.87 L 26.40 51.00 L 25.90 50.13 L 24.90 50.13 Z" opacity="0.867" />
<path d="M 24.40 55.00 L 24.90 55.87 L 25.90 55.87 L 26.40 55.00 L 25.90 54.13 L 24.90 54.13 Z" opacity="0.867" />
<path d="M 22.67 16.00 L 23.17 16.87 L 24.17 16.87 L 24.67 16.00 L 24.17 15.13 L 23.17 15.13 Z" opacity="0.867" />
<path d="M 22.67 40.00 L 23.17 40.87 L 24.17 40.87 L 24.67 40.00 L 24.17 39.13 L 23.17 39.13 Z" opacity="0.867" />
<path d="M 22.67 44.00 L 23.17 44.87 L 24.17 44.87 L 24.67 44.00 L 24.17 43.13 L 23.17 43.13 Z" opacity="0.867" />
<path d="M 20.94 1.00 L 21.44 1.87 L 22.44 1.87 L 22.94 1.00 L 22.44 0.13 L 21.44 0.13 Z" opacity="0.867" />
<path d="M 20.94 5.00 L 21.44 5.87 L 22.44 5.87 L 22.94 5.00 L 22.44 4.13 L 21.44 4.13 Z" opacity="0.867" />
<path d="M 20.94 9.00 L 21.44 9.87 L 22.44 9.87 L 22.94 9.00 L 22.44 8.13 L 21.44 8.13 Z" opacity="0.867" />
<path d="M 20.94 15.00 L 21.44 15.87 L 22.44 15.87 L 22.94 15.00 L 22.44 14.13 L 21.44 14.13 Z" opacity="0.867" />
<path d="M 20.94 19.00 L 21.44 19.87 L 22.44 19.87 L 22.94 19.00 L 22.44 18.13 L 21.44 18.13 Z" opacity="0.867" />
<path d="M 20.94 45.00 L 21.44 45.87 L 22.44 45.87 L 22.94 45.00 L 22.44 44.13 L 21.44 44.13 Z" opacity="0.867" />
<path d="M 20.94 49.00 L 21.44 49.87 L 22.44 49.87 L 22.94 49.00 L 22.44 48.13 L 21.44 48.13 Z" opacity="0.867" />
<path d="M 20.94 53.00 L 21.44 53.87 L 22.44 53.87 L 22.94 53.00 L 22.44 52.13 L 21.44 52.13 Z" opacity="0.867" />
<path d="M 20.94 57.00 L 21.44 57.87 L 22.44 57.87 L 22.94 57.00 L 22.44 56.13 L 21.44 56.13 Z" opacity="0.867" />
<path d="M 19.21 4.00 L 19.71 4.87 L 20.71 4.87 L 21.21 4.00 L 20.71 3.13 L 19.71 3.13 Z" opacity="0.867" />
<path d="M 19.21 8.00 L 19.71 8.87 L 20.71 8.87 L 21.21 8.00 L 20.71 7.13 L 19.71 7.13 Z" opacity="0.867" />
<path d="M 19.21 12.00 L 19.71 12.87 L 20.71 12.87 L 21.21 12.00 L 20.71 11.13 L 19.71 11.13 Z" opacity="0.867" />
<path d="M 19.21 16.00 L 19.71 16.87 L 20.71 16.87 L 21.21 16.00 L 20.71 15.13 L 19.71 15.13 Z" opacity="0.867" />
<path d="M 19.21 18.00 L 19.71 18.87 L 20.71 18.87 L 21.21 18.00 L 20.71 17.13 L 19.71 17.13 Z" opacity="0.867" />
<path d="M 19.21 20.00 L 19.71 20.87 L 20.71 20.87 L 21.21 20.00 L 20.71 19.13 L 19.71 19.13 Z" opacity="0.867" />
<path d="M 19.21 40.00 L 19.71 40.87 L 20.71 40.87 L 21.21 40.00 L 20.71 39.13 L 19.71 39.13 Z" opacity="0.867" />
<path d="M 19.21 42.00 L 19.71 42.87 L 20.71 42.87 L 21.21 42.00 L 20.71 41.13 L 19.71 41.13 Z" opacity="0.867" />
<path d="M 19.21 44.00 L 19.71 44.87 L 20.71 44.87 L 21.21 44.00 L 20.71 43.13 L 19.71 43.13 Z" opacity="0.867" />
<path d="M 19.21 48.00 L 19.71 48.87 L 20.71 48.87 L 21.21 48.00 L 20.71 47.13 L 19.71 47.13 Z" opacity="0.867" />
<path d="M 19.21 52.00 L 19.71 52.87 L 20.71 52.87 L 21.21 52.00 L 20.71 51.13 L 19.71 51.13 Z" opacity="0.867" />
<path d="M 19.21 56.00 L 19.71 56.87 L 20.71 56.87 L 21.21 56.00 L 20.71 55.13 L 19.71 55.13 Z" opacity="0.867" />
<path d="M 19.21 58.00 L 19.71 58.87 L 20.71 58.87 L 21.21 58.00 L 20.71 57.13 L 19.71 57.13 Z" opacity="0.867" />
<path d="M 17.47 19.00 L 17.97 19.87 L 18.97 19.87 L 19.47 19.00 L 18.97 18.13 L 17.97 18.13 Z" opacity="0.867" />
<path d="M 17.47 21.00 L 17.97 21.87 L 18.97 21.87 L 19.47 21.00 L 18.97 20.13 L 17.97 20.13 Z" opacity="0.867" />
<path d="M 17.47 29.00 L 17.97 29.87 L 18.97 29.87 L 19.47 29.00 L 18.97 28.13 L 17.97 28.13 Z" opacity="0.867" />
<path d="M 17.47 33.00 L 17.97 33.87 L 18.97 33.87 L 19.47 33.00 L 18.97 32.13 L 17.97 32.13 Z" opacity="0.867" />
<path d="M 17.47 35.00 L 17.97 35.87 L 18.97 35.87 L 19.47 35.00 L 18.97 34.13 L 17.97 34.13 Z" opacity="0.867" />
<path d="M 17.47 59.00 L 17.97 59.87 L 18.97 59.87 L 19.47 59.00 L 18.97 58.13 L 17.97 58.13 Z" opacity="0.867" />
<path d="M 15.74 2.00 L 16.24 2.87 L 17.24 2.87 L 17.74 2.00 L 17.24 1.13 L 16.24 1.13 Z" opacity="0.867" />
<path d="M 15.74 6.00 L 16.24 6.87 L 17.24 6.87 L 17.74 6.00 L 17.24 5.13 L 16.24 5.13 Z" opacity="0.867" />
<path d="M 15.74 10.00 L 16.24 10.87 L 17.24 10.87 L 17.74 10.00 L 17.24 9.13 L 16.24 9.13 Z" opacity="0.867" />
<path d="M 15.74 14.00 L 16.24 14.87 L 17.24 14.87 L 17.74 14.00 L 17.24 13.13 L 16.24 13.13 Z" opacity="0.867" />
<path d="M 15.74 18.00 L 16.24 18.87 L 17.24 18.87 L 17.74 18.00 L 17.24 17.13 L 16.24 17.13 Z" opacity="0.867" />
<path d="M 15.74 20.00 L 16.24 20.87 L 17.24 20.87 L 17.74 20.00 L 17.24 19.13 L 16.24 19.13 Z" opacity="0.867" />
<path d="M 15.74 22.00 L 16.24 22.87 L 17.24 22.87 L 17.74 22.00 L 17.24 21.13 L 16.24 21.13 Z" opacity="0.867" />
<path d="M 15.74 24.00 L 16.24 24.87 L 17.24 24.87 L 17.74 24.00 L 17.24 23.13 L 16.24 23.13 Z" opacity="0.867" />
<path d="M 15.74 36.00 L 16.24 36.87 L 17.24 36.87 L 17.74 36.00 L 17.24 35.13 L 16.24 35.13 Z" opacity="0.867" />
<path d="M 15.74 38.00 L 16.24 38.87 L 17.24 38.87 L 17.74 38.00 L 17.24 37.13 L 16.24 37.13 Z" opacity="0.867" />
<path d="M 15.74 40.00 L 16.24 40.87 L 17.24 40.87 L 17.74 40.00 L 17.24 39.13 L 16.24 39.13 Z" opacity="0.867" />
<path d="M 15.74 42.00 L 16.24 42.87 L 17.24 42.87 L 17.74 42.00 L 17.24 41.13 L 16.24 41.13 Z" opacity="0.867" />
<path d="M 15.74 44.00 L 16.24 44.87 L 17.24 44.87 L 17.74 44.00 L 17.24 43.13 L 16.24 43.13 Z" opacity="0.867" />
<path d="M 15.74 46.00 L 16.24 46.87 L 17.24 46.87 L 17.74 46.00 L 17.24 45.13 L 16.24 45.13 Z" opacity="0.867" />
<path d="M 15.74 50.00 L 16.24 50.87 L 17.24 50.87 L 17.74 50.00 L 17.24 49.13 L 16.24 49.13 Z" opacity="0.867" />
<path d="M 15.74 54.00 L 16.24 54.87 L 17.24 54.87 L 17.74 54.00 L 17.24 53.13 L 16.24 53.13 Z" opacity="0.867" />
<path d="M 14.01 3.00 L 14.51 3.87 L 15.51 3.87 L 16.01 3.00 L 15.51 2.13 L 14.51 2.13 Z" opacity="0.867" />
<path d="M 14.01 7.00 L 14.51 7.87 L 15.51 7.87 L 16.01 7.00 L 15.51 6.13 L 14.51 6.13 Z" opacity="0.867" />
<path d="M 14.01 11.00 L 14.51 11.87 L 15.51 11.87 L 16.01 11.00 L 15.51 10.13 L 14.51 10.13 Z" opacity="0.867" />
<path d="M 14.01 15.00 L 14.51 15.87 L 15.51 15.87 L 16.01 15.00 L 15.51 14.13 L 14.51 14.13 Z" opacity="0.867" />
<path d="M 14.01 19.00 L 14.51 19.87 L 15.51 19.87 L 16.01 19.00 L 15.51 18.13 L 14.51 18.13 Z" opacity="0.867" />
<path d="M 14.01 23.00 L 14.51 23.87 L 15.51 23.87 L 16.01 23.00 L 15.51 22.13 L 14.51 22.13 Z" opacity="0.867" />
<path d="M 14.01 27.00 L 14.51 27.87 L 15.51 27.87 L 16.01 27.00 L 15.51 26.13 L 14.51 26.13 Z" opacity="0.867" />
<path d="M 14.01 31.00 L 14.51 31.87 L 15.51 31.87 L 16.01 31.00 L 15.51 30.13 L 14.51 30.13 Z" opacity="0.867" />
<path d="M 14.01 35.00 L 14.51 35.87 L 15.51 35.87 L 16.01 35.00 L 15.51 34.13 L 14.51 34.13 Z" opacity="0.867" />
<path d="M 14.01 39.00 L 14.51 39.87 L 15.51 39.87 L 16.01 39.00 L 15.51 38.13 L 14.51 38.13 Z" opacity="0.867" />
<path d="M 14.01 43.00 L 14.51 43.87 L 15.51 43.87 L 16.01 43.00 L 15.51 42.13 L 14.51 42.13 Z" opacity="0.867" />
<path d="M 14.01 45.00 L 14.51 45.87 L 15.51 45.87 L 16.01 45.00 L 15.51 44.13 L 14.51 44.13 Z" opacity="0.867" />
<path d="M 14.01 49.00 L 14.51 49.87 L 15.51 49.87 L 16.01 49.00 L 15.51 48.13 L 14.51 48.13 Z" opacity="0.867" />
<path d="M 14.01 51.00 L 14.51 51.87 L 15.51 51.87 L 16.01 51.00 L 15.51 50.13 L 14.51 50.13 Z" opacity="0.867" />
<path d="M 14.01 53.00 L 14.51 53.87 L 15.51 53.87 L 16.01 53.00 L 15.51 52.13 L 14.51 52.13 Z" opacity="0.867" />
<path d="M 14.01 57.00 L 14.51 57.87 L 15.51 57.87 L 16.01 57.00 L 15.51 56.13 L 14.51 56.13 Z" opacity="0.867" />
<path d="M 14.01 59.00 L 14.51 59.87 L 15.51 59.87 L 16.01 59.00 L 15.51 58.13 L 14.51 58.13 Z" opacity="0.867" />
<path d="M 12.28 46.00 L 12.78 46.87 L 13.78 46.87 L 14.28 46.00 L 13.78 45.13 L 12.78 45.13 Z" opacity="0.867" />
<path d="M 12.28 52.00 L 12.78 52.87 L 13.78 52.87 L 14.28 52.00 L 13.78 51.13 L 12.78 51.13 Z" opacity="0.867" />
<path d="M 12.28 54.00 L 12.78 54.87 L 13.78 54.87 L 14.28 54.00 L 13.78 53.13 L 12.78 53.13 Z" opacity="0.867" />
<path d="M 12.28 56.00 L 12.78 56.87 L 13.78 56.87 L 14.28 56.00 L 13.78 55.13 L 12.78 55.13 Z" opacity="0.867" />
<path d="M 10.55 1.00 L 11.05 1.87 L 12.05 1.87 L 12.55 1.00 L 12.05 0.13 L 11.05 0.13 Z" opacity="0.867" />
<path d="M 10.55 5.00 L 11.05 5.87 L 12.05 5.87 L 12.55 5.00 L 12.05 4.13 L 11.05 4.13 Z" opacity="0.867" />
<path d="M 10.55 9.00 L 11.05 9.87 L 12.05 9.87 L 12.55 9.00 L 12.05 8.13 L 11.05 8.13 Z" opacity="0.867" />
<path d="M 10.55 13.00 L 11.05 13.87 L 12.05 13.87 L 12.55 13.00 L 12.05 12.13 L 11.05 12.13 Z" opacity="0.867" />
<path d="M 10.55 17.00 L 11.05 17.87 L 12.05 17.87 L 12.55 17.00 L 12.05 16.13 L 11.05 16.13 Z" opacity="0.867" />
<path d="M 10.55 21.00 L 11.05 21.87 L 12.05 21.87 L 12.55 21.00 L 12.05 20.13 L 11.05 20.13 Z" opacity="0.867" />
<path d="M 10.55 25.00 L 11.05 25.87 L 12.05 25.87 L 12.55 25.00 L 12.05 24.13 L 11.05 24.13 Z" opacity="0.867" />
<path d="M 10.55 29.00 L 11.05 29.87 L 12.05 29.87 L 12.55 29.00 L 12.05 28.13 L 11.05 28.13 Z" opacity="0.867" />
<path d="M 10.55 33.00 L 11.05 33.87 L 12.05 33.87 L 12.55 33.00 L 12.05 32.13 L 11.05 32.13 Z" opacity="0.867" />
<path d="M 10.55 37.00 L 11.05 37.87 L 12.05 37.87 L 12.55 37.00 L 12.05 36.13 L 11.05 36.13 Z" opacity="0.867" />
<path d="M 10.55 41.00 L 11.05 41.87 L 12.05 41.87 L 12.55 41.00 L 12.05 40.13 L 11.05 40.13 Z" opacity="0.867" />
<path d="M 10.55 43.00 L 11.05 43.87 L 12.05 43.87 L 12.55 43.00 L 12.05 42.13 L 11.05 42.13 Z" opacity="0.867" />
<path d="M 10.55 45.00 L 11.05 45.87 L 12.05 45.87 L 12.55 45.00 L 12.05 44.13 L 11.05 44.13 Z" opacity="0.867" />
<path d="M 10.55 51.00 L 11.05 51.87 L 12.05 51.87 L 12.55 51.00 L 12.05 50.13 L 11.05 50.13 Z" opacity="0.867" />
<path d="M 10.55 53.00 L 11.05 53.87 L 12.05 53.87 L 12.55 53.00 L 12.05 52.13 L 11.05 52.13 Z" opacity="0.867" />
<path d="M 10.55 57.00 L 11.05 57.87 L 12.05 57.87 L 12.55 57.00 L 12.05 56.13 L 11.05 56.13 Z" opacity="0.867" />
<path d="M 8.81 4.00 L 9.31 4.87 L 10.31 4.87 L 10.81 4.00 L 10.31 3.13 L 9.31 3.13 Z" opacity="0.867" />
<path d="M 8.81 8.00 L 9.31 8.87 L 10.31 8.87 L 10.81 8.00 L 10.31 7.13 L 9.31 7.13 Z" opacity="0.867" />
<path d="M 8.81 10.00 L 9.31 10.87 L 10.31 10.87 L 10.81 10.00 L 10.31 9.13 L 9.31 9.13 Z" opacity="0.867" />
<path d="M 8.81 12.00 L 9.31 12.87 L 10.31 12.87 L 10.81 12.00 L 10.31 11.13 L 9.31 11.13 Z" opacity="0.867" />
<path d="M 8.81 14.00 L 9.31 14.87 L 10.31 14.87 L 10.81 14.00 L 10.31 13.13 L 9.31 13.13 Z" opacity="0.867" />
<path d="M 8.81 16.00 L 9.31 16.87 L 10.31 16.87 L 10.81 16.00 L 10.31 15.13 L 9.31 15.13 Z" opacity="0.867" />
<path d="M 8.81 26.00 L 9.31 26.87 L 10.31 26.87 L 10.81 26.00 L 10.31 25.13 L 9.31 25.13 Z" opacity="0.867" />
<path d="M 8.81 28.00 L 9.31 28.87 L 10.31 28.87 L 10.81 28.00 L 10.31 27.13 L 9.31 27.13 Z" opacity="0.867" />
<path d="M 8.81 32.00 L 9.31 32.87 L 10.31 32.87 L 10.81 32.00 L 10.31 31.13 L 9.31 31.13 Z" opacity="0.867" />
<path d="M 8.81 36.00 L 9.31 36.87 L 10.31 36.87 L 10.81 36.00 L 10.31 35.13 L 9.31 35.13 Z" opacity="0.867" />
<path d="M 8.81 40.00 L 9.31 40.87 L 10.31 40.87 L 10.81 40.00 L 10.31 39.13 L 9.31 39.13 Z" opacity="0.867" />
<path d="M 8.81 42.00 L 9.31 42.87 L 10.31 42.87 L 10.81 42.00 L 10.31 41.13 L 9.31 41.13 Z" opacity="0.867" />
<path d="M 8.81 46.00 L 9.31 46.87 L 10.31 46.87 L 10.81 46.00 L 10.31 45.13 L 9.31 45.13 Z" opacity="0.867" />
<path d="M 8.81 50.00 L 9.31 50.87 L 10.31 50.87 L 10.81 50.00 L 10.31 49.13 L 9.31 49.13 Z" opacity="0.867" />
<path d="M 8.81 54.00 L 9.31 54.87 L 10.31 54.87 L 10.81 54.00 L 10.31 53.13 L 9.31 53.13 Z" opacity="0.867" />
<path d="M 8.81 56.00 L 9.31 56.87 L 10.31 56.87 L 10.81 56.00 L 10.31 55.13 L 9.31 55.13 Z" opacity="0.867" />
<path d="M 8.81 58.00 L 9.31 58.87 L 10.31 58.87 L 10.81 58.00 L 10.31 57.13 L 9.31 57.13 Z" opacity="0.867" />
<path d="M 7.08 1.00 L 7.58 1.87 L 8.58 1.87 L 9.08 1.00 L 8.58 0.13 L 7.58 0.13 Z" opacity="0.867" />
<path d="M 7.08 5.00 L 7.58 5.87 L 8.58 5.87 L 9.08 5.00 L 8.58 4.13 L 7.58 4.13 Z" opacity="0.867" />
<path d="M 7.08 7.00 L 7.58 7.87 L 8.58 7.87 L 9.08 7.00 L 8.58 6.13 L 7.58 6.13 Z" opacity="0.867" />
<path d="M 7.08 9.00 L 7.58 9.87 L 8.58 9.87 L 9.08 9.00 L 8.58 8.13 L 7.58 8.13 Z" opacity="0.867" />
<path d="M 7.08 11.00 L 7.58 11.87 L 8.58 11.87 L 9.08 11.00 L 8.58 10.13 L 7.58 10.13 Z" opacity="0.867" />
<path d="M 7.08 19.00 L 7.58 19.87 L 8.58 19.87 L 9.08 19.00 L 8.58 18.13 L 7.58 18.13 Z" opacity="0.867" />
<path d="M 7.08 21.00 L 7.58 21.87 L 8.58 21.87 L 9.08 21.00 L 8.58 20.13 L 7.58 20.13 Z" opacity="0.867" />
<path d="M 7.08 23.00 L 7.58 23.87 L 8.58 23.87 L 9.08 23.00 L 8.58 22.13 L 7.58 22.13 Z" opacity="0.867" />
<path d="M 7.08 25.00 L 7.58 25.87 L 8.58 25.87 L 9.08 25.00 L 8.58 24.13 L 7.58 24.13 Z" opacity="0.867" />
<path d="M 7.08 37.00 L 7.58 37.87 L 8.58 37.87 L 9.08 37.00 L 8.58 36.13 L 7.58 36.13 Z" opacity="0.867" />
<path d="M 7.08 43.00 L 7.58 43.87 L 8.58 43.87 L 9.08 43.00 L 8.58 42.13 L 7.58 42.13 Z" opacity="0.867" />
<path d="M 7.08 53.00 L 7.58 53.87 L 8.58 53.87 L 9.08 53.00 L 8.58 52.13 L 7.58 52.13 Z" opacity="0.867" />
<path d="M 7.08 59.00 L 7.58 59.87 L 8.58 59.87 L 9.08 59.00 L 8.58 58.13 L 7.58 58.13 Z" opacity="0.867" />
<path d="M 5.35 2.00 L 5.85 2.87 L 6.85 2.87 L 7.35 2.00 L 6.85 1.13 L 5.85 1.13 Z" opacity="0.867" />
<path d="M 5.35 4.00 L 5.85 4.87 L 6.85 4.87 L 7.35 4.00 L 6.85 3.13 L 5.85 3.13 Z" opacity="0.867" />
<path d="M 5.35 8.00 L 5.85 8.87 L 6.85 8.87 L 7.35 8.00 L 6.85 7.13 L 5.85 7.13 Z" opacity="0.867" />
<path d="M 5.35 14.00 L 5.85 14.87 L 6.85 14.87 L 7.35 14.00 L 6.85 13.13 L 5.85 13.13 Z" opacity="0.867" />
<path d="M 5.35 18.00 L 5.85 18.87 L 6.85 18.87 L 7.35 18.00 L 6.85 17.13 L 5.85 17.13 Z" opacity="0.867" />
<path d="M 5.35 20.00 L 5.85 20.87 L 6.85 20.87 L 7.35 20.00 L 6.85 19.13 L 5.85 19.13 Z" opacity="0.867" />
<path d="M 5.35 24.00 L 5.85 24.87 L 6.85 24.87 L 7.35 24.00 L 6.85 23.13 L 5.85 23.13 Z" opacity="0.867" />
<path d="M 5.35 28.00 L 5.85 28.87 L 6.85 28.87 L 7.35 28.00 L 6.85 27.13 L 5.85 27.13 Z" opacity="0.867" />
<path d="M 5.35 34.00 L 5.85 34.87 L 6.85 34.87 L 7.35 34.00 L 6.85 33.13 L 5.85 33.13 Z" opacity="0.867" />
<path d="M 5.35 38.00 L 5.85 38.87 L 6.85 38.87 L 7.35 38.00 L 6.85 37.13 L 5.85 37.13 Z" opacity="0.867" />
<path d="M 5.35 48.00 L 5.85 48.87 L 6.85 48.87 L 7.35 48.00 L 6.85 47.13 L 5.85 47.13 Z" opacity="0.867" />
<path d="M 5.35 52.00 L 5.85 52.87 L 6.85 52.87 L 7.35 52.00 L 6.85 51.13 L 5.85 51.13 Z" opacity="0.867" />
<path d="M 3.62 1.00 L 4.12 1.87 L 5.12 1.87 L 5.62 1.00 L 5.12 0.13 L 4.12 0.13 Z" opacity="0.867" />
<path d="M 3.62 3.00 L 4.12 3.87 L 5.12 3.87 L 5.62 3.00 L 5.12 2.13 L 4.12 2.13 Z" opacity="0.867" />
<path d="M 3.62 5.00 L 4.12 5.87 L 5.12 5.87 L 5.62 5.00 L 5.12 4.13 L 4.12 4.13 Z" opacity="0.867" />
<path d="M 3.62 7.00 L 4.12 7.87 L 5.12 7.87 L 5.62 7.00 L 5.12 6.13 L 4.12 6.13 Z" opacity="0.867" />
<path d="M 3.62 13.00 L 4.12 13.87 L 5.12 13.87 L 5.62 13.00 L 5.12 12.13 L 4.12 12.13 Z" opacity="0.867" />
<path d="M 3.62 17.00 L 4.12 17.87 L 5.12 17.87 L 5.62 17.00 L 5.12 16.13 L 4.12 16.13 Z" opacity="0.867" />
<path d="M 3.62 19.00 L 4.12 19.87 L 5.12 19.87 L 5.62 19.00 L 5.12 18.13 L 4.12 18.13 Z" opacity="0.867" />
<path d="M 3.62 21.00 L 4.12 21.87 L 5.12 21.87 L 5.62 21.00 L 5.12 20.13 L 4.12 20.13 Z" opacity="0.867" />
<path d="M 3.62 23.00 L 4.12 23.87 L 5.12 23.87 L 5.62 23.00 L 5.12 22.13 L 4.12 22.13 Z" opacity="0.867" />
<path d="M 3.62 25.00 L 4.12 25.87 L 5.12 25.87 L 5.62 25.00 L 5.12 24.13 L 4.12 24.13 Z" opacity="0.867" />
<path d="M 3.62 31.00 L 4.12 31.87 L 5.12 31.87 L 5.62 31.00 L 5.12 30.13 L 4.12 30.13 Z" opacity="0.867" />
<path d="M 3.62 35.00 L 4.12 35.87 L 5.12 35.87 L 5.62 35.00 L 5.12 34.13 L 4.12 34.13 Z" opacity="0.867" />
<path d="M 3.62 37.00 L 4.12 37.87 L 5.12 37.87 L 5.62 37.00 L 5.12 36.13 L 4.12 36.13 Z" opacity="0.867" />
<path d="M 3.62 43.00 L 4.12 43.87 L 5.12 43.87 L 5.62 43.00 L 5.12 42.13 L 4.12 42.13 Z" opacity="0.867" />
<path d="M 3.62 53.00 L 4.12 53.87 L 5.12 53.87 L 5.62 53.00 L 5.12 52.13 L 4.12 52.13 Z" opacity="0.867" />
<path d="M 3.62 55.00 L 4.12 55.87 L 5.12 55.87 L 5.62 55.00 L 5.12 54.13 L 4.12 54.13 Z" opacity="0.867" />
<path d="M 3.62 57.00 L 4.12 57.87 L 5.12 57.87 L 5.62 57.00 L 5.12 56.13 L 4.12 56.13 Z" opacity="0.867" />
<path d="M 3.62 59.00 L 4.12 59.87 L 5.12 59.87 L 5.62 59.00 L 5.12 58.13 L 4.12 58.13 Z" opacity="0.867" />
<path d="M 1.89 2.00 L 2.39 2.87 L 3.39 2.87 L 3.89 2.00 L 3.39 1.13 L 2.39 1.13 Z" opacity="0.867" />
<path d="M 1.89 4.00 L 2.39 4.87 L 3.39 4.87 L 3.89 4.00 L 3.39 3.13 L 2.39 3.13 Z" opacity="0.867" />
<path d="M 1.89 6.00 L 2.39 6.87 L 3.39 6.87 L 3.89 6.00 L 3.39 5.13 L 2.39 5.13 Z" opacity="0.867" />
<path d="M 1.89 8.00 L 2.39 8.87 L 3.39 8.87 L 3.89 8.00 L 3.39 7.13 L 2.39 7.13 Z" opacity="0.867" />
<path d="M 1.89 10.00 L 2.39 10.87 L 3.39 10.87 L 3.89 10.00 L 3.39 9.13 L 2.39 9.13 Z" opacity="0.867" />
<path d="M 1.89 12.00 L 2.39 12.87 L 3.39 12.87 L 3.89 12.00 L 3.39 11.13 L 2.39 11.13 Z" opacity="0.867" />
<path d="M 1.89 16.00 L 2.39 16.87 L 3.39 16.87 L 3.89 16.00 L 3.39 15.13 L 2.39 15.13 Z" opacity="0.867" />
<path d="M 1.89 20.00 L 2.39 20.87 L 3.39 20.87 L 3.89 20.00 L 3.39 19.13 L 2.39 19.13 Z" opacity="0.867" />
<path d="M 1.89 22.00 L 2.39 22.87 L 3.39 22.87 L 3.89 22.00 L 3.39 21.13 L 2.39 21.13 Z" opacity="0.867" />
<path d="M 1.89 24.00 L 2.39 24.87 L 3.39 24.87 L 3.89 24.00 L 3.39 23.13 L 2.39 23.13 Z" opacity="0.867" />
<path d="M 1.89 30.00 L 2.39 30.87 L 3.39 30.87 L 3.89 30.00 L 3.39 29.13 L 2.39 29.13 Z" opacity="0.867" />
<path d="M 1.89 32.00 L 2.39 32.87 L 3.39 32.87 L 3.89 32.00 L 3.39 31.13 L 2.39 31.13 Z" opacity="0.867" />
<path d="M 1.89 36.00 L 2.39 36.87 L 3.39 36.87 L 3.89 36.00 L 3.39 35.13 L 2.39 35.13 Z" opacity="0.867" />
<path d="M 1.89 38.00 L 2.39 38.87 L 3.39 38.87 L 3.89 38.00 L 3.39 37.13 L 2.39 37.13 Z" opacity="0.867" />
<path d="M 1.89 42.00 L 2.39 42.87 L 3.39 42.87 L 3.89 42.00 L 3.39 41.13 L 2.39 41.13 Z" opacity="0.867" />
<path d="M 1.89 48.00 L 2.39 48.87 L 3.39 48.87 L 3.89 48.00 L 3.39 47.13 L 2.39 47.13 Z" opacity="0.867" />
<path d="M 1.89 50.00 L 2.39 50.87 L 3.39 50.87 L 3.89 50.00 L 3.39 49.13 L 2.39 49.13 Z" opacity="0.867" />
<path d="M 1.89 52.00 L 2.39 52.87 L 3.39 52.87 L 3.89 52.00 L 3.39 51.13 L 2.39 51.13 Z" opacity="0.867" />
<path d="M 1.89 54.00 L 2.39 54.87 L 3.39 54.87 L 3.89 54.00 L 3.39 53.13 L 2.39 53.13 Z" opacity="0.867" />
<path d="M 1.89 56.00 L 2.39 56.87 L 3.39 56.87 L 3.89 56.00 L 3.39 55.13 L 2.39 55.13 Z" opacity="0.867" />
<path d="M 1.89 58.00 L 2.39 58.87 L 3.39 58.87 L 3.89 58.00 L 3.39 57.13 L 2.39 57.13 Z" opacity="0.867" />
<path d="M 0.15 1.00 L 0.65 1.87 L 1.65 1.87 L 2.15 1.00 L 1.65 0.13 L 0.65 0.13 Z" opacity="0.867" />
<path d="M 0.15 7.00 L 0.65 7.87 L 1.65 7.87 L 2.15 7.00 L 1.65 6.13 L 0.65 6.13 Z" opacity="0.867" />
<path d="M 0.15 17.00 L 0.65 17.87 L 1.65 17.87 L 2.15 17.00 L 1.65 16.13 L 0.65 16.13 Z" opacity="0.867" />
<path d="M 0.15 21.00 L 0.65 21.87 L 1.65 21.87 L 2.15 21.00 L 1.65 20.13 L 0.65 20.13 Z" opacity="0.867" />
<path d="M 0.15 23.00 L 0.65 23.87 L 1.65 23.87 L 2.15 23.00 L 1.65 22.13 L 0.65 22.13 Z" opacity="0.867" />
<path d="M 0.15 31.00 L 0.65 31.87 L 1.65 31.87 L 2.15 31.00 L 1.65 30.13 L 0.65 30.13 Z" opacity="0.867" />
<path d="M 0.15 33.00 L 0.65 33.87 L 1.65 33.87 L 2.15 33.00 L 1.65 32.13 L 0.65 32.13 Z" opacity="0.867" />
<path d="M 0.15 37.00 L 0.65 37.87 L 1.65 37.87 L 2.15 37.00 L 1.65 36.13 L 0.65 36.13 Z" opacity="0.867" />
<path d="M 0.15 39.00 L 0.65 39.87 L 1.65 39.87 L 2.15 39.00 L 1.65 38.13 L 0.65 38.13 Z" opacity="0.867" />
<path d="M 0.15 51.00 L 0.65 51.87 L 1.65 51.87 L 2.15 51.00 L 1.65 50.13 L 0.65 50.13 Z" opacity="0.867" />
<path d="M 0.15 59.00 L 0.65 59.87 L 1.65 59.87 L 2.15 59.00 L 1.65 58.13 L 0.65 58.13 Z" opacity="0.867" />
<circle cx="28.87" cy="29.00" r="9.00" opacity="0.867" />
<circle cx="28.87" cy="29.00" r="7.43" fill="#EEEEEE" opacity="0.133" />
<circle cx="28.87" cy="29.00" r="5.86" opacity="0.867" />
<circle cx="28.87" cy="29.00" r="4.29" fill="#EEEEEE" opacity="0.133" />
<circle cx="28.87" cy="29.00" r="2.72" opacity="0.867" />
<circle cx="28.87" cy="29.00" r="1.15" fill="#EEEEEE" opacity="0.133" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -0,0 +1,181 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="68" height="46" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol
</desc>
<g id="barcode" fill="#FF0000">
<rect x="0" y="0" width="68" height="46" fill="#0000FF" />
<rect x="10.00" y="10.00" width="48.00" height="2.00" fill="#000000" />
<rect x="10.00" y="12.00" width="2.00" height="2.00" fill="#000000" />
<rect x="12.00" y="12.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="14.00" y="12.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="16.00" y="12.00" width="2.00" height="22.00" fill="#000000" />
<rect x="18.00" y="12.00" width="2.00" height="22.00" fill="#ffffff" />
<rect x="20.00" y="12.00" width="4.00" height="2.00" fill="#00ff00" />
<rect x="24.00" y="12.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="26.00" y="12.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="28.00" y="12.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="30.00" y="12.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="32.00" y="12.00" width="16.00" height="2.00" fill="#00ffff" />
<rect x="48.00" y="12.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="50.00" y="12.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="54.00" y="12.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="56.00" y="12.00" width="2.00" height="22.00" fill="#000000" />
<rect x="10.00" y="14.00" width="4.00" height="2.00" fill="#000000" />
<rect x="14.00" y="14.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="20.00" y="14.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="22.00" y="14.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="24.00" y="14.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="26.00" y="14.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="28.00" y="14.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="30.00" y="14.00" width="18.00" height="2.00" fill="#00ff00" />
<rect x="48.00" y="14.00" width="2.00" height="2.00" fill="#000000" />
<rect x="50.00" y="14.00" width="4.00" height="2.00" fill="#00ff00" />
<rect x="54.00" y="14.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="10.00" y="16.00" width="2.00" height="2.00" fill="#000000" />
<rect x="12.00" y="16.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="14.00" y="16.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="20.00" y="16.00" width="4.00" height="2.00" fill="#00ff00" />
<rect x="24.00" y="16.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="26.00" y="16.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="28.00" y="16.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="30.00" y="16.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="32.00" y="16.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="36.00" y="16.00" width="6.00" height="2.00" fill="#ff00ff" />
<rect x="42.00" y="16.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="46.00" y="16.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="48.00" y="16.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="50.00" y="16.00" width="4.00" height="2.00" fill="#ff00ff" />
<rect x="54.00" y="16.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="10.00" y="18.00" width="4.00" height="2.00" fill="#000000" />
<rect x="14.00" y="18.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="20.00" y="18.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="22.00" y="18.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="24.00" y="18.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="26.00" y="18.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="30.00" y="18.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="32.00" y="18.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="34.00" y="18.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="36.00" y="18.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="38.00" y="18.00" width="6.00" height="2.00" fill="#ffff00" />
<rect x="44.00" y="18.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="46.00" y="18.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="48.00" y="18.00" width="2.00" height="2.00" fill="#000000" />
<rect x="50.00" y="18.00" width="4.00" height="2.00" fill="#ffff00" />
<rect x="54.00" y="18.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="10.00" y="20.00" width="2.00" height="2.00" fill="#000000" />
<rect x="12.00" y="20.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="14.00" y="20.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="20.00" y="20.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="22.00" y="20.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="24.00" y="20.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="26.00" y="20.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="28.00" y="20.00" width="4.00" height="2.00" fill="#ffff00" />
<rect x="32.00" y="20.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="34.00" y="20.00" width="4.00" height="2.00" fill="#ffff00" />
<rect x="38.00" y="20.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="40.00" y="20.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="42.00" y="20.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="44.00" y="20.00" width="4.00" height="2.00" fill="#ffff00" />
<rect x="48.00" y="20.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="50.00" y="20.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="52.00" y="20.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="54.00" y="20.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="10.00" y="22.00" width="4.00" height="2.00" fill="#000000" />
<rect x="14.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="20.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="22.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="24.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="26.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="28.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="30.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="32.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="34.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="36.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="38.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="40.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="42.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="44.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="46.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="48.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="50.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="52.00" y="22.00" width="2.00" height="2.00" fill="#000000" />
<rect x="54.00" y="22.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="10.00" y="24.00" width="2.00" height="2.00" fill="#000000" />
<rect x="12.00" y="24.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="14.00" y="24.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="20.00" y="24.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="22.00" y="24.00" width="6.00" height="2.00" fill="#00ff00" />
<rect x="28.00" y="24.00" width="20.00" height="2.00" fill="#00ffff" />
<rect x="48.00" y="24.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="50.00" y="24.00" width="6.00" height="2.00" fill="#00ffff" />
<rect x="10.00" y="26.00" width="4.00" height="2.00" fill="#000000" />
<rect x="14.00" y="26.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="20.00" y="26.00" width="8.00" height="2.00" fill="#ff00ff" />
<rect x="28.00" y="26.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="30.00" y="26.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="32.00" y="26.00" width="16.00" height="2.00" fill="#00ff00" />
<rect x="48.00" y="26.00" width="2.00" height="2.00" fill="#000000" />
<rect x="50.00" y="26.00" width="4.00" height="2.00" fill="#00ff00" />
<rect x="54.00" y="26.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="10.00" y="28.00" width="2.00" height="2.00" fill="#000000" />
<rect x="12.00" y="28.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="14.00" y="28.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="20.00" y="28.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="22.00" y="28.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="24.00" y="28.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="26.00" y="28.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="28.00" y="28.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="30.00" y="28.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="34.00" y="28.00" width="6.00" height="2.00" fill="#ff00ff" />
<rect x="40.00" y="28.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="44.00" y="28.00" width="4.00" height="2.00" fill="#ff00ff" />
<rect x="48.00" y="28.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="50.00" y="28.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="52.00" y="28.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="54.00" y="28.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="10.00" y="30.00" width="4.00" height="2.00" fill="#000000" />
<rect x="14.00" y="30.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="20.00" y="30.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="22.00" y="30.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="24.00" y="30.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="26.00" y="30.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="30.00" y="30.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="32.00" y="30.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="34.00" y="30.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="38.00" y="30.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="40.00" y="30.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="42.00" y="30.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="44.00" y="30.00" width="4.00" height="2.00" fill="#00ffff" />
<rect x="48.00" y="30.00" width="2.00" height="2.00" fill="#000000" />
<rect x="50.00" y="30.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="52.00" y="30.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="54.00" y="30.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="10.00" y="32.00" width="2.00" height="2.00" fill="#000000" />
<rect x="12.00" y="32.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="14.00" y="32.00" width="2.00" height="2.00" fill="#00ffff" />
<rect x="20.00" y="32.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="22.00" y="32.00" width="4.00" height="2.00" fill="#ff00ff" />
<rect x="26.00" y="32.00" width="4.00" height="2.00" fill="#ffff00" />
<rect x="30.00" y="32.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="32.00" y="32.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="34.00" y="32.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="36.00" y="32.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="38.00" y="32.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="40.00" y="32.00" width="4.00" height="2.00" fill="#00ff00" />
<rect x="44.00" y="32.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="46.00" y="32.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="48.00" y="32.00" width="2.00" height="2.00" fill="#ffffff" />
<rect x="50.00" y="32.00" width="2.00" height="2.00" fill="#ff00ff" />
<rect x="52.00" y="32.00" width="2.00" height="2.00" fill="#00ff00" />
<rect x="54.00" y="32.00" width="2.00" height="2.00" fill="#ffff00" />
<rect x="10.00" y="34.00" width="48.00" height="2.00" fill="#000000" />
<rect x="0.00" y="4.00" width="68.00" height="6.00" />
<rect x="0.00" y="36.00" width="68.00" height="6.00" />
<rect x="0.00" y="10.00" width="6.00" height="26.00" />
<rect x="62.00" y="10.00" width="6.00" height="26.00" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,107 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="192" height="117" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol
</desc>
<g id="barcode" fill="#FF0000">
<rect x="0" y="0" width="192" height="117" fill="#0000FF" opacity="0.067" />
<rect x="18.00" y="0.00" width="4.00" height="20.00" opacity="0.933" />
<rect x="24.00" y="0.00" width="4.00" height="16.00" opacity="0.933" />
<rect x="32.00" y="0.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="38.00" y="0.00" width="8.00" height="4.00" opacity="0.933" />
<rect x="48.00" y="0.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="56.00" y="0.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="60.00" y="0.00" width="10.00" height="4.00" opacity="0.933" />
<rect x="72.00" y="0.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="76.00" y="0.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="84.00" y="0.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="92.00" y="0.00" width="8.00" height="4.00" opacity="0.933" />
<rect x="106.00" y="0.00" width="8.00" height="4.00" opacity="0.933" />
<rect x="116.00" y="0.00" width="2.00" height="8.00" opacity="0.933" />
<rect x="120.00" y="0.00" width="2.00" height="16.00" opacity="0.933" />
<rect x="126.00" y="0.00" width="2.00" height="20.00" opacity="0.933" />
<rect x="30.00" y="4.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="38.00" y="4.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="46.00" y="4.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="58.00" y="4.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="66.00" y="4.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="72.00" y="4.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="82.00" y="4.00" width="2.00" height="8.00" opacity="0.933" />
<rect x="86.00" y="4.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="90.00" y="4.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="106.00" y="4.00" width="6.00" height="16.00" opacity="0.933" />
<rect x="30.00" y="8.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="38.00" y="8.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="48.00" y="8.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="52.00" y="8.00" width="10.00" height="4.00" opacity="0.933" />
<rect x="64.00" y="8.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="72.00" y="8.00" width="8.00" height="4.00" opacity="0.933" />
<rect x="92.00" y="8.00" width="2.00" height="8.00" opacity="0.933" />
<rect x="98.00" y="8.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="114.00" y="8.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="30.00" y="12.00" width="2.00" height="8.00" opacity="0.933" />
<rect x="38.00" y="12.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="44.00" y="12.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="52.00" y="12.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="62.00" y="12.00" width="8.00" height="4.00" opacity="0.933" />
<rect x="72.00" y="12.00" width="6.00" height="8.00" opacity="0.933" />
<rect x="82.00" y="12.00" width="8.00" height="4.00" opacity="0.933" />
<rect x="96.00" y="12.00" width="6.00" height="4.00" opacity="0.933" />
<rect x="114.00" y="12.00" width="2.00" height="8.00" opacity="0.933" />
<rect x="24.00" y="16.00" width="2.00" height="8.00" opacity="0.933" />
<rect x="38.00" y="16.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="46.00" y="16.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="54.00" y="16.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="68.00" y="16.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="80.00" y="16.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="88.00" y="16.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="94.00" y="16.00" width="8.00" height="4.00" opacity="0.933" />
<rect x="120.00" y="16.00" width="4.00" height="4.00" opacity="0.933" />
<rect x="124.00" y="20.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="22.00" y="24.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="126.00" y="24.00" width="2.00" height="4.00" opacity="0.933" />
<rect x="24.00" y="28.00" width="2.00" height="82.00" opacity="0.933" />
<rect x="124.00" y="28.00" width="2.00" height="82.00" opacity="0.933" />
<rect x="28.00" y="32.00" width="2.00" height="78.00" opacity="0.933" />
<rect x="38.00" y="32.00" width="2.00" height="68.00" opacity="0.933" />
<rect x="42.00" y="32.00" width="2.00" height="68.00" opacity="0.933" />
<rect x="46.00" y="32.00" width="4.00" height="68.00" opacity="0.933" />
<rect x="56.00" y="32.00" width="2.00" height="68.00" opacity="0.933" />
<rect x="62.00" y="32.00" width="6.00" height="68.00" opacity="0.933" />
<rect x="70.00" y="32.00" width="2.00" height="68.00" opacity="0.933" />
<rect x="74.00" y="32.00" width="8.00" height="68.00" opacity="0.933" />
<rect x="84.00" y="32.00" width="2.00" height="68.00" opacity="0.933" />
<rect x="90.00" y="32.00" width="4.00" height="68.00" opacity="0.933" />
<rect x="96.00" y="32.00" width="4.00" height="68.00" opacity="0.933" />
<rect x="104.00" y="32.00" width="4.00" height="68.00" opacity="0.933" />
<rect x="112.00" y="32.00" width="2.00" height="68.00" opacity="0.933" />
<rect x="116.00" y="32.00" width="2.00" height="78.00" opacity="0.933" />
<rect x="120.00" y="32.00" width="2.00" height="78.00" opacity="0.933" />
<rect x="140.00" y="51.00" width="2.00" height="49.00" opacity="0.933" />
<rect x="144.00" y="51.00" width="4.00" height="49.00" opacity="0.933" />
<rect x="150.00" y="51.00" width="4.00" height="49.00" opacity="0.933" />
<rect x="156.00" y="51.00" width="6.00" height="49.00" opacity="0.933" />
<rect x="164.00" y="51.00" width="2.00" height="49.00" opacity="0.933" />
<rect x="170.00" y="51.00" width="2.00" height="49.00" opacity="0.933" />
<rect x="174.00" y="51.00" width="6.00" height="49.00" opacity="0.933" />
<text x="14.00" y="116.00" text-anchor="end"
font-family="Helvetica, sans-serif" font-size="14.0" opacity="0.933" >
0
</text>
<text x="72.00" y="116.00" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="20.0" opacity="0.933" >
654321
</text>
<text x="132.00" y="116.00" text-anchor="start"
font-family="Helvetica, sans-serif" font-size="14.0" opacity="0.933" >
7
</text>
<text x="160.00" y="47.00" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="20.0" opacity="0.933" >
89
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,106 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="192" height="117" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol
</desc>
<g id="barcode" fill="#000000">
<rect x="18.00" y="0.00" width="4.00" height="20.00" />
<rect x="24.00" y="0.00" width="4.00" height="16.00" />
<rect x="32.00" y="0.00" width="4.00" height="4.00" />
<rect x="38.00" y="0.00" width="8.00" height="4.00" />
<rect x="48.00" y="0.00" width="6.00" height="4.00" />
<rect x="56.00" y="0.00" width="2.00" height="4.00" />
<rect x="60.00" y="0.00" width="10.00" height="4.00" />
<rect x="72.00" y="0.00" width="2.00" height="4.00" />
<rect x="76.00" y="0.00" width="2.00" height="4.00" />
<rect x="84.00" y="0.00" width="2.00" height="4.00" />
<rect x="92.00" y="0.00" width="8.00" height="4.00" />
<rect x="106.00" y="0.00" width="8.00" height="4.00" />
<rect x="116.00" y="0.00" width="2.00" height="8.00" />
<rect x="120.00" y="0.00" width="2.00" height="16.00" />
<rect x="126.00" y="0.00" width="2.00" height="20.00" />
<rect x="30.00" y="4.00" width="6.00" height="4.00" />
<rect x="38.00" y="4.00" width="6.00" height="4.00" />
<rect x="46.00" y="4.00" width="4.00" height="4.00" />
<rect x="58.00" y="4.00" width="2.00" height="4.00" />
<rect x="66.00" y="4.00" width="4.00" height="4.00" />
<rect x="72.00" y="4.00" width="6.00" height="4.00" />
<rect x="82.00" y="4.00" width="2.00" height="8.00" />
<rect x="86.00" y="4.00" width="2.00" height="4.00" />
<rect x="90.00" y="4.00" width="6.00" height="4.00" />
<rect x="106.00" y="4.00" width="6.00" height="16.00" />
<rect x="30.00" y="8.00" width="4.00" height="4.00" />
<rect x="38.00" y="8.00" width="4.00" height="4.00" />
<rect x="48.00" y="8.00" width="2.00" height="4.00" />
<rect x="52.00" y="8.00" width="10.00" height="4.00" />
<rect x="64.00" y="8.00" width="6.00" height="4.00" />
<rect x="72.00" y="8.00" width="8.00" height="4.00" />
<rect x="92.00" y="8.00" width="2.00" height="8.00" />
<rect x="98.00" y="8.00" width="2.00" height="4.00" />
<rect x="114.00" y="8.00" width="4.00" height="4.00" />
<rect x="30.00" y="12.00" width="2.00" height="8.00" />
<rect x="38.00" y="12.00" width="2.00" height="4.00" />
<rect x="44.00" y="12.00" width="6.00" height="4.00" />
<rect x="52.00" y="12.00" width="6.00" height="4.00" />
<rect x="62.00" y="12.00" width="8.00" height="4.00" />
<rect x="72.00" y="12.00" width="6.00" height="8.00" />
<rect x="82.00" y="12.00" width="8.00" height="4.00" />
<rect x="96.00" y="12.00" width="6.00" height="4.00" />
<rect x="114.00" y="12.00" width="2.00" height="8.00" />
<rect x="24.00" y="16.00" width="2.00" height="8.00" />
<rect x="38.00" y="16.00" width="4.00" height="4.00" />
<rect x="46.00" y="16.00" width="4.00" height="4.00" />
<rect x="54.00" y="16.00" width="2.00" height="4.00" />
<rect x="68.00" y="16.00" width="2.00" height="4.00" />
<rect x="80.00" y="16.00" width="2.00" height="4.00" />
<rect x="88.00" y="16.00" width="4.00" height="4.00" />
<rect x="94.00" y="16.00" width="8.00" height="4.00" />
<rect x="120.00" y="16.00" width="4.00" height="4.00" />
<rect x="124.00" y="20.00" width="2.00" height="4.00" />
<rect x="22.00" y="24.00" width="2.00" height="4.00" />
<rect x="126.00" y="24.00" width="2.00" height="4.00" />
<rect x="24.00" y="28.00" width="2.00" height="82.00" />
<rect x="124.00" y="28.00" width="2.00" height="82.00" />
<rect x="28.00" y="32.00" width="2.00" height="78.00" />
<rect x="38.00" y="32.00" width="2.00" height="68.00" />
<rect x="42.00" y="32.00" width="2.00" height="68.00" />
<rect x="46.00" y="32.00" width="4.00" height="68.00" />
<rect x="56.00" y="32.00" width="2.00" height="68.00" />
<rect x="62.00" y="32.00" width="6.00" height="68.00" />
<rect x="70.00" y="32.00" width="2.00" height="68.00" />
<rect x="74.00" y="32.00" width="8.00" height="68.00" />
<rect x="84.00" y="32.00" width="2.00" height="68.00" />
<rect x="90.00" y="32.00" width="4.00" height="68.00" />
<rect x="96.00" y="32.00" width="4.00" height="68.00" />
<rect x="104.00" y="32.00" width="4.00" height="68.00" />
<rect x="112.00" y="32.00" width="2.00" height="68.00" />
<rect x="116.00" y="32.00" width="2.00" height="78.00" />
<rect x="120.00" y="32.00" width="2.00" height="78.00" />
<rect x="140.00" y="51.00" width="2.00" height="49.00" />
<rect x="144.00" y="51.00" width="4.00" height="49.00" />
<rect x="150.00" y="51.00" width="4.00" height="49.00" />
<rect x="156.00" y="51.00" width="6.00" height="49.00" />
<rect x="164.00" y="51.00" width="2.00" height="49.00" />
<rect x="170.00" y="51.00" width="2.00" height="49.00" />
<rect x="174.00" y="51.00" width="6.00" height="49.00" />
<text x="14.00" y="116.00" text-anchor="end"
font-family="Helvetica, sans-serif" font-size="14.0" >
0
</text>
<text x="72.00" y="116.00" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="20.0" >
654321
</text>
<text x="132.00" y="116.00" text-anchor="start"
font-family="Helvetica, sans-serif" font-size="14.0" >
7
</text>
<text x="160.00" y="47.00" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="20.0" >
89
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,107 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="117" height="192" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<desc>Zint Generated Symbol
</desc>
<g id="barcode" fill="#000000">
<rect x="0" y="0" width="117" height="192" fill="#FFFFFF" />
<rect x="0.00" y="170.00" width="20.00" height="4.00" />
<rect x="0.00" y="164.00" width="16.00" height="4.00" />
<rect x="0.00" y="156.00" width="4.00" height="4.00" />
<rect x="0.00" y="146.00" width="4.00" height="8.00" />
<rect x="0.00" y="138.00" width="4.00" height="6.00" />
<rect x="0.00" y="134.00" width="4.00" height="2.00" />
<rect x="0.00" y="122.00" width="4.00" height="10.00" />
<rect x="0.00" y="118.00" width="4.00" height="2.00" />
<rect x="0.00" y="114.00" width="4.00" height="2.00" />
<rect x="0.00" y="106.00" width="4.00" height="2.00" />
<rect x="0.00" y="92.00" width="4.00" height="8.00" />
<rect x="0.00" y="78.00" width="4.00" height="8.00" />
<rect x="0.00" y="74.00" width="8.00" height="2.00" />
<rect x="0.00" y="70.00" width="16.00" height="2.00" />
<rect x="0.00" y="64.00" width="20.00" height="2.00" />
<rect x="4.00" y="156.00" width="4.00" height="6.00" />
<rect x="4.00" y="148.00" width="4.00" height="6.00" />
<rect x="4.00" y="142.00" width="4.00" height="4.00" />
<rect x="4.00" y="132.00" width="4.00" height="2.00" />
<rect x="4.00" y="122.00" width="4.00" height="4.00" />
<rect x="4.00" y="114.00" width="4.00" height="6.00" />
<rect x="4.00" y="108.00" width="8.00" height="2.00" />
<rect x="4.00" y="104.00" width="4.00" height="2.00" />
<rect x="4.00" y="96.00" width="4.00" height="6.00" />
<rect x="4.00" y="80.00" width="16.00" height="6.00" />
<rect x="8.00" y="158.00" width="4.00" height="4.00" />
<rect x="8.00" y="150.00" width="4.00" height="4.00" />
<rect x="8.00" y="142.00" width="4.00" height="2.00" />
<rect x="8.00" y="130.00" width="4.00" height="10.00" />
<rect x="8.00" y="122.00" width="4.00" height="6.00" />
<rect x="8.00" y="112.00" width="4.00" height="8.00" />
<rect x="8.00" y="98.00" width="8.00" height="2.00" />
<rect x="8.00" y="92.00" width="4.00" height="2.00" />
<rect x="8.00" y="74.00" width="4.00" height="4.00" />
<rect x="12.00" y="160.00" width="8.00" height="2.00" />
<rect x="12.00" y="152.00" width="4.00" height="2.00" />
<rect x="12.00" y="142.00" width="4.00" height="6.00" />
<rect x="12.00" y="134.00" width="4.00" height="6.00" />
<rect x="12.00" y="122.00" width="4.00" height="8.00" />
<rect x="12.00" y="114.00" width="8.00" height="6.00" />
<rect x="12.00" y="102.00" width="4.00" height="8.00" />
<rect x="12.00" y="90.00" width="4.00" height="6.00" />
<rect x="12.00" y="76.00" width="8.00" height="2.00" />
<rect x="16.00" y="166.00" width="8.00" height="2.00" />
<rect x="16.00" y="150.00" width="4.00" height="4.00" />
<rect x="16.00" y="142.00" width="4.00" height="4.00" />
<rect x="16.00" y="136.00" width="4.00" height="2.00" />
<rect x="16.00" y="122.00" width="4.00" height="2.00" />
<rect x="16.00" y="110.00" width="4.00" height="2.00" />
<rect x="16.00" y="100.00" width="4.00" height="4.00" />
<rect x="16.00" y="90.00" width="4.00" height="8.00" />
<rect x="16.00" y="68.00" width="4.00" height="4.00" />
<rect x="20.00" y="66.00" width="4.00" height="2.00" />
<rect x="24.00" y="168.00" width="4.00" height="2.00" />
<rect x="24.00" y="64.00" width="4.00" height="2.00" />
<rect x="28.00" y="166.00" width="82.00" height="2.00" />
<rect x="28.00" y="66.00" width="82.00" height="2.00" />
<rect x="32.00" y="162.00" width="78.00" height="2.00" />
<rect x="32.00" y="152.00" width="68.00" height="2.00" />
<rect x="32.00" y="148.00" width="68.00" height="2.00" />
<rect x="32.00" y="142.00" width="68.00" height="4.00" />
<rect x="32.00" y="134.00" width="68.00" height="2.00" />
<rect x="32.00" y="124.00" width="68.00" height="6.00" />
<rect x="32.00" y="120.00" width="68.00" height="2.00" />
<rect x="32.00" y="110.00" width="68.00" height="8.00" />
<rect x="32.00" y="106.00" width="68.00" height="2.00" />
<rect x="32.00" y="98.00" width="68.00" height="4.00" />
<rect x="32.00" y="92.00" width="68.00" height="4.00" />
<rect x="32.00" y="84.00" width="68.00" height="4.00" />
<rect x="32.00" y="78.00" width="68.00" height="2.00" />
<rect x="32.00" y="74.00" width="78.00" height="2.00" />
<rect x="32.00" y="70.00" width="78.00" height="2.00" />
<rect x="51.00" y="50.00" width="49.00" height="2.00" />
<rect x="51.00" y="44.00" width="49.00" height="4.00" />
<rect x="51.00" y="38.00" width="49.00" height="4.00" />
<rect x="51.00" y="30.00" width="49.00" height="6.00" />
<rect x="51.00" y="26.00" width="49.00" height="2.00" />
<rect x="51.00" y="20.00" width="49.00" height="2.00" />
<rect x="51.00" y="12.00" width="49.00" height="6.00" />
<text x="116.00" y="178.00" text-anchor="end"
font-family="Helvetica, sans-serif" font-size="14.0" transform="rotate(270,116.00,178.00)" >
0
</text>
<text x="116.00" y="120.00" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="20.0" transform="rotate(270,116.00,120.00)" >
654321
</text>
<text x="116.00" y="60.00" text-anchor="start"
font-family="Helvetica, sans-serif" font-size="14.0" transform="rotate(270,116.00,60.00)" >
7
</text>
<text x="47.00" y="32.00" text-anchor="middle"
font-family="Helvetica, sans-serif" font-size="20.0" transform="rotate(270,47.00,32.00)" >
89
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -48,17 +48,22 @@ static void test_options(int index, int debug) {
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_AZTEC, -1, -1, -1, -1, "1234567890", 0, 15, 15 }, /* 0*/ { BARCODE_AZTEC, -1, -1, -1, -1, "1234567890", 0, 15, 15 },
/* 1*/ { BARCODE_AZTEC, -1, -1, 4, -1, "1234567890", 0, 19, 19 }, /* 1*/ { BARCODE_AZTEC, -1, -1, 1, -1, "1234567890", 0, 15, 15 },
/* 2*/ { BARCODE_AZTEC, -1, -1, 5, -1, "1234567890", ZINT_WARN_INVALID_OPTION, 15, 15 }, /* 2*/ { BARCODE_AZTEC, -1, -1, 4, -1, "1234567890", 0, 19, 19 },
/* 3*/ { BARCODE_AZTEC, -1, -1, -1, 36, "1234567890", 0, 151, 151 }, /* 3*/ { BARCODE_AZTEC, -1, -1, 5, -1, "1234567890", ZINT_WARN_INVALID_OPTION, 15, 15 },
/* 4*/ { BARCODE_AZTEC, -1, -1, -1, 37, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 }, /* 4*/ { BARCODE_AZTEC, -1, -1, -1, 1, "12345678901234567890", ZINT_ERROR_TOO_LONG, -1, -1 },
/* 5*/ { BARCODE_AZTEC, GS1_MODE, READER_INIT, -1, -1, "[91]A", ZINT_ERROR_INVALID_OPTION, -1, -1 }, /* 5*/ { BARCODE_AZTEC, -1, -1, -1, 36, "1234567890", 0, 151, 151 },
/* 6*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, "[91]A", 0, 15, 15 }, /* 6*/ { BARCODE_AZTEC, -1, -1, -1, 37, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 },
/* 7*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, "(91)A", 0, 15, 15 }, /* 7*/ { BARCODE_AZTEC, GS1_MODE, READER_INIT, -1, -1, "[91]A", ZINT_ERROR_INVALID_OPTION, -1, -1 },
/* 8*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 26, "A", 0, 109, 109 }, // 22 layers /* 8*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, "[91]A", 0, 15, 15 },
/* 9*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 27, "A", ZINT_ERROR_TOO_LONG, -1, -1 }, // 23 layers /* 9*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, "(91)A", 0, 15, 15 },
/* 10*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 1, "A", 0, 15, 15 }, // Compact 1 layer /* 10*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 26, "A", 0, 109, 109 }, // 22 layers
/* 11*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 2, "A", 0, 19, 19 }, // Compact 2 layers gets set to full 1 layer if READER_INIT set /* 11*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 27, "A", ZINT_ERROR_TOO_LONG, -1, -1 }, // 23 layers
/* 12*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 1, "A", 0, 15, 15 }, // Compact 1 layer
/* 13*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 2, "A", 0, 19, 19 }, // Compact 2 layers gets set to full 1 layer if READER_INIT set
/* 14*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "0001", ZINT_ERROR_TOO_LONG, -1, -1 },
/* 15*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "A", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 16*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "256", ZINT_ERROR_INVALID_DATA, -1, -1 },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -902,7 +907,7 @@ static void test_encode(int index, int generate, int debug) {
"101010100011011" "101010100011011"
"000000000111010" "000000000111010"
}, },
/* 27*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", -1, 0, 61, 61, 0, "Zint website example gui3.png NOTE now ends with CTRL_DL . instead of CTRL_PS .; BWIPP different encodation (doesn't use CTRL_PS doubles)", /* 27*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", -1, 0, 61, 61, 0, "Zint website example gui3.png NOTE now ends with D/L . instead of P/S .; BWIPP same encodation but estimates number of Data/ECC codewords differently",
"0010110111101110101100000101001101110100010000100111011100001" "0010110111101110101100000101001101110100010000100111011100001"
"0001100000000000001101110010000100010101110011000001000011110" "0001100000000000001101110010000100010101110011000001000011110"
"0001111110101010100101000110101101000110011000101111011100110" "0001111110101010100101000110101101000110011000101111011100110"
@ -965,7 +970,115 @@ static void test_encode(int index, int generate, int debug) {
"1110000011010000000000100001100001000111011110011010000000001" "1110000011010000000000100001100001000111011110011010000000001"
"0000010101001111100010001001111100101000010001110010010101101" "0000010101001111100010001001111100101000010001110010010101101"
}, },
/* 28*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 36, "Lorem ipsum dolor sit amet.", -1, 0, 151, 151, 1, "Max version 151x151", /* 28*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, "Colon: etc. NUM. 12345, num. 12345 @, 123. . . . . @.¡.!A ", -1, 0, 27, 27, 0, "BWIPP different encodation (better use of D/L and B/S)",
"001011011101101011011110111"
"101001010000010000111010101"
"011101001100101111010111111"
"110110011100000110101001100"
"001111101101100101101110001"
"100111011111010110000110011"
"001000010001011010000001001"
"001000110100110011000111111"
"110110111111101100110000010"
"011110001111111111110110000"
"100101000100000001011101100"
"001110100101111101010001111"
"001101111101000101100011111"
"110100110101010101100001010"
"111010100101000101110000101"
"000010101101111101000101010"
"000010011100000001011100010"
"001000100111111111101010010"
"010101000000010100010000000"
"011011001101111000010001010"
"001010001110010110111001111"
"110011011101100111101010100"
"011011101110010010110011101"
"011111111001010010100110111"
"011101011001001010010111111"
"000000111111011010100010100"
"010000011101011110110000100"
},
/* 29*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, "1. 1a @ A@@ @@!!@@!!1!!!!¡a ", -1, 0, 23, 23, 0, "BWIPP different encodation (better use of B/S)",
"11110101100111101010011"
"11111111110111111001011"
"00000000001000011111000"
"01011101110100100010110"
"11100111000010110111010"
"10001110100110000111101"
"10110111100111001011101"
"00000111111111111000101"
"10010101000000010101010"
"01100001011111010100010"
"11000001010001010101000"
"11111001010101011000100"
"01010011010001010110100"
"11110001011111010110111"
"00111001000000010110100"
"00110001111111111110100"
"01111000110001100101100"
"00100010011001110001000"
"00001101111011011111001"
"01011001100100111010101"
"11010001100000011111100"
"01100011101111001100010"
"11000011000010110000011"
},
/* 30*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, -1, "1234\01512\015AB\015AB\015ab\015ab\01512\015ab\015!\015!\015a,a,1,a,@,", -1, 0, 27, 27, 0, "BWIPP different encodation (better use of P/S CRs)",
"111111110000010110000011001"
"110110110010011110100000101"
"000011100001000111001100111"
"010010110001110000100100110"
"101001010011110101010100011"
"100111100011101010001101110"
"001001011111111011000000011"
"100011010101001101001011110"
"100010001111100110110101110"
"111011011111111111100110011"
"000110011100000001110110111"
"001010001101111101110000010"
"000000011101000101101010000"
"000011001101010101101110001"
"011110001101000101000100100"
"001100111101111101110100101"
"111111000100000001010101000"
"011010110111111111111011100"
"001111010001101110010011100"
"000001011010011101101000000"
"000011010100101100000000101"
"000101100011010101010110010"
"000000101000011010111000000"
"110000000111001101111000001"
"110010101110100110101001000"
"000110100001100100110010100"
"101110010000110000111111101"
},
/* 31*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 6, "AA!! ", -1, 0, 23, 23, 1, "",
"00110111000010111110110"
"01011001101100101011001"
"00101000101000011110111"
"00011011100111110011101"
"10011100001000000010001"
"00001111111111111110000"
"00010100000000000100111"
"00011101111111110100111"
"01000101000000010101101"
"11110101011111010110011"
"00110101010001010110010"
"01010101010101010101010"
"00010101010001010100011"
"00100101011111010101001"
"00100101000000010101010"
"11001101111111110111100"
"00011100000000000101000"
"00110111111111111111011"
"01100000101000010001001"
"11101001010111001100010"
"11110100110010110001111"
"00111110110110100011111"
"10010010100010101110001"
},
/* 32*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 36, "Lorem ipsum dolor sit amet.", -1, 0, 151, 151, 1, "Max version 151x151",
"0110011000001101111010100010010110101010100001110111111001101101010000111100111111111001000011100001010000101001010001001010101001000111101011111001101" "0110011000001101111010100010010110101010100001110111111001101101010000111100111111111001000011100001010000101001010001001010101001000111101011111001101"
"1011011111111000001111111001010101111011100101110110001011011000101000010101101100000110011110100000010100110111100111111011011110001000110100111100100" "1011011111111000001111111001010101111011100101110110001011011000101000010101101100000110011110100000010100110111100111111011011110001000110100111100100"
"1110001110001111110101011110010010011011001011001000001010000010000110101010101011111110110010000010000111000010000011011110001111111001000010000000111" "1110001110001111110101011110010010011011001011001000001010000010000110101010101011111110110010000010000111000010000011011110001111111001000010000000111"
@ -1118,7 +1231,7 @@ static void test_encode(int index, int generate, int debug) {
"1000000100011011110011111011110000011111110111001111111010110101100011000111010100100010001111000101110110110100000111000011101011011101111111000011111" "1000000100011011110011111011110000011111110111001111111010110101100011000111010100100010001111000101110110110100000111000011101011011101111111000011111"
"1000110110001001001111110010011100000100011010101101101101101001001001011110101010011110010011011110100111100111110111111110000101100111110000101010011" "1000110110001001001111110010011100000100011010101101101101101001001001011110101010011110010011011110100111100111110111111110000101100111110000101010011"
}, },
/* 29*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 31, "aztec barcode", -1, 0, 131, 131, 1, "Layers 27 example from Andre Maute, mailing list 2020-12-16", /* 33*/ { BARCODE_AZTEC, DATA_MODE, -1, -1, -1, 31, "aztec barcode", -1, 0, 131, 131, 1, "Layers 27 example from Andre Maute, mailing list 2020-12-16",
"10101111100010101000001110000100001111111110110110010011000100100000011000101001100000001111111010100010010101111010001011001110001" "10101111100010101000001110000100001111111110110110010011000100100000011000101001100000001111111010100010010101111010001011001110001"
"01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
"10001110111111000001001111011100100100010011110010101011110111111000000110101100000110101010110000010101101110010010010101001001001" "10001110111111000001001111011100100100010011110010101011110111111000000110101100000110101010110000010101101110010010010101001001001"
@ -1251,7 +1364,7 @@ static void test_encode(int index, int generate, int debug) {
"01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
"10111010011101110010010111100011101001001011100010101101110000011000110101000011100000011000101000101010001110100000000100101100001" "10111010011101110010010111100011101001001011100010101101110000011000110101000011100000011000101000101010001110100000000100101100001"
}, },
/* 30*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 6, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 23, 23, 1, "Full 2 layers example", /* 34*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 6, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 23, 23, 1, "Full 2 layers example",
"00000100110001011110010" "00000100110001011110010"
"01111011110100100101111" "01111011110100100101111"
"00001011010000010011001" "00001011010000010011001"
@ -1276,7 +1389,7 @@ static void test_encode(int index, int generate, int debug) {
"11001100111110110000000" "11001100111110110000000"
"00011010100010111001011" "00011010100010111001011"
}, },
/* 31*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 7, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", -1, 0, 27, 27, 1, "Full 3 layers example", /* 35*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 7, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", -1, 0, 27, 27, 1, "Full 3 layers example",
"001011111011101010010010000" "001011111011101010010010000"
"011111001111111001111010110" "011111001111111001111010110"
"001111101101101100001011101" "001111101101101100001011101"
@ -1305,7 +1418,7 @@ static void test_encode(int index, int generate, int debug) {
"110011110110011010110100110" "110011110110011010110100110"
"101010010111000001000111010" "101010010111000001000111010"
}, },
/* 32*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 8, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO", -1, 0, 31, 31, 1, "Full 4 layers example", /* 36*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 8, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO", -1, 0, 31, 31, 1, "Full 4 layers example",
"0011101110100110101001010110000" "0011101110100110101001010110000"
"0110000101110011101111001100111" "0110000101110011101111001100111"
"0000011000110010000001101101001" "0000011000110010000001101101001"
@ -1338,7 +1451,7 @@ static void test_encode(int index, int generate, int debug) {
"1111011001010111010011101111110" "1111011001010111010011101111110"
"1001011100001000011100011001100" "1001011100001000011100011001100"
}, },
/* 33*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 9, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 37, 37, 1, "5 layers example", /* 37*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 9, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 37, 37, 1, "5 layers example",
"0010010100110011001011100010000111101" "0010010100110011001011100010000111101"
"0101111010111110110100101101010011001" "0101111010111110110100101101010011001"
"1010101010101010101010101010101010101" "1010101010101010101010101010101010101"
@ -1377,7 +1490,7 @@ static void test_encode(int index, int generate, int debug) {
"0101001010110100110101111101011110000" "0101001010110100110101111101011110000"
"0111100001000111001011001100101001111" "0111100001000111001011001100101001111"
}, },
/* 34*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 12, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 49, 49, 1, "8 layers example", /* 38*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 12, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 49, 49, 1, "8 layers example",
"0001000111011100100000001101000011110011100000101" "0001000111011100100000001101000011110011100000101"
"0110100001000100011100000000110110101100010111110" "0110100001000100011100000000110110101100010111110"
"0000011110010100101100001010000010000100110110111" "0000011110010100101100001010000010000100110110111"
@ -1428,7 +1541,7 @@ static void test_encode(int index, int generate, int debug) {
"1001110101111010111101010001000110101110000111011" "1001110101111010111101010001000110101110000111011"
"1110001110011001010011001001010000100100101000001" "1110001110011001010011001001010000100100101000001"
}, },
/* 35*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 14, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 57, 57, 1, "10 layers example", /* 39*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 14, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 57, 57, 1, "10 layers example",
"001011000011100111111010110111010001110110001110011100010" "001011000011100111111010110111010001110110001110011100010"
"011110001010001111111111000000100000100100110001001011111" "011110001010001111111111000000100000100100110001001011111"
"000101001001111111010111010010011011111011101011010110010" "000101001001111111010111010010011011111011101011010110010"
@ -1487,7 +1600,7 @@ static void test_encode(int index, int generate, int debug) {
"111101011110010100100011010101100011100110010111011001001" "111101011110010100100011010101100011100110010111011001001"
"001100101001110000101000010011000100001101011001011100010" "001100101001110000101000010011000100001101011001011100010"
}, },
/* 36*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 16, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 67, 67, 1, "12 layers example", /* 40*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 16, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 67, 67, 1, "12 layers example",
"0000000100001010000100101101101010101011010000001010001111010001101" "0000000100001010000100101101101010101011010000001010001111010001101"
"0101010101010101010101010101010101010101010101010101010101010101010" "0101010101010101010101010101010101010101010101010101010101010101010"
"0001010100101010100010110000101110111100001101110000000100111010001" "0001010100101010100010110000101110111100001101110000000100111010001"
@ -1556,7 +1669,7 @@ static void test_encode(int index, int generate, int debug) {
"0101010101010101010101010101010101010101010101010101010101010101010" "0101010101010101010101010101010101010101010101010101010101010101010"
"0001010011000010100000100100010000011010100101110000010001110001101" "0001010011000010100000100100010000011010100101110000010001110001101"
}, },
/* 37*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 17, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 71, 71, 1, "13 layers example", /* 41*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 17, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 71, 71, 1, "13 layers example",
"00001101010011011010101011001110001000011100011011001100101000001110111" "00001101010011011010101011001110001000011100011011001100101000001110111"
"01110010110000100111001011100101010101000111011001110000100101100001100" "01110010110000100111001011100101010101000111011001110000100101100001100"
"00000111000100010100111110101011100011011010001110001000101100010000011" "00000111000100010100111110101011100011011010001110001000101100010000011"
@ -1629,7 +1742,7 @@ static void test_encode(int index, int generate, int debug) {
"10110010001101011101001110011001111101100101011010011110111110101111111" "10110010001101011101001110011001111101100101011010011110111110101111111"
"10000010100001001000010000110101001001110000100011100001100110010100001" "10000010100001001000010000110101001001110000100011100001100110010100001"
}, },
/* 38*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 83, 83, 1, "16 layers example", /* 42*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 20, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 83, 83, 1, "16 layers example",
"00001011100001101001010010111011000000000010110111001100101011111010100110010011011" "00001011100001101001010010111011000000000010110111001100101011111010100110010011011"
"00001100111101010101111001100010000000000101110110000101011100011010011001001000011" "00001100111101010101111001100010000000000101110110000101011100011010011001001000011"
"00000001101101111000000010100101011010101011110011000000000101010100111000110101100" "00000001101101111000000010100101011010101011110011000000000101010100111000110101100"
@ -1714,7 +1827,7 @@ static void test_encode(int index, int generate, int debug) {
"01101011110001110011001111101100101011010101110111110101111101011001011101100001111" "01101011110001110011001111101100101011010101110111110101111101011001011101100001111"
"00001001000010000110101000101110000100011010001100110010100011011111011100001101110" "00001001000010000110101000101110000100011010001100110010100011011111011100001101110"
}, },
/* 39*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 23, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 95, 95, 1, "19 layers example", /* 43*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 23, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 95, 95, 1, "19 layers example",
"00010001011000001001011100000100010100011110001000101101010001101011000110101100111011100100000" "00010001011000001001011100000100010100011110001000101101010001101011000110101100111011100100000"
"00111000100000010000111101010111001010100110100100101001100010111101100100110001001101001001000" "00111000100000010000111101010111001010100110100100101001100010111101100100110001001101001001000"
"00110000001000100010001011100100111100110000000000111101000101101101011010001100100111011100010" "00110000001000100010001011100100111100110000000000111101000101101101011010001100100111011100010"
@ -1811,7 +1924,7 @@ static void test_encode(int index, int generate, int debug) {
"10011001111011010101011010011101111110101111010101011110010010111111000001000011100100110011001" "10011001111011010101011010011101111110101111010101011110010010111111000001000011100100110011001"
"00110101001011100000100011100010100110010100111000001111111101000000001100011000110110100110000" "00110101001011100000100011100010100110010100111000001111111101000000001100011000110110100110000"
}, },
/* 40*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 101, 101, 1, "20 layers example", /* 44*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 24, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 101, 101, 1, "20 layers example",
"00100011001001111011101000010101101000001111011011100001010111001110100001111011101010011110100110110" "00100011001001111011101000010101101000001111011011100001010111001110100001111011101010011110100110110"
"01001011101010010001000100010011010011001011100001000010011001000001100110100110000010001111010101011" "01001011101010010001000100010011010011001011100001000010011001000001100110100110000010001111010101011"
"10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101" "10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
@ -1914,7 +2027,7 @@ static void test_encode(int index, int generate, int debug) {
"01011101100101011001001110111110100111101011010110010100101110001100000100001110000011101010010100001" "01011101100101011001001110111110100111101011010110010100101110001100000100001110000011101010010100001"
"01100101110000100011110001100110011010011000001110100010010101000111010001001111111100001101100010111" "01100101110000100011110001100110011010011000001110100010010101000111010001001111111100001101100010111"
}, },
/* 41*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 30, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 125, 125, 1, "26 layers example", /* 45*/ { BARCODE_AZTEC, UNICODE_MODE, -1, -1, -1, 30, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 125, 125, 1, "26 layers example",
"00100110111101111000100011101010001011000100011001100001000110110101101111011010100110010101111010000000001001111011011101111" "00100110111101111000100011101010001011000100011001100001000110110101101111011010100110010101111010000000001001111011011101111"
"01000110110001010011111011000100001101000010100100110101101011001111101101110000100110101000000100001011010101000110110110011" "01000110110001010011111011000100001101000010100100110101101011001111101101110000100110101000000100001011010101000110110110011"
"00100000111011111011100111001111100011001111101001011011011111100001111010110111111101111111011010001000100011110110101111001" "00100000111011111011100111001111100011001111101001011011011111100001111010110111111101111111011010001000100011110110101111001"
@ -2041,7 +2154,7 @@ static void test_encode(int index, int generate, int debug) {
"11111010111101011001001001001000000000110100010101011110101011001010101011000101010010100111110010111001110100001111110111011" "11111010111101011001001001001000000000110100010101011110101011001010101011000101010010100111110010111001110100001111110111011"
"10011001010011111111011111100010010011110010001010100100000110100111000110011010110111001010011011101001111100110010110010011" "10011001010011111111011111100010010011110010001010100100000110100111000110011010110111001010011011101001111100110010110010011"
}, },
/* 42*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "0", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (1st)", /* 46*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "0", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (1st)",
"11101010101" "11101010101"
"11111111111" "11111111111"
"01000000010" "01000000010"
@ -2054,7 +2167,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00101010100" "00101010100"
}, },
/* 43*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "25", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (2nd)", /* 47*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "25", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (2nd)",
"11101100101" "11101100101"
"11111111111" "11111111111"
"01000000011" "01000000011"
@ -2067,7 +2180,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00100100000" "00100100000"
}, },
/* 44*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "125", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (3rd)", /* 48*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "125", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (3rd)",
"11110101101" "11110101101"
"11111111111" "11111111111"
"11000000011" "11000000011"
@ -2080,7 +2193,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00111101000" "00111101000"
}, },
/* 45*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "255", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (4th)", /* 49*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "255", -1, 0, 11, 11, 1, "ISO/IEC 24778:2008 Figure A.1 (4th)",
"11010101001" "11010101001"
"11111111111" "11111111111"
"01000000011" "01000000011"
@ -2093,7 +2206,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00110011100" "00110011100"
}, },
/* 46*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "1", -1, 0, 11, 11, 1, "", /* 50*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "1", -1, 0, 11, 11, 1, "",
"11101010101" "11101010101"
"11111111111" "11111111111"
"11000000011" "11000000011"
@ -2106,7 +2219,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00100110100" "00100110100"
}, },
/* 47*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "15", -1, 0, 11, 11, 1, "", /* 51*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "15", -1, 0, 11, 11, 1, "",
"11101001001" "11101001001"
"11111111111" "11111111111"
"11000000011" "11000000011"
@ -2119,7 +2232,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00001111100" "00001111100"
}, },
/* 48*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "16", -1, 0, 11, 11, 1, "", /* 52*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "16", -1, 0, 11, 11, 1, "",
"11101110101" "11101110101"
"11111111111" "11111111111"
"11000000010" "11000000010"
@ -2132,7 +2245,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00111100100" "00111100100"
}, },
/* 49*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "63", -1, 0, 11, 11, 1, "", /* 53*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "63", -1, 0, 11, 11, 1, "",
"11100101001" "11100101001"
"11111111111" "11111111111"
"11000000011" "11000000011"
@ -2145,7 +2258,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00101010000" "00101010000"
}, },
/* 50*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "64", -1, 0, 11, 11, 1, "", /* 54*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "64", -1, 0, 11, 11, 1, "",
"11111010101" "11111010101"
"11111111111" "11111111111"
"01000000010" "01000000010"
@ -2158,7 +2271,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00111011100" "00111011100"
}, },
/* 51*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "65", -1, 0, 11, 11, 1, "", /* 55*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "65", -1, 0, 11, 11, 1, "",
"11111010101" "11111010101"
"11111111111" "11111111111"
"11000000011" "11000000011"
@ -2171,7 +2284,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00110111100" "00110111100"
}, },
/* 52*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "126", -1, 0, 11, 11, 1, "", /* 56*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "126", -1, 0, 11, 11, 1, "",
"11110101001" "11110101001"
"11111111111" "11111111111"
"01000000010" "01000000010"
@ -2184,7 +2297,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00110111000" "00110111000"
}, },
/* 53*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "127", -1, 0, 11, 11, 1, "", /* 57*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "127", -1, 0, 11, 11, 1, "",
"11110101001" "11110101001"
"11111111111" "11111111111"
"11000000011" "11000000011"
@ -2197,7 +2310,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00111011000" "00111011000"
}, },
/* 54*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "128", -1, 0, 11, 11, 1, "", /* 58*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "128", -1, 0, 11, 11, 1, "",
"11001010101" "11001010101"
"11111111111" "11111111111"
"11000000010" "11000000010"
@ -2210,7 +2323,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00100010000" "00100010000"
}, },
/* 55*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "191", -1, 0, 11, 11, 1, "", /* 59*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "191", -1, 0, 11, 11, 1, "",
"11000101001" "11000101001"
"11111111111" "11111111111"
"01000000011" "01000000011"
@ -2223,7 +2336,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00100010100" "00100010100"
}, },
/* 56*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "192", -1, 0, 11, 11, 1, "", /* 60*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "192", -1, 0, 11, 11, 1, "",
"11011010101" "11011010101"
"11111111111" "11111111111"
"11000000010" "11000000010"
@ -2236,7 +2349,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00110011000" "00110011000"
}, },
/* 57*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "225", -1, 0, 11, 11, 1, "", /* 61*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "225", -1, 0, 11, 11, 1, "",
"11010010101" "11010010101"
"11111111111" "11111111111"
"11000000011" "11000000011"
@ -2249,7 +2362,7 @@ static void test_encode(int index, int generate, int debug) {
"01111111111" "01111111111"
"00001100100" "00001100100"
}, },
/* 58*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "254", -1, 0, 11, 11, 1, "", /* 62*/ { BARCODE_AZRUNE, UNICODE_MODE, -1, -1, -1, -1, "254", -1, 0, 11, 11, 1, "",
"11010101001" "11010101001"
"11111111111" "11111111111"
"11000000010" "11000000010"

View File

@ -41,19 +41,20 @@ static void test_pixel_plot(int index, int debug) {
int height; int height;
char *pattern; char *pattern;
int repeat; int repeat;
int ret;
}; };
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
/* 0*/ { 1, 1, "1", 0 }, /* 0*/ { 1, 1, "1", 0, 0 },
/* 1*/ { 2, 1, "11", 0 }, /* 1*/ { 2, 1, "11", 0, 0 },
/* 2*/ { 2, 2, "10", 1 }, /* 2*/ { 2, 2, "10", 1, 0 },
/* 3*/ { 3, 1, "101", 0 }, /* 3*/ { 3, 1, "101", 0, 0 },
/* 4*/ { 3, 2, "101010", 0 }, /* 4*/ { 3, 2, "101010", 0, 0 },
/* 5*/ { 3, 3, "101010101", 0 }, /* 5*/ { 3, 3, "101010101", 0, 0 },
/* 6*/ { 4, 1, "1001", 0 }, /* 6*/ { 4, 1, "1001", 0, 0 },
/* 7*/ { 4, 3, "1001", 1 }, /* 7*/ { 4, 3, "1001", 1, 0 },
/* 8*/ { 5, 1, "10101", 0 }, /* 8*/ { 5, 1, "10101", 0, 0 },
/* 9*/ { 8, 2, "CBMWKRYGGYRKWMBC", 0 }, /* 9*/ { 8, 2, "CBMWKRYGGYRKWMBC", 0, 0 },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, ret; int i, ret;
@ -63,12 +64,9 @@ static void test_pixel_plot(int index, int debug) {
char data_buf[8 * 2 + 1]; char data_buf[8 * 2 + 1];
testStart("test_pixel_plot"); int have_identify = testUtilHaveIdentify();
if (!testUtilHaveIdentify()) { testStart("test_pixel_plot");
testSkip("ImageMagick identify not available");
return;
}
for (i = 0; i < data_size; i++) { for (i = 0; i < data_size; i++) {
int size; int size;
@ -94,15 +92,28 @@ static void test_pixel_plot(int index, int debug) {
} }
assert_equal(size, (int) strlen(data_buf), "i:%d bmp_pixel_plot size %d != strlen(data_buf) %d\n", i, size, (int) strlen(data_buf)); assert_equal(size, (int) strlen(data_buf), "i:%d bmp_pixel_plot size %d != strlen(data_buf) %d\n", i, size, (int) strlen(data_buf));
if (*data_buf > '9') {
symbol->symbology = BARCODE_ULTRA;
}
symbol->bitmap = (unsigned char *) data_buf; symbol->bitmap = (unsigned char *) data_buf;
ret = bmp_pixel_plot(symbol, (unsigned char *) data_buf); ret = bmp_pixel_plot(symbol, (unsigned char *) data_buf);
assert_zero(ret, "i:%d bmp_pixel_plot ret %d != 0 (%s)\n", i, ret, symbol->errtxt); assert_equal(ret, data[i].ret, "i:%d bmp_pixel_plot ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
if (ret < ZINT_ERROR) {
if (have_identify) {
ret = testUtilVerifyIdentify(symbol->outfile, debug); ret = testUtilVerifyIdentify(symbol->outfile, debug);
assert_zero(ret, "i:%d identify %s ret %d != 0\n", i, symbol->outfile, ret); assert_zero(ret, "i:%d identify %s ret %d != 0\n", i, symbol->outfile, ret);
}
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile); assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile);
}
} else {
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
(void) remove(symbol->outfile);
}
}
symbol->bitmap = NULL; symbol->bitmap = NULL;
@ -116,6 +127,8 @@ static void test_print(int index, int generate, int debug) {
struct item { struct item {
int symbology; int symbology;
int border_width;
int output_options;
int whitespace_width; int whitespace_width;
int whitespace_height; int whitespace_height;
int option_1; int option_1;
@ -126,9 +139,10 @@ static void test_print(int index, int generate, int debug) {
char *expected_file; char *expected_file;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_PDF417, 5, -1, -1, -1, "147AD0", "FC9630", "123", "pdf417_fg_bg.bmp" }, /* 0*/ { BARCODE_PDF417, -1, -1, 5, -1, -1, -1, "147AD0", "FC9630", "123", "pdf417_fg_bg.bmp" },
/* 1*/ { BARCODE_ULTRA, 5, -1, -1, -1, "147AD0", "FC9630", "123", "ultracode_fg_bg.bmp" }, /* 1*/ { BARCODE_ULTRA, -1, -1, 5, -1, -1, -1, "147AD0", "FC9630", "123", "ultracode_fg_bg.bmp" },
/* 2*/ { BARCODE_PDF417COMP, 2, 2, -1, -1, "", "", "123", "pdf417comp_hvwsp2.bmp" }, /* 2*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, "147AD0", "FC9630", "123", "ultracode_fg_bg_hvwsp1_box1.bmp" },
/* 3*/ { BARCODE_PDF417COMP, -1, -1, 2, 2, -1, -1, "", "", "123", "pdf417comp_hvwsp2.bmp" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -160,7 +174,10 @@ static void test_print(int index, int generate, int debug) {
symbol = ZBarcode_Create(); symbol = ZBarcode_Create();
assert_nonnull(symbol, "Symbol not created\n"); assert_nonnull(symbol, "Symbol not created\n");
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug); length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug);
if (data[i].border_width != -1) {
symbol->border_width = data[i].border_width;
}
if (data[i].whitespace_width != -1) { if (data[i].whitespace_width != -1) {
symbol->whitespace_width = data[i].whitespace_width; symbol->whitespace_width = data[i].whitespace_width;
} }
@ -184,8 +201,9 @@ static void test_print(int index, int generate, int debug) {
assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
if (generate) { if (generate) {
printf(" /*%3d*/ { %s, %d, %d, %d, %d, \"%s\", \"%s\", \"%s\", \"%s\"},\n", printf(" /*%3d*/ { %s, %d, %s, %d, %d, %d, %d, \"%s\", \"%s\", \"%s\", \"%s\"},\n",
i, testUtilBarcodeName(data[i].symbology), data[i].whitespace_width, data[i].whitespace_height, i, testUtilBarcodeName(data[i].symbology), data[i].border_width, testUtilOutputOptionsName(data[i].output_options),
data[i].whitespace_width, data[i].whitespace_height,
data[i].option_1, data[i].option_2, data[i].fgcolour, data[i].bgcolour, data[i].option_1, data[i].option_2, data[i].fgcolour, data[i].bgcolour,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file); testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file);
ret = testUtilRename(symbol->outfile, expected_file); ret = testUtilRename(symbol->outfile, expected_file);
@ -209,11 +227,37 @@ static void test_print(int index, int generate, int debug) {
testFinish(); testFinish();
} }
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
unsigned char data[] = { "1" };
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.bitmap = data;
symbol.bitmap_width = symbol.bitmap_height = 1;
strcpy(symbol.outfile, "nosuch_dir/out.bmp");
ret = bmp_pixel_plot(&symbol, data);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "bmp_pixel_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = bmp_pixel_plot(&symbol, data);
printf(" - ignore (BMP to stdout)\n"); fflush(stdout);
assert_zero(ret, "bmp_pixel_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_pixel_plot", test_pixel_plot, 1, 0, 1 }, { "test_pixel_plot", test_pixel_plot, 1, 0, 1 },
{ "test_print", test_print, 1, 1, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_outfile", test_outfile, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -55,40 +55,45 @@ static void test_input(int index, int debug) {
/* 10*/ { 3, "000", 0, 1, 19, }, /* 10*/ { 3, "000", 0, 1, 19, },
/* 11*/ { 3, "001", 0, 1, 19, }, /* 11*/ { 3, "001", 0, 1, 19, },
/* 12*/ { 3, "026", 0, 1, 19, }, /* 12*/ { 3, "026", 0, 1, 19, },
/* 13*/ { -1, "026", 0, 1, 23, }, // Defaults to channel 4 due to length /* 13*/ { -1, "27", 0, 1, 23 }, // Channel 4
/* 14*/ { 3, "0026", 0, 1, 19, }, /* 14*/ { -1, "026", 0, 1, 23, }, // Defaults to channel 4 due to length
/* 15*/ { 3, "1234", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 15*/ { 3, "0026", 0, 1, 19, },
/* 16*/ { 4, "000", 0, 1, 23 }, /* 16*/ { 3, "1234", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 17*/ { -1, "000", 0, 1, 23 }, // Defaults to channel 4 due to length /* 17*/ { 4, "000", 0, 1, 23 },
/* 18*/ { 4, "026", 0, 1, 23 }, /* 18*/ { -1, "000", 0, 1, 23 }, // Defaults to channel 4 due to length
/* 19*/ { 4, "0000026", 0, 1, 23 }, /* 19*/ { 4, "026", 0, 1, 23 },
/* 20*/ { 4, "0000", 0, 1, 23 }, /* 20*/ { 4, "0000026", 0, 1, 23 },
/* 21*/ { 4, "292", 0, 1, 23 }, /* 21*/ { 4, "0000", 0, 1, 23 },
/* 22*/ { 4, "293", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 22*/ { 4, "292", 0, 1, 23 },
/* 23*/ { 5, "0000", 0, 1, 27 }, /* 23*/ { 4, "293", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 24*/ { -1, "0000", 0, 1, 27 }, // Defaults to channel 5 due to length /* 24*/ { -1, "293", 0, 1, 27 }, // Channel 5
/* 25*/ { -1, "3493", 0, 1, 27 }, /* 25*/ { 5, "0000", 0, 1, 27 },
/* 26*/ { 5, "3493", 0, 1, 27 }, /* 26*/ { -1, "0000", 0, 1, 27 }, // Defaults to channel 5 due to length
/* 27*/ { 5, "3494", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 27*/ { -1, "3493", 0, 1, 27 },
/* 28*/ { 6, "00000", 0, 1, 31 }, /* 28*/ { 5, "3493", 0, 1, 27 },
/* 29*/ { -1, "00000", 0, 1, 31 }, // Defaults to channel 5 due to length /* 29*/ { 5, "3494", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 30*/ { -1, "44072", 0, 1, 31 }, /* 30*/ { -1, "3494", 0, 1, 31 }, // Channel 6
/* 31*/ { 6, "44072", 0, 1, 31 }, /* 31*/ { 6, "00000", 0, 1, 31 },
/* 32*/ { 6, "44073", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 32*/ { -1, "00000", 0, 1, 31 }, // Defaults to channel 5 due to length
/* 33*/ { -1, "576688", 0, 1, 35 }, /* 33*/ { -1, "44072", 0, 1, 31 },
/* 34*/ { 7, "000000", 0, 1, 35 }, /* 34*/ { 6, "44072", 0, 1, 31 },
/* 35*/ { -1, "000000", 0, 1, 35 }, // Defaults to channel 7 due to length /* 35*/ { 6, "44073", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 36*/ { 7, "576688", 0, 1, 35 }, /* 36*/ { -1, "44073", 0, 1, 35 }, // Channel 7
/* 37*/ { 7, "576689", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 37*/ { 7, "000000", 0, 1, 35 },
/* 38*/ { 7, "0576688", 0, 1, 35 }, /* 38*/ { -1, "000000", 0, 1, 35 }, // Defaults to channel 7 due to length
/* 39*/ { -1, "1234567", 0, 1, 39 }, /* 39*/ { 7, "576688", 0, 1, 35 },
/* 40*/ { 8, "0000000", 0, 1, 39, }, /* 40*/ { 7, "576689", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 41*/ { -1, "0000000", 0, 1, 39, }, // Defaults to channel 8 due to length /* 41*/ { 7, "0576688", 0, 1, 35 },
/* 42*/ { 8, "1234567", 0, 1, 39, }, /* 42*/ { -1, "1234567", 0, 1, 39 },
/* 43*/ { 8, "7742863", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 43*/ { -1, "576689", 0, 1, 39 }, // Channel 8
/* 44*/ { 8, "01234567", ZINT_ERROR_TOO_LONG, -1, -1 }, /* 44*/ { 8, "0000000", 0, 1, 39, },
/* 45*/ { 8, "00000000", ZINT_ERROR_TOO_LONG, -1, -1 }, /* 45*/ { -1, "0000000", 0, 1, 39, }, // Defaults to channel 8 due to length
/* 46*/ { 9, "7742863", ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 46*/ { 8, "1234567", 0, 1, 39, },
/* 47*/ { 8, "7742863", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 48*/ { 8, "01234567", ZINT_ERROR_TOO_LONG, -1, -1 },
/* 49*/ { 8, "00000000", ZINT_ERROR_TOO_LONG, -1, -1 },
/* 50*/ { 9, "7742863", ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 51*/ { -1, "A", ZINT_ERROR_INVALID_DATA, -1, -1 },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;

View File

@ -116,21 +116,21 @@ static void test_hrt(int index, int debug) {
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE11, -1, "123-45", -1, "123-4552" }, // 2 checksums /* 0*/ { BARCODE_CODE11, -1, "123-45", -1, "123-4552" }, // 2 checksums
/* 1*/ { BARCODE_CODE11, 1, "123-45", -1, "123-455" }, // 1 checksum /* 1*/ { BARCODE_CODE11, 1, "123-45", -1, "123-455" }, // 1 check digit
/* 2*/ { BARCODE_CODE11, 2, "123-45", -1, "123-45" }, // No checksums /* 2*/ { BARCODE_CODE11, 2, "123-45", -1, "123-45" }, // No checksums
/* 3*/ { BARCODE_CODE11, -1, "123456789012", -1, "123456789012-8" }, // First checksum 10 (A) goes to hyphen /* 3*/ { BARCODE_CODE11, -1, "123456789012", -1, "123456789012-8" }, // First check digit 10 (A) goes to hyphen
/* 4*/ { BARCODE_CODE39, -1, "ABC1234", -1, "*ABC1234*" }, /* 4*/ { BARCODE_CODE39, -1, "ABC1234", -1, "*ABC1234*" },
/* 5*/ { BARCODE_CODE39, -1, "abc1234", -1, "*ABC1234*" }, // Converts to upper /* 5*/ { BARCODE_CODE39, -1, "abc1234", -1, "*ABC1234*" }, // Converts to upper
/* 6*/ { BARCODE_CODE39, -1, "123456789", -1, "*123456789*" }, /* 6*/ { BARCODE_CODE39, -1, "123456789", -1, "*123456789*" },
/* 7*/ { BARCODE_CODE39, 1, "123456789", -1, "*1234567892*" }, // With checksum /* 7*/ { BARCODE_CODE39, 1, "123456789", -1, "*1234567892*" }, // With check digit
/* 8*/ { BARCODE_EXCODE39, -1, "ABC1234", -1, "ABC1234" }, /* 8*/ { BARCODE_EXCODE39, -1, "ABC1234", -1, "ABC1234" },
/* 9*/ { BARCODE_EXCODE39, -1, "abc1234", -1, "abc1234" }, /* 9*/ { BARCODE_EXCODE39, -1, "abc1234", -1, "abc1234" },
/* 10*/ { BARCODE_EXCODE39, 1, "abc1234", -1, "abc1234" }, // With checksum (not displayed) /* 10*/ { BARCODE_EXCODE39, 1, "abc1234", -1, "abc1234" }, // With check digit (not displayed)
/* 11*/ { BARCODE_EXCODE39, -1, "a%\000\001$\177z\033\037!+/\\@A~", 16, "a% $ z !+/\\@A~" }, // NUL, ctrls and DEL replaced with spaces /* 11*/ { BARCODE_EXCODE39, -1, "a%\000\001$\177z\033\037!+/\\@A~", 16, "a% $ z !+/\\@A~" }, // NUL, ctrls and DEL replaced with spaces
/* 12*/ { BARCODE_LOGMARS, -1, "ABC1234", -1, "ABC1234" }, /* 12*/ { BARCODE_LOGMARS, -1, "ABC1234", -1, "ABC1234" },
/* 13*/ { BARCODE_LOGMARS, -1, "abc1234", -1, "ABC1234" }, // Converts to upper /* 13*/ { BARCODE_LOGMARS, -1, "abc1234", -1, "ABC1234" }, // Converts to upper
/* 14*/ { BARCODE_LOGMARS, 1, "abc1234", -1, "ABC12340" }, // With checksum /* 14*/ { BARCODE_LOGMARS, 1, "abc1234", -1, "ABC12340" }, // With check digit
/* 15*/ { BARCODE_LOGMARS, 1, "12345/ABCDE", -1, "12345/ABCDET" }, // With checksum /* 15*/ { BARCODE_LOGMARS, 1, "12345/ABCDE", -1, "12345/ABCDET" }, // With check digit
/* 16*/ { BARCODE_CODE93, -1, "ABC1234", -1, "ABC1234S5" }, // 2 checksums added (note check digits not shown by bwipp or tec-it) /* 16*/ { BARCODE_CODE93, -1, "ABC1234", -1, "ABC1234S5" }, // 2 checksums added (note check digits not shown by bwipp or tec-it)
/* 17*/ { BARCODE_CODE93, -1, "abc1234", -1, "abc1234ZG" }, /* 17*/ { BARCODE_CODE93, -1, "abc1234", -1, "abc1234ZG" },
/* 18*/ { BARCODE_CODE93, -1, "A\001a\000b\177d\037e", 9, "A a b d e1R" }, // NUL, ctrls and DEL replaced with spaces /* 18*/ { BARCODE_CODE93, -1, "A\001a\000b\177d\037e", 9, "A a b d e1R" }, // NUL, ctrls and DEL replaced with spaces
@ -184,33 +184,37 @@ static void test_input(int index, int debug) {
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE11, -1, "-", -1, 0, 1, 37 }, /* 0*/ { BARCODE_CODE11, -1, "-", -1, 0, 1, 37 },
/* 1*/ { BARCODE_CODE11, -1, "A", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 1*/ { BARCODE_CODE11, -1, "A", -1, ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 2*/ { BARCODE_CODE39, -1, "a", -1, 0, 1, 38 }, // Converts to upper /* 2*/ { BARCODE_CODE11, 3, "1", -1, ZINT_ERROR_INVALID_OPTION, -1, -1 },
/* 3*/ { BARCODE_CODE39, -1, ",", 1, ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 3*/ { BARCODE_CODE39, -1, "a", -1, 0, 1, 38 }, // Converts to upper
/* 4*/ { BARCODE_CODE39, -1, "\000", 1, ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 4*/ { BARCODE_CODE39, -1, ",", 1, ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 5*/ { BARCODE_EXCODE39, -1, "A", -1, 0, 1, 38 }, /* 5*/ { BARCODE_CODE39, -1, "\000", 1, ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 6*/ { BARCODE_EXCODE39, -1, "a", -1, 0, 1, 51 }, /* 6*/ { BARCODE_CODE39, 0, "1", -1, 0, 1, 38 },
/* 7*/ { BARCODE_EXCODE39, -1, ",", -1, 0, 1, 51 }, /* 7*/ { BARCODE_CODE39, 1, "1", -1, 0, 1, 51 }, // Check digit
/* 8*/ { BARCODE_EXCODE39, -1, "\000", 1, 0, 1, 51 }, /* 8*/ { BARCODE_CODE39, 2, "1", -1, 0, 1, 38 }, // option_2 > 1 gnored
/* 9*/ { BARCODE_EXCODE39, -1, "é", -1, ZINT_ERROR_INVALID_DATA, -1, -1, }, /* 9*/ { BARCODE_EXCODE39, -1, "A", -1, 0, 1, 38 },
/* 10*/ { BARCODE_LOGMARS, -1, "A", -1, 0, 1, 47 }, /* 10*/ { BARCODE_EXCODE39, -1, "a", -1, 0, 1, 51 },
/* 11*/ { BARCODE_LOGMARS, -1, "a", -1, 0, 1, 47 }, /* 11*/ { BARCODE_EXCODE39, -1, ",", -1, 0, 1, 51 },
/* 12*/ { BARCODE_LOGMARS, -1, ",", -1, ZINT_ERROR_INVALID_DATA, -1, -1, }, /* 12*/ { BARCODE_EXCODE39, -1, "\000", 1, 0, 1, 51 },
/* 13*/ { BARCODE_LOGMARS, -1, "\000", 1, ZINT_ERROR_INVALID_DATA, -1, -1, }, /* 13*/ { BARCODE_EXCODE39, -1, "é", -1, ZINT_ERROR_INVALID_DATA, -1, -1, },
/* 14*/ { BARCODE_CODE93, -1, "A", -1, 0, 1, 46 }, /* 14*/ { BARCODE_LOGMARS, -1, "A", -1, 0, 1, 47 },
/* 15*/ { BARCODE_CODE93, -1, "a", -1, 0, 1, 55 }, /* 15*/ { BARCODE_LOGMARS, -1, "a", -1, 0, 1, 47 },
/* 16*/ { BARCODE_CODE93, -1, ",", -1, 0, 1, 55 }, /* 16*/ { BARCODE_LOGMARS, -1, ",", -1, ZINT_ERROR_INVALID_DATA, -1, -1, },
/* 17*/ { BARCODE_CODE93, -1, "\000", 1, 0, 1, 55 }, /* 17*/ { BARCODE_LOGMARS, -1, "\000", 1, ZINT_ERROR_INVALID_DATA, -1, -1, },
/* 18*/ { BARCODE_CODE93, -1, "é", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 18*/ { BARCODE_CODE93, -1, "A", -1, 0, 1, 46 },
/* 19*/ { BARCODE_PZN, -1, "1", -1, 0, 1, 142 }, /* 19*/ { BARCODE_CODE93, -1, "a", -1, 0, 1, 55 },
/* 20*/ { BARCODE_PZN, -1, "A", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 20*/ { BARCODE_CODE93, -1, ",", -1, 0, 1, 55 },
/* 21*/ { BARCODE_PZN, -1, "1000006", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, // Check digit == 10 so can't be used /* 21*/ { BARCODE_CODE93, -1, "\000", 1, 0, 1, 55 },
/* 22*/ { BARCODE_VIN, -1, "5GZCZ43D13S812715", -1, 0, 1, 246 }, /* 22*/ { BARCODE_CODE93, -1, "é", -1, ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 23*/ { BARCODE_VIN, -1, "5GZCZ43D23S812715", -1, ZINT_ERROR_INVALID_CHECK, -1, -1 }, // North American with invalid check character /* 23*/ { BARCODE_PZN, -1, "1", -1, 0, 1, 142 },
/* 24*/ { BARCODE_VIN, -1, "WP0ZZZ99ZTS392124", -1, 0, 1, 246 }, // Not North American so no check /* 24*/ { BARCODE_PZN, -1, "A", -1, ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 25*/ { BARCODE_VIN, -1, "WPOZZZ99ZTS392124", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, // O not allowed /* 25*/ { BARCODE_PZN, -1, "1000006", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, // Check digit == 10 so can't be used
/* 26*/ { BARCODE_HIBC_39, -1, "a", -1, 0, 1, 79 }, // Converts to upper /* 26*/ { BARCODE_VIN, -1, "5GZCZ43D13S812715", -1, 0, 1, 246 },
/* 27*/ { BARCODE_HIBC_39, -1, ",", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 27*/ { BARCODE_VIN, -1, "5GZCZ43D23S812715", -1, ZINT_ERROR_INVALID_CHECK, -1, -1 }, // North American with invalid check character
/* 28*/ { BARCODE_HIBC_39, -1, "\000", 1, ZINT_ERROR_INVALID_DATA, -1, -1 }, /* 28*/ { BARCODE_VIN, -1, "WP0ZZZ99ZTS392124", -1, 0, 1, 246 }, // Not North American so no check
/* 29*/ { BARCODE_VIN, -1, "WPOZZZ99ZTS392124", -1, ZINT_ERROR_INVALID_DATA, -1, -1 }, // O not allowed
/* 30*/ { BARCODE_HIBC_39, -1, "a", -1, 0, 1, 79 }, // Converts to upper
/* 31*/ { BARCODE_HIBC_39, -1, ",", -1, ZINT_ERROR_INVALID_DATA, -1, -1 },
/* 32*/ { BARCODE_HIBC_39, -1, "\000", 1, ZINT_ERROR_INVALID_DATA, -1, -1 },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -259,79 +263,106 @@ static void test_encode(int index, int generate, int debug) {
/* 0*/ { BARCODE_CODE11, -1, "123-45", -1, 0, 1, 78, "2 check digits (52); verified manually against tec-it", /* 0*/ { BARCODE_CODE11, -1, "123-45", -1, 0, 1, 78, "2 check digits (52); verified manually against tec-it",
"101100101101011010010110110010101011010101101101101101011011010100101101011001" "101100101101011010010110110010101011010101101101101101011011010100101101011001"
}, },
/* 1*/ { BARCODE_CODE11, 1, "123-455", -1, 0, 1, 78, "1 check digit (2); verified manually against tec-it", /* 1*/ { BARCODE_CODE11, -1, "93", -1, 0, 1, 44, "2 check digits (--); verified manually against tec-it",
"10110010110101011001010101101010110101011001"
},
/* 2*/ { BARCODE_CODE11, 1, "123-455", -1, 0, 1, 78, "1 check digit (2); verified manually against tec-it",
"101100101101011010010110110010101011010101101101101101011011010100101101011001" "101100101101011010010110110010101011010101101101101101011011010100101101011001"
}, },
/* 2*/ { BARCODE_CODE11, 2, "123-4552", -1, 0, 1, 78, "0 check digits; verified manually against tec-it", /* 3*/ { BARCODE_CODE11, 2, "123-4552", -1, 0, 1, 78, "0 check digits; verified manually against tec-it",
"101100101101011010010110110010101011010101101101101101011011010100101101011001" "101100101101011010010110110010101011010101101101101101011011010100101101011001"
}, },
/* 3*/ { BARCODE_CODE11, 1, "123-45", -1, 0, 1, 70, "1 check digit; verified manually against tec-it", /* 4*/ { BARCODE_CODE11, 1, "123-45", -1, 0, 1, 70, "1 check digit; verified manually against tec-it",
"1011001011010110100101101100101010110101011011011011010110110101011001" "1011001011010110100101101100101010110101011011011011010110110101011001"
}, },
/* 4*/ { BARCODE_CODE11, 2, "123-45", -1, 0, 1, 62, "0 check digits; verified manually against tec-it", /* 5*/ { BARCODE_CODE11, 2, "123-45", -1, 0, 1, 62, "0 check digits; verified manually against tec-it",
"10110010110101101001011011001010101101010110110110110101011001" "10110010110101101001011011001010101101010110110110110101011001"
}, },
/* 5*/ { BARCODE_CODE39, -1, "1A", -1, 0, 1, 51, "ISO/IEC 16388:2007 Figure 1", /* 6*/ { BARCODE_CODE39, -1, "1A", -1, 0, 1, 51, "ISO/IEC 16388:2007 Figure 1",
"100101101101011010010101101101010010110100101101101" "100101101101011010010101101101010010110100101101101"
}, },
/* 6*/ { BARCODE_CODE39, 1, "1A", -1, 0, 1, 64, "With checksum", /* 7*/ { BARCODE_CODE39, 1, "1A", -1, 0, 1, 64, "With check digit (B)",
"1001011011010110100101011011010100101101011010010110100101101101" "1001011011010110100101011011010100101101011010010110100101101101"
}, },
/* 7*/ { BARCODE_CODE39, -1, "+A/E%U$A/D%T+Z", -1, 0, 1, 207, "Same as BARCODE_EXCODE39 'a%\000\001$\177z' below", /* 8*/ { BARCODE_CODE39, 1, "Z1", -1, 0, 1, 64, "Check digit '-'",
"1001011011010100110110101011010010101101001010110110100101101101"
},
/* 9*/ { BARCODE_CODE39, 1, "Z2", -1, 0, 1, 64, "Check digit '.'",
"1001011011010100110110101010110010101101100101011010100101101101"
},
/* 10*/ { BARCODE_CODE39, 1, "Z3", -1, 0, 1, 64, "Check digit space, displayed as underscore",
"1001011011010100110110101011011001010101001101011010100101101101"
},
/* 11*/ { BARCODE_CODE39, 1, "Z4", -1, 0, 1, 64, "Check digit '$'",
"1001011011010100110110101010100110101101001001001010100101101101"
},
/* 12*/ { BARCODE_CODE39, 1, "Z5", -1, 0, 1, 64, "Check digit '/'",
"1001011011010100110110101011010011010101001001010010100101101101"
},
/* 13*/ { BARCODE_CODE39, 1, "Z6", -1, 0, 1, 64, "Check digit '+'",
"1001011011010100110110101010110011010101001010010010100101101101"
},
/* 14*/ { BARCODE_CODE39, 1, "Z7", -1, 0, 1, 64, "Check digit '%'",
"1001011011010100110110101010100101101101010010010010100101101101"
},
/* 15*/ { BARCODE_CODE39, -1, "+A/E%U$A/D%T+Z", -1, 0, 1, 207, "Same as BARCODE_EXCODE39 'a%\000\001$\177z' below",
"100101101101010010100100101101010010110100100101001011010110010101010010010010110010101011010010010010101101010010110100100101001010101100101101010010010010101011011001010010100100101001101101010100101101101" "100101101101010010100100101101010010110100100101001011010110010101010010010010110010101011010010010010101101010010110100100101001010101100101101010010010010101011011001010010100100101001101101010100101101101"
}, },
/* 8*/ { BARCODE_EXCODE39, -1, "1A", -1, 0, 1, 51, "ISO/IEC 16388:2007 Figure 1", /* 16*/ { BARCODE_EXCODE39, -1, "1A", -1, 0, 1, 51, "ISO/IEC 16388:2007 Figure 1",
"100101101101011010010101101101010010110100101101101" "100101101101011010010101101101010010110100101101101"
}, },
/* 9*/ { BARCODE_EXCODE39, 1, "1A", -1, 0, 1, 64, "With checksum", /* 17*/ { BARCODE_EXCODE39, 1, "1A", -1, 0, 1, 64, "With check digit",
"1001011011010110100101011011010100101101011010010110100101101101" "1001011011010110100101011011010100101101011010010110100101101101"
}, },
/* 10*/ { BARCODE_EXCODE39, -1, "a%\000\001$\177z", 7, 0, 1, 207, "Verified manually against tec-it", /* 18*/ { BARCODE_EXCODE39, 1, "Z4", -1, 0, 1, 64, "Check digit $",
"1001011011010100110110101010100110101101001001001010100101101101"
},
/* 19*/ { BARCODE_EXCODE39, -1, "a%\000\001$\177z", 7, 0, 1, 207, "Verified manually against tec-it",
"100101101101010010100100101101010010110100100101001011010110010101010010010010110010101011010010010010101101010010110100100101001010101100101101010010010010101011011001010010100100101001101101010100101101101" "100101101101010010100100101101010010110100100101001011010110010101010010010010110010101011010010010010101101010010110100100101001010101100101101010010010010101011011001010010100100101001101101010100101101101"
}, },
/* 11*/ { BARCODE_EXCODE39, -1, "\033\037!+/\\@A~", -1, 0, 1, 246, "Verified manually against tec-it", /* 20*/ { BARCODE_EXCODE39, -1, "\033\037!+/\\@A~", -1, 0, 1, 246, "Verified manually against tec-it",
"100101101101010100100100101101010010110101001001001011010110010101001001010010110101001011010010010100101101010100110100100101001011010110100101010010010010101101010011010100100100101001101010110110101001011010100100100101011010110010100101101101" "100101101101010100100100101101010010110101001001001011010110010101001001010010110101001011010010010100101101010100110100100101001011010110100101010010010010101101010011010100100100101001101010110110101001011010100100100101011010110010100101101101"
}, },
/* 12*/ { BARCODE_LOGMARS, -1, "1A", -1, 0, 1, 63, "Verified manually against tec-it", /* 21*/ { BARCODE_LOGMARS, -1, "1A", -1, 0, 1, 63, "Verified manually against tec-it",
"100010111011101011101000101011101110101000101110100010111011101" "100010111011101011101000101011101110101000101110100010111011101"
}, },
/* 13*/ { BARCODE_LOGMARS, 1, "1A", -1, 0, 1, 79, "With checksum; verified manually against tec-it", /* 22*/ { BARCODE_LOGMARS, 1, "1A", -1, 0, 1, 79, "With check digit; verified manually against tec-it",
"1000101110111010111010001010111011101010001011101011101000101110100010111011101" "1000101110111010111010001010111011101010001011101011101000101110100010111011101"
}, },
/* 14*/ { BARCODE_LOGMARS, -1, "ABC", -1, 0, 1, 79, "MIL-STD-1189 Rev. B Figure 1", /* 23*/ { BARCODE_LOGMARS, -1, "ABC", -1, 0, 1, 79, "MIL-STD-1189 Rev. B Figure 1",
"1000101110111010111010100010111010111010001011101110111010001010100010111011101" "1000101110111010111010100010111010111010001011101110111010001010100010111011101"
}, },
/* 15*/ { BARCODE_LOGMARS, -1, "SAMPLE 1", -1, 0, 1, 159, "MIL-STD-1189 Rev. B Figure 2 top", /* 24*/ { BARCODE_LOGMARS, -1, "SAMPLE 1", -1, 0, 1, 159, "MIL-STD-1189 Rev. B Figure 2 top",
"100010111011101010111010111000101110101000101110111011101010001010111011101000101011101010001110111010111000101010001110101110101110100010101110100010111011101" "100010111011101010111010111000101110101000101110111011101010001010111011101000101011101010001110111010111000101010001110101110101110100010101110100010111011101"
}, },
/* 16*/ { BARCODE_LOGMARS, 1, "12345/ABCDE", -1, 0, 1, 223, "MIL-STD-1189 Rev. B Section 6.2.1 check character example; verified manually against tec-it", /* 25*/ { BARCODE_LOGMARS, 1, "12345/ABCDE", -1, 0, 1, 223, "MIL-STD-1189 Rev. B Section 6.2.1 check character example; verified manually against tec-it",
"1000101110111010111010001010111010111000101011101110111000101010101000111010111011101000111010101000100010100010111010100010111010111010001011101110111010001010101011100010111011101011100010101010111011100010100010111011101" "1000101110111010111010001010111010111000101011101110111000101010101000111010111011101000111010101000100010100010111010100010111010111010001011101110111010001010101011100010111011101011100010101010111011100010100010111011101"
}, },
/* 17*/ { BARCODE_CODE93, -1, "1A", -1, 0, 1, 55, "Verified manually against tec-it", /* 26*/ { BARCODE_CODE93, -1, "1A", -1, 0, 1, 55, "Verified manually against tec-it",
"1010111101010010001101010001101000101001110101010111101" "1010111101010010001101010001101000101001110101010111101"
}, },
/* 18*/ { BARCODE_CODE93, -1, "TEST93", -1, 0, 1, 91, "Verified manually against tec-it", /* 27*/ { BARCODE_CODE93, -1, "TEST93", -1, 0, 1, 91, "Verified manually against tec-it",
"1010111101101001101100100101101011001101001101000010101010000101011101101001000101010111101" "1010111101101001101100100101101011001101001101000010101010000101011101101001000101010111101"
}, },
/* 19*/ { BARCODE_CODE93, -1, "\000a\177", 3, 0, 1, 91, "Verified manually against tec-it", /* 28*/ { BARCODE_CODE93, -1, "\000a\177", 3, 0, 1, 91, "Verified manually against tec-it",
"1010111101110110101100101101001100101101010001110110101101001101011011101010010001010111101" "1010111101110110101100101101001100101101010001110110101101001101011011101010010001010111101"
}, },
/* 20*/ { BARCODE_PZN, -1, "1234567", -1, 0, 1, 142, "Example from IFA Info Code 39 EN V2.1; verified manually against tec-it", /* 29*/ { BARCODE_PZN, -1, "1234567", -1, 0, 1, 142, "Example from IFA Info Code 39 EN V2.1; verified manually against tec-it",
"1001011011010100101011011011010010101101011001010110110110010101010100110101101101001101010101100110101010100101101101101001011010100101101101" "1001011011010100101011011011010010101101011001010110110110010101010100110101101101001101010101100110101010100101101101101001011010100101101101"
}, },
/* 21*/ { BARCODE_PZN, -1, "2758089", -1, 0, 1, 142, "Example from IFA Info Check Digit Calculations EN 15 July 2019; verified manually against tec-it", /* 30*/ { BARCODE_PZN, -1, "2758089", -1, 0, 1, 142, "Example from IFA Info Check Digit Calculations EN 15 July 2019; verified manually against tec-it",
"1001011011010100101011011010110010101101010010110110110100110101011010010110101010011011010110100101101010110010110101011001011010100101101101" "1001011011010100101011011010110010101101010010110110110100110101011010010110101010011011010110100101101010110010110101011001011010100101101101"
}, },
/* 22*/ { BARCODE_VIN, -1, "1FTCR10UXTPA78180", -1, 0, 1, 246, "https://www.vinquery.com/img/vinbarcode/vinbarcode4.jpg", /* 31*/ { BARCODE_VIN, -1, "1FTCR10UXTPA78180", -1, 0, 1, 246, "https://www.vinquery.com/img/vinbarcode/vinbarcode4.jpg",
"100101101101011010010101101011011001010101011011001011011010010101101010110010110100101011010100110110101100101010110100101101011010101101100101011011010010110101001011010100101101101101001011010110100101011011010010110101010011011010100101101101" "100101101101011010010101101011011001010101011011001011011010010101101010110010110100101011010100110110101100101010110100101101011010101101100101011011010010110101001011010100101101101101001011010110100101011011010010110101010011011010100101101101"
}, },
/* 23*/ { BARCODE_VIN, 1, "2FTPX28L0XCA15511", -1, 0, 1, 259, "With Import 'I' prefix; https://www.vinquery.com/img/vinbarcode/vinbarcode1.jpg", /* 32*/ { BARCODE_VIN, 1, "2FTPX28L0XCA15511", -1, 0, 1, 259, "With Import 'I' prefix; https://www.vinquery.com/img/vinbarcode/vinbarcode1.jpg",
"1001011011010101101001101010110010101101011011001010101011011001010110110100101001011010110101100101011011010010110101011010100110101001101101010010110101101101101001010110101001011011010010101101101001101010110100110101011010010101101101001010110100101101101" "1001011011010101101001101010110010101101011011001010101011011001010110110100101001011010110101100101011011010010110101011010100110101001101101010010110101101101101001010110101001011011010010101101101001101010110100110101011010010101101101001010110100101101101"
}, },
/* 24*/ { BARCODE_HIBC_39, -1, "A123BJC5D6E71", -1, 0, 1, 271, "ANSI/HIBC 2.6 - 2016 Figure 2, same", /* 33*/ { BARCODE_HIBC_39, -1, "A123BJC5D6E71", -1, 0, 1, 271, "ANSI/HIBC 2.6 - 2016 Figure 2, same",
"1000101110111010100010100010001011101010001011101110100010101110101110001010111011101110001010101011101000101110101011100011101011101110100010101110100011101010101011100010111010111000111010101110101110001010101000101110111011101000101011101010100011101110100010111011101" "1000101110111010100010100010001011101010001011101110100010101110101110001010111011101110001010101011101000101110101011100011101011101110100010101110100011101010101011100010111010111000111010101110101110001010101000101110111011101000101011101010100011101110100010111011101"
}, },
/* 25*/ { BARCODE_HIBC_39, -1, "$$52001510X3G", -1, 0, 1, 271, "ANSI/HIBC 2.6 - 2016 Figure 6, same", /* 34*/ { BARCODE_HIBC_39, -1, "$$52001510X3G", -1, 0, 1, 271, "ANSI/HIBC 2.6 - 2016 Figure 6, same",
"1000101110111010100010100010001010001000100010101000100010001010111010001110101010111000101011101010001110111010101000111011101011101000101011101110100011101010111010001010111010100011101110101000101110101110111011100010101010101000111011101010111000101110100010111011101" "1000101110111010100010100010001010001000100010101000100010001010111010001110101010111000101011101010001110111010101000111011101011101000101011101110100011101010111010001010111010100011101110101000101110101110111011100010101010101000111011101010111000101110100010111011101"
}, },
}; };

View File

@ -47,22 +47,24 @@ static void test_large(int index, int debug) {
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE128, "A", 60, 0, 695 }, /* 0*/ { BARCODE_CODE128, "A", 60, 0, 695 },
/* 1*/ { BARCODE_CODE128, "A", 61, ZINT_ERROR_TOO_LONG, -1 }, /* 1*/ { BARCODE_CODE128, "A", 61, ZINT_ERROR_TOO_LONG, -1 },
/* 2*/ { BARCODE_CODE128, "\351A", 40, 0, 695 }, /* 2*/ { BARCODE_CODE128, "A", 161, ZINT_ERROR_TOO_LONG, -1 },
/* 3*/ { BARCODE_CODE128, "\351A", 41, ZINT_ERROR_TOO_LONG, -1 }, // 41 chars (+ 20 shifts) /* 3*/ { BARCODE_CODE128, "\351A", 40, 0, 695 },
/* 4*/ { BARCODE_CODE128, "0", 120, 0, 695 }, /* 4*/ { BARCODE_CODE128, "\351A", 41, ZINT_ERROR_TOO_LONG, -1 }, // 41 chars (+ 20 shifts)
/* 5*/ { BARCODE_CODE128, "0", 121, ZINT_ERROR_TOO_LONG, -1 }, /* 5*/ { BARCODE_CODE128, "0", 120, 0, 695 },
/* 6*/ { BARCODE_CODE128B, "A", 60, 0, 695 }, /* 6*/ { BARCODE_CODE128, "0", 121, ZINT_ERROR_TOO_LONG, -1 },
/* 7*/ { BARCODE_CODE128B, "A", 61, ZINT_ERROR_TOO_LONG, -1 }, /* 7*/ { BARCODE_CODE128B, "A", 60, 0, 695 },
/* 8*/ { BARCODE_CODE128B, "0", 60, 0, 695 }, /* 8*/ { BARCODE_CODE128B, "A", 61, ZINT_ERROR_TOO_LONG, -1 },
/* 9*/ { BARCODE_CODE128B, "0", 61, ZINT_ERROR_TOO_LONG, -1 }, /* 9*/ { BARCODE_CODE128B, "0", 60, 0, 695 },
/* 10*/ { BARCODE_GS1_128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890", -1, 0, 706 }, // 116 nos + 3 FNC1s /* 10*/ { BARCODE_CODE128B, "0", 61, ZINT_ERROR_TOO_LONG, -1 },
/* 11*/ { BARCODE_GS1_128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234[93]1234", -1, ZINT_ERROR_TOO_LONG, -1 }, // 116 nos + 4 FNC1s /* 11*/ { BARCODE_GS1_128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890", -1, 0, 706 }, // 116 nos + 3 FNC1s
/* 12*/ { BARCODE_EAN14, "1234567890123", -1, 0, 134 }, /* 12*/ { BARCODE_GS1_128, "[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234567890[92]1234[93]1234", -1, ZINT_ERROR_TOO_LONG, -1 }, // 116 nos + 4 FNC1s
/* 13*/ { BARCODE_EAN14, "12345678901234", -1, ZINT_ERROR_TOO_LONG, -1 }, /* 13*/ { BARCODE_GS1_128, "A", 161, ZINT_ERROR_TOO_LONG, -1 },
/* 14*/ { BARCODE_NVE18, "12345678901234567", -1, 0, 156 }, /* 14*/ { BARCODE_EAN14, "1234567890123", -1, 0, 134 },
/* 15*/ { BARCODE_NVE18, "123456789012345678", -1, ZINT_ERROR_TOO_LONG, -1 }, /* 15*/ { BARCODE_EAN14, "12345678901234", -1, ZINT_ERROR_TOO_LONG, -1 },
/* 16*/ { BARCODE_HIBC_128, "1", 110, 0, 684 }, /* 16*/ { BARCODE_NVE18, "12345678901234567", -1, 0, 156 },
/* 17*/ { BARCODE_HIBC_128, "1", 111, ZINT_ERROR_TOO_LONG, -1 }, /* 17*/ { BARCODE_NVE18, "123456789012345678", -1, ZINT_ERROR_TOO_LONG, -1 },
/* 18*/ { BARCODE_HIBC_128, "1", 110, 0, 684 },
/* 19*/ { BARCODE_HIBC_128, "1", 111, ZINT_ERROR_TOO_LONG, -1 },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -113,6 +115,7 @@ static void test_hrt_cpy_iso8859_1(int index, int debug) {
char *comment; char *comment;
}; };
// NBSP U+00A0 (\240, 160), UTF-8 C2A0 (\302\240) // NBSP U+00A0 (\240, 160), UTF-8 C2A0 (\302\240)
// ¡ U+00A1 (\241, 161), UTF-8 C2A1 (\302\241)
// é U+00E9 (\351, 233), UTF-8 C3A9 // é U+00E9 (\351, 233), UTF-8 C3A9
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
@ -123,13 +126,21 @@ static void test_hrt_cpy_iso8859_1(int index, int debug) {
/* 4*/ { "\241\242\243\244\257\260", -1, 12, "¡¢£¤¯°", "" }, /* 4*/ { "\241\242\243\244\257\260", -1, 12, "¡¢£¤¯°", "" },
/* 5*/ { "\276\277\300\337\377", -1, 10, "¾¿Àßÿ", "" }, /* 5*/ { "\276\277\300\337\377", -1, 10, "¾¿Àßÿ", "" },
/* 6*/ { "\351", -1, 2, "é", "" }, /* 6*/ { "\351", -1, 2, "é", "" },
/* 7*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "126 \351" }, /* 7*/ { "\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241", -1, 126, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", "63 \241" },
/* 8*/ { "a\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 127, "aééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "a + 126 \351" }, /* 8*/ { "a\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241", -1, 127, "a¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", "a + 63 \241" },
/* 9*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351a", -1, 127, "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééa", "126 \351 + a" }, /* 9*/ { "\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241a", -1, 127, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡a", "63 \241 + a" },
/* 10*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "127 \351 (truncated)" }, /* 10*/ { "\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241", -1, 126, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", "64 \241 (truncated)" },
/* 11*/ { "a\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 127, "aééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "a + 127 \351 (truncated)" }, /* 11*/ { "a\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241", -1, 127, "a¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", "a + 64 \241 (truncated)" },
/* 12*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351a", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "127 \351 + a (truncated)" }, /* 12*/ { "\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241a", -1, 126, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", "64 \241 + a (truncated)" },
/* 13*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "128 \351 (truncated)" }, /* 13*/ { "\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241\241", -1, 126, "¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡", "65 \241 (truncated)" },
/* 14*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "63 \351" },
/* 15*/ { "a\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 127, "aééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "a + 63 \351" },
/* 16*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351a", -1, 127, "éééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééa", "63 \351 + a" },
/* 17*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "64 \351 (truncated)" },
/* 18*/ { "a\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 127, "aééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "a + 64 \351 (truncated)" },
/* 19*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351a", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "64 \351 + a (truncated)" },
/* 20*/ { "\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351\351", -1, 126, "ééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééééé", "65 \351 (truncated)" },
/* 21*/ { "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, 127, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "128 A (truncated)" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -148,8 +159,10 @@ static void test_hrt_cpy_iso8859_1(int index, int debug) {
length = data[i].length == -1 ? (int) strlen(data[i].data) : data[i].length; length = data[i].length == -1 ? (int) strlen(data[i].data) : data[i].length;
ret = hrt_cpy_iso8859_1(&symbol, (unsigned char *) data[i].data, length); ret = hrt_cpy_iso8859_1(&symbol, (unsigned char *) data[i].data, length);
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) {
for (j = 0; j < ret; j++) { for (j = 0; j < ret; j++) {
//fprintf(stderr, "symbol.text[%d] %2X\n", j, symbol.text[j]); fprintf(stderr, "symbol.text[%d] %2X\n", j, symbol.text[j]);
}
} }
assert_equal(ret, data[i].ret, "i:%d ret %d != %d\n", i, ret, data[i].ret); assert_equal(ret, data[i].ret, "i:%d ret %d != %d\n", i, ret, data[i].ret);
assert_equal(ret, (int) ustrlen(symbol.text), "i:%d ret %d != strlen %d\n", i, ret, (int) ustrlen(symbol.text)); assert_equal(ret, (int) ustrlen(symbol.text), "i:%d ret %d != strlen %d\n", i, ret, (int) ustrlen(symbol.text));
@ -328,6 +341,7 @@ static void test_input(int index, int generate, int debug) {
/* 31*/ { UNICODE_MODE, "aééééébcdeéé", -1, 0, 233, "(21) 104 65 100 100 73 73 73 73 73 100 100 66 67 68 69 100 73 100 73 19 106", "StartB a Latch é (5) Unlatch b c d e FNC4 é (2)" }, /* 31*/ { UNICODE_MODE, "aééééébcdeéé", -1, 0, 233, "(21) 104 65 100 100 73 73 73 73 73 100 100 66 67 68 69 100 73 100 73 19 106", "StartB a Latch é (5) Unlatch b c d e FNC4 é (2)" },
/* 32*/ { UNICODE_MODE, "aééééébcdeééé", -1, 0, 244, "(22) 104 65 100 100 73 73 73 73 73 100 66 100 67 100 68 100 69 73 73 73 83 106", "StartB a Latch é (5) Shift b Shift c Shift d Shift e é (3)" }, /* 32*/ { UNICODE_MODE, "aééééébcdeééé", -1, 0, 244, "(22) 104 65 100 100 73 73 73 73 73 100 66 100 67 100 68 100 69 73 73 73 83 106", "StartB a Latch é (5) Shift b Shift c Shift d Shift e é (3)" },
/* 33*/ { UNICODE_MODE, "aééééébcdefééé", -1, 0, 255, "(23) 104 65 100 100 73 73 73 73 73 100 100 66 67 68 69 70 100 100 73 73 73 67 106", "StartB a Latch é (5) Unlatch b c d e f Latch é (3)" }, /* 33*/ { UNICODE_MODE, "aééééébcdefééé", -1, 0, 255, "(23) 104 65 100 100 73 73 73 73 73 100 100 66 67 68 69 70 100 100 73 73 73 67 106", "StartB a Latch é (5) Unlatch b c d e f Latch é (3)" },
/* 34*/ { DATA_MODE, "\200\200\200\200\200\101\060\060\060\060\101\200", -1, 0, 222, "(20) 103 101 101 64 64 64 64 64 101 101 33 99 0 0 101 33 101 64 73 106", "StartA Latch PAD (4) Unlatch A CodeC 00 00 CodeA A FNC4 PAD" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -499,6 +513,58 @@ static void test_hibc_input(int index, int generate, int debug) {
testFinish(); testFinish();
} }
static void test_ean14_input(int index, int generate, int debug) {
struct item {
char *data;
int ret;
int expected_width;
char *expected;
char *comment;
};
struct item data[] = {
/* 0*/ { "12345678901234", ZINT_ERROR_TOO_LONG, -1, "Error 347: Input too long (13 character maximum)", "" },
/* 1*/ { "A", ZINT_ERROR_INVALID_DATA, -1, "Error 348: Invalid character in data (digits only)", "" },
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
struct zint_symbol *symbol;
char escaped[1024];
testStart("test_ean14_input");
for (i = 0; i < data_size; i++) {
if (index != -1 && i != index) continue;
symbol = ZBarcode_Create();
assert_nonnull(symbol, "Symbol not created\n");
symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
length = testUtilSetSymbol(symbol, BARCODE_EAN14, UNICODE_MODE, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
if (generate) {
printf(" /*%3d*/ { \"%s\", %s, %d, \"%s\", \"%s\" },\n",
i, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
testUtilErrorName(data[i].ret), symbol->width, symbol->errtxt, data[i].comment);
} else {
if (ret < ZINT_ERROR) {
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, data[i].data);
}
assert_zero(strcmp(symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
}
ZBarcode_Delete(symbol);
}
testFinish();
}
static void test_dpd_input(int index, int generate, int debug) { static void test_dpd_input(int index, int generate, int debug) {
struct item { struct item {
@ -584,118 +650,124 @@ static void test_encode(int index, int generate, int debug) {
/* 3*/ { BARCODE_CODE128B, UNICODE_MODE, "1234567890", 0, 1, 145, 1, "", /* 3*/ { BARCODE_CODE128B, UNICODE_MODE, "1234567890", 0, 1, 145, 1, "",
"1101001000010011100110110011100101100101110011001001110110111001001100111010011101101110111010011001110010110010011101100101000110001100011101011" "1101001000010011100110110011100101100101110011001001110110111001001100111010011101101110111010011001110010110010011101100101000110001100011101011"
}, },
/* 4*/ { BARCODE_GS1_128, GS1_MODE, "[8018]950110153123456781", 0, 1, 167, 1, "GGS Figure 2.5.2-1", /* 4*/ { BARCODE_CODE128, DATA_MODE, "\101\102\103\104\105\106\200\200\200\200\200", 0, 1, 178, 1, "",
"1101000010010100011000100010110001000100011010110001000100011010001000110001011101011110111010111101010000110010100001100101000011001010000110010100001100110110110001100011101011"
},
/* 5*/ { BARCODE_GS1_128, GS1_MODE, "[8018]950110153123456781", 0, 1, 167, 1, "GGS Figure 2.5.2-1",
"11010011100111101011101010011110011001110010101111010001100110110011001000100101110011001101100011011101101110101110110001000010110010010111100101111001001100011101011" "11010011100111101011101010011110011001110010101111010001100110110011001000100101110011001101100011011101101110101110110001000010110010010111100101111001001100011101011"
}, },
/* 5*/ { BARCODE_GS1_128, GS1_MODE, "[415]5412345678908[3911]710125", 0, 1, 189, 1, "GGS Figure 2.6.6-1 top", /* 6*/ { BARCODE_GS1_128, GS1_MODE, "[415]5412345678908[3911]710125", 0, 1, 189, 1, "GGS Figure 2.6.6-1 top",
"110100111001111010111011000100010111010001101100010001011101101110101110110001000010110011011011110100011001001101000100011000100100100110100001100110110011100101100100001001101100011101011" "110100111001111010111011000100010111010001101100010001011101101110101110110001000010110011011011110100011001001101000100011000100100100110100001100110110011100101100100001001101100011101011"
}, },
/* 6*/ { BARCODE_GS1_128, GS1_MODE, "[12]010425[8020]ABC123", 0, 1, 189, 1, "GGS Figure 2.6.6-1 bottom", /* 7*/ { BARCODE_GS1_128, GS1_MODE, "[12]010425[8020]ABC123", 0, 1, 189, 1, "GGS Figure 2.6.6-1 bottom",
"110100111001111010111010110011100110011011001001000110011100101100101001111001100100111010111101110101000110001000101100010001000110100111001101100111001011001011100110010111001100011101011" "110100111001111010111010110011100110011011001001000110011100101100101001111001100100111010111101110101000110001000101100010001000110100111001101100111001011001011100110010111001100011101011"
}, },
/* 7*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153005812345678901", 0, 1, 211, 1, "GGS Figure 2.6.9-1", /* 8*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153005812345678901", 0, 1, 211, 1, "GGS Figure 2.6.9-1",
"1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001110110001010110011100100010110001110001011011000010100110111101101011110111010011100110101110110001100011101011" "1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001110110001010110011100100010110001110001011011000010100110111101101011110111010011100110101110110001100011101011"
}, },
/* 8*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153006567890543210987", 0, 1, 211, 1, "GGS Figure 2.6.9-2", /* 9*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153006567890543210987", 0, 1, 211, 1, "GGS Figure 2.6.9-2",
"1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001001011000010000101100110110111101000100110010110001110110111001001100100100011110010100101110011001100011101011" "1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001001011000010000101100110110111101000100110010110001110110111001001100100100011110010100101110011001100011101011"
}, },
/* 9*/ { BARCODE_GS1_128, GS1_MODE, "[253]95011015300657654321", 0, 1, 189, 1, "GGS Figure 2.6.9-3", /* 10*/ { BARCODE_GS1_128, GS1_MODE, "[253]95011015300657654321", 0, 1, 189, 1, "GGS Figure 2.6.9-3",
"110100111001111010111011100101100110100010001100010111011000100100110011011001101110111011011001100100101100001100101000011101011000110001101101011110111010011100110111001001101100011101011" "110100111001111010111011100101100110100010001100010111011000100100110011011001101110111011011001100100101100001100101000011101011000110001101101011110111010011100110111001001101100011101011"
}, },
/* 10*/ { BARCODE_GS1_128, GS1_MODE, "[253]9501101530065123456", 0, 1, 167, 1, "GGS Figure 2.6.9-4", /* 11*/ { BARCODE_GS1_128, GS1_MODE, "[253]9501101530065123456", 0, 1, 167, 1, "GGS Figure 2.6.9-4",
"11010011100111101011101110010110011010001000110001011101100010010011001101100110111011101101100110010010110000101100111001000101100011100010110100011110101100011101011" "11010011100111101011101110010110011010001000110001011101100010010011001101100110111011101101100110010010110000101100111001000101100011100010110100011110101100011101011"
}, },
/* 11*/ { BARCODE_GS1_128, GS1_MODE, "[01]10857674002017[10]1152KMB", 0, 1, 211, 1, "GGS Figure 4.15.1-1", /* 12*/ { BARCODE_GS1_128, GS1_MODE, "[01]10857674002017[10]1152KMB", 0, 1, 211, 1, "GGS Figure 4.15.1-1",
"1101001110011110101110110011011001100100010010011110010110010100001000011001011011001100110010011101001110011011001000100110001001001101110001010111101110101100011101011101100010001011000100111001101100011101011" "1101001110011110101110110011011001100100010010011110010110010100001000011001011011001100110010011101001110011011001000100110001001001101110001010111101110101100011101011101100010001011000100111001101100011101011"
}, },
/* 12*/ { BARCODE_GS1_128, GS1_MODE, "[01]09501101530003", 0, 1, 134, 1, "GGS Figure 5.1-3", /* 13*/ { BARCODE_GS1_128, GS1_MODE, "[01]09501101530003", 0, 1, 134, 1, "GGS Figure 5.1-3",
"11010011100111101011101100110110011001001000110001011101100010010011001101100110111011101101100110010010011000100110100001100011101011" "11010011100111101011101100110110011001001000110001011101100010010011001101100110111011101101100110010010011000100110100001100011101011"
}, },
/* 13*/ { BARCODE_GS1_128, GS1_MODE, "[00]395123451234567895", 0, 1, 156, 1, "GGS Figure 5.4.2-1", /* 14*/ { BARCODE_GS1_128, GS1_MODE, "[00]395123451234567895", 0, 1, 156, 1, "GGS Figure 5.4.2-1",
"110100111001111010111011011001100110100010001101110100011101101110101110110001011001110010001011000111000101101100001010010111101000101111000101100011101011" "110100111001111010111011011001100110100010001101110100011101101110101110110001011001110010001011000111000101101100001010010111101000101111000101100011101011"
}, },
/* 14*/ { BARCODE_GS1_128, GS1_MODE, "[00]006141411234567890", 0, 1, 156, 1, "GGS Figure 6.6.5-1. (and Figures 6.6.5-3 bottom, 6.6.5-4 bottom)", /* 15*/ { BARCODE_GS1_128, GS1_MODE, "[00]006141411234567890", 0, 1, 156, 1, "GGS Figure 6.6.5-1. (and Figures 6.6.5-3 bottom, 6.6.5-4 bottom)",
"110100111001111010111011011001100110110011001100100001011000100010110001000101011001110010001011000111000101101100001010011011110110110110110001100011101011" "110100111001111010111011011001100110110011001100100001011000100010110001000101011001110010001011000111000101101100001010011011110110110110110001100011101011"
}, },
/* 15*/ { BARCODE_GS1_128, GS1_MODE, "[403]402621[401]950110153B01001", 0, 1, 266, 0, "GGS Figure 6.6.5-2 top **NOT SAME**, different encodation for zint, BWIPP & standard, same codeword count", /* 16*/ { BARCODE_GS1_128, GS1_MODE, "[403]402621[401]950110153B01001", 0, 1, 266, 0, "GGS Figure 6.6.5-2 top **NOT SAME**, different encodation for zint, BWIPP & standard, same codeword count",
"11010011100111101011101100010100010001011000110011001101111000101010111101110100111001101011101111011110101110110001010001100101110011000101110110001001001100110110011011101110101111011101000101100010011101100101110111101100100010011001101100101001111001100011101011" "11010011100111101011101100010100010001011000110011001101111000101010111101110100111001101011101111011110101110110001010001100101110011000101110110001001001100110110011011101110101111011101000101100010011101100101110111101100100010011001101100101001111001100011101011"
}, },
/* 16*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011015300000011", 0, 1, 156, 1, "GGS Figure 6.6.5-2 bottom", /* 17*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011015300000011", 0, 1, 156, 1, "GGS Figure 6.6.5-2 bottom",
"110100111001111010111011011001100110100010001100010111011000100100110011011001101110111011011001100110110011001101100110011000100100100011101101100011101011" "110100111001111010111011011001100110100010001100010111011000100100110011011001101110111011011001100110110011001101100110011000100100100011101101100011101011"
}, },
/* 17*/ { BARCODE_GS1_128, GS1_MODE, "[420]45458", 0, 1, 90, 1, "GGS Figure 6.6.5-3 top", /* 18*/ { BARCODE_GS1_128, GS1_MODE, "[420]45458", 0, 1, 90, 1, "GGS Figure 6.6.5-3 top",
"110100111001111010111010110111000100100011001110101100011101100010111100100101100011101011" "110100111001111010111010110111000100100011001110101100011101100010111100100101100011101011"
}, },
/* 18*/ { BARCODE_GS1_128, GS1_MODE, "[02]00614141000418[15]210228[10]451214[37]20", 0, 1, 255, 1, "GGS Figure 6.6.5-4 top", /* 19*/ { BARCODE_GS1_128, GS1_MODE, "[02]00614141000418[15]210228[10]451214[37]20", 0, 1, 255, 1, "GGS Figure 6.6.5-4 top",
"110100111001111010111011001100110110110011001100100001011000100010110001000101101100110010010001100110011100101011100110011011100100110011001101110011010011001000100101110110001011001110010011001110111101011101000110100011001001110100011110101100011101011" "110100111001111010111011001100110110110011001100100001011000100010110001000101101100110010010001100110011100101011100110011011100100110011001101110011010011001000100101110110001011001110010011001110111101011101000110100011001001110100011110101100011101011"
}, },
/* 19*/ { BARCODE_GS1_128, GS1_MODE, "[420]87109", 0, 1, 90, 1, "GGS Figure 6.6.5-5 top", /* 20*/ { BARCODE_GS1_128, GS1_MODE, "[420]87109", 0, 1, 90, 1, "GGS Figure 6.6.5-5 top",
"110100111001111010111010110111000100011001001001101000011001001000111001001101100011101011" "110100111001111010111010110111000100011001001001101000011001001000111001001101100011101011"
}, },
/* 20*/ { BARCODE_GS1_128, GS1_MODE, "[90]1528", 0, 1, 79, 1, "GGS Figure 6.6.5-5 middle", /* 21*/ { BARCODE_GS1_128, GS1_MODE, "[90]1528", 0, 1, 79, 1, "GGS Figure 6.6.5-5 middle",
"1101001110011110101110110111101101011100110011100110100111001100101100011101011" "1101001110011110101110110111101101011100110011100110100111001100101100011101011"
}, },
/* 21*/ { BARCODE_GS1_128, GS1_MODE, "[00]000521775138957172", 0, 1, 156, 1, "GGS Figure 6.6.5-5 bottom", /* 22*/ { BARCODE_GS1_128, GS1_MODE, "[00]000521775138957172", 0, 1, 156, 1, "GGS Figure 6.6.5-5 bottom",
"110100111001111010111011011001100110110011001000100110011011100100111101110101101110100010001100010101111010001001101000010011000010110011011001100011101011" "110100111001111010111011011001100110110011001000100110011011100100111101110101101110100010001100010101111010001001101000010011000010110011011001100011101011"
}, },
/* 22*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6",
"110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011"
},
/* 23*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6", /* 23*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6",
"110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011" "110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011"
}, },
/* 24*/ { BARCODE_GS1_128, GS1_MODE, "[401]931234518430GR", 0, 1, 167, 1, "GGS Figure 6.6.5-7 top", /* 24*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6",
"110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011"
},
/* 25*/ { BARCODE_GS1_128, GS1_MODE, "[401]931234518430GR", 0, 1, 167, 1, "GGS Figure 6.6.5-7 top",
"11010011100111101011101100010100011001011100110110001101110110111010111011000110011100101011000111010111101110100111011001101000100011000101110100110111001100011101011" "11010011100111101011101100010100011001011100110110001101110110111010111011000110011100101011000111010111101110100111011001101000100011000101110100110111001100011101011"
}, },
/* 25*/ { BARCODE_GS1_128, GS1_MODE, "[00]093123450000000012", 0, 1, 156, 1, "GGS Figure 6.6.5-7 bottom", /* 26*/ { BARCODE_GS1_128, GS1_MODE, "[00]093123450000000012", 0, 1, 156, 1, "GGS Figure 6.6.5-7 bottom",
"110100111001111010111011011001100110010010001101100011011101101110101110110001101100110011011001100110110011001101100110010110011100110111010001100011101011" "110100111001111010111011011001100110010010001101100011011101101110101110110001101100110011011001100110110011001101100110010110011100110111010001100011101011"
}, },
/* 26*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903", 0, 1, 134, 1, "GGS Figure 7.8.5.1-1 1st", /* 27*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903", 0, 1, 134, 1, "GGS Figure 7.8.5.1-1 1st",
"11010011100111101011101100110110010111101000110011011001110110111010111011000100001011001101101111010010011000110110001101100011101011" "11010011100111101011101100110110010111101000110011011001110110111010111011000100001011001101101111010010011000110110001101100011101011"
}, },
/* 27*/ { BARCODE_GS1_128, GS1_MODE, "[3102]000400", 0, 1, 101, 1, "GGS Figure 7.8.5.1-1 2nd", /* 28*/ { BARCODE_GS1_128, GS1_MODE, "[3102]000400", 0, 1, 101, 1, "GGS Figure 7.8.5.1-1 2nd",
"11010011100111101011101101100011011001100110110110011001001000110011011001100110110111101100011101011" "11010011100111101011101101100011011001100110110110011001001000110011011001100110110111101100011101011"
}, },
/* 28*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903[3102]000400", 0, 1, 189, 1, "GGS Figure 7.8.5.1-2", /* 29*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903[3102]000400", 0, 1, 189, 1, "GGS Figure 7.8.5.1-2",
"110100111001111010111011001101100101111010001100110110011101101110101110110001000010110011011011110100100110001101100011011001100110110110011001001000110011011001100100100110001100011101011" "110100111001111010111011001101100101111010001100110110011101101110101110110001000010110011011011110100100110001101100011011001100110110110011001001000110011011001100100100110001100011101011"
}, },
/* 29*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365", 0, 1, 101, 1, "GGS Figure 7.8.5.2-1 1st", /* 30*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365", 0, 1, 101, 1, "GGS Figure 7.8.5.2-1 1st",
"11010011100111101011101010011110010001001100110110011001001001100010010110000100100001101100011101011" "11010011100111101011101010011110010001001100110110011001001001100010010110000100100001101100011101011"
}, },
/* 30*/ { BARCODE_GS1_128, GS1_MODE, "[10]123456", 0, 1, 90, 1, "GGS Figure 7.8.5.2-1 2nd", /* 31*/ { BARCODE_GS1_128, GS1_MODE, "[10]123456", 0, 1, 90, 1, "GGS Figure 7.8.5.2-1 2nd",
"110100111001111010111011001000100101100111001000101100011100010110110010000101100011101011" "110100111001111010111011001000100101100111001000101100011100010110110010000101100011101011"
}, },
/* 31*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365[10]123456", 0, 1, 156, 1, "GGS Figure 7.8.5.2-2", /* 32*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365[10]123456", 0, 1, 156, 1, "GGS Figure 7.8.5.2-2",
"110100111001111010111010100111100100010011001101100110010010011000100101100001111010111011001000100101100111001000101100011100010110101100001001100011101011" "110100111001111010111010100111100100010011001101100110010010011000100101100001111010111011001000100101100111001000101100011100010110101100001001100011101011"
}, },
/* 32*/ { BARCODE_GS1_128, GS1_MODE, "[403]27653113+99000900090010", 0, 1, 222, 1, "DHL Leitcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html", /* 33*/ { BARCODE_GS1_128, GS1_MODE, "[403]27653113+99000900090010", 0, 1, 222, 1, "DHL Leitcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html",
"110100111001111010111011000101000110001101101100101000011011101110110001001001011110111011001011100110001001001011101111010111011110110110011001100100100011011001100110010010001101100110011001000100110001000101100011101011" "110100111001111010111011000101000110001101101100101000011011101110110001001001011110111011001011100110001001001011101111010111011110110110011001100100100011011001100110010010001101100110011001000100110001000101100011101011"
}, },
/* 33*/ { BARCODE_GS1_128, GS1_MODE, "[00]340433935039756615", 0, 1, 156, 1, "DHL Identcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html", /* 34*/ { BARCODE_GS1_128, GS1_MODE, "[00]340433935039756615", 0, 1, 156, 1, "DHL Identcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html",
"110100111001111010111011011001100100010110001001000110010100011000101000111101100010111011010001000110000100101001000011010111001100100111001101100011101011" "110100111001111010111011011001100100010110001001000110010100011000101000111101100010111011010001000110000100101001000011010111001100100111001101100011101011"
}, },
/* 34*/ { BARCODE_EAN14, GS1_MODE, "4070071967072", 0, 1, 134, 1, "Verified manually against tec-it", /* 35*/ { BARCODE_GS1_128, GS1_MODE, "[90]ABCDEfGHI", 0, 1, 167, 0, "Shift A; BWIPP different encodation, same codeword count",
"11010010000111101011101110010110010011101100101000110001000101100010001000110101100010001000110100010110000100110100010001100010100011000100010110010011101100011101011"
},
/* 36*/ { BARCODE_EAN14, GS1_MODE, "4070071967072", 0, 1, 134, 1, "Verified manually against tec-it",
"11010011100111101011101100110110011000101000101100001001001100010011001011100100001011001001100010011001001110110111001001100011101011" "11010011100111101011101100110110011000101000101100001001001100010011001011100100001011001001100010011001001110110111001001100011101011"
}, },
/* 35*/ { BARCODE_NVE18, GS1_MODE, "40700000071967072", 0, 1, 156, 1, "Verified manually against tec-it", /* 37*/ { BARCODE_NVE18, GS1_MODE, "40700000071967072", 0, 1, 156, 1, "Verified manually against tec-it",
"110100111001111010111011011001100110001010001011000010011011001100110110011001001100010011001011100100001011001001100010011001001110110111011101100011101011" "110100111001111010111011011001100110001010001011000010011011001100110110011001001100010011001011100100001011001001100010011001001110110111011101100011101011"
}, },
/* 36*/ { BARCODE_HIBC_128, UNICODE_MODE, "83278F8G9H0J2G", 0, 1, 211, 1, "ANSI/HIBC 2.6 - 2016 Section 4.1, not same, uses different encoding (eg begins StartA instead of StartB)", /* 38*/ { BARCODE_HIBC_128, UNICODE_MODE, "83278F8G9H0J2G", 0, 1, 211, 1, "ANSI/HIBC 2.6 - 2016 Section 4.1, not same, uses different encoding (eg begins StartA instead of StartB)",
"1101001000011000100100111010011001011101111011000110110110000101001011110111010001100010111010011001101000100011100101100110001010001001110110010110111000110011100101101000100010001001100111101010001100011101011" "1101001000011000100100111010011001011101111011000110110110000101001011110111010001100010111010011001101000100011100101100110001010001001110110010110111000110011100101101000100010001001100111101010001100011101011"
}, },
/* 37*/ { BARCODE_HIBC_128, UNICODE_MODE, "A123BJC5D6E71", 0, 1, 200, 1, "ANSI/HIBC 2.6 - 2016 Figure 1, same", /* 39*/ { BARCODE_HIBC_128, UNICODE_MODE, "A123BJC5D6E71", 0, 1, 200, 1, "ANSI/HIBC 2.6 - 2016 Figure 1, same",
"11010010000110001001001010001100010011100110110011100101100101110010001011000101101110001000100011011011100100101100010001100111010010001101000111011011101001110011011010001000110001101101100011101011" "11010010000110001001001010001100010011100110110011100101100101110010001011000101101110001000100011011011100100101100010001100111010010001101000111011011101001110011011010001000110001101101100011101011"
}, },
/* 38*/ { BARCODE_HIBC_128, UNICODE_MODE, "$$52001510X3G", 0, 1, 178, 1, "ANSI/HIBC 2.6 - 2016 Figure 5, same", /* 40*/ { BARCODE_HIBC_128, UNICODE_MODE, "$$52001510X3G", 0, 1, 178, 1, "ANSI/HIBC 2.6 - 2016 Figure 5, same",
"1101001000011000100100100100011001001000110010111011110110111000101101100110010111001100110010001001011110111011100010110110010111001101000100010110001000100011110101100011101011" "1101001000011000100100100100011001001000110010111011110110111000101101100110010111001100110010001001011110111011100010110110010111001101000100010110001000100011110101100011101011"
}, },
/* 39*/ { BARCODE_DPD, UNICODE_MODE, "%000393206219912345678101040", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustrations 2, 7, 8, same; NOTE: correct HRT given by Illustration 7 only", /* 41*/ { BARCODE_DPD, UNICODE_MODE, "%000393206219912345678101040", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustrations 2, 7, 8, same; NOTE: correct HRT given by Illustration 7 only",
"1101001000010001001100100111011001011101111011011001100110100010001100011011010011001000110111001001011101111010110011100100010110001110001011011000010100110010001001100100010011000101000101011110001100011101011" "1101001000010001001100100111011001011101111011011001100110100010001100011011010011001000110111001001011101111010110011100100010110001110001011011000010100110010001001100100010011000101000101011110001100011101011"
}, },
/* 40*/ { BARCODE_DPD, UNICODE_MODE, "%007110601782532948375101276", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustration 6 **NOT SAME** HRT incorrect, also uses CodeA and inefficient encoding; verified against tec-it", /* 42*/ { BARCODE_DPD, UNICODE_MODE, "%007110601782532948375101276", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustration 6 **NOT SAME** HRT incorrect, also uses CodeA and inefficient encoding; verified against tec-it",
"1101001000010001001100100111011001011101111010011000100110001001001001100100011001101100110000101001110010110011000110110100010111101011110010011000010010110010001001011001110011001010000100010111101100011101011" "1101001000010001001100100111011001011101111010011000100110001001001001100100011001101100110000101001110010110011000110110100010111101011110010011000010010110010001001011001110011001010000100010111101100011101011"
}, },
/* 41*/ { BARCODE_DPD, UNICODE_MODE, "0123456789012345678901234567", 0, 1, 189, 1, "DPDAPPD 4.0.2 - Illustration 9, same (allowing for literal HRT)", /* 43*/ { BARCODE_DPD, UNICODE_MODE, "0123456789012345678901234567", 0, 1, 189, 1, "DPDAPPD 4.0.2 - Illustration 9, same (allowing for literal HRT)",
"110100111001100110110011101101110101110110001000010110011011011110110011011001110110111010111011000100001011001101101111011001101100111011011101011101100010000101100101011110001100011101011" "110100111001100110110011101101110101110110001000010110011011011110110011011001110110111010111011000100001011001101101111011001101100111011011101011101100010000101100101011110001100011101011"
}, },
}; };
@ -770,6 +842,7 @@ int main(int argc, char *argv[]) {
{ "test_input", test_input, 1, 1, 1 }, { "test_input", test_input, 1, 1, 1 },
{ "test_ean128_input", test_ean128_input, 1, 1, 1 }, { "test_ean128_input", test_ean128_input, 1, 1, 1 },
{ "test_hibc_input", test_hibc_input, 1, 1, 1 }, { "test_hibc_input", test_hibc_input, 1, 1, 1 },
{ "test_ean14_input", test_ean14_input, 1, 1, 1 },
{ "test_dpd_input", test_dpd_input, 1, 1, 1 }, { "test_dpd_input", test_dpd_input, 1, 1, 1 },
{ "test_encode", test_encode, 1, 1, 1 }, { "test_encode", test_encode, 1, 1, 1 },
}; };

View File

@ -46,6 +46,7 @@ static void test_large(int index, int debug) {
/* 1*/ { "A", 78, ZINT_ERROR_TOO_LONG, -1, -1 }, /* 1*/ { "A", 78, ZINT_ERROR_TOO_LONG, -1, -1 },
/* 2*/ { "0", 154, 0, 16, 70 }, // BS EN 12323:2005 4.1 (l) /* 2*/ { "0", 154, 0, 16, 70 }, // BS EN 12323:2005 4.1 (l)
/* 3*/ { "0", 155, ZINT_ERROR_TOO_LONG, -1, -1 }, /* 3*/ { "0", 155, ZINT_ERROR_TOO_LONG, -1, -1 },
/* 4*/ { "0", 161, ZINT_ERROR_TOO_LONG, -1, -1 },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;

View File

@ -804,6 +804,184 @@ static void test_utf8_to_eci_ucs2be(void) {
} }
}; };
static void test_utf8_to_eci_sjis(void) {
struct item {
int eci;
char *data;
int length;
int ret;
int expected_length;
};
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = {
/* 0*/ { 20, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", 32, 0, 32 },
/* 1*/ { 20, " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\177", 95, 0, 95 + 1 }, // Backslash goes to 2 byte
/* 2*/ { 20, "~", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for tilde
/* 3*/ { 20, "\302\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+0080
/* 4*/ { 20, "\302\241", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+00A1 Inverted exclaimation mark
/* 5*/ { 20, "\302\245", -1, 0, 1 }, // U+00A5 Yen goes to backslash
/* 6*/ { 20, "\302\277", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+00BF Inverted question mark
/* 7*/ { 20, "\303\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+00C0 À
/* 8*/ { 20, "\303\251", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+00E9 é
/* 9*/ { 20, "\312\262", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+03B2 β
/* 10*/ { 20, "\342\272\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+2E80 CJK RADICAL REPEAT
/* 11*/ { 20, "\343\200\200", -1, 0, 2 }, // U+3000 IDEOGRAPHIC SPACE
/* 12*/ { 20, "\343\200\204", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+3004 JAPANESE INDUSTRIAL STANDARD SYMBOL
/* 13*/ { 20, "\343\201\201", -1, 0, 2 }, //U+3041 HIRAGANA LETTER SMALL A
/* 14*/ { 20, "\357\277\277", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+FFFF
/* 15*/ { 20, "\357\277\276", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+FFFE (reversed BOM) not allowed
/* 16*/ { 20, "\355\240\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+D800 surrogate not allowed
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
testStart("test_utf8_to_eci_sjis");
for (i = 0; i < data_size; i++) {
int out_length, eci_length;
char dest[1024];
length = data[i].length != -1 ? data[i].length : (int) strlen(data[i].data);
out_length = length;
eci_length = get_eci_length(data[i].eci, (const unsigned char *) data[i].data, length);
assert_nonzero(eci_length + 1 <= 1024, "i:%d eci_length %d + 1 > 1024\n", i, eci_length);
ret = utf8_to_eci(data[i].eci, (const unsigned char *) data[i].data, (unsigned char *) dest, &out_length);
assert_equal(ret, data[i].ret, "i:%d utf8_to_eci ret %d != %d\n", i, ret, data[i].ret);
if (ret == 0) {
assert_equal(out_length, data[i].expected_length, "i:%d length %d != %d\n", i, out_length, data[i].expected_length);
assert_nonzero(out_length <= eci_length, "i:%d out_length %d > eci_length %d\n", i, out_length, eci_length);
}
}
};
static void test_utf8_to_eci_big5(void) {
struct item {
int eci;
char *data;
int length;
int ret;
int expected_length;
};
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = {
/* 0*/ { 28, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", 32, 0, 32 },
/* 1*/ { 28, " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177", 96, 0, 96 },
/* 2*/ { 28, "\302\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+0080
/* 3*/ { 28, "\343\200\200", -1, 0, 2 }, // U+3000 IDEOGRAPHIC SPACE
/* 4*/ { 28, "\357\277\277", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+FFFF
/* 5*/ { 28, "\357\277\276", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+FFFE (reversed BOM) not allowed
/* 6*/ { 28, "\355\240\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+D800 surrogate not allowed
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
testStart("test_utf8_to_eci_big5");
for (i = 0; i < data_size; i++) {
int out_length, eci_length;
char dest[1024];
length = data[i].length != -1 ? data[i].length : (int) strlen(data[i].data);
out_length = length;
eci_length = get_eci_length(data[i].eci, (const unsigned char *) data[i].data, length);
assert_nonzero(eci_length + 1 <= 1024, "i:%d eci_length %d + 1 > 1024\n", i, eci_length);
ret = utf8_to_eci(data[i].eci, (const unsigned char *) data[i].data, (unsigned char *) dest, &out_length);
assert_equal(ret, data[i].ret, "i:%d utf8_to_eci ret %d != %d\n", i, ret, data[i].ret);
if (ret == 0) {
assert_equal(out_length, data[i].expected_length, "i:%d length %d != %d\n", i, out_length, data[i].expected_length);
assert_nonzero(out_length <= eci_length, "i:%d out_length %d > eci_length %d\n", i, out_length, eci_length);
}
}
};
static void test_utf8_to_eci_gb2312(void) {
struct item {
int eci;
char *data;
int length;
int ret;
int expected_length;
};
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = {
/* 0*/ { 29, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", 32, 0, 32 },
/* 1*/ { 29, " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177", 96, 0, 96 },
/* 2*/ { 29, "\302\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+0080
/* 3*/ { 29, "\343\200\200", -1, 0, 2 }, // U+3000 IDEOGRAPHIC SPACE
/* 4*/ { 29, "\357\277\277", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+FFFF
/* 5*/ { 29, "\357\277\276", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+FFFE (reversed BOM) not allowed
/* 6*/ { 29, "\355\240\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+D800 surrogate not allowed
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
testStart("test_utf8_to_eci_gb2312");
for (i = 0; i < data_size; i++) {
int out_length, eci_length;
char dest[1024];
length = data[i].length != -1 ? data[i].length : (int) strlen(data[i].data);
out_length = length;
eci_length = get_eci_length(data[i].eci, (const unsigned char *) data[i].data, length);
assert_nonzero(eci_length + 1 <= 1024, "i:%d eci_length %d + 1 > 1024\n", i, eci_length);
ret = utf8_to_eci(data[i].eci, (const unsigned char *) data[i].data, (unsigned char *) dest, &out_length);
assert_equal(ret, data[i].ret, "i:%d utf8_to_eci ret %d != %d\n", i, ret, data[i].ret);
if (ret == 0) {
assert_equal(out_length, data[i].expected_length, "i:%d length %d != %d\n", i, out_length, data[i].expected_length);
assert_nonzero(out_length <= eci_length, "i:%d out_length %d > eci_length %d\n", i, out_length, eci_length);
}
}
};
static void test_utf8_to_eci_euc_kr(void) {
struct item {
int eci;
char *data;
int length;
int ret;
int expected_length;
};
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = {
/* 0*/ { 30, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", 32, 0, 32 },
/* 1*/ { 30, " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177", 96, 0, 96 },
/* 2*/ { 30, "\302\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+0080
/* 3*/ { 30, "\343\200\200", -1, 0, 2 }, // U+3000 IDEOGRAPHIC SPACE
/* 4*/ { 30, "\357\277\277", -1, ZINT_ERROR_INVALID_DATA, -1 }, // No mapping for U+FFFF
/* 5*/ { 30, "\357\277\276", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+FFFE (reversed BOM) not allowed
/* 6*/ { 30, "\355\240\200", -1, ZINT_ERROR_INVALID_DATA, -1 }, // U+D800 surrogate not allowed
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
testStart("test_utf8_to_eci_euc_kr");
for (i = 0; i < data_size; i++) {
int out_length, eci_length;
char dest[1024];
length = data[i].length != -1 ? data[i].length : (int) strlen(data[i].data);
out_length = length;
eci_length = get_eci_length(data[i].eci, (const unsigned char *) data[i].data, length);
assert_nonzero(eci_length + 1 <= 1024, "i:%d eci_length %d + 1 > 1024\n", i, eci_length);
ret = utf8_to_eci(data[i].eci, (const unsigned char *) data[i].data, (unsigned char *) dest, &out_length);
assert_equal(ret, data[i].ret, "i:%d utf8_to_eci ret %d != %d\n", i, ret, data[i].ret);
if (ret == 0) {
assert_equal(out_length, data[i].expected_length, "i:%d length %d != %d\n", i, out_length, data[i].expected_length);
assert_nonzero(out_length <= eci_length, "i:%d out_length %d > eci_length %d\n", i, out_length, eci_length);
}
}
};
static void test_get_best_eci(int index) { static void test_get_best_eci(int index) {
struct item { struct item {
@ -849,6 +1027,10 @@ int main(int argc, char *argv[]) {
{ "test_utf8_to_eci_sb", test_utf8_to_eci_sb, 1, 0, 0 }, { "test_utf8_to_eci_sb", test_utf8_to_eci_sb, 1, 0, 0 },
{ "test_utf8_to_eci_ascii", test_utf8_to_eci_ascii, 0, 0, 0 }, { "test_utf8_to_eci_ascii", test_utf8_to_eci_ascii, 0, 0, 0 },
{ "test_utf8_to_eci_ucs2be", test_utf8_to_eci_ucs2be, 0, 0, 0 }, { "test_utf8_to_eci_ucs2be", test_utf8_to_eci_ucs2be, 0, 0, 0 },
{ "test_utf8_to_eci_sjis", test_utf8_to_eci_sjis, 0, 0, 0 },
{ "test_utf8_to_eci_big5", test_utf8_to_eci_big5, 0, 0, 0 },
{ "test_utf8_to_eci_gb2312", test_utf8_to_eci_gb2312, 0, 0, 0 },
{ "test_utf8_to_eci_euc_kr", test_utf8_to_eci_euc_kr, 0, 0, 0 },
{ "test_get_best_eci", test_get_best_eci, 1, 0, 0 }, { "test_get_best_eci", test_get_best_eci, 1, 0, 0 },
}; };

View File

@ -37,8 +37,10 @@ static void test_print(int index, int generate, int debug) {
struct item { struct item {
int symbology; int symbology;
int input_mode; int input_mode;
int border_width;
int output_options; int output_options;
int whitespace_width; int whitespace_width;
int whitespace_height;
int option_1; int option_1;
int option_2; int option_2;
char *fgcolour; char *fgcolour;
@ -49,19 +51,21 @@ static void test_print(int index, int generate, int debug) {
char *comment; char *comment;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, BOLD_TEXT, -1, -1, -1, "", "", 0, "Égjpqy", "code128_egrave_bold.emf", "" }, /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, "", "", 0, "Égjpqy", "code128_egrave_bold.emf", "" },
/* 1*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, "147AD0", "FC9630", 0, "123", "telenum_fg_bg.emf", "" }, /* 1*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, "147AD0", "FC9630", 0, "123", "telenum_fg_bg.emf", "" },
/* 2*/ { BARCODE_ULTRA, -1, -1, 5, -1, -1, "147AD0", "FC9630", 0, "123", "ultracode_fg_bg.emf", "" }, /* 2*/ { BARCODE_ULTRA, -1, -1, -1, 5, -1, -1, -1, "147AD0", "FC9630", 0, "123", "ultracode_fg_bg.emf", "" },
/* 3*/ { BARCODE_EANX, -1, -1, -1, -1, -1, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2.emf", "" }, /* 3*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX, 2, 2, -1, -1, "FF0000", "0000FF", 0, "123", "ultracode_fg_bg_box2.emf", "" },
/* 4*/ { BARCODE_EANX, -1, -1, -1, -1, -1, "", "", 0, "210987654321+54321", "ean13_5addon_#185.emf", "#185 Byte count, font data, HeaderExtension1/2" }, /* 4*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2.emf", "" },
/* 5*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.emf", "" }, /* 5*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, "", "", 0, "210987654321+54321", "ean13_5addon_#185.emf", "#185 Byte count, font data, HeaderExtension1/2" },
/* 6*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, "", "", 0, "0123456+12", "upce_2addon.emf", "" }, /* 6*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.emf", "" },
/* 7*/ { BARCODE_UPCE, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, "", "", 0, "0123456+12", "upce_2addon_small_bold.emf", "" }, /* 7*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, "", "", 0, "0123456+12", "upce_2addon.emf", "" },
/* 8*/ { BARCODE_ITF14, -1, BOLD_TEXT, -1, -1, -1, "", "", 0, "123", "itf14_bold.emf", "" }, /* 8*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, "", "", 0, "0123456+12", "upce_2addon_small_bold.emf", "" },
/* 9*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, "", "", 90, "123", "code39_rotate_90.emf", "" }, /* 9*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, "", "", 0, "123", "itf14_bold.emf", "" },
/* 10*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, "", "", 180, "123", "code39_rotate_180.emf", "" }, /* 10*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, "", "", 90, "123", "code39_rotate_90.emf", "" },
/* 11*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, "", "", 270, "123", "code39_rotate_270.emf", "" }, /* 11*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, "", "", 180, "123", "code39_rotate_180.emf", "" },
/* 12*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185.emf", "#185 Maxicode scaling" }, /* 12*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, "", "", 270, "123", "code39_rotate_270.emf", "" },
/* 13*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185.emf", "#185 Maxicode scaling" },
/* 14*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg.emf", "" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -97,9 +101,15 @@ static void test_print(int index, int generate, int debug) {
assert_nonnull(symbol, "Symbol not created\n"); assert_nonnull(symbol, "Symbol not created\n");
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug); length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug);
if (data[i].border_width != -1) {
symbol->border_width = data[i].border_width;
}
if (data[i].whitespace_width != -1) { if (data[i].whitespace_width != -1) {
symbol->whitespace_width = data[i].whitespace_width; symbol->whitespace_width = data[i].whitespace_width;
} }
if (data[i].whitespace_height != -1) {
symbol->whitespace_height = data[i].whitespace_height;
}
if (*data[i].fgcolour) { if (*data[i].fgcolour) {
strcpy(symbol->fgcolour, data[i].fgcolour); strcpy(symbol->fgcolour, data[i].fgcolour);
} }
@ -117,9 +127,9 @@ static void test_print(int index, int generate, int debug) {
assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
if (generate) { if (generate) {
printf(" /*%3d*/ { %s, %s, %s, %d, %d, %d, \"%s\", \"%s\", %d, \"%s\", \"%s\" \"%s\" },\n", printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, \"%s\", \"%s\", %d, \"%s\", \"%s\", \"%s\" },\n",
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width,
testUtilOutputOptionsName(data[i].output_options), data[i].whitespace_width, testUtilOutputOptionsName(data[i].output_options), data[i].whitespace_width, data[i].whitespace_height,
data[i].option_1, data[i].option_2, data[i].fgcolour, data[i].bgcolour, data[i].rotate_angle, data[i].option_1, data[i].option_2, data[i].fgcolour, data[i].bgcolour, data[i].rotate_angle,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file, data[i].comment); testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file, data[i].comment);
ret = testUtilRename(symbol->outfile, expected_file); ret = testUtilRename(symbol->outfile, expected_file);
@ -145,10 +155,41 @@ static void test_print(int index, int generate, int debug) {
testFinish(); testFinish();
} }
INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle);
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
struct zint_vector vector = {0};
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.vector = &vector;
strcpy(symbol.outfile, "nosuch_dir/out.emf");
ret = emf_plot(&symbol, 0);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "emf_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = emf_plot(&symbol, 0);
printf(" - ignore (EMF to stdout)\n"); fflush(stdout);
assert_zero(ret, "emf_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
symbol.vector = NULL;
ret = emf_plot(&symbol, 0);
assert_equal(ret, ZINT_ERROR_INVALID_DATA, "emf_plot ret %d != ZINT_ERROR_INVALID_DATA (%d) (%s)\n", ret, ZINT_ERROR_INVALID_DATA, symbol.errtxt);
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_print", test_print, 1, 1, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_outfile", test_outfile, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -134,6 +134,13 @@ static void test_gb18030_wctomb_zint(void) {
int ret, ret2; int ret, ret2;
unsigned int val1_1, val1_2, val2_1, val2_2; unsigned int val1_1, val1_2, val2_1, val2_2;
unsigned int i; unsigned int i;
/* See: https://file.allitebooks.com/20160708/CJKV%20Information%20Processing.pdf (table 3-37, p.109, 2nd ed.) */
static int nonpua_nonbmp[] = {
0x20087, 0x20089, 0x200CC, 0x215D7, 0x2298F, 0x241FE
};
static unsigned int nonpua_nonbmp_vals[] = {
0xFE51, 0xFE52, 0xFE53, 0xFE6C, 0xFE76, 0xFE91
};
testStart("test_gb18030_wctomb_zint"); testStart("test_gb18030_wctomb_zint");
@ -151,6 +158,18 @@ static void test_gb18030_wctomb_zint(void) {
} }
} }
val1_1 = val1_2 = 0;
ret = gb18030_wctomb_zint(&val1_1, &val1_2, 0x110000); /* Invalid Unicode codepoint */
assert_zero(ret, "0x110000 ret %d != 0, val1_1 0x%04X, val1_2 0x%04X\n", ret, val1_1, val1_2);
for (i = 0; i < ARRAY_SIZE(nonpua_nonbmp); i++) {
val1_1 = val1_2 = 0;
ret = gb18030_wctomb_zint(&val1_1, &val1_2, nonpua_nonbmp[i]);
assert_equal(ret, 2, "i:%d 0x%04X ret %d != 2, val1_1 0x%04X, val1_2 0x%04X\n", (int) i, nonpua_nonbmp[i], ret, val1_1, val1_2);
assert_equal(val1_1, nonpua_nonbmp_vals[i], "i:%d 0x%04X val1_1 0x%04X != 0x%04X\n", (int) i, nonpua_nonbmp[i], val1_1, nonpua_nonbmp_vals[i]);
assert_zero(val1_2, "i:%d 0x%04X val1_2 0x%04X != 0\n", (int) i, nonpua_nonbmp[i], val1_2);
}
testFinish(); testFinish();
} }
@ -183,6 +202,9 @@ static void test_gb18030_utf8(int index) {
/* 6*/ { "", -1, 0, 1, { 0xA844 }, "GB18030.TXT mapping" }, /* 6*/ { "", -1, 0, 1, { 0xA844 }, "GB18030.TXT mapping" },
/* 7*/ { "", -1, 0, 1, { 0xA1AA }, "GB 18030 subset mapping" }, /* 7*/ { "", -1, 0, 1, { 0xA1AA }, "GB 18030 subset mapping" },
/* 8*/ { "aβc・·—é—Z", -1, 0, 10, { 'a', 0xA6C2, 'c', 0x8139, 0xA739, 0xA1A4, 0xA1AA, 0xA8A6, 0xA1AA, 'Z' }, "" }, /* 8*/ { "aβc・·—é—Z", -1, 0, 10, { 'a', 0xA6C2, 'c', 0x8139, 0xA739, 0xA1A4, 0xA1AA, 0xA8A6, 0xA1AA, 'Z' }, "" },
/* 9*/ { "\200", -1, ZINT_ERROR_INVALID_DATA, -1, {0}, "Invalid UTF-8" },
/* 10*/ { "\357\277\276", -1, 0, 2, { 0x8431, 0xA438 }, "U+FFFE (reversed BOM)" },
/* 11*/ { "\357\277\277", -1, 0, 2, { 0x8431, 0xA439 }, "U+FFFF" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;

View File

@ -121,6 +121,7 @@ static void test_gb2312_utf8(int index) {
/* 6*/ { "", -1, 0, 1, { 0xA1AA }, "GB2312.TXT mapping" }, /* 6*/ { "", -1, 0, 1, { 0xA1AA }, "GB2312.TXT mapping" },
/* 7*/ { "", -1, 0, 1, { 0xA1AA }, "GB 18030 subset mapping" }, /* 7*/ { "", -1, 0, 1, { 0xA1AA }, "GB 18030 subset mapping" },
/* 8*/ { "aβc・·—é—Z", -1, 0, 9, { 'a', 0xA6C2, 'c', 0xA1A4, 0xA1A4, 0xA1AA, 0xA8A6, 0xA1AA, 'Z' }, "" }, /* 8*/ { "aβc・·—é—Z", -1, 0, 9, { 'a', 0xA6C2, 'c', 0xA1A4, 0xA1A4, 0xA1AA, 0xA8A6, 0xA1AA, 'Z' }, "" },
/* 9*/ { "\200", -1, ZINT_ERROR_INVALID_DATA, -1, {0}, "Invalid UTF-8" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;

View File

@ -40,19 +40,21 @@ static void test_pixel_plot(int index, int debug) {
int height; int height;
char *pattern; char *pattern;
int repeat; int repeat;
int ret;
}; };
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
/* 0*/ { 1, 1, "1", 0 }, /* 0*/ { 1, 1, "1", 0, 0 },
/* 1*/ { 2, 1, "11", 0 }, /* 1*/ { 2, 1, "11", 0, 0 },
/* 2*/ { 3, 1, "101", 0 }, /* 2*/ { 3, 1, "101", 0, 0 },
/* 3*/ { 4, 1, "1010", 0 }, /* 3*/ { 4, 1, "1010", 0, 0 },
/* 4*/ { 5, 1, "10101", 0 }, /* 4*/ { 5, 1, "10101", 0, 0 },
/* 5*/ { 3, 2, "101010", 0 }, /* 5*/ { 3, 2, "101010", 0, 0 },
/* 6*/ { 3, 3, "101010101", 0 }, /* 6*/ { 3, 3, "101010101", 0, 0 },
/* 7*/ { 8, 2, "CBMWKRYGGYRKWMBC", 0 }, /* 7*/ { 8, 2, "CBMWKRYGGYRKWMBC", 0, 0 },
/* 8*/ { 20, 30, "WWCWBWMWRWYWGWKCCWCMCRCYCGCKBWBCBBMBRBYBGBKMWMCMBMMRMYMGMKRWRCRBRMRRYRGRKYWYCYBYMYRYYGYKGWGCGBGMGRGYGGKKWKCKBKMKRKYKGKK", 1 }, // Single LZW block, size 255 /* 8*/ { 20, 30, "WWCWBWMWRWYWGWKCCWCMCRCYCGCKBWBCBBMBRBYBGBKMWMCMBMMRMYMGMKRWRCRBRMRRYRGRKYWYCYBYMYRYYGYKGWGCGBGMGRGYGGKKWKCKBKMKRKYKGKK", 1, 0 }, // Single LZW block, size 255
/* 9*/ { 19, 32, "WWCWBWMWRWYWGWKCCWCMCRCYCGCKBWBCBBMBRBYBGBKMWMCMBMMRMYMGMKRWRCRBRMRRYRGRKYWYCYBYMYRYYGYKGWGCGBGMGRGYGGKKWK", 1 }, // Two LZW blocks, last size 1 /* 9*/ { 19, 32, "WWCWBWMWRWYWGWKCCWCMCRCYCGCKBWBCBBMBRBYBGBKMWMCMBMMRMYMGMKRWRCRBRMRRYRGRKYWYCYBYMYRYYGYKGWGCGBGMGRGYGGKKWK", 1, 0 }, // Two LZW blocks, last size 1
/* 10*/ { 1, 1, "D", 0, ZINT_ERROR_INVALID_DATA },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, ret; int i, ret;
@ -62,12 +64,9 @@ static void test_pixel_plot(int index, int debug) {
char data_buf[19 * 32 + 1]; // 19 * 32 == 608 char data_buf[19 * 32 + 1]; // 19 * 32 == 608
testStart("test_pixel_plot"); int have_identify = testUtilHaveIdentify();
if (!testUtilHaveIdentify()) { testStart("test_pixel_plot");
testSkip("ImageMagick identify not available");
return;
}
for (i = 0; i < data_size; i++) { for (i = 0; i < data_size; i++) {
int size; int size;
@ -96,12 +95,21 @@ static void test_pixel_plot(int index, int debug) {
symbol->bitmap = (unsigned char *) data_buf; symbol->bitmap = (unsigned char *) data_buf;
ret = gif_pixel_plot(symbol, (unsigned char *) data_buf); ret = gif_pixel_plot(symbol, (unsigned char *) data_buf);
assert_zero(ret, "i:%d gif_pixel_plot ret %d != 0 (%s)\n", i, ret, symbol->errtxt); assert_equal(ret, data[i].ret, "i:%d gif_pixel_plot ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
if (ret < ZINT_ERROR) {
if (have_identify) {
ret = testUtilVerifyIdentify(symbol->outfile, debug); ret = testUtilVerifyIdentify(symbol->outfile, debug);
assert_zero(ret, "i:%d identify %s ret %d != 0\n", i, symbol->outfile, ret); assert_zero(ret, "i:%d identify %s ret %d != 0\n", i, symbol->outfile, ret);
}
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile); assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile);
}
} else {
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
(void) remove(symbol->outfile);
}
}
symbol->bitmap = NULL; symbol->bitmap = NULL;
@ -115,6 +123,8 @@ static void test_print(int index, int generate, int debug) {
struct item { struct item {
int symbology; int symbology;
int border_width;
int output_options;
int whitespace_width; int whitespace_width;
int whitespace_height; int whitespace_height;
int option_1; int option_1;
@ -127,26 +137,29 @@ static void test_print(int index, int generate, int debug) {
char *expected_file; char *expected_file;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 0, 0, "", "", "12", "dotcode_1.0.gif" }, /* 0*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12", "dotcode_1.0.gif" },
/* 1*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 0, 0.1, "", "", "12", "dotcode_1.0_ds0.1.gif" }, /* 1*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", "12", "dotcode_1.0_ds0.1.gif" },
/* 2*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 0, 1.1, "", "", "12", "dotcode_1.0_ds1.1.gif" }, /* 2*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", "12", "dotcode_1.0_ds1.1.gif" },
/* 3*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 1.5, 0, "", "", "12", "dotcode_1.5.gif" }, /* 3*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", "12", "dotcode_1.5.gif" },
/* 4*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 1.5, 0.4, "", "", "12", "dotcode_1.5_ds0.4.gif" }, /* 4*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", "12", "dotcode_1.5_ds0.4.gif" },
/* 5*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 1.5, 1.1, "", "", "12", "dotcode_1.5_ds1.1.gif" }, /* 5*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", "12", "dotcode_1.5_ds1.1.gif" },
/* 6*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 1.5, 2.1, "", "", "12", "dotcode_1.5_ds2.1.gif" }, /* 6*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", "12", "dotcode_1.5_ds2.1.gif" },
/* 7*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 2, 0, "", "", "12", "dotcode_2.0.gif" }, /* 7*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 2, 0, "", "", "12", "dotcode_2.0.gif" },
/* 8*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 2, 0.9, "", "", "12", "dotcode_2.0_ds0.9.gif" }, /* 8*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", "12", "dotcode_2.0_ds0.9.gif" },
/* 9*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 2, 1.1, "", "", "12", "dotcode_2.0_ds1.1.gif" }, /* 9*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", "12", "dotcode_2.0_ds1.1.gif" },
/* 10*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 3, 0, "", "", "12", "dotcode_3.0.gif" }, /* 10*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 3, 0, "", "", "12", "dotcode_3.0.gif" },
/* 11*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 3, 0.4, "", "", "12", "dotcode_3.0_ds0.4.gif" }, /* 11*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", "12", "dotcode_3.0_ds0.4.gif" },
/* 12*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 3, 1.1, "", "", "12", "dotcode_3.0_ds1.1.gif" }, /* 12*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", "12", "dotcode_3.0_ds1.1.gif" },
/* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 3.5, 0, "", "", "12", "dotcode_3.5.gif" }, /* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", "12", "dotcode_3.5.gif" },
/* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 3.5, 0.4, "", "", "12", "dotcode_3.5_ds0.4.gif" }, /* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", "12", "dotcode_3.5_ds0.4.gif" },
/* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 3.5, 1.1, "", "", "12", "dotcode_3.5_ds1.1.gif" }, /* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", "12", "dotcode_3.5_ds1.1.gif" },
/* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 5, 0, "", "", "12", "dotcode_5.0.gif" }, /* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 5, 0, "", "", "12", "dotcode_5.0.gif" },
/* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 5, 0.2, "", "", "12", "dotcode_5.0_ds0.2.gif" }, /* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", "12", "dotcode_5.0_ds0.2.gif" },
/* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 5, 1.1, "", "", "12", "dotcode_5.0_ds1.1.gif" }, /* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", "12", "dotcode_5.0_ds1.1.gif" },
/* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, 5, 1.7, "", "", "12", "dotcode_5.0_ds1.7.gif" }, /* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", "12", "dotcode_5.0_ds1.7.gif" },
/* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, "2674C344", "FDFFC2CC", "12", "dotcode_bgfgalpha.gif" },
/* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, "00000000", "FFFFFF00", "12", "dotcode_bgfgtrans.gif" },
/* 22*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, 0, 0, "0000FF", "FF0000", "12", "ultra_fgbg_hvwsp1_box1.gif" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -178,7 +191,10 @@ static void test_print(int index, int generate, int debug) {
symbol = ZBarcode_Create(); symbol = ZBarcode_Create();
assert_nonnull(symbol, "Symbol not created\n"); assert_nonnull(symbol, "Symbol not created\n");
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug); length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug);
if (data[i].border_width != -1) {
symbol->border_width = data[i].border_width;
}
if (data[i].whitespace_width != -1) { if (data[i].whitespace_width != -1) {
symbol->whitespace_width = data[i].whitespace_width; symbol->whitespace_width = data[i].whitespace_width;
} }
@ -208,8 +224,9 @@ static void test_print(int index, int generate, int debug) {
assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
if (generate) { if (generate) {
printf(" /*%3d*/ { %s, %d, %d, %d, %d, %.5g, %.5g, \"%s\", \"%s\", \"%s\", \"%s\" },\n", printf(" /*%3d*/ { %s, %d, %s, %d, %d, %d, %d, %.5g, %.5g, \"%s\", \"%s\", \"%s\", \"%s\" },\n",
i, testUtilBarcodeName(data[i].symbology), data[i].whitespace_width, data[i].whitespace_height, i, testUtilBarcodeName(data[i].symbology), data[i].border_width, testUtilOutputOptionsName(data[i].output_options),
data[i].whitespace_width, data[i].whitespace_height,
data[i].option_1, data[i].option_2, data[i].scale, data[i].dot_size, data[i].fgcolour, data[i].bgcolour, data[i].option_1, data[i].option_2, data[i].scale, data[i].dot_size, data[i].fgcolour, data[i].bgcolour,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file); testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file);
ret = testUtilRename(symbol->outfile, expected_file); ret = testUtilRename(symbol->outfile, expected_file);
@ -233,11 +250,37 @@ static void test_print(int index, int generate, int debug) {
testFinish(); testFinish();
} }
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
unsigned char data[] = { "1" };
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.bitmap = data;
symbol.bitmap_width = symbol.bitmap_height = 1;
strcpy(symbol.outfile, "nosuch_dir/out.gif");
ret = gif_pixel_plot(&symbol, data);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "gif_pixel_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = gif_pixel_plot(&symbol, data);
printf(" - ignore (GIF to stdout)\n"); fflush(stdout);
assert_zero(ret, "gif_pixel_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_pixel_plot", test_pixel_plot, 1, 0, 1 }, { "test_pixel_plot", test_pixel_plot, 1, 0, 1 },
{ "test_print", test_print, 1, 1, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_outfile", test_outfile, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -357,6 +357,7 @@ static void test_escape_char_process(int index, int generate, int debug) {
for (i = 0; i < data_size; i++) { for (i = 0; i < data_size; i++) {
if (index != -1 && i != index) continue; if (index != -1 && i != index) continue;
if ((debug & ZINT_DEBUG_TEST_PRINT) && !(debug & ZINT_DEBUG_TEST_LESS_NOISY)) printf("i:%d\n", i);
symbol = ZBarcode_Create(); symbol = ZBarcode_Create();
assert_nonnull(symbol, "Symbol not created\n"); assert_nonnull(symbol, "Symbol not created\n");

View File

@ -31,41 +31,50 @@
#include "testcommon.h" #include "testcommon.h"
static void test_pcx(int index, int debug) { static void test_print(int index, int generate, int debug) {
struct item { struct item {
int symbology; int symbology;
int border_width;
int output_options;
int whitespace_width;
int whitespace_height;
int option_1; int option_1;
int option_2; int option_2;
char *fgcolour; char *fgcolour;
char *bgcolour; char *bgcolour;
float scale; float scale;
char *data; char *data;
char *expected_file;
}; };
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE128, -1, -1, "", "", 0, "AIM" }, /* 0*/ { BARCODE_GRIDMATRIX, -1, -1, -1, -1, -1, -1, "C3C3C3", "", 0.75, "Grid Matrix", "gridmatrix_fg_0.75.pcx" },
/* 1*/ { BARCODE_QRCODE, 2, 1, "", "", 0, "1234567890" }, /* 1*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, -1, 20, "FFFFFF", "000000", 0, "1234567890123456789012345678901234567890", "codeblockf_reverse.pcx" },
/* 2*/ { BARCODE_DOTCODE, -1, -1, "", "", 0, "2741" }, /* 2*/ { BARCODE_QRCODE, -1, -1, -1, -1, 2, 1, "", "D2E3F4", 0, "1234567890", "qr_bg.pcx" },
/* 3*/ { BARCODE_MAXICODE, -1, -1, "", "", 0, "1" }, /* 3*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, "FF0000", "0000FF", 0, "ULTRACODE_123456789!", "ultra_fg_bg_hvwsp1_box1.pcx" },
/* 4*/ { BARCODE_GRIDMATRIX, -1, -1, "", "", 0.75, "Grid Matrix" },
/* 5*/ { BARCODE_CODABLOCKF, -1, 20, "FFFFFF", "000000", 0, "1234567890123456789012345678901234567890" },
/* 6*/ { BARCODE_CODE128, -1, -1, "C3C3C3", "", 0, "AIM" },
/* 7*/ { BARCODE_QRCODE, 2, 1, "", "D2E3F4", 0, "1234567890" },
/* 8*/ { BARCODE_DOTCODE, -1, -1, "C2C100", "E0E1F2", 0, "2741" },
/* 9*/ { BARCODE_ULTRA, -1, -1, "", "", 0, "ULTRACODE_123456789!" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
struct zint_symbol *symbol; struct zint_symbol *symbol;
char *filename = "out.pcx"; const char *data_dir = "/backend/tests/data/pcx";
char *pcx = "out.pcx";
char expected_file[4096];
char escaped[1024];
int escaped_size = 1024;
int have_identify = testUtilHaveIdentify();
testStart("test_pcx"); testStart("test_pcx");
if (!testUtilHaveIdentify()) { if (generate) {
testSkip("ImageMagick identify not available"); char data_dir_path[1024];
return; assert_nonzero(testUtilDataPath(data_dir_path, sizeof(data_dir_path), data_dir, NULL), "testUtilDataPath(%s) == 0\n", data_dir);
if (!testUtilDirExists(data_dir_path)) {
ret = testUtilMkDir(data_dir_path);
assert_zero(ret, "testUtilMkDir(%s) ret %d != 0 (%d: %s)\n", data_dir_path, ret, errno, strerror(errno));
}
} }
for (i = 0; i < data_size; i++) { for (i = 0; i < data_size; i++) {
@ -75,12 +84,15 @@ static void test_pcx(int index, int debug) {
symbol = ZBarcode_Create(); symbol = ZBarcode_Create();
assert_nonnull(symbol, "Symbol not created\n"); assert_nonnull(symbol, "Symbol not created\n");
symbol->symbology = data[i].symbology; length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug);
if (data[i].option_1 != -1) { if (data[i].border_width != -1) {
symbol->option_1 = data[i].option_1; symbol->border_width = data[i].border_width;
} }
if (data[i].option_2 != -1) { if (data[i].whitespace_width != -1) {
symbol->option_2 = data[i].option_2; symbol->whitespace_width = data[i].whitespace_width;
}
if (data[i].whitespace_height != -1) {
symbol->whitespace_height = data[i].whitespace_height;
} }
if (*data[i].fgcolour) { if (*data[i].fgcolour) {
strcpy(symbol->fgcolour, data[i].fgcolour); strcpy(symbol->fgcolour, data[i].fgcolour);
@ -93,19 +105,35 @@ static void test_pcx(int index, int debug) {
} }
symbol->debug |= debug; symbol->debug |= debug;
length = (int) strlen(data[i].data);
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length); ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
assert_zero(ret, "i:%d %s ZBarcode_Encode ret %d != 0 %s\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt); assert_zero(ret, "i:%d %s ZBarcode_Encode ret %d != 0 %s\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt);
strcpy(symbol->outfile, filename); strcpy(symbol->outfile, pcx);
ret = ZBarcode_Print(symbol, 0); ret = ZBarcode_Print(symbol, 0);
assert_zero(ret, "i:%d %s ZBarcode_Print %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret); assert_zero(ret, "i:%d %s ZBarcode_Print %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret);
ret = testUtilVerifyIdentify(symbol->outfile, debug); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
assert_zero(ret, "i:%d %s identify %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret);
if (generate) {
printf(" /*%3d*/ { %s, %d, %s, %d, %d, %d, %d, \"%s\", \"%s\", \"%s\", \"%s\"},\n",
i, testUtilBarcodeName(data[i].symbology), data[i].border_width, testUtilOutputOptionsName(data[i].output_options),
data[i].whitespace_width, data[i].whitespace_height,
data[i].option_1, data[i].option_2, data[i].fgcolour, data[i].bgcolour,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file);
ret = testUtilRename(symbol->outfile, expected_file);
assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0 (%d: %s)\n", i, symbol->outfile, expected_file, ret, errno, strerror(errno));
if (have_identify) {
ret = testUtilVerifyIdentify(expected_file, debug);
assert_zero(ret, "i:%d %s identify %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), expected_file, ret);
}
} else {
assert_nonzero(testUtilExists(symbol->outfile), "i:%d testUtilExists(%s) == 0\n", i, symbol->outfile);
assert_nonzero(testUtilExists(expected_file), "i:%d testUtilExists(%s) == 0\n", i, expected_file);
ret = testUtilCmpBins(symbol->outfile, expected_file);
assert_zero(ret, "i:%d %s testUtilCmpBins(%s, %s) %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret);
assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile); assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile);
}
ZBarcode_Delete(symbol); ZBarcode_Delete(symbol);
} }
@ -113,10 +141,38 @@ static void test_pcx(int index, int debug) {
testFinish(); testFinish();
} }
INTERNAL int pcx_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf);
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
unsigned char data[] = { "1" };
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.bitmap = data;
symbol.bitmap_width = symbol.bitmap_height = 1;
strcpy(symbol.outfile, "nosuch_dir/out.pcx");
ret = pcx_pixel_plot(&symbol, data);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "pcx_pixel_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = pcx_pixel_plot(&symbol, data);
printf(" - ignore (PCX to stdout)\n"); fflush(stdout);
assert_zero(ret, "pcx_pixel_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_pcx", test_pcx, 1, 0, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_outfile", test_outfile, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -30,6 +30,7 @@
/* vim: set ts=4 sw=4 et : */ /* vim: set ts=4 sw=4 et : */
#include "testcommon.h" #include "testcommon.h"
#include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf); INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf);
@ -41,16 +42,17 @@ static void test_pixel_plot(int index, int debug) {
int height; int height;
char *pattern; char *pattern;
int repeat; int repeat;
int ret;
}; };
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
/* 0*/ { 1, 1, "1", 0 }, /* 0*/ { 1, 1, "1", 0, 0 },
/* 1*/ { 2, 1, "11", 0 }, /* 1*/ { 2, 1, "11", 0, 0 },
/* 2*/ { 2, 2, "10", 1 }, /* 2*/ { 2, 2, "10", 1, 0 },
/* 3*/ { 3, 1, "101", 0 }, /* 3*/ { 3, 1, "101", 0, 0 },
/* 4*/ { 3, 2, "101010", 0 }, /* 4*/ { 3, 2, "101010", 0, 0 },
/* 5*/ { 3, 3, "101010101", 0 }, /* 5*/ { 3, 3, "101010101", 0, 0 },
/* 6*/ { 8, 2, "CBMWKRYGGYRKWMBC", 0 }, /* 6*/ { 8, 2, "CBMWKRYGGYRKWMBC", 0, 0 },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, ret; int i, ret;
@ -60,12 +62,9 @@ static void test_pixel_plot(int index, int debug) {
char data_buf[8 * 2 + 1]; char data_buf[8 * 2 + 1];
testStart("test_pixel_plot"); int have_identify = testUtilHaveIdentify();
if (!testUtilHaveIdentify()) { testStart("test_pixel_plot");
testSkip("ImageMagick identify not available");
return;
}
for (i = 0; i < data_size; i++) { for (i = 0; i < data_size; i++) {
int size; int size;
@ -94,12 +93,21 @@ static void test_pixel_plot(int index, int debug) {
symbol->bitmap = (unsigned char *) data_buf; symbol->bitmap = (unsigned char *) data_buf;
ret = png_pixel_plot(symbol, (unsigned char *) data_buf); ret = png_pixel_plot(symbol, (unsigned char *) data_buf);
assert_zero(ret, "i:%d png_pixel_plot ret %d != 0 (%s)\n", i, ret, symbol->errtxt); assert_equal(ret, data[i].ret, "i:%d png_pixel_plot ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
if (ret < ZINT_ERROR) {
if (have_identify) {
ret = testUtilVerifyIdentify(symbol->outfile, debug); ret = testUtilVerifyIdentify(symbol->outfile, debug);
assert_zero(ret, "i:%d identify %s ret %d != 0\n", i, symbol->outfile, ret); assert_zero(ret, "i:%d identify %s ret %d != 0\n", i, symbol->outfile, ret);
}
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile); assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile);
}
} else {
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
(void) remove(symbol->outfile);
}
}
symbol->bitmap = NULL; symbol->bitmap = NULL;
@ -173,19 +181,21 @@ static void test_print(int index, int generate, int debug) {
/* 38*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, "", "FF000033", "12345", "", 0, "ultra_bgalpha.png", "" }, /* 38*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, "", "FF000033", "12345", "", 0, "ultra_bgalpha.png", "" },
/* 39*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, "0000007F", "FF0000", "12345", "", 0, "ultra_fgalpha.png", "" }, /* 39*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, "0000007F", "FF0000", "12345", "", 0, "ultra_fgalpha.png", "" },
/* 40*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "0000007F", "", "12345", "", 0, "ultra_fgalpha_nobg.png", "" }, /* 40*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "0000007F", "", "12345", "", 0, "ultra_fgalpha_nobg.png", "" },
/* 41*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "00FF007F", "BABDB6", "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" }, /* 41*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "", "", "12345", "", 0, "ultra_hvwsp1_box1.png", "" },
/* 42*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5f, "", "", "1", "", 0, "ultra_odd.png", "" }, /* 42*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "00FF007F", "BABDB6", "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" },
/* 43*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5f, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" }, /* 43*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, "", "", "1", "", 0, "ultra_odd.png", "" },
/* 44*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, 0, 0.7f, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" }, /* 44*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" },
/* 45*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.4f, "1111117F", "EEEEEEEE", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" }, /* 45*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, 0, 0.7, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" },
/* 46*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2.1f, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" }, /* 46*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.4, "1111117F", "EEEEEEEE", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" },
/* 47*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" }, /* 47*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2.1, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" },
/* 48*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, 0, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" }, /* 48*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" },
/* 49*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, 0, 2.0f, "", "", "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" }, /* 49*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, 0, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" },
/* 50*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, 2.0f, "", "", "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" }, /* 50*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, 0, 2.0f, "", "", "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" },
/* 51*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12345678909", "", 0, "dbar_ltd.png", "" }, /* 51*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, 2.0f, "", "", "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" },
/* 52*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5.0f, 0, "", "", "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" }, /* 52*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12345678909", "", 0, "dbar_ltd.png", "" },
/* 53*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75f, 0, "", "", "12345678901234567890", "", 0, "imail_height7.75.png", "" }, /* 53*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5.0, 0, "", "", "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" },
/* 54*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, 0, "", "", "12345678901234567890", "", 0, "imail_height7.75.png", "" },
/* 55*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567890", "", 0, "aztec.png", "" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -262,10 +272,10 @@ static void test_print(int index, int generate, int debug) {
assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
if (generate) { if (generate) {
printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %.5g, %.5g, \"%s\",\"%s\", \"%s\", \"%s\", \"%s\", \"%s\" },\n", printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %.5g, %.5g, \"%s\", \"%s\", \"%s\", \"%s\", %d, \"%s\", \"%s\" },\n",
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width, testUtilOutputOptionsName(data[i].output_options), i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width, testUtilOutputOptionsName(data[i].output_options),
data[i].whitespace_width, data[i].whitespace_height, data[i].show_hrt, data[i].option_1, data[i].option_2, data[i].height, data[i].scale, data[i].fgcolour, data[i].bgcolour, data[i].whitespace_width, data[i].whitespace_height, data[i].show_hrt, data[i].option_1, data[i].option_2, data[i].height, data[i].scale, data[i].fgcolour, data[i].bgcolour,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, data[i].expected_file, data[i].comment); testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, data[i].ret, data[i].expected_file, data[i].comment);
ret = testUtilRename(symbol->outfile, expected_file); ret = testUtilRename(symbol->outfile, expected_file);
assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret); assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret);
if (have_identify) { if (have_identify) {
@ -289,11 +299,95 @@ static void test_print(int index, int generate, int debug) {
testFinish(); testFinish();
} }
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
unsigned char data[] = { "1" };
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.bitmap = data;
symbol.bitmap_width = symbol.bitmap_height = 1;
strcpy(symbol.outfile, "nosuch_dir/out.png");
ret = png_pixel_plot(&symbol, data);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "png_pixel_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = png_pixel_plot(&symbol, data);
printf(" - ignore (PNG to stdout)\n"); fflush(stdout);
assert_zero(ret, "png_pixel_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
testFinish();
}
#include <png.h>
#include <setjmp.h>
struct wpng_error_type {
struct zint_symbol *symbol;
jmp_buf jmpbuf;
};
STATIC_UNLESS_ZINT_TEST void wpng_error_handler(png_structp png_ptr, png_const_charp msg);
static void test_wpng_error_handler(void) {
int ret;
char filename[] = "out.png";
FILE *fp;
struct wpng_error_type wpng_error;
struct zint_symbol symbol = {0};
png_structp png_ptr;
png_infop info_ptr;
testStart("test_wpng_error_handler");
wpng_error.symbol = &symbol;
// Create empty file
(void) remove(filename); // In case junk hanging around
fp = fopen(filename, "w+");
assert_nonnull(fp, "fopen(%s) failed\n", filename);
ret = fclose(fp);
assert_zero(ret, "fclose(%s) %d != 0\n", filename, ret);
// Re-open for read, which will cause libpng to error
fp = fopen(filename, "r");
assert_nonnull(fp, "fopen(%s) for read failed\n", filename);
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, &wpng_error, wpng_error_handler, NULL);
assert_nonnull(png_ptr, "png_create_write_struct failed\n");
info_ptr = png_create_info_struct(png_ptr);
assert_nonnull(info_ptr, "png_create_info_struct failed\n");
if (setjmp(wpng_error.jmpbuf)) {
png_destroy_write_struct(&png_ptr, &info_ptr);
ret = fclose(fp);
assert_zero(ret, "fclose(%s) %d != 0\n", filename, ret);
assert_nonnull(strstr(symbol.errtxt, "635: libpng error:"), "strstr(%s) NULL\n", symbol.errtxt);
assert_zero(remove(filename), "remove(%s) != 0 (%d: %s)\n", filename, errno, strerror(errno));
} else {
png_init_io(png_ptr, fp);
// This should fail and jmp to setjmp
png_write_info(png_ptr, info_ptr);
assert_zero(1, "libpng error setjmp failed\n");
}
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_pixel_plot", test_pixel_plot, 1, 0, 1 }, { "test_pixel_plot", test_pixel_plot, 1, 0, 1 },
{ "test_print", test_print, 1, 1, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_outfile", test_outfile, 0, 0, 0 },
{ "test_wpng_error_handler", test_wpng_error_handler, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -37,47 +37,56 @@ static void test_print(int index, int generate, int debug) {
struct item { struct item {
int symbology; int symbology;
int input_mode; int input_mode;
int border_width;
int output_options; int output_options;
int whitespace_width; int whitespace_width;
int whitespace_height;
int option_1; int option_1;
int option_2; int option_2;
float scale; float scale;
float dot_size; float dot_size;
char *fgcolour; char *fgcolour;
char *bgcolour; char *bgcolour;
int rotate_angle;
char *data; char *data;
char *expected_file; char *expected_file;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, BOLD_TEXT, -1, -1, -1, 0, 0, "", "", "Égjpqy", "code128_egrave_bold.eps" }, /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "Égjpqy", "code128_egrave_bold.eps" },
/* 1*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", "123", "code39_fg_bg.eps" }, /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 90, "Égjpqy", "code128_egrave_bold_rotate_90.eps" },
/* 2*/ { BARCODE_ULTRA, -1, 1, -1, -1, -1, 0, 0, "147AD0", "FC9630", "123", "ultra_fg_bg.eps" }, /* 2*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", 0, "123", "code39_fg_bg.eps" },
/* 3*/ { BARCODE_EANX, -1, -1, -1, -1, -1, 0, 0, "", "", "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" }, /* 3*/ { BARCODE_CODE39, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "147AD0EE", "FC9630", 0, "123", "code39_fgalpha_bg_cmyk.eps" },
/* 4*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, 0, 0, "", "", "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" }, /* 4*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", 0, "123", "ultra_fg_bg.eps" },
/* 5*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, 0, 0, "", "", "0123456+12345", "upce_5addon.eps" }, /* 5*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 2, -1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box.eps" },
/* 6*/ { BARCODE_UPCE, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, 0, 0, "", "", "0123456+12345", "upce_5addon_small_bold.eps" }, /* 6*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX | CMYK_COLOUR, 1, 1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box_cmyk.eps" },
/* 7*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, 0, 0, "", "", "A\\B)ç(D", "code128_escape_latin1.eps" }, /* 7*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" },
/* 8*/ { BARCODE_DBAR_LTD, -1, BOLD_TEXT, -1, -1, -1, 0, 0, "", "", "1501234567890", "dbar_ltd_24724_fig7_bold.eps" }, /* 8*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" },
/* 9*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 0, 0, "", "", "12", "dotcode_1.0.eps" }, /* 9*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon.eps" },
/* 10*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 0, 0.1, "", "", "12", "dotcode_1.0_ds0.1.eps" }, /* 10*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" },
/* 11*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 0, 1.1, "", "", "12", "dotcode_1.0_ds1.1.eps" }, /* 11*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)ç(D", "code128_escape_latin1.eps" },
/* 12*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 1.5, 0, "", "", "12", "dotcode_1.5.eps" }, /* 12*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" },
/* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", "12", "dotcode_1.5_ds0.4.eps" }, /* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" },
/* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", "12", "dotcode_1.5_ds1.1.eps" }, /* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" },
/* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", "12", "dotcode_1.5_ds2.1.eps" }, /* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" },
/* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 2, 0, "", "", "12", "dotcode_2.0.eps" }, /* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" },
/* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 2, 0.9, "", "", "12", "dotcode_2.0_ds0.9.eps" }, /* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" },
/* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 2, 1.1, "", "", "12", "dotcode_2.0_ds1.1.eps" }, /* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" },
/* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 3, 0, "", "", "12", "dotcode_3.0.eps" }, /* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" },
/* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 3, 0.4, "", "", "12", "dotcode_3.0_ds0.4.eps" }, /* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" },
/* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 3, 1.1, "", "", "12", "dotcode_3.0_ds1.1.eps" }, /* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" },
/* 22*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 3.5, 0, "", "", "12", "dotcode_3.5.eps" }, /* 22*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" },
/* 23*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", "12", "dotcode_3.5_ds0.4.eps" }, /* 23*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" },
/* 24*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", "12", "dotcode_3.5_ds1.1.eps" }, /* 24*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" },
/* 25*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 5, 0, "", "", "12", "dotcode_5.0.eps" }, /* 25*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" },
/* 26*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 5, 0.2, "", "", "12", "dotcode_5.0_ds0.2.eps" }, /* 26*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" },
/* 27*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 5, 1.1, "", "", "12", "dotcode_5.0_ds1.1.eps" }, /* 27*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" },
/* 28*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, 5, 1.7, "", "", "12", "dotcode_5.0_ds1.7.eps" }, /* 28*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" },
/* 29*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" },
/* 30*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" },
/* 31*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" },
/* 32*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" },
/* 33*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" },
/* 34*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -110,9 +119,15 @@ static void test_print(int index, int generate, int debug) {
assert_nonnull(symbol, "Symbol not created\n"); assert_nonnull(symbol, "Symbol not created\n");
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug); length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug);
if (data[i].border_width != -1) {
symbol->border_width = data[i].border_width;
}
if (data[i].whitespace_width != -1) { if (data[i].whitespace_width != -1) {
symbol->whitespace_width = data[i].whitespace_width; symbol->whitespace_width = data[i].whitespace_width;
} }
if (data[i].whitespace_height != -1) {
symbol->whitespace_height = data[i].whitespace_height;
}
if (data[i].scale) { if (data[i].scale) {
symbol->scale = data[i].scale; symbol->scale = data[i].scale;
} }
@ -130,15 +145,16 @@ static void test_print(int index, int generate, int debug) {
assert_zero(ret, "i:%d %s ZBarcode_Encode ret %d != 0 %s\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt); assert_zero(ret, "i:%d %s ZBarcode_Encode ret %d != 0 %s\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt);
strcpy(symbol->outfile, eps); strcpy(symbol->outfile, eps);
ret = ZBarcode_Print(symbol, 0); ret = ZBarcode_Print(symbol, data[i].rotate_angle);
assert_zero(ret, "i:%d %s ZBarcode_Print %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret); assert_zero(ret, "i:%d %s ZBarcode_Print %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret);
assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
if (generate) { if (generate) {
printf(" /*%3d*/ { %s, %s, %s, %d, %d, %d, %.5g, %.5g, \"%s\", \"%s\", \"%s\", \"%s\"},\n", printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %.5g, %.5g, \"%s\", \"%s\", %d, \"%s\", \"%s\"},\n",
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), testUtilOutputOptionsName(data[i].output_options), data[i].whitespace_width, i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width,
data[i].option_1, data[i].option_2, data[i].scale, data[i].dot_size, data[i].fgcolour, data[i].bgcolour, testUtilOutputOptionsName(data[i].output_options), data[i].whitespace_width, data[i].whitespace_height, data[i].option_1, data[i].option_2,
data[i].scale, data[i].dot_size, data[i].fgcolour, data[i].bgcolour, data[i].rotate_angle,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file); testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file);
ret = testUtilRename(symbol->outfile, expected_file); ret = testUtilRename(symbol->outfile, expected_file);
assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret); assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret);
@ -170,7 +186,7 @@ static void test_ps_convert(int index) {
char *expected; char *expected;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { "1\\(é)2€3", "1\\\\\\(\351\\)23" }, /* 0*/ { "1\\(é)2€3¿", "1\\\\\\(\351\\)23\277" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i; int i;
@ -190,11 +206,42 @@ static void test_ps_convert(int index) {
testFinish(); testFinish();
} }
INTERNAL int ps_plot(struct zint_symbol *symbol, int rotate_angle);
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
struct zint_vector vector = {0};
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.vector = &vector;
strcpy(symbol.outfile, "nosuch_dir/out.eps");
ret = ps_plot(&symbol, 0);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "ps_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = ps_plot(&symbol, 0);
printf(" - ignore (EPS to stdout)\n"); fflush(stdout);
assert_zero(ret, "ps_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
symbol.vector = NULL;
ret = ps_plot(&symbol, 0);
assert_equal(ret, ZINT_ERROR_INVALID_DATA, "ps_plot ret %d != ZINT_ERROR_INVALID_DATA (%d) (%s)\n", ret, ZINT_ERROR_INVALID_DATA, symbol.errtxt);
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_print", test_print, 1, 1, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_ps_convert", test_ps_convert, 1, 0, 0 }, { "test_ps_convert", test_ps_convert, 1, 0, 0 },
{ "test_outfile", test_outfile, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -110,7 +110,7 @@ static void test_generate(int generate) {
} }
} }
static void test_encoding(int index) { static void test_encoding(int index, int debug) {
struct item { struct item {
unsigned int prime_poly; unsigned int prime_poly;
@ -141,6 +141,7 @@ static void test_encoding(int index) {
/* 15*/ { 0x43, 20, 1, 42, { 47, 40, 57, 3, 1, 19, 41, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }, { 1, 15, 22, 28, 39, 17, 60, 5, 35, 35, 4, 8, 0, 32, 51, 45, 63, 53, 61, 14 } }, // MAXICODE Annex H Secondary even /* 15*/ { 0x43, 20, 1, 42, { 47, 40, 57, 3, 1, 19, 41, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }, { 1, 15, 22, 28, 39, 17, 60, 5, 35, 35, 4, 8, 0, 32, 51, 45, 63, 53, 61, 14 } }, // MAXICODE Annex H Secondary even
/* 16*/ { 0x11d, 10, 0, 16, { 0x10, 0x20, 0x0C, 0x56, 0x61, 0x80, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11 }, { 0xA5, 0x24, 0xD4, 0xC1, 0xED, 0x36, 0xC7, 0x87, 0x2C, 0x55 } }, // QRCODE Annex I.2 /* 16*/ { 0x11d, 10, 0, 16, { 0x10, 0x20, 0x0C, 0x56, 0x61, 0x80, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11 }, { 0xA5, 0x24, 0xD4, 0xC1, 0xED, 0x36, 0xC7, 0x87, 0x2C, 0x55 } }, // QRCODE Annex I.2
/* 17*/ { 0x11d, 5, 0, 5, { 0x40, 0x18, 0xAC, 0xC3, 0x00 }, { 0x86, 0x0D, 0x22, 0xAE, 0x30 } }, // QRCODE Annex I.3 /* 17*/ { 0x11d, 5, 0, 5, { 0x40, 0x18, 0xAC, 0xC3, 0x00 }, { 0x86, 0x0D, 0x22, 0xAE, 0x30 } }, // QRCODE Annex I.3
/* 18*/ { 0x163, 256, 0, 1, { 0xFF }, { 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255 } },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i; int i;
@ -158,8 +159,10 @@ static void test_encoding(int index) {
rs_init_code(&rs, data[i].nsym, data[i].index); rs_init_code(&rs, data[i].nsym, data[i].index);
rs_encode(&rs, data[i].datalen, data[i].data, res); rs_encode(&rs, data[i].datalen, data[i].data, res);
//fprintf(stderr, "res "); for (j = data[i].nsym - 1; j >= 0; j--) fprintf(stderr, "%d ", res[j]); fprintf(stderr, "\n"); if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) {
//fprintf(stderr, "exp "); for (j = 0; j < data[i].nsym; j++) fprintf(stderr, "%d ", data[i].expected[j]); fprintf(stderr, "\n"); fprintf(stderr, "res "); for (j = data[i].nsym - 1; j >= 0; j--) fprintf(stderr, "%d, ", res[j]); fprintf(stderr, "\n");
fprintf(stderr, "exp "); for (j = 0; j < data[i].nsym; j++) fprintf(stderr, "%d, ", data[i].expected[j]); fprintf(stderr, "\n");
}
for (j = 0; j < data[i].nsym; j++) { for (j = 0; j < data[i].nsym; j++) {
int k = data[i].nsym - 1 - j; int k = data[i].nsym - 1 - j;
assert_equal(res[k], data[i].expected[j], "i:%d res[%d] %d != expected[%d] %d\n", i, k, res[k], j, data[i].expected[j]); assert_equal(res[k], data[i].expected[j], "i:%d res[%d] %d != expected[%d] %d\n", i, k, res[k], j, data[i].expected[j]);
@ -169,7 +172,69 @@ static void test_encoding(int index) {
testFinish(); testFinish();
} }
static void test_encoding_uint(int index) { static void test_encoding_uint(int index, int debug) {
struct item {
unsigned int prime_poly;
int nsym;
int index;
int datalen;
unsigned int data[256];
unsigned int expected[256];
};
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = {
/* 0*/ { 0x43, 4, 1, 7, { 4, 20, 49, 37, 49, 38, 23 }, { 54, 17, 53, 58 } }, // AUSPOST Australia Post Customer Barcoding Technical Specifications Diagram 10
/* 1*/ { 0x43, 7, 1, 10, { 9, 50, 1, 41, 47, 2, 39, 37, 1, 27 }, { 38, 50, 8, 16, 10, 20, 40 } }, // AZTEC ISO/IEC 24778:2008 Section G.4
/* 2*/ { 0x13, 5, 1, 2, { 0, 9 }, { 12, 2, 3, 1, 9 } }, // AZTEC ISO/IEC 24778:2008 Section G.4 Mode Message
/* 3*/ { 0x12d, 5, 1, 3, { 142, 164, 186 }, { 114, 25, 5, 88, 102 } }, // DATAMATRIX ISO/IEC 16022:2006 Annex O
/* 4*/ { 0x89, 25, 1, 25, { 42, 13, 54, 39, 124, 91, 121, 65, 28, 40, 95, 48, 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, 0, 126, 0 }, { 123, 47, 2, 20, 54, 112, 35, 23, 100, 89, 55, 17, 101, 4, 14, 33, 48, 62, 98, 52, 2, 79, 92, 70, 102 } }, // GRIDMATRIX AIMD014 Section 6.8
/* 5*/ { 0x163, 4, 1, 21, { 0x11, 0xED, 0xC8, 0xC5, 0x40, 0x0F, 0xF4 }, { 0xEB, 0xB4, 0x68, 0x1D } }, // HANXIN ISO/IEC DIS 20830:2019 Annex K.1
/* 6*/ { 0x163, 24, 1, 27, { 0x11, 0xED, 0xC8, 0xC5, 0x40, 0x0F, 0xF4, 0x8A, 0x2C, 0xC3, 0x4E, 0x3D, 0x09, 0x25, 0x9A, 0x7A, 0x29, 0xAB, 0xEA, 0x3E, 0x46, 0x4C, 0x7E, 0x73, 0xE8, 0x6C, 0xC7 }, { 0x08, 0x57, 0x0C, 0xE0, 0x7A, 0xA5, 0xDD, 0xA2, 0x99, 0xCF, 0xA4, 0x82, 0xAD, 0x11, 0xB0, 0x84, 0x74, 0x5D, 0x9A, 0x99, 0x0B, 0xCD, 0x49, 0x77 } }, // HANXIN ISO/IEC DIS 20830:2019 Annex K.2 1st block
/* 7*/ { 0x163, 24, 1, 27, { 0xE7, 0x3E, 0x33, 0x29, 0xE8, 0xFC, }, { 0xA2, 0xA7, 0x68, 0x8A, 0x5F, 0xE6, 0xAA, 0x11, 0xA6, 0x69, 0x4A, 0xCF, 0xCF, 0x20, 0x5D, 0x00, 0x1B, 0x79, 0xA1, 0xFE, 0xB7, 0x94, 0x03, 0x9B } }, // HANXIN ISO/IEC DIS 20830:2019 Annex K.2 2nd block
/* 8*/ { 0x163, 24, 1, 29, { 0x00 }, { 0x00 } }, // HANXIN ISO/IEC DIS 20830:2019 Annex K.2 3rd block
/* 9*/ { 0x25, 6, 1, 16, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4 }, { 14, 7, 23, 3, 23, 15 } }, // MAILMARK Royal Mail Mailmark barcode C encoding and decoding Example 2.3.1
/* 10*/ { 0x25, 6, 1, 16, { 15, 22, 3, 25, 23, 26, 7, 3, 20, 14, 1, 4, 16, 3, 9, 28 }, { 27, 22, 24, 16, 6, 24 } }, // MAILMARK Royal Mail Mailmark barcode C encoding and decoding Example 2.3.2
/* 11*/ { 0x25, 7, 1, 19, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4 }, { 20, 1, 20, 7, 14, 11, 18 } }, // MAILMARK Royal Mail Mailmark barcode L encoding and decoding Example 2.3.1
/* 12*/ { 0x25, 7, 1, 19, { 0, 8, 21, 10, 29, 1, 29, 21, 2, 24, 15, 2, 19, 1, 4, 15, 11, 4, 16 }, { 19, 7, 9, 8, 6, 16, 16 } }, // MAILMARK Royal Mail Mailmark barcode L encoding and decoding Example 2.3.2
/* 13*/ { 0x43, 10, 1, 10, { 4, 13, 63, 1, 24, 9, 59, 3, 15, 4 }, { 50, 2, 42, 51, 53, 34, 22, 20, 5, 16 } }, // MAXICODE Annex H Primary
/* 14*/ { 0x43, 20, 1, 42, { 5, 57, 49, 47, 8, 18, 59, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }, { 31, 2, 58, 6, 6, 39, 13, 63, 2, 30, 19, 19, 14, 19, 23, 17, 62, 8, 2, 23 } }, // MAXICODE Annex H Secondary odd
/* 15*/ { 0x43, 20, 1, 42, { 47, 40, 57, 3, 1, 19, 41, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33 }, { 1, 15, 22, 28, 39, 17, 60, 5, 35, 35, 4, 8, 0, 32, 51, 45, 63, 53, 61, 14 } }, // MAXICODE Annex H Secondary even
/* 16*/ { 0x11d, 10, 0, 16, { 0x10, 0x20, 0x0C, 0x56, 0x61, 0x80, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11, 0xEC, 0x11 }, { 0xA5, 0x24, 0xD4, 0xC1, 0xED, 0x36, 0xC7, 0x87, 0x2C, 0x55 } }, // QRCODE Annex I.2
/* 17*/ { 0x11d, 5, 0, 5, { 0x40, 0x18, 0xAC, 0xC3, 0x00 }, { 0x86, 0x0D, 0x22, 0xAE, 0x30 } }, // QRCODE Annex I.3
/* 18*/ { 0x163, 256, 0, 1, { 0xFF }, { 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255 } },
};
int data_size = ARRAY_SIZE(data);
int i;
testStart("test_encoding_uint");
for (i = 0; i < data_size; i++) {
int j;
rs_t rs;
unsigned int res[1024];
if (index != -1 && i != index) continue;
rs_init_gf(&rs, data[i].prime_poly);
rs_init_code(&rs, data[i].nsym, data[i].index);
rs_encode_uint(&rs, data[i].datalen, data[i].data, res);
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) {
fprintf(stderr, "res "); for (j = data[i].nsym - 1; j >= 0; j--) fprintf(stderr, "%d, ", res[j]); fprintf(stderr, "\n");
fprintf(stderr, "exp "); for (j = 0; j < data[i].nsym; j++) fprintf(stderr, "%d, ", data[i].expected[j]); fprintf(stderr, "\n");
}
for (j = 0; j < data[i].nsym; j++) {
int k = data[i].nsym - 1 - j;
assert_equal(res[k], data[i].expected[j], "i:%d res[%d] %d != expected[%d] %d\n", i, k, res[k], j, data[i].expected[j]);
}
}
testFinish();
}
static void test_uint_encoding(int index, int debug) {
struct item { struct item {
unsigned int prime_poly; unsigned int prime_poly;
@ -185,11 +250,13 @@ static void test_encoding_uint(int index) {
struct item data[] = { struct item data[] = {
/* 0*/ { 0x409, 1023, 4, 1, 7, { 0x3FF, 0x000, 0x100, 0x1FF, 0x3FF, 0x000, 0x123 }, { 229, 153, 993, 674 } }, /* 0*/ { 0x409, 1023, 4, 1, 7, { 0x3FF, 0x000, 0x100, 0x1FF, 0x3FF, 0x000, 0x123 }, { 229, 153, 993, 674 } },
/* 1*/ { 0x1069, 4095, 4, 1, 7, { 0xFFF, 0x000, 0x700, 0x7FF, 0xFFF, 0x000, 0x123 }, { 3472, 2350, 3494, 575 } }, /* 1*/ { 0x1069, 4095, 4, 1, 7, { 0xFFF, 0x000, 0x700, 0x7FF, 0xFFF, 0x000, 0x123 }, { 3472, 2350, 3494, 575 } },
/* 2*/ { 0x1000, 4095, 4, 0, 7, { 0xFFF, 0x000, 0x700, 0x7FF, 0xFFF, 0x000, 0x123 }, { 1, 65, 0, 64 } },
/* 3*/ { 0x1000, 4095, 256, 0, 1, { 0xFFF }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 512, 0, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i; int i;
testStart("test_encoding_uint"); testStart("test_uint_encoding");
for (i = 0; i < data_size; i++) { for (i = 0; i < data_size; i++) {
int j; int j;
@ -198,17 +265,35 @@ static void test_encoding_uint(int index) {
if (index != -1 && i != index) continue; if (index != -1 && i != index) continue;
rs_uint_init_gf(&rs_uint, data[i].prime_poly, data[i].logmod); assert_nonzero(rs_uint_init_gf(&rs_uint, data[i].prime_poly, data[i].logmod), "i:%d rs_uint_init_gf() == 0\n", i);
rs_uint_init_code(&rs_uint, data[i].nsym, data[i].index); rs_uint_init_code(&rs_uint, data[i].nsym, data[i].index);
rs_uint_encode(&rs_uint, data[i].datalen, data[i].data, res); rs_uint_encode(&rs_uint, data[i].datalen, data[i].data, res);
rs_uint_free(&rs_uint); rs_uint_free(&rs_uint);
//fprintf(stderr, "res "); for (j = data[i].nsym - 1; j >= 0; j--) fprintf(stderr, "%d ", res[j]); fprintf(stderr, "\n"); if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) {
//fprintf(stderr, "exp "); for (j = 0; j < data[i].nsym; j++) fprintf(stderr, "%d ", data[i].expected[j]); fprintf(stderr, "\n"); fprintf(stderr, "res "); for (j = data[i].nsym - 1; j >= 0; j--) fprintf(stderr, "%d, ", res[j]); fprintf(stderr, "\n");
fprintf(stderr, "exp "); for (j = 0; j < data[i].nsym; j++) fprintf(stderr, "%d, ", data[i].expected[j]); fprintf(stderr, "\n");
}
for (j = 0; j < data[i].nsym; j++) { for (j = 0; j < data[i].nsym; j++) {
int k = data[i].nsym - 1 - j; int k = data[i].nsym - 1 - j;
assert_equal(res[k], data[i].expected[j], "i:%d res[%d] %d != expected[%d] %d\n", i, k, (int) res[k], j, (int) data[i].expected[j]); assert_equal(res[k], data[i].expected[j], "i:%d res[%d] %d != expected[%d] %d\n", i, k, (int) res[k], j, (int) data[i].expected[j]);
} }
/* Simulate rs_uint_init_gf() malloc() failure and rs_uint_init_gf()'s return val not being checked */
assert_nonzero(rs_uint_init_gf(&rs_uint, data[i].prime_poly, data[i].logmod), "i:%d rs_uint_init_gf() == 0\n", i);
free(rs_uint.logt);
rs_uint.logt = NULL;
free(rs_uint.alog);
rs_uint.alog = NULL;
rs_uint_init_code(&rs_uint, data[i].nsym, data[i].index);
rs_uint_encode(&rs_uint, data[i].datalen, data[i].data, res);
rs_uint_free(&rs_uint);
for (j = 0; j < data[i].nsym; j++) {
int k = data[i].nsym - 1 - j;
assert_zero(res[k], "i:%d res[%d] %d != 0\n", i, k, (int) res[k]);
}
} }
testFinish(); testFinish();
@ -218,8 +303,9 @@ int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_generate", test_generate, 0, 1, 0 }, { "test_generate", test_generate, 0, 1, 0 },
{ "test_encoding", test_encoding, 1, 0, 0 }, { "test_encoding", test_encoding, 1, 0, 1 },
{ "test_encoding_uint", test_encoding_uint, 1, 0, 0 }, { "test_encoding_uint", test_encoding_uint, 1, 0, 1 },
{ "test_uint_encoding", test_uint_encoding, 1, 0, 1 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -139,6 +139,7 @@ static void test_sjis_utf8(int index) {
/* 2*/ { "β", -1, 0, 1, { 0x83C0 }, "" }, /* 2*/ { "β", -1, 0, 1, { 0x83C0 }, "" },
/* 3*/ { "¥", -1, 0, 1, { 0x5C }, "" }, /* 3*/ { "¥", -1, 0, 1, { 0x5C }, "" },
/* 4*/ { "aβcЖ¥・ソ‾\\\点茗テ", -1, 0, 13, { 'a', 0x83C0, 'c', 0x8447, 0x5C, 0xA5, 0xBF, 0x7E, 0x815F, 0x815F, 0x935F, 0xE4AA, 0x8365 }, "" }, /* 4*/ { "aβcЖ¥・ソ‾\\\点茗テ", -1, 0, 13, { 'a', 0x83C0, 'c', 0x8447, 0x5C, 0xA5, 0xBF, 0x7E, 0x815F, 0x815F, 0x935F, 0xE4AA, 0x8365 }, "" },
/* 5*/ { "\200", -1, ZINT_ERROR_INVALID_DATA, -1, {0}, "Invalid UTF-8" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;

View File

@ -45,56 +45,64 @@ static void test_print(int index, int generate, int debug) {
int option_1; int option_1;
int option_2; int option_2;
float height; float height;
char *fgcolour;
char *bgcolour;
int rotate_angle;
char *data; char *data;
char *composite; char *composite;
int ret; int ret;
char *expected_file; char *expected_file;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, -1, -1, -1, -1, 0, "<>\"&'", "", 0, "code128_amperands.svg" }, /* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "<>\"&'", "", 0, "code128_amperands.svg" },
/* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, 0, "Égjpqy", "", 0, "code128_egrave_bold.svg" }, /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold.svg" },
/* 2*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, 0, "Égjpqy", "", 0, "code128_egrave_bold_box3.svg" }, /* 2*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_box3.svg" },
/* 3*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.svg" }, /* 3*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.svg" },
/* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, 3, 3, -1, -1, -1, 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp3.svg" }, /* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, 3, 3, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp3.svg" },
/* 5*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, 3, -1, 0, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.svg" }, /* 5*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, 3, -1, 0, "", "", 0, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.svg" },
/* 6*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, -1, -1, 3, -1, 0, "AAAAAAAAA", "", 0, "codablockf_3rows.svg" }, /* 6*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, -1, -1, 3, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_3rows.svg" },
/* 7*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, 3, -1, 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.svg" }, /* 7*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, 3, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.svg" },
/* 8*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.svg" }, /* 8*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.svg" },
/* 9*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg" }, /* 9*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg" },
/* 10*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg" }, /* 10*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg" },
/* 11*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg" }, /* 11*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg" },
/* 12*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg" }, /* 12*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg" },
/* 13*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg" }, /* 13*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg" },
/* 14*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.svg" }, /* 14*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.svg" },
/* 15*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, "614141234417+12345", "", 0, "upca_5addon.svg" }, /* 15*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon.svg" },
/* 16*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, 0, "614141234417+12345", "", 0, "upca_5addon_bind3.svg" }, /* 16*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_bind3.svg" },
/* 17*/ { BARCODE_UPCA, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, -1, 0, "614141234417+12345", "", 0, "upca_5addon_small_bold.svg" }, /* 17*/ { BARCODE_UPCA, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_small_bold.svg" },
/* 18*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.svg" }, /* 18*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.svg" },
/* 19*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.svg" }, /* 19*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.svg" },
/* 20*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.svg" }, /* 20*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.svg" },
/* 21*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.svg" }, /* 21*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.svg" },
/* 22*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, "1234567+12", "", 0, "upce_2addon.svg" }, /* 22*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon.svg" },
/* 23*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, "1234567+12345", "", 0, "upce_5addon.svg" }, /* 23*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon.svg" },
/* 24*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, "1234567+12345", "", 0, "upce_5addon_small.svg" }, /* 24*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small.svg" },
/* 25*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, 0, -1, -1, 0, "1234567+12345", "", 0, "upce_5addon_notext.svg" }, /* 25*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, 0, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_notext.svg" },
/* 26*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.svg" }, /* 26*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.svg" },
/* 27*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.svg" }, /* 27*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "FF0000EE", "0000FF11", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_fgbgalpha.svg" },
/* 28*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.svg" }, /* 28*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "", "FFFFFF00", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_nobg.svg" },
/* 29*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "1234567+12", "", 0, "ean8_2addon.svg" }, /* 29*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "", "", 270, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_rotate_270.svg" },
/* 30*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "1234567+12345", "", 0, "ean8_5addon.svg" }, /* 30*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.svg" },
/* 31*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "9876543+65", "[91]1234567", 0, "ean8_cc_2addon_cca_4x3.svg" }, /* 31*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.svg" },
/* 32*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "9876543+74083", "[91]123456789012345678", 0, "ean8_cc_5addon_ccb_8x3.svg" }, /* 32*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "ean8_2addon.svg" },
/* 33*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "12345", "", 0, "ean5.svg" }, /* 33*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "ean8_5addon.svg" },
/* 34*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "12", "", 0, "ean2.svg" }, /* 34*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", 0, "ean8_cc_2addon_cca_4x3.svg" },
/* 35*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, "123", "", 0, "code39_small.svg" }, /* 35*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", 0, "ean8_cc_5addon_ccb_8x3.svg" },
/* 36*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, 0, "12345", "", 0, "postnet_zip.svg" }, /* 36*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg" },
/* 37*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, -1, -1, -1, -1, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_box2.svg" }, /* 37*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg" },
/* 38*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.svg" }, /* 38*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, "", "", 0, "123", "", 0, "code39_small.svg" },
/* 39*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, 1, -1, -1, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_vwsp1_bind1_dotty.svg" }, /* 39*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "postnet_zip.svg" },
/* 40*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_hvwsp1_bind1_dotty.svg" }, /* 40*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_box2.svg" },
/* 41*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, "12345678909", "", 0, "dbar_ltd.svg" }, /* 41*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.svg" },
/* 42*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.svg" }, /* 42*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, "121212DD", "EEEEEE22", 90, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_fgbg_rotate_90.svg" },
/* 43*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, "12345678901234567890", "", 0, "imail_height7.75.svg" }, /* 43*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, 1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_vwsp1_bind1_dotty.svg" },
/* 44*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_hvwsp1_bind1_dotty.svg" },
/* 45*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345678909", "", 0, "dbar_ltd.svg" },
/* 46*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5, "", "", 0, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.svg" },
/* 47*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, "", "", 0, "12345678901234567890", "", 0, "imail_height7.75.svg" },
/* 48*/ { BARCODE_ULTRA, -1, 3, BARCODE_BOX, 2, 2, -1, -1, -1, 0, "FF0000", "0000FF", 0, "12345678901234567890", "", 0, "ultra_fgbg_hvwsp2_box3.svg" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -149,6 +157,13 @@ static void test_print(int index, int generate, int debug) {
if (data[i].whitespace_height != -1) { if (data[i].whitespace_height != -1) {
symbol->whitespace_height = data[i].whitespace_height; symbol->whitespace_height = data[i].whitespace_height;
} }
if (*data[i].fgcolour) {
strcpy(symbol->fgcolour, data[i].fgcolour);
}
if (*data[i].bgcolour) {
strcpy(symbol->bgcolour, data[i].bgcolour);
}
if (strlen(data[i].composite)) { if (strlen(data[i].composite)) {
text = data[i].composite; text = data[i].composite;
strcpy(symbol->primary, data[i].data); strcpy(symbol->primary, data[i].data);
@ -161,15 +176,16 @@ static void test_print(int index, int generate, int debug) {
assert_equal(ret, data[i].ret, "i:%d %s ZBarcode_Encode ret %d != %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, data[i].ret, symbol->errtxt); assert_equal(ret, data[i].ret, "i:%d %s ZBarcode_Encode ret %d != %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, data[i].ret, symbol->errtxt);
strcpy(symbol->outfile, svg); strcpy(symbol->outfile, svg);
ret = ZBarcode_Print(symbol, 0); ret = ZBarcode_Print(symbol, data[i].rotate_angle);
assert_zero(ret, "i:%d %s ZBarcode_Print %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret); assert_zero(ret, "i:%d %s ZBarcode_Print %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret);
assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
if (generate) { if (generate) {
printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %.8g, \"%s\", \"%s\", \"%s\" },\n", printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %.8g, \"%s\", \"%s\", %d, \"%s\", \"%s\", \"%s\" },\n",
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width, testUtilOutputOptionsName(data[i].output_options), i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width,
data[i].whitespace_width, data[i].whitespace_height, data[i].show_hrt, data[i].option_1, data[i].option_2, data[i].height, testUtilOutputOptionsName(data[i].output_options), data[i].whitespace_width, data[i].whitespace_height, data[i].show_hrt,
data[i].option_1, data[i].option_2, data[i].height, data[i].fgcolour, data[i].bgcolour, data[i].rotate_angle,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, data[i].expected_file); testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, data[i].expected_file);
ret = testUtilRename(symbol->outfile, expected_file); ret = testUtilRename(symbol->outfile, expected_file);
assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret); assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret);
@ -196,10 +212,41 @@ static void test_print(int index, int generate, int debug) {
testFinish(); testFinish();
} }
INTERNAL int svg_plot(struct zint_symbol *symbol, int rotate_angle);
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
struct zint_vector vector = {0};
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.vector = &vector;
strcpy(symbol.outfile, "nosuch_dir/out.svg");
ret = svg_plot(&symbol, 0);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "svg_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = svg_plot(&symbol, 0);
printf(" - ignore (SVG to stdout)\n"); fflush(stdout);
assert_zero(ret, "svg_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
symbol.vector = NULL;
ret = svg_plot(&symbol, 0);
assert_equal(ret, ZINT_ERROR_INVALID_DATA, "svg_plot ret %d != ZINT_ERROR_INVALID_DATA (%d) (%s)\n", ret, ZINT_ERROR_INVALID_DATA, symbol.errtxt);
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_print", test_print, 1, 1, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_outfile", test_outfile, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -222,6 +222,9 @@ static void test_encode(int index, int generate, int debug) {
/* 8*/ { BARCODE_TELEPEN_NUM, "1X3X", -1, 0, 1, 80, "Verified manually against tec-it", /* 8*/ { BARCODE_TELEPEN_NUM, "1X3X", -1, 0, 1, 80, "Verified manually against tec-it",
"10101010101110001110001110001110111010111000111010111010101110001110001010101010" "10101010101110001110001110001110111010111000111010111010101110001110001010101010"
}, },
/* 9*/ { BARCODE_TELEPEN_NUM, "3637", -1, 0, 1, 80, "Glyph count 127, check 0; verified manually against tec-it",
"10101010101110001010101010101110111011101110101011101110111011101110001010101010"
},
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;

View File

@ -43,37 +43,38 @@ static void test_pixel_plot(int index, int debug) {
char *pattern; char *pattern;
int repeat; int repeat;
int no_identify; // identify fails for some valid TIFFs (eg. RGB with LZW and large rows) int no_identify; // identify fails for some valid TIFFs (eg. RGB with LZW and large rows)
int ret;
}; };
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
struct item data[] = { struct item data[] = {
/* 0*/ { 1, 1, "1", 0, 0 }, /* 0*/ { 1, 1, "1", 0, 0, 0 },
/* 1*/ { 2, 1, "11", 0, 0 }, /* 1*/ { 2, 1, "11", 0, 0, 0 },
/* 2*/ { 1, 2, "11", 0, 0 }, /* 2*/ { 1, 2, "11", 0, 0, 0 },
/* 3*/ { 2, 2, "10", 1, 0 }, /* 3*/ { 2, 2, "10", 1, 0, 0 },
/* 4*/ { 3, 1, "101", 0, 0 }, /* 4*/ { 3, 1, "101", 0, 0, 0 },
/* 5*/ { 1, 3, "101", 0, 0 }, /* 5*/ { 1, 3, "101", 0, 0, 0 },
/* 6*/ { 4, 1, "1010", 0, 0 }, /* 6*/ { 4, 1, "1010", 0, 0, 0 },
/* 7*/ { 1, 4, "1010", 0, 0 }, /* 7*/ { 1, 4, "1010", 0, 0, 0 },
/* 8*/ { 5, 1, "10101", 0, 0 }, /* 8*/ { 5, 1, "10101", 0, 0, 0 },
/* 9*/ { 1, 5, "10101", 0, 0 }, /* 9*/ { 1, 5, "10101", 0, 0, 0 },
/* 10*/ { 3, 2, "101", 1, 0 }, /* 10*/ { 3, 2, "101", 1, 0, 0 },
/* 11*/ { 100, 2, "10", 1, 0 }, /* 11*/ { 100, 2, "10", 1, 0, 0 },
/* 12*/ { 2, 100, "10", 1, 0 }, /* 12*/ { 2, 100, "10", 1, 0, 0 },
/* 13*/ { 3, 3, "101010101", 0, 0 }, /* 13*/ { 3, 3, "101010101", 0, 0, 0 },
/* 14*/ { 4, 3, "10", 1, 0 }, /* 14*/ { 4, 3, "10", 1, 0, 0 },
/* 15*/ { 3, 4, "10", 1, 0 }, /* 15*/ { 3, 4, "10", 1, 0, 0 },
/* 16*/ { 45, 44, "10", 1, 0 }, // Strip Count 1, Rows Per Strip 44 (45 * 44 * 4 == 7920) /* 16*/ { 45, 44, "10", 1, 0, 0 }, // Strip Count 1, Rows Per Strip 44 (45 * 44 * 4 == 7920)
/* 17*/ { 45, 45, "10", 1, 0 }, // Strip Count 1, Rows Per Strip 45 (45 * 45 * 4 == 8100) /* 17*/ { 45, 45, "10", 1, 0, 0 }, // Strip Count 1, Rows Per Strip 45 (45 * 45 * 4 == 8100)
/* 18*/ { 46, 45, "10", 1, 0 }, // Strip Count 2, Rows Per Strip 44 (46 * 45 * 4 == 8280) /* 18*/ { 46, 45, "10", 1, 0, 0 }, // Strip Count 2, Rows Per Strip 44 (46 * 45 * 4 == 8280)
/* 19*/ { 46, 46, "10", 1, 0 }, // Strip Count 2, Rows Per Strip 44 /* 19*/ { 46, 46, "10", 1, 0, 0 }, // Strip Count 2, Rows Per Strip 44
/* 20*/ { 2048, 1, "10", 1, 1 }, // Strip Count 1, Rows Per Strip 1 (2048 * 4 == 8192) /* 20*/ { 2048, 1, "10", 1, 1, 0 }, // Strip Count 1, Rows Per Strip 1 (2048 * 4 == 8192)
/* 21*/ { 1, 2048, "10", 1, 0 }, // Strip Count 1, Rows Per Strip 2048 /* 21*/ { 1, 2048, "10", 1, 0, 0 }, // Strip Count 1, Rows Per Strip 2048
/* 22*/ { 2048, 2, "10", 1, 1 }, // Strip Count 2, Rows Per Strip 1 /* 22*/ { 2048, 2, "10", 1, 1, 0 }, // Strip Count 2, Rows Per Strip 1
/* 23*/ { 2, 2048, "10", 1, 0 }, // Strip Count 2, Rows Per Strip 1024 (2 * 1024 * 4 == 8192) /* 23*/ { 2, 2048, "10", 1, 0, 0 }, // Strip Count 2, Rows Per Strip 1024 (2 * 1024 * 4 == 8192)
/* 24*/ { 2048, 3, "10", 1, 1 }, // Strip Count 3, Rows Per Strip 1 /* 24*/ { 2048, 3, "10", 1, 1, 0 }, // Strip Count 3, Rows Per Strip 1
/* 25*/ { 3, 2048, "10", 1, 0 }, // Strip Count 4, Rows Per Strip 682 ((3 * 682 + 2) * 4 == 8192) /* 25*/ { 3, 2048, "10", 1, 0, 0 }, // Strip Count 4, Rows Per Strip 682 ((3 * 682 + 2) * 4 == 8192)
/* 26*/ { 2049, 4, "10", 1, 1 }, // Strip Count 4, Rows Per Strip 1 (2049 * 1 * 4 == 8196) - large rows in 1 strip, even if > 8192 /* 26*/ { 2049, 4, "10", 1, 1, 0 }, // Strip Count 4, Rows Per Strip 1 (2049 * 1 * 4 == 8196) - large rows in 1 strip, even if > 8192
/* 27*/ { 4, 2049, "10", 1, 0 }, // Strip Count 5, Rows Per Strip 512 ((4 * 512 + 1) * 4 == 8196) /* 27*/ { 4, 2049, "10", 1, 0, 0 }, // Strip Count 5, Rows Per Strip 512 ((4 * 512 + 1) * 4 == 8196)
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, ret; int i, ret;
@ -117,8 +118,9 @@ static void test_pixel_plot(int index, int debug) {
symbol->bitmap = (unsigned char *) data_buf; symbol->bitmap = (unsigned char *) data_buf;
ret = tif_pixel_plot(symbol, (unsigned char *) data_buf); ret = tif_pixel_plot(symbol, (unsigned char *) data_buf);
assert_zero(ret, "i:%d tif_pixel_plot ret %d != 0 (%s)\n", i, ret, symbol->errtxt); assert_equal(ret, data[i].ret, "i:%d tif_pixel_plot ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
if (ret < ZINT_ERROR) {
if (have_tiffinfo) { if (have_tiffinfo) {
ret = testUtilVerifyTiffInfo(symbol->outfile, debug); ret = testUtilVerifyTiffInfo(symbol->outfile, debug);
assert_zero(ret, "i:%d tiffinfo %s ret %d != 0\n", i, symbol->outfile, ret); assert_zero(ret, "i:%d tiffinfo %s ret %d != 0\n", i, symbol->outfile, ret);
@ -130,6 +132,11 @@ static void test_pixel_plot(int index, int debug) {
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) { if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile); assert_zero(remove(symbol->outfile), "i:%d remove(%s) != 0\n", i, symbol->outfile);
} }
} else {
if (!(debug & ZINT_DEBUG_TEST_KEEP_OUTFILE)) {
(void) remove(symbol->outfile);
}
}
symbol->bitmap = NULL; symbol->bitmap = NULL;
} }
@ -147,6 +154,7 @@ static void test_print(int index, int generate, int debug) {
int border_width; int border_width;
int output_options; int output_options;
int whitespace_width; int whitespace_width;
int whitespace_height;
int show_hrt; int show_hrt;
int option_1; int option_1;
int option_2; int option_2;
@ -160,22 +168,27 @@ static void test_print(int index, int generate, int debug) {
char *comment; char *comment;
}; };
struct item data[] = { struct item data[] = {
/* 0*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, 0, 0, "112233", "EEDDCC", "A", "", "code128_fgbg.tif", "" }, /* 0*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "112233", "EEDDCC", "A", "", "code128_fgbg.tif", "" },
/* 1*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, 0, 0, "C00000", "FEDCBACC", "A", "", "code128_bgalpha.tif", "" }, /* 1*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "FFFFFF", "000000", "A", "", "code128_reverse.tif", "" },
/* 2*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, 0, 0, "00000099", "FEDCBA", "A", "", "code128_fgalpha.tif", "" }, /* 2*/ { BARCODE_CODE128, -1, -1, CMYK_COLOUR, 1, -1, -1, -1, -1, 0, 0, "112233", "CCDDEE", "A", "", "code128_cmyk_fgbg.tif", "" },
/* 3*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, 0, 0, "00000099", "FEDCBACC", "A", "", "code128_fgbgalpha.tif", "" }, /* 3*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "C00000", "FEDCBACC", "A", "", "code128_bgalpha.tif", "" },
/* 4*/ { BARCODE_CODE128, -1, -1, CMYK_COLOUR, 1, -1, -1, -1, 0, 0, "C00000", "FEDCBA", "A", "", "code128_cmyk.tif", "" }, /* 4*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "00000099", "FEDCBA", "A", "", "code128_fgalpha.tif", "" },
/* 5*/ { BARCODE_CODE128, -1, -1, CMYK_COLOUR, 1, -1, -1, -1, 0, 0, "C0000099", "FEDCBACC", "A", "", "code128_cmyk_fgbgalpha.tif", "" }, /* 5*/ { BARCODE_CODE128, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "00000099", "FEDCBACC", "A", "", "code128_fgbgalpha.tif", "" },
/* 6*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, 0, 0, "C00000", "FEDCBACC", "1234", "", "ultra_bgalpha.tif", "" }, /* 6*/ { BARCODE_CODE128, -1, -1, CMYK_COLOUR, 1, -1, -1, -1, -1, 0, 0, "C00000", "FEDCBA", "A", "", "code128_cmyk.tif", "" },
/* 7*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, 0, 0, "000000BB", "FEDCBA", "1234", "", "ultra_fgalpha.tif", "" }, /* 7*/ { BARCODE_CODE128, -1, -1, CMYK_COLOUR, 1, -1, -1, -1, -1, 0, 0, "C0000099", "FEDCBACC", "A", "", "code128_cmyk_fgbgalpha.tif", "" },
/* 8*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, 0, 0, "000000BB", "FEDCBACC", "1234", "", "ultra_fgbgalpha.tif", "" }, /* 8*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "C00000", "FEDCBACC", "1234", "", "ultra_bgalpha.tif", "" },
/* 9*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, 0, 0, "000000BB", "", "1234", "", "ultra_fgalpha_nobg.tif", "" }, /* 9*/ { BARCODE_ULTRA, -1, -1, CMYK_COLOUR, 1, -1, -1, -1, -1, 0, 0, "C00000", "FEDCBACC", "1234", "", "ultra_cmyk_bgalpha.tif", "" },
/* 10*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, 0, 0, "", "FEDCBACC", "1234", "", "ultra_bgalpha_nofg.tif", "" }, /* 10*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "000000BB", "FEDCBA", "1234", "", "ultra_fgalpha.tif", "" },
/* 11*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, 0, 0.5f, "", "", "1", "", "ultra_odd.tif", "" }, /* 11*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "000000BB", "FEDCBACC", "1234", "", "ultra_fgbgalpha.tif", "" },
/* 12*/ { BARCODE_HANXIN, UNICODE_MODE, -1, -1, -1, -1, 4, 84, 0, 2, "", "", "1", "", "hanxin_v84_l4_scale2.tif", "" }, /* 12*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "000000BB", "", "1234", "", "ultra_fgalpha_nobg.tif", "" },
/* 13*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, 32, 0, 0, "4BE055", "", "1", "", "aztec_v32_fg.tif", "" }, /* 13*/ { BARCODE_ULTRA, -1, -1, -1, 1, -1, -1, -1, -1, 0, 0, "", "FEDCBACC", "1234", "", "ultra_bgalpha_nofg.tif", "" },
/* 14*/ { BARCODE_DAFT, -1, -1, -1, -1, -1, -1, -1, 8, 0.5f, "", "", "F", "", "daft_height8_scale0.5.tif", "" }, /* 14*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5f, "", "", "1", "", "ultra_odd.tif", "" },
/* 15*/ { BARCODE_DAFT, -1, -1, -1, -1, -1, -1, -1, 1, 0.5f, "", "", "DAFT", "", "daft_height1_scale0.5.tif", "" }, /* 15*/ { BARCODE_ULTRA, -1, -1, CMYK_COLOUR, 1, -1, -1, -1, -1, 0, 0, "", "", "1234", "", "ultra_cmyk.tif", "" },
/* 16*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "FF0000", "0000FF", "1234", "", "ultra_fgbg_hvwsp1_box1.tif", "" },
/* 17*/ { BARCODE_HANXIN, UNICODE_MODE, -1, -1, -1, -1, -1, 4, 84, 0, 2, "", "", "1", "", "hanxin_v84_l4_scale2.tif", "" },
/* 18*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, 32, 0, 0, "4BE055", "", "1", "", "aztec_v32_fg.tif", "" },
/* 19*/ { BARCODE_DAFT, -1, -1, -1, -1, -1, -1, -1, -1, 8, 0.5f, "", "", "F", "", "daft_height8_scale0.5.tif", "" },
/* 20*/ { BARCODE_DAFT, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0.5f, "", "", "DAFT", "", "daft_height1_scale0.5.tif", "" },
}; };
int data_size = ARRAY_SIZE(data); int data_size = ARRAY_SIZE(data);
int i, length, ret; int i, length, ret;
@ -226,6 +239,9 @@ static void test_print(int index, int generate, int debug) {
if (data[i].whitespace_width != -1) { if (data[i].whitespace_width != -1) {
symbol->whitespace_width = data[i].whitespace_width; symbol->whitespace_width = data[i].whitespace_width;
} }
if (data[i].whitespace_height != -1) {
symbol->whitespace_height = data[i].whitespace_height;
}
if (*data[i].fgcolour) { if (*data[i].fgcolour) {
strcpy(symbol->fgcolour, data[i].fgcolour); strcpy(symbol->fgcolour, data[i].fgcolour);
} }
@ -250,9 +266,10 @@ static void test_print(int index, int generate, int debug) {
assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i); assert_nonzero(testUtilDataPath(expected_file, sizeof(expected_file), data_dir, data[i].expected_file), "i:%d testUtilDataPath == 0\n", i);
if (generate) { if (generate) {
printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %.5g, \"%s\",\"%s\", \"%s\", \"%s\", \"%s\", \"%s\" },\n", printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %d, %.5g, \"%s\",\"%s\", \"%s\", \"%s\", \"%s\", \"%s\" },\n",
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width, testUtilOutputOptionsName(data[i].output_options), i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width, testUtilOutputOptionsName(data[i].output_options),
data[i].whitespace_width, data[i].show_hrt, data[i].option_1, data[i].option_2, data[i].height, data[i].scale, data[i].fgcolour, data[i].bgcolour, data[i].whitespace_width, data[i].whitespace_height, data[i].show_hrt, data[i].option_1, data[i].option_2,
data[i].height, data[i].scale, data[i].fgcolour, data[i].bgcolour,
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, data[i].expected_file, data[i].comment); testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, data[i].expected_file, data[i].comment);
ret = testUtilRename(symbol->outfile, expected_file); ret = testUtilRename(symbol->outfile, expected_file);
assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret); assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret);
@ -278,11 +295,37 @@ static void test_print(int index, int generate, int debug) {
testFinish(); testFinish();
} }
static void test_outfile(void) {
int ret;
struct zint_symbol symbol = {0};
unsigned char data[] = { "1" };
testStart("test_outfile");
symbol.symbology = BARCODE_CODE128;
symbol.bitmap = data;
symbol.bitmap_width = symbol.bitmap_height = 1;
strcpy(symbol.outfile, "nosuch_dir/out.tif");
ret = tif_pixel_plot(&symbol, data);
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "tif_pixel_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n", ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
symbol.output_options |= BARCODE_STDOUT;
ret = tif_pixel_plot(&symbol, data);
printf(" - ignore (TIF to stdout)\n"); fflush(stdout);
assert_zero(ret, "tif_pixel_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
testFinish();
}
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
{ "test_pixel_plot", test_pixel_plot, 1, 0, 1 }, { "test_pixel_plot", test_pixel_plot, 1, 0, 1 },
{ "test_print", test_print, 1, 1, 1 }, { "test_print", test_print, 1, 1, 1 },
{ "test_outfile", test_outfile, 0, 0, 0 },
}; };
testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); testRun(argc, argv, funcs, ARRAY_SIZE(funcs));

View File

@ -828,15 +828,18 @@ int testUtilSymbolCmp(const struct zint_symbol *a, const struct zint_symbol *b)
if (a->whitespace_width != b->whitespace_width) { if (a->whitespace_width != b->whitespace_width) {
return 6; return 6;
} }
if (a->border_width != b->border_width) { if (a->whitespace_height != b->whitespace_height) {
return 7; return 7;
} }
if (a->output_options != b->output_options) { if (a->border_width != b->border_width) {
return 8; return 8;
} }
if (a->scale != b->scale) { if (a->output_options != b->output_options) {
return 9; return 9;
} }
if (a->scale != b->scale) {
return 10;
}
return 0; return 0;
} }
@ -1051,7 +1054,7 @@ int testUtilVectorCmp(const struct zint_vector *a, const struct zint_vector *b)
return 0; return 0;
} }
/* Dump modules into buffer as '0'/'1' (or colours 'W', 'C', 'B' etc if Ultra) */ /* Dump modules into buffer as '0'/'1' (or colours '0', '1', '2' etc if Ultra) */
int testUtilModulesDump(const struct zint_symbol *symbol, char dump[], int dump_size) { int testUtilModulesDump(const struct zint_symbol *symbol, char dump[], int dump_size) {
int r, w; int r, w;
char *d = dump; char *d = dump;
@ -2107,7 +2110,7 @@ static const char *testUtilBwippName(int index, const struct zint_symbol *symbol
{ "itf14", BARCODE_ITF14, 89, 0, 0, 0, 0, 0, }, { "itf14", BARCODE_ITF14, 89, 0, 0, 0, 0, 0, },
{ "kix", BARCODE_KIX, 90, 0, 0, 0, 0, 0, }, { "kix", BARCODE_KIX, 90, 0, 0, 0, 0, 0, },
{ "", -1, 91, 0, 0, 0, 0, 0, }, { "", -1, 91, 0, 0, 0, 0, 0, },
{ "azteccode", BARCODE_AZTEC, 92, 0, 1, 0, 0, 0, }, { "azteccode", BARCODE_AZTEC, 92, 1, 1, 0, 0, 0, },
{ "daft", BARCODE_DAFT, 93, 0, 0, 0, 0, 0, }, { "daft", BARCODE_DAFT, 93, 0, 0, 0, 0, 0, },
{ "", -1, 94, 0, 0, 0, 0, 0, }, { "", -1, 94, 0, 0, 0, 0, 0, },
{ "", -1, 95, 0, 0, 0, 0, 0, }, { "", -1, 95, 0, 0, 0, 0, 0, },
@ -2207,6 +2210,14 @@ static const char *testUtilBwippName(int index, const struct zint_symbol *symbol
} }
return NULL; return NULL;
} }
} else if (symbology == BARCODE_AZTEC) {
if (option_1 > 0 && option_2 > 0) {
if (debug & ZINT_DEBUG_TEST_PRINT) {
printf("i:%d %s not BWIPP compatible, cannot specify both option_1 %d and option_2 %d\n",
index, testUtilBarcodeName(symbology), option_1, option_2);
}
return NULL;
}
} }
if (linear_row_height) { if (linear_row_height) {

View File

@ -108,6 +108,7 @@ INTERNAL int tif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
int compression = TIF_NO_COMPRESSION; int compression = TIF_NO_COMPRESSION;
tif_lzw_state lzw_state; tif_lzw_state lzw_state;
long file_pos; long file_pos;
const int output_to_stdout = symbol->output_options & BARCODE_STDOUT;
#ifdef _MSC_VER #ifdef _MSC_VER
uint32_t* strip_offset; uint32_t* strip_offset;
uint32_t* strip_bytes; uint32_t* strip_bytes;
@ -229,8 +230,8 @@ INTERNAL int tif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
pixels_per_sample = 8; pixels_per_sample = 8;
} else if (bg[0] == 0 && bg[1] == 0 && bg[2] == 0 && bg[3] == 0xff } else if (bg[0] == 0 && bg[1] == 0 && bg[2] == 0 && bg[3] == 0xff
&& fg[0] == 0xff && fg[1] == 0xff && fg[2] == 0xff && fg[3] == 0xff) { && fg[0] == 0xff && fg[1] == 0xff && fg[2] == 0xff && fg[3] == 0xff) {
map['0'] = 1; map['0'] = 0;
map['1'] = 0; map['1'] = 1;
pmi = TIF_PMI_BLACKISZERO; pmi = TIF_PMI_BLACKISZERO;
bits_per_sample = 1; bits_per_sample = 1;
@ -313,7 +314,8 @@ INTERNAL int tif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
strip_bytes[i] = bytes_per_strip; strip_bytes[i] = bytes_per_strip;
} else { } else {
if (rows_last_strip) { if (rows_last_strip) {
strip_bytes[i] = rows_last_strip * ((symbol->bitmap_width + pixels_per_sample - 1) / pixels_per_sample) strip_bytes[i] = rows_last_strip
* ((symbol->bitmap_width + pixels_per_sample - 1) / pixels_per_sample)
* samples_per_pixel; * samples_per_pixel;
} else { } else {
strip_bytes[i] = bytes_per_strip; strip_bytes[i] = bytes_per_strip;
@ -331,17 +333,17 @@ INTERNAL int tif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
} }
/* Open output file in binary mode */ /* Open output file in binary mode */
if (symbol->output_options & BARCODE_STDOUT) { if (output_to_stdout) {
#ifdef _MSC_VER #ifdef _MSC_VER
if (-1 == _setmode(_fileno(stdout), _O_BINARY)) { if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
sprintf(symbol->errtxt, "671: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "671: Could not set stdout to binary (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
#endif #endif
tif_file = stdout; tif_file = stdout;
} else { } else {
if (!(tif_file = fopen(symbol->outfile, "wb+"))) { if (!(tif_file = fopen(symbol->outfile, "wb+"))) { /* '+' as use fseek/ftell() */
sprintf(symbol->errtxt, "672: Can't open output file (%d: %.30s)", errno, strerror(errno)); sprintf(symbol->errtxt, "672: Could not open output file (%d: %.30s)", errno, strerror(errno));
return ZINT_ERROR_FILE_ACCESS; return ZINT_ERROR_FILE_ACCESS;
} }
compression = TIF_LZW; compression = TIF_LZW;
@ -607,7 +609,7 @@ INTERNAL int tif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
total_bytes_put += 6 * color_map_size; total_bytes_put += 6 * color_map_size;
} }
if (symbol->output_options & BARCODE_STDOUT) { if (output_to_stdout) {
fflush(tif_file); fflush(tif_file);
} else { } else {
if (ftell(tif_file) != total_bytes_put) { if (ftell(tif_file) != total_bytes_put) {

View File

@ -63,7 +63,7 @@ static struct zint_vector_rect *vector_plot_create_rect(float x, float y, float
static int vector_plot_add_rect(struct zint_symbol *symbol, struct zint_vector_rect *rect, static int vector_plot_add_rect(struct zint_symbol *symbol, struct zint_vector_rect *rect,
struct zint_vector_rect **last_rect) { struct zint_vector_rect **last_rect) {
if (!rect) return ZINT_ERROR_MEMORY; if (!rect) return 0;
if (*last_rect) if (*last_rect)
(*last_rect)->next = rect; (*last_rect)->next = rect;
else else
@ -89,7 +89,7 @@ static struct zint_vector_hexagon *vector_plot_create_hexagon(float x, float y,
static int vector_plot_add_hexagon(struct zint_symbol *symbol, struct zint_vector_hexagon *hexagon, static int vector_plot_add_hexagon(struct zint_symbol *symbol, struct zint_vector_hexagon *hexagon,
struct zint_vector_hexagon **last_hexagon) { struct zint_vector_hexagon **last_hexagon) {
if (!hexagon) return ZINT_ERROR_MEMORY; if (!hexagon) return 0;
if (*last_hexagon) if (*last_hexagon)
(*last_hexagon)->next = hexagon; (*last_hexagon)->next = hexagon;
else else
@ -115,7 +115,7 @@ static struct zint_vector_circle *vector_plot_create_circle(float x, float y, fl
static int vector_plot_add_circle(struct zint_symbol *symbol, struct zint_vector_circle *circle, static int vector_plot_add_circle(struct zint_symbol *symbol, struct zint_vector_circle *circle,
struct zint_vector_circle **last_circle) { struct zint_vector_circle **last_circle) {
if (!circle) return ZINT_ERROR_MEMORY; if (!circle) return 0;
if (*last_circle) if (*last_circle)
(*last_circle)->next = circle; (*last_circle)->next = circle;
else else
@ -272,12 +272,10 @@ static void vector_rotate(struct zint_symbol *symbol, int rotate_angle) {
temp = rect->width; temp = rect->width;
rect->width = rect->height; rect->width = rect->height;
rect->height = temp; rect->height = temp;
} } else if (rotate_angle == 180) {
if (rotate_angle == 180) {
rect->x = symbol->vector->width - (rect->x + rect->width); rect->x = symbol->vector->width - (rect->x + rect->width);
rect->y = symbol->vector->height - (rect->y + rect->height); rect->y = symbol->vector->height - (rect->y + rect->height);
} } else if (rotate_angle == 270) {
if (rotate_angle == 270) {
temp = rect->x; temp = rect->x;
rect->x = rect->y; rect->x = rect->y;
rect->y = symbol->vector->width - (temp + rect->width); rect->y = symbol->vector->width - (temp + rect->width);
@ -295,13 +293,11 @@ static void vector_rotate(struct zint_symbol *symbol, int rotate_angle) {
hex->x = symbol->vector->height - hex->y; hex->x = symbol->vector->height - hex->y;
hex->y = temp; hex->y = temp;
hex->rotation = 90; hex->rotation = 90;
} } else if (rotate_angle == 180) {
if (rotate_angle == 180) {
hex->x = symbol->vector->width - hex->x; hex->x = symbol->vector->width - hex->x;
hex->y = symbol->vector->height - hex->y; hex->y = symbol->vector->height - hex->y;
hex->rotation = 180; hex->rotation = 180;
} } else if (rotate_angle == 270) {
if (rotate_angle == 270) {
temp = hex->x; temp = hex->x;
hex->x = hex->y; hex->x = hex->y;
hex->y = symbol->vector->width - temp; hex->y = symbol->vector->width - temp;
@ -316,12 +312,10 @@ static void vector_rotate(struct zint_symbol *symbol, int rotate_angle) {
temp = circle->x; temp = circle->x;
circle->x = symbol->vector->height - circle->y; circle->x = symbol->vector->height - circle->y;
circle->y = temp; circle->y = temp;
} } else if (rotate_angle == 180) {
if (rotate_angle == 180) {
circle->x = symbol->vector->width - circle->x; circle->x = symbol->vector->width - circle->x;
circle->y = symbol->vector->height - circle->y; circle->y = symbol->vector->height - circle->y;
} } else if (rotate_angle == 270) {
if (rotate_angle == 270) {
temp = circle->x; temp = circle->x;
circle->x = circle->y; circle->x = circle->y;
circle->y = symbol->vector->width - temp; circle->y = symbol->vector->width - temp;
@ -336,13 +330,11 @@ static void vector_rotate(struct zint_symbol *symbol, int rotate_angle) {
string->x = symbol->vector->height - string->y; string->x = symbol->vector->height - string->y;
string->y = temp; string->y = temp;
string->rotation = 90; string->rotation = 90;
} } else if (rotate_angle == 180) {
if (rotate_angle == 180) {
string->x = symbol->vector->width - string->x; string->x = symbol->vector->width - string->x;
string->y = symbol->vector->height - string->y; string->y = symbol->vector->height - string->y;
string->rotation = 180; string->rotation = 180;
} } else if (rotate_angle == 270) {
if (rotate_angle == 270) {
temp = string->x; temp = string->x;
string->x = string->y; string->x = string->y;
string->y = symbol->vector->width - temp; string->y = symbol->vector->width - temp;

View File

@ -44,7 +44,7 @@ extern "C" {
struct zint_vector_rect { struct zint_vector_rect {
float x, y, height, width; float x, y, height, width;
int colour; /* -1 for foreground, 1-8 for Cyan, Blue, Magenta, Red, Yellow, Green, Black, White */ int colour; /* -1 for foreground, 1-8 for Cyan, Blue, Magenta, Red, Yellow, Green, Black, White */
struct zint_vector_rect *next; struct zint_vector_rect *next; /* Pointer to next rectangle */
}; };
struct zint_vector_hexagon { struct zint_vector_hexagon {
@ -86,11 +86,11 @@ extern "C" {
int whitespace_height; /* Height in X-dimensions of whitespace above & below the barcode */ int whitespace_height; /* Height in X-dimensions of whitespace above & below the barcode */
int border_width; /* Size of border in X-dimensions */ int border_width; /* Size of border in X-dimensions */
int output_options; /* Various output parameters (bind, box etc, see below) */ int output_options; /* Various output parameters (bind, box etc, see below) */
char fgcolour[10]; /* Foreground as RGB/RGBA hexadecimal string, 6 or 8 characters */ char fgcolour[10]; /* Foreground as RGB/RGBA hexadecimal string, 6 or 8 characters, NUL-terminated */
char bgcolour[10]; /* Background as RGB/RGBA hexadecimal string, 6 or 8 characters */ char bgcolour[10]; /* Background as RGB/RGBA hexadecimal string, 6 or 8 characters, NUL-terminated */
char *fgcolor; /* Pointer to fgcolour (alternate spelling) */ char *fgcolor; /* Pointer to fgcolour (alternate spelling) */
char *bgcolor; /* Pointer to bgcolour (alternate spelling) */ char *bgcolor; /* Pointer to bgcolour (alternate spelling) */
char outfile[256]; /* Name of file to output to. Default "out.png" ("out.gif" if NO_PNG) */ char outfile[256]; /* Name of file to output to, NUL-terminated. Default "out.png" ("out.gif" if NO_PNG) */
float scale; /* Scale factor when printing barcode */ float scale; /* Scale factor when printing barcode */
int option_1; /* Symbol-specific options (see "../docs/manual.txt") */ int option_1; /* Symbol-specific options (see "../docs/manual.txt") */
int option_2; /* Symbol-specific options */ int option_2; /* Symbol-specific options */
@ -99,13 +99,13 @@ extern "C" {
int fontsize; /* Unused */ int fontsize; /* Unused */
int input_mode; /* Encoding of input data (see DATA_MODE etc below). Default DATA_MODE */ int input_mode; /* Encoding of input data (see DATA_MODE etc below). Default DATA_MODE */
int eci; /* Extended Channel Interpretation. Default 0 (none) */ int eci; /* Extended Channel Interpretation. Default 0 (none) */
unsigned char text[128]; /* Human Readable Text (if any), UTF-8 */ unsigned char text[128]; /* Human Readable Text (if any), UTF-8, NUL-terminated (output only) */
int rows; /* Number of rows used by the symbol (output only) */ int rows; /* Number of rows used by the symbol (output only) */
int width; /* Width of the generated symbol (output only) */ int width; /* Width of the generated symbol (output only) */
char primary[128]; /* Primary message data (MaxiCode, Composite) */ char primary[128]; /* Primary message data (MaxiCode, Composite), NUL-terminated */
unsigned char encoded_data[200][143]; /* Encoded data (output only). Allows for rows of 1144 modules */ unsigned char encoded_data[200][143]; /* Encoded data (output only). Allows for rows of 1144 modules */
float row_height[200]; /* Heights of rows (output only). Allows for 200 row DotCode */ float row_height[200]; /* Heights of rows (output only). Allows for 200 row DotCode */
char errtxt[100]; /* Error message if an error or warning occurs (output only) */ char errtxt[100]; /* Error message if an error or warning occurs, NUL-terminated (output only) */
unsigned char *bitmap; /* Stored bitmap image (raster output only) */ unsigned char *bitmap; /* Stored bitmap image (raster output only) */
int bitmap_width; /* Width of bitmap image (raster output only) */ int bitmap_width; /* Width of bitmap image (raster output only) */
int bitmap_height; /* Height of bitmap image (raster output only) */ int bitmap_height; /* Height of bitmap image (raster output only) */

View File

@ -446,8 +446,8 @@ command
zint -r -d "This" zint -r -d "This"
gives an inverted Code 128 symbol. This is not practical for most symbologies gives an inverted Code 128 symbol. This is not practical for most symbologies
but white-on-black is allowed by the Data Matrix and Aztec Code but white-on-black is allowed by the Data Matrix and Aztec Code symbology
symbology specifications. specifications.
For more specific needs the foreground (ink) and background (paper) colours can For more specific needs the foreground (ink) and background (paper) colours can
be specified using the --fg= and --bg= options followed by a number in RRGGBB be specified using the --fg= and --bg= options followed by a number in RRGGBB
@ -458,7 +458,7 @@ zint --fg=004700 -d "This"
alters the symbol to a dark green. alters the symbol to a dark green.
Zint also supports RGBA colour information for some output file formats which Zint also supports RGBA colour information for some output file formats which
support alpha channels (currently only PNG and SVG) in a RRGGBBAA format. support alpha channels (currently only PNG, TIF and SVG) in a RRGGBBAA format.
For example: For example:
zint --fg=00ff0055 -d "This" zint --fg=00ff0055 -d "This"
@ -473,7 +473,7 @@ will give different results for PNG and SVG. Experimentation is advised!
Also note that these options don't work properly with MaxiCode yet. Also note that these options don't work properly with MaxiCode yet.
In addition the --nobackground option will simply remove the background from In addition the --nobackground option will simply remove the background from
PNG, GIF, SVG, EMF and EPS files. PNG, GIF, TIF, SVG, EMF and EPS files.
4.8 Rotating the Symbol 4.8 Rotating the Symbol
----------------------- -----------------------
@ -736,11 +736,11 @@ Input | Filenames Generated
4.12 Direct output 4.12 Direct output
------------------ ------------------
The finished image files can be output directly to stdout for use as part of The finished image files can be output directly to stdout for use as part of a
a pipe by using the --direct option. By default --direct will output data pipe by using the --direct option. By default --direct will output data as a PNG
as a PNG image, but this can be altered by supplementing the --direct option image (or GIF image if libpng is not present), but this can be altered by
with a --filetype= option followed by the suffix of the file type required. supplementing the --direct option with a --filetype= option followed by the
For example: suffix of the file type required. For example:
zint -b 84 --direct --filetype=pcx -d "Data to encode" zint -b 84 --direct --filetype=pcx -d "Data to encode"
@ -1081,6 +1081,8 @@ outfile | character | Contains the name of the | "out.png"
| | Must end in .png, .gif, | | | Must end in .png, .gif, |
| | .bmp, .emf, .eps, .pcx, | | | .bmp, .emf, .eps, .pcx, |
| | .svg, .tif or .txt | | | .svg, .tif or .txt |
| | followed by a terminat- |
| | ing \0. |
scale | float | Scale factor for adjusting | 1.0 scale | float | Scale factor for adjusting | 1.0
| | size of image. | | | size of image. |
option_1 | integer | Symbol specific options. | -1 option_1 | integer | Symbol specific options. | -1
@ -1095,9 +1097,11 @@ text | unsigned | Human Readable Text, which | "" (empty)
| character | usually consists of in- | | character | usually consists of in- |
| string | put data plus one more | | string | put data plus one more |
| | check digit. Uses UTF-8 | | | check digit. Uses UTF-8 |
| | formatting. | | | formatting, with a |
| | terminating \0. |
primary | character | Primary message data for | "" (empty) primary | character | Primary message data for | "" (empty)
| string | more complex symbols. | | string | more complex symbols, |
| | with a terminating \0. |
dot_size | float | Size of dots used in dotty | 4.0 / 5.0 dot_size | float | Size of dots used in dotty | 4.0 / 5.0
| | mode. | | | mode. |
rows | integer | Number of rows used by the | (output only) rows | integer | Number of rows used by the | (output only)
@ -1105,12 +1109,14 @@ rows | integer | Number of rows used by the | (output only)
width | integer | Width of the generated sym- | (output only) width | integer | Width of the generated sym- | (output only)
| | bol. | | | bol. |
encoding_data | array of | Representation of the | (output only) encoding_data | array of | Representation of the | (output only)
| character | encoded data. | | unsigned | encoded data. |
| strings | | | character | |
| arrays | |
row_height | array of | Representation of the | (output only) row_height | array of | Representation of the | (output only)
| floats | height of a row. | | floats | height of a row. |
errtxt | character | Error message in the event | (output only) errtxt | character | Error message in the event | (output only)
| string | that an error occurred. | | string | that an error occurred, |
| | with a terminating \0. |
bitmap | pointer to | Pointer to stored bitmap | (output only) bitmap | pointer to | Pointer to stored bitmap | (output only)
| unsigned | image. | | unsigned | image. |
| character | | | character | |
@ -1153,7 +1159,7 @@ int main(int argc, char **argv)
return 0; return 0;
} }
Background removal for PNG, GIF, SVG, EMF and EPS files can be achieved by Background removal for PNG, GIF, TIF, SVG, EMF and EPS files can be achieved by
setting the background alpha to "00" where the values for R, G and B will be setting the background alpha to "00" where the values for R, G and B will be
ignored: ignored:
@ -1376,7 +1382,7 @@ and will continue to be supported in future versions.
5.9 Adjusting other output options 5.9 Adjusting other output options
---------------------------------- ----------------------------------
The output_options variable can be used to adjust various aspects of the output The output_options variable can be used to adjust various aspects of the output
file. To select more than one option from the table below simply or them file. To select more than one option from the table below simply OR them
together when adjusting this value: together when adjusting this value:
my_symbol->output_options |= BARCODE_BIND | READER_INIT; my_symbol->output_options |= BARCODE_BIND | READER_INIT;
@ -1413,7 +1419,7 @@ property. Valid values are shown in the table below.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Value | Effect Value | Effect
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
DATA_MODE | Uses full ASCII range interpreted as Latin-1 or binary data. DATA_MODE | Uses full 8-bit range interpreted as Latin-1 or binary data.
UNICODE_MODE | Uses pre-formatted UTF-8 input. UNICODE_MODE | Uses pre-formatted UTF-8 input.
GS1_MODE | Encodes GS1 data using FNC1 characters. GS1_MODE | Encodes GS1 data using FNC1 characters.
----------------|-------------------------------------------------------------- ----------------|--------------------------------------------------------------
@ -1475,7 +1481,7 @@ This can be determined using another additional function:
unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag); unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag);
by oring the flags below in the "cap_flag" argument and checking the return to by OR-ing the flags below in the "cap_flag" argument and checking the return to
see which are set. see which are set.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -2789,7 +2795,7 @@ to a maximum of approximately 450 characters (or 900 numeric digits). The
symbology supports ECI encoding and GS1 data encoding. By default Zint will symbology supports ECI encoding and GS1 data encoding. By default Zint will
produce a symbol which is approximately square, however the width of the symbol produce a symbol which is approximately square, however the width of the symbol
can be adjusted by using the --cols= option or by setting option_2 (maximum can be adjusted by using the --cols= option or by setting option_2 (maximum
200). Outputting DotCode to raster images (PNG, GIF, BMP, PCX) will require 200). Outputting DotCode to raster images (PNG, GIF, BMP, PCX, TIF) will require
setting the scale of the image to a larger value than the default (e.g. approx setting the scale of the image to a larger value than the default (e.g. approx
10) for the dots to be plotted correctly. Approximately 33% of the resulting 10) for the dots to be plotted correctly. Approximately 33% of the resulting
symbol is comprised of error correction codewords. symbol is comprised of error correction codewords.
@ -3145,8 +3151,8 @@ F | SI | US | / | ? | O | _ | o | DEL
A.2 Latin Alphabet No 1 (ISO/IEC 8859-1) A.2 Latin Alphabet No 1 (ISO/IEC 8859-1)
---------------------------------------- ----------------------------------------
A common extension to the ASCII standard, Latin-1 is used to expand the range A common extension to the ASCII standard, Latin-1 is used to expand the range
of Code 128, PDF417 and other symbols. Input strings should be in Unicode of Code 128, PDF417 and other symbols. Input strings to the CLI should be in
(UTF-8) format Unicode (UTF-8) format, unless the --binary switch is given.
------------------------------------------------------ ------------------------------------------------------
Hex | 8 | 9 | A | B | C | D | E | F Hex | 8 | 9 | A | B | C | D | E | F
@ -3168,4 +3174,3 @@ D | | | SHY | ½ | Í | Ý | í | ý
E | | | ® | ¾ | Î | Þ | î | þ E | | | ® | ¾ | Î | Þ | î | þ
F | | | ¯ | ¿ | Ï | ß | ï | ÿ F | | | ¯ | ¿ | Ï | ß | ï | ÿ
------------------------------------------------------ ------------------------------------------------------

View File

@ -3,7 +3,7 @@
# Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org> # Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
# vim: set ts=4 sw=4 et : # vim: set ts=4 sw=4 et :
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.5)
project(zint_frontend_tests) project(zint_frontend_tests)
enable_testing() enable_testing()

View File

@ -167,6 +167,9 @@ Administrator privileges) is to create two sub-directories in
"zlib\zlib.lib" and "lpng\build\Release\libpng16_static.lib" into "lib". "zlib\zlib.lib" and "lpng\build\Release\libpng16_static.lib" into "lib".
You may need to rename "libpng16_static.lib" to "libpng.lib" depending on the
version of cmake you have.
This example uses Qt 5.15.2 and component "MSVC 2019 32-bit" so install them and This example uses Qt 5.15.2 and component "MSVC 2019 32-bit" so install them and
add to path (your path may differ): add to path (your path may differ):