mirror of
https://git.code.sf.net/p/zint/code
synced 2026-07-31 10:29:52 +00:00
CLI: make --mirror available in standard non-batch mode via
new routines `mirror_start()`, `mirror_outfile()` & limit substitutions on Unix to backslash (Windows remains the same); restrict "borderwidth", "textgap", "vwhitesp", "whitesp" < 100 CODEONE: fix `ceilf()` -> `C1_MULT_CEIL()` in FAST_MODE encodation (improves/changes some encodation) composite: preserve `gs1_verify()` warning using `warn_level` hack; fix wrong name `zint_dbar_omnstk_set_height()` -> `zint_dbar_stk_set_height()`; use new `zint_micropdf_variant()` & `zint_micropdf_expand()` routines (see below) MICROPDF417: move variant determination into new shareable routine `zint_micropdf_variant()` & expansion into `zint_micropdf_expand()` qzint: add helper methods `setbordertypevalue()`, `encodedinputmode()`, `encodedoutputoptions()`, `ecivaluetoeciindex()` and `eciindextoecivalue()` dbar: for performance pre-calculate `combins()` as array coverage: add `malloc()`-type failure testing to AZTEC, CONTENT_SEGS, MEMORY_FILE, raster, Reed-Solomon & vector; numerous changes to remove unused code and test more branches common: add `isxdigit()` general: various code fiddlings manual: add char names to sequence and batch format char tables; mention long options can be shortened (& use "--compliantheight" -> "--compliant"); expand mirror explanation & document substitutions in footnote; workaround xecjk putting space after double quote when quoting cjk chars & rejig input mode examples; workaround html alignment bug in table gs1-enabled symbologies by adding extra rh dashes to header cols; add "figure nn: " to txt image tags via sed: various other small fixes and rephrasings
This commit is contained in:
+292
-186
@@ -150,30 +150,38 @@ static void test_binary_div_modulo_divisor(const testCtx *const p_ctx) {
|
||||
} else {
|
||||
text = data[i].data;
|
||||
}
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, text, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/,
|
||||
-1 /*option_1*/, -1, -1, -1 /*output_options*/,
|
||||
text, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, TCU(text), length);
|
||||
assert_zero(ret, "i:%d ZBarcode_Encode ret %d != 0 (%s)\n", i, ret, symbol->errtxt);
|
||||
|
||||
if (p_ctx->generate) {
|
||||
printf(" /*%3d*/ { %s, \"%s\", %.0f, %.0f, %d, %d, ",
|
||||
i, testUtilBarcodeName(data[i].symbology), data[i].data, data[i].w, data[i].h, symbol->rows, symbol->width);
|
||||
i, testUtilBarcodeName(data[i].symbology), data[i].data, data[i].w, data[i].h,
|
||||
symbol->rows, symbol->width);
|
||||
testUtilModulesPrintRow(symbol, symbol->rows - 1, "", " },\n");
|
||||
} else {
|
||||
int width;
|
||||
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n",
|
||||
i, symbol->rows, data[i].expected_rows);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n",
|
||||
i, symbol->width, data[i].expected_width);
|
||||
|
||||
ret = testUtilModulesCmpRow(symbol, symbol->rows - 1, data[i].expected, &width);
|
||||
assert_zero(ret, "i:%d testUtilModulesCmpRow ret %d != 0 width %d row %d\n", i, ret, width, symbol->rows - 1);
|
||||
assert_zero(ret, "i:%d testUtilModulesCmpRow ret %d != 0 width %d row %d\n",
|
||||
i, ret, width, symbol->rows - 1);
|
||||
|
||||
ret = ZBarcode_Buffer_Vector(symbol, 0);
|
||||
assert_zero(ret, "i:%d ZBarcode_Buffer_Vector ret %d != 0\n", i, ret);
|
||||
|
||||
if (do_bwipp && testUtilCanBwipp(i, symbol, -1, -1, -1, debug)) {
|
||||
ret = testUtilBwipp(i, symbol, -1, -1, -1, text, length, symbol->primary, cmp_buf, sizeof(cmp_buf), NULL);
|
||||
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
ret = testUtilBwipp(i, symbol, -1, -1, -1, text, length, symbol->primary, cmp_buf, sizeof(cmp_buf),
|
||||
NULL);
|
||||
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
|
||||
ret = testUtilBwippCmpRow(symbol, symbol->rows - 1, cmp_msg, cmp_buf, data[i].expected);
|
||||
assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
|
||||
@@ -182,9 +190,12 @@ static void test_binary_div_modulo_divisor(const testCtx *const p_ctx) {
|
||||
if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data[i].data, length, debug)) {
|
||||
int cmp_len, ret_len;
|
||||
char modules_dump[8192 + 1];
|
||||
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
|
||||
ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, 1 /*zxingcpp_cmp*/, cmp_buf, sizeof(cmp_buf), &cmp_len);
|
||||
assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1,
|
||||
"i:%d testUtilModulesDump == -1\n", i);
|
||||
ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, 1 /*zxingcpp_cmp*/, cmp_buf,
|
||||
sizeof(cmp_buf), &cmp_len);
|
||||
assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i,
|
||||
testUtilBarcodeName(symbol->symbology), ret);
|
||||
|
||||
ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data[i].data, length, NULL /*primary*/,
|
||||
escaped, &ret_len);
|
||||
@@ -889,10 +900,13 @@ static void test_examples(const testCtx *const p_ctx) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, data[i].option_3, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/,
|
||||
-1 /*option_1*/, data[i].option_2, data[i].option_3, -1 /*output_options*/,
|
||||
data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, TCU(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 (p_ctx->generate) {
|
||||
printf(" /*%3d*/ { %s, %s, %d, %d, \"%s\", %d, %d, %d, %d, \"%s\",\n",
|
||||
@@ -904,33 +918,47 @@ static void test_examples(const testCtx *const p_ctx) {
|
||||
} else {
|
||||
int width, row;
|
||||
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d %s symbol->rows %d != %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows, data[i].data);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d %s symbol->width %d != %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), symbol->width, data[i].expected_width, data[i].data);
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d %s symbol->rows %d != %d (%s)\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows,
|
||||
data[i].data);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d %s symbol->width %d != %d (%s)\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), symbol->width, data[i].expected_width,
|
||||
data[i].data);
|
||||
|
||||
ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
|
||||
assert_zero(ret, "i:%d %s testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, width, row, data[i].data);
|
||||
assert_zero(ret, "i:%d %s testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), ret, width, row, data[i].data);
|
||||
|
||||
if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, data[i].option_3, debug)) {
|
||||
if (!data[i].bwipp_cmp) {
|
||||
if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
|
||||
if (debug & ZINT_DEBUG_TEST_PRINT) {
|
||||
printf("i:%d %s not BWIPP compatible (%s)\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), data[i].comment);
|
||||
}
|
||||
} else {
|
||||
ret = testUtilBwipp(i, symbol, -1, data[i].option_2, data[i].option_3, data[i].data, length, NULL, cmp_buf, sizeof(cmp_buf), NULL);
|
||||
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
ret = testUtilBwipp(i, symbol, -1, data[i].option_2, data[i].option_3, data[i].data, length, NULL,
|
||||
cmp_buf, sizeof(cmp_buf), NULL);
|
||||
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
|
||||
ret = testUtilBwippCmp(symbol, cmp_msg, cmp_buf, data[i].expected);
|
||||
assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_buf, data[i].expected);
|
||||
i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_buf,
|
||||
data[i].expected);
|
||||
}
|
||||
}
|
||||
if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data[i].data, length, debug)) {
|
||||
int cmp_len, ret_len;
|
||||
char modules_dump[8192 + 1];
|
||||
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
|
||||
ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, 1 /*zxingcpp_cmp*/, cmp_buf, sizeof(cmp_buf), &cmp_len);
|
||||
assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1,
|
||||
"i:%d testUtilModulesDump == -1\n", i);
|
||||
ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, 1 /*zxingcpp_cmp*/, cmp_buf,
|
||||
sizeof(cmp_buf), &cmp_len);
|
||||
assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
|
||||
ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data[i].data, length, NULL /*primary*/,
|
||||
escaped, &ret_len);
|
||||
escaped, &ret_len);
|
||||
assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len,
|
||||
escaped);
|
||||
@@ -1218,24 +1246,32 @@ static void test_general_field(const testCtx *const p_ctx) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/,
|
||||
-1 /*option_1*/, -1, -1, -1 /*output_options*/,
|
||||
data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, TCU(data[i].data), length);
|
||||
assert_zero(ret, "i:%d ZBarcode_Encode ret %d != 0 (%s)\n", i, ret, symbol->errtxt);
|
||||
|
||||
if (p_ctx->generate) {
|
||||
printf(" /*%2d*/ { %s, \"%s\", %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), data[i].data, ret, symbol->rows, symbol->width, data[i].comment);
|
||||
i, testUtilBarcodeName(symbol->symbology), data[i].data, ret, symbol->rows, symbol->width,
|
||||
data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
printf(" },\n");
|
||||
} else {
|
||||
int width, row;
|
||||
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d %s symbol->rows %d != %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows, data[i].data);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d %s symbol->width %d != %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), symbol->width, data[i].expected_width, data[i].data);
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d %s symbol->rows %d != %d (%s)\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), symbol->rows, data[i].expected_rows,
|
||||
data[i].data);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d %s symbol->width %d != %d (%s)\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), symbol->width, data[i].expected_width,
|
||||
data[i].data);
|
||||
|
||||
ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
|
||||
assert_zero(ret, "i:%d %s testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n", i, testUtilBarcodeName(data[i].symbology), ret, width, row, data[i].data);
|
||||
assert_zero(ret, "i:%d %s testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), ret, width, row, data[i].data);
|
||||
}
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
@@ -1284,20 +1320,27 @@ static void test_binary_buffer_size(const testCtx *const p_ctx) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DBAR_EXP, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DBAR_EXP, data[i].input_mode, -1 /*eci*/,
|
||||
-1 /*option_1*/, -1, -1, -1 /*output_options*/,
|
||||
data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, TCU(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(symbol->errtxt[0] == '\0', ret == 0, "i:%d symbol->errtxt not %s (%s)\n", i, ret ? "set" : "empty", symbol->errtxt);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n",
|
||||
i, ret, data[i].ret, symbol->errtxt);
|
||||
assert_equal(symbol->errtxt[0] == '\0', ret == 0, "i:%d symbol->errtxt not %s (%s)\n",
|
||||
i, ret ? "set" : "empty", symbol->errtxt);
|
||||
|
||||
if (p_ctx->generate) {
|
||||
printf(" /*%3d*/ { %s, \"%s\", %s, %d, %d, \"%s\", \"%s\" },\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].data, testUtilErrorName(ret), symbol->rows,
|
||||
symbol->width, symbol->errtxt, data[i].comment);
|
||||
} else {
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt);
|
||||
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_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n",
|
||||
i, symbol->errtxt, data[i].expected_errtxt);
|
||||
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);
|
||||
}
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
@@ -1356,13 +1399,14 @@ static void test_hrt(const testCtx *const p_ctx) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/,
|
||||
-1 /*option_1*/, -1 /*option_2*/, -1 /*option_3*/, data[i].output_options,
|
||||
data[i].data, -1, debug);
|
||||
-1 /*option_1*/, -1 /*option_2*/, -1 /*option_3*/, data[i].output_options,
|
||||
data[i].data, -1, debug);
|
||||
expected_length = (int) strlen(data[i].expected);
|
||||
expected_content_length = (int) strlen(data[i].expected_content);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, TCU(data[i].data), length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, data[i].ret, ret, symbol->errtxt);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n",
|
||||
i, data[i].ret, ret, symbol->errtxt);
|
||||
|
||||
assert_equal(symbol->text_length, expected_length, "i:%d text_length %d != expected_length %d\n",
|
||||
i, symbol->text_length, expected_length);
|
||||
@@ -1396,6 +1440,8 @@ static void test_input(const testCtx *const p_ctx) {
|
||||
int input_mode;
|
||||
int option_2;
|
||||
int option_3;
|
||||
int output_options;
|
||||
float height;
|
||||
const char *data;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
@@ -1406,153 +1452,158 @@ static void test_input(const testCtx *const p_ctx) {
|
||||
};
|
||||
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||
static const struct item data[] = {
|
||||
/* 0*/ { BARCODE_DBAR_OMN, -1, -1, -1, "1234567890123", 0, 1, 96, "", 0, 0 },
|
||||
/* 1*/ { BARCODE_DBAR_OMN, -1, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 2*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 3*/ { BARCODE_DBAR_OMN, -1, -1, -1, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '4', expecting '1'", 0, 0 },
|
||||
/* 4*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, -1, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '4', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 5*/ { BARCODE_DBAR_OMN, -1, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 6*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 7*/ { BARCODE_DBAR_OMN, -1, -1, -1, "01345678901235", 0, 1, 96, "", 0, 0 },
|
||||
/* 8*/ { BARCODE_DBAR_OMN, -1, -1, -1, "0134567890123", 0, 1, 96, "", 0, 0 },
|
||||
/* 9*/ { BARCODE_DBAR_OMN, -1, -1, -1, "0112345678901231", 0, 1, 96, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 10*/ { BARCODE_DBAR_OMN, -1, -1, -1, "011234567890123", 0, 1, 96, "", 0, 0 }, /* Or not */
|
||||
/* 11*/ { BARCODE_DBAR_OMN, -1, -1, -1, "[01]12345678901231", 0, 1, 96, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 12*/ { BARCODE_DBAR_OMN, -1, -1, -1, "[01]1234567890123", 0, 1, 96, "", 0, 0 }, /* Or not */
|
||||
/* 13*/ { BARCODE_DBAR_OMN, -1, -1, -1, "(01)12345678901231", 0, 1, 96, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 14*/ { BARCODE_DBAR_OMN, -1, -1, -1, "(01)1234567890123", 0, 1, 96, "", 0, 0 }, /* Or not */
|
||||
/* 15*/ { BARCODE_DBAR_OMN, -1, -1, -1, "[01)12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 16*/ { BARCODE_DBAR_LTD, -1, -1, -1, "1234567890123", 0, 1, 79, "", 0, 0 },
|
||||
/* 17*/ { BARCODE_DBAR_LTD, -1, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 383: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 18*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 383: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 19*/ { BARCODE_DBAR_LTD, -1, -1, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 389: Invalid check digit '5', expecting '1'", 0, 0 },
|
||||
/* 20*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 389: Invalid check digit '5', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 21*/ { BARCODE_DBAR_LTD, -1, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 22*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 23*/ { BARCODE_DBAR_LTD, -1, -1, -1, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 24*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 25*/ { BARCODE_DBAR_LTD, -1, -1, -1, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 26*/ { BARCODE_DBAR_LTD, -1, -1, -1, "01345678901235", 0, 1, 79, "", 0, 0 },
|
||||
/* 27*/ { BARCODE_DBAR_LTD, -1, -1, -1, "0134567890123", 0, 1, 79, "", 0, 0 },
|
||||
/* 28*/ { BARCODE_DBAR_LTD, -1, -1, -1, "0112345678901231", 0, 1, 79, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 29*/ { BARCODE_DBAR_LTD, -1, -1, -1, "011234567890123", 0, 1, 79, "", 0, 0 }, /* Or not */
|
||||
/* 30*/ { BARCODE_DBAR_LTD, -1, -1, -1, "[01]12345678901231", 0, 1, 79, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 31*/ { BARCODE_DBAR_LTD, -1, -1, -1, "[01]1234567890123", 0, 1, 79, "", 0, 0 }, /* Or not */
|
||||
/* 32*/ { BARCODE_DBAR_LTD, -1, -1, -1, "(01)12345678901231", 0, 1, 79, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 33*/ { BARCODE_DBAR_LTD, -1, -1, -1, "(01)1234567890123", 0, 1, 79, "", 0, 0 }, /* Or not */
|
||||
/* 34*/ { BARCODE_DBAR_LTD, -1, -1, -1, "[01)12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 35*/ { BARCODE_DBAR_LTD, -1, -1, -1, "[10]12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 36*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 37*/ { BARCODE_DBAR_EXP, -1, -1, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 261: AI (01) data position 14: Bad checksum '4', expected '1'", 0, 0 },
|
||||
/* 38*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, "[01]12345678901234", 0, 1, 134, "", 0, 0 },
|
||||
/* 39*/ { BARCODE_DBAR_EXP, -1, -1, -1, "[01]12345678901231", 0, 1, 134, "", 0, 0 },
|
||||
/* 40*/ { BARCODE_DBAR_EXP, -1, -1, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 41*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 42*/ { BARCODE_DBAR_EXP, -1, -1, -1, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 259: Invalid data length for AI (01) at position 1", 0, 0 },
|
||||
/* 43*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, "[01]123456789012315", 0, 1, 151, "", 0, 0 },
|
||||
/* 44*/ { BARCODE_DBAR_EXP, -1, -1, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 261: AI (01) data position 14: Bad checksum '4', expected '1'", 0, 0 },
|
||||
/* 45*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, "[01]12345678901234", 0, 1, 134, "", 0, 0 },
|
||||
/* 46*/ { BARCODE_DBAR_EXP, -1, -1, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_ ", ZINT_WARN_NONCOMPLIANT, 1, 526, "Warning 261: AI (91) data position 21: Invalid CSET 82 character ' '", 0, 0 }, /* ISOIEC punc */
|
||||
/* 47*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_ ", 0, 1, 526, "", 0, 0 },
|
||||
/* 48*/ { BARCODE_DBAR_EXP, -1, -1, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_", 0, 1, 494, "", 0, 0 }, /* ISOIEC punc less space */
|
||||
/* 49*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_", 0, 1, 494, "", 0, 0 },
|
||||
/* 50*/ { BARCODE_DBAR_STK, -1, -1, -1, "1234567890123", 0, 3, 50, "", 0, 0 },
|
||||
/* 51*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 52*/ { BARCODE_DBAR_STK, -1, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 53*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 54*/ { BARCODE_DBAR_STK, -1, -1, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '5', expecting '1'", 0, 0 },
|
||||
/* 55*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '5', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 56*/ { BARCODE_DBAR_STK, -1, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 57*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 58*/ { BARCODE_DBAR_STK, -1, -1, -1, "01345678901235", 0, 3, 50, "", 0, 0 },
|
||||
/* 59*/ { BARCODE_DBAR_STK, -1, -1, -1, "0134567890123", 0, 3, 50, "", 0, 0 },
|
||||
/* 60*/ { BARCODE_DBAR_STK, -1, -1, -1, "0112345678901231", 0, 3, 50, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 61*/ { BARCODE_DBAR_STK, -1, -1, -1, "011234567890123", 0, 3, 50, "", 0, 0 }, /* Or not */
|
||||
/* 62*/ { BARCODE_DBAR_STK, -1, -1, -1, "[01]12345678901231", 0, 3, 50, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 63*/ { BARCODE_DBAR_STK, -1, -1, -1, "[01]1234567890123", 0, 3, 50, "", 0, 0 }, /* Or not */
|
||||
/* 64*/ { BARCODE_DBAR_STK, -1, -1, -1, "(01)12345678901231", 0, 3, 50, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 65*/ { BARCODE_DBAR_STK, -1, -1, -1, "(01)1234567890123", 0, 3, 50, "", 0, 0 }, /* Or not */
|
||||
/* 66*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "1234567890123", 0, 5, 50, "", 0, 0 },
|
||||
/* 67*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 68*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 69*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '6', expecting '1'", 0, 0 },
|
||||
/* 70*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, -1, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '6', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 71*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 72*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 73*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "01345678901235", 0, 5, 50, "", 0, 0 },
|
||||
/* 74*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "0134567890123", 0, 5, 50, "", 0, 0 },
|
||||
/* 75*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "0112345678901231", 0, 5, 50, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 76*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "011234567890123", 0, 5, 50, "", 0, 0 }, /* Or not */
|
||||
/* 77*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "[01]12345678901231", 0, 5, 50, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 78*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "[01]1234567890123", 0, 5, 50, "", 0, 0 }, /* Or not */
|
||||
/* 79*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "(01)12345678901231", 0, 5, 50, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 80*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "(01)1234567890123", 0, 5, 50, "", 0, 0 }, /* Or not */
|
||||
/* 81*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, "(00)12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 82*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 5, 102, "Warning 261: AI (01) data position 14: Bad checksum '4', expected '1'", 2, 0 },
|
||||
/* 83*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, -1, "[01]12345678901234", 0, 5, 102, "", 2, 0 },
|
||||
/* 84*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[01]12345678901231", 0, 5, 102, "", 2, 0 },
|
||||
/* 85*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 86*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 87*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 259: Invalid data length for AI (01) at position 1", 0, 0 },
|
||||
/* 88*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, -1, "[01]123456789012315", 0, 5, 102, "", 2, 0 },
|
||||
/* 89*/ { BARCODE_DBAR_EXPSTK, -1, 12, -1, "[01]12345678901231", 0, 5, 102, "", 2, 0 }, /* Cols > 11 ignored */
|
||||
/* 90*/ { BARCODE_DBAR_EXPSTK, -1, -1, 12, "[01]12345678901231", 0, 5, 102, "", 2, 0 }, /* Rows > 11 ignored */
|
||||
/* 91*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, "[01]12345678901231", 0, 9, 53, "", 1, 0 },
|
||||
/* 92*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, "[01]12345678901231", 0, 5, 102, "", 2, 0 },
|
||||
/* 93*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, "[01]12345678901231", 0, 1, 134, "", 3, 0 },
|
||||
/* 94*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, "[01]12345678901231", 0, 1, 134, "", 4, 0 },
|
||||
/* 95*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, "[01]12345678901231", 0, 5, 102, "", 2, 2 },
|
||||
/* 96*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, "[01]12345678901231", 0, 5, 102, "", 2, 3 },
|
||||
/* 97*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 0 },
|
||||
/* 98*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, "[8110]106141416543213500110000310123196000", 0, 25, 53, "", 1, 0 },
|
||||
/* 99*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 0 },
|
||||
/*100*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, "[8110]106141416543213500110000310123196000", 0, 9, 151, "", 3, 0 },
|
||||
/*101*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, "[8110]106141416543213500110000310123196000", 0, 5, 200, "", 4, 0 },
|
||||
/*102*/ { BARCODE_DBAR_EXPSTK, -1, 5, -1, "[8110]106141416543213500110000310123196000", 0, 5, 249, "", 5, 0 },
|
||||
/*103*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, "[8110]106141416543213500110000310123196000", 0, 5, 200, "", 4, 2 },
|
||||
/*104*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, "[8110]106141416543213500110000310123196000", 0, 9, 151, "", 3, 3 },
|
||||
/*105*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 4 },
|
||||
/*106*/ { BARCODE_DBAR_EXPSTK, -1, -1, 5, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 5 },
|
||||
/*107*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[91]123456789012345678901", 0, 9, 102, "", 2, 0 },
|
||||
/*108*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, "[91]123456789012345678901", 0, 17, 53, "", 1, 0 },
|
||||
/*109*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, "[91]123456789012345678901", 0, 9, 102, "", 2, 0 },
|
||||
/*110*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, "[91]123456789012345678901", 0, 5, 151, "", 3, 0 },
|
||||
/*111*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, "[91]123456789012345678901", 0, 5, 200, "", 4, 0 },
|
||||
/*112*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, "[91]123456789012345678901", 0, 5, 151, "", 3, 2 },
|
||||
/*113*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, "[91]123456789012345678901", 0, 9, 102, "", 2, 3 },
|
||||
/*114*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, "[91]123456789012345678901", 0, 9, 102, "", 2, 4 },
|
||||
/*115*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[91]123456789012345678901", 0, 9, 102, "", 2, 0 },
|
||||
/*116*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 0 },
|
||||
/*117*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 33, 53, "", 1, 0 },
|
||||
/*118*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 0 },
|
||||
/*119*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 151, "", 3, 0 },
|
||||
/*120*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 200, "", 4, 0 },
|
||||
/*121*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 200, "", 4, 0 },
|
||||
/*122*/ { BARCODE_DBAR_EXPSTK, -1, 5, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 249, "", 5, 0 },
|
||||
/*123*/ { BARCODE_DBAR_EXPSTK, -1, 6, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 298, "", 6, 0 },
|
||||
/*124*/ { BARCODE_DBAR_EXPSTK, -1, 7, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 347, "", 7, 0 },
|
||||
/*125*/ { BARCODE_DBAR_EXPSTK, -1, 8, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 396, "", 8, 0 },
|
||||
/*126*/ { BARCODE_DBAR_EXPSTK, -1, 9, -1, "[91]1234567890123456789012345678901234567890123456789", 0, 1, 428, "", 9, 0 },
|
||||
/*127*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 249, "", 5, 2 },
|
||||
/*128*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 151, "", 3, 3 },
|
||||
/*129*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 151, "", 3, 4 },
|
||||
/*130*/ { BARCODE_DBAR_EXPSTK, -1, -1, 5, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 5 },
|
||||
/*131*/ { BARCODE_DBAR_EXPSTK, -1, -1, 6, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 6 },
|
||||
/*132*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 0 },
|
||||
/*133*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 41, 53, "", 1, 0 },
|
||||
/*134*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 0 },
|
||||
/*135*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 13, 151, "", 3, 0 },
|
||||
/*136*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 9, 200, "", 4, 0 },
|
||||
/*137*/ { BARCODE_DBAR_EXPSTK, -1, 5, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 9, 249, "", 5, 0 },
|
||||
/*138*/ { BARCODE_DBAR_EXPSTK, -1, 6, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 5, 298, "", 6, 0 },
|
||||
/*139*/ { BARCODE_DBAR_EXPSTK, -1, 7, -1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 5, 347, "", 7, 0 },
|
||||
/*140*/ { BARCODE_DBAR_EXPSTK, -1, -1, 1, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 0 },
|
||||
/*141*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 5, 298, "", 6, 2 },
|
||||
/*142*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 9, 200, "", 4, 3 },
|
||||
/*143*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 13, 151, "", 3, 4 },
|
||||
/*144*/ { BARCODE_DBAR_EXPSTK, -1, -1, 5, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 13, 151, "", 3, 5 },
|
||||
/*145*/ { BARCODE_DBAR_EXPSTK, -1, -1, 6, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 6 },
|
||||
/*146*/ { BARCODE_DBAR_EXPSTK, -1, -1, 7, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 7 },
|
||||
/* 0*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "1234567890123", 0, 1, 96, "", 0, 0 },
|
||||
/* 1*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 2*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 3*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '4', expecting '1'", 0, 0 },
|
||||
/* 4*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '4', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 5*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 6*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 7*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "01345678901235", 0, 1, 96, "", 0, 0 },
|
||||
/* 8*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "0134567890123", 0, 1, 96, "", 0, 0 },
|
||||
/* 9*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "0112345678901231", 0, 1, 96, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 10*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "011234567890123", 0, 1, 96, "", 0, 0 }, /* Or not */
|
||||
/* 11*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "[01]12345678901231", 0, 1, 96, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 12*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "[01]1234567890123", 0, 1, 96, "", 0, 0 }, /* Or not */
|
||||
/* 13*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "(01)12345678901231", 0, 1, 96, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 14*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "(01)1234567890123", 0, 1, 96, "", 0, 0 }, /* Or not */
|
||||
/* 15*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, 0.0f, "[01)12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 16*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "1234567890123", 0, 1, 79, "", 0, 0 },
|
||||
/* 17*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 383: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 18*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 383: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 19*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 389: Invalid check digit '5', expecting '1'", 0, 0 },
|
||||
/* 20*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 389: Invalid check digit '5', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 21*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 22*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 23*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 24*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 25*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 26*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "01345678901235", 0, 1, 79, "", 0, 0 },
|
||||
/* 27*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "0134567890123", 0, 1, 79, "", 0, 0 },
|
||||
/* 28*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "0112345678901231", 0, 1, 79, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 29*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "011234567890123", 0, 1, 79, "", 0, 0 }, /* Or not */
|
||||
/* 30*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "[01]12345678901231", 0, 1, 79, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 31*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "[01]1234567890123", 0, 1, 79, "", 0, 0 }, /* Or not */
|
||||
/* 32*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "(01)12345678901231", 0, 1, 79, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 33*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "(01)1234567890123", 0, 1, 79, "", 0, 0 }, /* Or not */
|
||||
/* 34*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "[01)12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 35*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, 0.0f, "[10]12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 36*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input value out of range (0 to 1999999999999)", 0, 0 },
|
||||
/* 37*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, 0.0f, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 261: AI (01) data position 14: Bad checksum '4', expected '1'", 0, 0 },
|
||||
/* 38*/ { BARCODE_DBAR_EXP, -1, -1, -1, COMPLIANT_HEIGHT, 1.0f, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 261: AI (01) data position 14: Bad checksum '4', expected '1'", 0, 0 },
|
||||
/* 39*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]12345678901234", 0, 1, 134, "", 0, 0 },
|
||||
/* 40*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, COMPLIANT_HEIGHT, 1.0f, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 247: Height not compliant with standards (too small)", 0, 0 },
|
||||
/* 41*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, 0.0f, "[01]12345678901231", 0, 1, 134, "", 0, 0 },
|
||||
/* 42*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, 0.0f, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 43*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 44*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, 0.0f, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 259: Invalid data length for AI (01) at position 1", 0, 0 },
|
||||
/* 45*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]123456789012315", 0, 1, 151, "", 0, 0 },
|
||||
/* 46*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, 0.0f, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 261: AI (01) data position 14: Bad checksum '4', expected '1'", 0, 0 },
|
||||
/* 47*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]12345678901234", 0, 1, 134, "", 0, 0 },
|
||||
/* 48*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, 0.0f, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_ ", ZINT_WARN_NONCOMPLIANT, 1, 526, "Warning 261: AI (91) data position 21: Invalid CSET 82 character ' '", 0, 0 }, /* ISOIEC punc */
|
||||
/* 49*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_ ", 0, 1, 526, "", 0, 0 },
|
||||
/* 50*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, 0.0f, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_", 0, 1, 494, "", 0, 0 }, /* ISOIEC punc less space */
|
||||
/* 51*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_", 0, 1, 494, "", 0, 0 },
|
||||
/* 52*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "1234567890123", 0, 3, 50, "", 0, 0 },
|
||||
/* 53*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 54*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 55*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 56*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '5', expecting '1'", 0, 0 },
|
||||
/* 57*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '5', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 58*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 59*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 60*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 2.2f, "1234567890123", 0, 3, 50, "", 0, 0 },
|
||||
/* 61*/ { BARCODE_DBAR_STK, -1, -1, -1, COMPLIANT_HEIGHT, 2.2f, "1234567890123", ZINT_WARN_NONCOMPLIANT, 3, 50, "Warning 379: Height not compliant with standards", 0, 0 },
|
||||
/* 62*/ { BARCODE_DBAR_STK, -1, -1, -1, COMPLIANT_HEIGHT, 2.2f, "12345678901234", ZINT_ERROR_INVALID_CHECK, 3, 50, "Error 388: Invalid check digit '4', expecting '1'", 0, 0 },
|
||||
/* 63*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "01345678901235", 0, 3, 50, "", 0, 0 },
|
||||
/* 64*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "0134567890123", 0, 3, 50, "", 0, 0 },
|
||||
/* 65*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "0112345678901231", 0, 3, 50, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 66*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "011234567890123", 0, 3, 50, "", 0, 0 }, /* Or not */
|
||||
/* 67*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "[01]12345678901231", 0, 3, 50, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 68*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "[01]1234567890123", 0, 3, 50, "", 0, 0 }, /* Or not */
|
||||
/* 69*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "(01)12345678901231", 0, 3, 50, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 70*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, 0.0f, "(01)1234567890123", 0, 3, 50, "", 0, 0 }, /* Or not */
|
||||
/* 71*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "1234567890123", 0, 5, 50, "", 0, 0 },
|
||||
/* 72*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 73*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character at position 13 in input (digits only)", 0, 0 },
|
||||
/* 74*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '6', expecting '1'", 0, 0 },
|
||||
/* 75*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '6', expecting '1'", 0, 0 }, /* Still checked */
|
||||
/* 76*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 77*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 15 too long (maximum 14)", 0, 0 },
|
||||
/* 78*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "01345678901235", 0, 5, 50, "", 0, 0 },
|
||||
/* 79*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "0134567890123", 0, 5, 50, "", 0, 0 },
|
||||
/* 80*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "0112345678901231", 0, 5, 50, "", 0, 0 }, /* Allow '01' prefix if check digit given */
|
||||
/* 81*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "011234567890123", 0, 5, 50, "", 0, 0 }, /* Or not */
|
||||
/* 82*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "[01]12345678901231", 0, 5, 50, "", 0, 0 }, /* Allow '[01]' prefix if check digit given */
|
||||
/* 83*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "[01]1234567890123", 0, 5, 50, "", 0, 0 }, /* Or not */
|
||||
/* 84*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "(01)12345678901231", 0, 5, 50, "", 0, 0 }, /* Allow '(01)' prefix if check digit given */
|
||||
/* 85*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "(01)1234567890123", 0, 5, 50, "", 0, 0 }, /* Or not */
|
||||
/* 86*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, 0.0f, "(00)12345678901231", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input length 18 too long (maximum 14)", 0, 0 },
|
||||
/* 87*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 5, 102, "Warning 261: AI (01) data position 14: Bad checksum '4', expected '1'", 2, 0 },
|
||||
/* 88*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]12345678901234", 0, 5, 102, "", 2, 0 },
|
||||
/* 89*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[01]12345678901231", 0, 5, 102, "", 2, 0 },
|
||||
/* 90*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 91*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)", 0, 0 },
|
||||
/* 92*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 259: Invalid data length for AI (01) at position 1", 0, 0 },
|
||||
/* 93*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, -1, -1, 0.0f, "[01]123456789012315", 0, 5, 102, "", 2, 0 },
|
||||
/* 94*/ { BARCODE_DBAR_EXPSTK, -1, 12, -1, -1, 0.0f, "[01]12345678901231", 0, 5, 102, "", 2, 0 }, /* Cols > 11 ignored */
|
||||
/* 95*/ { BARCODE_DBAR_EXPSTK, -1, -1, 12, -1, 0.0f, "[01]12345678901231", 0, 5, 102, "", 2, 0 }, /* Rows > 11 ignored */
|
||||
/* 96*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, -1, 0.0f, "[01]12345678901231", 0, 9, 53, "", 1, 0 },
|
||||
/* 97*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, -1, 0.0f, "[01]12345678901231", 0, 5, 102, "", 2, 0 },
|
||||
/* 98*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, -1, 0.0f, "[01]12345678901231", 0, 1, 134, "", 3, 0 },
|
||||
/* 99*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, -1, 0.0f, "[01]12345678901231", 0, 1, 134, "", 4, 0 },
|
||||
/*100*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, -1, 0.0f, "[01]12345678901231", 0, 5, 102, "", 2, 2 },
|
||||
/*101*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, -1, 0.0f, "[01]12345678901231", 0, 5, 102, "", 2, 3 },
|
||||
/*102*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 0 },
|
||||
/*103*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 25, 53, "", 1, 0 },
|
||||
/*104*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 0 },
|
||||
/*105*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 9, 151, "", 3, 0 },
|
||||
/*106*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 5, 200, "", 4, 0 },
|
||||
/*107*/ { BARCODE_DBAR_EXPSTK, -1, 5, -1, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 5, 249, "", 5, 0 },
|
||||
/*108*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 5, 200, "", 4, 2 },
|
||||
/*109*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 9, 151, "", 3, 3 },
|
||||
/*110*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 4 },
|
||||
/*111*/ { BARCODE_DBAR_EXPSTK, -1, -1, 5, -1, 0.0f, "[8110]106141416543213500110000310123196000", 0, 13, 102, "", 2, 5 },
|
||||
/*112*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[91]123456789012345678901", 0, 9, 102, "", 2, 0 },
|
||||
/*113*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, -1, 0.0f, "[91]123456789012345678901", 0, 17, 53, "", 1, 0 },
|
||||
/*114*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, -1, 0.0f, "[91]123456789012345678901", 0, 9, 102, "", 2, 0 },
|
||||
/*115*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, -1, 0.0f, "[91]123456789012345678901", 0, 5, 151, "", 3, 0 },
|
||||
/*116*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, -1, 0.0f, "[91]123456789012345678901", 0, 5, 200, "", 4, 0 },
|
||||
/*117*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, -1, 0.0f, "[91]123456789012345678901", 0, 5, 151, "", 3, 2 },
|
||||
/*118*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, -1, 0.0f, "[91]123456789012345678901", 0, 9, 102, "", 2, 3 },
|
||||
/*119*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, -1, 0.0f, "[91]123456789012345678901", 0, 9, 102, "", 2, 4 },
|
||||
/*120*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[91]123456789012345678901", 0, 9, 102, "", 2, 0 },
|
||||
/*121*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 0 },
|
||||
/*122*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 33, 53, "", 1, 0 },
|
||||
/*123*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 0 },
|
||||
/*124*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 151, "", 3, 0 },
|
||||
/*125*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 200, "", 4, 0 },
|
||||
/*126*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 200, "", 4, 0 },
|
||||
/*127*/ { BARCODE_DBAR_EXPSTK, -1, 5, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 249, "", 5, 0 },
|
||||
/*128*/ { BARCODE_DBAR_EXPSTK, -1, 6, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 298, "", 6, 0 },
|
||||
/*129*/ { BARCODE_DBAR_EXPSTK, -1, 7, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 347, "", 7, 0 },
|
||||
/*130*/ { BARCODE_DBAR_EXPSTK, -1, 8, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 396, "", 8, 0 },
|
||||
/*131*/ { BARCODE_DBAR_EXPSTK, -1, 9, -1, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 1, 428, "", 9, 0 },
|
||||
/*132*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 5, 249, "", 5, 2 },
|
||||
/*133*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 151, "", 3, 3 },
|
||||
/*134*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 9, 151, "", 3, 4 },
|
||||
/*135*/ { BARCODE_DBAR_EXPSTK, -1, -1, 5, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 5 },
|
||||
/*136*/ { BARCODE_DBAR_EXPSTK, -1, -1, 6, -1, 0.0f, "[91]1234567890123456789012345678901234567890123456789", 0, 17, 102, "", 2, 6 },
|
||||
/*137*/ { BARCODE_DBAR_EXPSTK, -1, -1, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 0 },
|
||||
/*138*/ { BARCODE_DBAR_EXPSTK, -1, 1, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 41, 53, "", 1, 0 },
|
||||
/*139*/ { BARCODE_DBAR_EXPSTK, -1, 2, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 0 },
|
||||
/*140*/ { BARCODE_DBAR_EXPSTK, -1, 3, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 13, 151, "", 3, 0 },
|
||||
/*141*/ { BARCODE_DBAR_EXPSTK, -1, 4, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 9, 200, "", 4, 0 },
|
||||
/*142*/ { BARCODE_DBAR_EXPSTK, -1, 5, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 9, 249, "", 5, 0 },
|
||||
/*143*/ { BARCODE_DBAR_EXPSTK, -1, 6, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 5, 298, "", 6, 0 },
|
||||
/*144*/ { BARCODE_DBAR_EXPSTK, -1, 7, -1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 5, 347, "", 7, 0 },
|
||||
/*145*/ { BARCODE_DBAR_EXPSTK, -1, -1, 1, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 0 },
|
||||
/*146*/ { BARCODE_DBAR_EXPSTK, -1, -1, 2, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 5, 298, "", 6, 2 },
|
||||
/*147*/ { BARCODE_DBAR_EXPSTK, -1, -1, 3, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 9, 200, "", 4, 3 },
|
||||
/*148*/ { BARCODE_DBAR_EXPSTK, -1, -1, 4, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 13, 151, "", 3, 4 },
|
||||
/*149*/ { BARCODE_DBAR_EXPSTK, -1, -1, 5, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 13, 151, "", 3, 5 },
|
||||
/*150*/ { BARCODE_DBAR_EXPSTK, -1, -1, 6, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 6 },
|
||||
/*151*/ { BARCODE_DBAR_EXPSTK, -1, -1, 7, -1, 0.0f, "[91]12345678901234567890123456789012345678901234567890123456789012", 0, 21, 102, "", 2, 7 },
|
||||
};
|
||||
const int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@@ -1568,11 +1619,15 @@ static void test_input(const testCtx *const p_ctx) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/,
|
||||
-1 /*option_1*/, data[i].option_2, data[i].option_3, -1 /*output_options*/,
|
||||
-1 /*option_1*/, data[i].option_2, data[i].option_3, data[i].output_options,
|
||||
data[i].data, -1, debug);
|
||||
if (data[i].height) {
|
||||
symbol->height = data[i].height;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, TCU(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);
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n",
|
||||
i, symbol->errtxt, data[i].expected_errtxt);
|
||||
|
||||
@@ -1595,6 +1650,56 @@ static void test_input(const testCtx *const p_ctx) {
|
||||
testFinish();
|
||||
}
|
||||
|
||||
/* `combins()` in ISO/IEC 24724:2011 Annex B */
|
||||
/****************************************************************************
|
||||
* dbar_combins(n,r): returns the number of Combinations of r selected from n:
|
||||
* Combinations = n! / (n - r)! * r!
|
||||
****************************************************************************/
|
||||
static int test_generate_dbar_combins(const int n, const int r) {
|
||||
int i;
|
||||
int maxDenom, minDenom;
|
||||
int val = 1, j = 1;
|
||||
|
||||
if (n - r > r) {
|
||||
minDenom = r;
|
||||
maxDenom = n - r;
|
||||
} else {
|
||||
minDenom = n - r;
|
||||
maxDenom = r;
|
||||
}
|
||||
for (i = n; i > maxDenom; i--) {
|
||||
val *= i;
|
||||
if (j <= minDenom) {
|
||||
val /= j;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
for (; j <= minDenom; j++) {
|
||||
val /= j;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
/* Dummy to generate `combins()` */
|
||||
static void test_generate_combins(const testCtx *const p_ctx) {
|
||||
int i, j;
|
||||
|
||||
if (!p_ctx->generate) {
|
||||
return;
|
||||
}
|
||||
|
||||
printf(" static const short combins[18][6] = {\n");
|
||||
for (i = 0; i < 18; i++) {
|
||||
printf(" {% 2d,% 3d,", test_generate_dbar_combins(i, 0), test_generate_dbar_combins(i, 1));
|
||||
for (j = 2; j < 4; j++) {
|
||||
printf("% 4d,", test_generate_dbar_combins(i, j));
|
||||
}
|
||||
printf("% 5d,% 5d }%c /*% 3d */\n",
|
||||
test_generate_dbar_combins(i, 4), test_generate_dbar_combins(i, 5), i == 17 ? ' ' : ',', i);
|
||||
}
|
||||
printf(" };\n");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
testFunction funcs[] = { /* name, func */
|
||||
@@ -1604,6 +1709,7 @@ int main(int argc, char *argv[]) {
|
||||
{ "test_binary_buffer_size", test_binary_buffer_size },
|
||||
{ "test_hrt", test_hrt },
|
||||
{ "test_input", test_input },
|
||||
{ "test_generate_combins", test_generate_combins },
|
||||
};
|
||||
|
||||
testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
|
||||
|
||||
Reference in New Issue
Block a user