mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
BC412: height calc, table typo fix, tests, manual
This commit is contained in:
parent
4e2c467718
commit
2a55f15135
@ -19,7 +19,7 @@ Changes
|
|||||||
- GUI: export window: add no. of sequences to results label
|
- GUI: export window: add no. of sequences to results label
|
||||||
- frontend: batch: for @ use + instead of * on Windows as * not allowed
|
- frontend: batch: for @ use + instead of * on Windows as * not allowed
|
||||||
in filenames
|
in filenames
|
||||||
- Add symbology BC412 (beta)
|
- Add new symbology BC412 (SEMI T1-95)
|
||||||
- backend: use alloca() (z_alloca()) for both Unix and Windows
|
- backend: use alloca() (z_alloca()) for both Unix and Windows
|
||||||
- GS1: new AI 4309 with latlong checker, new currency code 925
|
- GS1: new AI 4309 with latlong checker, new currency code 925
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ static const char BC412Table[35][8] = {
|
|||||||
{'1','1','1','2','1','4','1','1'}, {'1','1','1','5','1','1','1','1'},
|
{'1','1','1','2','1','4','1','1'}, {'1','1','1','5','1','1','1','1'},
|
||||||
{'1','5','1','1','1','1','1','1'}, {'1','1','1','1','1','5','1','1'},
|
{'1','5','1','1','1','1','1','1'}, {'1','1','1','1','1','5','1','1'},
|
||||||
{'1','2','1','3','1','2','1','1'}, {'1','3','1','2','1','1','1','2'},
|
{'1','2','1','3','1','2','1','1'}, {'1','3','1','2','1','1','1','2'},
|
||||||
{'1','3','1','1','1','2','1','2'}, {'1','1','1','1','1','2','1','4'},
|
{'1','3','1','1','1','3','1','1'}, {'1','1','1','1','1','2','1','4'},
|
||||||
{'1','2','1','2','1','1','1','3'}, {'1','1','1','1','1','3','1','3'},
|
{'1','2','1','2','1','1','1','3'}, {'1','1','1','1','1','3','1','3'},
|
||||||
{'1','3','1','1','1','1','1','3'}, {'1','1','1','2','1','2','1','3'},
|
{'1','3','1','1','1','1','1','3'}, {'1','1','1','2','1','2','1','3'},
|
||||||
{'1','1','1','4','1','1','1','2'}, {'1','1','1','2','1','3','1','2'},
|
{'1','1','1','4','1','1','1','2'}, {'1','1','1','2','1','3','1','2'},
|
||||||
@ -66,7 +66,7 @@ static const char BC412Table[35][8] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int length) { /* IBM BC412 */
|
INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int length) { /* IBM BC412 */
|
||||||
unsigned char padded_source[19];
|
unsigned char padded_source[20];
|
||||||
int posns[35];
|
int posns[35];
|
||||||
int i, counter_odd = 0, counter_even = 0, check_sum = 0;
|
int i, counter_odd = 0, counter_even = 0, check_sum = 0;
|
||||||
char dest[293]; /* 2 + (36 * 8) + 3 */
|
char dest[293]; /* 2 + (36 * 8) + 3 */
|
||||||
@ -74,7 +74,7 @@ INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int lengt
|
|||||||
int error_number = 0;
|
int error_number = 0;
|
||||||
|
|
||||||
if ((length < 7) || (length > 18)) {
|
if ((length < 7) || (length > 18)) {
|
||||||
strcpy(symbol->errtxt, "nan: Input wrong length (should be between 7 and 18 characters)");
|
strcpy(symbol->errtxt, "790: Input wrong length (should be between 7 and 18 characters)");
|
||||||
return ZINT_ERROR_TOO_LONG;
|
return ZINT_ERROR_TOO_LONG;
|
||||||
}
|
}
|
||||||
to_upper(source, length);
|
to_upper(source, length);
|
||||||
@ -88,7 +88,7 @@ INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int lengt
|
|||||||
padded_source[length + 1] = 0;
|
padded_source[length + 1] = 0;
|
||||||
|
|
||||||
if (!is_sane_lookup(BROMINE, 35, padded_source, length + 1, posns)) {
|
if (!is_sane_lookup(BROMINE, 35, padded_source, length + 1, posns)) {
|
||||||
strcpy(symbol->errtxt, "nan: Invalid character in data");
|
strcpy(symbol->errtxt, "791: Invalid character in data (alphanumerics only, excluding the letter \"O\")");
|
||||||
return ZINT_ERROR_INVALID_DATA;
|
return ZINT_ERROR_INVALID_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,15 @@ INTERNAL int bc412(struct zint_symbol *symbol, unsigned char source[], int lengt
|
|||||||
expand(symbol, dest, d - dest);
|
expand(symbol, dest, d - dest);
|
||||||
ustrcpy(symbol->text, padded_source);
|
ustrcpy(symbol->text, padded_source);
|
||||||
|
|
||||||
/* TODO: exact dimensions / whitespace required */
|
if (symbol->output_options & COMPLIANT_HEIGHT) {
|
||||||
|
/* SEMI T1-95 Table 1 "Module" (Character) Height 2mm ± 0.025mm, using Module Spacing 0.12mm ± 0.025mm as
|
||||||
|
X-dimension */
|
||||||
|
error_number = set_height(symbol, stripf(1.975f / 0.145f), stripf(2.0f / 0.12f), stripf(2.025f / 0.095f),
|
||||||
|
0 /*no_errtxt*/);
|
||||||
|
} else {
|
||||||
|
/* Using compliant height as default as no backwards compatibility to consider */
|
||||||
|
(void) set_height(symbol, 0.0f, stripf(2.0f / 0.12f), 0.0f, 1 /*no_errtxt*/);
|
||||||
|
}
|
||||||
|
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
@ -1846,7 +1846,6 @@ unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag) {
|
|||||||
case BARCODE_HIBC_128: /* See CODE128 */
|
case BARCODE_HIBC_128: /* See CODE128 */
|
||||||
case BARCODE_HIBC_PDF: /* See PDF417 */
|
case BARCODE_HIBC_PDF: /* See PDF417 */
|
||||||
case BARCODE_HIBC_MICPDF: /* See PDF417 */
|
case BARCODE_HIBC_MICPDF: /* See PDF417 */
|
||||||
case BARCODE_BC412: /* TODO: Find doc */
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result |= ZINT_CAP_COMPLIANT_HEIGHT;
|
result |= ZINT_CAP_COMPLIANT_HEIGHT;
|
||||||
|
@ -465,9 +465,12 @@ static int out_quiet_zones(const struct zint_symbol *symbol, const int hide_text
|
|||||||
/* AIMD/TSC15032-43 (v 0.99c) Section 9.2 */
|
/* AIMD/TSC15032-43 (v 0.99c) Section 9.2 */
|
||||||
*left = *right = *top = *bottom = 1.0f;
|
*left = *right = *top = *bottom = 1.0f;
|
||||||
done = 1;
|
done = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case BARCODE_BC412:
|
case BARCODE_BC412:
|
||||||
/* TODO: Find doc */
|
/* SEMI T1-95 Table 4 */
|
||||||
|
*left = *right = 10.0f;
|
||||||
|
done = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "testcommon.h"
|
#include "testcommon.h"
|
||||||
|
|
||||||
static void test_input(int index, int generate, int debug) {
|
static void test_input(int index, int debug) {
|
||||||
|
|
||||||
struct item {
|
struct item {
|
||||||
int input_mode;
|
int input_mode;
|
||||||
@ -45,14 +45,39 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
char *expected;
|
char *expected;
|
||||||
char *comment;
|
char *comment;
|
||||||
};
|
};
|
||||||
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { UNICODE_MODE, -1, -1, "123456", -1, ZINT_ERROR_TOO_LONG, 0, 0, "Error nan: Input wrong length (should be between 7 and 18 characters)", "" },
|
/* 0*/ { UNICODE_MODE, -1, -1, "123456", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 790: Input wrong length (should be between 7 and 18 characters)", "" },
|
||||||
|
/* 1*/ { UNICODE_MODE, -1, -1, "1234567890123456789", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 790: Input wrong length (should be between 7 and 18 characters)", "" },
|
||||||
|
/* 2*/ { UNICODE_MODE, -1, -1, "1234567", -1, 0, 1, 102, "1U234567", "" },
|
||||||
|
/* 3*/ { UNICODE_MODE, -1, -1, "1234567 ", -1, ZINT_ERROR_INVALID_DATA, -1, -1, "Error 791: Invalid character in data (alphanumerics only, excluding the letter \"O\")", "" },
|
||||||
|
/* 4*/ { UNICODE_MODE, -1, -1, "ABCDEFGHIJKLMNOPQR", -1, ZINT_ERROR_INVALID_DATA, -1, -1, "Error 791: Invalid character in data (alphanumerics only, excluding the letter \"O\")", "" },
|
||||||
|
/* 5*/ { UNICODE_MODE, -1, -1, "ABCDEFGHIJKLMNPQRS", -1, 0, 1, 234, "AQBCDEFGHIJKLMNPQRS", "" },
|
||||||
|
/* 6*/ { UNICODE_MODE, -1, -1, "STUVWXYZ1234567890", -1, 0, 1, 234, "SCTUVWXYZ1234567890", "" },
|
||||||
|
/* 7*/ { UNICODE_MODE, -1, -1, "abcdefghijklmnpqrs", -1, 0, 1, 234, "AQBCDEFGHIJKLMNPQRS", "" },
|
||||||
|
/* 8*/ { UNICODE_MODE, -1, -1, "123456789012345678", -1, 0, 1, 234, "1223456789012345678", "" },
|
||||||
|
/* 9*/ { UNICODE_MODE, -1, -1, "MMMMMMMMMMMMMMMMMM", -1, 0, 1, 234, "MTMMMMMMMMMMMMMMMMM", "" },
|
||||||
|
/* 10*/ { UNICODE_MODE, -1, -1, "00000000", -1, 0, 1, 114, "000000000", "" },
|
||||||
|
/* 11*/ { UNICODE_MODE, -1, -1, "000000000", -1, 0, 1, 126, "0000000000", "" },
|
||||||
|
/* 12*/ { UNICODE_MODE, -1, -1, "000S0S000S", -1, 0, 1, 138, "0S00S0S000S", "" },
|
||||||
|
/* 13*/ { UNICODE_MODE, -1, -1, "ZYXWVUTSRQP", -1, 0, 1, 150, "Z0YXWVUTSRQP", "" },
|
||||||
|
/* 14*/ { UNICODE_MODE, -1, -1, "0R9GLVHA8EZ4", -1, 0, 1, 162, "0DR9GLVHA8EZ4", "" },
|
||||||
|
/* 15*/ { UNICODE_MODE, -1, -1, "NTS1J2Q6C7DYK", -1, 0, 1, 174, "NRTS1J2Q6C7DYK", "" },
|
||||||
|
/* 16*/ { UNICODE_MODE, -1, -1, "TS1J2Q6C7DYKBU", -1, 0, 1, 186, "TWS1J2Q6C7DYKBU", "" },
|
||||||
|
/* 17*/ { UNICODE_MODE, -1, -1, "IX3FWP5M0R9GLVH", -1, 0, 1, 198, "IBX3FWP5M0R9GLVH", "" },
|
||||||
|
/* 18*/ { UNICODE_MODE, -1, -1, "R9GLVHA8EZ4NTS1J", -1, 0, 1, 210, "RY9GLVHA8EZ4NTS1J", "" },
|
||||||
|
/* 19*/ { UNICODE_MODE, -1, -1, "M5PWF3XIUBKYD7C6Q", -1, 0, 1, 222, "M35PWF3XIUBKYD7C6Q", "" },
|
||||||
|
/* 20*/ { UNICODE_MODE, -1, -1, "2J1STN4ZE8AHVLG90R", -1, 0, 1, 234, "2PJ1STN4ZE8AHVLG90R", "" },
|
||||||
|
/* 21*/ { UNICODE_MODE, -1, -1, "JJJJJJJJJJJJJJJJJJ", -1, 0, 1, 234, "J9JJJJJJJJJJJJJJJJJ", "" },
|
||||||
};
|
};
|
||||||
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 escaped[1024];
|
char bwipp_buf[8192];
|
||||||
|
char bwipp_msg[1024];
|
||||||
|
|
||||||
|
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||||
|
|
||||||
testStart("test_input");
|
testStart("test_input");
|
||||||
|
|
||||||
@ -63,24 +88,28 @@ static void test_input(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");
|
||||||
|
|
||||||
//symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
|
||||||
|
|
||||||
length = testUtilSetSymbol(symbol, BARCODE_BC412, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
length = testUtilSetSymbol(symbol, BARCODE_BC412, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
||||||
|
|
||||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
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);
|
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, %d, %d, \"%s\", %d, %s, %d, %d, \"%s\", \"%s\" },\n",
|
|
||||||
i, testUtilInputModeName(data[i].input_mode), data[i].option_1, data[i].option_2,
|
|
||||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
|
|
||||||
testUtilErrorName(data[i].ret), symbol->rows, symbol->width, symbol->errtxt, data[i].comment);
|
|
||||||
} else {
|
|
||||||
if (ret < ZINT_ERROR) {
|
if (ret < ZINT_ERROR) {
|
||||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, data[i].data);
|
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, data[i].data);
|
||||||
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_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((char *) symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
assert_zero(strcmp((char *) symbol->text, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->text, data[i].expected);
|
||||||
|
|
||||||
|
if (do_bwipp && testUtilCanBwipp(i, symbol, data[i].option_1, -1, -1, debug)) {
|
||||||
|
char modules_dump[8192 + 1];
|
||||||
|
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
|
||||||
|
ret = testUtilBwipp(i, symbol, data[i].option_1, -1, -1, data[i].data, length, NULL, bwipp_buf, sizeof(bwipp_buf), NULL);
|
||||||
|
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
||||||
|
|
||||||
|
ret = testUtilBwippCmp(symbol, bwipp_msg, bwipp_buf, modules_dump);
|
||||||
|
assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
|
||||||
|
i, testUtilBarcodeName(symbol->symbology), ret, bwipp_msg, bwipp_buf, modules_dump);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
assert_zero(strcmp(symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZBarcode_Delete(symbol);
|
ZBarcode_Delete(symbol);
|
||||||
@ -105,9 +134,12 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
char *expected;
|
char *expected;
|
||||||
};
|
};
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { UNICODE_MODE, -1, -1, "AQ45670", 0, 1, 102, 0, "SEMI T1-95 SPECIFICATION FOR BACK SURFACE BAR CODE; BWIPP TODO",
|
/* 0*/ { UNICODE_MODE, -1, -1, "AQ45670", 0, 1, 102, 1, "SEMI T1-95 Figure 2, same",
|
||||||
"100101000100100100010101000100010101000101010000010101001010000101001001000101001000100101010100000101"
|
"100101000100100100010101000100010101000101010000010101001010000101001001000101001000100101010100000101"
|
||||||
},
|
},
|
||||||
|
/* 1*/ { UNICODE_MODE, -1, -1, "A6BC1234", 0, 1, 114, 1, "https://www.grapecity.co.jp, same",
|
||||||
|
"100101000100100100100010100101001001000101000100010101000010100101010010000101010001000101010000100101010000010101"
|
||||||
|
},
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -117,7 +149,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
char bwipp_buf[8192];
|
char bwipp_buf[8192];
|
||||||
char bwipp_msg[1024];
|
char bwipp_msg[1024];
|
||||||
|
|
||||||
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); // Only do BWIPP test if asked, too slow otherwise
|
int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
|
||||||
|
|
||||||
testStart("test_encode");
|
testStart("test_encode");
|
||||||
|
|
||||||
@ -174,7 +206,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
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_input", test_input, 1, 1, 1 },
|
{ "test_input", test_input, 1, 0, 1 },
|
||||||
{ "test_encode", test_encode, 1, 1, 1 },
|
{ "test_encode", test_encode, 1, 1, 1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ static void test_checks(int index, int debug) {
|
|||||||
char *expected;
|
char *expected;
|
||||||
int expected_symbology;
|
int expected_symbology;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE128, -1, "1234", -1, -1, 3, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 217: Symbology does not support ECI switching", -1 },
|
/* 0*/ { BARCODE_CODE128, -1, "1234", -1, -1, 3, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 217: Symbology does not support ECI switching", -1 },
|
||||||
/* 1*/ { BARCODE_CODE128, -1, "1234", -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", -1 },
|
/* 1*/ { BARCODE_CODE128, -1, "1234", -1, -1, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", -1 },
|
||||||
@ -83,11 +83,11 @@ static void test_checks(int index, int debug) {
|
|||||||
/* 22*/ { BARCODE_GS1_128, -1, "[21]1234", -1, GS1_MODE, -1, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", -1 },
|
/* 22*/ { BARCODE_GS1_128, -1, "[21]1234", -1, GS1_MODE, -1, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", -1 },
|
||||||
/* 23*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 206: Symbology out of range", BARCODE_CODE128 },
|
/* 23*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 206: Symbology out of range", BARCODE_CODE128 },
|
||||||
/* 24*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
/* 24*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
||||||
/* 25*/ { 0, -1, "1", -1, -1, 1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 217: Symbology does not support ECI switching", BARCODE_CODE128 }, // Not supporting beats invalid ECI
|
/* 25*/ { 0, -1, "1", -1, -1, 1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 217: Symbology does not support ECI switching", BARCODE_CODE128 }, /* Not supporting beats invalid ECI */
|
||||||
/* 26*/ { 0, -1, "1", -1, -1, 1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
/* 26*/ { 0, -1, "1", -1, -1, 1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
||||||
/* 27*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, 0.009, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 221: Dot size out of range (0.01 to 20)", BARCODE_CODE128 },
|
/* 27*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, 0.009, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 221: Dot size out of range (0.01 to 20)", BARCODE_CODE128 },
|
||||||
/* 28*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, 0.009, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
/* 28*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, 0.009, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
||||||
/* 29*/ { 0, -1, "1", -1, -1, 1, 0, 0, 0, 0, -1, 0.009, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 217: Symbology does not support ECI switching", BARCODE_CODE128 }, // Invalid dot size no longer beats invalid ECI
|
/* 29*/ { 0, -1, "1", -1, -1, 1, 0, 0, 0, 0, -1, 0.009, -1, -1, ZINT_ERROR_INVALID_OPTION, "Error 217: Symbology does not support ECI switching", BARCODE_CODE128 }, /* Invalid dot size no longer beats invalid ECI */
|
||||||
/* 30*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, 0.009, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
/* 30*/ { 0, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, 0.009, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 206: Symbology out of range", -1 },
|
||||||
/* 31*/ { 5, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", BARCODE_C25STANDARD },
|
/* 31*/ { 5, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", BARCODE_C25STANDARD },
|
||||||
/* 32*/ { 5, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, 0, "", BARCODE_C25STANDARD },
|
/* 32*/ { 5, -1, "1", -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, 0, "", BARCODE_C25STANDARD },
|
||||||
@ -204,15 +204,15 @@ static void test_checks(int index, int debug) {
|
|||||||
/*143*/ { BARCODE_QRCODE, -1, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_USES_ECI, "Error 222: Encoded data includes ECI 13", -1 },
|
/*143*/ { BARCODE_QRCODE, -1, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_USES_ECI, "Error 222: Encoded data includes ECI 13", -1 },
|
||||||
/*144*/ { BARCODE_CODEONE, -1, "[01]12345678901231", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 512: ECI ignored for GS1 mode", -1 },
|
/*144*/ { BARCODE_CODEONE, -1, "[01]12345678901231", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 512: ECI ignored for GS1 mode", -1 },
|
||||||
/*145*/ { BARCODE_CODEONE, -1, "[01]12345678901231", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 512: ECI ignored for GS1 mode", -1 },
|
/*145*/ { BARCODE_CODEONE, -1, "[01]12345678901231", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 512: ECI ignored for GS1 mode", -1 },
|
||||||
/*146*/ { BARCODE_CODEONE, -1, "[01]12345678901234", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 512: ECI ignored for GS1 mode", -1 }, // Warning in encoder overrides library warnings
|
/*146*/ { BARCODE_CODEONE, -1, "[01]12345678901234", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 512: ECI ignored for GS1 mode", -1 }, /* Warning in encoder overrides library warnings */
|
||||||
/*147*/ { BARCODE_CODEONE, -1, "[01]12345678901234", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_NONCOMPLIANT, "Error 261: AI (01) position 14: Bad checksum '4', expected '1'", -1 }, // But not errors
|
/*147*/ { BARCODE_CODEONE, -1, "[01]12345678901234", -1, GS1_MODE, 3, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_NONCOMPLIANT, "Error 261: AI (01) position 14: Bad checksum '4', expected '1'", -1 }, /* But not errors */
|
||||||
/*148*/ { BARCODE_AZTEC, -1, "ก", -1, UNICODE_MODE, 13, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", -1 },
|
/*148*/ { BARCODE_AZTEC, -1, "ก", -1, UNICODE_MODE, 13, 0, 0, 0, 0, -1, -1, -1, -1, 0, "", -1 },
|
||||||
/*149*/ { BARCODE_AZTEC, -1, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_USES_ECI, "Warning 222: Encoded data includes ECI 13", -1 },
|
/*149*/ { BARCODE_AZTEC, -1, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_USES_ECI, "Warning 222: Encoded data includes ECI 13", -1 },
|
||||||
/*150*/ { BARCODE_AZTEC, -1, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_USES_ECI, "Error 222: Encoded data includes ECI 13", -1 },
|
/*150*/ { BARCODE_AZTEC, -1, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_USES_ECI, "Error 222: Encoded data includes ECI 13", -1 },
|
||||||
/*151*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, 13, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 503: Invalid error correction level - using default instead", -1 },
|
/*151*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, 13, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_INVALID_OPTION, "Warning 503: Invalid error correction level - using default instead", -1 },
|
||||||
/*152*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, 13, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 503: Invalid error correction level - using default instead", -1 },
|
/*152*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, 13, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 503: Invalid error correction level - using default instead", -1 },
|
||||||
/*153*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_USES_ECI, "Warning 222: Encoded data includes ECI 13", -1 }, // ECI warning trumps all other warnings
|
/*153*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, -1, ZINT_WARN_USES_ECI, "Warning 222: Encoded data includes ECI 13", -1 }, /* ECI warning trumps all other warnings */
|
||||||
/*154*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 503: Invalid error correction level - using default instead", -1 }, // But not errors
|
/*154*/ { BARCODE_AZTEC, 6, "ก", -1, UNICODE_MODE, -1, 0, 0, 0, 0, -1, -1, -1, WARN_FAIL_ALL, ZINT_ERROR_INVALID_OPTION, "Error 503: Invalid error correction level - using default instead", -1 }, /* But not errors */
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -285,7 +285,7 @@ static void test_checks_segs(int index, int debug) {
|
|||||||
|
|
||||||
char *expected;
|
char *expected;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE128, -1, { { NULL, 0, 0 }, { NULL, 0, 0 } }, 0, -1, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 205: No input data" },
|
/* 0*/ { BARCODE_CODE128, -1, { { NULL, 0, 0 }, { NULL, 0, 0 } }, 0, -1, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 205: No input data" },
|
||||||
/* 1*/ { BARCODE_CODE128, -1, { { NULL, 0, 0 }, { NULL, 0, 0 } }, 257, -1, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 771: Too many input segments (max 256)" },
|
/* 1*/ { BARCODE_CODE128, -1, { { NULL, 0, 0 }, { NULL, 0, 0 } }, 257, -1, -1, -1, ZINT_ERROR_INVALID_DATA, "Error 771: Too many input segments (max 256)" },
|
||||||
@ -345,7 +345,7 @@ static void test_input_data(int index, int debug) {
|
|||||||
|
|
||||||
char *expected;
|
char *expected;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE128, -1, "1234", -1, "", 0, "" },
|
/* 0*/ { BARCODE_CODE128, -1, "1234", -1, "", 0, "" },
|
||||||
/* 1*/ { BARCODE_GS1_128, -1, "[01]12345678901231", -1, "", 0, "" },
|
/* 1*/ { BARCODE_GS1_128, -1, "[01]12345678901231", -1, "", 0, "" },
|
||||||
@ -414,7 +414,7 @@ static void test_input_mode(int index, int debug) {
|
|||||||
|
|
||||||
int expected_input_mode;
|
int expected_input_mode;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { "1234", DATA_MODE, 0, DATA_MODE },
|
/* 0*/ { "1234", DATA_MODE, 0, DATA_MODE },
|
||||||
/* 1*/ { "1234", DATA_MODE | ESCAPE_MODE, 0, DATA_MODE | ESCAPE_MODE },
|
/* 1*/ { "1234", DATA_MODE | ESCAPE_MODE, 0, DATA_MODE | ESCAPE_MODE },
|
||||||
@ -422,9 +422,9 @@ static void test_input_mode(int index, int debug) {
|
|||||||
/* 3*/ { "1234", UNICODE_MODE | ESCAPE_MODE, 0, UNICODE_MODE | ESCAPE_MODE },
|
/* 3*/ { "1234", UNICODE_MODE | ESCAPE_MODE, 0, UNICODE_MODE | ESCAPE_MODE },
|
||||||
/* 4*/ { "[01]12345678901231", GS1_MODE, 0, GS1_MODE },
|
/* 4*/ { "[01]12345678901231", GS1_MODE, 0, GS1_MODE },
|
||||||
/* 5*/ { "[01]12345678901231", GS1_MODE | ESCAPE_MODE, 0, GS1_MODE | ESCAPE_MODE },
|
/* 5*/ { "[01]12345678901231", GS1_MODE | ESCAPE_MODE, 0, GS1_MODE | ESCAPE_MODE },
|
||||||
/* 6*/ { "1234", 4 | ESCAPE_MODE, 0, DATA_MODE }, // Unknown mode reset to bare DATA_MODE
|
/* 6*/ { "1234", 4 | ESCAPE_MODE, 0, DATA_MODE }, /* Unknown mode reset to bare DATA_MODE */
|
||||||
/* 7*/ { "1234", -1, 0, DATA_MODE },
|
/* 7*/ { "1234", -1, 0, DATA_MODE },
|
||||||
/* 8*/ { "1234", DATA_MODE | 0x10, 0, DATA_MODE | 0x10 }, // Unknown flags kept (but ignored)
|
/* 8*/ { "1234", DATA_MODE | 0x10, 0, DATA_MODE | 0x10 }, /* Unknown flags kept (but ignored) */
|
||||||
/* 9*/ { "1234", UNICODE_MODE | 0x10, 0, UNICODE_MODE | 0x10 },
|
/* 9*/ { "1234", UNICODE_MODE | 0x10, 0, UNICODE_MODE | 0x10 },
|
||||||
/* 10*/ { "[01]12345678901231", GS1_MODE | 0x20, 0, GS1_MODE | 0x20 },
|
/* 10*/ { "[01]12345678901231", GS1_MODE | 0x20, 0, GS1_MODE | 0x20 },
|
||||||
};
|
};
|
||||||
@ -574,7 +574,7 @@ static void test_escape_char_process(int index, int generate, int debug) {
|
|||||||
text = data[i].data;
|
text = data[i].data;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug |= ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
debug |= ZINT_DEBUG_TEST; /* Needed to get codeword dump in errtxt */
|
||||||
|
|
||||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode | ESCAPE_MODE, data[i].eci, -1 /*option_1*/, -1, -1, -1 /*output_options*/, text, -1, debug);
|
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode | ESCAPE_MODE, data[i].eci, -1 /*option_1*/, -1, -1, -1 /*output_options*/, text, -1, debug);
|
||||||
|
|
||||||
@ -600,7 +600,7 @@ static void test_escape_char_process(int index, int generate, int debug) {
|
|||||||
memcpy(&previous_symbol, symbol, sizeof(previous_symbol));
|
memcpy(&previous_symbol, symbol, sizeof(previous_symbol));
|
||||||
|
|
||||||
if (ret < ZINT_ERROR && !data[i].composite[0]) {
|
if (ret < ZINT_ERROR && !data[i].composite[0]) {
|
||||||
// Test from input file
|
/* Test from input file */
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
struct zint_symbol *symbol2;
|
struct zint_symbol *symbol2;
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ static void test_escape_char_process(int index, int generate, int debug) {
|
|||||||
symbol2 = ZBarcode_Create();
|
symbol2 = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol2 not created\n");
|
assert_nonnull(symbol, "Symbol2 not created\n");
|
||||||
|
|
||||||
symbol2->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
symbol2->debug = ZINT_DEBUG_TEST; /* Needed to get codeword dump in errtxt */
|
||||||
|
|
||||||
(void) testUtilSetSymbol(symbol2, data[i].symbology, data[i].input_mode | ESCAPE_MODE, data[i].eci, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
(void) testUtilSetSymbol(symbol2, data[i].symbology, data[i].input_mode | ESCAPE_MODE, data[i].eci, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||||
|
|
||||||
@ -642,7 +642,7 @@ static void test_cap(int index) {
|
|||||||
unsigned cap_flag;
|
unsigned cap_flag;
|
||||||
unsigned int expected;
|
unsigned int expected;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%2d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE128, ZINT_CAP_HRT, ZINT_CAP_HRT },
|
/* 0*/ { BARCODE_CODE128, ZINT_CAP_HRT, ZINT_CAP_HRT },
|
||||||
/* 1*/ { BARCODE_CODE128, ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_GS1, ZINT_CAP_HRT | ZINT_CAP_STACKABLE },
|
/* 1*/ { BARCODE_CODE128, ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_GS1, ZINT_CAP_HRT | ZINT_CAP_STACKABLE },
|
||||||
@ -749,6 +749,7 @@ static void test_cap_compliant_height(void) {
|
|||||||
case BARCODE_DBAR_OMNSTK_CC:
|
case BARCODE_DBAR_OMNSTK_CC:
|
||||||
case BARCODE_DBAR_EXPSTK_CC:
|
case BARCODE_DBAR_EXPSTK_CC:
|
||||||
case BARCODE_CHANNEL:
|
case BARCODE_CHANNEL:
|
||||||
|
case BARCODE_BC412:
|
||||||
assert_equal(ret, ZINT_CAP_COMPLIANT_HEIGHT, "symbol_id %d (%s) ret 0x%X != ZINT_CAP_COMPLIANT_HEIGHT\n", symbol_id, testUtilBarcodeName(symbol_id), ret);
|
assert_equal(ret, ZINT_CAP_COMPLIANT_HEIGHT, "symbol_id %d (%s) ret 0x%X != ZINT_CAP_COMPLIANT_HEIGHT\n", symbol_id, testUtilBarcodeName(symbol_id), ret);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -771,7 +772,7 @@ static void test_encode_file_empty(void) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
(void) remove(filename); // In case junk hanging around
|
(void) remove(filename); /* In case junk hanging around */
|
||||||
|
|
||||||
fstream = fopen(filename, "w+");
|
fstream = fopen(filename, "w+");
|
||||||
assert_nonnull(fstream, "fopen(%s) failed (%d)\n", filename, ferror(fstream));
|
assert_nonnull(fstream, "fopen(%s) failed (%d)\n", filename, ferror(fstream));
|
||||||
@ -801,7 +802,7 @@ static void test_encode_file_too_large(void) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
(void) remove(filename); // In case junk hanging around
|
(void) remove(filename); /* In case junk hanging around */
|
||||||
|
|
||||||
fstream = fopen(filename, "w+");
|
fstream = fopen(filename, "w+");
|
||||||
assert_nonnull(fstream, "fopen(%s) failed (%d)\n", filename, ferror(fstream));
|
assert_nonnull(fstream, "fopen(%s) failed (%d)\n", filename, ferror(fstream));
|
||||||
@ -821,7 +822,7 @@ static void test_encode_file_too_large(void) {
|
|||||||
testFinish();
|
testFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
// #181 Nico Gunkel OSS-Fuzz
|
/* #181 Nico Gunkel OSS-Fuzz */
|
||||||
static void test_encode_file_unreadable(void) {
|
static void test_encode_file_unreadable(void) {
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
int ret;
|
int ret;
|
||||||
@ -841,7 +842,7 @@ static void test_encode_file_unreadable(void) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
// Unreadable file
|
/* Unreadable file */
|
||||||
fd = creat(filename, S_IWUSR);
|
fd = creat(filename, S_IWUSR);
|
||||||
assert_notequal(fd, -1, "Unreadable input file (%s) not created == -1 (%d: %s)\n", filename, errno, strerror(errno));
|
assert_notequal(fd, -1, "Unreadable input file (%s) not created == -1 (%d: %s)\n", filename, errno, strerror(errno));
|
||||||
ret = write(fd, buf, 1);
|
ret = write(fd, buf, 1);
|
||||||
@ -861,7 +862,7 @@ static void test_encode_file_unreadable(void) {
|
|||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
// #181 Nico Gunkel OSS-Fuzz (buffer not freed on fread() error) Note: unable to reproduce fread() error using this method
|
/* #181 Nico Gunkel OSS-Fuzz (buffer not freed on fread() error) Note: unable to reproduce fread() error using this method */
|
||||||
static void test_encode_file_directory(void) {
|
static void test_encode_file_directory(void) {
|
||||||
int ret;
|
int ret;
|
||||||
struct zint_symbol *symbol;
|
struct zint_symbol *symbol;
|
||||||
@ -872,7 +873,7 @@ static void test_encode_file_directory(void) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
(void) testUtilRmDir(dirname); // In case junk hanging around
|
(void) testUtilRmDir(dirname); /* In case junk hanging around */
|
||||||
ret = testUtilMkDir(dirname);
|
ret = testUtilMkDir(dirname);
|
||||||
assert_zero(ret, "testUtilMkDir(%s) %d != 0 (%d: %s)\n", dirname, ret, errno, strerror(errno));
|
assert_zero(ret, "testUtilMkDir(%s) %d != 0 (%d: %s)\n", dirname, ret, errno, strerror(errno));
|
||||||
|
|
||||||
@ -897,8 +898,8 @@ static void test_encode_file(void) {
|
|||||||
|
|
||||||
testStart("test_encode_file");
|
testStart("test_encode_file");
|
||||||
|
|
||||||
(void) remove(filename); // In case junk hanging around
|
(void) remove(filename); /* In case junk hanging around */
|
||||||
(void) remove(outfile); // In case junk hanging around
|
(void) remove(outfile); /* In case junk hanging around */
|
||||||
|
|
||||||
fp = fopen(filename, "w+");
|
fp = fopen(filename, "w+");
|
||||||
assert_nonnull(fp, "fopen(%s) failed (%d)\n", filename, ferror(fp));
|
assert_nonnull(fp, "fopen(%s) failed (%d)\n", filename, ferror(fp));
|
||||||
@ -960,7 +961,7 @@ static void test_encode_print_outfile_directory(void) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
(void) testUtilRmDir(dirname); // In case junk hanging around
|
(void) testUtilRmDir(dirname); /* In case junk hanging around */
|
||||||
ret = testUtilMkDir(dirname);
|
ret = testUtilMkDir(dirname);
|
||||||
assert_zero(ret, "testUtilMkDir(%s) %d != 0 (%d: %s)\n", dirname, ret, errno, strerror(errno));
|
assert_zero(ret, "testUtilMkDir(%s) %d != 0 (%d: %s)\n", dirname, ret, errno, strerror(errno));
|
||||||
|
|
||||||
@ -988,7 +989,7 @@ static void test_bad_args(void) {
|
|||||||
|
|
||||||
testStart("test_bad_args");
|
testStart("test_bad_args");
|
||||||
|
|
||||||
// These just return, no error
|
/* These just return, no error */
|
||||||
ZBarcode_Clear(NULL);
|
ZBarcode_Clear(NULL);
|
||||||
ZBarcode_Delete(NULL);
|
ZBarcode_Delete(NULL);
|
||||||
|
|
||||||
@ -996,14 +997,14 @@ static void test_bad_args(void) {
|
|||||||
assert_nonzero(ret >= 20901, "ZBarcode_Version() %d <= 20901\n", ret);
|
assert_nonzero(ret >= 20901, "ZBarcode_Version() %d <= 20901\n", ret);
|
||||||
|
|
||||||
assert_zero(ZBarcode_ValidID(0), "ZBarcode_ValidID(0) non-zero\n");
|
assert_zero(ZBarcode_ValidID(0), "ZBarcode_ValidID(0) non-zero\n");
|
||||||
assert_zero(ZBarcode_ValidID(10), "ZBarcode_ValidID(10) non-zero\n"); // Note 10 remapped to BARCODE_EANX in ZBarcode_Encode() for tbarcode compat but not counted as valid
|
assert_zero(ZBarcode_ValidID(10), "ZBarcode_ValidID(10) non-zero\n"); /* Note 10 remapped to BARCODE_EANX in ZBarcode_Encode() for tbarcode compat but not counted as valid */
|
||||||
|
|
||||||
ret = ZBarcode_Cap(0, ~0);
|
ret = ZBarcode_Cap(0, ~0);
|
||||||
assert_zero(ret, "ZBarcode_Cap(0, ~0) ret 0x%X != 0\n", ret);
|
assert_zero(ret, "ZBarcode_Cap(0, ~0) ret 0x%X != 0\n", ret);
|
||||||
ret = ZBarcode_Cap(10, ~0);
|
ret = ZBarcode_Cap(10, ~0);
|
||||||
assert_zero(ret, "ZBarcode_Cap(10, ~0) ret 0x%X != 0\n", ret);
|
assert_zero(ret, "ZBarcode_Cap(10, ~0) ret 0x%X != 0\n", ret);
|
||||||
|
|
||||||
// NULL symbol
|
/* NULL symbol */
|
||||||
assert_equal(ZBarcode_Encode(NULL, TU(data), 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode(NULL, data, 1) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode(NULL, TU(data), 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode(NULL, data, 1) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_equal(ZBarcode_Encode_Segs(NULL, &seg, 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_Segs(NULL, &seg, 1) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode_Segs(NULL, &seg, 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_Segs(NULL, &seg, 1) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_equal(ZBarcode_Print(NULL, 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Print(NULL, 0) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Print(NULL, 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Print(NULL, 0) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
@ -1022,7 +1023,7 @@ static void test_bad_args(void) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
// NULL data/segs/filename
|
/* NULL data/segs/filename */
|
||||||
symbol->errtxt[0] = '\0';
|
symbol->errtxt[0] = '\0';
|
||||||
assert_equal(ZBarcode_Encode(symbol, NULL, 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode(symbol, NULL, 1) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode(symbol, NULL, 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode(symbol, NULL, 1) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode(symbol, NULL, 1) no errtxt\n");
|
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode(symbol, NULL, 1) no errtxt\n");
|
||||||
@ -1057,7 +1058,7 @@ static void test_bad_args(void) {
|
|||||||
assert_equal(ZBarcode_Encode_File_and_Buffer_Vector(symbol, NULL, 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_File_and_Buffer_Vector(symbol, NULL, 0) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode_File_and_Buffer_Vector(symbol, NULL, 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_File_and_Buffer_Vector(symbol, NULL, 0) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode_File_and_Buffer_Vector(symbol, NULL, 0) no errtxt\n");
|
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode_File_and_Buffer_Vector(symbol, NULL, 0) no errtxt\n");
|
||||||
|
|
||||||
// Empty data/segs/filename
|
/* Empty data/segs/filename */
|
||||||
symbol->errtxt[0] = '\0';
|
symbol->errtxt[0] = '\0';
|
||||||
assert_equal(ZBarcode_Encode(symbol, TU(empty), 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode(symbol, empty, 0) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode(symbol, TU(empty), 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode(symbol, empty, 0) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode(symbol, empty, 0) no errtxt\n");
|
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode(symbol, empty, 0) no errtxt\n");
|
||||||
@ -1092,7 +1093,7 @@ static void test_bad_args(void) {
|
|||||||
assert_equal(ZBarcode_Encode_File_and_Buffer_Vector(symbol, empty, 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_File_and_Buffer_Vector(symbol, empty, 0) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode_File_and_Buffer_Vector(symbol, empty, 0), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_File_and_Buffer_Vector(symbol, empty, 0) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode_File_and_Buffer_Vector(symbol, empty, 0) no errtxt\n");
|
assert_nonzero(strlen(symbol->errtxt), "ZBarcode_Encode_File_and_Buffer_Vector(symbol, empty, 0) no errtxt\n");
|
||||||
|
|
||||||
// Bad seg_count
|
/* Bad seg_count */
|
||||||
symbol->errtxt[0] = '\0';
|
symbol->errtxt[0] = '\0';
|
||||||
assert_equal(ZBarcode_Encode_Segs(symbol, &seg_empty, ZINT_MAX_SEG_COUNT + 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_Segs(symbol, &seg_empty, ZINT_MAX_SEG_COUNT + 1) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode_Segs(symbol, &seg_empty, ZINT_MAX_SEG_COUNT + 1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_Segs(symbol, &seg_empty, ZINT_MAX_SEG_COUNT + 1) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_nonzero((int) strlen(symbol->errtxt), "ZBarcode_Encode_Segs(symbol, &seg_empty, ZINT_MAX_SEG_COUNT + 1) no errtxt\n");
|
assert_nonzero((int) strlen(symbol->errtxt), "ZBarcode_Encode_Segs(symbol, &seg_empty, ZINT_MAX_SEG_COUNT + 1) no errtxt\n");
|
||||||
@ -1103,7 +1104,7 @@ static void test_bad_args(void) {
|
|||||||
assert_equal(ZBarcode_Encode_Segs(symbol, &seg_empty, -1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_Segs(symbol, &seg_empty, -1) != ZINT_ERROR_INVALID_DATA\n");
|
assert_equal(ZBarcode_Encode_Segs(symbol, &seg_empty, -1), ZINT_ERROR_INVALID_DATA, "ZBarcode_Encode_Segs(symbol, &seg_empty, -1) != ZINT_ERROR_INVALID_DATA\n");
|
||||||
assert_nonzero((int) strlen(symbol->errtxt), "ZBarcode_Encode_Segs(symbol, &seg_empty, -1) no errtxt\n");
|
assert_nonzero((int) strlen(symbol->errtxt), "ZBarcode_Encode_Segs(symbol, &seg_empty, -1) no errtxt\n");
|
||||||
|
|
||||||
// Data/seg too big
|
/* Data/seg too big */
|
||||||
symbol->errtxt[0] = '\0';
|
symbol->errtxt[0] = '\0';
|
||||||
assert_equal(ZBarcode_Encode(symbol, TU(empty), ZINT_MAX_DATA_LEN + 1), ZINT_ERROR_TOO_LONG, "ZBarcode_Encode(symbol, empty, ZINT_MAX_DATA_LEN + 1) != ZINT_ERROR_TOO_LONG\n");
|
assert_equal(ZBarcode_Encode(symbol, TU(empty), ZINT_MAX_DATA_LEN + 1), ZINT_ERROR_TOO_LONG, "ZBarcode_Encode(symbol, empty, ZINT_MAX_DATA_LEN + 1) != ZINT_ERROR_TOO_LONG\n");
|
||||||
assert_nonzero((int) strlen(symbol->errtxt), "ZBarcode_Encode(symbol, empty, ZINT_MAX_DATA_LEN + 1) no errtxt\n");
|
assert_nonzero((int) strlen(symbol->errtxt), "ZBarcode_Encode(symbol, empty, ZINT_MAX_DATA_LEN + 1) no errtxt\n");
|
||||||
@ -1151,7 +1152,7 @@ static void test_error_tag(int index) {
|
|||||||
int ret;
|
int ret;
|
||||||
char *expected;
|
char *expected;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { ZINT_WARN_INVALID_OPTION, -1, "", ZINT_WARN_INVALID_OPTION, "Warning " },
|
/* 0*/ { ZINT_WARN_INVALID_OPTION, -1, "", ZINT_WARN_INVALID_OPTION, "Warning " },
|
||||||
/* 1*/ { ZINT_WARN_INVALID_OPTION, WARN_FAIL_ALL, "", ZINT_ERROR_INVALID_OPTION, "Error " },
|
/* 1*/ { ZINT_WARN_INVALID_OPTION, WARN_FAIL_ALL, "", ZINT_ERROR_INVALID_OPTION, "Error " },
|
||||||
@ -1201,8 +1202,8 @@ INTERNAL void strip_bom_test(unsigned char *source, int *input_length);
|
|||||||
static void test_strip_bom(void) {
|
static void test_strip_bom(void) {
|
||||||
|
|
||||||
int length, ret;
|
int length, ret;
|
||||||
char data[] = "\357\273\277A"; // U+FEFF BOM, with "A"
|
char data[] = "\357\273\277A"; /* U+FEFF BOM, with "A" */
|
||||||
char bom_only[] = "\357\273\277"; // U+FEFF BOM only
|
char bom_only[] = "\357\273\277"; /* U+FEFF BOM only */
|
||||||
char buf[6];
|
char buf[6];
|
||||||
|
|
||||||
testStart("test_strip_bom");
|
testStart("test_strip_bom");
|
||||||
@ -1213,7 +1214,7 @@ static void test_strip_bom(void) {
|
|||||||
assert_equal(length, 1, "length %d != 1\n", length);
|
assert_equal(length, 1, "length %d != 1\n", length);
|
||||||
assert_zero(buf[1], "buf[1] %d != 0\n", buf[1]);
|
assert_zero(buf[1], "buf[1] %d != 0\n", buf[1]);
|
||||||
|
|
||||||
// BOM not stripped if only data
|
/* BOM not stripped if only data */
|
||||||
|
|
||||||
strcpy(buf, bom_only);
|
strcpy(buf, bom_only);
|
||||||
length = (int) strlen(buf);
|
length = (int) strlen(buf);
|
||||||
@ -1275,7 +1276,7 @@ static void test_clear(void) {
|
|||||||
strcpy(symbol->fgcolour, "000000AA");
|
strcpy(symbol->fgcolour, "000000AA");
|
||||||
strcpy(symbol->bgcolour, "FFFFFFAA");
|
strcpy(symbol->bgcolour, "FFFFFFAA");
|
||||||
|
|
||||||
// Raster
|
/* Raster */
|
||||||
|
|
||||||
ret = ZBarcode_Encode(symbol, TU(data), 0);
|
ret = ZBarcode_Encode(symbol, TU(data), 0);
|
||||||
assert_zero(ret, "ZBarcode_Encode() ret %d != 0 (%s)\n", ret, symbol->errtxt);
|
assert_zero(ret, "ZBarcode_Encode() ret %d != 0 (%s)\n", ret, symbol->errtxt);
|
||||||
@ -1308,7 +1309,7 @@ static void test_clear(void) {
|
|||||||
assert_zero(symbol->bitmap_byte_length, "ZBarcode_Buffer() bitmap_byte_length %d != 0\n", (int) symbol->bitmap_byte_length);
|
assert_zero(symbol->bitmap_byte_length, "ZBarcode_Buffer() bitmap_byte_length %d != 0\n", (int) symbol->bitmap_byte_length);
|
||||||
assert_null(symbol->vector, "ZBarcode_Buffer() vector != NULL\n");
|
assert_null(symbol->vector, "ZBarcode_Buffer() vector != NULL\n");
|
||||||
|
|
||||||
// Vector
|
/* Vector */
|
||||||
|
|
||||||
ret = ZBarcode_Encode(symbol, TU(data), 0);
|
ret = ZBarcode_Encode(symbol, TU(data), 0);
|
||||||
assert_zero(ret, "ZBarcode_Encode() ret %d != 0 (%s)\n", ret, symbol->errtxt);
|
assert_zero(ret, "ZBarcode_Encode() ret %d != 0 (%s)\n", ret, symbol->errtxt);
|
||||||
@ -1322,7 +1323,7 @@ static void test_clear(void) {
|
|||||||
assert_nonnull(symbol->vector, "ZBarcode_Buffer_Vector() vector NULL\n");
|
assert_nonnull(symbol->vector, "ZBarcode_Buffer_Vector() vector NULL\n");
|
||||||
assert_nonnull(symbol->vector->rectangles, "ZBarcode_Buffer_Vector() vector->rectangles NULL\n");
|
assert_nonnull(symbol->vector->rectangles, "ZBarcode_Buffer_Vector() vector->rectangles NULL\n");
|
||||||
assert_nonnull(symbol->vector->hexagons, "ZBarcode_Buffer_Vector() vector->hexagons NULL\n");
|
assert_nonnull(symbol->vector->hexagons, "ZBarcode_Buffer_Vector() vector->hexagons NULL\n");
|
||||||
assert_null(symbol->vector->strings, "ZBarcode_Buffer_Vector() vector->strings != NULL\n"); // MAXICODE no text
|
assert_null(symbol->vector->strings, "ZBarcode_Buffer_Vector() vector->strings != NULL\n"); /* MAXICODE no text */
|
||||||
assert_nonnull(symbol->vector->circles, "ZBarcode_Buffer_Vector() vector->circles NULL\n");
|
assert_nonnull(symbol->vector->circles, "ZBarcode_Buffer_Vector() vector->circles NULL\n");
|
||||||
|
|
||||||
assert_nonzero(symbol->rows, "ZBarcode_Buffer_Vector() rows 0\n");
|
assert_nonzero(symbol->rows, "ZBarcode_Buffer_Vector() rows 0\n");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
libzint - the open source barcode library
|
libzint - the open source barcode library
|
||||||
Copyright (C) 2019 - 2021 Robin Stuart <rstuart114@gmail.com>
|
Copyright (C) 2019-2022 Robin Stuart <rstuart114@gmail.com>
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions
|
modification, are permitted provided that the following conditions
|
||||||
@ -27,7 +27,7 @@
|
|||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
SUCH DAMAGE.
|
SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/* vim: set ts=4 sw=4 et : */
|
/* SPDX-License-Identifier: BSD-3-Clause */
|
||||||
|
|
||||||
#include "testcommon.h"
|
#include "testcommon.h"
|
||||||
|
|
||||||
@ -35,10 +35,10 @@ static int is_row_column_black(struct zint_symbol *symbol, int row, int column)
|
|||||||
int i;
|
int i;
|
||||||
if (symbol->output_options & OUT_BUFFER_INTERMEDIATE) {
|
if (symbol->output_options & OUT_BUFFER_INTERMEDIATE) {
|
||||||
i = row * symbol->bitmap_width + column;
|
i = row * symbol->bitmap_width + column;
|
||||||
return symbol->bitmap[i] == '1'; // Black
|
return symbol->bitmap[i] == '1'; /* Black */
|
||||||
}
|
}
|
||||||
i = (row * symbol->bitmap_width + column) * 3;
|
i = (row * symbol->bitmap_width + column) * 3;
|
||||||
return symbol->bitmap[i] == 0 && symbol->bitmap[i + 1] == 0 && symbol->bitmap[i + 2] == 0; // Black
|
return symbol->bitmap[i] == 0 && symbol->bitmap[i + 1] == 0 && symbol->bitmap[i + 2] == 0; /* Black */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_options(int index, int debug) {
|
static void test_options(int index, int debug) {
|
||||||
@ -55,7 +55,7 @@ static void test_options(int index, int debug) {
|
|||||||
int expected_bitmap_width;
|
int expected_bitmap_width;
|
||||||
int expected_bitmap_height;
|
int expected_bitmap_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE128, "123456", "7890AB", 0, "A", 0, 1, 46, 92, 116 },
|
/* 0*/ { BARCODE_CODE128, "123456", "7890AB", 0, "A", 0, 1, 46, 92, 116 },
|
||||||
/* 1*/ { BARCODE_CODE128, "123456", "7890ab", 90, "A", 0, 1, 46, 116, 92 },
|
/* 1*/ { BARCODE_CODE128, "123456", "7890ab", 90, "A", 0, 1, 46, 116, 92 },
|
||||||
@ -376,6 +376,8 @@ static void test_buffer(int index, int generate, int debug) {
|
|||||||
/*253*/ { BARCODE_ULTRA, COMPLIANT_HEIGHT, "1234567890", "", 13, 13, 18, 36, 26 },
|
/*253*/ { BARCODE_ULTRA, COMPLIANT_HEIGHT, "1234567890", "", 13, 13, 18, 36, 26 },
|
||||||
/*254*/ { BARCODE_RMQR, -1, "12345", "", 11, 11, 27, 54, 22 },
|
/*254*/ { BARCODE_RMQR, -1, "12345", "", 11, 11, 27, 54, 22 },
|
||||||
/*255*/ { BARCODE_RMQR, COMPLIANT_HEIGHT, "12345", "", 11, 11, 27, 54, 22 },
|
/*255*/ { BARCODE_RMQR, COMPLIANT_HEIGHT, "12345", "", 11, 11, 27, 54, 22 },
|
||||||
|
/*256*/ { BARCODE_BC412, -1, "1234567", "", 16.5, 1, 102, 204, 49 },
|
||||||
|
/*257*/ { BARCODE_BC412, COMPLIANT_HEIGHT, "1234567", "", 16.5, 1, 102, 204, 49 },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -388,7 +390,7 @@ static void test_buffer(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) printf("i:%d\n", i); // ZINT_DEBUG_TEST_PRINT 16
|
if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d\n", i); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
@ -408,7 +410,7 @@ static void test_buffer(int index, int generate, int debug) {
|
|||||||
assert_zero(ret, "i:%d ZBarcode_Buffer(%s) ret %d != 0 (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt);
|
assert_zero(ret, "i:%d ZBarcode_Buffer(%s) ret %d != 0 (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt);
|
||||||
assert_nonnull(symbol->bitmap, "i:%d ZBarcode_Buffer(%s) bitmap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
assert_nonnull(symbol->bitmap, "i:%d ZBarcode_Buffer(%s) bitmap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
if (generate) {
|
if (generate) {
|
||||||
printf(" /*%3d*/ { %s, %s, \"%s\", \"%s\", %.8g, %d, %d, %d, %d },\n",
|
printf(" /*%3d*/ { %s, %s, \"%s\", \"%s\", %.8g, %d, %d, %d, %d },\n",
|
||||||
@ -451,28 +453,28 @@ static void test_upcean_hrt(int index, int debug) {
|
|||||||
int expected_addon_text_col;
|
int expected_addon_text_col;
|
||||||
int expected_addon_text_len;
|
int expected_addon_text_len;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116, 102 /*text_row*/, 0, 20, -1, -1, -1 }, // EAN-13
|
/* 0*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116, 102 /*text_row*/, 0, 20, -1, -1, -1 }, /* EAN-13 */
|
||||||
/* 1*/ { BARCODE_EANX, 0, "123456789012", 0, 50, 1, 95, 226, 110, 102 /*text_row*/, 0, 20, -1, -1, -1 }, // EAN-13
|
/* 1*/ { BARCODE_EANX, 0, "123456789012", 0, 50, 1, 95, 226, 110, 102 /*text_row*/, 0, 20, -1, -1, -1 }, /* EAN-13 */
|
||||||
/* 2*/ { BARCODE_EANX_CHK, -1, "1234567890128", 0, 50, 1, 95, 226, 116, 102 /*text_row*/, 0, 20, -1, -1, -1 }, // EAN-13
|
/* 2*/ { BARCODE_EANX_CHK, -1, "1234567890128", 0, 50, 1, 95, 226, 116, 102 /*text_row*/, 0, 20, -1, -1, -1 }, /* EAN-13 */
|
||||||
/* 3*/ { BARCODE_EANX_CHK, 0, "1234567890128", 0, 50, 1, 95, 226, 110, 102 /*text_row*/, 0, 20, -1, -1, -1 }, // EAN-13
|
/* 3*/ { BARCODE_EANX_CHK, 0, "1234567890128", 0, 50, 1, 95, 226, 110, 102 /*text_row*/, 0, 20, -1, -1, -1 }, /* EAN-13 */
|
||||||
/* 4*/ { BARCODE_EANX_CHK, -1, "1234567890128+12", 0, 50, 1, 122, 276, 116, 102 /*text_row*/, 0, 20, 5, 212, 64 }, // EAN-13 + EAN-2
|
/* 4*/ { BARCODE_EANX_CHK, -1, "1234567890128+12", 0, 50, 1, 122, 276, 116, 102 /*text_row*/, 0, 20, 5, 212, 64 }, /* EAN-13 + EAN-2 */
|
||||||
/* 5*/ { BARCODE_EANX_CHK, 0, "1234567890128+12", 0, 50, 1, 122, 276, 110, 102 /*text_row*/, 0, 20, 5, 212, 64 }, // EAN-13 + EAN-2
|
/* 5*/ { BARCODE_EANX_CHK, 0, "1234567890128+12", 0, 50, 1, 122, 276, 110, 102 /*text_row*/, 0, 20, 5, 212, 64 }, /* EAN-13 + EAN-2 */
|
||||||
/* 6*/ { BARCODE_EANX, -1, "1234567890128+12345", 0, 50, 1, 149, 330, 116, 102 /*text_row*/, 0, 20, 5, 212, 118 }, // EAN-13 + EAN-5
|
/* 6*/ { BARCODE_EANX, -1, "1234567890128+12345", 0, 50, 1, 149, 330, 116, 102 /*text_row*/, 0, 20, 5, 212, 118 }, /* EAN-13 + EAN-5 */
|
||||||
/* 7*/ { BARCODE_EANX, 0, "1234567890128+12345", 0, 50, 1, 149, 330, 110, 102 /*text_row*/, 0, 20, 5, 212, 118 }, // EAN-13 + EAN-5
|
/* 7*/ { BARCODE_EANX, 0, "1234567890128+12345", 0, 50, 1, 149, 330, 110, 102 /*text_row*/, 0, 20, 5, 212, 118 }, /* EAN-13 + EAN-5 */
|
||||||
/* 8*/ { BARCODE_ISBNX, -1, "9784567890120+12345", 0, 50, 1, 149, 330, 116, 102 /*text_row*/, 0, 20, 5, 212, 118 }, // ISBNX + EAN-5
|
/* 8*/ { BARCODE_ISBNX, -1, "9784567890120+12345", 0, 50, 1, 149, 330, 116, 102 /*text_row*/, 0, 20, 5, 212, 118 }, /* ISBNX + EAN-5 */
|
||||||
/* 9*/ { BARCODE_ISBNX, 0, "9784567890120+12345", 0, 50, 1, 149, 330, 110, 102 /*text_row*/, 0, 20, 5, 212, 118 }, // ISBNX + EAN-5
|
/* 9*/ { BARCODE_ISBNX, 0, "9784567890120+12345", 0, 50, 1, 149, 330, 110, 102 /*text_row*/, 0, 20, 5, 212, 118 }, /* ISBNX + EAN-5 */
|
||||||
/* 10*/ { BARCODE_EANX, -1, "123456", 0, 50, 1, 67, 162, 116, 102 /*text_row*/, 20, 58, -1, -1, -1 }, // EAN-8
|
/* 10*/ { BARCODE_EANX, -1, "123456", 0, 50, 1, 67, 162, 116, 102 /*text_row*/, 20, 58, -1, -1, -1 }, /* EAN-8 */
|
||||||
/* 11*/ { BARCODE_EANX, 0, "123456", 0, 50, 1, 67, 162, 110, 102 /*text_row*/, 20, 58, -1, -1, -1 }, // EAN-8
|
/* 11*/ { BARCODE_EANX, 0, "123456", 0, 50, 1, 67, 162, 110, 102 /*text_row*/, 20, 58, -1, -1, -1 }, /* EAN-8 */
|
||||||
/* 12*/ { BARCODE_EANX, -1, "123456+12", 0, 50, 1, 94, 216, 116, 102 /*text_row*/, 20, 58, 5, 148, 68 }, // EAN-8 + EAN-2
|
/* 12*/ { BARCODE_EANX, -1, "123456+12", 0, 50, 1, 94, 216, 116, 102 /*text_row*/, 20, 58, 5, 148, 68 }, /* EAN-8 + EAN-2 */
|
||||||
/* 13*/ { BARCODE_EANX, 0, "123456+12", 0, 50, 1, 94, 216, 110, 102 /*text_row*/, 20, 58, 5, 148, 68 }, // EAN-8 + EAN-2
|
/* 13*/ { BARCODE_EANX, 0, "123456+12", 0, 50, 1, 94, 216, 110, 102 /*text_row*/, 20, 58, 5, 148, 68 }, /* EAN-8 + EAN-2 */
|
||||||
/* 14*/ { BARCODE_EANX, -1, "123456+12345", 0, 50, 1, 121, 270, 116, 102 /*text_row*/, 20, 58, 5, 148, 122 }, // EAN-8 + EAN-5
|
/* 14*/ { BARCODE_EANX, -1, "123456+12345", 0, 50, 1, 121, 270, 116, 102 /*text_row*/, 20, 58, 5, 148, 122 }, /* EAN-8 + EAN-5 */
|
||||||
/* 15*/ { BARCODE_EANX, 0, "123456+12345", 0, 50, 1, 121, 270, 110, 102 /*text_row*/, 20, 58, 5, 148, 122 }, // EAN-8 + EAN-5
|
/* 15*/ { BARCODE_EANX, 0, "123456+12345", 0, 50, 1, 121, 270, 110, 102 /*text_row*/, 20, 58, 5, 148, 122 }, /* EAN-8 + EAN-5 */
|
||||||
/* 16*/ { BARCODE_EANX, -1, "1234", 0, 50, 1, 47, 118, 116, 102 /*text_row*/, 40, 36, -1, -1, -1 }, // EAN-5
|
/* 16*/ { BARCODE_EANX, -1, "1234", 0, 50, 1, 47, 118, 116, 102 /*text_row*/, 40, 36, -1, -1, -1 }, /* EAN-5 */
|
||||||
/* 17*/ { BARCODE_EANX, 0, "1234", 0, 50, 1, 47, 118, 100, -1 /*text_row*/, -1, -1, -1, -1, -1 }, // EAN-5
|
/* 17*/ { BARCODE_EANX, 0, "1234", 0, 50, 1, 47, 118, 100, -1 /*text_row*/, -1, -1, -1, -1, -1 }, /* EAN-5 */
|
||||||
/* 18*/ { BARCODE_EANX, -1, "12", 0, 50, 1, 20, 64, 116, 102 /*text_row*/, 20, 20, -1, -1, -1 }, // EAN-2
|
/* 18*/ { BARCODE_EANX, -1, "12", 0, 50, 1, 20, 64, 116, 102 /*text_row*/, 20, 20, -1, -1, -1 }, /* EAN-2 */
|
||||||
/* 19*/ { BARCODE_EANX, 0, "12", 0, 50, 1, 20, 64, 100, -1 /*text_row*/, -1, -1, -1, -1, -1 }, // EAN-2
|
/* 19*/ { BARCODE_EANX, 0, "12", 0, 50, 1, 20, 64, 100, -1 /*text_row*/, -1, -1, -1, -1, -1 }, /* EAN-2 */
|
||||||
/* 20*/ { BARCODE_UPCA, -1, "123456789012", 0, 50, 1, 95, 226, 116, 104 /*text_row*/, 0, 18, -1, -1, -1 },
|
/* 20*/ { BARCODE_UPCA, -1, "123456789012", 0, 50, 1, 95, 226, 116, 104 /*text_row*/, 0, 18, -1, -1, -1 },
|
||||||
/* 21*/ { BARCODE_UPCA, 0, "123456789012", 0, 50, 1, 95, 226, 110, 104 /*text_row*/, 0, 18, -1, -1, -1 },
|
/* 21*/ { BARCODE_UPCA, 0, "123456789012", 0, 50, 1, 95, 226, 110, 104 /*text_row*/, 0, 18, -1, -1, -1 },
|
||||||
/* 22*/ { BARCODE_UPCA, -1, "123456789012+12", 0, 50, 1, 124, 276, 116, 104 /*text_row*/, 0, 18, 5, 208, 68 },
|
/* 22*/ { BARCODE_UPCA, -1, "123456789012+12", 0, 50, 1, 124, 276, 116, 104 /*text_row*/, 0, 18, 5, 208, 68 },
|
||||||
@ -495,7 +497,7 @@ static void test_upcean_hrt(int index, 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); // ZINT_DEBUG_TEST_PRINT 16
|
if ((debug & ZINT_DEBUG_TEST_PRINT) && !(debug & ZINT_DEBUG_TEST_LESS_NOISY)) printf("i:%d\n", i); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
@ -512,7 +514,7 @@ static void test_upcean_hrt(int index, int debug) {
|
|||||||
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_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
assert_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
assert_equal(symbol->height, data[i].expected_height, "i:%d (%s) symbol->height %.8g != %.8g\n", i, testUtilBarcodeName(data[i].symbology), symbol->height, data[i].expected_height);
|
assert_equal(symbol->height, data[i].expected_height, "i:%d (%s) symbol->height %.8g != %.8g\n", i, testUtilBarcodeName(data[i].symbology), symbol->height, data[i].expected_height);
|
||||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%s) symbol->rows %d != %d\n", i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows);
|
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%s) symbol->rows %d != %d\n", i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows);
|
||||||
@ -588,17 +590,17 @@ static void test_row_separator(int index, int debug) {
|
|||||||
int expected_separator_col;
|
int expected_separator_col;
|
||||||
int expected_separator_height;
|
int expected_separator_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODABLOCKF, -1, -1, -1, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 },
|
/* 0*/ { BARCODE_CODABLOCKF, -1, -1, -1, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 },
|
||||||
/* 1*/ { BARCODE_CODABLOCKF, -1, -1, 0, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, // Same as default
|
/* 1*/ { BARCODE_CODABLOCKF, -1, -1, 0, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, /* Same as default */
|
||||||
/* 2*/ { BARCODE_CODABLOCKF, -1, -1, 1, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, // Same as default
|
/* 2*/ { BARCODE_CODABLOCKF, -1, -1, 1, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, /* Same as default */
|
||||||
/* 3*/ { BARCODE_CODABLOCKF, -1, -1, 2, "A", 0, 20, 2, 101, 242, 44, 20, 42, 4 },
|
/* 3*/ { BARCODE_CODABLOCKF, -1, -1, 2, "A", 0, 20, 2, 101, 242, 44, 20, 42, 4 },
|
||||||
/* 4*/ { BARCODE_CODABLOCKF, -1, -1, 3, "A", 0, 20, 2, 101, 242, 44, 19, 42, 6 },
|
/* 4*/ { BARCODE_CODABLOCKF, -1, -1, 3, "A", 0, 20, 2, 101, 242, 44, 19, 42, 6 },
|
||||||
/* 5*/ { BARCODE_CODABLOCKF, -1, -1, 4, "A", 0, 20, 2, 101, 242, 44, 18, 42, 8 },
|
/* 5*/ { BARCODE_CODABLOCKF, -1, -1, 4, "A", 0, 20, 2, 101, 242, 44, 18, 42, 8 },
|
||||||
/* 6*/ { BARCODE_CODABLOCKF, -1, -1, 5, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, // > 4 ignored, same as default
|
/* 6*/ { BARCODE_CODABLOCKF, -1, -1, 5, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, /* > 4 ignored, same as default */
|
||||||
/* 7*/ { BARCODE_CODABLOCKF, -1, 1, -1, "A", 0, 5, 1, 46, 132, 14, 0, 20 + 2, 2 }, // CODE128 top separator, add 2 to skip over end of start char; note no longer includes HRT
|
/* 7*/ { BARCODE_CODABLOCKF, -1, 1, -1, "A", 0, 5, 1, 46, 132, 14, 0, 20 + 2, 2 }, /* CODE128 top separator, add 2 to skip over end of start char; note no longer includes HRT */
|
||||||
/* 8*/ { BARCODE_CODABLOCKF, 0, -1, -1, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, // Border width zero, same as default
|
/* 8*/ { BARCODE_CODABLOCKF, 0, -1, -1, "A", 0, 20, 2, 101, 242, 44, 21, 42, 2 }, /* Border width zero, same as default */
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -632,7 +634,7 @@ static void test_row_separator(int index, int debug) {
|
|||||||
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%s) symbol->bitmap_height %d != %d\n", i, testUtilBarcodeName(data[i].symbology),
|
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%s) symbol->bitmap_height %d != %d\n", i, testUtilBarcodeName(data[i].symbology),
|
||||||
symbol->bitmap_height, data[i].expected_bitmap_height);
|
symbol->bitmap_height, data[i].expected_bitmap_height);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
for (j = data[i].expected_separator_row; j < data[i].expected_separator_row + data[i].expected_separator_height; j++) {
|
for (j = data[i].expected_separator_row; j < data[i].expected_separator_row + data[i].expected_separator_height; j++) {
|
||||||
separator_bits_set = is_row_column_black(symbol, j, data[i].expected_separator_col);
|
separator_bits_set = is_row_column_black(symbol, j, data[i].expected_separator_col);
|
||||||
@ -641,12 +643,12 @@ static void test_row_separator(int index, int debug) {
|
|||||||
|
|
||||||
if (symbol->rows > 1) {
|
if (symbol->rows > 1) {
|
||||||
j = data[i].expected_separator_row - 1;
|
j = data[i].expected_separator_row - 1;
|
||||||
separator_bits_set = is_row_column_black(symbol, j, data[i].expected_separator_col + 2); // Need to add 2 to skip to 1st blank of start row character
|
separator_bits_set = is_row_column_black(symbol, j, data[i].expected_separator_col + 2); /* Need to add 2 to skip to 1st blank of start row character */
|
||||||
assert_zero(separator_bits_set, "i:%d (%s) separator_bits_set (%d, %d) before non-zero\n", i, testUtilBarcodeName(data[i].symbology), j, data[i].expected_separator_col);
|
assert_zero(separator_bits_set, "i:%d (%s) separator_bits_set (%d, %d) before non-zero\n", i, testUtilBarcodeName(data[i].symbology), j, data[i].expected_separator_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
j = data[i].expected_separator_row + data[i].expected_separator_height;
|
j = data[i].expected_separator_row + data[i].expected_separator_height;
|
||||||
separator_bits_set = is_row_column_black(symbol, j, data[i].expected_separator_col + 2); // Need to add 2 to skip to 1st blank of start row character
|
separator_bits_set = is_row_column_black(symbol, j, data[i].expected_separator_col + 2); /* Need to add 2 to skip to 1st blank of start row character */
|
||||||
assert_zero(separator_bits_set, "i:%d (%s) separator_bits_set (%d, %d) after non-zero\n", i, testUtilBarcodeName(data[i].symbology), j, data[i].expected_separator_col);
|
assert_zero(separator_bits_set, "i:%d (%s) separator_bits_set (%d, %d) after non-zero\n", i, testUtilBarcodeName(data[i].symbology), j, data[i].expected_separator_col);
|
||||||
|
|
||||||
ZBarcode_Delete(symbol);
|
ZBarcode_Delete(symbol);
|
||||||
@ -674,7 +676,7 @@ static void test_stacking(int index, int debug) {
|
|||||||
int expected_separator_col;
|
int expected_separator_col;
|
||||||
int expected_separator_height;
|
int expected_separator_height;
|
||||||
};
|
};
|
||||||
// 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, -1, "A", "B", 50, 2, 46, 92, 116, -1, -1, -1 },
|
/* 0*/ { BARCODE_CODE128, -1, -1, -1, "A", "B", 50, 2, 46, 92, 116, -1, -1, -1 },
|
||||||
/* 1*/ { BARCODE_CODE128, BARCODE_BIND, -1, -1, "A", "B", 50, 2, 46, 92, 116, 49, 4, 2 },
|
/* 1*/ { BARCODE_CODE128, BARCODE_BIND, -1, -1, "A", "B", 50, 2, 46, 92, 116, 49, 4, 2 },
|
||||||
@ -714,7 +716,7 @@ static void test_stacking(int index, int debug) {
|
|||||||
assert_equal(symbol->bitmap_width, data[i].expected_bitmap_width, "i:%d (%d) symbol->bitmap_width %d != %d\n", i, data[i].symbology, symbol->bitmap_width, data[i].expected_bitmap_width);
|
assert_equal(symbol->bitmap_width, data[i].expected_bitmap_width, "i:%d (%d) symbol->bitmap_width %d != %d\n", i, data[i].symbology, symbol->bitmap_width, data[i].expected_bitmap_width);
|
||||||
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%d) symbol->bitmap_height %d != %d\n", i, data[i].symbology, symbol->bitmap_height, data[i].expected_bitmap_height);
|
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%d) symbol->bitmap_height %d != %d\n", i, data[i].symbology, symbol->bitmap_height, data[i].expected_bitmap_height);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
if (data[i].expected_separator_row != -1) {
|
if (data[i].expected_separator_row != -1) {
|
||||||
for (j = data[i].expected_separator_row; j < data[i].expected_separator_row + data[i].expected_separator_height; j++) {
|
for (j = data[i].expected_separator_row; j < data[i].expected_separator_row + data[i].expected_separator_height; j++) {
|
||||||
@ -791,7 +793,7 @@ static void test_output_options(int index, int debug) {
|
|||||||
int expected_set_row;
|
int expected_set_row;
|
||||||
int expected_set_col;
|
int expected_set_col;
|
||||||
};
|
};
|
||||||
// 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, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 0, 4 },
|
/* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 0, 4 },
|
||||||
/* 1*/ { BARCODE_CODE128, -1, -1, -1, -1, 180, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 115, 4 },
|
/* 1*/ { BARCODE_CODE128, -1, -1, -1, -1, 180, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 115, 4 },
|
||||||
@ -832,7 +834,7 @@ static void test_output_options(int index, int debug) {
|
|||||||
/* 36*/ { BARCODE_QRCODE, 5, -1, 6, BARCODE_BIND | BARCODE_QUIET_ZONES, 0, 0, "A123", 0, 21, 21, 21, 78, 82, 1, 20, 19 },
|
/* 36*/ { BARCODE_QRCODE, 5, -1, 6, BARCODE_BIND | BARCODE_QUIET_ZONES, 0, 0, "A123", 0, 21, 21, 21, 78, 82, 1, 20, 19 },
|
||||||
/* 37*/ { BARCODE_QRCODE, 5, -1, 6, BARCODE_BOX | BARCODE_QUIET_ZONES, 0, 0, "A123", 0, 21, 21, 21, 102, 82, 0, 20, 19 },
|
/* 37*/ { BARCODE_QRCODE, 5, -1, 6, BARCODE_BOX | BARCODE_QUIET_ZONES, 0, 0, "A123", 0, 21, 21, 21, 102, 82, 0, 20, 19 },
|
||||||
/* 38*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 1, 1, 1 },
|
/* 38*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 1, 1, 1 },
|
||||||
/* 39*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0.5, "A123", 0, 21, 21, 21, 43, 43, 1, 1, 1 }, // Scale 0.5 -> 1
|
/* 39*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0.5, "A123", 0, 21, 21, 21, 43, 43, 1, 1, 1 }, /* Scale 0.5 -> 1 */
|
||||||
/* 40*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 0, 2, 2 },
|
/* 40*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 0, 2, 2 },
|
||||||
/* 41*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 1, 41, 1 },
|
/* 41*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 1, 41, 1 },
|
||||||
/* 42*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 0, 40, 2 },
|
/* 42*/ { BARCODE_QRCODE, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", 0, 21, 21, 21, 43, 43, 0, 40, 2 },
|
||||||
@ -920,7 +922,7 @@ static void test_output_options(int index, int debug) {
|
|||||||
if (ret < 5) {
|
if (ret < 5) {
|
||||||
assert_nonnull(symbol->bitmap, "i:%d (%s) symbol->bitmap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
assert_nonnull(symbol->bitmap, "i:%d (%s) symbol->bitmap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
assert_equal(symbol->height, data[i].expected_height, "i:%d (%s) symbol->height %.8g != %.8g\n", i, testUtilBarcodeName(data[i].symbology), symbol->height, data[i].expected_height);
|
assert_equal(symbol->height, data[i].expected_height, "i:%d (%s) symbol->height %.8g != %.8g\n", i, testUtilBarcodeName(data[i].symbology), symbol->height, data[i].expected_height);
|
||||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%s) symbol->rows %d != %d\n", i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows);
|
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%s) symbol->rows %d != %d\n", i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows);
|
||||||
@ -964,7 +966,7 @@ static void test_draw_string_wrap(int index, int debug) {
|
|||||||
int expected_no_text_row;
|
int expected_no_text_row;
|
||||||
int expected_no_text_col;
|
int expected_no_text_col;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE128, -1, "12", " E", 50, 1, 46, 92, 116, 104, 0 },
|
/* 0*/ { BARCODE_CODE128, -1, "12", " E", 50, 1, 46, 92, 116, 104, 0 },
|
||||||
/* 1*/ { BARCODE_CODE128, BOLD_TEXT, "12", " E", 50, 1, 46, 92, 116, 104, 0 },
|
/* 1*/ { BARCODE_CODE128, BOLD_TEXT, "12", " E", 50, 1, 46, 92, 116, 104, 0 },
|
||||||
@ -989,7 +991,7 @@ static void test_draw_string_wrap(int index, int debug) {
|
|||||||
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 ZBarcode_Encode(%d) ret %d != 0 (%s)\n", i, data[i].symbology, ret, symbol->errtxt);
|
assert_zero(ret, "i:%d ZBarcode_Encode(%d) ret %d != 0 (%s)\n", i, data[i].symbology, ret, symbol->errtxt);
|
||||||
|
|
||||||
// Cheat by overwriting text
|
/* Cheat by overwriting text */
|
||||||
strcpy((char *) symbol->text, data[i].text);
|
strcpy((char *) symbol->text, data[i].text);
|
||||||
|
|
||||||
ret = ZBarcode_Buffer(symbol, 0);
|
ret = ZBarcode_Buffer(symbol, 0);
|
||||||
@ -1002,7 +1004,7 @@ static void test_draw_string_wrap(int index, int debug) {
|
|||||||
assert_equal(symbol->bitmap_width, data[i].expected_bitmap_width, "i:%d (%d) symbol->bitmap_width %d != %d\n", i, data[i].symbology, symbol->bitmap_width, data[i].expected_bitmap_width);
|
assert_equal(symbol->bitmap_width, data[i].expected_bitmap_width, "i:%d (%d) symbol->bitmap_width %d != %d\n", i, data[i].symbology, symbol->bitmap_width, data[i].expected_bitmap_width);
|
||||||
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%d) symbol->bitmap_height %d != %d\n", i, data[i].symbology, symbol->bitmap_height, data[i].expected_bitmap_height);
|
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%d) symbol->bitmap_height %d != %d\n", i, data[i].symbology, symbol->bitmap_height, data[i].expected_bitmap_height);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
ret = ZBarcode_Print(symbol, 0);
|
ret = ZBarcode_Print(symbol, 0);
|
||||||
assert_zero(ret, "i:%d ZBarcode_Print(%d) ret %d != 0\n", i, data[i].symbology, ret);
|
assert_zero(ret, "i:%d ZBarcode_Print(%d) ret %d != 0\n", i, data[i].symbology, ret);
|
||||||
@ -1038,7 +1040,7 @@ static void test_code128_utf8(int index, int debug) {
|
|||||||
int expected_text_col;
|
int expected_text_col;
|
||||||
int expected_text_len;
|
int expected_text_len;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { "é", 50, 1, 57, 114, 116, 110, 53, 6 },
|
/* 0*/ { "é", 50, 1, 57, 114, 116, 110, 53, 6 },
|
||||||
};
|
};
|
||||||
@ -1071,7 +1073,7 @@ static void test_code128_utf8(int index, int debug) {
|
|||||||
assert_equal(symbol->bitmap_width, data[i].expected_bitmap_width, "i:%d (%d) symbol->bitmap_width %d != %d\n", i, BARCODE_CODE128, symbol->bitmap_width, data[i].expected_bitmap_width);
|
assert_equal(symbol->bitmap_width, data[i].expected_bitmap_width, "i:%d (%d) symbol->bitmap_width %d != %d\n", i, BARCODE_CODE128, symbol->bitmap_width, data[i].expected_bitmap_width);
|
||||||
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%d) symbol->bitmap_height %d != %d\n", i, BARCODE_CODE128, symbol->bitmap_height, data[i].expected_bitmap_height);
|
assert_equal(symbol->bitmap_height, data[i].expected_bitmap_height, "i:%d (%d) symbol->bitmap_height %d != %d\n", i, BARCODE_CODE128, symbol->bitmap_height, data[i].expected_bitmap_height);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
ret = ZBarcode_Print(symbol, 0);
|
ret = ZBarcode_Print(symbol, 0);
|
||||||
assert_zero(ret, "i:%d ZBarcode_Print(%d) ret %d != 0\n", i, BARCODE_CODE128, ret);
|
assert_zero(ret, "i:%d ZBarcode_Print(%d) ret %d != 0\n", i, BARCODE_CODE128, ret);
|
||||||
@ -1115,94 +1117,94 @@ static void test_scale(int index, int debug) {
|
|||||||
int expected_set_col;
|
int expected_set_col;
|
||||||
int expected_set_len;
|
int expected_set_len;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE16K, -1, -1, -1, 0, 0, "1234567890123456789012345678901234567890", "", 0, 50, 5, 70, 162, 104, 0 /*set_row*/, 43, 30, 2 }, // With no scaling
|
/* 0*/ { BARCODE_CODE16K, -1, -1, -1, 0, 0, "1234567890123456789012345678901234567890", "", 0, 50, 5, 70, 162, 104, 0 /*set_row*/, 43, 30, 2 }, /* With no scaling */
|
||||||
/* 1*/ { BARCODE_CODE16K, -1, -1, -1, 0, 0.5, "1234567890123456789012345678901234567890", "", 0, 50, 5, 70, 162 * 0.5, 104 * 0.5, 0 /*set_row*/, (43 * 0.5) + 1, 30 * 0.5, 2 * 0.5 },
|
/* 1*/ { BARCODE_CODE16K, -1, -1, -1, 0, 0.5, "1234567890123456789012345678901234567890", "", 0, 50, 5, 70, 162 * 0.5, 104 * 0.5, 0 /*set_row*/, (43 * 0.5) + 1, 30 * 0.5, 2 * 0.5 },
|
||||||
/* 2*/ { BARCODE_CODE16K, -1, -1, -1, 37, 0.5, "1234567890123456789012345678901234567890", "", 0, 35, 5, 70, 162 * 0.5, 37, 0 /*set_row*/, 16, 30 * 0.5, 2 * 0.5 }, // Height specified
|
/* 2*/ { BARCODE_CODE16K, -1, -1, -1, 37, 0.5, "1234567890123456789012345678901234567890", "", 0, 35, 5, 70, 162 * 0.5, 37, 0 /*set_row*/, 16, 30 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 3*/ { BARCODE_CODE49, -1, -1, -1, 0, 0, "A1234567890B", "", 0, 30, 3, 70, 162, 64, 0 /*set_row*/, 43, 134, 2 }, // With no scaling
|
/* 3*/ { BARCODE_CODE49, -1, -1, -1, 0, 0, "A1234567890B", "", 0, 30, 3, 70, 162, 64, 0 /*set_row*/, 43, 134, 2 }, /* With no scaling */
|
||||||
/* 4*/ { BARCODE_CODE49, -1, -1, -1, 0, 1.5, "A1234567890B", "", 0, 30, 3, 70, 162 * 1.5, 64 * 1.5, 0 /*set_row*/, 43 * 1.5 + 1, 134 * 1.5, 2 * 1.5 },
|
/* 4*/ { BARCODE_CODE49, -1, -1, -1, 0, 1.5, "A1234567890B", "", 0, 30, 3, 70, 162 * 1.5, 64 * 1.5, 0 /*set_row*/, 43 * 1.5 + 1, 134 * 1.5, 2 * 1.5 },
|
||||||
/* 5*/ { BARCODE_CODE49, -1, -1, -1, 16, 1.5, "A1234567890B", "", 0, 16, 3, 70, 162 * 1.5, 54, 0 /*set_row*/, 37, 134 * 1.5, 2 * 1.5 }, // Height specified
|
/* 5*/ { BARCODE_CODE49, -1, -1, -1, 16, 1.5, "A1234567890B", "", 0, 16, 3, 70, 162 * 1.5, 54, 0 /*set_row*/, 37, 134 * 1.5, 2 * 1.5 }, /* Height specified */
|
||||||
/* 6*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 0, "1234", "", 0, 10, 2, 13, 26, 20, 0 /*set_row*/, 20, 20, 2 }, // With no scaling
|
/* 6*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 0, "1234", "", 0, 10, 2, 13, 26, 20, 0 /*set_row*/, 20, 20, 2 }, /* With no scaling */
|
||||||
/* 7*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 3, "1234", "", 0, 10, 2, 13, 26 * 3, 20 * 3, 0 /*set_row*/, 20 * 3, 20 * 3, 2 * 3 },
|
/* 7*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 0, 3, "1234", "", 0, 10, 2, 13, 26 * 3, 20 * 3, 0 /*set_row*/, 20 * 3, 20 * 3, 2 * 3 },
|
||||||
/* 8*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 13, 3, "1234", "", 0, 13, 2, 13, 26 * 3, 78, 0 /*set_row*/, 78, 20 * 3, 2 * 3 }, // Height specified
|
/* 8*/ { BARCODE_PHARMA_TWO, -1, -1, -1, 13, 3, "1234", "", 0, 13, 2, 13, 26 * 3, 78, 0 /*set_row*/, 78, 20 * 3, 2 * 3 }, /* Height specified */
|
||||||
/* 9*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 18, 6, 103, 206, 36, 0 /*set_row*/, 36, 170, 14 }, // With no scaling
|
/* 9*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 18, 6, 103, 206, 36, 0 /*set_row*/, 36, 170, 14 }, /* With no scaling */
|
||||||
/* 10*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 18, 6, 103, 206 * 0.6, 36 * 0.6, 0 /*set_row*/, 36 * 0.6, 170 * 0.6 + 1, 14 * 0.6 }, // +1 set_col due to some scaling inversion difference
|
/* 10*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 18, 6, 103, 206 * 0.6, 36 * 0.6, 0 /*set_row*/, 36 * 0.6, 170 * 0.6 + 1, 14 * 0.6 }, /* +1 set_col due to some scaling inversion difference */
|
||||||
/* 11*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.2, "1", "", 0, 18, 6, 103, 206 * 1.2, 36 * 1.2, 0 /*set_row*/, 36 * 1.2, 170 * 1.2 + 1, 14 * 1.2 }, // +1 set_col due to some scaling inversion difference
|
/* 11*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.2, "1", "", 0, 18, 6, 103, 206 * 1.2, 36 * 1.2, 0 /*set_row*/, 36 * 1.2, 170 * 1.2 + 1, 14 * 1.2 }, /* +1 set_col due to some scaling inversion difference */
|
||||||
/* 12*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 },
|
/* 12*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 },
|
||||||
/* 13*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.0, "1", "", 0, 18, 6, 103, 206 * 1.0, 36 * 1.0, 0 /*set_row*/, 36 * 1.0, 170 * 1.0, 14 * 1.0 },
|
/* 13*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.0, "1", "", 0, 18, 6, 103, 206 * 1.0, 36 * 1.0, 0 /*set_row*/, 36 * 1.0, 170 * 1.0, 14 * 1.0 },
|
||||||
/* 14*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.5, "1", "", 0, 18, 6, 103, 206 * 1.5, 36 * 1.5, 0 /*set_row*/, 36 * 1.5, 170 * 1.5, 14 * 1.5 },
|
/* 14*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.5, "1", "", 0, 18, 6, 103, 206 * 1.5, 36 * 1.5, 0 /*set_row*/, 36 * 1.5, 170 * 1.5, 14 * 1.5 },
|
||||||
/* 15*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.0, "1", "", 0, 18, 6, 103, 206 * 2.0, 36 * 2.0, 0 /*set_row*/, 36 * 2.0, 170 * 2.0, 14 * 2.0 },
|
/* 15*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.0, "1", "", 0, 18, 6, 103, 206 * 2.0, 36 * 2.0, 0 /*set_row*/, 36 * 2.0, 170 * 2.0, 14 * 2.0 },
|
||||||
/* 16*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.5, "1", "", 0, 18, 6, 103, 206 * 2.5, 36 * 2.5, 0 /*set_row*/, 36 * 2.5, 170 * 2.5, 14 * 2.5 },
|
/* 16*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.5, "1", "", 0, 18, 6, 103, 206 * 2.5, 36 * 2.5, 0 /*set_row*/, 36 * 2.5, 170 * 2.5, 14 * 2.5 },
|
||||||
/* 17*/ { BARCODE_PDF417, -1, -1, -1, 0, 3.0, "1", "", 0, 18, 6, 103, 206 * 3.0, 36 * 3.0, 0 /*set_row*/, 36 * 3.0, 170 * 3.0, 14 * 3.0 },
|
/* 17*/ { BARCODE_PDF417, -1, -1, -1, 0, 3.0, "1", "", 0, 18, 6, 103, 206 * 3.0, 36 * 3.0, 0 /*set_row*/, 36 * 3.0, 170 * 3.0, 14 * 3.0 },
|
||||||
/* 18*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0, "1", "", 0, 18, 6, 103, 218, 48, 0 /*set_row*/, 48, 176, 14 }, // With no scaling
|
/* 18*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0, "1", "", 0, 18, 6, 103, 218, 48, 0 /*set_row*/, 48, 176, 14 }, /* With no scaling */
|
||||||
/* 19*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0.6, "1", "", 0, 18, 6, 103, 218 * 0.6, 48 * 0.6, 0 /*set_row*/, 48 * 0.6, 176 * 0.6 + 1, 14 * 0.6 }, // +1 set_col due to some scaling inversion difference
|
/* 19*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0.6, "1", "", 0, 18, 6, 103, 218 * 0.6, 48 * 0.6, 0 /*set_row*/, 48 * 0.6, 176 * 0.6 + 1, 14 * 0.6 }, /* +1 set_col due to some scaling inversion difference */
|
||||||
/* 20*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.6, "1", "", 0, 18, 6, 103, 218 * 1.6, 48 * 1.6, 0 /*set_row*/, 48 * 1.6, 176 * 1.6 + 1, 14 * 1.6 }, // +1 set_col due to some scaling inversion difference
|
/* 20*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.6, "1", "", 0, 18, 6, 103, 218 * 1.6, 48 * 1.6, 0 /*set_row*/, 48 * 1.6, 176 * 1.6 + 1, 14 * 1.6 }, /* +1 set_col due to some scaling inversion difference */
|
||||||
/* 21*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.5, "1", "", 0, 18, 6, 103, 218 * 1.5, 48 * 1.5, 0 /*set_row*/, 48 * 1.5, 176 * 1.5, 14 * 1.5 },
|
/* 21*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.5, "1", "", 0, 18, 6, 103, 218 * 1.5, 48 * 1.5, 0 /*set_row*/, 48 * 1.5, 176 * 1.5, 14 * 1.5 },
|
||||||
/* 22*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 2.5, "1", "", 0, 18, 6, 103, 218 * 2.5, 48 * 2.5, 0 /*set_row*/, 48 * 2.5, 176 * 2.5, 14 * 2.5 },
|
/* 22*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 2.5, "1", "", 0, 18, 6, 103, 218 * 2.5, 48 * 2.5, 0 /*set_row*/, 48 * 2.5, 176 * 2.5, 14 * 2.5 },
|
||||||
/* 23*/ { BARCODE_PDF417, -1, 3, OUT_BUFFER_INTERMEDIATE, 0, 1.3, "1", "", 0, 18, 6, 103, 206 * 1.3, 36 * 1.3, 0 /*set_row*/, 36 * 1.3, 170 * 1.3, 14 * 1.3 },
|
/* 23*/ { BARCODE_PDF417, -1, 3, OUT_BUFFER_INTERMEDIATE, 0, 1.3, "1", "", 0, 18, 6, 103, 206 * 1.3, 36 * 1.3, 0 /*set_row*/, 36 * 1.3, 170 * 1.3, 14 * 1.3 },
|
||||||
/* 24*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 },
|
/* 24*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 },
|
||||||
/* 25*/ { BARCODE_PDF417, -1, -1, -1, 1, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 25*/ { BARCODE_PDF417, -1, -1, -1, 1, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 26*/ { BARCODE_PDF417, -1, -1, -1, 5, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 26*/ { BARCODE_PDF417, -1, -1, -1, 5, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 27*/ { BARCODE_PDF417, -1, -1, -1, 6, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 27*/ { BARCODE_PDF417, -1, -1, -1, 6, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 28*/ { BARCODE_PDF417, -1, -1, -1, 7, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 28*/ { BARCODE_PDF417, -1, -1, -1, 7, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 29*/ { BARCODE_PDF417, -1, -1, -1, 8, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 29*/ { BARCODE_PDF417, -1, -1, -1, 8, 0.5, "1", "", 0, 6, 6, 103, 206 * 0.5, 6, 0 /*set_row*/, 6, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 30*/ { BARCODE_PDF417, -1, -1, -1, 9, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 30*/ { BARCODE_PDF417, -1, -1, -1, 9, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 31*/ { BARCODE_PDF417, -1, -1, -1, 10, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 31*/ { BARCODE_PDF417, -1, -1, -1, 10, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 32*/ { BARCODE_PDF417, -1, -1, -1, 11, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 32*/ { BARCODE_PDF417, -1, -1, -1, 11, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 33*/ { BARCODE_PDF417, -1, -1, -1, 12, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 33*/ { BARCODE_PDF417, -1, -1, -1, 12, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 34*/ { BARCODE_PDF417, -1, -1, -1, 13, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 34*/ { BARCODE_PDF417, -1, -1, -1, 13, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 35*/ { BARCODE_PDF417, -1, -1, -1, 14, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 35*/ { BARCODE_PDF417, -1, -1, -1, 14, 0.5, "1", "", 0, 12, 6, 103, 206 * 0.5, 12, 0 /*set_row*/, 12, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 36*/ { BARCODE_PDF417, -1, -1, -1, 15, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 36*/ { BARCODE_PDF417, -1, -1, -1, 15, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 37*/ { BARCODE_PDF417, -1, -1, -1, 16, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 37*/ { BARCODE_PDF417, -1, -1, -1, 16, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 38*/ { BARCODE_PDF417, -1, -1, -1, 17, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 38*/ { BARCODE_PDF417, -1, -1, -1, 17, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 39*/ { BARCODE_PDF417, -1, -1, -1, 18, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 39*/ { BARCODE_PDF417, -1, -1, -1, 18, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 40*/ { BARCODE_PDF417, -1, -1, -1, 19, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 40*/ { BARCODE_PDF417, -1, -1, -1, 19, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 41*/ { BARCODE_PDF417, -1, -1, -1, 20, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 41*/ { BARCODE_PDF417, -1, -1, -1, 20, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 18, 0 /*set_row*/, 18, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 42*/ { BARCODE_PDF417, -1, -1, -1, 21, 0.5, "1", "", 0, 24, 6, 103, 206 * 0.5, 24, 0 /*set_row*/, 24, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 42*/ { BARCODE_PDF417, -1, -1, -1, 21, 0.5, "1", "", 0, 24, 6, 103, 206 * 0.5, 24, 0 /*set_row*/, 24, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 43*/ { BARCODE_PDF417, -1, -1, -1, 38, 0.5, "1", "", 0, 36, 6, 103, 206 * 0.5, 36, 0 /*set_row*/, 36, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 43*/ { BARCODE_PDF417, -1, -1, -1, 38, 0.5, "1", "", 0, 36, 6, 103, 206 * 0.5, 36, 0 /*set_row*/, 36, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 44*/ { BARCODE_PDF417, -1, -1, -1, 39, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 44*/ { BARCODE_PDF417, -1, -1, -1, 39, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 45*/ { BARCODE_PDF417, -1, -1, -1, 40, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 45*/ { BARCODE_PDF417, -1, -1, -1, 40, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 46*/ { BARCODE_PDF417, -1, -1, -1, 41, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 46*/ { BARCODE_PDF417, -1, -1, -1, 41, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 47*/ { BARCODE_PDF417, -1, -1, -1, 42, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 47*/ { BARCODE_PDF417, -1, -1, -1, 42, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 48*/ { BARCODE_PDF417, -1, -1, -1, 43, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 48*/ { BARCODE_PDF417, -1, -1, -1, 43, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 49*/ { BARCODE_PDF417, -1, -1, -1, 44, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 49*/ { BARCODE_PDF417, -1, -1, -1, 44, 0.5, "1", "", 0, 42, 6, 103, 206 * 0.5, 42, 0 /*set_row*/, 42, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 50*/ { BARCODE_PDF417, -1, -1, -1, 45, 0.5, "1", "", 0, 48, 6, 103, 206 * 0.5, 48, 0 /*set_row*/, 48, 170 * 0.5, 14 * 0.5 }, // Height specified
|
/* 50*/ { BARCODE_PDF417, -1, -1, -1, 45, 0.5, "1", "", 0, 48, 6, 103, 206 * 0.5, 48, 0 /*set_row*/, 48, 170 * 0.5, 14 * 0.5 }, /* Height specified */
|
||||||
/* 51*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 0, "123456789012", "", 0, 50, 1, 79, 158, 116, 104 /*set_row*/, 114, 20, 2 }, // With no scaling
|
/* 51*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 0, "123456789012", "", 0, 50, 1, 79, 158, 116, 104 /*set_row*/, 114, 20, 2 }, /* With no scaling */
|
||||||
/* 52*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 116 * 1.5, 104 * 1.5 /*set_row*/, 114 * 1.5, 20 * 1.5, 1 * 1.5 },
|
/* 52*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 116 * 1.5, 104 * 1.5 /*set_row*/, 114 * 1.5, 20 * 1.5, 1 * 1.5 },
|
||||||
/* 53*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 116 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0, 20 * 2.0, 1 * 2.0 },
|
/* 53*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 116 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0, 20 * 2.0, 1 * 2.0 },
|
||||||
/* 54*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 3.5, "123456789012", "", 0, 50, 1, 79, 158 * 3.5, 116 * 3.5, 104 * 3.5 /*set_row*/, 114 * 3.5, 20 * 3.5, 1 * 3.5 },
|
/* 54*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 3.5, "123456789012", "", 0, 50, 1, 79, 158 * 3.5, 116 * 3.5, 104 * 3.5 /*set_row*/, 114 * 3.5, 20 * 3.5, 1 * 3.5 },
|
||||||
/* 55*/ { BARCODE_UPCA, -1, -1, -1, 0, 0, "12345678904", "", 0, 50, 1, 95, 226, 116, 104 /*set_row*/, 114, 5, 2 }, // With no scaling
|
/* 55*/ { BARCODE_UPCA, -1, -1, -1, 0, 0, "12345678904", "", 0, 50, 1, 95, 226, 116, 104 /*set_row*/, 114, 5, 2 }, /* With no scaling */
|
||||||
/* 56*/ { BARCODE_UPCA, -1, -1, -1, 0, 2.5, "12345678904", "", 0, 50, 1, 95, 226 * 2.5, 116 * 2.5, 104 * 2.5 /*set_row*/, 114 * 2.5, 5 * 2.5, 2 * 2.5 },
|
/* 56*/ { BARCODE_UPCA, -1, -1, -1, 0, 2.5, "12345678904", "", 0, 50, 1, 95, 226 * 2.5, 116 * 2.5, 104 * 2.5 /*set_row*/, 114 * 2.5, 5 * 2.5, 2 * 2.5 },
|
||||||
/* 57*/ { BARCODE_UPCA, -1, -1, -1, 0, 4.5, "12345678904", "", 0, 50, 1, 95, 226 * 4.5, 116 * 4.5, 104 * 4.5 /*set_row*/, 114 * 4.5, 5 * 4.5, 2 * 4.5 },
|
/* 57*/ { BARCODE_UPCA, -1, -1, -1, 0, 4.5, "12345678904", "", 0, 50, 1, 95, 226 * 4.5, 116 * 4.5, 104 * 4.5 /*set_row*/, 114 * 4.5, 5 * 4.5, 2 * 4.5 },
|
||||||
/* 58*/ { BARCODE_CODABLOCKF, -1, -1, -1, 0, 0, "1234567890123456", "", 0, 30, 3, 101, 242, 64, 0 /*set_row*/, 64, 42, 2 }, // With no scaling
|
/* 58*/ { BARCODE_CODABLOCKF, -1, -1, -1, 0, 0, "1234567890123456", "", 0, 30, 3, 101, 242, 64, 0 /*set_row*/, 64, 42, 2 }, /* With no scaling */
|
||||||
/* 59*/ { BARCODE_CODABLOCKF, -1, -1, -1, 0, 0.5, "1234567890123456", "", 0, 30, 3, 101, 242 * 0.5, 64 * 0.5, 0 /*set_row*/, 64 * 0.5, 42 * 0.5, 2 * 0.5 },
|
/* 59*/ { BARCODE_CODABLOCKF, -1, -1, -1, 0, 0.5, "1234567890123456", "", 0, 30, 3, 101, 242 * 0.5, 64 * 0.5, 0 /*set_row*/, 64 * 0.5, 42 * 0.5, 2 * 0.5 },
|
||||||
/* 60*/ { BARCODE_CODABLOCKF, -1, -1, -1, 34, 0.5, "1234567890123456", "", 0, 33, 3, 101, 242 * 0.5, 35, 0 /*set_row*/, 35, 42 * 0.5, 2 * 0.5 }, // Height specified
|
/* 60*/ { BARCODE_CODABLOCKF, -1, -1, -1, 34, 0.5, "1234567890123456", "", 0, 33, 3, 101, 242 * 0.5, 35, 0 /*set_row*/, 35, 42 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 61*/ { BARCODE_CODABLOCKF, -1, -1, -1, 47, 0.5, "1234567890123456", "", 0, 48, 3, 101, 242 * 0.5, 50, 0 /*set_row*/, 50, 42 * 0.5, 2 * 0.5 }, // Height specified
|
/* 61*/ { BARCODE_CODABLOCKF, -1, -1, -1, 47, 0.5, "1234567890123456", "", 0, 48, 3, 101, 242 * 0.5, 50, 0 /*set_row*/, 50, 42 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 62*/ { BARCODE_DBAR_OMNSTK, -1, -1, 0, 0, 0, "1", "", 0, 69, 5, 50, 100, 138, 0 /*set_row*/, 66, 16, 2 }, // With no scaling
|
/* 62*/ { BARCODE_DBAR_OMNSTK, -1, -1, 0, 0, 0, "1", "", 0, 69, 5, 50, 100, 138, 0 /*set_row*/, 66, 16, 2 }, /* With no scaling */
|
||||||
/* 63*/ { BARCODE_DBAR_OMNSTK, -1, -1, 0, 0, 0.5, "1", "", 0, 69, 5, 50, 100 * 0.5, 138 * 0.5, 0 /*set_row*/, 66 * 0.5, 16 * 0.5, 2 * 0.5 },
|
/* 63*/ { BARCODE_DBAR_OMNSTK, -1, -1, 0, 0, 0.5, "1", "", 0, 69, 5, 50, 100 * 0.5, 138 * 0.5, 0 /*set_row*/, 66 * 0.5, 16 * 0.5, 2 * 0.5 },
|
||||||
/* 64*/ { BARCODE_DBAR_OMNSTK, -1, -1, 0, 18, 0.5, "1", "", 0, 19, 5, 50, 100 * 0.5, 19, 0 /*set_row*/, 8, 16 * 0.5, 2 * 0.5 }, // Height specified
|
/* 64*/ { BARCODE_DBAR_OMNSTK, -1, -1, 0, 18, 0.5, "1", "", 0, 19, 5, 50, 100 * 0.5, 19, 0 /*set_row*/, 8, 16 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 65*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 0, 0, "[01]12345678901231", "", 0, 108, 9, 53, 106, 216, 0 /*set_row*/, 68, 36, 2 }, // With no scaling
|
/* 65*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 0, 0, "[01]12345678901231", "", 0, 108, 9, 53, 106, 216, 0 /*set_row*/, 68, 36, 2 }, /* With no scaling */
|
||||||
/* 66*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 0, 0.5, "[01]12345678901231", "", 0, 108, 9, 53, 106 * 0.5, 216 * 0.5, 0 /*set_row*/, 68 * 0.5, 36 * 0.5, 2 * 0.5 },
|
/* 66*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 0, 0.5, "[01]12345678901231", "", 0, 108, 9, 53, 106 * 0.5, 216 * 0.5, 0 /*set_row*/, 68 * 0.5, 36 * 0.5, 2 * 0.5 },
|
||||||
/* 67*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 10, 0.5, "[01]12345678901231", "", 0, 9, 9, 53, 106 * 0.5, 9, 0 /*set_row*/, 1, 36 * 0.5, 2 * 0.5 }, // Height specified
|
/* 67*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 10, 0.5, "[01]12345678901231", "", 0, 9, 9, 53, 106 * 0.5, 9, 0 /*set_row*/, 1, 36 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 68*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 99, 0.5, "[01]12345678901231", "", 0, 99, 9, 53, 106 * 0.5, 99, 0 /*set_row*/, 31, 36 * 0.5, 2 * 0.5 }, // Height specified
|
/* 68*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 99, 0.5, "[01]12345678901231", "", 0, 99, 9, 53, 106 * 0.5, 99, 0 /*set_row*/, 31, 36 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 69*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 100, 0.5, "[01]12345678901231", "", 0, 99, 9, 53, 106 * 0.5, 99, 0 /*set_row*/, 31, 36 * 0.5, 2 * 0.5 }, // Height specified
|
/* 69*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 100, 0.5, "[01]12345678901231", "", 0, 99, 9, 53, 106 * 0.5, 99, 0 /*set_row*/, 31, 36 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 70*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 101, 0.5, "[01]12345678901231", "", 0, 102, 9, 53, 106 * 0.5, 102, 0 /*set_row*/, 32, 36 * 0.5, 2 * 0.5 }, // Height specified
|
/* 70*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 101, 0.5, "[01]12345678901231", "", 0, 102, 9, 53, 106 * 0.5, 102, 0 /*set_row*/, 32, 36 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 71*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 102, 0.5, "[01]12345678901231", "", 0, 102, 9, 53, 106 * 0.5, 102, 0 /*set_row*/, 32, 36 * 0.5, 2 * 0.5 }, // Height specified
|
/* 71*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 102, 0.5, "[01]12345678901231", "", 0, 102, 9, 53, 106 * 0.5, 102, 0 /*set_row*/, 32, 36 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 72*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 103, 0.5, "[01]12345678901231", "", 0, 102, 9, 53, 106 * 0.5, 102, 0 /*set_row*/, 32, 36 * 0.5, 2 * 0.5 }, // Height specified
|
/* 72*/ { BARCODE_DBAR_EXPSTK, 1, -1, 0, 103, 0.5, "[01]12345678901231", "", 0, 102, 9, 53, 106 * 0.5, 102, 0 /*set_row*/, 32, 36 * 0.5, 2 * 0.5 }, /* Height specified */
|
||||||
/* 73*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116, 104 /*set_row*/, 115, 11, 2 }, // With no scaling
|
/* 73*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116, 104 /*set_row*/, 115, 11, 2 }, /* With no scaling */
|
||||||
/* 74*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0.5, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 0.5, 55, 18 /*set_row*/, 55, 62, 2 * 0.5 },
|
/* 74*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0.5, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 0.5, 55, 18 /*set_row*/, 55, 62, 2 * 0.5 },
|
||||||
/* 75*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 2.0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 2, 116 * 2, 104 * 2 + 1 /*set_row*/, 115 * 2, 11 * 2, 2 * 2 }, // +1 set_row
|
/* 75*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 2.0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 2, 116 * 2, 104 * 2 + 1 /*set_row*/, 115 * 2, 11 * 2, 2 * 2 }, /* +1 set_row */
|
||||||
/* 76*/ { BARCODE_UPCE_CC, -1, -1, -1, 2, 0.5, "1234567", "[17]010615[10]A123456\"", 0, 19, 10, 55, 142 * 0.5, 24, 16 /*set_row*/, 23, 62, 2 * 0.5 }, // Height specified
|
/* 76*/ { BARCODE_UPCE_CC, -1, -1, -1, 2, 0.5, "1234567", "[17]010615[10]A123456\"", 0, 19, 10, 55, 142 * 0.5, 24, 16 /*set_row*/, 23, 62, 2 * 0.5 }, /* Height specified */
|
||||||
/* 77*/ { BARCODE_MAXICODE, -1, -1, -1, 0, 0, "1234567890", "", 0, 165, 33, 30, 299, 298, 3 /*set_row*/, 7, 10, 9 }, // With no scaling
|
/* 77*/ { BARCODE_MAXICODE, -1, -1, -1, 0, 0, "1234567890", "", 0, 165, 33, 30, 299, 298, 3 /*set_row*/, 7, 10, 9 }, /* With no scaling */
|
||||||
/* 78*/ { BARCODE_MAXICODE, -1, -1, -1, 0, 0.1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 165, 33, 30, 60, 65, 0 /*set_row*/, 1, 3, 1 },
|
/* 78*/ { BARCODE_MAXICODE, -1, -1, -1, 0, 0.1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 165, 33, 30, 60, 65, 0 /*set_row*/, 1, 3, 1 },
|
||||||
/* 79*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0, "12345", "", 0, 12, 2, 63, 146, 30, 3 /*set_row*/, 27, 10, 2 }, // With no scaling
|
/* 79*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0, "12345", "", 0, 12, 2, 63, 146, 30, 3 /*set_row*/, 27, 10, 2 }, /* With no scaling */
|
||||||
/* 80*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0.1, "12345", "", 0, 12, 2, 63, 146 * 0.5, 30 * 0.5 - 1, 3 * 0.5 /*set_row*/, 27 * 0.5, 10 * 0.5, 2 * 0.5 }, // -1 height due to yoffset/boffset flooring
|
/* 80*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0.1, "12345", "", 0, 12, 2, 63, 146 * 0.5, 30 * 0.5 - 1, 3 * 0.5 /*set_row*/, 27 * 0.5, 10 * 0.5, 2 * 0.5 }, /* -1 height due to yoffset/boffset flooring */
|
||||||
/* 81*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0.9, "12345", "", 0, 12, 2, 63, 146 * 0.9, 30 * 0.9, 3 * 0.9 + 1 /*set_row*/, 27 * 0.9, 10 * 0.9, 2 * 0.9 + 1 }, // +1's due to interpolation
|
/* 81*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0.9, "12345", "", 0, 12, 2, 63, 146 * 0.9, 30 * 0.9, 3 * 0.9 + 1 /*set_row*/, 27 * 0.9, 10 * 0.9, 2 * 0.9 + 1 }, /* +1's due to interpolation */
|
||||||
/* 82*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 2.3, "12345", "", 0, 12, 2, 63, 146 * 2.3, 30 * 2.3, 3 * 2.3 + 1 /*set_row*/, 27 * 2.3 - 1, 10 * 2.3, 2 * 2.3 + 1 }, // -1/+1's due to interpolation
|
/* 82*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 2.3, "12345", "", 0, 12, 2, 63, 146 * 2.3, 30 * 2.3, 3 * 2.3 + 1 /*set_row*/, 27 * 2.3 - 1, 10 * 2.3, 2 * 2.3 + 1 }, /* -1/+1's due to interpolation */
|
||||||
/* 83*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 3.1, "12345", "", 0, 12, 2, 63, 146 * 3.1, 30 * 3.1, 3 * 3.1 + 1 /*set_row*/, 27 * 3.1, 10 * 3.1, 2 * 3.2 + 1 }, // +1's due to interpolation
|
/* 83*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 3.1, "12345", "", 0, 12, 2, 63, 146 * 3.1, 30 * 3.1, 3 * 3.1 + 1 /*set_row*/, 27 * 3.1, 10 * 3.1, 2 * 3.2 + 1 }, /* +1's due to interpolation */
|
||||||
/* 84*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 0, "12345", "", 0, 62, 1, 135, 310, 156, 8 /*set_row*/, 132, 20, 2 }, // With no scaling
|
/* 84*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 0, "12345", "", 0, 62, 1, 135, 310, 156, 8 /*set_row*/, 132, 20, 2 }, /* With no scaling */
|
||||||
/* 85*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2, "12345", "", 0, 61.75, 1, 135, 310 * 2, 156 * 2 - 1, 8 * 2 /*set_row*/, 132 * 2 - 1, 20 * 2, 2 * 2 }, // -1's due to height rounding
|
/* 85*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2, "12345", "", 0, 61.75, 1, 135, 310 * 2, 156 * 2 - 1, 8 * 2 /*set_row*/, 132 * 2 - 1, 20 * 2, 2 * 2 }, /* -1's due to height rounding */
|
||||||
/* 86*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2.1, "12345", "", 0, 62, 1, 135, 310 * 2.1, 156 * 2.1, 8 * 2.1 /*set_row*/, 132 * 2.1, 20 * 2.1, 2 * 2.1 },
|
/* 86*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2.1, "12345", "", 0, 62, 1, 135, 310 * 2.1, 156 * 2.1, 8 * 2.1 /*set_row*/, 132 * 2.1, 20 * 2.1, 2 * 2.1 },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
@ -1246,7 +1248,7 @@ static void test_scale(int index, int debug) {
|
|||||||
assert_equal(ret, data[i].ret_raster, "i:%d ZBarcode_Buffer(%d) ret %d != %d (%s)\n", i, data[i].symbology, ret, data[i].ret_raster, symbol->errtxt);
|
assert_equal(ret, data[i].ret_raster, "i:%d ZBarcode_Buffer(%d) ret %d != %d (%s)\n", i, data[i].symbology, ret, data[i].ret_raster, symbol->errtxt);
|
||||||
assert_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
assert_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
assert_equal(symbol->height, data[i].expected_height, "i:%d (%d) symbol->height %.8g != %.8g\n", i, data[i].symbology, symbol->height, data[i].expected_height);
|
assert_equal(symbol->height, data[i].expected_height, "i:%d (%d) symbol->height %.8g != %.8g\n", i, data[i].symbology, symbol->height, data[i].expected_height);
|
||||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%d) symbol->rows %d != %d\n", i, data[i].symbology, symbol->rows, data[i].expected_rows);
|
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%d) symbol->rows %d != %d\n", i, data[i].symbology, symbol->rows, data[i].expected_rows);
|
||||||
@ -1297,7 +1299,7 @@ static void test_guard_descent(int index, int debug) {
|
|||||||
int expected_set_col;
|
int expected_set_col;
|
||||||
int expected_set_len;
|
int expected_set_len;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_UPCE, -1, "1234567", 0, 50, 1, 51, 134, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 18, 2 },
|
/* 0*/ { BARCODE_UPCE, -1, "1234567", 0, 50, 1, 51, 134, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 18, 2 },
|
||||||
/* 1*/ { BARCODE_UPCE, -1, "1234567", 0, 50, 1, 51, 134, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 18, 2 },
|
/* 1*/ { BARCODE_UPCE, -1, "1234567", 0, 50, 1, 51, 134, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 18, 2 },
|
||||||
@ -1357,7 +1359,7 @@ static void test_guard_descent(int index, int debug) {
|
|||||||
assert_equal(ret, data[i].ret_raster, "i:%d ZBarcode_Buffer(%d) ret %d != %d (%s)\n", i, data[i].symbology, ret, data[i].ret_raster, symbol->errtxt);
|
assert_equal(ret, data[i].ret_raster, "i:%d ZBarcode_Buffer(%d) ret %d != %d (%s)\n", i, data[i].symbology, ret, data[i].ret_raster, symbol->errtxt);
|
||||||
assert_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
assert_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
assert_equal(symbol->height, data[i].expected_height, "i:%d (%d) symbol->height %.8g != %.8g\n", i, data[i].symbology, symbol->height, data[i].expected_height);
|
assert_equal(symbol->height, data[i].expected_height, "i:%d (%d) symbol->height %.8g != %.8g\n", i, data[i].symbology, symbol->height, data[i].expected_height);
|
||||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%d) symbol->rows %d != %d\n", i, data[i].symbology, symbol->rows, data[i].expected_rows);
|
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%d) symbol->rows %d != %d\n", i, data[i].symbology, symbol->rows, data[i].expected_rows);
|
||||||
@ -1414,11 +1416,11 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
int expected_set_col;
|
int expected_set_col;
|
||||||
int expected_set_len;
|
int expected_set_len;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE11, -1, -1, -1, "1234", 0, 50, 1, 62, 124, 116, 1 /*set*/, 0, 100, 0, 2 },
|
/* 0*/ { BARCODE_CODE11, -1, -1, -1, "1234", 0, 50, 1, 62, 124, 116, 1 /*set*/, 0, 100, 0, 2 },
|
||||||
/* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 164, 116, 0 /*set*/, 0, 100, 0, 20 },
|
/* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 164, 116, 0 /*set*/, 0, 100, 0, 20 },
|
||||||
/* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 124, 116, 1 /*set*/, 0, 100, 0, 2 }, // BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES
|
/* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 124, 116, 1 /*set*/, 0, 100, 0, 2 }, /* BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES */
|
||||||
/* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, "1234", 0, 50, 1, 57, 114, 116, 1 /*set*/, 0, 100, 0, 8 },
|
/* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, "1234", 0, 50, 1, 57, 114, 116, 1 /*set*/, 0, 100, 0, 8 },
|
||||||
/* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 57, 154, 116, 0 /*set*/, 0, 100, 0, 20 },
|
/* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 57, 154, 116, 0 /*set*/, 0, 100, 0, 20 },
|
||||||
/* 5*/ { BARCODE_C25INTER, -1, -1, -1, "1234", 0, 50, 1, 45, 90, 116, 1 /*set*/, 0, 100, 0, 2 },
|
/* 5*/ { BARCODE_C25INTER, -1, -1, -1, "1234", 0, 50, 1, 45, 90, 116, 1 /*set*/, 0, 100, 0, 2 },
|
||||||
@ -1433,30 +1435,30 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/* 14*/ { BARCODE_CODE39, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 77, 194, 116, 0 /*set*/, 0, 100, 0, 20 },
|
/* 14*/ { BARCODE_CODE39, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 77, 194, 116, 0 /*set*/, 0, 100, 0, 20 },
|
||||||
/* 15*/ { BARCODE_EXCODE39, -1, -1, -1, "1234", 0, 50, 1, 77, 154, 116, 1 /*set*/, 0, 100, 0, 2 },
|
/* 15*/ { BARCODE_EXCODE39, -1, -1, -1, "1234", 0, 50, 1, 77, 154, 116, 1 /*set*/, 0, 100, 0, 2 },
|
||||||
/* 16*/ { BARCODE_EXCODE39, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 77, 194, 116, 0 /*set*/, 0, 100, 0, 20 },
|
/* 16*/ { BARCODE_EXCODE39, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 77, 194, 116, 0 /*set*/, 0, 100, 0, 20 },
|
||||||
/* 17*/ { BARCODE_EANX, -1, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 110, 212, 14 }, // EAN-13
|
/* 17*/ { BARCODE_EANX, -1, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 110, 212, 14 }, /* EAN-13 */
|
||||||
/* 18*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 110, 212, 14 },
|
/* 18*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 110, 212, 14 },
|
||||||
/* 19*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 212, 116, 1 /*set*/, 0, 110, 210, 2 },
|
/* 19*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 212, 116, 1 /*set*/, 0, 110, 210, 2 },
|
||||||
/* 20*/ { BARCODE_EANX, -1, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 212, 14 }, // Hide text
|
/* 20*/ { BARCODE_EANX, -1, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 212, 14 }, /* Hide text */
|
||||||
/* 21*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 212, 14 }, // Hide text
|
/* 21*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 212, 14 }, /* Hide text */
|
||||||
/* 22*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 190, 110, 1 /*set*/, 0, 110, 188, 2 }, // Hide text
|
/* 22*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 190, 110, 1 /*set*/, 0, 110, 188, 2 }, /* Hide text */
|
||||||
/* 23*/ { BARCODE_EANX, -1, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116, 0 /*set*/, 16, 110, 266, 10 },
|
/* 23*/ { BARCODE_EANX, -1, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116, 0 /*set*/, 16, 110, 266, 10 },
|
||||||
/* 24*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116, 0 /*set*/, 16, 110, 266, 10 },
|
/* 24*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116, 0 /*set*/, 16, 110, 266, 10 },
|
||||||
/* 25*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 266, 116, 1 /*set*/, 16, 110, 262, 4 },
|
/* 25*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 266, 116, 1 /*set*/, 16, 110, 262, 4 },
|
||||||
/* 26*/ { BARCODE_EANX, -1, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, // Hide text
|
/* 26*/ { BARCODE_EANX, -1, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, /* Hide text */
|
||||||
/* 27*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, // Hide text
|
/* 27*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, /* Hide text */
|
||||||
/* 28*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 244, 110, 1 /*set*/, 16, 110, 240, 4 }, // Hide text
|
/* 28*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 244, 110, 1 /*set*/, 16, 110, 240, 4 }, /* Hide text */
|
||||||
/* 29*/ { BARCODE_EANX_CHK, -1, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 16, 110, 320, 10 },
|
/* 29*/ { BARCODE_EANX_CHK, -1, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 16, 110, 320, 10 },
|
||||||
/* 30*/ { BARCODE_EANX_CHK, BARCODE_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 16, 110, 320, 10 },
|
/* 30*/ { BARCODE_EANX_CHK, BARCODE_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 16, 110, 320, 10 },
|
||||||
/* 31*/ { BARCODE_EANX_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 320, 116, 1 /*set*/, 16, 110, 318, 2 },
|
/* 31*/ { BARCODE_EANX_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 320, 116, 1 /*set*/, 16, 110, 318, 2 },
|
||||||
/* 32*/ { BARCODE_EANX, -1, -1, -1, "0234567", 0, 50, 1, 67, 162, 116, 0 /*set*/, 0, 100, 0, 14 }, // EAN-8
|
/* 32*/ { BARCODE_EANX, -1, -1, -1, "0234567", 0, 50, 1, 67, 162, 116, 0 /*set*/, 0, 100, 0, 14 }, /* EAN-8 */
|
||||||
/* 33*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 162, 116, 0 /*set*/, 0, 100, 0, 14 }, // EAN-8
|
/* 33*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 162, 116, 0 /*set*/, 0, 100, 0, 14 }, /* EAN-8 */
|
||||||
/* 34*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 134, 116, 1 /*set*/, 0, 100, 0, 2 }, // EAN-8
|
/* 34*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 134, 116, 1 /*set*/, 0, 100, 0, 2 }, /* EAN-8 */
|
||||||
/* 35*/ { BARCODE_EANX, -1, -1, -1, "02345", 0, 50, 1, 47, 118, 116, 0 /*set*/, 0, 100, 0, 14 }, // EAN-5
|
/* 35*/ { BARCODE_EANX, -1, -1, -1, "02345", 0, 50, 1, 47, 118, 116, 0 /*set*/, 0, 100, 0, 14 }, /* EAN-5 */
|
||||||
/* 36*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 118, 116, 0 /*set*/, 0, 100, 0, 14 }, // EAN-5
|
/* 36*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 118, 116, 0 /*set*/, 0, 100, 0, 14 }, /* EAN-5 */
|
||||||
/* 37*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 94, 116, 1 /*set*/, 0, 100, 0, 2 }, // EAN-5
|
/* 37*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 94, 116, 1 /*set*/, 0, 100, 0, 2 }, /* EAN-5 */
|
||||||
/* 38*/ { BARCODE_EANX, -1, -1, -1, "02", 0, 50, 1, 20, 64, 116, 0 /*set*/, 0, 100, 0, 14 }, // EAN-2
|
/* 38*/ { BARCODE_EANX, -1, -1, -1, "02", 0, 50, 1, 20, 64, 116, 0 /*set*/, 0, 100, 0, 14 }, /* EAN-2 */
|
||||||
/* 39*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 64, 116, 0 /*set*/, 0, 100, 0, 14 }, // EAN-2
|
/* 39*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 64, 116, 0 /*set*/, 0, 100, 0, 14 }, /* EAN-2 */
|
||||||
/* 40*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 40, 116, 1 /*set*/, 0, 100, 0, 2 }, // EAN-2
|
/* 40*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 40, 116, 1 /*set*/, 0, 100, 0, 2 }, /* EAN-2 */
|
||||||
/* 41*/ { BARCODE_GS1_128, -1, -1, -1, "[20]02", 0, 50, 1, 68, 136, 116, 1 /*set*/, 0, 100, 0, 4 },
|
/* 41*/ { BARCODE_GS1_128, -1, -1, -1, "[20]02", 0, 50, 1, 68, 136, 116, 1 /*set*/, 0, 100, 0, 4 },
|
||||||
/* 42*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 1, 68, 176, 116, 0 /*set*/, 0, 100, 0, 20 },
|
/* 42*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 1, 68, 176, 116, 0 /*set*/, 0, 100, 0, 20 },
|
||||||
/* 43*/ { BARCODE_CODABAR, -1, -1, -1, "A0B", 0, 50, 1, 32, 64, 116, 1 /*set*/, 0, 100, 0, 2 },
|
/* 43*/ { BARCODE_CODABAR, -1, -1, -1, "A0B", 0, 50, 1, 32, 64, 116, 1 /*set*/, 0, 100, 0, 2 },
|
||||||
@ -1492,39 +1494,39 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/* 73*/ { BARCODE_UPCA, -1, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 },
|
/* 73*/ { BARCODE_UPCA, -1, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 },
|
||||||
/* 74*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 },
|
/* 74*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 },
|
||||||
/* 75*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 },
|
/* 75*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 },
|
||||||
/* 76*/ { BARCODE_UPCA, -1, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 0, 18 }, // Hide text
|
/* 76*/ { BARCODE_UPCA, -1, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 0, 18 }, /* Hide text */
|
||||||
/* 77*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 0, 18 }, // Hide text
|
/* 77*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 0 /*set*/, 0, 110, 0, 18 }, /* Hide text */
|
||||||
/* 78*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 190, 110, 1 /*set*/, 0, 110, 0, 2 }, // Hide text
|
/* 78*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 190, 110, 1 /*set*/, 0, 110, 0, 2 }, /* Hide text */
|
||||||
/* 79*/ { BARCODE_UPCA, -1, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116, 0 /*set*/, 16, 100, 266, 10 },
|
/* 79*/ { BARCODE_UPCA, -1, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116, 0 /*set*/, 16, 100, 266, 10 },
|
||||||
/* 80*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116, 0 /*set*/, 16, 100, 266, 10 },
|
/* 80*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116, 0 /*set*/, 16, 100, 266, 10 },
|
||||||
/* 81*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 266, 116, 1 /*set*/, 16, 100, 262, 4 },
|
/* 81*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 266, 116, 1 /*set*/, 16, 100, 262, 4 },
|
||||||
/* 82*/ { BARCODE_UPCA, -1, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, // Hide text
|
/* 82*/ { BARCODE_UPCA, -1, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, /* Hide text */
|
||||||
/* 83*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, // Hide text
|
/* 83*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 0 /*set*/, 16, 110, 266, 10 }, /* Hide text */
|
||||||
/* 84*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 248, 110, 1 /*set*/, 16, 100, 244, 4 }, // Hide text
|
/* 84*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 248, 110, 1 /*set*/, 16, 100, 244, 4 }, /* Hide text */
|
||||||
/* 85*/ { BARCODE_UPCA_CHK, -1, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116, 0 /*set*/, 16, 100, 320, 10 },
|
/* 85*/ { BARCODE_UPCA_CHK, -1, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116, 0 /*set*/, 16, 100, 320, 10 },
|
||||||
/* 86*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116, 0 /*set*/, 16, 100, 320, 10 },
|
/* 86*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116, 0 /*set*/, 16, 100, 320, 10 },
|
||||||
/* 87*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 320, 116, 1 /*set*/, 16, 100, 318, 2 },
|
/* 87*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 320, 116, 1 /*set*/, 16, 100, 318, 2 },
|
||||||
/* 88*/ { BARCODE_UPCA_CHK, -1, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 0 /*set*/, 16, 110, 320, 10 }, // Hide text
|
/* 88*/ { BARCODE_UPCA_CHK, -1, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 0 /*set*/, 16, 110, 320, 10 }, /* Hide text */
|
||||||
/* 89*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 0 /*set*/, 16, 110, 320, 10 }, // Hide text
|
/* 89*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 0 /*set*/, 16, 110, 320, 10 }, /* Hide text */
|
||||||
/* 90*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 302, 110, 1 /*set*/, 16, 100, 300, 2 }, // Hide text
|
/* 90*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 302, 110, 1 /*set*/, 16, 100, 300, 2 }, /* Hide text */
|
||||||
/* 91*/ { BARCODE_UPCE, -1, -1, -1, "8145713", 0, 50, 1, 51, 134, 116, 0 /*set*/, 0, 100, 120, 18 },
|
/* 91*/ { BARCODE_UPCE, -1, -1, -1, "8145713", 0, 50, 1, 51, 134, 116, 0 /*set*/, 0, 100, 120, 18 },
|
||||||
/* 92*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116, 0 /*set*/, 0, 100, 120, 18 },
|
/* 92*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116, 0 /*set*/, 0, 100, 120, 18 },
|
||||||
/* 93*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116, 0 /*set*/, 0, 100, 120, 18 },
|
/* 93*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116, 0 /*set*/, 0, 100, 120, 18 },
|
||||||
/* 94*/ { BARCODE_UPCE, -1, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 0 /*set*/, 0, 100, 120, 18 }, // Hide text
|
/* 94*/ { BARCODE_UPCE, -1, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 0 /*set*/, 0, 100, 120, 18 }, /* Hide text */
|
||||||
/* 95*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 0 /*set*/, 0, 100, 120, 18 }, // Hide text
|
/* 95*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 0 /*set*/, 0, 100, 120, 18 }, /* Hide text */
|
||||||
/* 96*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 102, 110, 1 /*set*/, 0, 110, 100, 2 }, // Hide text
|
/* 96*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 102, 110, 1 /*set*/, 0, 110, 100, 2 }, /* Hide text */
|
||||||
/* 97*/ { BARCODE_UPCE_CHK, -1, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116, 0 /*set*/, 16, 100, 174, 10 },
|
/* 97*/ { BARCODE_UPCE_CHK, -1, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116, 0 /*set*/, 16, 100, 174, 10 },
|
||||||
/* 98*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116, 0 /*set*/, 16, 100, 174, 10 },
|
/* 98*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116, 0 /*set*/, 16, 100, 174, 10 },
|
||||||
/* 99*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 174, 116, 1 /*set*/, 16, 100, 170, 4 },
|
/* 99*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 174, 116, 1 /*set*/, 16, 100, 170, 4 },
|
||||||
/*100*/ { BARCODE_UPCE_CHK, -1, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 0 /*set*/, 16, 110, 174, 10 }, // Hide text
|
/*100*/ { BARCODE_UPCE_CHK, -1, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 0 /*set*/, 16, 110, 174, 10 }, /* Hide text */
|
||||||
/*101*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 0 /*set*/, 16, 110, 174, 10 }, // Hide text
|
/*101*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 0 /*set*/, 16, 110, 174, 10 }, /* Hide text */
|
||||||
/*102*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 156, 110, 1 /*set*/, 16, 100, 152, 4 }, // Hide text
|
/*102*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 156, 110, 1 /*set*/, 16, 100, 152, 4 }, /* Hide text */
|
||||||
/*103*/ { BARCODE_UPCE, -1, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116, 0 /*set*/, 16, 100, 228, 10 },
|
/*103*/ { BARCODE_UPCE, -1, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116, 0 /*set*/, 16, 100, 228, 10 },
|
||||||
/*104*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116, 0 /*set*/, 16, 100, 228, 10 },
|
/*104*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116, 0 /*set*/, 16, 100, 228, 10 },
|
||||||
/*105*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 228, 116, 1 /*set*/, 16, 100, 216, 2 },
|
/*105*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 228, 116, 1 /*set*/, 16, 100, 216, 2 },
|
||||||
/*106*/ { BARCODE_UPCE, -1, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 0 /*set*/, 16, 110, 228, 10 }, // Hide text
|
/*106*/ { BARCODE_UPCE, -1, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 0 /*set*/, 16, 110, 228, 10 }, /* Hide text */
|
||||||
/*107*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 0 /*set*/, 16, 110, 228, 10 }, // Hide text
|
/*107*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 0 /*set*/, 16, 110, 228, 10 }, /* Hide text */
|
||||||
/*108*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 210, 110, 1 /*set*/, 16, 100, 208, 2 }, // Hide text
|
/*108*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 210, 110, 1 /*set*/, 16, 100, 208, 2 }, /* Hide text */
|
||||||
/*109*/ { BARCODE_POSTNET, -1, -1, -1, "12345", 0, 12, 2, 63, 126, 24, 1 /*set*/, 0, 24, 0, 2 },
|
/*109*/ { BARCODE_POSTNET, -1, -1, -1, "12345", 0, 12, 2, 63, 126, 24, 1 /*set*/, 0, 24, 0, 2 },
|
||||||
/*110*/ { BARCODE_POSTNET, BARCODE_QUIET_ZONES, -1, -1, "12345", 0, 12, 2, 63, 146, 30, 0 /*set*/, 0, 30, 0, 10 },
|
/*110*/ { BARCODE_POSTNET, BARCODE_QUIET_ZONES, -1, -1, "12345", 0, 12, 2, 63, 146, 30, 0 /*set*/, 0, 30, 0, 10 },
|
||||||
/*111*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, "1234", 0, 50, 1, 55, 110, 116, 1 /*set*/, 0, 100, 0, 4 },
|
/*111*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, "1234", 0, 50, 1, 55, 110, 116, 1 /*set*/, 0, 100, 0, 4 },
|
||||||
@ -1644,9 +1646,9 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*225*/ { BARCODE_EANX_CC, -1, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116, 0 /*set*/, 24, 110, 218, 16 },
|
/*225*/ { BARCODE_EANX_CC, -1, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116, 0 /*set*/, 24, 110, 218, 16 },
|
||||||
/*226*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116, 0 /*set*/, 24, 110, 218, 16 },
|
/*226*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116, 0 /*set*/, 24, 110, 218, 16 },
|
||||||
/*227*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 220, 116, 0 /*set*/, 24, 110, 218, 2 },
|
/*227*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 220, 116, 0 /*set*/, 24, 110, 218, 2 },
|
||||||
/*228*/ { BARCODE_EANX_CC, -1, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 28 }, // Hide text
|
/*228*/ { BARCODE_EANX_CC, -1, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 28 }, /* Hide text */
|
||||||
/*229*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 28 }, // Hide text
|
/*229*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 28 }, /* Hide text */
|
||||||
/*230*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 198, 110, 1 /*set*/, 24, 110, 6, 2 }, // Hide text
|
/*230*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 198, 110, 1 /*set*/, 24, 110, 6, 2 }, /* Hide text */
|
||||||
/*231*/ { BARCODE_GS1_128_CC, -1, -1, -1, "[20]02", 0, 50, 5, 99, 198, 116, 1 /*set*/, 14, 100, 24, 4 },
|
/*231*/ { BARCODE_GS1_128_CC, -1, -1, -1, "[20]02", 0, 50, 5, 99, 198, 116, 1 /*set*/, 14, 100, 24, 4 },
|
||||||
/*232*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 5, 99, 238, 116, 0 /*set*/, 14, 100, 24, 20 },
|
/*232*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 5, 99, 238, 116, 0 /*set*/, 14, 100, 24, 20 },
|
||||||
/*233*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, "1234", 0, 21, 5, 100, 200, 58, 1 /*set*/, 14, 42, 10, 2 },
|
/*233*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, "1234", 0, 21, 5, 100, 200, 58, 1 /*set*/, 14, 42, 10, 2 },
|
||||||
@ -1658,15 +1660,15 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*239*/ { BARCODE_UPCA_CC, -1, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116, 1 /*set*/, 24, 100, 212, 2 },
|
/*239*/ { BARCODE_UPCA_CC, -1, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116, 1 /*set*/, 24, 100, 212, 2 },
|
||||||
/*240*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116, 1 /*set*/, 24, 100, 212, 2 },
|
/*240*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116, 1 /*set*/, 24, 100, 212, 2 },
|
||||||
/*241*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116, 1 /*set*/, 24, 100, 212, 2 },
|
/*241*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116, 1 /*set*/, 24, 100, 212, 2 },
|
||||||
/*242*/ { BARCODE_UPCA_CC, -1, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 24 }, // Hide text
|
/*242*/ { BARCODE_UPCA_CC, -1, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 24 }, /* Hide text */
|
||||||
/*243*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 24 }, // Hide text
|
/*243*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 0 /*set*/, 24, 110, 0, 24 }, /* Hide text */
|
||||||
/*244*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 198, 110, 1 /*set*/, 24, 110, 6, 2 }, // Hide text
|
/*244*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 198, 110, 1 /*set*/, 24, 110, 6, 2 }, /* Hide text */
|
||||||
/*245*/ { BARCODE_UPCE_CC, -1, -1, -1, "8145713", 0, 50, 9, 55, 142, 116, 1 /*set*/, 32, 100, 124, 2 },
|
/*245*/ { BARCODE_UPCE_CC, -1, -1, -1, "8145713", 0, 50, 9, 55, 142, 116, 1 /*set*/, 32, 100, 124, 2 },
|
||||||
/*246*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116, 1 /*set*/, 32, 100, 124, 2 },
|
/*246*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116, 1 /*set*/, 32, 100, 124, 2 },
|
||||||
/*247*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116, 1 /*set*/, 32, 100, 124, 2 },
|
/*247*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116, 1 /*set*/, 32, 100, 124, 2 },
|
||||||
/*248*/ { BARCODE_UPCE_CC, -1, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 0 /*set*/, 32, 110, 0, 24 }, // Hide text
|
/*248*/ { BARCODE_UPCE_CC, -1, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 0 /*set*/, 32, 110, 0, 24 }, /* Hide text */
|
||||||
/*249*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 0 /*set*/, 32, 110, 0, 24 }, // Hide text
|
/*249*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 0 /*set*/, 32, 110, 0, 24 }, /* Hide text */
|
||||||
/*250*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 110, 110, 1 /*set*/, 32, 110, 6, 2 }, // Hide text
|
/*250*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 110, 110, 1 /*set*/, 32, 110, 6, 2 }, /* Hide text */
|
||||||
/*251*/ { BARCODE_DBAR_STK_CC, -1, -1, -1, "1234", 0, 24, 9, 56, 112, 48, 1 /*set*/, 34, 48, 0, 2 },
|
/*251*/ { BARCODE_DBAR_STK_CC, -1, -1, -1, "1234", 0, 24, 9, 56, 112, 48, 1 /*set*/, 34, 48, 0, 2 },
|
||||||
/*252*/ { BARCODE_DBAR_STK_CC, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 24, 9, 56, 116, 48, 0 /*set*/, 34, 48, 0, 2 },
|
/*252*/ { BARCODE_DBAR_STK_CC, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 24, 9, 56, 116, 48, 0 /*set*/, 34, 48, 0, 2 },
|
||||||
/*253*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, -1, "1234", 0, 80, 11, 56, 112, 160, 1 /*set*/, 94, 160, 0, 2 },
|
/*253*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, -1, "1234", 0, 80, 11, 56, 112, 160, 1 /*set*/, 94, 160, 0, 2 },
|
||||||
@ -1675,10 +1677,10 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*256*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]12", 0, 41, 5, 102, 208, 82, 0 /*set*/, 14, 82, 2, 2 },
|
/*256*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]12", 0, 41, 5, 102, 208, 82, 0 /*set*/, 14, 82, 2, 2 },
|
||||||
/*257*/ { BARCODE_CHANNEL, -1, -1, -1, "1234", 0, 50, 1, 27, 54, 116, 1 /*set*/, 0, 100, 0, 2 },
|
/*257*/ { BARCODE_CHANNEL, -1, -1, -1, "1234", 0, 50, 1, 27, 54, 116, 1 /*set*/, 0, 100, 0, 2 },
|
||||||
/*258*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 27, 60, 116, 0 /*set*/, 0, 100, 0, 2 },
|
/*258*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 27, 60, 116, 0 /*set*/, 0, 100, 0, 2 },
|
||||||
/*259*/ { BARCODE_CODEONE, -1, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 }, // Versions A to H - no quiet zone
|
/*259*/ { BARCODE_CODEONE, -1, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 }, /* Versions A to H - no quiet zone */
|
||||||
/*260*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 },
|
/*260*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 },
|
||||||
/*261*/ { BARCODE_CODEONE, BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 },
|
/*261*/ { BARCODE_CODEONE, BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 },
|
||||||
/*262*/ { BARCODE_CODEONE, -1, 9, -1, "1234", 0, 8, 8, 11, 22, 16, 1 /*set*/, 10, 16, 0, 2 }, // Version S (& T) have quiet zones
|
/*262*/ { BARCODE_CODEONE, -1, 9, -1, "1234", 0, 8, 8, 11, 22, 16, 1 /*set*/, 10, 16, 0, 2 }, /* Version S (& T) have quiet zones */
|
||||||
/*263*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, 9, -1, "1234", 0, 8, 8, 11, 26, 16, 0 /*set*/, 0, 16, 0, 2 },
|
/*263*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, 9, -1, "1234", 0, 8, 8, 11, 26, 16, 0 /*set*/, 0, 16, 0, 2 },
|
||||||
/*264*/ { BARCODE_GRIDMATRIX, -1, -1, -1, "1234", 0, 18, 18, 18, 36, 36, 1 /*set*/, 0, 2, 0, 12 },
|
/*264*/ { BARCODE_GRIDMATRIX, -1, -1, -1, "1234", 0, 18, 18, 18, 36, 36, 1 /*set*/, 0, 2, 0, 12 },
|
||||||
/*265*/ { BARCODE_GRIDMATRIX, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 18, 18, 18, 60, 60, 0 /*set*/, 0, 60, 0, 12 },
|
/*265*/ { BARCODE_GRIDMATRIX, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 18, 18, 18, 60, 60, 0 /*set*/, 0, 60, 0, 12 },
|
||||||
@ -1688,6 +1690,8 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*269*/ { BARCODE_ULTRA, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 13, 13, 15, 34, 30, 0 /*set*/, 0, 2, 0, 34 },
|
/*269*/ { BARCODE_ULTRA, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 13, 13, 15, 34, 30, 0 /*set*/, 0, 2, 0, 34 },
|
||||||
/*270*/ { BARCODE_RMQR, -1, -1, -1, "1234", 0, 11, 11, 27, 54, 22, 1 /*set*/, 0, 14, 0, 2 },
|
/*270*/ { BARCODE_RMQR, -1, -1, -1, "1234", 0, 11, 11, 27, 54, 22, 1 /*set*/, 0, 14, 0, 2 },
|
||||||
/*271*/ { BARCODE_RMQR, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 11, 11, 27, 62, 30, 0 /*set*/, 0, 30, 0, 4 },
|
/*271*/ { BARCODE_RMQR, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 11, 11, 27, 62, 30, 0 /*set*/, 0, 30, 0, 4 },
|
||||||
|
/*272*/ { BARCODE_BC412, -1, -1, -1, "1234567", 0, 16.5, 1, 102, 204, 49, 1 /*set*/, 0, 32, 0, 2 },
|
||||||
|
/*273*/ { BARCODE_BC412, BARCODE_QUIET_ZONES, -1, -1, "1234567", 0, 16.5, 1, 102, 244, 49, 0 /*set*/, 0, 32, 0, 2 },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -1727,7 +1731,7 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
assert_equal(ret, data[i].ret_raster, "i:%d ZBarcode_Buffer(%d) ret %d != %d (%s)\n", i, data[i].symbology, ret, data[i].ret_raster, symbol->errtxt);
|
assert_equal(ret, data[i].ret_raster, "i:%d ZBarcode_Buffer(%d) ret %d != %d (%s)\n", i, data[i].symbology, ret, data[i].ret_raster, symbol->errtxt);
|
||||||
assert_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
assert_nonnull(symbol->bitmap, "i:%d (%d) symbol->bitmap NULL\n", i, data[i].symbology);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
assert_equal(symbol->height, data[i].expected_height, "i:%d (%d) symbol->height %.8g != %.8g\n", i, data[i].symbology, symbol->height, data[i].expected_height);
|
assert_equal(symbol->height, data[i].expected_height, "i:%d (%d) symbol->height %.8g != %.8g\n", i, data[i].symbology, symbol->height, data[i].expected_height);
|
||||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%d) symbol->rows %d != %d\n", i, data[i].symbology, symbol->rows, data[i].expected_rows);
|
assert_equal(symbol->rows, data[i].expected_rows, "i:%d (%d) symbol->rows %d != %d\n", i, data[i].symbology, symbol->rows, data[i].expected_rows);
|
||||||
@ -1885,7 +1889,7 @@ static void test_buffer_plot(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) printf("i:%d\n", i); // ZINT_DEBUG_TEST_PRINT 16
|
if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d\n", i); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
@ -1914,7 +1918,7 @@ static void test_buffer_plot(int index, int generate, int debug) {
|
|||||||
assert_zero(ret, "i:%d ZBarcode_Buffer(%s) ret %d != 0 (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt);
|
assert_zero(ret, "i:%d ZBarcode_Buffer(%s) ret %d != 0 (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt);
|
||||||
assert_nonnull(symbol->bitmap, "i:%d ZBarcode_Buffer(%s) bitmap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
assert_nonnull(symbol->bitmap, "i:%d ZBarcode_Buffer(%s) bitmap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) testUtilBitmapPrint(symbol, NULL, NULL); /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
|
|
||||||
if (generate) {
|
if (generate) {
|
||||||
printf(" /*%3d*/ { %s, %d, %d, %d, %s, %g, \"%s\", \"%s\", \"%s\", %s, %g, %d, %d, %d, %d,\n",
|
printf(" /*%3d*/ { %s, %d, %d, %d, %s, %g, \"%s\", \"%s\", \"%s\", %s, %g, %d, %d, %d, %d,\n",
|
||||||
@ -1939,7 +1943,7 @@ static void test_buffer_plot(int index, int generate, int debug) {
|
|||||||
bg_len = (int) strlen(data[i].bgcolour);
|
bg_len = (int) strlen(data[i].bgcolour);
|
||||||
if (fg_len > 6 || bg_len > 6) {
|
if (fg_len > 6 || bg_len > 6) {
|
||||||
assert_nonnull(symbol->alphamap, "i:%d ZBarcode_Buffer(%s) alphamap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
assert_nonnull(symbol->alphamap, "i:%d ZBarcode_Buffer(%s) alphamap NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
||||||
// TODO: check alphamap
|
/* TODO: check alphamap */
|
||||||
} else {
|
} else {
|
||||||
assert_null(symbol->alphamap, "i:%d ZBarcode_Buffer(%s) alphamap not NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
assert_null(symbol->alphamap, "i:%d ZBarcode_Buffer(%s) alphamap not NULL\n", i, testUtilBarcodeName(data[i].symbology));
|
||||||
}
|
}
|
||||||
@ -2563,6 +2567,12 @@ static void test_height(int index, int generate, int debug) {
|
|||||||
/*590*/ { BARCODE_UPNQR, -1, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
|
/*590*/ { BARCODE_UPNQR, -1, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
|
||||||
/*591*/ { BARCODE_ULTRA, -1, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
|
/*591*/ { BARCODE_ULTRA, -1, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
|
||||||
/*592*/ { BARCODE_RMQR, -1, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
|
/*592*/ { BARCODE_RMQR, -1, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
|
||||||
|
/*593*/ { BARCODE_BC412, -1, 1, "1234567", "", 0, 1, 1, 102, 204, 2, "" },
|
||||||
|
/*594*/ { BARCODE_BC412, -1, 13.6, "1234567", "", 0, 13.5, 1, 102, 204, 27, "" },
|
||||||
|
/*595*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 13.6, "1234567", "", ZINT_WARN_NONCOMPLIANT, 13.5, 1, 102, 204, 27, "" },
|
||||||
|
/*596*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 13.65, "1234567", "", 0, 13.5, 1, 102, 204, 27, "" },
|
||||||
|
/*597*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 21.3, "1234567", "", 0, 21.5, 1, 102, 204, 43, "" },
|
||||||
|
/*598*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 21.35, "1234567", "", ZINT_WARN_NONCOMPLIANT, 21.5, 1, 102, 204, 43, "" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -2588,7 +2598,7 @@ static void test_height(int index, int generate, int debug) {
|
|||||||
symbol->height = data[i].height;
|
symbol->height = data[i].height;
|
||||||
}
|
}
|
||||||
symbol->input_mode = UNICODE_MODE;
|
symbol->input_mode = UNICODE_MODE;
|
||||||
symbol->show_hrt = 0; // Note: disabling HRT
|
symbol->show_hrt = 0; /* Note: disabling HRT */
|
||||||
symbol->debug |= debug;
|
symbol->debug |= debug;
|
||||||
|
|
||||||
if (strlen(data[i].composite)) {
|
if (strlen(data[i].composite)) {
|
||||||
@ -2751,7 +2761,7 @@ static void test_height_per_row(int index, int generate, int debug) {
|
|||||||
if (data[i].scale != -1) {
|
if (data[i].scale != -1) {
|
||||||
symbol->scale = data[i].scale;
|
symbol->scale = data[i].scale;
|
||||||
}
|
}
|
||||||
symbol->show_hrt = 0; // Note: disabling HRT
|
symbol->show_hrt = 0; /* Note: disabling HRT */
|
||||||
|
|
||||||
if (strlen(data[i].composite)) {
|
if (strlen(data[i].composite)) {
|
||||||
text = data[i].composite;
|
text = data[i].composite;
|
||||||
@ -2798,7 +2808,7 @@ static void test_height_per_row(int index, int generate, int debug) {
|
|||||||
#define TEST_PERF_ITERATIONS (TEST_PERF_ITER_MILLES * 1000)
|
#define TEST_PERF_ITERATIONS (TEST_PERF_ITER_MILLES * 1000)
|
||||||
#define TEST_PERF_TIME(arg) (((arg) * 1000.0) / CLOCKS_PER_SEC)
|
#define TEST_PERF_TIME(arg) (((arg) * 1000.0) / CLOCKS_PER_SEC)
|
||||||
|
|
||||||
// Not a real test, just performance indicator for scaling
|
/* Not a real test, just performance indicator for scaling */
|
||||||
static void test_perf_scale(int index, int debug) {
|
static void test_perf_scale(int index, int debug) {
|
||||||
|
|
||||||
struct item {
|
struct item {
|
||||||
@ -2885,7 +2895,7 @@ static void test_perf_scale(int index, int debug) {
|
|||||||
ret = ZBarcode_Buffer(symbol, 0 /*rotate_angle*/);
|
ret = ZBarcode_Buffer(symbol, 0 /*rotate_angle*/);
|
||||||
diff_buf_inter += clock() - start;
|
diff_buf_inter += clock() - start;
|
||||||
assert_zero(ret, "i:%d ZBarcode_Buffer OUT_BUFFER_INTERMEDIATE ret %d != 0 (%s)\n", i, ret, symbol->errtxt);
|
assert_zero(ret, "i:%d ZBarcode_Buffer OUT_BUFFER_INTERMEDIATE ret %d != 0 (%s)\n", i, ret, symbol->errtxt);
|
||||||
symbol->output_options &= ~OUT_BUFFER_INTERMEDIATE; // Undo
|
symbol->output_options &= ~OUT_BUFFER_INTERMEDIATE; /* Undo */
|
||||||
|
|
||||||
start = clock();
|
start = clock();
|
||||||
ret = ZBarcode_Print(symbol, 0 /*rotate_angle*/);
|
ret = ZBarcode_Print(symbol, 0 /*rotate_angle*/);
|
||||||
@ -2938,3 +2948,5 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* vim: set ts=4 sw=4 et : */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
libzint - the open source barcode library
|
libzint - the open source barcode library
|
||||||
Copyright (C) 2019 - 2021 Robin Stuart <rstuart114@gmail.com>
|
Copyright (C) 2019-2022 Robin Stuart <rstuart114@gmail.com>
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions
|
modification, are permitted provided that the following conditions
|
||||||
@ -27,7 +27,7 @@
|
|||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
SUCH DAMAGE.
|
SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/* vim: set ts=4 sw=4 et : */
|
/* SPDX-License-Identifier: BSD-3-Clause */
|
||||||
|
|
||||||
#include "testcommon.h"
|
#include "testcommon.h"
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ static void test_options(int index, int debug) {
|
|||||||
float expected_vector_width;
|
float expected_vector_width;
|
||||||
float expected_vector_height;
|
float expected_vector_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE128, "123456", "7890ab", 0, "A", 0, 1, 46, 92, 118.9 },
|
/* 0*/ { BARCODE_CODE128, "123456", "7890ab", 0, "A", 0, 1, 46, 92, 118.9 },
|
||||||
/* 1*/ { BARCODE_CODE128, "12345", NULL, 0, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 },
|
/* 1*/ { BARCODE_CODE128, "12345", NULL, 0, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 },
|
||||||
@ -287,6 +287,7 @@ static void test_buffer_vector(int index, int generate, int debug) {
|
|||||||
/*125*/ { BARCODE_UPNQR, "1234567890AB", "", 77, 77, 77, 154, 154 },
|
/*125*/ { BARCODE_UPNQR, "1234567890AB", "", 77, 77, 77, 154, 154 },
|
||||||
/*126*/ { BARCODE_ULTRA, "1234567890", "", 13, 13, 18, 36, 26 },
|
/*126*/ { BARCODE_ULTRA, "1234567890", "", 13, 13, 18, 36, 26 },
|
||||||
/*127*/ { BARCODE_RMQR, "12345", "", 11, 11, 27, 54, 22 },
|
/*127*/ { BARCODE_RMQR, "12345", "", 11, 11, 27, 54, 22 },
|
||||||
|
/*128*/ { BARCODE_BC412, "1234567", "", 16.666668, 1, 102, 204, 52.233337 },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -358,20 +359,20 @@ static void test_upcean_hrt(int index, int debug) {
|
|||||||
float expected_string_x;
|
float expected_string_x;
|
||||||
float expected_addon_string_x;
|
float expected_addon_string_x;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116.4, 12, -1 }, // EAN-13
|
/* 0*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116.4, 12, -1 }, /* EAN-13 */
|
||||||
/* 1*/ { BARCODE_EANX, 0, "123456789012", 0, 50, 1, 95, 226, 110, -1, -1 }, // EAN-13
|
/* 1*/ { BARCODE_EANX, 0, "123456789012", 0, 50, 1, 95, 226, 110, -1, -1 }, /* EAN-13 */
|
||||||
/* 2*/ { BARCODE_EANX_CHK, -1, "1234567890128", 0, 50, 1, 95, 226, 116.4, 12, -1 }, // EAN-13
|
/* 2*/ { BARCODE_EANX_CHK, -1, "1234567890128", 0, 50, 1, 95, 226, 116.4, 12, -1 }, /* EAN-13 */
|
||||||
/* 3*/ { BARCODE_EANX_CHK, 0, "1234567890128", 0, 50, 1, 95, 226, 110, -1, -1 }, // EAN-13
|
/* 3*/ { BARCODE_EANX_CHK, 0, "1234567890128", 0, 50, 1, 95, 226, 110, -1, -1 }, /* EAN-13 */
|
||||||
/* 4*/ { BARCODE_ISBNX, -1, "9784567890120", 0, 50, 1, 95, 226, 116.4, 12, -1 },
|
/* 4*/ { BARCODE_ISBNX, -1, "9784567890120", 0, 50, 1, 95, 226, 116.4, 12, -1 },
|
||||||
/* 5*/ { BARCODE_ISBNX, 0, "9784567890120", 0, 50, 1, 95, 226, 110, -1, -1 },
|
/* 5*/ { BARCODE_ISBNX, 0, "9784567890120", 0, 50, 1, 95, 226, 110, -1, -1 },
|
||||||
/* 6*/ { BARCODE_EANX, -1, "1234567", 0, 50, 1, 67, 162, 116.4, 48, -1 }, // EAN-8
|
/* 6*/ { BARCODE_EANX, -1, "1234567", 0, 50, 1, 67, 162, 116.4, 48, -1 }, /* EAN-8 */
|
||||||
/* 7*/ { BARCODE_EANX, 0, "1234567", 0, 50, 1, 67, 162, 110, -1, -1 }, // EAN-8
|
/* 7*/ { BARCODE_EANX, 0, "1234567", 0, 50, 1, 67, 162, 110, -1, -1 }, /* EAN-8 */
|
||||||
/* 8*/ { BARCODE_EANX, -1, "1234", 0, 50, 1, 47, 118, 116.4, 61, -1 }, // EAN-5
|
/* 8*/ { BARCODE_EANX, -1, "1234", 0, 50, 1, 47, 118, 116.4, 61, -1 }, /* EAN-5 */
|
||||||
/* 9*/ { BARCODE_EANX, 0, "1234", 0, 50, 1, 47, 118, 100, -1, -1 }, // EAN-5
|
/* 9*/ { BARCODE_EANX, 0, "1234", 0, 50, 1, 47, 118, 100, -1, -1 }, /* EAN-5 */
|
||||||
/* 10*/ { BARCODE_EANX, -1, "12", 0, 50, 1, 20, 64, 116.4, 34, -1 }, // EAN-2
|
/* 10*/ { BARCODE_EANX, -1, "12", 0, 50, 1, 20, 64, 116.4, 34, -1 }, /* EAN-2 */
|
||||||
/* 11*/ { BARCODE_EANX, 0, "12", 0, 50, 1, 20, 64, 100, -1, -1 }, // EAN-2
|
/* 11*/ { BARCODE_EANX, 0, "12", 0, 50, 1, 20, 64, 100, -1, -1 }, /* EAN-2 */
|
||||||
/* 12*/ { BARCODE_UPCA, -1, "12345678901", 0, 50, 1, 95, 226, 116.4, 8, -1 },
|
/* 12*/ { BARCODE_UPCA, -1, "12345678901", 0, 50, 1, 95, 226, 116.4, 8, -1 },
|
||||||
/* 13*/ { BARCODE_UPCA, 0, "12345678901", 0, 50, 1, 95, 226, 110, -1, -1 },
|
/* 13*/ { BARCODE_UPCA, 0, "12345678901", 0, 50, 1, 95, 226, 110, -1, -1 },
|
||||||
/* 14*/ { BARCODE_UPCA_CHK, -1, "123456789012", 0, 50, 1, 95, 226, 116.4, 8, -1 },
|
/* 14*/ { BARCODE_UPCA_CHK, -1, "123456789012", 0, 50, 1, 95, 226, 116.4, 8, -1 },
|
||||||
@ -380,18 +381,18 @@ static void test_upcean_hrt(int index, int debug) {
|
|||||||
/* 17*/ { BARCODE_UPCE, 0, "1234567", 0, 50, 1, 51, 134, 110, -1, -1 },
|
/* 17*/ { BARCODE_UPCE, 0, "1234567", 0, 50, 1, 51, 134, 110, -1, -1 },
|
||||||
/* 18*/ { BARCODE_UPCE_CHK, -1, "12345670", 0, 50, 1, 51, 134, 116.4, 8, -1 },
|
/* 18*/ { BARCODE_UPCE_CHK, -1, "12345670", 0, 50, 1, 51, 134, 116.4, 8, -1 },
|
||||||
/* 19*/ { BARCODE_UPCE_CHK, 0, "12345670", 0, 50, 1, 51, 134, 110, -1, -1 },
|
/* 19*/ { BARCODE_UPCE_CHK, 0, "12345670", 0, 50, 1, 51, 134, 110, -1, -1 },
|
||||||
/* 20*/ { BARCODE_EANX, -1, "123456789012+12", 0, 50, 1, 122, 276.0, 116.4, 12, 70 }, // EAN-13 + EAN-2
|
/* 20*/ { BARCODE_EANX, -1, "123456789012+12", 0, 50, 1, 122, 276.0, 116.4, 12, 70 }, /* EAN-13 + EAN-2 */
|
||||||
/* 21*/ { BARCODE_EANX, 0, "123456789012+12", 0, 50, 1, 122, 276.0, 110, -1, -1 }, // EAN-13 + EAN-2
|
/* 21*/ { BARCODE_EANX, 0, "123456789012+12", 0, 50, 1, 122, 276.0, 110, -1, -1 }, /* EAN-13 + EAN-2 */
|
||||||
/* 22*/ { BARCODE_ISBNX, -1, "9784567890120+12", 0, 50, 1, 122, 276.0, 116.4, 12, 70 }, // ISBN + EAN-2
|
/* 22*/ { BARCODE_ISBNX, -1, "9784567890120+12", 0, 50, 1, 122, 276.0, 116.4, 12, 70 }, /* ISBN + EAN-2 */
|
||||||
/* 23*/ { BARCODE_ISBNX, 0, "9784567890120+12", 0, 50, 1, 122, 276.0, 110, -1, -1 }, // ISBN + EAN-2
|
/* 23*/ { BARCODE_ISBNX, 0, "9784567890120+12", 0, 50, 1, 122, 276.0, 110, -1, -1 }, /* ISBN + EAN-2 */
|
||||||
/* 24*/ { BARCODE_EANX, -1, "123456789012+12345", 0, 50, 1, 149, 330.0, 116.4, 12, 70 }, // EAN-13 + EAN-5
|
/* 24*/ { BARCODE_EANX, -1, "123456789012+12345", 0, 50, 1, 149, 330.0, 116.4, 12, 70 }, /* EAN-13 + EAN-5 */
|
||||||
/* 25*/ { BARCODE_EANX, 0, "123456789012+12345", 0, 50, 1, 149, 330.0, 110, -1, -1 }, // EAN-13 + EAN-5
|
/* 25*/ { BARCODE_EANX, 0, "123456789012+12345", 0, 50, 1, 149, 330.0, 110, -1, -1 }, /* EAN-13 + EAN-5 */
|
||||||
/* 26*/ { BARCODE_ISBNX, -1, "9784567890120+12345", 0, 50, 1, 149, 330.0, 116.4, 12, 70 }, // ISBN + EAN-5
|
/* 26*/ { BARCODE_ISBNX, -1, "9784567890120+12345", 0, 50, 1, 149, 330.0, 116.4, 12, 70 }, /* ISBN + EAN-5 */
|
||||||
/* 27*/ { BARCODE_ISBNX, 0, "9784567890120+12345", 0, 50, 1, 149, 330.0, 110, -1, -1 }, // ISBN + EAN-5
|
/* 27*/ { BARCODE_ISBNX, 0, "9784567890120+12345", 0, 50, 1, 149, 330.0, 110, -1, -1 }, /* ISBN + EAN-5 */
|
||||||
/* 28*/ { BARCODE_EANX, -1, "1234567+12", 0, 50, 1, 94, 216.0, 116.4, 48, 114 }, // EAN-8 + EAN-2
|
/* 28*/ { BARCODE_EANX, -1, "1234567+12", 0, 50, 1, 94, 216.0, 116.4, 48, 114 }, /* EAN-8 + EAN-2 */
|
||||||
/* 29*/ { BARCODE_EANX, 0, "1234567+12", 0, 50, 1, 94, 216.0, 110, -1, -1 }, // EAN-8 + EAN-2
|
/* 29*/ { BARCODE_EANX, 0, "1234567+12", 0, 50, 1, 94, 216.0, 110, -1, -1 }, /* EAN-8 + EAN-2 */
|
||||||
/* 30*/ { BARCODE_EANX, -1, "1234567+12345", 0, 50, 1, 121, 270.0, 116.4, 48, 114 }, // EAN-8 + EAN-5
|
/* 30*/ { BARCODE_EANX, -1, "1234567+12345", 0, 50, 1, 121, 270.0, 116.4, 48, 114 }, /* EAN-8 + EAN-5 */
|
||||||
/* 31*/ { BARCODE_EANX, 0, "1234567+12345", 0, 50, 1, 121, 270.0, 110, -1, -1 }, // EAN-8 + EAN-5
|
/* 31*/ { BARCODE_EANX, 0, "1234567+12345", 0, 50, 1, 121, 270.0, 110, -1, -1 }, /* EAN-8 + EAN-5 */
|
||||||
/* 32*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 116.4, 8, 72 },
|
/* 32*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 116.4, 8, 72 },
|
||||||
/* 33*/ { BARCODE_UPCA, 0, "12345678901+12", 0, 50, 1, 124, 276, 110, -1, -1 },
|
/* 33*/ { BARCODE_UPCA, 0, "12345678901+12", 0, 50, 1, 124, 276, 110, -1, -1 },
|
||||||
/* 34*/ { BARCODE_UPCA, -1, "12345678901+12345", 0, 50, 1, 151, 330, 116.4, 8, 72 },
|
/* 34*/ { BARCODE_UPCA, -1, "12345678901+12345", 0, 50, 1, 151, 330, 116.4, 8, 72 },
|
||||||
@ -480,17 +481,17 @@ static void test_row_separator(int index, int debug) {
|
|||||||
int expected_separator_y;
|
int expected_separator_y;
|
||||||
int expected_separator_height;
|
int expected_separator_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODABLOCKF, -1, -1, -1, "A", 0, 20, 2, 101, 42, 21, 2 },
|
/* 0*/ { BARCODE_CODABLOCKF, -1, -1, -1, "A", 0, 20, 2, 101, 42, 21, 2 },
|
||||||
/* 1*/ { BARCODE_CODABLOCKF, -1, -1, 0, "A", 0, 20, 2, 101, 42, 21, 2 }, // Same as default
|
/* 1*/ { BARCODE_CODABLOCKF, -1, -1, 0, "A", 0, 20, 2, 101, 42, 21, 2 }, /* Same as default */
|
||||||
/* 2*/ { BARCODE_CODABLOCKF, -1, -1, 1, "A", 0, 20, 2, 101, 42, 21, 2 }, // Same as default
|
/* 2*/ { BARCODE_CODABLOCKF, -1, -1, 1, "A", 0, 20, 2, 101, 42, 21, 2 }, /* Same as default */
|
||||||
/* 3*/ { BARCODE_CODABLOCKF, -1, -1, 2, "A", 0, 20, 2, 101, 42, 20, 4 },
|
/* 3*/ { BARCODE_CODABLOCKF, -1, -1, 2, "A", 0, 20, 2, 101, 42, 20, 4 },
|
||||||
/* 4*/ { BARCODE_CODABLOCKF, -1, -1, 3, "A", 0, 20, 2, 101, 42, 19, 6 },
|
/* 4*/ { BARCODE_CODABLOCKF, -1, -1, 3, "A", 0, 20, 2, 101, 42, 19, 6 },
|
||||||
/* 5*/ { BARCODE_CODABLOCKF, -1, -1, 4, "A", 0, 20, 2, 101, 42, 18, 8 },
|
/* 5*/ { BARCODE_CODABLOCKF, -1, -1, 4, "A", 0, 20, 2, 101, 42, 18, 8 },
|
||||||
/* 6*/ { BARCODE_CODABLOCKF, -1, -1, 5, "A", 0, 20, 2, 101, 42, 21, 2 }, // > 4 ignored, same as default
|
/* 6*/ { BARCODE_CODABLOCKF, -1, -1, 5, "A", 0, 20, 2, 101, 42, 21, 2 }, /* > 4 ignored, same as default */
|
||||||
/* 7*/ { BARCODE_CODABLOCKF, -1, 1, -1, "A", 0, 5, 1, 46, 20, 0, 2 }, // CODE128 top separator
|
/* 7*/ { BARCODE_CODABLOCKF, -1, 1, -1, "A", 0, 5, 1, 46, 20, 0, 2 }, /* CODE128 top separator */
|
||||||
/* 8*/ { BARCODE_CODABLOCKF, 0, -1, -1, "A", 0, 20, 2, 101, 42, 21, 2 }, // Border width zero, same as default
|
/* 8*/ { BARCODE_CODABLOCKF, 0, -1, -1, "A", 0, 20, 2, 101, 42, 21, 2 }, /* Border width zero, same as default */
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -551,7 +552,7 @@ static void test_stacking(int index, int debug) {
|
|||||||
int expected_separator_y;
|
int expected_separator_y;
|
||||||
int expected_separator_height;
|
int expected_separator_height;
|
||||||
};
|
};
|
||||||
// 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, -1, "A", "B", 50, 2, 46, 92, 116, -1, -1, -1 },
|
/* 0*/ { BARCODE_CODE128, -1, -1, -1, "A", "B", 50, 2, 46, 92, 116, -1, -1, -1 },
|
||||||
/* 1*/ { BARCODE_CODE128, BARCODE_BIND, -1, -1, "A", "B", 50, 2, 46, 92, 116, 0, 49, 2 },
|
/* 1*/ { BARCODE_CODE128, BARCODE_BIND, -1, -1, "A", "B", 50, 2, 46, 92, 116, 0, 49, 2 },
|
||||||
@ -633,7 +634,7 @@ static void test_output_options(int index, int debug) {
|
|||||||
float expected_set_x;
|
float expected_set_x;
|
||||||
float expected_set_y;
|
float expected_set_y;
|
||||||
};
|
};
|
||||||
// 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, -1, -1, "A123", 0, 50, 1, 79, 158, 118.9, 0, 0, 4 },
|
/* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, "A123", 0, 50, 1, 79, 158, 118.9, 0, 0, 4 },
|
||||||
/* 1*/ { BARCODE_CODE128, -1, -1, 2, -1, "A123", 0, 50, 1, 79, 158, 118.9, 0, 0, 4 },
|
/* 1*/ { BARCODE_CODE128, -1, -1, 2, -1, "A123", 0, 50, 1, 79, 158, 118.9, 0, 0, 4 },
|
||||||
@ -685,7 +686,7 @@ static void test_output_options(int index, int debug) {
|
|||||||
/* 47*/ { BARCODE_MAXICODE, -1, -1, -1, BARCODE_DOTTY_MODE, "A123", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1, -1, -1, -1, -1 },
|
/* 47*/ { BARCODE_MAXICODE, -1, -1, -1, BARCODE_DOTTY_MODE, "A123", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1, -1, -1, -1, -1 },
|
||||||
/* 48*/ { BARCODE_ITF14, -1, -1, -1, -1, "123", 0, 50, 1, 135, 330, 138.89999, 1, 320, 10 },
|
/* 48*/ { BARCODE_ITF14, -1, -1, -1, -1, "123", 0, 50, 1, 135, 330, 138.89999, 1, 320, 10 },
|
||||||
/* 49*/ { BARCODE_ITF14, -1, -1, 0, -1, "123", 0, 50, 1, 135, 330, 138.89999, 1, 320, 10 },
|
/* 49*/ { BARCODE_ITF14, -1, -1, 0, -1, "123", 0, 50, 1, 135, 330, 138.89999, 1, 320, 10 },
|
||||||
/* 50*/ { BARCODE_ITF14, -1, -1, 0, BARCODE_BOX, "123", 0, 50, 1, 135, 310, 118.9, 0, 300, 0 }, // No zero-width/height rectangles
|
/* 50*/ { BARCODE_ITF14, -1, -1, 0, BARCODE_BOX, "123", 0, 50, 1, 135, 310, 118.9, 0, 300, 0 }, /* No zero-width/height rectangles */
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -752,7 +753,7 @@ static void test_output_options(int index, int debug) {
|
|||||||
testFinish();
|
testFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks that symbol lead-in (composite offset) isn't used to calc string position for non-composite barcodes
|
/* Checks that symbol lead-in (composite offset) isn't used to calc string position for non-composite barcodes */
|
||||||
static void test_noncomposite_string_x(int index, int debug) {
|
static void test_noncomposite_string_x(int index, int debug) {
|
||||||
|
|
||||||
struct item {
|
struct item {
|
||||||
@ -762,7 +763,7 @@ static void test_noncomposite_string_x(int index, int debug) {
|
|||||||
int expected_width;
|
int expected_width;
|
||||||
float expected_string_x;
|
float expected_string_x;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%2d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_DBAR_OMN, "1234567890123", 96, 96 },
|
/* 0*/ { BARCODE_DBAR_OMN, "1234567890123", 96, 96 },
|
||||||
/* 1*/ { BARCODE_DBAR_LTD, "1234567890123", 79, 79 },
|
/* 1*/ { BARCODE_DBAR_LTD, "1234567890123", 79, 79 },
|
||||||
@ -805,7 +806,7 @@ static void test_noncomposite_string_x(int index, int debug) {
|
|||||||
testFinish();
|
testFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks UPCA/UPCE main_symbol_width_x (used for addon formatting) set whether whitespace width set or not
|
/* Checks UPCA/UPCE main_symbol_width_x (used for addon formatting) set whether whitespace width set or not */
|
||||||
static void test_upcean_whitespace_width(int index, int debug) {
|
static void test_upcean_whitespace_width(int index, int debug) {
|
||||||
|
|
||||||
struct item {
|
struct item {
|
||||||
@ -818,12 +819,12 @@ static void test_upcean_whitespace_width(int index, int debug) {
|
|||||||
int expected_string_cnt;
|
int expected_string_cnt;
|
||||||
float expected_string_y;
|
float expected_string_y;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%2d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_UPCA, "12345678904+12345", 0, 151, 330.0, 5, 15.0 },
|
/* 0*/ { BARCODE_UPCA, "12345678904+12345", 0, 151, 330.0, 5, 15.0 },
|
||||||
/* 1*/ { BARCODE_UPCA, "12345678904+12345", 11, 151, 330.0 + 4 * 11, 5, 15.0 },
|
/* 1*/ { BARCODE_UPCA, "12345678904+12345", 11, 151, 330.0 + 4 * 11, 5, 15.0 },
|
||||||
/* 2*/ { BARCODE_UPCE, "1234567+12", 0, 78, 184.0, 4, 15.0 },
|
/* 2*/ { BARCODE_UPCE, "1234567+12", 0, 78, 184.0, 4, 15.0 },
|
||||||
/* 3*/ { BARCODE_UPCE, "1234567+12", 8, 78, 184.0 + 4 * 8, 4, 15.0 }, // Note: change from previous behaviour where if whitespace < 10 then set to 10
|
/* 3*/ { BARCODE_UPCE, "1234567+12", 8, 78, 184.0 + 4 * 8, 4, 15.0 }, /* Note: change from previous behaviour where if whitespace < 10 then set to 10 */
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -865,7 +866,7 @@ static void test_upcean_whitespace_width(int index, int debug) {
|
|||||||
i, testUtilBarcodeName(data[i].symbology), symbol->vector->width, data[i].expected_vector_width);
|
i, testUtilBarcodeName(data[i].symbology), symbol->vector->width, data[i].expected_vector_width);
|
||||||
|
|
||||||
assert_nonnull(symbol->vector->strings, "i:%d ZBarcode_Buffer_Vector(%d) vector->strings NULL\n", i, data[i].symbology);
|
assert_nonnull(symbol->vector->strings, "i:%d ZBarcode_Buffer_Vector(%d) vector->strings NULL\n", i, data[i].symbology);
|
||||||
// Get add-on string (last)
|
/* Get add-on string (last) */
|
||||||
for (string = symbol->vector->strings, string_cnt = 1; string->next; string_cnt++) {
|
for (string = symbol->vector->strings, string_cnt = 1; string->next; string_cnt++) {
|
||||||
string = string->next;
|
string = string->next;
|
||||||
}
|
}
|
||||||
@ -902,15 +903,15 @@ static void test_scale(int index, int debug) {
|
|||||||
float expected_set_width;
|
float expected_set_width;
|
||||||
float expected_set_height;
|
float expected_set_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 18, 6, 103, 206, 36, 1, 52, 0, 8, 6 }, // With no scaling
|
/* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 18, 6, 103, 206, 36, 1, 52, 0, 8, 6 }, /* With no scaling */
|
||||||
/* 1*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.1, "1", "", 0, 18, 6, 103, 206 * 0.1, 3.6000001, 1, 5.2000003, 0, 8 * 0.1, 6 * 0.1 },
|
/* 1*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.1, "1", "", 0, 18, 6, 103, 206 * 0.1, 3.6000001, 1, 5.2000003, 0, 8 * 0.1, 6 * 0.1 },
|
||||||
/* 2*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.3, "1", "", 0, 18, 6, 103, 61.8000031, 36 * 0.3, 1, 52 * 0.3, 0, 2.4000001, 1.8000001 },
|
/* 2*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.3, "1", "", 0, 18, 6, 103, 61.8000031, 36 * 0.3, 1, 52 * 0.3, 0, 2.4000001, 1.8000001 },
|
||||||
/* 3*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 18, 6, 103, 123.600006, 36 * 0.6, 1, 52 * 0.6, 0, 4.8000002, 3.6000001 },
|
/* 3*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 18, 6, 103, 123.600006, 36 * 0.6, 1, 52 * 0.6, 0, 4.8000002, 3.6000001 },
|
||||||
/* 4*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116.400002, 1, 34, 36, 2, 64 }, // With no scaling
|
/* 4*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116.400002, 1, 34, 36, 2, 64 }, /* With no scaling */
|
||||||
/* 5*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 0.1, 11.6400003, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 64 * 0.1 },
|
/* 5*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 0.1, 11.6400003, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 64 * 0.1 },
|
||||||
/* 6*/ { BARCODE_UPCE_CC, -1, -1, -1, 0.1, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 18.5, 10, 55, 142 * 0.1, 5.34000015, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 0.1 }, // Height specified
|
/* 6*/ { BARCODE_UPCE_CC, -1, -1, -1, 0.1, 0.1, "1234567", "[17]010615[10]A123456\"", 0, 18.5, 10, 55, 142 * 0.1, 5.34000015, 1, 34 * 0.1, 3.6000001, 2 * 0.1, 0.1 }, /* Height specified */
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -1002,7 +1003,7 @@ static void test_guard_descent(int index, int debug) {
|
|||||||
float expected_set_width;
|
float expected_set_width;
|
||||||
float expected_set_height;
|
float expected_set_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_UPCE, -1, "1234567", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
/* 0*/ { BARCODE_UPCE, -1, "1234567", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
||||||
/* 1*/ { BARCODE_UPCE, 0, "1234567", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 100 },
|
/* 1*/ { BARCODE_UPCE, 0, "1234567", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 100 },
|
||||||
@ -1068,7 +1069,7 @@ static void test_guard_descent(int index, int debug) {
|
|||||||
if (ret < ZINT_ERROR) {
|
if (ret < ZINT_ERROR) {
|
||||||
assert_nonnull(symbol->vector, "i:%d ZBarcode_Buffer_Vector(%d) vector NULL\n", i, data[i].symbology);
|
assert_nonnull(symbol->vector, "i:%d ZBarcode_Buffer_Vector(%d) vector NULL\n", i, data[i].symbology);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) { // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) { /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
sprintf(symbol->outfile, "test_guard_descent_%d.svg", i);
|
sprintf(symbol->outfile, "test_guard_descent_%d.svg", i);
|
||||||
ZBarcode_Print(symbol, 0);
|
ZBarcode_Print(symbol, 0);
|
||||||
}
|
}
|
||||||
@ -1113,11 +1114,11 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
float expected_set_width;
|
float expected_set_width;
|
||||||
float expected_set_height;
|
float expected_set_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_CODE11, -1, -1, -1, "1234", 0, 50, 1, 62, 124, 118.9, 0, 0, 2, 100 },
|
/* 0*/ { BARCODE_CODE11, -1, -1, -1, "1234", 0, 50, 1, 62, 124, 118.9, 0, 0, 2, 100 },
|
||||||
/* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 164, 118.9, 20, 0, 2, 100 },
|
/* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 164, 118.9, 20, 0, 2, 100 },
|
||||||
/* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 124, 118.9, 0, 0, 2, 100 }, // BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES
|
/* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 62, 124, 118.9, 0, 0, 2, 100 }, /* BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES */
|
||||||
/* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, "1234", 0, 50, 1, 57, 114, 118.9, 0, 0, 8, 100 },
|
/* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, "1234", 0, 50, 1, 57, 114, 118.9, 0, 0, 8, 100 },
|
||||||
/* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 57, 154, 118.9, 20, 0, 8, 100 },
|
/* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 57, 154, 118.9, 20, 0, 8, 100 },
|
||||||
/* 5*/ { BARCODE_C25INTER, -1, -1, -1, "1234", 0, 50, 1, 45, 90, 118.9, 0, 0, 2, 100 },
|
/* 5*/ { BARCODE_C25INTER, -1, -1, -1, "1234", 0, 50, 1, 45, 90, 118.9, 0, 0, 2, 100 },
|
||||||
@ -1135,27 +1136,27 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/* 17*/ { BARCODE_EANX, -1, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116.4, 22, 0, 2, 110 },
|
/* 17*/ { BARCODE_EANX, -1, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116.4, 22, 0, 2, 110 },
|
||||||
/* 18*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116.4, 22, 0, 2, 110 },
|
/* 18*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 226, 116.4, 22, 0, 2, 110 },
|
||||||
/* 19*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 212, 116.4, 22, 0, 2, 110 },
|
/* 19*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 1, 95, 212, 116.4, 22, 0, 2, 110 },
|
||||||
/* 20*/ { BARCODE_EANX, -1, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 22, 0, 2, 110 }, // Hide text
|
/* 20*/ { BARCODE_EANX, -1, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 22, 0, 2, 110 }, /* Hide text */
|
||||||
/* 21*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 22, 0, 2, 110 }, // Hide text
|
/* 21*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 226, 110, 22, 0, 2, 110 }, /* Hide text */
|
||||||
/* 22*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 190, 110, 0, 0, 2, 110 }, // Hide text
|
/* 22*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 1, 95, 190, 110, 0, 0, 2, 110 }, /* Hide text */
|
||||||
/* 23*/ { BARCODE_EANX, -1, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116.4, 262, 19, 4, 91 },
|
/* 23*/ { BARCODE_EANX, -1, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116.4, 262, 19, 4, 91 },
|
||||||
/* 24*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116.4, 262, 19, 4, 91 },
|
/* 24*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 276, 116.4, 262, 19, 4, 91 },
|
||||||
/* 25*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 266, 116.4, 262, 19, 4, 91 },
|
/* 25*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012+12", 0, 50, 1, 122, 266, 116.4, 262, 19, 4, 91 },
|
||||||
/* 26*/ { BARCODE_EANX, -1, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 262, 19, 4, 91 }, // Hide text
|
/* 26*/ { BARCODE_EANX, -1, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 262, 19, 4, 91 }, /* Hide text */
|
||||||
/* 27*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 262, 19, 4, 91 }, // Hide text
|
/* 27*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 276, 110, 262, 19, 4, 91 }, /* Hide text */
|
||||||
/* 28*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 244, 110, 240, 19, 4, 91 }, // Hide text
|
/* 28*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012+12", 0, 50, 1, 122, 244, 110, 240, 19, 4, 91 }, /* Hide text */
|
||||||
/* 29*/ { BARCODE_EANX_CHK, -1, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116.4, 318, 19, 2, 91 },
|
/* 29*/ { BARCODE_EANX_CHK, -1, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116.4, 318, 19, 2, 91 },
|
||||||
/* 30*/ { BARCODE_EANX_CHK, BARCODE_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116.4, 318, 19, 2, 91 },
|
/* 30*/ { BARCODE_EANX_CHK, BARCODE_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 330, 116.4, 318, 19, 2, 91 },
|
||||||
/* 31*/ { BARCODE_EANX_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 320, 116.4, 318, 19, 2, 91 },
|
/* 31*/ { BARCODE_EANX_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567890129+12345", 0, 50, 1, 149, 320, 116.4, 318, 19, 2, 91 },
|
||||||
/* 32*/ { BARCODE_EANX, -1, -1, -1, "0234567", 0, 50, 1, 67, 162, 116.4, 14, 0, 2, 110 }, // EAN-8
|
/* 32*/ { BARCODE_EANX, -1, -1, -1, "0234567", 0, 50, 1, 67, 162, 116.4, 14, 0, 2, 110 }, /* EAN-8 */
|
||||||
/* 33*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 162, 116.4, 14, 0, 2, 110 }, // EAN-8
|
/* 33*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 162, 116.4, 14, 0, 2, 110 }, /* EAN-8 */
|
||||||
/* 34*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 134, 116.4, 0, 0, 2, 110 }, // EAN-8
|
/* 34*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "0234567", 0, 50, 1, 67, 134, 116.4, 0, 0, 2, 110 }, /* EAN-8 */
|
||||||
/* 35*/ { BARCODE_EANX, -1, -1, -1, "02345", 0, 50, 1, 47, 118, 116.4, 14, 0, 2, 100 }, // EAN-5
|
/* 35*/ { BARCODE_EANX, -1, -1, -1, "02345", 0, 50, 1, 47, 118, 116.4, 14, 0, 2, 100 }, /* EAN-5 */
|
||||||
/* 36*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 118, 116.4, 14, 0, 2, 100 }, // EAN-5
|
/* 36*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 118, 116.4, 14, 0, 2, 100 }, /* EAN-5 */
|
||||||
/* 37*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 94, 116.4, 0, 0, 2, 100 }, // EAN-5
|
/* 37*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02345", 0, 50, 1, 47, 94, 116.4, 0, 0, 2, 100 }, /* EAN-5 */
|
||||||
/* 38*/ { BARCODE_EANX, -1, -1, -1, "02", 0, 50, 1, 20, 64, 116.4, 14, 0, 2, 100 }, // EAN-2
|
/* 38*/ { BARCODE_EANX, -1, -1, -1, "02", 0, 50, 1, 20, 64, 116.4, 14, 0, 2, 100 }, /* EAN-2 */
|
||||||
/* 39*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 64, 116.4, 14, 0, 2, 100 }, // EAN-2
|
/* 39*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 64, 116.4, 14, 0, 2, 100 }, /* EAN-2 */
|
||||||
/* 40*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 40, 116.4, 0, 0, 2, 100 }, // EAN-2
|
/* 40*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, "02", 0, 50, 1, 20, 40, 116.4, 0, 0, 2, 100 }, /* EAN-2 */
|
||||||
/* 41*/ { BARCODE_GS1_128, -1, -1, -1, "[20]02", 0, 50, 1, 68, 136, 118.9, 0, 0, 4, 100 },
|
/* 41*/ { BARCODE_GS1_128, -1, -1, -1, "[20]02", 0, 50, 1, 68, 136, 118.9, 0, 0, 4, 100 },
|
||||||
/* 42*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 1, 68, 176, 118.9, 20, 0, 4, 100 },
|
/* 42*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 1, 68, 176, 118.9, 20, 0, 4, 100 },
|
||||||
/* 43*/ { BARCODE_CODABAR, -1, -1, -1, "A0B", 0, 50, 1, 32, 64, 118.9, 0, 0, 2, 100 },
|
/* 43*/ { BARCODE_CODABAR, -1, -1, -1, "A0B", 0, 50, 1, 32, 64, 118.9, 0, 0, 2, 100 },
|
||||||
@ -1191,39 +1192,39 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/* 73*/ { BARCODE_UPCA, -1, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116.4, 18, 0, 2, 110 },
|
/* 73*/ { BARCODE_UPCA, -1, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116.4, 18, 0, 2, 110 },
|
||||||
/* 74*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116.4, 18, 0, 2, 110 },
|
/* 74*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116.4, 18, 0, 2, 110 },
|
||||||
/* 75*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116.4, 18, 0, 2, 110 },
|
/* 75*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 1, 95, 226, 116.4, 18, 0, 2, 110 },
|
||||||
/* 76*/ { BARCODE_UPCA, -1, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 18, 0, 2, 110 }, // Hide text
|
/* 76*/ { BARCODE_UPCA, -1, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 77*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 18, 0, 2, 110 }, // Hide text
|
/* 77*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 226, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 78*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 190, 110, 0, 0, 2, 110 }, // Hide text
|
/* 78*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 1, 95, 190, 110, 0, 0, 2, 110 }, /* Hide text */
|
||||||
/* 79*/ { BARCODE_UPCA, -1, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116.4, 18, 0, 2, 110 },
|
/* 79*/ { BARCODE_UPCA, -1, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116.4, 18, 0, 2, 110 },
|
||||||
/* 80*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116.4, 18, 0, 2, 110 },
|
/* 80*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 276, 116.4, 18, 0, 2, 110 },
|
||||||
/* 81*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 266, 116.4, 18, 0, 2, 110 },
|
/* 81*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763+12", 0, 50, 1, 124, 266, 116.4, 18, 0, 2, 110 },
|
||||||
/* 82*/ { BARCODE_UPCA, -1, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 18, 0, 2, 110 }, // Hide text
|
/* 82*/ { BARCODE_UPCA, -1, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 83*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 18, 0, 2, 110 }, // Hide text
|
/* 83*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 276, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 84*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 248, 110, 0, 0, 2, 110 }, // Hide text
|
/* 84*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763+12", 0, 50, 1, 124, 248, 110, 0, 0, 2, 110 }, /* Hide text */
|
||||||
/* 85*/ { BARCODE_UPCA_CHK, -1, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116.4, 18, 0, 2, 110 },
|
/* 85*/ { BARCODE_UPCA_CHK, -1, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116.4, 18, 0, 2, 110 },
|
||||||
/* 86*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116.4, 18, 0, 2, 110 },
|
/* 86*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 330, 116.4, 18, 0, 2, 110 },
|
||||||
/* 87*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 320, 116.4, 18, 0, 2, 110 },
|
/* 87*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "014571377638+12345", 0, 50, 1, 151, 320, 116.4, 18, 0, 2, 110 },
|
||||||
/* 88*/ { BARCODE_UPCA_CHK, -1, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 18, 0, 2, 110 }, // Hide text
|
/* 88*/ { BARCODE_UPCA_CHK, -1, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 89*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 18, 0, 2, 110 }, // Hide text
|
/* 89*/ { BARCODE_UPCA_CHK, BARCODE_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 330, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 90*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 302, 110, 0, 0, 2, 110 }, // Hide text
|
/* 90*/ { BARCODE_UPCA_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "014571377638+12345", 0, 50, 1, 151, 302, 110, 0, 0, 2, 110 }, /* Hide text */
|
||||||
/* 91*/ { BARCODE_UPCE, -1, -1, -1, "8145713", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
/* 91*/ { BARCODE_UPCE, -1, -1, -1, "8145713", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
||||||
/* 92*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
/* 92*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
||||||
/* 93*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
/* 93*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 1, 51, 134, 116.4, 18, 0, 2, 110 },
|
||||||
/* 94*/ { BARCODE_UPCE, -1, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 18, 0, 2, 110 }, // Hide text
|
/* 94*/ { BARCODE_UPCE, -1, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 95*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 18, 0, 2, 110 }, // Hide text
|
/* 95*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 134, 110, 18, 0, 2, 110 }, /* Hide text */
|
||||||
/* 96*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 102, 110, 0, 0, 2, 110 }, // Hide text
|
/* 96*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 1, 51, 102, 110, 0, 0, 2, 110 }, /* Hide text */
|
||||||
/* 97*/ { BARCODE_UPCE_CHK, -1, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116.4, 170, 19, 4, 81 },
|
/* 97*/ { BARCODE_UPCE_CHK, -1, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116.4, 170, 19, 4, 81 },
|
||||||
/* 98*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116.4, 170, 19, 4, 81 },
|
/* 98*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 184, 116.4, 170, 19, 4, 81 },
|
||||||
/* 99*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 174, 116.4, 170, 19, 4, 81 },
|
/* 99*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, "81457132+12", 0, 50, 1, 78, 174, 116.4, 170, 19, 4, 81 },
|
||||||
/*100*/ { BARCODE_UPCE_CHK, -1, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 170, 19, 4, 81 }, // Hide text
|
/*100*/ { BARCODE_UPCE_CHK, -1, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 170, 19, 4, 81 }, /* Hide text */
|
||||||
/*101*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 170, 19, 4, 81 }, // Hide text
|
/*101*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 184, 110, 170, 19, 4, 81 }, /* Hide text */
|
||||||
/*102*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 156, 110, 152, 19, 4, 81 }, // Hide text
|
/*102*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, 0, "81457132+12", 0, 50, 1, 78, 156, 110, 152, 19, 4, 81 }, /* Hide text */
|
||||||
/*103*/ { BARCODE_UPCE, -1, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116.4, 226, 19, 2, 81 },
|
/*103*/ { BARCODE_UPCE, -1, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116.4, 226, 19, 2, 81 },
|
||||||
/*104*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116.4, 226, 19, 2, 81 },
|
/*104*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 238, 116.4, 226, 19, 2, 81 },
|
||||||
/*105*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 228, 116.4, 226, 19, 2, 81 },
|
/*105*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713+12345", 0, 50, 1, 105, 228, 116.4, 226, 19, 2, 81 },
|
||||||
/*106*/ { BARCODE_UPCE, -1, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 226, 19, 2, 81 }, // Hide text
|
/*106*/ { BARCODE_UPCE, -1, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 226, 19, 2, 81 }, /* Hide text */
|
||||||
/*107*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 226, 19, 2, 81 }, // Hide text
|
/*107*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 238, 110, 226, 19, 2, 81 }, /* Hide text */
|
||||||
/*108*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 210, 110, 208, 19, 2, 81 }, // Hide text
|
/*108*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713+12345", 0, 50, 1, 105, 210, 110, 208, 19, 2, 81 }, /* Hide text */
|
||||||
/*109*/ { BARCODE_POSTNET, -1, -1, -1, "12345", 0, 12, 2, 63, 126, 24, 0, 0, 2, 24 },
|
/*109*/ { BARCODE_POSTNET, -1, -1, -1, "12345", 0, 12, 2, 63, 126, 24, 0, 0, 2, 24 },
|
||||||
/*110*/ { BARCODE_POSTNET, BARCODE_QUIET_ZONES, -1, -1, "12345", 0, 12, 2, 63, 146, 30.4, 10, 3.2, 2, 24 },
|
/*110*/ { BARCODE_POSTNET, BARCODE_QUIET_ZONES, -1, -1, "12345", 0, 12, 2, 63, 146, 30.4, 10, 3.2, 2, 24 },
|
||||||
/*111*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, "1234", 0, 50, 1, 55, 110, 118.9, 0, 0, 4, 100 },
|
/*111*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, "1234", 0, 50, 1, 55, 110, 118.9, 0, 0, 4, 100 },
|
||||||
@ -1342,9 +1343,9 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*224*/ { BARCODE_EANX_CC, -1, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116.4, 32, 24, 2, 86 },
|
/*224*/ { BARCODE_EANX_CC, -1, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116.4, 32, 24, 2, 86 },
|
||||||
/*225*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116.4, 32, 24, 2, 86 },
|
/*225*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 234, 116.4, 32, 24, 2, 86 },
|
||||||
/*226*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 220, 116.4, 32, 24, 2, 86 },
|
/*226*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "023456789012", 0, 50, 7, 99, 220, 116.4, 32, 24, 2, 86 },
|
||||||
/*227*/ { BARCODE_EANX_CC, -1, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 32, 24, 2, 86 }, // Hide text
|
/*227*/ { BARCODE_EANX_CC, -1, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 32, 24, 2, 86 }, /* Hide text */
|
||||||
/*228*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 32, 24, 2, 86 }, // Hide text
|
/*228*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 234, 110, 32, 24, 2, 86 }, /* Hide text */
|
||||||
/*229*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 198, 110, 10, 24, 2, 86 }, // Hide text
|
/*229*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "023456789012", 0, 50, 7, 99, 198, 110, 10, 24, 2, 86 }, /* Hide text */
|
||||||
/*230*/ { BARCODE_GS1_128_CC, -1, -1, -1, "[20]02", 0, 50, 5, 99, 198, 118.9, 24, 14, 4, 86 },
|
/*230*/ { BARCODE_GS1_128_CC, -1, -1, -1, "[20]02", 0, 50, 5, 99, 198, 118.9, 24, 14, 4, 86 },
|
||||||
/*231*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 5, 99, 238, 118.9, 44, 14, 4, 86 },
|
/*231*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]02", 0, 50, 5, 99, 238, 118.9, 44, 14, 4, 86 },
|
||||||
/*232*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, "1234", 0, 21, 5, 100, 200, 60.900002, 10, 14, 2, 28 },
|
/*232*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, "1234", 0, 21, 5, 100, 200, 60.900002, 10, 14, 2, 28 },
|
||||||
@ -1356,15 +1357,15 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*238*/ { BARCODE_UPCA_CC, -1, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116.4, 24, 20, 2, 90 },
|
/*238*/ { BARCODE_UPCA_CC, -1, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116.4, 24, 20, 2, 90 },
|
||||||
/*239*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116.4, 24, 20, 2, 90 },
|
/*239*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116.4, 24, 20, 2, 90 },
|
||||||
/*240*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116.4, 24, 20, 2, 90 },
|
/*240*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "01457137763", 0, 50, 7, 99, 234, 116.4, 24, 20, 2, 90 },
|
||||||
/*241*/ { BARCODE_UPCA_CC, -1, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 24, 20, 2, 90 }, // Hide text
|
/*241*/ { BARCODE_UPCA_CC, -1, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 24, 20, 2, 90 }, /* Hide text */
|
||||||
/*242*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 24, 20, 2, 90 }, // Hide text
|
/*242*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 234, 110, 24, 20, 2, 90 }, /* Hide text */
|
||||||
/*243*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 198, 110, 6, 20, 2, 90 }, // Hide text
|
/*243*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "01457137763", 0, 50, 7, 99, 198, 110, 6, 20, 2, 90 }, /* Hide text */
|
||||||
/*244*/ { BARCODE_UPCE_CC, -1, -1, -1, "8145713", 0, 50, 9, 55, 142, 116.4, 24, 28, 2, 82 },
|
/*244*/ { BARCODE_UPCE_CC, -1, -1, -1, "8145713", 0, 50, 9, 55, 142, 116.4, 24, 28, 2, 82 },
|
||||||
/*245*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116.4, 24, 28, 2, 82 },
|
/*245*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116.4, 24, 28, 2, 82 },
|
||||||
/*246*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116.4, 24, 28, 2, 82 },
|
/*246*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, -1, "8145713", 0, 50, 9, 55, 142, 116.4, 24, 28, 2, 82 },
|
||||||
/*247*/ { BARCODE_UPCE_CC, -1, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 24, 28, 2, 82 }, // Hide text
|
/*247*/ { BARCODE_UPCE_CC, -1, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 24, 28, 2, 82 }, /* Hide text */
|
||||||
/*248*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 24, 28, 2, 82 }, // Hide text
|
/*248*/ { BARCODE_UPCE_CC, BARCODE_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 142, 110, 24, 28, 2, 82 }, /* Hide text */
|
||||||
/*249*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 110, 110, 6, 28, 2, 82 }, // Hide text
|
/*249*/ { BARCODE_UPCE_CC, BARCODE_NO_QUIET_ZONES, -1, 0, "8145713", 0, 50, 9, 55, 110, 110, 6, 28, 2, 82 }, /* Hide text */
|
||||||
/*250*/ { BARCODE_DBAR_STK_CC, -1, -1, -1, "1234", 0, 24, 9, 56, 112, 48, 0, 34, 2, 14 },
|
/*250*/ { BARCODE_DBAR_STK_CC, -1, -1, -1, "1234", 0, 24, 9, 56, 112, 48, 0, 34, 2, 14 },
|
||||||
/*251*/ { BARCODE_DBAR_STK_CC, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 24, 9, 56, 116, 48, 2, 34, 2, 14 },
|
/*251*/ { BARCODE_DBAR_STK_CC, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 24, 9, 56, 116, 48, 2, 34, 2, 14 },
|
||||||
/*252*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, -1, "1234", 0, 80, 11, 56, 112, 160, 0, 94, 2, 66 },
|
/*252*/ { BARCODE_DBAR_OMNSTK_CC, -1, -1, -1, "1234", 0, 80, 11, 56, 112, 160, 0, 94, 2, 66 },
|
||||||
@ -1373,10 +1374,10 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*255*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]12", 0, 41, 5, 102, 208, 82, 4, 14, 2, 68 },
|
/*255*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, -1, -1, "[20]12", 0, 41, 5, 102, 208, 82, 4, 14, 2, 68 },
|
||||||
/*256*/ { BARCODE_CHANNEL, -1, -1, -1, "1234", 0, 50, 1, 27, 54, 118.9, 0, 0, 2, 100 },
|
/*256*/ { BARCODE_CHANNEL, -1, -1, -1, "1234", 0, 50, 1, 27, 54, 118.9, 0, 0, 2, 100 },
|
||||||
/*257*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 27, 60, 118.9, 2, 0, 2, 100 },
|
/*257*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 50, 1, 27, 60, 118.9, 2, 0, 2, 100 },
|
||||||
/*258*/ { BARCODE_CODEONE, -1, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 }, // Versions A to H - no quiet zone
|
/*258*/ { BARCODE_CODEONE, -1, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 }, /* Versions A to H - no quiet zone */
|
||||||
/*259*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 },
|
/*259*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 },
|
||||||
/*260*/ { BARCODE_CODEONE, BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 },
|
/*260*/ { BARCODE_CODEONE, BARCODE_NO_QUIET_ZONES, -1, -1, "1234", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 },
|
||||||
/*261*/ { BARCODE_CODEONE, -1, 9, -1, "1234", 0, 8, 8, 11, 22, 16, 10, 0, 2, 2 }, // Version S (& T) have quiet zones
|
/*261*/ { BARCODE_CODEONE, -1, 9, -1, "1234", 0, 8, 8, 11, 22, 16, 10, 0, 2, 2 }, /* Version S (& T) have quiet zones */
|
||||||
/*262*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, 9, -1, "1234", 0, 8, 8, 11, 26, 16, 12, 0, 2, 2 },
|
/*262*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, 9, -1, "1234", 0, 8, 8, 11, 26, 16, 12, 0, 2, 2 },
|
||||||
/*263*/ { BARCODE_GRIDMATRIX, -1, -1, -1, "123", 0, 18, 18, 18, 36, 36, 0, 0, 12, 2 },
|
/*263*/ { BARCODE_GRIDMATRIX, -1, -1, -1, "123", 0, 18, 18, 18, 36, 36, 0, 0, 12, 2 },
|
||||||
/*264*/ { BARCODE_GRIDMATRIX, BARCODE_QUIET_ZONES, -1, -1, "123", 0, 18, 18, 18, 60, 60, 12, 12, 12, 2 },
|
/*264*/ { BARCODE_GRIDMATRIX, BARCODE_QUIET_ZONES, -1, -1, "123", 0, 18, 18, 18, 60, 60, 12, 12, 12, 2 },
|
||||||
@ -1386,6 +1387,8 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
/*268*/ { BARCODE_ULTRA, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 13, 13, 15, 34, 30, 2, 2, 30, 2 },
|
/*268*/ { BARCODE_ULTRA, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 13, 13, 15, 34, 30, 2, 2, 30, 2 },
|
||||||
/*269*/ { BARCODE_RMQR, -1, -1, -1, "1234", 0, 11, 11, 27, 54, 22, 0, 0, 14, 2 },
|
/*269*/ { BARCODE_RMQR, -1, -1, -1, "1234", 0, 11, 11, 27, 54, 22, 0, 0, 14, 2 },
|
||||||
/*270*/ { BARCODE_RMQR, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 11, 11, 27, 62, 30, 4, 4, 14, 2 },
|
/*270*/ { BARCODE_RMQR, BARCODE_QUIET_ZONES, -1, -1, "1234", 0, 11, 11, 27, 62, 30, 4, 4, 14, 2 },
|
||||||
|
/*271*/ { BARCODE_BC412, -1, -1, -1, "1234567", 0, 16.666668, 1, 102, 204, 52.233337, 0, 0, 2, 33.333336 },
|
||||||
|
/*272*/ { BARCODE_BC412, BARCODE_QUIET_ZONES, -1, -1, "1234567", 0, 16.666668, 1, 102, 244, 52.233337, 20, 0, 2, 33.333336 },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -1429,7 +1432,7 @@ static void test_quiet_zones(int index, int debug) {
|
|||||||
if (ret < ZINT_ERROR) {
|
if (ret < ZINT_ERROR) {
|
||||||
assert_nonnull(symbol->vector, "i:%d ZBarcode_Buffer_Vector(%d) vector NULL\n", i, data[i].symbology);
|
assert_nonnull(symbol->vector, "i:%d ZBarcode_Buffer_Vector(%d) vector NULL\n", i, data[i].symbology);
|
||||||
|
|
||||||
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) { // ZINT_DEBUG_TEST_PRINT 16
|
if (index != -1 && (debug & ZINT_DEBUG_TEST_PRINT)) { /* ZINT_DEBUG_TEST_PRINT 16 */
|
||||||
sprintf(symbol->outfile, "test_quiet_zones_%d.svg", i);
|
sprintf(symbol->outfile, "test_quiet_zones_%d.svg", i);
|
||||||
ZBarcode_Print(symbol, 0);
|
ZBarcode_Print(symbol, 0);
|
||||||
}
|
}
|
||||||
@ -2072,6 +2075,12 @@ static void test_height(int index, int generate, int debug) {
|
|||||||
/*590*/ { BARCODE_UPNQR, -1, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
|
/*590*/ { BARCODE_UPNQR, -1, 1, "1234567890AB", "", 0, 77, 77, 77, 154, 154, "Fixed width-to-height ratio, symbol->height ignored" },
|
||||||
/*591*/ { BARCODE_ULTRA, -1, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
|
/*591*/ { BARCODE_ULTRA, -1, 1, "1234567890", "", 0, 13, 13, 18, 36, 26, "Fixed width-to-height ratio, symbol->height ignored" },
|
||||||
/*592*/ { BARCODE_RMQR, -1, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
|
/*592*/ { BARCODE_RMQR, -1, 1, "12345", "", 0, 11, 11, 27, 54, 22, "Fixed width-to-height ratio, symbol->height ignored" },
|
||||||
|
/*593*/ { BARCODE_BC412, -1, 1, "1234567", "", 0, 1, 1, 102, 204, 2, "" },
|
||||||
|
/*594*/ { BARCODE_BC412, -1, 13.6, "1234567", "", 0, 13.6, 1, 102, 204, 27.200001, "" },
|
||||||
|
/*595*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 13.6, "1234567", "", ZINT_WARN_NONCOMPLIANT, 13.6, 1, 102, 204, 27.200001, "" },
|
||||||
|
/*596*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 13.65, "1234567", "", 0, 13.65, 1, 102, 204, 27.299999, "" },
|
||||||
|
/*597*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 21.3, "1234567", "", 0, 21.3, 1, 102, 204, 42.599998, "" },
|
||||||
|
/*598*/ { BARCODE_BC412, COMPLIANT_HEIGHT, 21.35, "1234567", "", ZINT_WARN_NONCOMPLIANT, 21.35, 1, 102, 204, 42.700001, "" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -2097,7 +2106,7 @@ static void test_height(int index, int generate, int debug) {
|
|||||||
symbol->height = data[i].height;
|
symbol->height = data[i].height;
|
||||||
}
|
}
|
||||||
symbol->input_mode = UNICODE_MODE;
|
symbol->input_mode = UNICODE_MODE;
|
||||||
symbol->show_hrt = 0; // Note: disabling HRT
|
symbol->show_hrt = 0; /* Note: disabling HRT */
|
||||||
symbol->debug |= debug;
|
symbol->debug |= debug;
|
||||||
|
|
||||||
if (strlen(data[i].composite)) {
|
if (strlen(data[i].composite)) {
|
||||||
@ -2258,7 +2267,7 @@ static void test_height_per_row(int index, int generate, int debug) {
|
|||||||
if (data[i].scale != -1) {
|
if (data[i].scale != -1) {
|
||||||
symbol->scale = data[i].scale;
|
symbol->scale = data[i].scale;
|
||||||
}
|
}
|
||||||
symbol->show_hrt = 0; // Note: disabling HRT
|
symbol->show_hrt = 0; /* Note: disabling HRT */
|
||||||
|
|
||||||
if (strlen(data[i].composite)) {
|
if (strlen(data[i].composite)) {
|
||||||
text = data[i].composite;
|
text = data[i].composite;
|
||||||
@ -2321,3 +2330,5 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* vim: set ts=4 sw=4 et : */
|
||||||
|
@ -2379,7 +2379,7 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||||||
strcat(bwipp_data, data);
|
strcat(bwipp_data, data);
|
||||||
testUtilBwippCvtGS1Data(bwipp_data, upcean, &addon_posn);
|
testUtilBwippCvtGS1Data(bwipp_data, upcean, &addon_posn);
|
||||||
|
|
||||||
/* Always set dontlint */
|
/* Always set dontlint for now (until support for exclusive AIs check) */
|
||||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
||||||
bwipp_opts = bwipp_opts_buf;
|
bwipp_opts = bwipp_opts_buf;
|
||||||
|
|
||||||
@ -2404,7 +2404,7 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (symbol->input_mode & GS1NOCHECK_MODE) {
|
if (symbol->input_mode & GS1NOCHECK_MODE) {
|
||||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
/* sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : ""); */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gs1_cvt) {
|
if (gs1_cvt) {
|
||||||
@ -2414,7 +2414,7 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||||||
strcat(bwipp_data, data);
|
strcat(bwipp_data, data);
|
||||||
testUtilBwippCvtGS1Data(bwipp_data, upcean, &addon_posn);
|
testUtilBwippCvtGS1Data(bwipp_data, upcean, &addon_posn);
|
||||||
|
|
||||||
/* Always set dontlint */
|
/* Always set dontlint for now (until support for exclusive AIs check) */
|
||||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
||||||
bwipp_opts = bwipp_opts_buf;
|
bwipp_opts = bwipp_opts_buf;
|
||||||
|
|
||||||
@ -2440,7 +2440,7 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (symbol->input_mode & GS1NOCHECK_MODE) {
|
if (symbol->input_mode & GS1NOCHECK_MODE) {
|
||||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
/* sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : ""); */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (testUtilBwippEscape(bwipp_data, bwipp_data_size, data, data_len, symbol->input_mode & ESCAPE_MODE,
|
if (testUtilBwippEscape(bwipp_data, bwipp_data_size, data, data_len, symbol->input_mode & ESCAPE_MODE,
|
||||||
@ -2759,7 +2759,9 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||||||
bwipp_opts = bwipp_opts_buf;
|
bwipp_opts = bwipp_opts_buf;
|
||||||
}
|
}
|
||||||
} else if (symbology == BARCODE_BC412) {
|
} else if (symbology == BARCODE_BC412) {
|
||||||
/* TODO: */
|
to_upper((unsigned char *) bwipp_data, (int) strlen(bwipp_data));
|
||||||
|
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%ssemi", strlen(bwipp_opts_buf) ? " " : "");
|
||||||
|
bwipp_opts = bwipp_opts_buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- /home/mburke/code/bwipp/postscriptbarcode/build/monolithic/barcode.ps 2022-07-17 22:17:15.871836524 +0100
|
--- /home/mburke/code/gitlost/postscriptbarcode/build/monolithic/barcode.ps 2022-07-21 12:19:39.099718825 +0100
|
||||||
+++ backend/tests/tools/bwipp_dump.ps 2022-07-18 19:22:47.833744410 +0100
|
+++ backend/tests/tools/bwipp_dump.ps 2022-07-21 12:23:00.300971510 +0100
|
||||||
@@ -16698,8 +16698,8 @@
|
@@ -16745,8 +16745,8 @@
|
||||||
} bind
|
} bind
|
||||||
/fime {
|
/fime {
|
||||||
/sbs [2.25 6.75 2.25 15.75 2.25 6.75 2.25] def
|
/sbs [2.25 6.75 2.25 15.75 2.25 6.75 2.25] def
|
||||||
@ -11,7 +11,7 @@
|
|||||||
} bind
|
} bind
|
||||||
>> def
|
>> def
|
||||||
|
|
||||||
@@ -28190,7 +28190,7 @@
|
@@ -28239,7 +28239,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
options (lintype) (ean13) put
|
options (lintype) (ean13) put
|
||||||
options (inkspread) (0) put
|
options (inkspread) (0) put
|
||||||
@@ -28230,27 +28230,73 @@
|
@@ -28279,27 +28279,73 @@
|
||||||
} if
|
} if
|
||||||
|
|
||||||
% Plot the linear part
|
% Plot the linear part
|
||||||
@ -112,7 +112,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28314,7 +28360,7 @@
|
@@ -28364,7 +28410,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -121,7 +121,7 @@
|
|||||||
|
|
||||||
% Get the result of encoding with ean8 and gs1-cc
|
% Get the result of encoding with ean8 and gs1-cc
|
||||||
options (lintype) (ean8) put
|
options (lintype) (ean8) put
|
||||||
@@ -28355,29 +28401,75 @@
|
@@ -28405,29 +28451,75 @@
|
||||||
} if
|
} if
|
||||||
|
|
||||||
% Plot the linear part
|
% Plot the linear part
|
||||||
@ -217,7 +217,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28441,7 +28533,7 @@
|
@@ -28492,7 +28584,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -226,7 +226,7 @@
|
|||||||
|
|
||||||
options (lintype) (ean13) put
|
options (lintype) (ean13) put
|
||||||
options (inkspread) (0) put
|
options (inkspread) (0) put
|
||||||
@@ -28481,27 +28573,73 @@
|
@@ -28532,27 +28624,73 @@
|
||||||
} if
|
} if
|
||||||
|
|
||||||
% Plot the linear part
|
% Plot the linear part
|
||||||
@ -318,7 +318,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28580,7 +28718,7 @@
|
@@ -28632,7 +28770,7 @@
|
||||||
/opt options
|
/opt options
|
||||||
>> def
|
>> def
|
||||||
|
|
||||||
@ -327,7 +327,7 @@
|
|||||||
|
|
||||||
options (lintype) (upce) put
|
options (lintype) (upce) put
|
||||||
options (inkspread) (0) put
|
options (inkspread) (0) put
|
||||||
@@ -28620,27 +28758,73 @@
|
@@ -28672,27 +28810,73 @@
|
||||||
} if
|
} if
|
||||||
|
|
||||||
% Plot the linear part
|
% Plot the linear part
|
||||||
@ -419,7 +419,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28704,7 +28888,7 @@
|
@@ -28757,7 +28941,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -428,7 +428,7 @@
|
|||||||
|
|
||||||
options (lintype) (databaromni) put
|
options (lintype) (databaromni) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -28748,7 +28932,7 @@
|
@@ -28801,7 +28985,7 @@
|
||||||
linear options //databaromni exec
|
linear options //databaromni exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -437,7 +437,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -28779,20 +28963,66 @@
|
@@ -28832,20 +29016,66 @@
|
||||||
sep 0 [0 0 0] putinterval
|
sep 0 [0 0 0] putinterval
|
||||||
sep sep length 4 sub [0 0 0 0] putinterval
|
sep sep length 4 sub [0 0 0 0] putinterval
|
||||||
18 sepfinder 64 sepfinder
|
18 sepfinder 64 sepfinder
|
||||||
@ -516,7 +516,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28855,7 +29085,7 @@
|
@@ -28909,7 +29139,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -525,7 +525,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarstacked) put
|
options (lintype) (databarstacked) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -28899,7 +29129,7 @@
|
@@ -28953,7 +29183,7 @@
|
||||||
linear options //databarstacked exec
|
linear options //databarstacked exec
|
||||||
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
||||||
dup (pixy) get /linheight exch def
|
dup (pixy) get /linheight exch def
|
||||||
@ -534,7 +534,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -28927,20 +29157,52 @@
|
@@ -28981,20 +29211,52 @@
|
||||||
sep 0 [ 0 0 0 0 ] putinterval
|
sep 0 [ 0 0 0 0 ] putinterval
|
||||||
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
||||||
18 sepfinder
|
18 sepfinder
|
||||||
@ -599,7 +599,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -29003,7 +29265,7 @@
|
@@ -29058,7 +29320,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -608,7 +608,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarstackedomni) put
|
options (lintype) (databarstackedomni) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -29047,7 +29309,7 @@
|
@@ -29102,7 +29364,7 @@
|
||||||
linear options //databarstackedomni exec
|
linear options //databarstackedomni exec
|
||||||
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
||||||
dup (pixy) get /linheight exch def
|
dup (pixy) get /linheight exch def
|
||||||
@ -617,7 +617,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -29075,20 +29337,52 @@
|
@@ -29130,20 +29392,52 @@
|
||||||
sep 0 [ 0 0 0 0 ] putinterval
|
sep 0 [ 0 0 0 0 ] putinterval
|
||||||
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
||||||
18 sepfinder
|
18 sepfinder
|
||||||
@ -682,7 +682,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -29304,7 +29598,7 @@
|
@@ -29361,7 +29655,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -691,7 +691,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarlimited) put
|
options (lintype) (databarlimited) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -29348,7 +29642,7 @@
|
@@ -29405,7 +29699,7 @@
|
||||||
linear options //databarlimited exec
|
linear options //databarlimited exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -700,7 +700,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
mark
|
mark
|
||||||
@@ -29356,22 +29650,68 @@
|
@@ -29413,22 +29707,68 @@
|
||||||
counttomark 1 sub array astore /sep exch def pop pop
|
counttomark 1 sub array astore /sep exch def pop pop
|
||||||
sep 0 [0 0 0] putinterval
|
sep 0 [0 0 0] putinterval
|
||||||
sep sep length 9 sub [0 0 0 0 0 0 0 0 0] putinterval % 4 + 5 right guard spaces
|
sep sep length 9 sub [0 0 0 0 0 0 0 0 0] putinterval % 4 + 5 right guard spaces
|
||||||
@ -783,7 +783,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -29435,7 +29775,7 @@
|
@@ -29493,7 +29833,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -792,7 +792,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarexpanded) put
|
options (lintype) (databarexpanded) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -29479,7 +29819,7 @@
|
@@ -29537,7 +29877,7 @@
|
||||||
linear options //databarexpanded exec
|
linear options //databarexpanded exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -801,7 +801,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -29508,20 +29848,60 @@
|
@@ -29566,20 +29906,60 @@
|
||||||
18 98 bot length 13 sub {} for
|
18 98 bot length 13 sub {} for
|
||||||
69 98 bot length 13 sub {} for
|
69 98 bot length 13 sub {} for
|
||||||
] {sepfinder} forall
|
] {sepfinder} forall
|
||||||
@ -874,7 +874,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -29584,7 +29964,7 @@
|
@@ -29643,7 +30023,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -883,7 +883,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarexpandedstacked) put
|
options (lintype) (databarexpandedstacked) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -29628,7 +30008,7 @@
|
@@ -29687,7 +30067,7 @@
|
||||||
linear options //databarexpandedstacked exec
|
linear options //databarexpandedstacked exec
|
||||||
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
||||||
dup (pixy) get /linheight exch def
|
dup (pixy) get /linheight exch def
|
||||||
@ -892,7 +892,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -29654,21 +30034,49 @@
|
@@ -29713,21 +30093,49 @@
|
||||||
19 98 bot length 13 sub {} for
|
19 98 bot length 13 sub {} for
|
||||||
70 98 bot length 13 sub {} for
|
70 98 bot length 13 sub {} for
|
||||||
] {sepfinder} forall
|
] {sepfinder} forall
|
||||||
@ -955,7 +955,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -29732,7 +30140,7 @@
|
@@ -29792,7 +30200,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -964,7 +964,7 @@
|
|||||||
|
|
||||||
options (inkspread) (0) put
|
options (inkspread) (0) put
|
||||||
options (dontdraw) true put
|
options (dontdraw) true put
|
||||||
@@ -29792,35 +30200,87 @@
|
@@ -29852,35 +30260,87 @@
|
||||||
linear << options {} forall >> //gs1-128 exec
|
linear << options {} forall >> //gs1-128 exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -1066,7 +1066,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -31370,3 +31830,189 @@
|
@@ -31434,3 +31894,189 @@
|
||||||
% --END ENCODER hibcazteccode--
|
% --END ENCODER hibcazteccode--
|
||||||
|
|
||||||
% --END TEMPLATE--
|
% --END TEMPLATE--
|
||||||
|
Binary file not shown.
@ -17,6 +17,7 @@ run_bwipp_test "test_2of5" "encode"
|
|||||||
run_bwipp_test "test_auspost" "encode"
|
run_bwipp_test "test_auspost" "encode"
|
||||||
run_bwipp_test "test_aztec" "encode"
|
run_bwipp_test "test_aztec" "encode"
|
||||||
run_bwipp_test "test_aztec" "encode_segs"
|
run_bwipp_test "test_aztec" "encode_segs"
|
||||||
|
run_bwipp_test "test_bc412"
|
||||||
run_bwipp_test "test_channel" "encode"
|
run_bwipp_test "test_channel" "encode"
|
||||||
run_bwipp_test "test_codablock" "encode"
|
run_bwipp_test "test_codablock" "encode"
|
||||||
run_bwipp_test "test_code" "encode"
|
run_bwipp_test "test_code" "encode"
|
||||||
|
@ -261,7 +261,7 @@ extern "C" {
|
|||||||
#define BARCODE_UPNQR 143 /* UPNQR (Univerzalnega Plačilnega Naloga QR) */
|
#define BARCODE_UPNQR 143 /* UPNQR (Univerzalnega Plačilnega Naloga QR) */
|
||||||
#define BARCODE_ULTRA 144 /* Ultracode */
|
#define BARCODE_ULTRA 144 /* Ultracode */
|
||||||
#define BARCODE_RMQR 145 /* Rectangular Micro QR Code (rMQR) */
|
#define BARCODE_RMQR 145 /* Rectangular Micro QR Code (rMQR) */
|
||||||
#define BARCODE_BC412 146 /* IBM BC412 */
|
#define BARCODE_BC412 146 /* IBM BC412 (SEMI T1-95) */
|
||||||
#define BARCODE_LAST 146 /* Max barcode number marker, not barcode */
|
#define BARCODE_LAST 146 /* Max barcode number marker, not barcode */
|
||||||
|
|
||||||
/* Output options (`symbol->output_options`) */
|
/* Output options (`symbol->output_options`) */
|
||||||
|
@ -89,6 +89,7 @@ IMAGES = \
|
|||||||
images/dbar_exp.svg \
|
images/dbar_exp.svg \
|
||||||
images/koreapost.svg \
|
images/koreapost.svg \
|
||||||
images/channel.svg \
|
images/channel.svg \
|
||||||
|
images/bc412.svg \
|
||||||
images/code128_stacked.svg \
|
images/code128_stacked.svg \
|
||||||
images/code128_stacked_sep2.svg \
|
images/code128_stacked_sep2.svg \
|
||||||
images/codablockf.svg \
|
images/codablockf.svg \
|
||||||
|
@ -730,6 +730,8 @@ Value
|
|||||||
144 `BARCODE_ULTRA` Ultracode
|
144 `BARCODE_ULTRA` Ultracode
|
||||||
|
|
||||||
145 `BARCODE_RMQR` Rectangular Micro QR Code (rMQR)
|
145 `BARCODE_RMQR` Rectangular Micro QR Code (rMQR)
|
||||||
|
|
||||||
|
140 `BARCODE_BC412` IBM BC412 (SEMI T1-95)
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Table: {#tbl:barcode_types tag=": Barcode Types (Symbologies)"}
|
Table: {#tbl:barcode_types tag=": Barcode Types (Symbologies)"}
|
||||||
@ -2803,6 +2805,18 @@ the table below:
|
|||||||
|
|
||||||
Table: {#tbl:channel_maxima tag=": Channel Maximum Values"}
|
Table: {#tbl:channel_maxima tag=": Channel Maximum Values"}
|
||||||
|
|
||||||
|
### 6.1.14 BC412 (SEMI T1-95)
|
||||||
|
|
||||||
|
![`zint -b BC412 -d "AQ45670" --compliantheight`](images/bc412.svg)
|
||||||
|
|
||||||
|
Designed by IBM for marking silicon wafers, each BC412 character is represented
|
||||||
|
by 4 bars of a single size, interleaved with 4 spaces of varying sizes that
|
||||||
|
total 8 (hence 4 bars in 12). Zint implements the SEMI T1-95 standard, where
|
||||||
|
input must be alphanumeric, excluding the letter `O`, and must be from 7 to 18
|
||||||
|
characters in length. A single check character is added by Zint, appearing in
|
||||||
|
the 2nd character position. Lowercase input is automatically made uppercase.
|
||||||
|
|
||||||
|
|
||||||
\clearpage
|
\clearpage
|
||||||
|
|
||||||
## 6.2 Stacked Symbologies
|
## 6.2 Stacked Symbologies
|
||||||
@ -4064,6 +4078,8 @@ international standards:
|
|||||||
|
|
||||||
- ISO/IEC 24778:2008 Information technology - Automatic identification and data
|
- ISO/IEC 24778:2008 Information technology - Automatic identification and data
|
||||||
capture techniques - Aztec Code bar code symbology specification
|
capture techniques - Aztec Code bar code symbology specification
|
||||||
|
- SEMI T1-95 Specification for Back Surface Bar Code Marking of Silicon Wafers
|
||||||
|
(BC412) (1996)
|
||||||
- ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel Code
|
- ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel Code
|
||||||
- BS EN 798:1996 Bar coding - Symbology specifications - 'Codabar'
|
- BS EN 798:1996 Bar coding - Symbology specifications - 'Codabar'
|
||||||
- AIM Europe ISS-X-24 - Uniform Symbology Specification Codablock-F (1995)
|
- AIM Europe ISS-X-24 - Uniform Symbology Specification Codablock-F (1995)
|
||||||
|
@ -117,6 +117,7 @@ July 2022
|
|||||||
- 6.1.11.3 GS1 DataBar Expanded
|
- 6.1.11.3 GS1 DataBar Expanded
|
||||||
- 6.1.12 Korea Post Barcode
|
- 6.1.12 Korea Post Barcode
|
||||||
- 6.1.13 Channel Code
|
- 6.1.13 Channel Code
|
||||||
|
- 6.1.14 BC412 (SEMI T1-95)
|
||||||
- 6.2 Stacked Symbologies
|
- 6.2 Stacked Symbologies
|
||||||
- 6.2.1 Basic Symbol Stacking
|
- 6.2.1 Basic Symbol Stacking
|
||||||
- 6.2.2 Codablock-F
|
- 6.2.2 Codablock-F
|
||||||
@ -866,6 +867,8 @@ underscores are optional.
|
|||||||
144 BARCODE_ULTRA Ultracode
|
144 BARCODE_ULTRA Ultracode
|
||||||
|
|
||||||
145 BARCODE_RMQR Rectangular Micro QR Code (rMQR)
|
145 BARCODE_RMQR Rectangular Micro QR Code (rMQR)
|
||||||
|
|
||||||
|
140 BARCODE_BC412 IBM BC412 (SEMI T1-95)
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
: Table : Barcode Types (Symbologies):
|
: Table : Barcode Types (Symbologies):
|
||||||
@ -2765,6 +2768,17 @@ the table below:
|
|||||||
|
|
||||||
: Table : Channel Maximum Values:
|
: Table : Channel Maximum Values:
|
||||||
|
|
||||||
|
6.1.14 BC412 (SEMI T1-95)
|
||||||
|
|
||||||
|
[zint -b BC412 -d "AQ45670" --compliantheight]
|
||||||
|
|
||||||
|
Designed by IBM for marking silicon wafers, each BC412 character is represented
|
||||||
|
by 4 bars of a single size, interleaved with 4 spaces of varying sizes that
|
||||||
|
total 8 (hence 4 bars in 12). Zint implements the SEMI T1-95 standard, where
|
||||||
|
input must be alphanumeric, excluding the letter O, and must be from 7 to 18
|
||||||
|
characters in length. A single check character is added by Zint, appearing in
|
||||||
|
the 2nd character position. Lowercase input is automatically made uppercase.
|
||||||
|
|
||||||
6.2 Stacked Symbologies
|
6.2 Stacked Symbologies
|
||||||
|
|
||||||
6.2.1 Basic Symbol Stacking
|
6.2.1 Basic Symbol Stacking
|
||||||
@ -3963,6 +3977,8 @@ international standards:
|
|||||||
|
|
||||||
- ISO/IEC 24778:2008 Information technology - Automatic identification and
|
- ISO/IEC 24778:2008 Information technology - Automatic identification and
|
||||||
data capture techniques - Aztec Code bar code symbology specification
|
data capture techniques - Aztec Code bar code symbology specification
|
||||||
|
- SEMI T1-95 Specification for Back Surface Bar Code Marking of Silicon Wafers
|
||||||
|
(BC412) (1996)
|
||||||
- ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel Code
|
- ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel Code
|
||||||
- BS EN 798:1996 Bar coding - Symbology specifications - ‘Codabar’
|
- BS EN 798:1996 Bar coding - Symbology specifications - ‘Codabar’
|
||||||
- AIM Europe ISS-X-24 - Uniform Symbology Specification Codablock-F (1995)
|
- AIM Europe ISS-X-24 - Uniform Symbology Specification Codablock-F (1995)
|
||||||
@ -4588,8 +4604,13 @@ Please send bug reports to https://sourceforge.net/p/zint/tickets/.
|
|||||||
SEE ALSO
|
SEE ALSO
|
||||||
|
|
||||||
Full documention for zint (and the API libzint and the GUI zint-qt) is available
|
Full documention for zint (and the API libzint and the GUI zint-qt) is available
|
||||||
from http://zint.org.uk/Manual.aspx, and at
|
from
|
||||||
https://sourceforge.net/p/zint/docs/manual.txt.
|
|
||||||
|
http://zint.org.uk/Manual.aspx
|
||||||
|
|
||||||
|
and at
|
||||||
|
|
||||||
|
https://sourceforge.net/p/zint/docs/manual.txt
|
||||||
|
|
||||||
CONFORMING TO
|
CONFORMING TO
|
||||||
|
|
||||||
|
16
docs/zint.1
16
docs/zint.1
@ -567,8 +567,20 @@ Please send bug reports to https://sourceforge.net/p/zint/tickets/.
|
|||||||
.PP
|
.PP
|
||||||
Full documention for \f[V]zint\f[R] (and the API \f[V]libzint\f[R] and
|
Full documention for \f[V]zint\f[R] (and the API \f[V]libzint\f[R] and
|
||||||
the GUI \f[V]zint-qt\f[R]) is available from
|
the GUI \f[V]zint-qt\f[R]) is available from
|
||||||
http://zint.org.uk/Manual.aspx, and at
|
.IP
|
||||||
https://sourceforge.net/p/zint/docs/manual.txt.
|
.nf
|
||||||
|
\f[C]
|
||||||
|
http://zint.org.uk/Manual.aspx
|
||||||
|
\f[R]
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
and at
|
||||||
|
.IP
|
||||||
|
.nf
|
||||||
|
\f[C]
|
||||||
|
https://sourceforge.net/p/zint/docs/manual.txt
|
||||||
|
\f[R]
|
||||||
|
.fi
|
||||||
.SH CONFORMING TO
|
.SH CONFORMING TO
|
||||||
.PP
|
.PP
|
||||||
Zint is designed to be compliant with a number of international
|
Zint is designed to be compliant with a number of international
|
||||||
|
@ -461,7 +461,12 @@ Please send bug reports to https://sourceforge.net/p/zint/tickets/.
|
|||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
||||||
Full documention for `zint` (and the API `libzint` and the GUI `zint-qt`) is available from
|
Full documention for `zint` (and the API `libzint` and the GUI `zint-qt`) is available from
|
||||||
http://zint.org.uk/Manual.aspx, and at https://sourceforge.net/p/zint/docs/manual.txt.
|
|
||||||
|
http://zint.org.uk/Manual.aspx
|
||||||
|
|
||||||
|
and at
|
||||||
|
|
||||||
|
https://sourceforge.net/p/zint/docs/manual.txt
|
||||||
|
|
||||||
# CONFORMING TO
|
# CONFORMING TO
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ zint -b DBAR_LTD --compliantheight -d "0950110153001" --scale=0.6 -o images/dbar
|
|||||||
zint -b DBAR_EXP --compliantheight -d "[01]98898765432106[3202]012345[15]991231" --scale=0.6 -o images/dbar_exp.svg
|
zint -b DBAR_EXP --compliantheight -d "[01]98898765432106[3202]012345[15]991231" --scale=0.6 -o images/dbar_exp.svg
|
||||||
zint -b KOREAPOST -d "923457" --scale=0.6 -o images/koreapost.svg
|
zint -b KOREAPOST -d "923457" --scale=0.6 -o images/koreapost.svg
|
||||||
zint -b CHANNEL -d "453678" --compliantheight --scale=0.6 -o images/channel.svg
|
zint -b CHANNEL -d "453678" --compliantheight --scale=0.6 -o images/channel.svg
|
||||||
|
zint -b BC412 -d "AQ45670" --compliantheight --scale=0.6 -o images/bc412.svg
|
||||||
zint -d "This" -d "That" --scale=0.6 -o images/code128stacked.svg
|
zint -d "This" -d "That" --scale=0.6 -o images/code128stacked.svg
|
||||||
zint --notext --bind --separator=2 -d "This" -d "That" --scale=0.6 -o images/code128stacked_sep2.svg
|
zint --notext --bind --separator=2 -d "This" -d "That" --scale=0.6 -o images/code128stacked_sep2.svg
|
||||||
zint -b CODABLOCKF -d "CODABLOCK F Symbology" --rows=3 --scale=0.6 -o images/codablockf.svg
|
zint -b CODABLOCKF -d "CODABLOCK F Symbology" --rows=3 --scale=0.6 -o images/codablockf.svg
|
||||||
|
@ -72,7 +72,7 @@ static const struct bstyle_item bstyle_items[] = {
|
|||||||
{ QSL("Australia Post Standard Customer"), BARCODE_AUSPOST },
|
{ QSL("Australia Post Standard Customer"), BARCODE_AUSPOST },
|
||||||
{ QSL("Aztec Code (ISO 24778) (and HIBC)"), BARCODE_AZTEC },
|
{ QSL("Aztec Code (ISO 24778) (and HIBC)"), BARCODE_AZTEC },
|
||||||
{ QSL("Aztec Runes (ISO 24778)"), BARCODE_AZRUNE },
|
{ QSL("Aztec Runes (ISO 24778)"), BARCODE_AZRUNE },
|
||||||
{ QSL("BC412 (SEMI TI-95)"), BARCODE_BC412 },
|
{ QSL("BC412 (SEMI T1-95)"), BARCODE_BC412 },
|
||||||
{ QSL("Channel Code"), BARCODE_CHANNEL },
|
{ QSL("Channel Code"), BARCODE_CHANNEL },
|
||||||
{ QSL("Codabar (EN 798)"), BARCODE_CODABAR },
|
{ QSL("Codabar (EN 798)"), BARCODE_CODABAR },
|
||||||
{ QSL("Codablock-F (and HIBC)"), BARCODE_CODABLOCKF },
|
{ QSL("Codablock-F (and HIBC)"), BARCODE_CODABLOCKF },
|
||||||
|
Loading…
Reference in New Issue
Block a user