mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Merge /u/gitlost/zint/ branch gs1_nocheck_mode into master
https://sourceforge.net/p/zint/code/merge-requests/128/
This commit is contained in:
commit
059abdf6a1
@ -1036,14 +1036,12 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
||||
#endif
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
if ((source[i] != '[') && (source[i] != ']')) {
|
||||
symbol->text[i] = source[i];
|
||||
}
|
||||
if (source[i] == '[') {
|
||||
symbol->text[i] = '(';
|
||||
}
|
||||
if (source[i] == ']') {
|
||||
} else if (source[i] == ']') {
|
||||
symbol->text[i] = ')';
|
||||
} else {
|
||||
symbol->text[i] = source[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1326,7 +1326,8 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
unsigned char padded_pri[21];
|
||||
padded_pri[0] = '\0';
|
||||
if (!ean_leading_zeroes(symbol, (unsigned char *) symbol->primary, padded_pri, &with_addon)) {
|
||||
strcpy(symbol->errtxt, "448: Input wrong length in linear component");
|
||||
sprintf(symbol->errtxt, "448: Input too long (%s) in linear component",
|
||||
with_addon ? "5 character maximum for add-on" : "13 character maximum");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
padded_pri_len = (int) ustrlen(padded_pri);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2019 - 2020 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2019 - 2021 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -34,8 +34,8 @@
|
||||
#include "common.h"
|
||||
#include "general_field.h"
|
||||
|
||||
static char alphanum_puncs[] = "*,-./";
|
||||
static char isoiec_puncs[] = "!\"%&'()*+,-./:;<=>?_ ";
|
||||
static const char alphanum_puncs[] = "*,-./";
|
||||
static const char isoiec_puncs[] = "!\"%&'()*+,-./:;<=>?_ "; /* Note contains space, not in cset82 */
|
||||
|
||||
/* Returns type of char at `i`. FNC1 counted as NUMERIC. Returns 0 if invalid char */
|
||||
static int general_field_type(const char *general_field, const int i) {
|
||||
|
@ -1221,11 +1221,7 @@ INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[]
|
||||
|
||||
if (source[0] != obracket) {
|
||||
strcpy(symbol->errtxt, "252: Data does not start with an AI");
|
||||
if (symbol->warn_level != WARN_ZPL_COMPAT) {
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
} else {
|
||||
error_value = ZINT_WARN_NONCOMPLIANT;
|
||||
}
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
/* Check the position of the brackets */
|
||||
@ -1329,24 +1325,26 @@ INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[]
|
||||
|
||||
strcpy(ai_string, "");
|
||||
|
||||
// Check for valid AI values and data lengths according to GS1 General
|
||||
// Specifications Release 21.0.1, January 2021
|
||||
for (i = 0; i < ai_count; i++) {
|
||||
int err_no, err_posn;
|
||||
char err_msg[50];
|
||||
if (!gs1_lint(ai_value[i], source + data_location[i], data_length[i], &err_no, &err_posn, err_msg)) {
|
||||
if (err_no == 1) {
|
||||
sprintf(symbol->errtxt, "260: Invalid AI (%02d)", ai_value[i]);
|
||||
} else if (err_no == 2 || err_no == 4) { /* 4 is backward-incompatible bad length */
|
||||
sprintf(symbol->errtxt, "259: Invalid data length for AI (%02d)", ai_value[i]);
|
||||
} else {
|
||||
sprintf(symbol->errtxt, "261: AI (%02d) position %d: %s", ai_value[i], err_posn, err_msg);
|
||||
if (!(symbol->input_mode & GS1NOCHECK_MODE)) {
|
||||
// Check for valid AI values and data lengths according to GS1 General
|
||||
// Specifications Release 21.0.1, January 2021
|
||||
for (i = 0; i < ai_count; i++) {
|
||||
int err_no, err_posn;
|
||||
char err_msg[50];
|
||||
if (!gs1_lint(ai_value[i], source + data_location[i], data_length[i], &err_no, &err_posn, err_msg)) {
|
||||
if (err_no == 1) {
|
||||
sprintf(symbol->errtxt, "260: Invalid AI (%02d)", ai_value[i]);
|
||||
} else if (err_no == 2 || err_no == 4) { /* 4 is backward-incompatible bad length */
|
||||
sprintf(symbol->errtxt, "259: Invalid data length for AI (%02d)", ai_value[i]);
|
||||
} else {
|
||||
sprintf(symbol->errtxt, "261: AI (%02d) position %d: %s", ai_value[i], err_posn, err_msg);
|
||||
}
|
||||
/* For backward compatibility only error on unknown AI or bad length */
|
||||
if (err_no == 1 || err_no == 2) {
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
error_value = ZINT_WARN_NONCOMPLIANT;
|
||||
}
|
||||
/* For backward compatibility only error on unknown AI or bad length */
|
||||
if ((err_no == 1 || err_no == 2) && symbol->warn_level != WARN_ZPL_COMPAT) {
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
error_value = ZINT_WARN_NONCOMPLIANT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ static void getRSSwidths(int widths[], int val, int n, const int elements, const
|
||||
/* Set GTIN-14 human readable text */
|
||||
static void rss_set_gtin14_hrt(struct zint_symbol *symbol, const unsigned char *source, const int src_len) {
|
||||
int i;
|
||||
unsigned char hrt[15];
|
||||
unsigned char *hrt = symbol->text + 4;
|
||||
|
||||
ustrcpy(symbol->text, "(01)");
|
||||
for (i = 0; i < 12; i++) {
|
||||
@ -172,8 +172,6 @@ static void rss_set_gtin14_hrt(struct zint_symbol *symbol, const unsigned char *
|
||||
|
||||
hrt[13] = gs1_check_digit(hrt, 13);
|
||||
hrt[14] = '\0';
|
||||
|
||||
ustrcat(symbol->text, hrt);
|
||||
}
|
||||
|
||||
/* Expand from a width pattern to a bit pattern */
|
||||
@ -975,7 +973,7 @@ static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char
|
||||
if ((source[i] < '0') || (source[i] > '9')) {
|
||||
if (source[i] != '[') {
|
||||
/* Something is wrong */
|
||||
strcpy(symbol->errtxt, "385: Invalid character in input data"); // TODO: Better error message
|
||||
strcpy(symbol->errtxt, "385: Invalid character in Compressed Field data (digits only)");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
@ -1073,10 +1071,9 @@ static int rssexp_binary_string(struct zint_symbol *symbol, const unsigned char
|
||||
if (debug) printf("General field data = %s\n", general_field);
|
||||
|
||||
if (j != 0) { /* If general field not empty */
|
||||
|
||||
if (!general_field_encode(general_field, j, &mode, &last_digit, binary_string, &bp)) {
|
||||
/* Invalid character in input data */
|
||||
strcpy(symbol->errtxt, "386: Invalid character in input data"); // TODO: Better error message
|
||||
if (!general_field_encode(general_field, j, &mode, &last_digit, binary_string, &bp)) { /* Failure should never happen */
|
||||
/* Not reachable */
|
||||
strcpy(symbol->errtxt, "386: Invalid character in General Field data");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
@ -1443,15 +1440,12 @@ INTERNAL int rssexpanded_cc(struct zint_symbol *symbol, unsigned char source[],
|
||||
|
||||
/* Add human readable text */
|
||||
for (i = 0; i <= src_len; i++) {
|
||||
if ((source[i] != '[') && (source[i] != ']')) {
|
||||
symbol->text[i] = source[i];
|
||||
if (source[i] == '[') {
|
||||
symbol->text[i] = '(';
|
||||
} else if (source[i] == ']') {
|
||||
symbol->text[i] = ')';
|
||||
} else {
|
||||
if (source[i] == '[') {
|
||||
symbol->text[i] = '(';
|
||||
}
|
||||
if (source[i] == ']') {
|
||||
symbol->text[i] = ')';
|
||||
}
|
||||
symbol->text[i] = source[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
int option_1;
|
||||
char *data;
|
||||
char *composite;
|
||||
@ -150,7 +151,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
};
|
||||
// Verified manually against GS1 General Specifications 21.0.1 (GGS) and ISO/IEC 24723:2010, with noted exceptions, and verified via bwipp_dump.ps against BWIPP
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DBAR_OMNSTK_CC, 1, "0401234567890", "[17]050101[10]ABC123", 0, 11, 56, "GSS Figure 5.1-5. GS1 DataBar Stacked Omnidirectional barcode with a Composite Component",
|
||||
/* 0*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "0401234567890", "[17]050101[10]ABC123", 0, 11, 56, "GSS Figure 5.1-5. GS1 DataBar Stacked Omnidirectional barcode with a Composite Component",
|
||||
"01101100110101110001001100001000000110100111011110101001"
|
||||
"01101101110110001100010100001100001000010110011100101001"
|
||||
"01101101100111000101110001101001100011111010011101101001"
|
||||
@ -162,16 +163,16 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00000101010101010101010101010101010101010101010000000000"
|
||||
"00001000110000101010000000101010111011001111000000000000"
|
||||
"10100111001111010101111111000001000100110000110101000000"
|
||||
},
|
||||
/* 1*/ { BARCODE_DBAR_LTD_CC, 1, "1311234567890", "[17]010615[10]A123456", 0, 6, 79, "GGS Figure 5.11.2-1. (24723:2010 Figure 1) GS1 DataBar Limited Composite symbol with CC-A",
|
||||
},
|
||||
/* 1*/ { BARCODE_DBAR_LTD_CC, -1, 1, "1311234567890", "[17]010615[10]A123456", 0, 6, 79, "GGS Figure 5.11.2-1. (24723:2010 Figure 1) GS1 DataBar Limited Composite symbol with CC-A",
|
||||
"0111100010110110001010011000111110100110011101110100111100111011101001101000000"
|
||||
"0100111110001101001010111000111101111010111101001111011100111011101011101000000"
|
||||
"0100110011010000001010110000111001000110111101111011110010100011101011001000000"
|
||||
"0111100010101000001010010000101110110111111001110011001110010011101010001000000"
|
||||
"0000001100000101010011001110101011010100110010101111000101100110100111000000000"
|
||||
"0101110011111010101100110001010100101011001101010000111010011001011000010100000"
|
||||
},
|
||||
/* 2*/ { BARCODE_GS1_128_CC, 3, "[01]03812345678908", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "GGS Figure 5.11.2-2. GS1-128 Composite symbol with CC-C **NOT SAME** as zint uses encodation '10', same if '0' forced",
|
||||
},
|
||||
/* 2*/ { BARCODE_GS1_128_CC, -1, 3, "[01]03812345678908", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "GGS Figure 5.11.2-2. GS1-128 Composite symbol with CC-C **NOT SAME** as zint uses encodation '10', same if '0' forced",
|
||||
"1111111101010100011110101011110000111101011001111101110111110111010010000010000100010110010000101100001111011110110011011110101001111000111111101000101001"
|
||||
"1111111101010100011111101010001110100001000111101001100101110010000011100001011000100100100111110110001011100001011111011111101010111000111111101000101001"
|
||||
"1111111101010100011101010011111100110001111010001101000101011110000010001111101100010111101101111101001001011000111110011101010001111110111111101000101001"
|
||||
@ -179,8 +180,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1111111101010100011101011100001100101000111111011101011110001001111011111011001000100111100111011101001101101111001000011101011100110000111111101000101001"
|
||||
"0000000001011000110000101000100110010011011011001110110100001100010010001010001001110111101001100100100001011100110110100001000100100001001001110001010000"
|
||||
"0000000110100111001111010111011001101100100100110001001011110011101101110101110110001000010110011011011110100011001001011110111011011110110110001110101100"
|
||||
},
|
||||
/* 3*/ { BARCODE_GS1_128_CC, 3, "[01]93812345678901", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "24723:2010 Figure 2 GS1-128 Composite symbol with 5-row CC-C **NOT SAME** ditto as above",
|
||||
},
|
||||
/* 3*/ { BARCODE_GS1_128_CC, -1, 3, "[01]93812345678901", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "24723:2010 Figure 2 GS1-128 Composite symbol with 5-row CC-C **NOT SAME** ditto as above",
|
||||
"1111111101010100011110101011110000111101011001111101110111110111010010000010000100010110010000101100001111011110110011011110101001111000111111101000101001"
|
||||
"1111111101010100011111101010001110100001000111101001100101110010000011100001011000100100100111110110001011100001011111011111101010111000111111101000101001"
|
||||
"1111111101010100011101010011111100110001111010001101000101011110000010001111101100010111101101111101001001011000111110011101010001111110111111101000101001"
|
||||
@ -188,8 +189,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1111111101010100011101011100001100101000111111011101011110001001111011111011001000100111100111011101001101101111001000011101011100110000111111101000101001"
|
||||
"0000000001011000110000101000100110010011010111000010110100001100010010001010001001110111101001100100100001001100100110100001000100001001001001110001010000"
|
||||
"0000000110100111001111010111011001101100101000111101001011110011101101110101110110001000010110011011011110110011011001011110111011110110110110001110101100"
|
||||
},
|
||||
/* 4*/ { BARCODE_EANX_CC, 1, "331234567890", "[21]1234-abcd", 0, 7, 99, "GGS Figure 5.11.8-1. EAN-13 symbol with a four-column CC-A component (note [21] not [99])",
|
||||
},
|
||||
/* 4*/ { BARCODE_EANX_CC, -1, 1, "331234567890", "[21]1234-abcd", 0, 7, 99, "GGS Figure 5.11.8-1. EAN-13 symbol with a four-column CC-A component (note [21] not [99])",
|
||||
"110110111011010000100000110100110011101100001001110100100001011001100001100111000110001011011000101"
|
||||
"110110110011000110111100010111011001110000101001100100100000010111101001101011100010000011001000101"
|
||||
"110110100010011010001110000111111010001100101001100110111111010001101001010000011011111011101000101"
|
||||
@ -197,8 +198,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101011110100110010011011010000100111010110001010101010000100010010010001110100111001010000101010"
|
||||
},
|
||||
/* 5*/ { BARCODE_EANX_CC, 1, "331234567890", "[99]1234-abcd", 0, 7, 99, "24723:2010 Figure 5 An EAN-13 composite symbol (with CC-A)",
|
||||
},
|
||||
/* 5*/ { BARCODE_EANX_CC, -1, 1, "331234567890", "[99]1234-abcd", 0, 7, 99, "24723:2010 Figure 5 An EAN-13 composite symbol (with CC-A)",
|
||||
"110110111011100110111011110100010100000010001001110100111011010110000001100110010000100011011000101"
|
||||
"110110110011100010011101100111110001000101101001100100100001101011111101101011100010000011001000101"
|
||||
"110110100010001011101111110110011100100011101001100110100000011101011001011110001001000011101000101"
|
||||
@ -206,8 +207,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101011110100110010011011010000100111010110001010101010000100010010010001110100111001010000101010"
|
||||
},
|
||||
/* 6*/ { BARCODE_UPCA_CC, 2, "61414101234", "[91]abcdefghijklmnopqrstuvwxyz", 0, 14, 99, "GGS Figure 5.11.8-2. UPC-A symbol with a four-column CC-B component **NOT SAME** (using [91] not [10] as length > 20 max for [10])",
|
||||
},
|
||||
/* 6*/ { BARCODE_UPCA_CC, -1, 2, "61414101234", "[91]abcdefghijklmnopqrstuvwxyz", 0, 14, 99, "GGS Figure 5.11.8-2. UPC-A symbol with a four-column CC-B component **NOT SAME** (using [91] not [10] as length > 20 max for [10])",
|
||||
"110001001010000001110010110110011111101100101001111010100100101111000001110101001111110011000100101"
|
||||
"111001001011101110101000000111101101000111001011111010100011000110000101110011010000110011100100101"
|
||||
"111101001011110110001101000111101000100000101011110010101001111001000001011111010001110011110100101"
|
||||
@ -222,8 +223,24 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101010111100110010100011001100101000110011001010101110010110011011011001000010101110010000101010"
|
||||
},
|
||||
/* 7*/ { BARCODE_EANX_CC, -1, "1234567", "[21]A12345678", 0, 8, 72, "GGS Figure 5.11.8-3. (24723:2010 Figure 4) EAN-8 symbol with a three-column CC-A",
|
||||
},
|
||||
/* 7*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, 2, "61414101234", "[10]abcdefghijklmnopqrstuvwxyz", 0, 14, 99, "GGS Figure 5.11.8-2. UPC-A symbol with a four-column CC-B component **NOT SAME** as zint uses encodation '10', same if '0' forced",
|
||||
"110001001010000001110010110110011111101100101001111010111000101011111101011010001110000011000100101"
|
||||
"111001001010110011100011000100010000100000101011111010111000111010010001011000111101110011100100101"
|
||||
"111101001011000001000111010111010000110100001011110010111011001111001101110101100000010011110100101"
|
||||
"111101011010001000100011110101111101111011101011110110100011111011001001000001010011110011110101101"
|
||||
"111101010010111011100001000101000110000110001001110110101001100110000001000100000010100011110101001"
|
||||
"111001010010111110110011110100010111111011101001110100110100111000001001101011100010000011100101001"
|
||||
"111011010011101000101111110100111100010010001001100100111000010111110101110100010111111011101101001"
|
||||
"111010010011010010001100000100001011100011101001100110100111101111010001110011100010100011101001001"
|
||||
"111010011011110010100100000110000001011100101001000110101101011111100001110010011101100011101001101"
|
||||
"111010111010111000100000110111110110111100101001000010101110000011011101011100001101110011101011101"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101010111100110010100011001100101000110011001010101110010110011011011001000010101110010000101010"
|
||||
},
|
||||
/* 8*/ { BARCODE_EANX_CC, -1, -1, "1234567", "[21]A12345678", 0, 8, 72, "GGS Figure 5.11.8-3. (24723:2010 Figure 4) EAN-8 symbol with a three-column CC-A",
|
||||
"101001111000001001010011000111110101110111101001101001111110011101001101"
|
||||
"111110010011100101010111000101110011011100001111110100011001011101011101"
|
||||
"110011001000010001010110000101000001000010001001000110110000011101011001"
|
||||
@ -232,8 +249,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000010000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000010100110010010011011110101000110101010011101010000100010011100101010"
|
||||
},
|
||||
/* 8*/ { BARCODE_UPCE_CC, 1, "0121230", "[15]021231", 0, 9, 55, "GGS Figure 5.11.8-4. (24723:2010 Figure 3) UPC-E symbol with a two-column CC-A",
|
||||
},
|
||||
/* 9*/ { BARCODE_UPCE_CC, -1, 1, "0121230", "[15]021231", 0, 9, 55, "GGS Figure 5.11.8-4. (24723:2010 Figure 3) UPC-E symbol with a two-column CC-A",
|
||||
"1101100110111010011111010001100111100010110011110101001"
|
||||
"1101101110110010010000110001101000011011100011100101001"
|
||||
"1101101100111101001000000101000101111000010011101101001"
|
||||
@ -243,15 +260,15 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001"
|
||||
"0001000000000000000000000000000000000000000000000000010"
|
||||
"0001010110011001001100110010011011011110101001110101010"
|
||||
},
|
||||
/* 9*/ { BARCODE_DBAR_OMN_CC, 1, "0361234567890", "[11]990102", 0, 5, 100, "GGS Figure 5.11.8-5. (24723:2010 Figure 8) GS1 DataBar Omnidirectional symbol with a four-column CC-A",
|
||||
},
|
||||
/* 10*/ { BARCODE_DBAR_OMN_CC, -1, 1, "0361234567890", "[11]990102", 0, 5, 100, "GGS Figure 5.11.8-5. (24723:2010 Figure 8) GS1 DataBar Omnidirectional symbol with a four-column CC-A",
|
||||
"1101101110110000101000110001111001010111100010011101001110011101100110011001001100111000110110001010"
|
||||
"1101101100110111011111001001000011010111111010011001001101000000111010010010111111001110110010001010"
|
||||
"1101101000110010010111110001011001101111000010011001101111010011110010010000011001011100111010001010"
|
||||
"0000000000010110001110100000000101001011010111111011001101010000011010000000010100101000110011110000"
|
||||
"0000010011101001110001001111111000010100101000000100110010101111100101111111100011010111001100001101"
|
||||
},
|
||||
/*10*/ { BARCODE_DBAR_STK_CC, 1, "0341234567890", "[17]010200", 0, 9, 56, "GGS Figure 5.11.8-6. (24723:2010 Figure 6) GS1 DataBar Stacked symbol with a two-column CC-A",
|
||||
},
|
||||
/* 11*/ { BARCODE_DBAR_STK_CC, -1, 1, "0341234567890", "[17]010200", 0, 9, 56, "GGS Figure 5.11.8-6. (24723:2010 Figure 6) GS1 DataBar Stacked symbol with a two-column CC-A",
|
||||
"01101100110101110011100111101010000100001111011110101001"
|
||||
"01101101110110110001000010001110111101100100011100101001"
|
||||
"01101101100110100001111011001111110011010110011101101001"
|
||||
@ -261,8 +278,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"01001110100100011101111100000001011111010010100010000000"
|
||||
"00000011010111101010000010101010101001001101010000000000"
|
||||
"10101100111000010101111111110111000110110011100101000000"
|
||||
},
|
||||
/*11*/ { BARCODE_DBAR_LTD_CC, 2, "0351234567890", "[91]abcdefghijklmnopqrstuv", 0, 17, 88, "GGS Figure 5.11.8-7. (24723:2010 Figure 7) GS1 DataBar Limited symbol with a three-column CC-B **NOT SAME** (using [91] not [21] as length > 20 max for [21])",
|
||||
},
|
||||
/* 12*/ { BARCODE_DBAR_LTD_CC, -1, 2, "0351234567890", "[91]abcdefghijklmnopqrstuv", 0, 17, 88, "GGS Figure 5.11.8-7. (24723:2010 Figure 7) GS1 DataBar Limited symbol with a three-column CC-B **NOT SAME** (using [91] not [21] as length > 20 max for [21])",
|
||||
"1101110100111011111011101001011000100100000100001000101111101101001111011011101001000000"
|
||||
"1101100100111111010100111001011000110111101100001100101010000111100010011011001001000000"
|
||||
"1101100110100111100001001001010000110111011100101111001101110010001110011011001101000000"
|
||||
@ -280,23 +297,42 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1101000010111110100111010001011011100100101100011111001011111011100011011010000101000000"
|
||||
"0000000000000111101110001101000111010101011010100110010111010010011100011010111000000000"
|
||||
"0000000000101000010001110010111000101010100101011001101000101101100011100101000010100000"
|
||||
},
|
||||
/*12*/ { BARCODE_DBAR_EXP_CC, 1, "[01]93712345678904[3103]001234", "[91]1A2B3C4D5E", 0, 5, 151, "GGS Figure 5.11.8-8. (24723:2010 Figure 9) GS1 DataBar Expanded symbol with a four-column CC-A, same, verified against BWIPP and tec-it",
|
||||
},
|
||||
/* 13*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, 2, "0351234567890", "[21]abcdefghijklmnopqrstuv", 0, 17, 88, "GGS Figure 5.11.8-7. (24723:2010 Figure 7) GS1 DataBar Limited symbol with a three-column CC-B, same",
|
||||
"1101110100111011111011101001011000100100000100001000101111010011011111011011101001000000"
|
||||
"1101100100101111100101110001011000110111110001010011001111101100001001011011001001000000"
|
||||
"1101100110101111000110110001010000110111011100101111001101110010001110011011001101000000"
|
||||
"1101101110111010000010011101010001110111010000100111001000011001100100011011011101000000"
|
||||
"1101101100111101001000000101010001100100011011111001001111101100100010011011011001000000"
|
||||
"1101101000101111100111001101010011100101111100011101101000101000011110011011010001000000"
|
||||
"1101001000100011011010000001010011000100010000001000101101011100011110011010010001000000"
|
||||
"1101011000101001111110011101010111000111101001010000001110101100100000011010110001000000"
|
||||
"1101011100110100001001111101010110000101111000111011101011100000100110011010111001000000"
|
||||
"1101011110110001101100001101010010000100110011101100001101110001110011011010111101000000"
|
||||
"1101001110110100001110000101011010000100100111101000001011110010001111011010011101000000"
|
||||
"1101001100111001101011111001001010000111000101111100101011111011000001011010011001000000"
|
||||
"1101000100110100010001100001001011000111101001001111001001001111011110011010001001000000"
|
||||
"1101000110100010001111000101001011100111011011100000101111100110101000011010001101000000"
|
||||
"1101000010111110010111000101011011100100001001011110001011111000110100011010000101000000"
|
||||
"0000000000000111101110001101000111010101011010100110010111010010011100011010111000000000"
|
||||
"0000000000101000010001110010111000101010100101011001101000101101100011100101000010100000"
|
||||
},
|
||||
/* 14*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]93712345678904[3103]001234", "[91]1A2B3C4D5E", 0, 5, 151, "GGS Figure 5.11.8-8. (24723:2010 Figure 9) GS1 DataBar Expanded symbol with a four-column CC-A, same, verified against BWIPP and tec-it",
|
||||
"0011011011101110011010011000011100011100110110100111010011010001000011000101101110011000001101100010100000000000000000000000000000000000000000000000000"
|
||||
"0011011011001101110111110100011010001111001100100110010010111111001001100100101111110011101100100010100000000000000000000000000000000000000000000000000"
|
||||
"0011011010001010111011111100011111011011110010100110011011000011010011110100001011001111101110100010100000000000000000000000000000000000000000000000000"
|
||||
"0000011011111011000100000000101001010000011101001110100110001100111101000010101000011010001110001000100001010000111001010000001010010111000110010110000"
|
||||
"0101100100000100111011111111000010101111100010110001011001110011000010111100000011100101110001110111011110101111000110001111110000101000111001101000010"
|
||||
},
|
||||
/*13*/ { BARCODE_GS1_128_CC, 1, "[01]03212345678906", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, "GGS Figure 5.11.8-9. (24723:2010 Figure 11) GS1-128 symbol with a four-column CC-A",
|
||||
},
|
||||
/* 15*/ { BARCODE_GS1_128_CC, -1, 1, "[01]03212345678906", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, "GGS Figure 5.11.8-9. (24723:2010 Figure 11) GS1-128 symbol with a four-column CC-A",
|
||||
"0000000000000000000001101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010000000000000000000000000"
|
||||
"0000000000000000000001101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010000000000000000000000000"
|
||||
"0000000000000000000001101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010000000000000000000000000"
|
||||
"0000000000000000000001101011110111000111011011001110010001011100010111000101011000011100110010000100000100010110111101010000000000000000000000000"
|
||||
"0010110001100001010001001100100110110110011100100011011000100100010100010011101111010011001001000010110011011100010100001000100010010011100010100"
|
||||
"1101001110011110101110110011011001001001100011011100100111011011101011101100010000101100110110111101001100100011101011110111011101101100011101011"
|
||||
},
|
||||
/*14*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]00012345678905[10]ABCDEF", "[21]12345678", 0, 13, 102, "24723:2010 Figure 10 — A GS1 DataBar Expanded Stacked Composite symbol (with CC-A) **NOT SAME** bottom 1st and top 2nd linear row separators different; zint same as BWIPP and hard to see how figure in standard could be correct",
|
||||
},
|
||||
/* 16*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]00012345678905[10]ABCDEF", "[21]12345678", 0, 13, 102, "24723:2010 Figure 10 — A GS1 DataBar Expanded Stacked Composite symbol (with CC-A) **NOT SAME** bottom 1st and top 2nd linear row separators different; zint same as BWIPP and hard to see how figure in standard could be correct",
|
||||
"001101101110110100001000001101001100111011000010011101001000110011100110010100111011100000110110001010"
|
||||
"001101101100101111110100011001111101101000001010011001001011111011011110011010111000100000110010001010"
|
||||
"001101101000100101001111000001000111011101111010011001101011110110110000011010001011111000111010001010"
|
||||
@ -310,8 +346,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000000111001111101010100001010100101011111000010100000000000000000000000000000000000000000000000000000"
|
||||
"010111000110000010100011110000001010100000111101000100000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/*15*/ { BARCODE_GS1_128_CC, 3, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, 7, 174, "24723:2010 Figure 12 — A GS1-128 Composite symbol (with CC-C)",
|
||||
},
|
||||
/* 17*/ { BARCODE_GS1_128_CC, -1, 3, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, 7, 174, "24723:2010 Figure 12 — A GS1-128 Composite symbol (with CC-C)",
|
||||
"111111110101010001111010101111000011010111011110000111011111011101001000001000010001011110101100111110111010010001110001000100011000011011111010100111110111111101000101001000"
|
||||
"111111110101010001111110101000111010000100111101000110011110101111101111010001010000011111000110010100111001011100011001001001111101100011111101010111000111111101000101001000"
|
||||
"111111110101010001010100011110000011001111100001010110100010111110001110111101011100011000001101011110101111001000000101100001011111101011101010001111110111111101000101001000"
|
||||
@ -319,8 +355,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"111111110101010001110101110000110011111010100011000100100001111000101110000001011001011110010110001100111100101101100001111011000110100011101011100110000111111101000101001000"
|
||||
"000000000101100011000010100010010011001101101100111001100100110001001000101000100111011110100110010010000100110010011000100100010011101011101000010001000100001010011100010100"
|
||||
"000000011010011100111101011101101100110010010011000110011011001110110111010111011000100001011001101101111011001101100111011011101100010100010111101110111011110101100011101011"
|
||||
},
|
||||
/*16*/ { BARCODE_DBAR_STK_CC, 1, "12345678901231", "[91]12345678901234567890", 0, 10, 56, "Example with CC-A 2 cols, 6 rows",
|
||||
},
|
||||
/* 18*/ { BARCODE_DBAR_STK_CC, -1, 1, "12345678901231", "[91]12345678901234567890", 0, 10, 56, "Example with CC-A 2 cols, 6 rows",
|
||||
"01100100010111100110100111001011101110001000011100101101"
|
||||
"01110100010110001011101000001000111010111110011000101101"
|
||||
"01110110010110101100111111001000111100001001011000101001"
|
||||
@ -331,8 +367,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"01001001110011100100011111111001010010001111011010000000"
|
||||
"00000110001101011010101010101010101101010000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*17*/ { BARCODE_DBAR_OMNSTK_CC, 1, "12345678901231", "[91]1234567890123456789012", 0, 13, 56, "Example with CC-A 2 cols, 7 rows",
|
||||
},
|
||||
/* 19*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "12345678901231", "[91]1234567890123456789012", 0, 13, 56, "Example with CC-A 2 cols, 7 rows",
|
||||
"01110110110100100011111001101110001011100110011100010101"
|
||||
"01110010110111000110101111101001111100110010011000010101"
|
||||
"01100010110111010110011110001110001110110011011000110101"
|
||||
@ -346,8 +382,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00000101010101010101010101010101010101010101010000000000"
|
||||
"00000110000101111010010101010000111101011000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*18*/ { BARCODE_UPCE_CC, 1, "1234567", "[91]1234567890123456789012345678", 0, 12, 55, "Example with CC-A 3 cols, 8 rows",
|
||||
},
|
||||
/* 20*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[91]1234567890123456789012345678", 0, 12, 55, "Example with CC-A 3 cols, 8 rows",
|
||||
"1110111010100100011111001101110001011100110011011011101"
|
||||
"1110011010111000110101111101001111100110010011011011001"
|
||||
"1111011010111010110011110001110001110110011011011010001"
|
||||
@ -360,8 +396,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001"
|
||||
"0001000000000000000000000000000000000000000000000000010"
|
||||
"0001010010011011110101000110111001000010100100010101010"
|
||||
},
|
||||
/*19*/ { BARCODE_DBAR_STK_CC, 1, "12345678901231", "[91]1234567890123456789012345678901", 0, 13, 56, "Example with CC-A 2 cols, 9 rows",
|
||||
},
|
||||
/* 21*/ { BARCODE_DBAR_STK_CC, -1, 1, "12345678901231", "[91]1234567890123456789012345678901", 0, 13, 56, "Example with CC-A 2 cols, 9 rows",
|
||||
"01100011010100100011111001101110001011100110011010111101"
|
||||
"01100010010111000110101111101001111100110010011010011101"
|
||||
"01110010010111010110011110001110001110110011011010011001"
|
||||
@ -375,8 +411,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"01001001110011100100011111111001010010001111011010000000"
|
||||
"00000110001101011010101010101010101101010000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*20*/ { BARCODE_DBAR_OMNSTK_CC, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 16, 56, "Example with CC-A 2 cols, 10 rows",
|
||||
},
|
||||
/* 22*/ { BARCODE_DBAR_OMNSTK_CC, -1, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 16, 56, "Example with CC-A 2 cols, 10 rows",
|
||||
"01101001000111100110100111001011101110001000011101001101"
|
||||
"01101011000110001011101000001000111010111110011101011101"
|
||||
"01101011100110101100111111001000111100001001011101011001"
|
||||
@ -393,8 +429,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00000101010101010101010101010101010101010101010000000000"
|
||||
"00000110000101111010010101010000111101011000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*21*/ { BARCODE_UPCE_CC, 1, "1234567", "[91]123456789012345678901234567890123456789012334", 0, 16, 55, "Example with CC-A 2 cols, 12 rows",
|
||||
},
|
||||
/* 23*/ { BARCODE_UPCE_CC, -1, 1, "1234567", "[91]123456789012345678901234567890123456789012334", 0, 16, 55, "Example with CC-A 2 cols, 12 rows",
|
||||
"1110010100100100011111001101110001011100110011011000101"
|
||||
"1110110100111000110101111101001111100110010011001000101"
|
||||
"1110100100111010110011110001110001110110011011101000101"
|
||||
@ -411,8 +447,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001"
|
||||
"0001000000000000000000000000000000000000000000000000010"
|
||||
"0001010010011011110101000110111001000010100100010101010"
|
||||
},
|
||||
/*22*/ { BARCODE_DBAR_LTD_CC, 1, "12345678901231", "[91]1234567890123456789012345", 0, 7, 79, "Example with CC-A 3 cols, 5 rows",
|
||||
},
|
||||
/* 24*/ { BARCODE_DBAR_LTD_CC, -1, 1, "12345678901231", "[91]1234567890123456789012345", 0, 7, 79, "Example with CC-A 3 cols, 5 rows",
|
||||
"0111100110100111001001101000101110111000100001011101110010000011000010101000000"
|
||||
"0100011101011111001011101000111010110010000001100111101011111011000110101000000"
|
||||
"0101100111011111001011001000110110000010111101110001011111001011000100101000000"
|
||||
@ -420,8 +456,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0111110101011000001011000100110001011110001101101110111110100011110100101000000"
|
||||
"0000101110100000101011100000101010100011011010110101011010111110001110000000000"
|
||||
"0101010001011111010100011111010101011100100101001010100101000001110001110100000"
|
||||
},
|
||||
/*23*/ { BARCODE_EANX_CC, 1, "1234567", "[91]1234567890123456789012345678901", 0, 10, 72, "Example with CC-A 3 cols, 6 rows",
|
||||
},
|
||||
/* 25*/ { BARCODE_EANX_CC, -1, 1, "1234567", "[91]1234567890123456789012345678901", 0, 10, 72, "Example with CC-A 3 cols, 6 rows",
|
||||
"100100011111001101011000100111000101110011001100010111010000011110100101"
|
||||
"100111110011001001011000110110101100111111001000111100001001011110101101"
|
||||
"111100100010111101010000110111011000001011001000010100001000011110101001"
|
||||
@ -432,8 +468,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000010000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000010100110010010011011110101000110101010011101010000100010011100101010"
|
||||
},
|
||||
/*24*/ { BARCODE_DBAR_LTD_CC, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 9, 79, "Example with CC-A 3 cols, 7 rows",
|
||||
},
|
||||
/* 26*/ { BARCODE_DBAR_LTD_CC, -1, 1, "12345678901231", "[91]1234567890123456789012345678901234567", 0, 9, 79, "Example with CC-A 3 cols, 7 rows",
|
||||
"0100010001101111101011010000110001101000111101110001101011111011001010001000000"
|
||||
"0110000010011011101001010000111010110011110001110001110110011011001011001000000"
|
||||
"0110010111101100001001011000100100001111000101110001011101100011001011101000000"
|
||||
@ -443,8 +479,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0101000110001111101011001110101100110011110001001101101111000011100101101000000"
|
||||
"0000101110100000101011100000101010100011011010110101011010111110001110000000000"
|
||||
"0101010001011111010100011111010101011100100101001010100101000001110001110100000"
|
||||
},
|
||||
/*25*/ { BARCODE_UPCA_CC, 1, "12345678901", "[91]12345678901234567890", 0, 7, 99, "Example with CC-A 4 cols, 3 rows",
|
||||
},
|
||||
/* 27*/ { BARCODE_UPCA_CC, -1, 1, "12345678901", "[91]12345678901234567890", 0, 7, 99, "Example with CC-A 4 cols, 3 rows",
|
||||
"110110111011110011010011100101110111000100001001110100101110111001000001100000100110111011011000101"
|
||||
"110110110011101011001000000110011110101111101001100100110010111101100001110010111011000011001000101"
|
||||
"110110100010011101000001100100111111011101001001100110111111001011010001000001100010111011101000101"
|
||||
@ -452,16 +488,16 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101001100100100110111101010001101100010101111010101000100100100011101001110010110011011011001010"
|
||||
},
|
||||
/*26*/ { BARCODE_DBAR_OMN_CC, 1, "12345678901231", "[91]1234567890123456789012345678", 0, 6, 100, "Example with CC-A 4 cols, 4 rows",
|
||||
},
|
||||
/* 28*/ { BARCODE_DBAR_OMN_CC, -1, 1, "12345678901231", "[91]1234567890123456789012345678", 0, 6, 100, "Example with CC-A 4 cols, 4 rows",
|
||||
"1101001000111100110100111001011101110001000010010001101011101110010000011000001001101110111011001010"
|
||||
"1101011000111010110010000001100111101011111010010000101100101111011000011011011110000100110011001010"
|
||||
"1101011100100011111011001001000000100101111010110000101100011111010010011000110101111000110111001010"
|
||||
"1101011110100011011001000001110011100010001010111000101101111011110011011100101000111000110111101010"
|
||||
"0000000001100011000110101000000001001011011100001001010110000101111010010101010000111101011000100000"
|
||||
"0000010010011100111001000111111110010100100011110110101001111010000101100000000111000010100111011101"
|
||||
},
|
||||
/*27*/ { BARCODE_DBAR_EXP_CC, 1, "[01]12345678901231", "[91]1234567890123456789012345678901234567", 0, 7, 134, "Example with CC-A 4 cols, 5 rows",
|
||||
},
|
||||
/* 29*/ { BARCODE_DBAR_EXP_CC, -1, 1, "[01]12345678901231", "[91]1234567890123456789012345678901234567", 0, 7, 134, "Example with CC-A 4 cols, 5 rows",
|
||||
"00110101111011110011010011100101110111000100001011100010101110111001000001100000100110111011011110101000000000000000000000000000000000"
|
||||
"00110100111011101011001000000110011110101111101011100110110010111101100001001000011110001011001110101000000000000000000000000000000000"
|
||||
"00110100110010001101001110000110001010011111001011100100101111100001100101000111100010100011101110101000000000000000000000000000000000"
|
||||
@ -469,8 +505,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00110100011011001011110110000100111001001111101001101100111110011000101001001101111110011011110110101000000000000000000000000000000000"
|
||||
"00001011100111110001000000001010010011000000101001100011100100111011010000101010000111000011110101001101011110000010010100000010100000"
|
||||
"01010100011000001110111111110000101100111111010110011100011011000100101111000000111000111100001010110010100001111101100011111100001010"
|
||||
},
|
||||
/*28*/ { BARCODE_DBAR_EXPSTK_CC, 1, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345", 0, 12, 102, "Example with CC-A 4 cols, 6 rows",
|
||||
},
|
||||
/* 30*/ { BARCODE_DBAR_EXPSTK_CC, -1, 1, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345", 0, 12, 102, "Example with CC-A 4 cols, 6 rows",
|
||||
"001100010110111100110100111001011101110001000010011100101011101110010000011000001001101110110101111010"
|
||||
"001100010100111010110010000001100111101011111010011110101100101111011000010010000111100010110100111010"
|
||||
"001100110100100011010011100001100010100111110010111110101011111000011001010001111000101000110100110010"
|
||||
@ -483,8 +519,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000000101111000001001010000001010010111100111110110000000000000000000000000000000000000000000000000000"
|
||||
"001001010000111110110001111110000101000011000001001010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/*29*/ { BARCODE_EANX_CC, 1, "123456789012", "[91]123456789012345678901234567890123456789012345678901234", 0, 11, 99, "Example with CC-A 4 cols, 7 rows",
|
||||
},
|
||||
/* 31*/ { BARCODE_EANX_CC, -1, 1, "123456789012", "[91]123456789012345678901234567890123456789012345678901234", 0, 11, 99, "Example with CC-A 4 cols, 7 rows",
|
||||
"110010111010010001111100110111000101110011001000011010110001011101000001000111010111110011011011001"
|
||||
"110010011011010110011111100100011110000100101000111010101100111011111001011100010011000011011010001"
|
||||
"110011011011011101110011000101100011010000001000110010111101111001001001100001101100011011010010001"
|
||||
@ -496,8 +532,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010"
|
||||
},
|
||||
/*30*/ { BARCODE_UPCE_CC, 2, "1234567", "[91]1234567890123", 0, 12, 55, "Example with CC-B 2 cols, 8 rows",
|
||||
},
|
||||
/* 32*/ { BARCODE_UPCE_CC, -1, 2, "1234567", "[91]1234567890123", 0, 12, 55, "Example with CC-B 2 cols, 8 rows",
|
||||
"1100100010111011111011101001000001000010001011001000101"
|
||||
"1110100010110100001111011001100101110000100011101000101"
|
||||
"1110110010101100100111000001011111011000001011101100101"
|
||||
@ -510,8 +546,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001"
|
||||
"0001000000000000000000000000000000000000000000000000010"
|
||||
"0001010010011011110101000110111001000010100100010101010"
|
||||
},
|
||||
/*31*/ { BARCODE_DBAR_STK_CC, 2, "12345678901231", "[91]123456789012345678901234567", 0, 15, 56, "Example with CC-B 2 cols, 11 rows",
|
||||
},
|
||||
/* 33*/ { BARCODE_DBAR_STK_CC, -1, 2, "12345678901231", "[91]123456789012345678901234567", 0, 15, 56, "Example with CC-B 2 cols, 11 rows",
|
||||
"01100100010111011111011101001000001000010001011100110101"
|
||||
"01110100010110100001111011001100101110000100011110110101"
|
||||
"01110110010101100100111000001011111011000001011110010101"
|
||||
@ -527,8 +563,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"01001001110011100100011111111001010010001111011010000000"
|
||||
"00000110001101011010101010101010101101010000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*32*/ { BARCODE_DBAR_OMNSTK_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123", 0, 20, 56, "Example with CC-B 2 cols, 14 rows",
|
||||
},
|
||||
/* 34*/ { BARCODE_DBAR_OMNSTK_CC, -1, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123", 0, 20, 56, "Example with CC-B 2 cols, 14 rows",
|
||||
"01110111010100011111010011101101111110101110011101110101"
|
||||
"01110011010100100101111000001001000100001111011100110101"
|
||||
"01111011010101101111001110001111011110101000011110110101"
|
||||
@ -549,8 +585,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00000101010101010101010101010101010101010101010000000000"
|
||||
"00000110000101111010010101010000111101011000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*33*/ { BARCODE_UPCE_CC, 2, "1234567", "[91]123456789012345678901234567890123456789012345678901234567", 0, 21, 55, "Example with CC-B 2 cols, 17 rows",
|
||||
},
|
||||
/* 35*/ { BARCODE_UPCE_CC, -1, 2, "1234567", "[91]123456789012345678901234567890123456789012345678901234567", 0, 21, 55, "Example with CC-B 2 cols, 17 rows",
|
||||
"1100110100100000011100101101100111111011001011001101001"
|
||||
"1101110100111110110100111101110110010000110011011101001"
|
||||
"1101100100111001011001000001110001101110100011011001001"
|
||||
@ -572,8 +608,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001"
|
||||
"0001000000000000000000000000000000000000000000000000010"
|
||||
"0001010010011011110101000110111001000010100100010101010"
|
||||
},
|
||||
/*34*/ { BARCODE_DBAR_STK_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890", 0, 24, 56, "Example with CC-B 2 cols, 20 rows",
|
||||
},
|
||||
/* 36*/ { BARCODE_DBAR_STK_CC, -1, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890", 0, 24, 56, "Example with CC-B 2 cols, 20 rows",
|
||||
"01111010100111011111011101001000001000010001011110101001"
|
||||
"01110010100110100001111011001100101110000100011100101001"
|
||||
"01110110100101100100111000001011111011000001011101101001"
|
||||
@ -598,8 +634,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"01001001110011100100011111111001010010001111011010000000"
|
||||
"00000110001101011010101010101010101101010000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*35*/ { BARCODE_DBAR_OMNSTK_CC, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 29, 56, "Example with CC-B 2 cols, 23 rows",
|
||||
},
|
||||
/* 37*/ { BARCODE_DBAR_OMNSTK_CC, -1, 2, "12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 29, 56, "Example with CC-B 2 cols, 23 rows",
|
||||
"01110011010100000011100101101100111111011001011110100101"
|
||||
"01111011010111110110100111101110110010000110011110101101"
|
||||
"01111001010111001011001000001110001101110100011110101001"
|
||||
@ -629,8 +665,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00000101010101010101010101010101010101010101010000000000"
|
||||
"00000110000101111010010101010000111101011000100000000000"
|
||||
"10101001111010000101100000000111000010100111011101000000"
|
||||
},
|
||||
/*36*/ { BARCODE_UPCE_CC, 2, "1234567", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 30, 55, "Example with CC-B 2 cols, 26 rows",
|
||||
},
|
||||
/* 38*/ { BARCODE_UPCE_CC, -1, 2, "1234567", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 30, 55, "Example with CC-B 2 cols, 26 rows",
|
||||
"1100101000100000011100101101000001111001010011000101001"
|
||||
"1100101100111110110100111101110110010000110011001101001"
|
||||
"1100101110111001011001000001110001101110100011011101001"
|
||||
@ -661,8 +697,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001"
|
||||
"0001000000000000000000000000000000000000000000000000010"
|
||||
"0001010010011011110101000110111001000010100100010101010"
|
||||
},
|
||||
/*37*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]123456", 0, 8, 88, "Example with CC-B 3 cols, 6 rows",
|
||||
},
|
||||
/* 39*/ { BARCODE_DBAR_LTD_CC, -1, 2, "12345678901231", "[91]123456", 0, 8, 88, "Example with CC-B 3 cols, 6 rows",
|
||||
"1100100010111011111011101001011001110100000100001000101110100001000111011001000101000000"
|
||||
"1110100010111010111101110001001001110101000011110010001101011100000010011101000101000000"
|
||||
"1110110010110011010000111101001101110110111110100010001011001001110000011101100101000000"
|
||||
@ -671,8 +707,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1101111010100111100100100001000110110100001111001101101011100111001111011011110101000000"
|
||||
"0000000000000101110100000101011100000101010100011011010110101011010111110001110000000000"
|
||||
"0000000000101010001011111010100011111010101011100100101001010100101000001110001110100000"
|
||||
},
|
||||
/*38*/ { BARCODE_EANX_CC, 2, "1234567", "[91]123456789012345678", 0, 12, 82, "Example with CC-B 3 cols, 8 rows",
|
||||
},
|
||||
/* 40*/ { BARCODE_EANX_CC, -1, 2, "1234567", "[91]123456789012345678", 0, 12, 82, "Example with CC-B 3 cols, 8 rows",
|
||||
"1100111010111011111011101001000010110100000100001000101111101101001111011001110101"
|
||||
"1110111010110010111000010001000010010111001011001000001110001101110100011101110101"
|
||||
"1110011010110111111001101001000011010101000101111000001100100110111111011100110101"
|
||||
@ -685,8 +721,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000000000000100000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"0000000000000010000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"0000000000000010100110010010011011110101000110101010011101010000100010011100101010"
|
||||
},
|
||||
/*39*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]12345678901234567890123456789", 0, 12, 88, "Example with CC-B 3 cols, 10 rows",
|
||||
},
|
||||
/* 41*/ { BARCODE_DBAR_LTD_CC, -1, 2, "12345678901231", "[91]12345678901234567890123456789", 0, 12, 88, "Example with CC-B 3 cols, 10 rows",
|
||||
"1100010010100000011100101101001111010110011111101100101001001011110000011000100101000000"
|
||||
"1110010010111011001000011001011111010101101111001110001111011110101000011100100101000000"
|
||||
"1111010010110001110111110101011110010111010001110001101110110011110011011110100101000000"
|
||||
@ -699,8 +735,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1110101110110111110100010001001000010101111001100001101101110100111000011101011101000000"
|
||||
"0000000000000101110100000101011100000101010100011011010110101011010111110001110000000000"
|
||||
"0000000000101010001011111010100011111010101011100100101001010100101000001110001110100000"
|
||||
},
|
||||
/*40*/ { BARCODE_EANX_CC, 2, "1234567", "[91]12345678901234567890123456789012345678901", 0, 16, 82, "Example with CC-B 3 cols, 12 rows",
|
||||
},
|
||||
/* 42*/ { BARCODE_EANX_CC, -1, 2, "1234567", "[91]12345678901234567890123456789012345678901", 0, 16, 82, "Example with CC-B 3 cols, 12 rows",
|
||||
"1110101100111011111011101001011000010100000100001000101111101101001111011101011001"
|
||||
"1110101000110010111000010001011100010111001011001000001110001101110100011101010001"
|
||||
"1100101000110111111001101001011100110110010110011111101100110010001111011001010001"
|
||||
@ -717,8 +753,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000000000000100000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"0000000000000010000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"0000000000000010100110010010011011110101000110101010011101010000100010011100101010"
|
||||
},
|
||||
/*41*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 17, 88, "Example with CC-B 3 cols, 15 rows",
|
||||
},
|
||||
/* 43*/ { BARCODE_DBAR_LTD_CC, -1, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 17, 88, "Example with CC-B 3 cols, 15 rows",
|
||||
"1101110100111011111011101001011000100100000100001000101111101101001111011011101001000000"
|
||||
"1101100100110010111000010001011000110111001011001000001110001101110100011011001001000000"
|
||||
"1101100110110111111001101001010000110110010110011111101100110010001111011011001101000000"
|
||||
@ -736,8 +772,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1101000010101111110011101001011011100111011010111110001100010111111010011010000101000000"
|
||||
"0000000000000101110100000101011100000101010100011011010110101011010111110001110000000000"
|
||||
"0000000000101010001011111010100011111010101011100100101001010100101000001110001110100000"
|
||||
},
|
||||
/*42*/ { BARCODE_EANX_CC, 2, "1234567", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]12345678901234567890123", 0, 30, 82, "Example with CC-B 3 cols, 26 rows",
|
||||
},
|
||||
/* 44*/ { BARCODE_EANX_CC, -1, 2, "1234567", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]12345678901234567890123", 0, 30, 82, "Example with CC-B 3 cols, 26 rows",
|
||||
"1100100010111011111011101001000011010100000100001000101111101101001111011110100101"
|
||||
"1110100010110010111000010001000111010111001011001000001110001101110100011110101101"
|
||||
"1110110010110111111001101001000110010110010110011111101100110010001111011110101001"
|
||||
@ -768,8 +804,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000000000000100000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"0000000000000010000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"0000000000000010100110010010011011110101000110101010011101010000100010011100101010"
|
||||
},
|
||||
/*43*/ { BARCODE_DBAR_LTD_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901", 0, 46, 88, "Example with CC-B 3 cols, 44 rows",
|
||||
},
|
||||
/* 45*/ { BARCODE_DBAR_LTD_CC, -1, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901", 0, 46, 88, "Example with CC-B 3 cols, 44 rows",
|
||||
"1100100010111011111011101001011000010110001110001101001111101101001111011010001001000000"
|
||||
"1110100010110010111000010001011100010111001011001000001110001101110100011010001101000000"
|
||||
"1110110010110111111001101001011100110110010110011111101100110010001111011010000101000000"
|
||||
@ -816,8 +852,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1101011000110000100111101101011111010111100010100001001100001011100010011011011101000000"
|
||||
"0000000000000101110100000101011100000101010100011011010110101011010111110001110000000000"
|
||||
"0000000000101010001011111010100011111010101011100100101001010100101000001110001110100000"
|
||||
},
|
||||
/*44*/ { BARCODE_UPCA_CC, 2, "12345678901", "[91]1234567890123", 0, 8, 99, "Example with CC-B 4 cols, 4 rows",
|
||||
},
|
||||
/* 46*/ { BARCODE_UPCA_CC, -1, 2, "12345678901", "[91]1234567890123", 0, 8, 99, "Example with CC-B 4 cols, 4 rows",
|
||||
"110100111010001111101001110110111111010111001001110110110100001111011001100101110000100011010010001"
|
||||
"110100110010110010011100000101111101100000101001110100110111111001101001110100111110010011010110001"
|
||||
"110100010011100110100001100110010000010110001001100100100111101111010001110001110100010011010111001"
|
||||
@ -826,8 +862,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101001100100100110111101010001101100010101111010101000100100100011101001110010110011011011001010"
|
||||
},
|
||||
/*45*/ { BARCODE_EANX_CC, 2, "123456789012", "[91]1234567890123456789012345", 0, 10, 99, "Example with CC-B 4 cols, 6 rows",
|
||||
},
|
||||
/* 47*/ { BARCODE_EANX_CC, -1, 2, "123456789012", "[91]1234567890123456789012345", 0, 10, 99, "Example with CC-B 4 cols, 6 rows",
|
||||
"110010001011101111101110100110001110001101001011001110111110110100111101110110010000110011001000101"
|
||||
"111010001011100101100100000111000110111010001001001110110001110111110101110100011100011011101000101"
|
||||
"111011001011001100100011110100101000011110001001101110101100010111000001010011000111110011101100101"
|
||||
@ -838,8 +874,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010"
|
||||
},
|
||||
/*46*/ { BARCODE_GS1_128_CC, 2, "[01]12345678901231", "[91]12345678901234567890123456789012345678901", 0, 10, 145, "Example with CC-B 4 cols, 8 rows",
|
||||
},
|
||||
/* 48*/ { BARCODE_GS1_128_CC, -1, 2, "[01]12345678901231", "[91]12345678901234567890123456789012345678901", 0, 10, 145, "Example with CC-B 4 cols, 8 rows",
|
||||
"0000000000000000000001100111010111011111011101001000001000010001010000101101111101101001111011101100100001100110011101010000000000000000000000000"
|
||||
"0000000000000000000001110111010111001011001000001110001101110100010000100101100011101111101011101000111000110111011101010000000000000000000000000"
|
||||
"0000000000000000000001110011010110011001000111101001010000111100010000110101011000101110000011111010011101000111001101010000000000000000000000000"
|
||||
@ -850,8 +886,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000000000000000000001100011010110111000111110101111100010010011010011100101000011010111111011001100001111010110001101010000000000000000000000000"
|
||||
"0010110001100001010001001100100110100110001101110100111000111010010011110101100100001001010011000110010011100100010100001000101001110011100010100"
|
||||
"1101001110011110101110110011011001011001110010001011000111000101101100001010011011110110101100111001101100011011101011110111010110001100011101011"
|
||||
},
|
||||
/*47*/ { BARCODE_DBAR_OMN_CC, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 12, 100, "Example with CC-B 4 cols, 10 rows",
|
||||
},
|
||||
/* 49*/ { BARCODE_DBAR_OMN_CC, -1, 2, "12345678901231", "[91]123456789012345678901234567890123456789012345678901234567", 0, 12, 100, "Example with CC-B 4 cols, 10 rows",
|
||||
"1100010010100000011100101101100111111011001010011110101001001011110000010010001000011110110001001010"
|
||||
"1110010010101101111001110001111011110101000010111110101100001100101000011111001010111110111001001010"
|
||||
"1111010010111011001111001101110100011000010010111100101001011111011000011111101001011100111101001010"
|
||||
@ -864,8 +900,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1110101110101111000010010001011110000010001010010000101001010000111100011011110001011000111010111010"
|
||||
"0000000001100011000110101000000001001011011100001001010110000101111010010101010000111101011000100000"
|
||||
"0000010010011100111001000111111110010100100011110110101001111010000101100000000111000010100111011101"
|
||||
},
|
||||
/*48*/ { BARCODE_DBAR_EXP_CC, 2, "[01]12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123", 0, 14, 134, "Example with CC-B 4 cols, 12 rows",
|
||||
},
|
||||
/* 50*/ { BARCODE_DBAR_EXP_CC, -1, 2, "[01]12345678901231", "[91]1234567890123456789012345678901234567890123456789012345678901234567890123", 0, 14, 134, "Example with CC-B 4 cols, 12 rows",
|
||||
"00111010110011101111101110100100000100001000101011000010111110110100111101110110010000110011101011001000000000000000000000000000000000"
|
||||
"00111010100011100101100100000111000110111010001011100010110001110111110101110100011100011011101010001000000000000000000000000000000000"
|
||||
"00110010100011001100100011110100101000011110001011100110101100010111000001111101001110100011001010001000000000000000000000000000000000"
|
||||
@ -880,8 +916,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00110011010011111101001110110110110001011110001011001100110001111010011001000001110110111011001101001000000000000000000000000000000000"
|
||||
"00001011100111110001000000001010010011000000101001100011100100111011010000101010000111000011110101001101011110000010010100000010100000"
|
||||
"01010100011000001110111111110000101100111111010110011100011011000100101111000000111000111100001010110010100001111101100011111100001010"
|
||||
},
|
||||
/*49*/ { BARCODE_DBAR_EXPSTK_CC, 2, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890123456789012345678901234567890123456", 0, 26, 102, "Example with CC-B 4 cols, 20 rows",
|
||||
},
|
||||
/* 51*/ { BARCODE_DBAR_EXPSTK_CC, -1, 2, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]1234567890123456789012345678901234567890123456", 0, 26, 102, "Example with CC-B 4 cols, 20 rows",
|
||||
"001100100010111011111011101001000001000010001010111100101111101101001111011101100100001100111001011010"
|
||||
"001110100010111001011001000001110001101110100010111101101100011101111101011101000111000110110001011010"
|
||||
"001110110010110011001000111101001010000111100010011101101011000101110000011111010011101000110001010010"
|
||||
@ -908,8 +944,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000000101111000001001010000001010010111100111110110000000000000000000000000000000000000000000000000000"
|
||||
"001001010000111110110001111110000101000011000001001010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/*50*/ { BARCODE_UPCA_CC, 2, "12345678901", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567", 0, 48, 99, "Example with CC-B 4 cols, 44 rows",
|
||||
},
|
||||
/* 52*/ { BARCODE_UPCA_CC, -1, 2, "12345678901", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567", 0, 48, 99, "Example with CC-B 4 cols, 44 rows",
|
||||
"110010001011101111101110100100000100001000101011000010111110110100111101110110010000110011010001001"
|
||||
"111010001011100101100100000111000110111010001011100010110001110111110101110100011100011011010001101"
|
||||
"111011001011001100100011110100101000011110001011100110101100010111000001111101001110100011010000101"
|
||||
@ -958,8 +994,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
|
||||
"000101001100100100110111101010001101100010101111010101000100100100011101001110010110011011011001010"
|
||||
},
|
||||
/*51*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567", 0, 32, 154, "Example with CC-C 5 cols, 30 rows",
|
||||
},
|
||||
/* 53*/ { BARCODE_GS1_128_CC, -1, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567", 0, 32, 154, "Example with CC-C 5 cols, 30 rows",
|
||||
"1111111101010100010101000001000000101000001000001001110111110111010010000010000100010111110110100111101110110010000110011110101001111000111111101000101001"
|
||||
"1111111101010100011111010100000110111001011001000001110001101110100011000111011111010111010001110001101110110011110011011111010100001100111111101000101001"
|
||||
"1111111101010100011101010011111100100101000011110001011000101110000011111010011101000100010110001111101011100100001100011111101011010000111111101000101001"
|
||||
@ -992,8 +1028,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"1111111101010100010110001110111110100111000000101101000001101000111011111001011101000101111101111011101000111011001110010010000010111100111111101000101001"
|
||||
"0000000001011000110000101000100110010011010011000110111010011100011101001001111010110010000100101001100011001001110010100001000101110010001001110001010000"
|
||||
"0000000110100111001111010111011001101100101100111001000101100011100010110110000101001101111011010110011100110110001101011110111010001101110110001110101100"
|
||||
},
|
||||
/*52*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 28, 171, "Example with CC-C 6 cols, 25 rows",
|
||||
},
|
||||
/* 54*/ { BARCODE_GS1_128_CC, -1, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 28, 171, "Example with CC-C 6 cols, 25 rows",
|
||||
"111111110101010001101010000110000011010000001001100111011111011101001000001000010001011111011010011110111011001000011001011011110011100011111010100111110111111101000101001"
|
||||
"111111110101010001111010100000100011100011011101000110001110111110101110100011100011011101100111100110111010001100001001001011111011000011110101000010000111111101000101001"
|
||||
"111111110101010001010100011110000011111010011101000100010110001111101011100100001100010011110000010010101100010111000001011010011100000010101000001111000111111101000101001"
|
||||
@ -1022,8 +1058,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"111111110101010001100101111001100011011110101111100111110010000101101000010011111011011110011011100110111000100011101101100000010111010011100101111011100111111101000101001"
|
||||
"000000000101100011000010100010011001001101001100011011101001110001110100100111101011001000010010100110001100100111001010000100010111001000100111000101000000000000000000000"
|
||||
"000000011010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110011011000110101111011101000110111011000111010110000000000000000000"
|
||||
},
|
||||
/*53*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]1234567890123456789012345678901234567890", 0, 32, 528, "Example with CC-C 27 cols, 30 rows",
|
||||
},
|
||||
/* 55*/ { BARCODE_GS1_128_CC, -1, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]1234567890123456789012345678901234567890", 0, 32, 528, "Example with CC-C 27 cols, 30 rows",
|
||||
"111111110101010001010100000100000010000100001000010111011111011101001000001000010001011111011010011110111011001000011001011011110011100011110111101010000110000110010100001111100101011111010001011000110000101000001100011001100100010000110011010011110111110101100011000010001100110110110000011111011110010110110010001000011001001011100011100011001000010011000100010110000011001000100001000001011011110011101000100001001000010001111101101001111010111001110010000111101001001111001001000010010000011101011100111110111111101000101001"
|
||||
"111111110101010001111010110011000010010000111101000101000001111010001111110101000111011100110011101000101111010111100001111000100110110011111101001001110111001101110010001001100111110001010101111000010000111100100011011001011010011111100011110011011010000100111011111101001111100110110011010001110100111110111010000111011001001110100111110011000110111101000110000100001110101000111001011111010101111100110000111110001010110001110000001011001011111011010000100100000100011110101101011100000100011111010100001100111111101000101001"
|
||||
"111111110101010001111110101110011010001111011101110110001110100111001100011000101111011110111010111110110010001001111101110011111001011010110100000111000100010000010111101000110100000111011111101001100100111110100111000101011100010001100011101110101111000110010010001111101001001000001111011101101011111000101100000110111101000111101000010011011101000011100100110110111100001100010010111110011101101111110100100111100011011001000111001000011011001001101111110111010111111011001110011110010111011111101011000100111111101000101001"
|
||||
@ -1056,8 +1092,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"111111110101010001000101001111000010011101001100000100001100010111001000001101000111010001011011111000101011000011111001011001100111100011011110000100110101101111011111101011111101110001011110110111110010110001111101010001001111010100000011100011110101110100110000100111001010001000111100010110111011111000111111010011001001001111001110111010111011000111000101100000100011101010010000111100010010001101111100100100110111110001100111101011000011110010001111010111011101000111101100111110100010010110000010011100111111101000101001"
|
||||
"000000000101100011000010100010011001001101001100011011101001110001110100100111101011001000010010100110001100100111001010000100010111001000100111000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000011010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110011011000110101111011101000110111011000111010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/*54*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]1234567890123456789012" "34567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)",
|
||||
},
|
||||
/* 56*/ { BARCODE_GS1_128_CC, -1, 3, "[01]12345678901231", "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[94]123456789012345678901234567890123456789012345678901234567890123" "456789012345678901234567890[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[98]123456789012345678901234567890123456789012345", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)",
|
||||
"111111110101010001010100000100000010001110111000100111011111011101001100011100011010011111011010011110111011001000011001011011110011100011110111101010000110000110010100001111100101011111010001011000110000101000001100011001100100010000110011010011110111110101100011000010001100110110110000011111011110010110110010001000011001001011100011100011001000010011000100010110000011001000100001000001011011110011101000100001001000010001111101101001111010111001110010000111101001001111001001000010010000011100110111011110101101100010000001110101000111000010101111011110000111111101000101001"
|
||||
"111111110101010001111101011011100011100110011101000101111010111100001111000100110110011111101001001110111001101110010001001100111110001010101111000010000111100100011011001011010011111100011110011011010000100111011111101001111100110110011010001110100111110111010000111011001001110100111110011000110111101000110000100001110101000111001011111010101111100110000111110001010110001110000001011001011111011010000100100000100011110101101011100000100010111100010111100100010000111101001001101111110110011111011001100110111001011100110001110000010011001011111010100001100111111101000101001"
|
||||
"111111110101010001010111000111111010110100000111000100010000010111101000110100000111011111101001100100111110100111000101011100010001100011101110101111000110010010001111101001001000001111011101101011111000101100000110111101000111101000010011011101000011100100110110111100001100010010111110011101101111110100100111100011011001000111001000011011001001101111110111010111111011001110011110010111010011110001100110101110000010110001011000001001110010110110000111100100001000010111101101100110011111010101101111100000100101110011111101000011001000111011111101011001000111111101000101001"
|
||||
@ -1090,8 +1126,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"111111110101010001100010100011111011011101000111000100010010011110001001100011001111010001101100011110110000111110100101010000110011111011000011111010100100010011011111001010001000011110010011110011000110101111000110001101111011011111010010111001000011000110010010011111001110000101111101010101110011111100111111000101100101111110100110001011111100101110110100010011011111001001100011011110010111101100000110101111011001100001111100010111001010100010111100000110100100011111001110111100101110010000111010001100111111010011001001010001000011110010110000110011110111111101000101001"
|
||||
"000000000101100011000010100010011001001101001100011011101001110001110100100111101011001000010010100110001100100111001010000100010111001000100111000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000011010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110011011000110101111011101000110111011000111010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/*55*/ { BARCODE_GS1_128_CC, 3, "[01]12345678901231", "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[97]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[98]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[99]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)",
|
||||
},
|
||||
/* 57*/ { BARCODE_GS1_128_CC, -1, 3, "[01]12345678901231", "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[97]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[98]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[99]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[92]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[93]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[94]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[95]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKL[96]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", 0, 32, 579, "Example with CC-C 30 cols, 30 rows (max)",
|
||||
"111111110101010001010100000100000010001110111000100111011111011101001100011100011010011111011010011110110100100110000001001100110100000011001100100100000100011000001101001011001100001000010001100001100010100001011000001101110111101101000010000010100001000100100001100110001011000111000011010011000001100010111011001000011001110110100000110010001010000001000100011000110000101100110000100001011110110101110000111011001000110001100100010110000011101100101100000100101110111000001100001011001110011000010000100110110010000100110001110011101000010010101111011110000111111101000101001"
|
||||
"111111110101010001111101011011100011010001110000100111010001100010001010011111101110011111011001100110111010000011010001111010001000100011111101110110110111100110110010001111001011000011011110001000100010101110011011111101111110011010011011110000101000010111100100100001001110100111101110010001000111100100111101011101110001110101111000111011111101100101100100010011110100001110001000110010011111100010101110101101111100001001111001010000100011110101100110000111010000111011001111101100010100011000100011110110111111011010001101111101100000101011111010100001100111111101000101001"
|
||||
"111111110101010001010111000111111010010111011111100100001101000011101111110110011101011101011111000100110110001001111001001110011001110010011000011011110111001111100101101110110001011111010010010111100000110001101011110001101110101110000010010110001111100101001011110000001101000100111110011100110100111110111010111110000101101110011001111011100100011111010110111111001100101010010011110000011101011111010000110011000101111001001001100011111010001110110001110111001110101111001110111111010010010000011010011100110111000101110001100111000101110011111101011001000111111101000101001"
|
||||
@ -1124,8 +1160,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"111111110101010001100010100011111011011000001011110110011101000011101110101111101000010011110110110000110001110100111001100011111010001011100100101111110100011110110011001100111010111000011011111010001000110011111010001001010110011111000010011111001101000101111100011001001110110101111100011001101011110000110001111010110001110111101000111010010111001111110100111000000101101111110101101000010111100100100000110001110010011101101011111100010010011110000010010100001110100001101000001110010110010001110001101110100111010001100001110110111111001010110000110011110111111101000101001"
|
||||
"000000000101100011000010100010011001001101001100011011101001110001110100100111101011001000010010100110001100100111001010000100010111001000100111000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000011010011100111101011101100110110010110011100100010110001110001011011000010100110111101101011001110011011000110101111011101000110111011000111010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/*56*/ { BARCODE_EANX_CC, 1, "123456789012+12", "[91]123456789012345678901", 0, 8, 126, "Example of EAN-13 with 2-digit addon, CC-A 4 cols, 4 rows",
|
||||
},
|
||||
/* 58*/ { BARCODE_EANX_CC, -1, 1, "123456789012+12", "[91]123456789012345678901", 0, 8, 126, "Example of EAN-13 with 2-digit addon, CC-A 4 cols, 4 rows",
|
||||
"110100100011110011010011100101110111000100001001000110101110111001000001100000100110111011101100101000000000000000000000000000"
|
||||
"110101100011101011001000000110011110101111101001000010110010111101100001100100111000001011001100101000000000000000000000000000"
|
||||
"110101110011101011111010000111111001101110101011000010111110101111001101001101001110000011011100101000000000000000000000000000"
|
||||
@ -1134,8 +1170,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010000000101100110010100100110"
|
||||
},
|
||||
/*57*/ { BARCODE_EANX_CC, 1, "123456789012+54321", "[91]1234567890", 0, 7, 153, "Example of EAN-13 with 5-digit addon, CC-B 4 cols, 3 rows",
|
||||
},
|
||||
/* 59*/ { BARCODE_EANX_CC, -1, 1, "123456789012+54321", "[91]1234567890", 0, 7, 153, "Example of EAN-13 with 5-digit addon, CC-B 4 cols, 3 rows",
|
||||
"110110111011110011010011100101110111000100001001110100101110111001000001100000100110111011011000101000000000000000000000000000000000000000000000000000000"
|
||||
"110110110011111101010011100111110001001001101001100100110100011100010001001011111100111011001000101000000000000000000000000000000000000000000000000000000"
|
||||
"110110100010100000101111000111001111001011101001100110110011111010010001001111101101000011101000101000000000000000000000000000000000000000000000000000000"
|
||||
@ -1143,8 +1179,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010000000101101110010101000110101000010100100110100110010"
|
||||
},
|
||||
/*58*/ { BARCODE_UPCA_CC, 1, "12345678901+12", "[91]123456789", 0, 7, 128, "Example of UPC-A with 2-digit addon, CC-A 4 cols, 3 rows",
|
||||
},
|
||||
/* 60*/ { BARCODE_UPCA_CC, -1, 1, "12345678901+12", "[91]123456789", 0, 7, 128, "Example of UPC-A with 2-digit addon, CC-A 4 cols, 3 rows",
|
||||
"11011011101111001101001110010111011100010000100111010010111011100100000110000010011011101101100010100000000000000000000000000000"
|
||||
"11011011001110011100111101011000010001110010100110010011101011001000000100101111110011101100100010100000000000000000000000000000"
|
||||
"11011010001000011110010001010111101000000100100110011010001110000101100110111000100011101110100010100000000000000000000000000000"
|
||||
@ -1152,8 +1188,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000"
|
||||
"00010100110010010011011110101000110110001010111101010100010010010001110100111001011001101101100101000000000101100110010100100110"
|
||||
},
|
||||
/*59*/ { BARCODE_UPCA_CC, 2, "12345678901+12121", "[91]1234567890123", 0, 8, 155, "Example of UPC-A with 5-digit addon, CC-B 4 cols, 4 rows",
|
||||
},
|
||||
/* 61*/ { BARCODE_UPCA_CC, -1, 2, "12345678901+12121", "[91]1234567890123", 0, 8, 155, "Example of UPC-A with 5-digit addon, CC-B 4 cols, 4 rows",
|
||||
"11010011101000111110100111011011111101011100100111011011010000111101100110010111000010001101001000100000000000000000000000000000000000000000000000000000000"
|
||||
"11010011001011001001110000010111110110000010100111010011011111100110100111010011111001001101011000100000000000000000000000000000000000000000000000000000000"
|
||||
"11010001001110011010000110011001000001011000100110010010011110111101000111000111010001001101011100100000000000000000000000000000000000000000000000000000000"
|
||||
@ -1162,8 +1198,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000"
|
||||
"00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000"
|
||||
"00010100110010010011011110101000110110001010111101010100010010010001110100111001011001101101100101000000000101100110010100100110101100110100110110100110010"
|
||||
},
|
||||
/*60*/ { BARCODE_UPCE_CC, 1, "0654321+89", "[91]1", 0, 9, 82, "Example of UPC-E with 2-digit addon, CC-A 2 cols, 5 rows",
|
||||
},
|
||||
/* 62*/ { BARCODE_UPCE_CC, -1, 1, "0654321+89", "[91]1", 0, 9, 82, "Example of UPC-E with 2-digit addon, CC-A 2 cols, 5 rows",
|
||||
"1101100110111101110101111101010001000111100011110101001000000000000000000000000000"
|
||||
"1101101110111011000010001101110010101110000011100101001000000000000000000000000000"
|
||||
"1101101100110001011111011101111010000100100011101101001000000000000000000000000000"
|
||||
@ -1173,8 +1209,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"0001010000101011000100111010111101001101100110010101010000000101101101110100101110"
|
||||
},
|
||||
/*61*/ { BARCODE_UPCE_CC, 2, "1876543+56789", "[91]12345", 0, 12, 109, "Example of UPC-E with 5-digit addon, CC-B 2 cols, 8 rows",
|
||||
},
|
||||
/* 63*/ { BARCODE_UPCE_CC, -1, 2, "1876543+56789", "[91]12345", 0, 12, 109, "Example of UPC-E with 5-digit addon, CC-B 2 cols, 8 rows",
|
||||
"1100100010111011111011101001000001000010001011001000101000000000000000000000000000000000000000000000000000000"
|
||||
"1110100010110100001111011001100101110000100011101000101000000000000000000000000000000000000000000000000000000"
|
||||
"1110110010111011001001111101000111100100001011101100101000000000000000000000000000000000000000000000000000000"
|
||||
@ -1187,8 +1223,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0010000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"0001000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0001010110111001000100001010110001010001101000010101010000000101101100010101011110100100010101101110100101110"
|
||||
},
|
||||
/*62*/ { BARCODE_EANX_CC, 1, "9876543+65", "[91]1234567", 0, 8, 99, "Example of EAN-8 with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
},
|
||||
/* 64*/ { BARCODE_EANX_CC, -1, 1, "9876543+65", "[91]1234567", 0, 8, 99, "Example of EAN-8 with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
"100100011111001101010011000111000101110011001100010111010000011101001101000000000000000000000000000"
|
||||
"110111111001101001010111000110111100101100001111000100111101011101011101000000000000000000000000000"
|
||||
"100001011000001101010110000101011111011111001110100100001110011101011001000000000000000000000000000"
|
||||
@ -1197,8 +1233,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000010100010110110111011101101011110101010011101011100100001011100101010000000101101011110101110010"
|
||||
},
|
||||
/*63*/ { BARCODE_EANX_CC, 2, "9876543+74083", "[91]123456789012345678", 0, 12, 136, "Example of EAN-8 with 5-digit addon, CC-B 3 cols, 8 rows",
|
||||
},
|
||||
/* 65*/ { BARCODE_EANX_CC, -1, 2, "9876543+74083", "[91]123456789012345678", 0, 12, 136, "Example of EAN-8 with 5-digit addon, CC-B 3 cols, 8 rows",
|
||||
"1100111010111011111011101001000010110100000100001000101111101101001111011001110101000000000000000000000000000000000000000000000000000000"
|
||||
"1110111010110010111000010001000010010111001011001000001110001101110100011101110101000000000000000000000000000000000000000000000000000000"
|
||||
"1110011010110111111001101001000011010101000101111000001100100110111111011100110101000000000000000000000000000000000000000000000000000000"
|
||||
@ -1211,8 +1247,8 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000000000000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000010100010110110111011101101011110101010011101011100100001011100101010000000101101110110100111010100011010101101110101000010"
|
||||
},
|
||||
/*64*/ { BARCODE_EANX_CC, 1, "1234567890128+65", "[91]1234567", 0, 7, 126, "Example of EAN-13 + CHK with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
},
|
||||
/* 66*/ { BARCODE_EANX_CC, -1, 1, "1234567890128+65", "[91]1234567", 0, 7, 126, "Example of EAN-13 + CHK with 2-digit addon, CC-A 3 cols, 4 rows",
|
||||
"110110111011110011010011100101110111000100001001110100101110111001000001100001100101000011011000101000000000000000000000000000"
|
||||
"110110110010011001011111100111110110010000101001100100111111011100101001101011100010000011001000101000000000000000000000000000"
|
||||
"110110100011010111111001000110111010000111001001100110100010010011110001010000110111110011101000101000000000000000000000000000"
|
||||
@ -1220,12 +1256,15 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000"
|
||||
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000"
|
||||
"000101001001101111010011101011000100001010010001010101001000111010011100101100110110110010010001010000000101101011110101110010"
|
||||
},
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char esc_composite[4096];
|
||||
|
||||
char bwipp_buf[32768];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
@ -1241,7 +1280,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
assert_zero(length >= 128, "i:%d length %d >= 128\n", i, length);
|
||||
strcpy(symbol->primary, data[i].data);
|
||||
|
||||
@ -1251,7 +1290,12 @@ static void test_examples(int index, int generate, int debug) {
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
test_helper_generate(symbol, ret, i, data[i].data, data[i].composite, data[i].option_1, data[i].comment, -1 /*bwipp_cmp*/);
|
||||
printf(" /*%3d*/ { %s, %s, %d, \"%s\", \"%s\", %s, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), testUtilInputModeName(data[i].input_mode), data[i].option_1,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), testUtilEscape(data[i].composite, composite_length, esc_composite, sizeof(esc_composite)),
|
||||
testUtilErrorName(ret), symbol->rows, symbol->width, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
printf(" },\n");
|
||||
} else {
|
||||
int width, row;
|
||||
|
||||
@ -2876,25 +2920,37 @@ static void test_hrt(int index, int debug) {
|
||||
/* 1*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]12", 0, "1234567890128" }, // EAN-13
|
||||
/* 2*/ { BARCODE_EANX_CC, -1, "1234567890128", "[20]12", 0, "1234567890128" },
|
||||
/* 3*/ { BARCODE_EANX_CC, -1, "1234567890123", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 4*/ { BARCODE_EANX_CC, -1, "1234567890128", "[20]1A", ZINT_WARN_NONCOMPLIANT, "1234567890128" }, // AI (20) should be 2 nos.
|
||||
/* 5*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 6*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 7*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 8*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231" }, // AI (20) should be 2 nos.
|
||||
/* 9*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 10*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 11*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 12*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231" }, // AI (20) should be 2 nos.
|
||||
/* 13*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]12", 0, "123456789012" },
|
||||
/* 14*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]12", 0, "123456789012" },
|
||||
/* 15*/ { BARCODE_UPCA_CC, -1, "123456789013", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 16*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]1A", ZINT_WARN_NONCOMPLIANT, "123456789012" }, // AI (20) should be 2 nos.
|
||||
/* 17*/ { BARCODE_UPCE_CC, -1, "123456", "[20]12", 0, "01234565" },
|
||||
/* 18*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]12", 0, "12345670" },
|
||||
/* 19*/ { BARCODE_UPCE_CC, -1, "12345670", "[20]12", 0, "12345670" }, // Check digit can now be given for UPCE_CC, like UPCA_CC
|
||||
/* 20*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]1A", ZINT_WARN_NONCOMPLIANT, "12345670" }, // AI (20) should be 2 nos.
|
||||
/* 21*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[20]12", 0, "" }, // No HRT for stacked symbologies
|
||||
/* 22*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 4*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "1234567890123", "[20]12", ZINT_ERROR_INVALID_CHECK, "" }, // Still checked
|
||||
/* 5*/ { BARCODE_EANX_CC, -1, "1234567890128", "[20]1A", ZINT_WARN_NONCOMPLIANT, "1234567890128" }, // AI (20) should be 2 nos.
|
||||
/* 6*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "1234567890128", "[20]1A", 0, "1234567890128" },
|
||||
/* 7*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 8*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 9*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 10*/ { BARCODE_DBAR_OMN_CC, GS1NOCHECK_MODE, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "" }, // Still checked
|
||||
/* 11*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231" }, // AI (20) should be 2 nos.
|
||||
/* 12*/ { BARCODE_DBAR_OMN_CC, GS1NOCHECK_MODE, "12345678901231", "[20]1A", 0, "(01)12345678901231" },
|
||||
/* 13*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 14*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]12", 0, "(01)12345678901231" },
|
||||
/* 15*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 16*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "" }, // Still checked
|
||||
/* 17*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231" }, // AI (20) should be 2 nos.
|
||||
/* 18*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, "12345678901231", "[20]1A", 0, "(01)12345678901231" },
|
||||
/* 19*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]12", 0, "123456789012" },
|
||||
/* 20*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]12", 0, "123456789012" },
|
||||
/* 21*/ { BARCODE_UPCA_CC, -1, "123456789013", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 22*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, "123456789013", "[20]12", ZINT_ERROR_INVALID_CHECK, "" }, // Still checked
|
||||
/* 23*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]1A", ZINT_WARN_NONCOMPLIANT, "123456789012" }, // AI (20) should be 2 nos.
|
||||
/* 24*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, "123456789012", "[20]1A", 0, "123456789012" },
|
||||
/* 25*/ { BARCODE_UPCE_CC, -1, "123456", "[20]12", 0, "01234565" },
|
||||
/* 26*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]12", 0, "12345670" },
|
||||
/* 27*/ { BARCODE_UPCE_CC, -1, "12345670", "[20]12", 0, "12345670" },
|
||||
/* 28*/ { BARCODE_UPCE_CC, -1, "12345671", "[20]12", ZINT_ERROR_INVALID_CHECK, "" },
|
||||
/* 29*/ { BARCODE_UPCE_CC, GS1NOCHECK_MODE, "12345671", "[20]12", ZINT_ERROR_INVALID_CHECK, "" }, // Still checked
|
||||
/* 30*/ { BARCODE_UPCE_CC, -1, "12345670", "[20]12", 0, "12345670" }, // Check digit can now be given for UPCE_CC, like UPCA_CC
|
||||
/* 31*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]1A", ZINT_WARN_NONCOMPLIANT, "12345670" }, // AI (20) should be 2 nos.
|
||||
/* 32*/ { BARCODE_UPCE_CC, GS1NOCHECK_MODE, "1234567", "[20]1A", 0, "12345670" },
|
||||
/* 33*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[20]12", 0, "" }, // No HRT for stacked symbologies
|
||||
/* 34*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
@ -2940,43 +2996,98 @@ static void test_input(int index, int debug) {
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_EANX_CC, -1, "1234567", "[20]12", 0, "" }, // EAN-8
|
||||
/* 1*/ { BARCODE_EANX_CC, -1, "1234567", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" },
|
||||
/* 2*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]12", 0, "" }, // EAN-13
|
||||
/* 3*/ { BARCODE_EANX_CC, -1, "1234567890128", "[20]12", 0, "" }, // EAN-13
|
||||
/* 4*/ { BARCODE_EANX_CC, -1, "1234567890123", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 275: Invalid check digit '3', expecting '8' in linear component" },
|
||||
/* 5*/ { BARCODE_EANX_CC, -1, "1234567890128", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 6*/ { BARCODE_EANX_CC, -1, "1234567890128", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 7*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 8*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 9*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 10*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 11*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 12*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 13*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 14*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 389: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 15*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 16*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 17*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]12", 0, "" },
|
||||
/* 18*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]12", 0, "" },
|
||||
/* 19*/ { BARCODE_UPCA_CC, -1, "123456789013", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 270: Invalid check digit '3', expecting '2' in linear component" },
|
||||
/* 20*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 21*/ { BARCODE_UPCA_CC, -1, "123456789012", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 22*/ { BARCODE_UPCE_CC, -1, "123456", "[20]12", 0, "" },
|
||||
/* 23*/ { BARCODE_UPCE_CC, -1, "123456", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 24*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]12", 0, "" },
|
||||
/* 25*/ { BARCODE_UPCE_CC, -1, "12345670", "[20]12", 0, "" }, // Check digit can now be given for UPCE_CC, like UPCA_CC
|
||||
/* 26*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 27*/ { BARCODE_UPCE_CC, -1, "1234567", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 28*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 29*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 30*/ { BARCODE_DBAR_STK_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 31*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 32*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 33*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 34*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 35*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 36*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 37*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 1*/ { BARCODE_EANX_CC, -1, "123456A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" }, // EAN-8
|
||||
/* 2*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "123456A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" }, // Linear component still checked
|
||||
/* 3*/ { BARCODE_EANX_CC, -1, "1234567", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" },
|
||||
/* 4*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "1234567", "[20]1A", 0, "" },
|
||||
/* 5*/ { BARCODE_EANX_CC, -1, "1234567", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 6*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "1234567", "[02]12345678901234", 0, "" },
|
||||
/* 7*/ { BARCODE_EANX_CC, -1, "12345671", "[20]12", 0, "" }, // EAN-13 for EANX_CC as length 8 only EAN-8 for EANX_CHK
|
||||
/* 8*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]12", 0, "" }, // EAN-13
|
||||
/* 9*/ { BARCODE_EANX_CC, -1, "1234567890128", "[20]12", 0, "" }, // EAN-13
|
||||
/* 10*/ { BARCODE_EANX_CC, -1, "1234567890123", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 275: Invalid check digit '3', expecting '8' in linear component" },
|
||||
/* 11*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "1234567890123", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 275: Invalid check digit '3', expecting '8' in linear component" }, // Linear component still checked
|
||||
/* 12*/ { BARCODE_EANX_CC, -1, "12345678901234", "[20]12", ZINT_ERROR_TOO_LONG, "Error 448: Input too long (13 character maximum) in linear component" },
|
||||
/* 13*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "12345678901234", "[20]12", ZINT_ERROR_TOO_LONG, "Error 448: Input too long (13 character maximum) in linear component" },
|
||||
/* 14*/ { BARCODE_EANX_CC, -1, "123456789012A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" },
|
||||
/* 15*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "123456789012A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" },
|
||||
/* 16*/ { BARCODE_EANX_CC, -1, "1234567890128", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 17*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "1234567890128", "[20]1A", 0, "" },
|
||||
/* 18*/ { BARCODE_EANX_CC, -1, "1234567890128", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 19*/ { BARCODE_EANX_CC, GS1NOCHECK_MODE, "1234567890128", "[02]12345678901234", 0, "" },
|
||||
/* 20*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 21*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 22*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 23*/ { BARCODE_DBAR_OMN_CC, GS1NOCHECK_MODE, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" }, // Linear component still checked
|
||||
/* 24*/ { BARCODE_DBAR_OMN_CC, -1, "123456789012312", "[20]12", ZINT_ERROR_TOO_LONG, "Error 380: Input too long (14 character maximum) in linear component" },
|
||||
/* 25*/ { BARCODE_DBAR_OMN_CC, GS1NOCHECK_MODE, "123456789012312", "[20]12", ZINT_ERROR_TOO_LONG, "Error 380: Input too long (14 character maximum) in linear component" },
|
||||
/* 26*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 381: Invalid character in data (digits only) in linear component" },
|
||||
/* 27*/ { BARCODE_DBAR_OMN_CC, GS1NOCHECK_MODE, "1234567890123A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 381: Invalid character in data (digits only) in linear component" },
|
||||
/* 28*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 29*/ { BARCODE_DBAR_OMN_CC, GS1NOCHECK_MODE, "12345678901231", "[20]1A", 0, "" },
|
||||
/* 30*/ { BARCODE_DBAR_OMN_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 31*/ { BARCODE_DBAR_OMN_CC, GS1NOCHECK_MODE, "12345678901231", "[02]12345678901234", 0, "" },
|
||||
/* 32*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 33*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 34*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 389: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 35*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 389: Invalid check digit '2', expecting '1' in linear component" }, // Linear component still checked
|
||||
/* 36*/ { BARCODE_DBAR_LTD_CC, -1, "123456789012345", "[20]12", ZINT_ERROR_TOO_LONG, "Error 382: Input too long (14 character maximum) in linear component" },
|
||||
/* 37*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, "123456789012345", "[20]12", ZINT_ERROR_TOO_LONG, "Error 382: Input too long (14 character maximum) in linear component" },
|
||||
/* 38*/ { BARCODE_DBAR_LTD_CC, -1, "A1234567890123", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 383: Invalid character in data (digits only) in linear component" },
|
||||
/* 39*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, "A1234567890123", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 383: Invalid character in data (digits only) in linear component" },
|
||||
/* 40*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 41*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, "12345678901231", "[20]1A", 0, "" },
|
||||
/* 42*/ { BARCODE_DBAR_LTD_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 43*/ { BARCODE_DBAR_LTD_CC, GS1NOCHECK_MODE, "12345678901231", "[02]12345678901234", 0, "" },
|
||||
/* 44*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]12", 0, "" },
|
||||
/* 45*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]12", 0, "" },
|
||||
/* 46*/ { BARCODE_UPCA_CC, -1, "123456789013", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 270: Invalid check digit '3', expecting '2' in linear component" },
|
||||
/* 47*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, "123456789013", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 270: Invalid check digit '3', expecting '2' in linear component" }, // Linear component still checked
|
||||
/* 48*/ { BARCODE_UPCA_CC, -1, "1234567890123", "[20]12", ZINT_ERROR_TOO_LONG, "Error 289: Input wrong length (12 character maximum) in linear component" },
|
||||
/* 49*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, "1234567890123", "[20]12", ZINT_ERROR_TOO_LONG, "Error 289: Input wrong length (12 character maximum) in linear component" },
|
||||
/* 50*/ { BARCODE_UPCA_CC, -1, "12345678901A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" },
|
||||
/* 51*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, "12345678901A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" },
|
||||
/* 52*/ { BARCODE_UPCA_CC, -1, "123456789012", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 53*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, "123456789012", "[20]1A", 0, "" },
|
||||
/* 54*/ { BARCODE_UPCA_CC, -1, "123456789012", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 55*/ { BARCODE_UPCA_CC, GS1NOCHECK_MODE, "123456789012", "[02]12345678901234", 0, "" },
|
||||
/* 56*/ { BARCODE_UPCE_CC, -1, "123456", "[20]12", 0, "" },
|
||||
/* 57*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]12", 0, "" },
|
||||
/* 58*/ { BARCODE_UPCE_CC, -1, "12345670", "[20]12", 0, "" }, // Check digit can now be given for UPCE_CC, like UPCA_CC
|
||||
/* 59*/ { BARCODE_UPCE_CC, -1, "12345671", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 274: Invalid check digit '1', expecting '0' in linear component" },
|
||||
/* 60*/ { BARCODE_UPCE_CC, GS1NOCHECK_MODE, "12345671", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 274: Invalid check digit '1', expecting '0' in linear component" }, // Linear component still checked
|
||||
/* 61*/ { BARCODE_UPCE_CC, -1, "123456712", "[20]12", ZINT_ERROR_TOO_LONG, "Error 291: Input wrong length (8 character maximum) in linear component" },
|
||||
/* 62*/ { BARCODE_UPCE_CC, GS1NOCHECK_MODE, "123456712", "[20]12", ZINT_ERROR_TOO_LONG, "Error 291: Input wrong length (8 character maximum) in linear component" },
|
||||
/* 63*/ { BARCODE_UPCE_CC, -1, "1234567A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" },
|
||||
/* 64*/ { BARCODE_UPCE_CC, GS1NOCHECK_MODE, "1234567A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 284: Invalid character in data (digits and \"+\" only) in linear component" },
|
||||
/* 65*/ { BARCODE_UPCE_CC, -1, "1234567", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 66*/ { BARCODE_UPCE_CC, GS1NOCHECK_MODE, "1234567", "[20]1A", 0, "" },
|
||||
/* 67*/ { BARCODE_UPCE_CC, -1, "1234567", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 68*/ { BARCODE_UPCE_CC, GS1NOCHECK_MODE, "1234567", "[02]12345678901234", 0, "" },
|
||||
/* 69*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 70*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 71*/ { BARCODE_DBAR_STK_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 72*/ { BARCODE_DBAR_STK_CC, GS1NOCHECK_MODE, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" }, // Linear component still checked
|
||||
/* 73*/ { BARCODE_DBAR_STK_CC, -1, "123456789012323", "[20]12", ZINT_ERROR_TOO_LONG, "Error 380: Input too long (14 character maximum) in linear component" },
|
||||
/* 74*/ { BARCODE_DBAR_STK_CC, GS1NOCHECK_MODE, "123456789012323", "[20]12", ZINT_ERROR_TOO_LONG, "Error 380: Input too long (14 character maximum) in linear component" },
|
||||
/* 75*/ { BARCODE_DBAR_STK_CC, -1, "1234567890123A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 381: Invalid character in data (digits only) in linear component" },
|
||||
/* 76*/ { BARCODE_DBAR_STK_CC, GS1NOCHECK_MODE, "1234567890123A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 381: Invalid character in data (digits only) in linear component" },
|
||||
/* 77*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 78*/ { BARCODE_DBAR_STK_CC, GS1NOCHECK_MODE, "12345678901231", "[20]1A", 0, "" },
|
||||
/* 79*/ { BARCODE_DBAR_STK_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 80*/ { BARCODE_DBAR_STK_CC, GS1NOCHECK_MODE, "12345678901231", "[02]12345678901234", 0, "" },
|
||||
/* 81*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123", "[20]12", 0, "" },
|
||||
/* 82*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[20]12", 0, "" },
|
||||
/* 83*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" },
|
||||
/* 84*/ { BARCODE_DBAR_OMNSTK_CC, GS1NOCHECK_MODE, "12345678901232", "[20]12", ZINT_ERROR_INVALID_CHECK, "Error 388: Invalid check digit '2', expecting '1' in linear component" }, // Linear component still checked
|
||||
/* 85*/ { BARCODE_DBAR_OMNSTK_CC, -1, "123456789012312", "[20]12", ZINT_ERROR_TOO_LONG, "Error 380: Input too long (14 character maximum) in linear component" },
|
||||
/* 86*/ { BARCODE_DBAR_OMNSTK_CC, GS1NOCHECK_MODE, "123456789012312", "[20]12", ZINT_ERROR_TOO_LONG, "Error 380: Input too long (14 character maximum) in linear component" },
|
||||
/* 87*/ { BARCODE_DBAR_OMNSTK_CC, -1, "1234567890123A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 381: Invalid character in data (digits only) in linear component" },
|
||||
/* 88*/ { BARCODE_DBAR_OMNSTK_CC, GS1NOCHECK_MODE, "1234567890123A", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 381: Invalid character in data (digits only) in linear component" },
|
||||
/* 89*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, // AI (20) should be 2 nos.
|
||||
/* 90*/ { BARCODE_DBAR_OMNSTK_CC, GS1NOCHECK_MODE, "12345678901231", "[20]1A", 0, "" },
|
||||
/* 91*/ { BARCODE_DBAR_OMNSTK_CC, -1, "12345678901231", "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (02) position 14: Bad checksum '4', expected '1' in 2D component" },
|
||||
/* 92*/ { BARCODE_DBAR_OMNSTK_CC, GS1NOCHECK_MODE, "12345678901231", "[02]12345678901234", 0, "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, composite_length, ret;
|
||||
@ -3000,7 +3111,7 @@ static void test_input(int index, int debug) {
|
||||
ret = ZBarcode_Encode(symbol, (const unsigned char *) data[i].composite, composite_length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, data[i].ret, ret, symbol->errtxt);
|
||||
|
||||
assert_zero(strcmp((const char *) symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt);
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt);
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
}
|
||||
|
@ -262,6 +262,7 @@ static void test_hrt(int index, int debug) {
|
||||
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
char *data;
|
||||
char *composite;
|
||||
|
||||
@ -270,34 +271,44 @@ static void test_hrt(int index, int debug) {
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_GS1_128, "[01]12345678901234[20]12", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234(20)12" }, // Incorrect check digit
|
||||
/* 1*/ { BARCODE_GS1_128, "[01]12345678901231[20]12", "", 0, "(01)12345678901231(20)12" },
|
||||
/* 2*/ { BARCODE_GS1_128, "[01]12345678901231[10]12[20]AB", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)12(20)AB" }, // AI (20) should be 2 nos.
|
||||
/* 3*/ { BARCODE_GS1_128, "[01]12345678901231[10]AB[20]12", "", 0, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 4*/ { BARCODE_GS1_128_CC, "[01]12345678901234[20]12", "[21]12345", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234(20)12" }, // Incorrect check digit
|
||||
/* 5*/ { BARCODE_GS1_128_CC, "[01]12345678901231[20]12", "[21]12345", 0, "(01)12345678901231(20)12" },
|
||||
/* 6*/ { BARCODE_GS1_128_CC, "[01]12345678901231[10]12[20]AB", "[21]12345", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)12(20)AB" }, // AI (20) should be 2 nos.
|
||||
/* 7*/ { BARCODE_GS1_128_CC, "[01]12345678901231[10]AB[20]12", "[21]12345", 0, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 8*/ { BARCODE_GS1_128_CC, "[01]12345678901231[10]AB[20]12", "[30]1234567A", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 9*/ { BARCODE_EAN14, "1234567890123", "", 0, "(01)12345678901231" },
|
||||
/* 10*/ { BARCODE_EAN14, "1234", "", 0, "(01)00000000012348" },
|
||||
/* 11*/ { BARCODE_EAN14, "12345", "", 0, "(01)00000000123457" },
|
||||
/* 12*/ { BARCODE_EAN14, "12340", "", 0, "(01)00000000123402" },
|
||||
/* 13*/ { BARCODE_NVE18, "12345678901234567", "", 0, "(00)123456789012345675" },
|
||||
/* 14*/ { BARCODE_NVE18, "1234", "", 0, "(00)000000000000012348" },
|
||||
/* 15*/ { BARCODE_NVE18, "12345", "", 0, "(00)000000000000123457" },
|
||||
/* 16*/ { BARCODE_NVE18, "12340", "", 0, "(00)000000000000123402" },
|
||||
/* 17*/ { BARCODE_DBAR_EXP, "[01]12345678901234[20]12", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234(20)12" }, // Incorrect check digit
|
||||
/* 18*/ { BARCODE_DBAR_EXP, "[01]12345678901231[20]12", "", 0, "(01)12345678901231(20)12" },
|
||||
/* 19*/ { BARCODE_DBAR_EXP, "[01]12345678901231[10]12[20]AB", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)12(20)AB" }, // AI (20) should be 2 nos.
|
||||
/* 20*/ { BARCODE_DBAR_EXP, "[01]12345678901231[10]AB[20]12", "", 0, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 21*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901234", "[21]12345", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234" },
|
||||
/* 22*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901231", "[21]12345", 0, "(01)12345678901231" },
|
||||
/* 23*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901231[20]12[21]12345", "[21]12345", 0, "(01)12345678901231(20)12(21)12345" },
|
||||
/* 24*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901234[20]12", "", ZINT_WARN_NONCOMPLIANT, "" },
|
||||
/* 25*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901231[20]12", "", 0, "" },
|
||||
/* 26*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901234[20]12", "[21]12345", ZINT_WARN_NONCOMPLIANT, "" },
|
||||
/* 27*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901231[20]12", "[21]12345", 0, "" },
|
||||
/* 0*/ { BARCODE_GS1_128, -1, "[01]12345678901234[20]12", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234(20)12" }, // Incorrect check digit
|
||||
/* 1*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]12345678901234[20]12", "", 0, "(01)12345678901234(20)12" },
|
||||
/* 2*/ { BARCODE_GS1_128, -1, "[01]12345678901231[20]12", "", 0, "(01)12345678901231(20)12" },
|
||||
/* 3*/ { BARCODE_GS1_128, -1, "[01]12345678901231[10]12[20]AB", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)12(20)AB" }, // AI (20) should be 2 nos.
|
||||
/* 4*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]12345678901231[10]10[20]AB", "", 0, "(01)12345678901231(10)10(20)AB" },
|
||||
/* 5*/ { BARCODE_GS1_128, -1, "[01]12345678901231[10]AB[20]12", "", 0, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 6*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901234[20]12", "[21]12345", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234(20)12" }, // Incorrect check digit
|
||||
/* 7*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901234[20]12", "[21]12345", 0, "(01)12345678901234(20)12" },
|
||||
/* 8*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231[20]12", "[21]12345", 0, "(01)12345678901231(20)12" },
|
||||
/* 9*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231[10]12[20]AB", "[21]12345", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)12(20)AB" }, // AI (20) should be 2 nos.
|
||||
/* 10*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]12[20]AB", "[21]12345", 0, "(01)12345678901231(10)12(20)AB" },
|
||||
/* 11*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231[10]AB[20]12", "[21]12345", 0, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 12*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231[10]AB[20]12", "[30]1234567A", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 13*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]AB[20]12", "[30]1234567A", 0, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 14*/ { BARCODE_EAN14, -1, "1234567890123", "", 0, "(01)12345678901231" },
|
||||
/* 15*/ { BARCODE_EAN14, -1, "1234", "", 0, "(01)00000000012348" },
|
||||
/* 16*/ { BARCODE_EAN14, -1, "12345", "", 0, "(01)00000000123457" },
|
||||
/* 17*/ { BARCODE_EAN14, -1, "12340", "", 0, "(01)00000000123402" },
|
||||
/* 18*/ { BARCODE_NVE18, -1, "12345678901234567", "", 0, "(00)123456789012345675" },
|
||||
/* 19*/ { BARCODE_NVE18, -1, "1234", "", 0, "(00)000000000000012348" },
|
||||
/* 20*/ { BARCODE_NVE18, -1, "12345", "", 0, "(00)000000000000123457" },
|
||||
/* 21*/ { BARCODE_NVE18, -1, "12340", "", 0, "(00)000000000000123402" },
|
||||
/* 22*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901234[20]12", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234(20)12" }, // Incorrect check digit
|
||||
/* 23*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901234[20]12", "", 0, "(01)12345678901234(20)12" },
|
||||
/* 24*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[20]12", "", 0, "(01)12345678901231(20)12" },
|
||||
/* 25*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]12[20]AB", "", ZINT_WARN_NONCOMPLIANT, "(01)12345678901231(10)12(20)AB" }, // AI (20) should be 2 nos.
|
||||
/* 26*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]12[20]AB", "", 0, "(01)12345678901231(10)12(20)AB" },
|
||||
/* 27*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]AB[20]12", "", 0, "(01)12345678901231(10)AB(20)12" },
|
||||
/* 28*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901234", "[21]12345", ZINT_WARN_NONCOMPLIANT, "(01)12345678901234" },
|
||||
/* 29*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]12345678901234", "[21]12345", 0, "(01)12345678901234" },
|
||||
/* 30*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[21]12345", 0, "(01)12345678901231" },
|
||||
/* 31*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[20]12[21]12345", "[21]12345", 0, "(01)12345678901231(20)12(21)12345" },
|
||||
/* 32*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901234[20]12", "", ZINT_WARN_NONCOMPLIANT, "" },
|
||||
/* 33*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901234[20]12", "", 0, "" },
|
||||
/* 34*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[20]12", "", 0, "" },
|
||||
/* 35*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901234[20]12", "[21]12345", ZINT_WARN_NONCOMPLIANT, "" },
|
||||
/* 36*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]12345678901234[20]12", "[21]12345", 0, "" },
|
||||
/* 37*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[20]12", "[21]12345", 0, "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -320,7 +331,7 @@ static void test_hrt(int index, int debug) {
|
||||
} 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, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, text, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) text, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, data[i].ret, ret, symbol->errtxt);
|
||||
@ -1201,125 +1212,126 @@ static void test_gs1_verify(int index, int debug) {
|
||||
/*854*/ { "[8012]abcdefghijklmnopqrst", 0, "8012abcdefghijklmnopqrst" },
|
||||
/*855*/ { "[8012]abcdefghijklmnopqrstuv", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*856*/ { "[8013]1234abcdefghijklmnopqrsQP", 0, "80131234abcdefghijklmnopqrsQP" },
|
||||
/*857*/ { "[8013]1234abcdefghijklmnopqrsQPv", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*858*/ { "[8014]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*859*/ { "[8016]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*860*/ { "[8017]313131313131313139", ZINT_WARN_NONCOMPLIANT, "8017313131313131313139" },
|
||||
/*861*/ { "[8017]313131313131313131", 0, "8017313131313131313131" },
|
||||
/*862*/ { "[8017]31313131313131313", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*863*/ { "[8017]3131313131313131390", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*864*/ { "[8018]313131313131313139", ZINT_WARN_NONCOMPLIANT, "8018313131313131313139" },
|
||||
/*865*/ { "[8018]313131313131313131", 0, "8018313131313131313131" },
|
||||
/*866*/ { "[8018]31313131313131313", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*867*/ { "[8018]3131313131313131390", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*868*/ { "[8019]1234567890", 0, "80191234567890" },
|
||||
/*869*/ { "[8019]12345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*870*/ { "[8020]abcdefghijklmnopqrstuvwxy", 0, "8020abcdefghijklmnopqrstuvwxy" },
|
||||
/*871*/ { "[8020]abcdefghijklmnopqrstuvwxyz", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*872*/ { "[8021]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*873*/ { "[8025]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*874*/ { "[8026]123456789012341212", ZINT_WARN_NONCOMPLIANT, "8026123456789012341212" },
|
||||
/*875*/ { "[8026]123456789012311212", 0, "8026123456789012311212" },
|
||||
/*876*/ { "[8026]1234567890123451212", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*877*/ { "[8026]12345678901234512", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*878*/ { "[8027]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*879*/ { "[8030]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*880*/ { "[8040]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*881*/ { "[8050]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*882*/ { "[8060]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*883*/ { "[8070]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*884*/ { "[8080]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*885*/ { "[8090]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*886*/ { "[8099]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*887*/ { "[81]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*888*/ { "[8100]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*889*/ { "[8109]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*890*/ { "[8110]5123456789011234565123455123450123105123450123512345678901320123190000", 0, "81105123456789011234565123455123450123105123450123512345678901320123190000" },
|
||||
/*891*/ { "[8110]51234567890112345651234551234501231051234501235123456789013201231900001", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*892*/ { "[8111]1234", 0, "81111234" },
|
||||
/*893*/ { "[8111]12345", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*894*/ { "[8111]123", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*895*/ { "[8112]1234567890123456789012345678901234567890123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, "81121234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*896*/ { "[8112]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*897*/ { "[8112]061234567890121234569123456789012345", 0, "8112061234567890121234569123456789012345" },
|
||||
/*898*/ { "[8113]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*899*/ { "[8120]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*900*/ { "[8130]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*901*/ { "[8140]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*902*/ { "[8150]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*903*/ { "[8190]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*904*/ { "[8199]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*905*/ { "[82]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*906*/ { "[8200]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "82001234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*907*/ { "[8201]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*908*/ { "[8210]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*909*/ { "[8220]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*910*/ { "[8230]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*911*/ { "[8240]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*912*/ { "[8250]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*913*/ { "[8290]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*914*/ { "[8299]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*915*/ { "[83]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*916*/ { "[830]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*917*/ { "[8300]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*918*/ { "[84]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*919*/ { "[840]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*920*/ { "[8400]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*921*/ { "[85]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*922*/ { "[850]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*923*/ { "[8500]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*924*/ { "[89]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*925*/ { "[890]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*926*/ { "[8900]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*927*/ { "[90]abcdefghijklmnopqrstuvwxyz1234", 0, "90abcdefghijklmnopqrstuvwxyz1234" },
|
||||
/*928*/ { "[90]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*929*/ { "[900]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*930*/ { "[9000]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*931*/ { "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*932*/ { "[91]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*933*/ { "[910]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*934*/ { "[9100]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*935*/ { "[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*936*/ { "[92]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*937*/ { "[920]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*938*/ { "[9200]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*939*/ { "[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "93123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*940*/ { "[93]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*941*/ { "[930]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*942*/ { "[9300]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*943*/ { "[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "94123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*944*/ { "[94]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*945*/ { "[940]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*946*/ { "[9400]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*947*/ { "[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "95123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*948*/ { "[95]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*949*/ { "[950]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*950*/ { "[9500]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*951*/ { "[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "96123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*952*/ { "[96]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*953*/ { "[960]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*954*/ { "[9600]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*955*/ { "[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "97123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*956*/ { "[97]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*957*/ { "[970]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*958*/ { "[9700]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*959*/ { "[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "98123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*960*/ { "[98]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*961*/ { "[980]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*962*/ { "[9800]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*963*/ { "[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "99123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*964*/ { "[99]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*965*/ { "[990]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*966*/ { "[9900]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*967*/ { "[9999]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*968*/ { "[01]12345678901234[7006]200101", ZINT_WARN_NONCOMPLIANT, "01123456789012347006200101" },
|
||||
/*969*/ { "[01]12345678901231[7006]200101", 0, "01123456789012317006200101" },
|
||||
/*970*/ { "[3900]1234567890[01]12345678901234", ZINT_WARN_NONCOMPLIANT, "39001234567890[0112345678901234" },
|
||||
/*971*/ { "[3900]1234567890[01]12345678901231", 0, "39001234567890[0112345678901231" },
|
||||
/*972*/ { "[253]12345678901234[3901]12345678901234[20]12", ZINT_WARN_NONCOMPLIANT, "25312345678901234[390112345678901234[2012" },
|
||||
/*973*/ { "[253]12345678901284[3901]12345678901234[20]12", 0, "25312345678901284[390112345678901234[2012" },
|
||||
/*974*/ { "[253]12345678901234[01]12345678901234[3901]12345678901234[20]12", ZINT_WARN_NONCOMPLIANT, "25312345678901234[0112345678901234390112345678901234[2012" },
|
||||
/*975*/ { "[253]12345678901284[01]12345678901231[3901]12345678901234[20]12", 0, "25312345678901284[0112345678901231390112345678901234[2012" },
|
||||
/*857*/ { "[8013]1234abcdefghijklmnopqrsQP", 0, "80131234abcdefghijklmnopqrsQP" },
|
||||
/*858*/ { "[8013]1234abcdefghijklmnopqrsQPv", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*859*/ { "[8014]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*860*/ { "[8016]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*861*/ { "[8017]313131313131313139", ZINT_WARN_NONCOMPLIANT, "8017313131313131313139" },
|
||||
/*862*/ { "[8017]313131313131313131", 0, "8017313131313131313131" },
|
||||
/*863*/ { "[8017]31313131313131313", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*864*/ { "[8017]3131313131313131390", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*865*/ { "[8018]313131313131313139", ZINT_WARN_NONCOMPLIANT, "8018313131313131313139" },
|
||||
/*866*/ { "[8018]313131313131313131", 0, "8018313131313131313131" },
|
||||
/*867*/ { "[8018]31313131313131313", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*868*/ { "[8018]3131313131313131390", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*869*/ { "[8019]1234567890", 0, "80191234567890" },
|
||||
/*870*/ { "[8019]12345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*871*/ { "[8020]abcdefghijklmnopqrstuvwxy", 0, "8020abcdefghijklmnopqrstuvwxy" },
|
||||
/*872*/ { "[8020]abcdefghijklmnopqrstuvwxyz", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*873*/ { "[8021]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*874*/ { "[8025]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*875*/ { "[8026]123456789012341212", ZINT_WARN_NONCOMPLIANT, "8026123456789012341212" },
|
||||
/*876*/ { "[8026]123456789012311212", 0, "8026123456789012311212" },
|
||||
/*877*/ { "[8026]1234567890123451212", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*878*/ { "[8026]12345678901234512", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*879*/ { "[8027]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*880*/ { "[8030]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*881*/ { "[8040]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*882*/ { "[8050]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*883*/ { "[8060]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*884*/ { "[8070]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*885*/ { "[8080]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*886*/ { "[8090]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*887*/ { "[8099]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*888*/ { "[81]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*889*/ { "[8100]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*890*/ { "[8109]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*891*/ { "[8110]5123456789011234565123455123450123105123450123512345678901320123190000", 0, "81105123456789011234565123455123450123105123450123512345678901320123190000" },
|
||||
/*892*/ { "[8110]51234567890112345651234551234501231051234501235123456789013201231900001", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*893*/ { "[8111]1234", 0, "81111234" },
|
||||
/*894*/ { "[8111]12345", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*895*/ { "[8111]123", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*896*/ { "[8112]1234567890123456789012345678901234567890123456789012345678901234567890", ZINT_WARN_NONCOMPLIANT, "81121234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*897*/ { "[8112]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*898*/ { "[8112]061234567890121234569123456789012345", 0, "8112061234567890121234569123456789012345" },
|
||||
/*899*/ { "[8113]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*900*/ { "[8120]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*901*/ { "[8130]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*902*/ { "[8140]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*903*/ { "[8150]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*904*/ { "[8190]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*905*/ { "[8199]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*906*/ { "[82]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*907*/ { "[8200]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "82001234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*908*/ { "[8201]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*909*/ { "[8210]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*910*/ { "[8220]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*911*/ { "[8230]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*912*/ { "[8240]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*913*/ { "[8250]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*914*/ { "[8290]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*915*/ { "[8299]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*916*/ { "[83]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*917*/ { "[830]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*918*/ { "[8300]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*919*/ { "[84]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*920*/ { "[840]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*921*/ { "[8400]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*922*/ { "[85]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*923*/ { "[850]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*924*/ { "[8500]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*925*/ { "[89]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*926*/ { "[890]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*927*/ { "[8900]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*928*/ { "[90]abcdefghijklmnopqrstuvwxyz1234", 0, "90abcdefghijklmnopqrstuvwxyz1234" },
|
||||
/*929*/ { "[90]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*930*/ { "[900]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*931*/ { "[9000]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*932*/ { "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*933*/ { "[91]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*934*/ { "[910]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*935*/ { "[9100]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*936*/ { "[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*937*/ { "[92]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*938*/ { "[920]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*939*/ { "[9200]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*940*/ { "[93]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "93123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*941*/ { "[93]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*942*/ { "[930]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*943*/ { "[9300]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*944*/ { "[94]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "94123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*945*/ { "[94]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*946*/ { "[940]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*947*/ { "[9400]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*948*/ { "[95]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "95123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*949*/ { "[95]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*950*/ { "[950]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*951*/ { "[9500]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*952*/ { "[96]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "96123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*953*/ { "[96]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*954*/ { "[960]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*955*/ { "[9600]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*956*/ { "[97]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "97123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*957*/ { "[97]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*958*/ { "[970]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*959*/ { "[9700]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*960*/ { "[98]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "98123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*961*/ { "[98]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*962*/ { "[980]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*963*/ { "[9800]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*964*/ { "[99]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, "99123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" },
|
||||
/*965*/ { "[99]1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*966*/ { "[990]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*967*/ { "[9900]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*968*/ { "[9999]1234", ZINT_ERROR_INVALID_DATA, "" },
|
||||
/*969*/ { "[01]12345678901234[7006]200101", ZINT_WARN_NONCOMPLIANT, "01123456789012347006200101" },
|
||||
/*970*/ { "[01]12345678901231[7006]200101", 0, "01123456789012317006200101" },
|
||||
/*971*/ { "[3900]1234567890[01]12345678901234", ZINT_WARN_NONCOMPLIANT, "39001234567890[0112345678901234" },
|
||||
/*972*/ { "[3900]1234567890[01]12345678901231", 0, "39001234567890[0112345678901231" },
|
||||
/*973*/ { "[253]12345678901234[3901]12345678901234[20]12", ZINT_WARN_NONCOMPLIANT, "25312345678901234[390112345678901234[2012" },
|
||||
/*974*/ { "[253]12345678901284[3901]12345678901234[20]12", 0, "25312345678901284[390112345678901234[2012" },
|
||||
/*975*/ { "[253]12345678901234[01]12345678901234[3901]12345678901234[20]12", ZINT_WARN_NONCOMPLIANT, "25312345678901234[0112345678901234390112345678901234[2012" },
|
||||
/*976*/ { "[253]12345678901284[01]12345678901231[3901]12345678901234[20]12", 0, "25312345678901284[0112345678901231390112345678901234[2012" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -1780,77 +1792,121 @@ static void test_input_mode(int index, int debug) {
|
||||
/* 1*/ { BARCODE_AZTEC, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 2*/ { BARCODE_AZTEC, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 3*/ { BARCODE_AZTEC, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 4*/ { BARCODE_AZTEC, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 5*/ { BARCODE_AZTEC, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 6*/ { BARCODE_AZTEC, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 7*/ { BARCODE_AZTEC, "[01]12345678901231", GS1_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 8*/ { BARCODE_AZTEC, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 9*/ { BARCODE_AZTEC, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 10*/ { BARCODE_AZTEC, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 11*/ { BARCODE_CODABLOCKF, "[01]12345678901231", GS1_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 }, // Codablock-F does not support GS1
|
||||
/* 12*/ { BARCODE_CODABLOCKF, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 13*/ { BARCODE_CODABLOCKF, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 14*/ { BARCODE_CODABLOCKF, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 15*/ { BARCODE_CODEONE, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 16*/ { BARCODE_CODEONE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 17*/ { BARCODE_CODEONE, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 18*/ { BARCODE_CODEONE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 19*/ { BARCODE_CODEONE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 20*/ { BARCODE_CODEONE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 21*/ { BARCODE_CODEONE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 22*/ { BARCODE_CODEONE, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 23*/ { BARCODE_CODEONE, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 24*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 25*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 26*/ { BARCODE_CODE16K, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 27*/ { BARCODE_CODE16K, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 28*/ { BARCODE_CODE16K, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 29*/ { BARCODE_CODE16K, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 30*/ { BARCODE_CODE16K, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 31*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 32*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 33*/ { BARCODE_CODE16K, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 34*/ { BARCODE_CODE16K, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 35*/ { BARCODE_CODE49, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 36*/ { BARCODE_CODE49, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 37*/ { BARCODE_CODE49, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 38*/ { BARCODE_CODE49, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 39*/ { BARCODE_CODE49, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 40*/ { BARCODE_CODE49, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 41*/ { BARCODE_CODE49, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 42*/ { BARCODE_CODE49, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 43*/ { BARCODE_CODE49, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 44*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 45*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 46*/ { BARCODE_DATAMATRIX, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 47*/ { BARCODE_DATAMATRIX, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 48*/ { BARCODE_DATAMATRIX, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 49*/ { BARCODE_DATAMATRIX, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 50*/ { BARCODE_DATAMATRIX, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 51*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 52*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 53*/ { BARCODE_DATAMATRIX, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 54*/ { BARCODE_DATAMATRIX, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 55*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 56*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 57*/ { BARCODE_DOTCODE, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 58*/ { BARCODE_DOTCODE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 59*/ { BARCODE_DOTCODE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 60*/ { BARCODE_DOTCODE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 61*/ { BARCODE_DOTCODE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 62*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE, READER_INIT, 0, 0 }, // Reader Init permissible with default GS1 mode
|
||||
/* 63*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, 0, 1 },
|
||||
/* 64*/ { BARCODE_DOTCODE, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 65*/ { BARCODE_DOTCODE, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 66*/ { BARCODE_QRCODE, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 67*/ { BARCODE_QRCODE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 68*/ { BARCODE_QRCODE, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 69*/ { BARCODE_QRCODE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 70*/ { BARCODE_QRCODE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 71*/ { BARCODE_QRCODE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 72*/ { BARCODE_QRCODE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 73*/ { BARCODE_QRCODE, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 74*/ { BARCODE_QRCODE, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 4*/ { BARCODE_AZTEC, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 5*/ { BARCODE_AZTEC, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 6*/ { BARCODE_AZTEC, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 7*/ { BARCODE_AZTEC, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 8*/ { BARCODE_AZTEC, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 9*/ { BARCODE_AZTEC, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 10*/ { BARCODE_AZTEC, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 11*/ { BARCODE_AZTEC, "[01]1234567890123", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 12*/ { BARCODE_AZTEC, "[01]1234567890123", GS1_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 13*/ { BARCODE_AZTEC, "[01]12345678901231", GS1_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 14*/ { BARCODE_AZTEC, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 15*/ { BARCODE_AZTEC, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 16*/ { BARCODE_AZTEC, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 17*/ { BARCODE_AZTEC, "1234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 }, // Must still begin with AI
|
||||
/* 18*/ { BARCODE_CODABLOCKF, "[01]12345678901231", GS1_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 }, // Codablock-F does not support GS1
|
||||
/* 19*/ { BARCODE_CODABLOCKF, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 20*/ { BARCODE_CODABLOCKF, "[01]12345678901231", GS1_MODE | ESCAPE_MODE | GS1NOCHECK_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 21*/ { BARCODE_CODABLOCKF, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 22*/ { BARCODE_CODABLOCKF, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 23*/ { BARCODE_CODEONE, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 24*/ { BARCODE_CODEONE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 25*/ { BARCODE_CODEONE, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 26*/ { BARCODE_CODEONE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 27*/ { BARCODE_CODEONE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 28*/ { BARCODE_CODEONE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 29*/ { BARCODE_CODEONE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 30*/ { BARCODE_CODEONE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 31*/ { BARCODE_CODEONE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 32*/ { BARCODE_CODEONE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 33*/ { BARCODE_CODEONE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 34*/ { BARCODE_CODEONE, "[01]1234567890123", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 35*/ { BARCODE_CODEONE, "[01]1234567890123", GS1_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 36*/ { BARCODE_CODEONE, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 37*/ { BARCODE_CODEONE, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 38*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 39*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 40*/ { BARCODE_CODE16K, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 41*/ { BARCODE_CODE16K, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 42*/ { BARCODE_CODE16K, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 43*/ { BARCODE_CODE16K, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 44*/ { BARCODE_CODE16K, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 45*/ { BARCODE_CODE16K, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 46*/ { BARCODE_CODE16K, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 47*/ { BARCODE_CODE16K, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 48*/ { BARCODE_CODE16K, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 49*/ { BARCODE_CODE16K, "[01]1234567890123", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 50*/ { BARCODE_CODE16K, "[01]1234567890123", GS1_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 51*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 52*/ { BARCODE_CODE16K, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 53*/ { BARCODE_CODE16K, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 54*/ { BARCODE_CODE16K, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 55*/ { BARCODE_CODE49, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 56*/ { BARCODE_CODE49, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 57*/ { BARCODE_CODE49, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 58*/ { BARCODE_CODE49, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 59*/ { BARCODE_CODE49, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 60*/ { BARCODE_CODE49, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 61*/ { BARCODE_CODE49, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 62*/ { BARCODE_CODE49, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 63*/ { BARCODE_CODE49, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 64*/ { BARCODE_CODE49, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 65*/ { BARCODE_CODE49, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 66*/ { BARCODE_CODE49, "[01]1234567890123", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 67*/ { BARCODE_CODE49, "[01]1234567890123", GS1_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 68*/ { BARCODE_CODE49, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 69*/ { BARCODE_CODE49, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 70*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 71*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 72*/ { BARCODE_DATAMATRIX, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 73*/ { BARCODE_DATAMATRIX, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 74*/ { BARCODE_DATAMATRIX, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 75*/ { BARCODE_DATAMATRIX, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 76*/ { BARCODE_DATAMATRIX, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 77*/ { BARCODE_DATAMATRIX, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 78*/ { BARCODE_DATAMATRIX, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 79*/ { BARCODE_DATAMATRIX, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 80*/ { BARCODE_DATAMATRIX, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 81*/ { BARCODE_DATAMATRIX, "[01]1234567890123", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 82*/ { BARCODE_DATAMATRIX, "[01]1234567890123", GS1_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 83*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 84*/ { BARCODE_DATAMATRIX, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, ZINT_ERROR_INVALID_OPTION, 0 },
|
||||
/* 85*/ { BARCODE_DATAMATRIX, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 86*/ { BARCODE_DATAMATRIX, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 87*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/* 88*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/* 89*/ { BARCODE_DOTCODE, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/* 90*/ { BARCODE_DOTCODE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 91*/ { BARCODE_DOTCODE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 92*/ { BARCODE_DOTCODE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 93*/ { BARCODE_DOTCODE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 94*/ { BARCODE_DOTCODE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 95*/ { BARCODE_DOTCODE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/* 96*/ { BARCODE_DOTCODE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/* 97*/ { BARCODE_DOTCODE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/* 98*/ { BARCODE_DOTCODE, "[01]1234567890123", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/* 99*/ { BARCODE_DOTCODE, "[01]1234567890123", GS1_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/*100*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE, READER_INIT, 0, 0 }, // Reader Init permissible with default GS1 mode
|
||||
/*101*/ { BARCODE_DOTCODE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, READER_INIT, 0, 1 },
|
||||
/*102*/ { BARCODE_DOTCODE, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/*103*/ { BARCODE_DOTCODE, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/*104*/ { BARCODE_QRCODE, "[01]12345678901231", GS1_MODE, -1, 0, 0 },
|
||||
/*105*/ { BARCODE_QRCODE, "[01]12345678901231", GS1_MODE | ESCAPE_MODE, -1, 0, 1 },
|
||||
/*106*/ { BARCODE_QRCODE, "(01)12345678901231", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, 0, 1 },
|
||||
/*107*/ { BARCODE_QRCODE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/*108*/ { BARCODE_QRCODE, "(01)12345678901234", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/*109*/ { BARCODE_QRCODE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/*110*/ { BARCODE_QRCODE, "(01)123456789012345", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/*111*/ { BARCODE_QRCODE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/*112*/ { BARCODE_QRCODE, "(01)12345678901234A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/*113*/ { BARCODE_QRCODE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, -1, ZINT_WARN_NONCOMPLIANT, 0 },
|
||||
/*114*/ { BARCODE_QRCODE, "(01)1234567890123A", GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE, -1, 0, 1 },
|
||||
/*115*/ { BARCODE_QRCODE, "[01]1234567890123", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/*116*/ { BARCODE_QRCODE, "[01]1234567890123", GS1_MODE | GS1NOCHECK_MODE, -1, 0, 0 },
|
||||
/*117*/ { BARCODE_QRCODE, "1234", GS1_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
/*118*/ { BARCODE_QRCODE, "1234", GS1_MODE | ESCAPE_MODE, -1, ZINT_ERROR_INVALID_DATA, 0 },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -1883,6 +1939,157 @@ static void test_input_mode(int index, int debug) {
|
||||
testFinish();
|
||||
}
|
||||
|
||||
/*
|
||||
* Check GS1NOCHECK_MODE for GS1_128-based and DBAR_EXP-based symbologies
|
||||
*/
|
||||
static void test_gs1nocheck_mode(int index, int debug) {
|
||||
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
char *data;
|
||||
char *composite;
|
||||
int ret;
|
||||
char *expected_errtxt;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_GS1_128, -1, "[01]12345678901231", "", 0, "" },
|
||||
/* 1*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]12345678901231", "", 0, "" },
|
||||
/* 2*/ { BARCODE_GS1_128, -1, "[01]12345678901234", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (01) position 14: Bad checksum '4', expected '1'" },
|
||||
/* 3*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]12345678901234", "", 0, "" },
|
||||
/* 4*/ { BARCODE_GS1_128, -1, "[01]123456789012345", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (01)" },
|
||||
/* 5*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]123456789012345", "", 0, "" },
|
||||
/* 6*/ { BARCODE_GS1_128, -1, "[01]1234567890123", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (01)" },
|
||||
/* 7*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]1234567890123", "", 0, "" },
|
||||
/* 8*/ { BARCODE_GS1_128, -1, "[01]12345678901231[20]1", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (20)" },
|
||||
/* 9*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]12345678901231[20]1", "", 0, "" },
|
||||
/* 10*/ { BARCODE_GS1_128, -1, "[03]123", "", ZINT_ERROR_INVALID_DATA, "Error 260: Invalid AI (03)" },
|
||||
/* 11*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[03]123", "", 0, "" },
|
||||
/* 12*/ { BARCODE_GS1_128, -1, "[04]1234[05]12345[06]123456", "", ZINT_ERROR_INVALID_DATA, "Error 260: Invalid AI (04)" },
|
||||
/* 13*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[04]1234[05]12345[06]123456", "", 0, "" },
|
||||
/* 14*/ { BARCODE_GS1_128, -1, "[01]1234567890123A", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (01) position 14: Non-numeric character 'A'" },
|
||||
/* 15*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]1234567890123A", "", 0, "" },
|
||||
/* 16*/ { BARCODE_GS1_128, -1, "[01]1234567890123.", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (01) position 14: Non-numeric character '.'" },
|
||||
/* 17*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]1234567890123.", "", 0, "" },
|
||||
/* 18*/ { BARCODE_GS1_128, -1, "[01]1234567890123\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" },
|
||||
/* 19*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]1234567890123\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, // Nonprintable ASCII still checked
|
||||
/* 20*/ { BARCODE_GS1_128, -1, "[01]1234567890123\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" },
|
||||
/* 21*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]1234567890123\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, // Extended ASCII still checked
|
||||
/* 22*/ { BARCODE_GS1_128, -1, "0112345678901231", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" },
|
||||
/* 23*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "0112345678901231", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked
|
||||
/* 24*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]12", 0, "" },
|
||||
/* 25*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]12", 0, "" },
|
||||
/* 26*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901234", "[20]12", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (01) position 14: Bad checksum '4', expected '1' in linear component" },
|
||||
/* 27*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901234", "[20]12", 0, "" },
|
||||
/* 28*/ { BARCODE_GS1_128_CC, -1, "[01]123456789012345", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (01) in linear component" },
|
||||
/* 29*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]123456789012345", "[20]12", 0, "" },
|
||||
/* 30*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]123", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (20) in 2D component" },
|
||||
/* 31*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]123", 0, "" },
|
||||
/* 32*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" },
|
||||
/* 33*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]1A", 0, "" },
|
||||
/* 34*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" },
|
||||
/* 35*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked
|
||||
/* 36*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121\200", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in linear component" },
|
||||
/* 37*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121\200", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in linear component" },
|
||||
/* 38*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" },
|
||||
/* 39*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked
|
||||
/* 40*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" },
|
||||
/* 41*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked
|
||||
/* 42*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", "", 0, "" },
|
||||
/* 43*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231", "", 0, "" },
|
||||
/* 44*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]1234", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" },
|
||||
/* 45*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "", 0, "" },
|
||||
/* 46*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]1234A", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" },
|
||||
/* 47*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234A", "", 0, "" },
|
||||
/* 48*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]12345A", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 6: Non-numeric character 'A'" },
|
||||
/* 49*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]12345A", "", 0, "" },
|
||||
/* 50*/ { BARCODE_DBAR_EXP, -1, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" },
|
||||
/* 51*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, // Nonprintable ASCII still checked
|
||||
/* 52*/ { BARCODE_DBAR_EXP, -1, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" },
|
||||
/* 53*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, // Extended ASCII still checked
|
||||
/* 54*/ { BARCODE_DBAR_EXP, -1, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" },
|
||||
/* 55*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked
|
||||
/* 56*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 57*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 58*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11) in linear component" },
|
||||
/* 59*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 60*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 3: Invalid month '34' in linear component" },
|
||||
/* 61*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 62*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (30) in 2D component" },
|
||||
/* 63*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", 0, "" },
|
||||
/* 64*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (30) position 8: Non-numeric character 'A' in 2D component" },
|
||||
/* 65*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", 0, "" },
|
||||
/* 66*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" },
|
||||
/* 67*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked
|
||||
/* 68*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" },
|
||||
/* 69*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked
|
||||
/* 70*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" },
|
||||
/* 71*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked
|
||||
/* 72*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", "", 0, "" },
|
||||
/* 73*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231", "", 0, "" },
|
||||
/* 74*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]1234", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" },
|
||||
/* 75*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "", 0, "" },
|
||||
/* 76*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]1234A", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" },
|
||||
/* 77*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234A", "", 0, "" },
|
||||
/* 78*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]12345A", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 6: Non-numeric character 'A'" },
|
||||
/* 79*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]12345A", "", 0, "" },
|
||||
/* 80*/ { BARCODE_DBAR_EXPSTK, -1, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" },
|
||||
/* 81*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, // Nonprintable ASCII still checked
|
||||
/* 82*/ { BARCODE_DBAR_EXPSTK, -1, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" },
|
||||
/* 83*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, // Extended ASCII still checked
|
||||
/* 84*/ { BARCODE_DBAR_EXPSTK, -1, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" },
|
||||
/* 85*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked
|
||||
/* 86*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 87*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 88*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11) in linear component" },
|
||||
/* 89*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 90*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 3: Invalid month '34' in linear component" },
|
||||
/* 91*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", 0, "" },
|
||||
/* 92*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (30) in 2D component" },
|
||||
/* 93*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", 0, "" },
|
||||
/* 94*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (30) position 8: Non-numeric character 'A' in 2D component" },
|
||||
/* 95*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", 0, "" },
|
||||
/* 96*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" },
|
||||
/* 97*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked
|
||||
/* 98*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" },
|
||||
/* 99*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked
|
||||
/*100*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" },
|
||||
/*101*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char *text;
|
||||
|
||||
testStart("test_gs1nocheck_mode");
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
if (index != -1 && i != index) continue;
|
||||
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
if (data[i].composite[0]) {
|
||||
text = data[i].composite;
|
||||
strcpy(symbol->primary, data[i].data);
|
||||
} else {
|
||||
text = data[i].data;
|
||||
}
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, text, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) text, length);
|
||||
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);
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
}
|
||||
|
||||
testFinish();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
|
||||
@ -1891,6 +2098,7 @@ int main(int argc, char *argv[]) {
|
||||
{ "test_gs1_verify", test_gs1_verify, 1, 0, 1 },
|
||||
{ "test_gs1_lint", test_gs1_lint, 1, 0, 1 },
|
||||
{ "test_input_mode", test_input_mode, 1, 0, 1 },
|
||||
{ "test_gs1nocheck_mode", test_gs1nocheck_mode, 1, 0, 1 },
|
||||
};
|
||||
|
||||
testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
|
||||
|
@ -184,6 +184,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
int option_2;
|
||||
char *data;
|
||||
|
||||
@ -196,109 +197,109 @@ static void test_examples(int index, int generate, int debug) {
|
||||
};
|
||||
// Verified manually against GS1 General Specifications 21.0.1 (GGS) and ISO/IEC 24724:2011, and verified via bwipp_dump.ps against BWIPP
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DBAR_OMN, -1, "0950110153001", 0, 1, 96, 1, "GGS Figure 5.5.2.1.1-1. GS1 DataBar Omnidirectional",
|
||||
/* 0*/ { BARCODE_DBAR_OMN, -1, -1, "0950110153001", 0, 1, 96, 1, "GGS Figure 5.5.2.1.1-1. GS1 DataBar Omnidirectional",
|
||||
"010000010100000101000111110000010111101101011100100011011101000101100000000111001110110111001101"
|
||||
},
|
||||
/* 1*/ { BARCODE_DBAR_EXP, -1, "[01]90614141000015[3202]000150", 0, 1, 151, 1, "GGS Figure 5.5.2.3.1-1. GS1 DataBar Expanded",
|
||||
/* 1*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90614141000015[3202]000150", 0, 1, 151, 1, "GGS Figure 5.5.2.3.1-1. GS1 DataBar Expanded",
|
||||
"0101100011001100001011111111000010100100010000111101110011100010100010111100000011100111010111111011010100000100000110001111110000101000000100011010010"
|
||||
},
|
||||
/* 2*/ { BARCODE_DBAR_EXPSTK, -1, "[01]90614141000015[3202]000150", 0, 5, 102, 1, "GGS Figure 5.5.2.3.2-1. GS1 DataBar Expanded Stacked, same (tec-it separator differs)",
|
||||
/* 2*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]90614141000015[3202]000150", 0, 5, 102, 1, "GGS Figure 5.5.2.3.2-1. GS1 DataBar Expanded Stacked, same (tec-it separator differs)",
|
||||
"010110001100110000101111111100001010010001000011110111001110001010001011110000001110011101011111101101"
|
||||
"000001110011001111010000000010100101101110111100001000110001110101110100001010100001100010100000010000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000001011111011111001010000001010010111111011100100000000000000000000000000000000000000000000000000000"
|
||||
"001010100000100000110001111110000101000000100011010010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 3*/ { BARCODE_DBAR_OMN, -1, "2001234567890", 0, 1, 96, 1, "24724:2011 Figure 1 — GS1 DataBar Omnidirectional",
|
||||
/* 3*/ { BARCODE_DBAR_OMN, -1, -1, "2001234567890", 0, 1, 96, 1, "24724:2011 Figure 1 — GS1 DataBar Omnidirectional",
|
||||
"010100011101000001001111111000010100110110111110110000010010100101100000000111000110110110001101"
|
||||
},
|
||||
/* 4*/ { BARCODE_DBAR_OMN, -1, "0441234567890", 0, 1, 96, 1, "24724:2011 Figure 2 — GS1 DataBar Omnidirectional",
|
||||
/* 4*/ { BARCODE_DBAR_OMN, -1, -1, "0441234567890", 0, 1, 96, 1, "24724:2011 Figure 2 — GS1 DataBar Omnidirectional",
|
||||
"010010001000010001000111000000010101000001100110101100100100000101111110000011000010100011100101"
|
||||
},
|
||||
/* 5*/ { BARCODE_DBAR_OMN, -1, "0001234567890", 0, 1, 96, 1, "24724:2011 Figure 4 — GS1 DataBar Truncated",
|
||||
/* 5*/ { BARCODE_DBAR_OMN, -1, -1, "0001234567890", 0, 1, 96, 1, "24724:2011 Figure 4 — GS1 DataBar Truncated",
|
||||
"010101001000000001001111111000010111001011011110111001010110000101111111000111001100111101110101"
|
||||
},
|
||||
/* 6*/ { BARCODE_DBAR_STK, -1, "0001234567890", 0, 3, 50, 1, "24724:2011 Figure 5 — GS1 DataBar Stacked NOTE: Figure 5 separator differs from GGS Figure 5.5.2.1.3-1. which has ends set",
|
||||
/* 6*/ { BARCODE_DBAR_STK, -1, -1, "0001234567890", 0, 3, 50, 1, "24724:2011 Figure 5 — GS1 DataBar Stacked NOTE: Figure 5 separator differs from GGS Figure 5.5.2.1.3-1. which has ends set",
|
||||
"01010100100000000100111111100001011100101101111010"
|
||||
"00001010101011111010000000111010100011010010000000"
|
||||
"10111001010110000101111111000111001100111101110101"
|
||||
},
|
||||
/* 7*/ { BARCODE_DBAR_OMNSTK, -1, "0003456789012", 0, 5, 50, 1, "24724:2011 Figure 6 — GS1 DataBar Stacked Omnidirectional",
|
||||
/* 7*/ { BARCODE_DBAR_OMNSTK, -1, -1, "0003456789012", 0, 5, 50, 1, "24724:2011 Figure 6 — GS1 DataBar Stacked Omnidirectional",
|
||||
"01010100100000000100111110000001010011100110011010"
|
||||
"00001011011111111010000001010100101100011001100000"
|
||||
"00000101010101010101010101010101010101010101010000"
|
||||
"00001000100010111010010101010000111101001101110000"
|
||||
"10110111011101000101100000000111000010110010001101"
|
||||
},
|
||||
/* 8*/ { BARCODE_DBAR_LTD, -1, "1501234567890", 0, 1, 79, 1, "24724:2011 Figure 7 — GS1 DataBar Limited",
|
||||
/* 8*/ { BARCODE_DBAR_LTD, -1, -1, "1501234567890", 0, 1, 79, 1, "24724:2011 Figure 7 — GS1 DataBar Limited",
|
||||
"0100011001100011011010100111010010101101001101001001011000110111001100110100000"
|
||||
},
|
||||
/* 9*/ { BARCODE_DBAR_LTD, -1, "0031234567890", 0, 1, 79, 1, "24724:2011 Figure 8 — (a) GS1 DataBar Limited",
|
||||
/* 9*/ { BARCODE_DBAR_LTD, -1, -1, "0031234567890", 0, 1, 79, 1, "24724:2011 Figure 8 — (a) GS1 DataBar Limited",
|
||||
"0101010000010010001000010111001010110110100101011000001010010010110000010100000"
|
||||
},
|
||||
/* 10*/ { BARCODE_DBAR_EXP, -1, "[01]98898765432106[3202]012345[15]991231", 0, 1, 200, 1, "24724:2011 Figure 10 — GS1 DataBar Expanded",
|
||||
/* 10*/ { BARCODE_DBAR_EXP, -1, -1, "[01]98898765432106[3202]012345[15]991231", 0, 1, 200, 1, "24724:2011 Figure 10 — GS1 DataBar Expanded",
|
||||
"01001000011000110110111111110000101110000110010100011010000001100010101111110000111010011100000010010100111110111001100011111100001011101100000100100100011110010110001011111111001110001101111010000101"
|
||||
},
|
||||
/* 11*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3103]001750", 0, 1, 151, 1, "24724:2011 Figure 11 — GS1 DataBar Expanded",
|
||||
/* 11*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3103]001750", 0, 1, 151, 1, "24724:2011 Figure 11 — GS1 DataBar Expanded",
|
||||
"0101110010000010011011111111000010111000010011000101011110111001100010111100000011100101110001110111011110101111000110001111110000101011000010011111010"
|
||||
},
|
||||
/* 12*/ { BARCODE_DBAR_EXPSTK, -1, "[01]98898765432106[3202]012345[15]991231", 0, 5, 102, 1, "24724:2011 Figure 12 — GS1 DataBar Expanded Stacked symbol",
|
||||
/* 12*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]98898765432106[3202]012345[15]991231", 0, 5, 102, 1, "24724:2011 Figure 12 — GS1 DataBar Expanded Stacked symbol",
|
||||
"010010000110001101101111111100001011100001100101000110100000011000101011111100001110100111000000100101"
|
||||
"000001111001110010010000000010100100011110011010111001011111100111010100000010100001011000111111010000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000011101000010011100001000000001011100101100001110110110111110010001001010000001010011000100000110000"
|
||||
"101000010111101100011100111111110100011010011110001001001000001101110100001111110001100111011111001010"
|
||||
},
|
||||
/* 13*/ { BARCODE_DBAR_EXPSTK, -1, "[01]95012345678903[3103]000123", 0, 5, 102, 1, "24724:2011 Figure 13 — GS1 DataBar Expanded Stacked",
|
||||
/* 13*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]95012345678903[3103]000123", 0, 5, 102, 1, "24724:2011 Figure 13 — GS1 DataBar Expanded Stacked",
|
||||
"010100010001111000101111111100001010111000001100010111000110001001101011110000001110010111000111011101"
|
||||
"000011101110000111010000000010100101000111110011101000111001110110010100001010100001101000111000100000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000000001010000111001010000001010010111011011111100000000000000000000000000000000000000000000000000000"
|
||||
"001011110101111000110001111110000101000100100000011010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 14*/ { BARCODE_DBAR_LTD, -1, "0009876543210", 0, 1, 79, 1, "24724:2011 Figure F.2 — GS1 DataBar Limited",
|
||||
/* 14*/ { BARCODE_DBAR_LTD, -1, -1, "0009876543210", 0, 1, 79, 1, "24724:2011 Figure F.2 — GS1 DataBar Limited",
|
||||
"0101010010010011000011000001010110100101100101000100010100010000010010010100000"
|
||||
},
|
||||
/* 15*/ { BARCODE_DBAR_EXP, -1, "[10]12A", 0, 1, 102, 1, "24724:2011 Figure F.3 — GS1 DataBar Expanded",
|
||||
/* 15*/ { BARCODE_DBAR_EXP, -1, -1, "[10]12A", 0, 1, 102, 1, "24724:2011 Figure F.3 — GS1 DataBar Expanded",
|
||||
"010100000110100000101111111100001010001000000010110101111100100111001011110000000010011101111111010101"
|
||||
},
|
||||
/* 16*/ { BARCODE_DBAR_STK, -1, "0000000000000", 0, 3, 50, 1, "#183 GS1 DataBar Stacked separator alternation; verified manually against tec-it.com",
|
||||
/* 16*/ { BARCODE_DBAR_STK, -1, -1, "0000000000000", 0, 3, 50, 1, "#183 GS1 DataBar Stacked separator alternation; verified manually against tec-it.com",
|
||||
"01010100100000000100011111111001011111110010101010"
|
||||
"00000101011111111010100000001010100000001101010000"
|
||||
"10101010110000000101111111110111011111111011010101"
|
||||
},
|
||||
/* 17*/ { BARCODE_DBAR_EXP, -1, "[255]95011015340010123456789", 0, 1, 232, 1, "GGS 2.6.2.1 Example 1",
|
||||
/* 17*/ { BARCODE_DBAR_EXP, -1, -1, "[255]95011015340010123456789", 0, 1, 232, 1, "GGS 2.6.2.1 Example 1",
|
||||
"0100011000110001011011111111000010100000010101100001100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111011001000111100100101111111100111011111001100100110010011100010111100011110000001010"
|
||||
},
|
||||
/* 18*/ { BARCODE_DBAR_EXP, -1, "[255]95011015340010123456789[3900]000", 0, 1, 298, 1, "GGS 2.6.2.1 Example 2",
|
||||
/* 18*/ { BARCODE_DBAR_EXP, -1, -1, "[255]95011015340010123456789[3900]000", 0, 1, 298, 1, "GGS 2.6.2.1 Example 2",
|
||||
"0101100011111010001011111111000010100001000001001101100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111011001000111100100101111111100111011111001100100110010011100010111100011000000001010111111011101000100001000110001101011111111100110011110010010001101"
|
||||
},
|
||||
/* 19*/ { BARCODE_DBAR_EXP, -1, "[255]9501101534001[17]160531[3902]050", 0, 1, 281, 1, "GGS 2.6.2.1 Example 3",
|
||||
/* 19*/ { BARCODE_DBAR_EXP, -1, -1, "[255]9501101534001[17]160531[3902]050", 0, 1, 281, 1, "GGS 2.6.2.1 Example 3",
|
||||
"01011001000110011110111111110000101000000101011000011000011001110010101111100000011001000011101000010010000110111110100011111100001010010111111001110111000010010100001011111111001110000100001100110100010000001101001000110000000010111010011110011101110010110001100010111111111001101"
|
||||
},
|
||||
/* 20*/ { BARCODE_DBAR_EXPSTK, 3, "[255]9501101534001012345[8111]0500", 0, 5, 151, 1, "GGS 2.6.2.1 Example 4, same (tec-it separator differs)",
|
||||
/* 20*/ { BARCODE_DBAR_EXPSTK, -1, 3, "[255]9501101534001012345[8111]0500", 0, 5, 151, 1, "GGS 2.6.2.1 Example 4, same (tec-it separator differs)",
|
||||
"0101100111100011001011111111000010100000010101100001100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111010"
|
||||
"0000011000011100110100000000101001011111101010011110011110011000110101000001010100011011110001011110110111100100000101010000001010010110100000011000000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"0000110111000011011010000000010000100000100111011001100001100100010010100101010100101110110001111001011101100011101110100000000010000000000000000000000"
|
||||
"1011001000111100100101111111100111011111011000100110011110011011101100011000000001010001001110000110100010011100010001011111111100110100000000000000000"
|
||||
},
|
||||
/* 21*/ { BARCODE_DBAR_EXPSTK, 3, "[255]9501101534001[3941]0035", 0, 5, 151, 1, "GGS 2.6.2.1 Example 5, same (tec-it separator differs)",
|
||||
/* 21*/ { BARCODE_DBAR_EXPSTK, -1, 3, "[255]9501101534001[3941]0035", 0, 5, 151, 1, "GGS 2.6.2.1 Example 5, same (tec-it separator differs)",
|
||||
"0100001101011000011011111111000010100000010101100001100001100111001010111110000001100100001110100001001000011011111010001111110000101001011111100111010"
|
||||
"0000110010100111100100000000101001011111101010011110011110011000110101000001010100011011110001011110110111100100000101010000001010010110100000011000000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"0000011011111011111010000000010000111100101011111001000100011100111010100001010100000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"1010100100000100000101111111100111000011010100000110111011100011000100011110000001010000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 22*/ { BARCODE_DBAR_OMN, -1, "0950110153000", 0, 1, 96, 1, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it",
|
||||
/* 22*/ { BARCODE_DBAR_OMN, -1, -1, "0950110153000", 0, 1, 96, 1, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it",
|
||||
"010000010100000101000111111110010111101101011100100011011011000101111110000011001110110111001101"
|
||||
},
|
||||
/* 23*/ { BARCODE_DBAR_STK, -1, "0950110153000", 0, 3, 50, 1, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it",
|
||||
/* 23*/ { BARCODE_DBAR_STK, -1, -1, "0950110153000", 0, 3, 50, 1, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it",
|
||||
"01000001010000010100011111111001011110110101110010"
|
||||
"00001100101101101010100001010100100001001010100000"
|
||||
"10100011011011000101111110000011001110110111001101"
|
||||
},
|
||||
/* 24*/ { BARCODE_DBAR_EXPSTK, -1, "[01]09501101530003[17]140704[10]AB-123", 0, 9, 102, 1, "https://www.gs1.org/standards/barcodes/databar, same (tec-it separator differs)",
|
||||
/* 24*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]09501101530003[17]140704[10]AB-123", 0, 9, 102, 1, "https://www.gs1.org/standards/barcodes/databar, same (tec-it separator differs)",
|
||||
"010101111100001001101111111100001011100001110110010100000011011010001011111000000110011010000001001101"
|
||||
"000010000011110110010000000010100100011110001001101011111100100101110100000101010001100101111110110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -309,64 +310,64 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000010111101011110010100101010100100111100110010111001001100011111010100000000010000000000000000000000"
|
||||
"010001000010100001100011000000001011000011001101000110110011100000101011111111100110100000000000000000"
|
||||
},
|
||||
/* 25*/ { BARCODE_DBAR_EXP, -1, "[01]09501101530003[17]140704[10]AB-123", 0, 1, 281, 1, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it",
|
||||
/* 25*/ { BARCODE_DBAR_EXP, -1, -1, "[01]09501101530003[17]140704[10]AB-123", 0, 1, 281, 1, "https://www.gs1.org/standards/barcodes/databar, same, verified manually against tec-it",
|
||||
"01010111110000100110111111110000101110000111011001010000001101101000101111100000011001101000000100110001110100010001100011111100001010100000111100100100100111000001001011111111001110000011011001000100010000101000011000110000000010110000110011010001101100111000001010111111111001101"
|
||||
},
|
||||
/* 26*/ { BARCODE_DBAR_STK, -1, "07010001234567", 0, 3, 50, 1, "https://www.gs1.no/support/standardbibliotek/datafangst/gs1-databar, same, verified manually against tec-it",
|
||||
/* 26*/ { BARCODE_DBAR_STK, -1, -1, "07010001234567", 0, 3, 50, 1, "https://www.gs1.no/support/standardbibliotek/datafangst/gs1-databar, same, verified manually against tec-it",
|
||||
"01000100001010000100011100000001011000100110001010"
|
||||
"00000011010101011010101011111010100111010101010000"
|
||||
"10111100101110100101100000000111011000001000110101"
|
||||
},
|
||||
/* 27*/ { BARCODE_DBAR_OMNSTK, -1, "12380000000008", 0, 5, 50, 1, "Example with finder values 3 & 3; for bottom row see 5.3.2.2, same as BWIPP (tec-it and IDAutomation differ (ie no shift))",
|
||||
/* 27*/ { BARCODE_DBAR_OMNSTK, -1, -1, "12380000000008", 0, 5, 50, 1, "Example with finder values 3 & 3; for bottom row see 5.3.2.2, same as BWIPP (tec-it and IDAutomation differ (ie no shift))",
|
||||
"01011101001000000100010000000001010000001101011010"
|
||||
"00000010110111111010101010101010101111110010100000"
|
||||
"00000101010101010101010101010101010101010101010000"
|
||||
"00001101100011001010000000000100101100111011110000"
|
||||
"10100010011100110101111111110111010011000100001101"
|
||||
},
|
||||
/* 28*/ { BARCODE_DBAR_OMNSTK, -1, "99991234912372", 0, 5, 50, 1, "Example with finder values 8 & 6, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
/* 28*/ { BARCODE_DBAR_OMNSTK, -1, -1, "99991234912372", 0, 5, 50, 1, "Example with finder values 8 & 6, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
"01001011101110000101110000000001011111011100101010"
|
||||
"00000100010001111010001010101010100000100011010000"
|
||||
"00000101010101010101010101010101010101010101010000"
|
||||
"00001000100011001010000000010100100001000100100000"
|
||||
"10100111011100110101111111100011011110111011011101"
|
||||
},
|
||||
/* 29*/ { BARCODE_DBAR_OMNSTK, -1, "32219876543217", 0, 5, 50, 1, "Example with finder values 6 & 1, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
/* 29*/ { BARCODE_DBAR_OMNSTK, -1, -1, "32219876543217", 0, 5, 50, 1, "Example with finder values 6 & 1, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
"01001011000010001100111000000001011100010101000010"
|
||||
"00000100111101110010000101010100100011101010110000"
|
||||
"00000101010101010101010101010101010101010101010000"
|
||||
"00001110011100101010000010101000110100001000010000"
|
||||
"10110001100011010101111100000111001011110111100101"
|
||||
},
|
||||
/* 30*/ { BARCODE_DBAR_OMNSTK, -1, "32219876543255", 0, 5, 50, 1, "Example with finder values 7 & 7, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
/* 30*/ { BARCODE_DBAR_OMNSTK, -1, -1, "32219876543255", 0, 5, 50, 1, "Example with finder values 7 & 7, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
"01001011000010001101111100000001011100010101000010"
|
||||
"00000100111101110010000010101010100011101010110000"
|
||||
"00000101010101010101010101010101010101010101010000"
|
||||
"00000111001110101010000000101010110100001000010000"
|
||||
"10111000110001010101111111000001001011110111100101"
|
||||
},
|
||||
/* 31*/ { BARCODE_DBAR_OMNSTK, -1, "04072912296211", 0, 5, 50, 1, "Example with finder values 7 & 8, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
/* 31*/ { BARCODE_DBAR_OMNSTK, -1, -1, "04072912296211", 0, 5, 50, 1, "Example with finder values 7 & 8, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
"01001001000000010101111100000001011111000100101010"
|
||||
"00000110111111101010000010101010100000111011010000"
|
||||
"00000101010101010101010101010101010101010101010000"
|
||||
"00001110100010111010000000001010111010000111010000"
|
||||
"10110001011101000101111111110001000101111000101101"
|
||||
},
|
||||
/* 32*/ { BARCODE_DBAR_OMNSTK, -1, "06666666666666", 0, 5, 50, 1, "Example with finder values 6 & 4, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
/* 32*/ { BARCODE_DBAR_OMNSTK, -1, -1, "06666666666666", 0, 5, 50, 1, "Example with finder values 6 & 4, same as BWIPP, verified manually against tec-it and IDAutomation",
|
||||
"01000100010010000100111000000001011110111100101010"
|
||||
"00001011101101111010000101010100100001000011010000"
|
||||
"00000101010101010101010101010101010101010101010000"
|
||||
"00000100011111001010000101010100101001100001110000"
|
||||
"10101011100000110101111000000011010110011110000101"
|
||||
},
|
||||
/* 33*/ { BARCODE_DBAR_EXPSTK, -1, "[90]12345678901234567", 0, 5, 102, 1, "Example with 7 chars, 1 full row, bottom 3 chars",
|
||||
/* 33*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[90]12345678901234567", 0, 5, 102, 1, "Example with 7 chars, 1 full row, bottom 3 chars",
|
||||
"010010100001111000101111111100001010000010001110110100111110001011101011111100001110001111010011000101"
|
||||
"000001011110000111010000000010100101111101110001001011000001110100010100000010100001110000101100110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000000100000000101111110110001101011110001110011010100101000000101000010010111000000000000000000000000"
|
||||
"101110011111111010000001001110010100001110001100101010000111111000111101101000111101000000000000000000"
|
||||
},
|
||||
/* 34*/ { BARCODE_DBAR_EXPSTK, -1, "[90]123456789012345678901234567", 0, 9, 102, 1, "Example with 10 chars, 2 full rows, bottom 2 chars",
|
||||
/* 34*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[90]123456789012345678901234567", 0, 9, 102, 1, "Example with 10 chars, 2 full rows, bottom 2 chars",
|
||||
"010000111100100010101111111100001010001000100000110100111110001011101011111000000110001111010011000101"
|
||||
"000011000011011101010000000010100101110111011111001011000001110100010100000101010001110000101100110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -377,7 +378,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000010000110110001010100001010100100000111010011000000000000000000000000000000000000000000000000000000"
|
||||
"010001111001001110100011110000001011111000101100100100000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 35*/ { BARCODE_DBAR_EXPSTK, -1, "[90]123456789012345678901234567890", 0, 9, 102, 1, "Example with 11 chars, 2 full rows, bottom 3 chars",
|
||||
/* 35*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[90]123456789012345678901234567890", 0, 9, 102, 1, "Example with 11 chars, 2 full rows, bottom 3 chars",
|
||||
"010111011100010001101111111100001010000010001110110100111110001011101011111000000110001111010011000101"
|
||||
"000000100011101110010000000010100101111101110001001011000001110100010100000101010001110000101100110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -388,7 +389,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000010000110110001010100101010100100111000100011011011000110001101110100000000010000000000000000000000"
|
||||
"010001111001001110100011000000001011000111011100100100111001110010001011111111100110100000000000000000"
|
||||
},
|
||||
/* 36*/ { BARCODE_DBAR_EXPSTK, -1, "[91]1234567890123456789012345678901234", 0, 9, 102, 1, "Example with 12 chars, 3 full rows",
|
||||
/* 36*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[91]1234567890123456789012345678901234", 0, 9, 102, 1, "Example with 12 chars, 3 full rows",
|
||||
"010100010011111001101111111100001011001000010000010100111110001011101011111000000110001111010011000101"
|
||||
"000011101100000110010000000010100100110111101111101011000001110100010100000101010001110000101100110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -399,7 +400,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000010000110110001010100101010100100111000100011011011000110001110110100000000010001101110100001000000"
|
||||
"010001111001001110100011000000001011000111011100100100111001110001001011111111100110010001011110111101"
|
||||
},
|
||||
/* 37*/ { BARCODE_DBAR_EXPSTK, -1, "[91]123456789012345678901234567890123456789012", 0, 13, 102, 1, "Example with 15 chars, 3 full rows, bottom 7 chars",
|
||||
/* 37*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[91]123456789012345678901234567890123456789012", 0, 13, 102, 1, "Example with 15 chars, 3 full rows, bottom 7 chars",
|
||||
"010010000111101011101111111100001011100000101100010100111110001011101011110000000010001111010011000101"
|
||||
"000001111000010100010000000010100100011111010011101011000001110100010100001010101001110000101100110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -414,7 +415,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000000100000000101001001111101100011000010000110010100101010100101011111011100100000000000000000000000"
|
||||
"101110011111111010110110000010011100111101111001101010000000011000100000100011011101000000000000000000"
|
||||
},
|
||||
/* 38*/ { BARCODE_DBAR_EXPSTK, 3, "[91]123456789012345678901234567890123456789012", 0, 9, 151, 1, "Example with 15 chars, 2 full rows, bottom 3 chars",
|
||||
/* 38*/ { BARCODE_DBAR_EXPSTK, -1, 3, "[91]123456789012345678901234567890123456789012", 0, 9, 151, 1, "Example with 15 chars, 2 full rows, bottom 3 chars",
|
||||
"0100100001111010111011111111000010111000001011000101001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010"
|
||||
"0000011110000101000100000000101001000111110100111010110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000110000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
@ -425,7 +426,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000001001110111110101001010101001010011000010000110001101111100100101000000001000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0101110110001000001000110000000010101100111101111001110010000011011010111111110011101000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 39*/ { BARCODE_DBAR_EXPSTK, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", 0, 17, 102, 1, "Example with 19 chars, 4 full rows, bottom 3 chars",
|
||||
/* 39*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[91]ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG", 0, 17, 102, 1, "Example with 19 chars, 4 full rows, bottom 3 chars",
|
||||
"010101111100011101101111111100001011100000101100010101111110011110101011110000000010111000111110010101"
|
||||
"000010000011100010010000000010100100011111010011101010000001100001010100001010101001000111000001100000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -444,7 +445,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000010011111000111010001010101010101000111001111011011110100110000110100000000010000000000000000000000"
|
||||
"010101100000111000100110000000001010111000110000100100001011001111001011111111100110100000000000000000"
|
||||
},
|
||||
/* 40*/ { BARCODE_DBAR_EXPSTK, -1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 21, 102, 1, "Example with 22 chars, 5 full rows, bottom 2 chars",
|
||||
/* 40*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 21, 102, 1, "Example with 22 chars, 5 full rows, bottom 2 chars",
|
||||
"010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101"
|
||||
"000010100001000000010000000010100100110111111010111011000001110100010100001010101001110000101100110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -467,7 +468,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000001000111010000101000101010101010100001011000110000000000000000000000000000000000000000000000000000"
|
||||
"001000111000101111010011000000000101011110100111000010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 41*/ { BARCODE_DBAR_EXPSTK, 3, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 13, 151, 1, "Example with 22 chars, 3 full rows, bottom 4 chars",
|
||||
/* 41*/ { BARCODE_DBAR_EXPSTK, -1, 3, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 13, 151, 1, "Example with 22 chars, 3 full rows, bottom 4 chars",
|
||||
"0101010111101111111011111111000010110010000001010001001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010"
|
||||
"0000101000010000000100000000101001001101111110101110110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000110000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
@ -482,7 +483,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000"
|
||||
"1010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 42*/ { BARCODE_DBAR_EXPSTK, 4, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 9, 200, 1, "Example with 22 chars, 2 full rows, bottom 6 chars",
|
||||
/* 42*/ { BARCODE_DBAR_EXPSTK, -1, 4, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 9, 200, 1, "Example with 22 chars, 2 full rows, bottom 6 chars",
|
||||
"01010101111011111110111111110000101100100000010100010011111000101110101111000000001000111101001100010111100010110111100011111100001010100110001110000101001110000010001011110000001110001110001000100101"
|
||||
"00001010000100000001000000001010010011011111101011101100000111010001010000101010100111000010110011101000011101001000010100000010100101011001110001111010110001111101110100001010100001110001110111010000"
|
||||
"00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
@ -493,7 +494,7 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00000011000110001001000000010101010000011110011010101101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000"
|
||||
"01011100111001110110011111100000101111100001100101010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 43*/ { BARCODE_DBAR_EXPSTK, 5, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 9, 249, 1, "Example with 22 chars, 2 full rows, bottom 2 chars",
|
||||
/* 43*/ { BARCODE_DBAR_EXPSTK, -1, 5, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 9, 249, 1, "Example with 22 chars, 2 full rows, bottom 2 chars",
|
||||
"010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101111000101101111000111111000010101001100011100001010011100000100010111100000011100011100010001001000111100100111010001111000000101100011101110010010"
|
||||
"000010100001000000010000000010100100110111111010111011000001110100010100001010101001110000101100111010000111010010000101000000101001010110011100011110101100011111011101000010101000011100011101110110111000011011000101010000101010010011100010001100000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
@ -504,45 +505,45 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"000010001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"010001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 44*/ { BARCODE_DBAR_EXPSTK, 6, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 298, 1, "Example with 22 chars, 1 full row, bottom 10 chars",
|
||||
/* 44*/ { BARCODE_DBAR_EXPSTK, -1, 6, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 298, 1, "Example with 22 chars, 1 full row, bottom 10 chars",
|
||||
"0101010111101111111011111111000010110010000001010001001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010100111000001000101111000000111000111000100010010001111001001110100011110000001011000111011100100100111001110001001011111111001110100001011110111101"
|
||||
"0000101000010000000100000000101001001101111110101110110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000111101011000111110111010000101010000111000111011101101110000110110001010100001010100100111000100011011011000110001110110100000000100001011110100001000000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"0000000100111011111010100101010100101001100001000011000100010111101110100000101010001100000110011010010001100011000100100000001010101000001111001101010110111000100011101000000000100010111110100011000111000111010000101000101010101010100001011000110000000000000000000000000000000000000000000000000000"
|
||||
"0010111011000100000100011000000001010110011110111100111011101000010001011111000000110011111001100101101110011100111011001111110000010111110000110010101001000111011100010111111111001101000001011100111000111000101111010011000000000101011110100111000010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 45*/ { BARCODE_DBAR_EXPSTK, 7, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 347, 1, "Example with 22 chars, 1 full row, bottom 8 chars",
|
||||
/* 45*/ { BARCODE_DBAR_EXPSTK, -1, 7, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 347, 1, "Example with 22 chars, 1 full row, bottom 8 chars",
|
||||
"01010101111011111110111111110000101100100000010100010011111000101110101111000000001000111101001100010111100010110111100011111100001010100110001110000101001110000010001011110000001110001110001000100100011110010011101000111100000010110001110111001001001110011100010010111111110011101000010111101111011101100010000010001100000000101011001111011110010"
|
||||
"00001010000100000001000000001010010011011111101011101100000111010001010000101010100111000010110011101000011101001000010100000010100101011001110001111010110001111101110100001010100001110001110111011011100001101100010101000010101001001110001000110110110001100011101101000000001000010111101000010000100010011101111101010010101010010100110000100000000"
|
||||
"00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"00000100010111101110100000101010001100000110011010010001100011000100100000001010101000001111001101010110111000100011101000000000100010111110100011000111000111010000101000101010101010100001011000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"10111011101000010001011111000000110011111001100101101110011100111011001111110000010111110000110010101001000111011100010111111111001101000001011100111000111000101111010011000000000101011110100111000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 46*/ { BARCODE_DBAR_EXPSTK, 8, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 396, 1, "Example with 22 chars, 1 full row, bottom 6 chars",
|
||||
/* 46*/ { BARCODE_DBAR_EXPSTK, -1, 8, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 396, 1, "Example with 22 chars, 1 full row, bottom 6 chars",
|
||||
"010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101111000101101111000111111000010101001100011100001010011100000100010111100000011100011100010001001000111100100111010001111000000101100011101110010010011100111000100101111111100111010000101111011110111011000100000100011000000001010110011110111100111011101000010001011111000000110011111001100101101"
|
||||
"000010100001000000010000000010100100110111111010111011000001110100010100001010101001110000101100111010000111010010000101000000101001010110011100011110101100011111011101000010101000011100011101110110111000011011000101010000101010010011100010001101101100011000111011010000000010000101111010000100001000100111011111010100101010100101001100001000011000100010111101110100000101010001100000110011010000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"000000011000110001001000000010101010000011110011010101101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"001011100111001110110011111100000101111100001100101010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 47*/ { BARCODE_DBAR_EXPSTK, 9, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 445, 1, "Example with 22 chars, 1 full row, bottom 4 chars",
|
||||
/* 47*/ { BARCODE_DBAR_EXPSTK, -1, 9, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 445, 1, "Example with 22 chars, 1 full row, bottom 4 chars",
|
||||
"0101010111101111111011111111000010110010000001010001001111100010111010111100000000100011110100110001011110001011011110001111110000101010011000111000010100111000001000101111000000111000111000100010010001111001001110100011110000001011000111011100100100111001110001001011111111001110100001011110111101110110001000001000110000000010101100111101111001110111010000100010111110000001100111110011001011011100111001110110011111100000101111100001100101010"
|
||||
"0000101000010000000100000000101001001101111110101110110000011101000101000010101010011100001011001110100001110100100001010000001010010101100111000111101011000111110111010000101010000111000111011101101110000110110001010100001010100100111000100011011011000110001110110100000000100001011110100001000010001001110111110101001010101001010011000010000110001000101111011101000001010100011000001100110100100011000110001001000000010101010000011110011010000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"0000101110001000111010000000001000101111101000110001110001110100001010001010101010101000010110001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"1010010001110111000101111111110011010000010111001110001110001011110100110000000001010111101001110000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 48*/ { BARCODE_DBAR_EXPSTK, 10, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 494, 1, "Example with 22 chars, 1 full row, bottom 2 chars",
|
||||
/* 48*/ { BARCODE_DBAR_EXPSTK, -1, 10, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 5, 494, 1, "Example with 22 chars, 1 full row, bottom 2 chars",
|
||||
"01010101111011111110111111110000101100100000010100010011111000101110101111000000001000111101001100010111100010110111100011111100001010100110001110000101001110000010001011110000001110001110001000100100011110010011101000111100000010110001110111001001001110011100010010111111110011101000010111101111011101100010000010001100000000101011001111011110011101110100001000101111100000011001111100110010110111001110011101100111111000001011111000011001010100100011101110001011111111100110100000101110011101"
|
||||
"00001010000100000001000000001010010011011111101011101100000111010001010000101010100111000010110011101000011101001000010100000010100101011001110001111010110001111101110100001010100001110001110111011011100001101100010101000010101001001110001000110110110001100011101101000000001000010111101000010000100010011101111101010010101010010100110000100001100010001011110111010000010101000110000011001101001000110001100010010000000101010100000111100110101011011100010001110100000000010001011111010001100000"
|
||||
"00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"00000100011101000010100010101010101010000101100011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"00100011100010111101001100000000010101111010011100001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 49*/ { BARCODE_DBAR_EXPSTK, 11, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 1, 543, 1, "Example with 22 chars, 1 row",
|
||||
/* 49*/ { BARCODE_DBAR_EXPSTK, -1, 11, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 1, 543, 1, "Example with 22 chars, 1 row",
|
||||
"010101011110111111101111111100001011001000000101000100111110001011101011110000000010001111010011000101111000101101111000111111000010101001100011100001010011100000100010111100000011100011100010001001000111100100111010001111000000101100011101110010010011100111000100101111111100111010000101111011110111011000100000100011000000001010110011110111100111011101000010001011111000000110011111001100101101110011100111011001111110000010111110000110010101001000111011100010111111111001101000001011100111000111000101111010011000000000101011110100111000010"
|
||||
},
|
||||
/* 50*/ { BARCODE_DBAR_EXPSTK, 1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 41, 53, 1, "Example with 22 chars, 11 rows",
|
||||
/* 50*/ { BARCODE_DBAR_EXPSTK, -1, 1, "[91]12345678901234567890123456789012345678901234567890123456789012345678", 0, 41, 53, 1, "Example with 22 chars, 11 rows",
|
||||
"01010101111011111110111111110000101100100000010100010"
|
||||
"00001010000100000001000000001010010011011111101010000"
|
||||
"00000101010101010101010101010101010101010101010100000"
|
||||
@ -585,14 +586,14 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"00001000111010000101000101010101010100001011000110000"
|
||||
"01000111000101111010011000000000101011110100111000010"
|
||||
},
|
||||
/* 51*/ { BARCODE_DBAR_EXPSTK, 6, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 298, 1, "#200 Daniel Gredler mostly empty last row, 16 chars, 2 rows, bottom row 4 chars",
|
||||
/* 51*/ { BARCODE_DBAR_EXPSTK, -1, 6, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 298, 1, "#200 Daniel Gredler mostly empty last row, 16 chars, 2 rows, bottom row 4 chars",
|
||||
"0100011101110001011011111111000010110000100101111101101000000110001010111100000000101001110000001001010011111011100110001111110000101110101000011000011010011100011000101111000000111001111000111101010111110010110000100011110000001010110010000010000111011111000100101011111100001110011110011000100101"
|
||||
"0000100010001110100100000000101001001111011010000010010111111001110101000010101010010110001111110110101100000100011001010000001010010001010111100111100101100011100111010000101010000110000111000010101000001101001111010100001010100101001101111101111000100000111011010100000010100001100001100111010000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"0000110000010010011000010000000010111110011010001001111010011011100010010101010010101110100011111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"1010001111101101100111001111111101000001100101110110000101100100011101000000001100010001011100000110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 52*/ { BARCODE_DBAR_EXPSTK, 3, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 9, 151, 1, "#200 16 chars, 3 rows, bottom row 4 chars",
|
||||
/* 52*/ { BARCODE_DBAR_EXPSTK, -1, 3, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 9, 151, 1, "#200 16 chars, 3 rows, bottom row 4 chars",
|
||||
"0100011101110001011011111111000010110000100101111101101000000110001010111100000000101001110000001001010011111011100110001111110000101110101000011000010"
|
||||
"0000100010001110100100000000101001001111011010000010010111111001110101000010101010010110001111110110101100000100011001010000001010010001010111100110000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
@ -603,164 +604,173 @@ static void test_examples(int index, int generate, int debug) {
|
||||
"0000011111000101110101001010101001000111011001011110010001011001111101000000001000011001001000001100000000000000000000000000000000000000000000000000000"
|
||||
"0101100000111010001000110000000010111000100110100001101110100110000010111111110011100110110111110001010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 53*/ { BARCODE_DBAR_EXPSTK, 4, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 200, 1, "#200 16 chars, 2 full rows",
|
||||
/* 53*/ { BARCODE_DBAR_EXPSTK, -1, 4, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 200, 1, "#200 16 chars, 2 full rows",
|
||||
"01000111011100010110111111110000101100001001011111011010000001100010101111000000001010011100000010010100111110111001100011111100001011101010000110000110100111000110001011110000001110011110001111010101"
|
||||
"00001000100011101001000000001010010011110110100000100101111110011101010000101010100101100011111101101011000001000110010100000010100100010101111001111001011000111001110100001010100001100001110000100000"
|
||||
"00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"00001100000100100110000100000000101111100110100010011110100110111000100101010100101011101000111110010110111001100001100001010000001010110111000001000111101111101100101001010100001010111100101100000000"
|
||||
"10100011111011011001110011111111010000011001011101100001011001000111010000000011000100010111000001101001000110011110011100001111110101001000111110111000010000010011010100000011110001000011010011111010"
|
||||
},
|
||||
/* 54*/ { BARCODE_DBAR_EXPSTK, 5, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 249, 1, "#200 16 chars, 2 rows, bottom row 6 chars",
|
||||
/* 54*/ { BARCODE_DBAR_EXPSTK, -1, 5, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 249, 1, "#200 16 chars, 2 rows, bottom row 6 chars",
|
||||
"010001110111000101101111111100001011000010010111110110100000011000101011110000000010100111000000100101001111101110011000111111000010111010100001100001101001110001100010111100000011100111100011110101011111001011000010001111000000101011001000001000010"
|
||||
"000010001000111010010000000010100100111101101000001001011111100111010100001010101001011000111111011010110000010001100101000000101001000101011110011110010110001110011101000010101000011000011100001010100000110100111101010000101010010100110111110110000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"000001000001110110101000000101000011000011001110110100111110001011101010010101010010001110110010111100100010110011111010000000010000110010010000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"101110111110001001010111111000011100111100110001001011000001110100010001100000000101110001001101000011011101001100000101111111100111001101101111100010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 55*/ { BARCODE_DBAR_EXPSTK, 7, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 347, 1, "#200 16 chars, 2 rows, bottom row 2 chars",
|
||||
/* 55*/ { BARCODE_DBAR_EXPSTK, -1, 7, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 5, 347, 1, "#200 16 chars, 2 rows, bottom row 2 chars",
|
||||
"01000111011100010110111111110000101100001001011111011010000001100010101111000000001010011100000010010100111110111001100011111100001011101010000110000110100111000110001011110000001110011110001111010101111100101100001000111100000010101100100000100001110111110001001010111111000011100111100110001001011000001110100010001100000000101110001001101000010"
|
||||
"00001000100011101001000000001010010011110110100000100101111110011101010000101010100101100011111101101011000001000110010100000010100100010101111001111001011000111001110100001010100001100001110000101010000011010011110101000010101001010011011111011110001000001110110101000000101000011000011001110110100111110001011101010010101010010001110110010110000"
|
||||
"00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"00001000101100111110100000000100001100100100000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"10110111010011000001011111111001110011011011111000101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 56*/ { BARCODE_DBAR_EXPSTK, 8, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 1, 396, 1, "#200 16 chars, 1 row",
|
||||
/* 56*/ { BARCODE_DBAR_EXPSTK, -1, 8, "[01]98898765432106[3202]012345[15]991231[3203]001234[17]010203", 0, 1, 396, 1, "#200 16 chars, 1 row",
|
||||
"010001110111000101101111111100001011000010010111110110100000011000101011110000000010100111000000100101001111101110011000111111000010111010100001100001101001110001100010111100000011100111100011110101011111001011000010001111000000101011001000001000011101111100010010101111110000111001111001100010010110000011101000100011000000001011100010011010000110111010011000001011111111001110011011011111000101"
|
||||
},
|
||||
/* 57*/ { BARCODE_DBAR_EXP, -1, "[01]00012345678905[10]ABC123", 0, 1, 232, 1, "24724:2011 7.2.5.4.1, encoding method 1 '1'",
|
||||
/* 57*/ { BARCODE_DBAR_EXP, -1, -1, "[01]00012345678905[10]ABC123", 0, 1, 232, 1, "24724:2011 7.2.5.4.1, encoding method 1 '1'",
|
||||
"0100011000001011011011111111000010110011000010111101011110011011111010111110000001100010110000110111000111101101011110001111110000101110001100100001010011101111110110101111111100111001011011111101110011011100101111100011110000001010"
|
||||
},
|
||||
/* 58*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3103]001750", 0, 1, 151, 1, "24724:2011 7.2.5.4.2, encoding method 3 '0100'",
|
||||
/* 58*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3103]001750", 0, 1, 151, 1, "24724:2011 7.2.5.4.2, encoding method 3 '0100'",
|
||||
"0101110010000010011011111111000010111000010011000101011110111001100010111100000011100101110001110111011110101111000110001111110000101011000010011111010"
|
||||
},
|
||||
/* 59*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3103]032767", 0, 1, 151, 1, "Encoding method 3 '0100' with weight = 32767",
|
||||
/* 59*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3103]032767", 0, 1, 151, 1, "Encoding method 3 '0100' with weight = 32767",
|
||||
"0101001000111000011011111111000010111000010011000101011110111001100010111100000011100101110001110111011110111011000110001111110000101101111101110111010"
|
||||
},
|
||||
/* 60*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3103]032768", 0, 1, 200, 1, "Possible encoding method 3 '0100' but weight > 32767 so encoding method 7 '0111000' with dummy date",
|
||||
/* 60*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3103]032768", 0, 1, 200, 1, "Possible encoding method 3 '0100' but weight > 32767 so encoding method 7 '0111000' with dummy date",
|
||||
"01001100000101001110111111110000101000110111000010010111100110111110101111110000111000101100001101110001111011010111100011111100001011000110100110000110100000100110001011111111001110011001111010000101"
|
||||
},
|
||||
/* 61*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3202]000156", 0, 1, 151, 1, "24724:2011 7.2.5.4.3, encoding method 4 '0101'",
|
||||
/* 61*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3202]000156", 0, 1, 151, 1, "24724:2011 7.2.5.4.3, encoding method 4 '0101'",
|
||||
"0101001000111100001011111111000010100111000100001101011110111001100010111100000011100101110001110111011110101111000110001111110000101100001000001010010"
|
||||
},
|
||||
/* 62*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3202]009999", 0, 1, 151, 1, "Encoding method 4 '0101' with weight = 9999",
|
||||
/* 62*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3202]009999", 0, 1, 151, 1, "Encoding method 4 '0101' with weight = 9999",
|
||||
"0101110001000100011011111111000010100111000100001101011110111001100010111100000011100101110001110111011110110100011110001111110000101100111110010001010"
|
||||
},
|
||||
/* 63*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3202]010000", 0, 1, 200, 1, "Possible encoding method 4 '0101' but weight > 9999 so encoding method 8 with dummy date",
|
||||
/* 63*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3202]010000", 0, 1, 200, 1, "Possible encoding method 4 '0101' but weight > 9999 so encoding method 8 with dummy date",
|
||||
"01001000101110000110111111110000101110100011000010010111100110111110101111110000111000101100001101110001111011010111100011111100001010000011101001100111101101001110001011111111001110011001111010000101"
|
||||
},
|
||||
/* 64*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3203]022767", 0, 1, 151, 1, "Encoding method 4 '0101' with weight = 22767",
|
||||
/* 64*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3203]022767", 0, 1, 151, 1, "Encoding method 4 '0101' with weight = 22767",
|
||||
"0101110010011000001011111111000010100111000100001101011110111001100010111100000011100101110001110111011110111011000110001111110000101101111101110111010"
|
||||
},
|
||||
/* 65*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3203]022768", 0, 1, 200, 1, "Possible encoding method 4 '0101' but weight > 22767 so encoding method 8 with dummy date",
|
||||
/* 65*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3203]022768", 0, 1, 200, 1, "Possible encoding method 4 '0101' but weight > 22767 so encoding method 8 with dummy date",
|
||||
"01000110111000100010111111110000101110100011000010010111100110111110101111110000111000101100001101110001111011010111100011111100001010011100010110000100001101000001101011111111001110011001111010000101"
|
||||
},
|
||||
/* 66*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3922]795", 0, 1, 183, 1, "24724:2011 7.2.5.4.5, encoding method 5 '01100XX', no following AIs",
|
||||
/* 66*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3922]795", 0, 1, 183, 1, "24724:2011 7.2.5.4.5, encoding method 5 '01100XX', no following AIs",
|
||||
"010110000010001011101111111100001010011100000101100101111001101111101011111100001110001011000011011100011110110101111000111111000010100111101110100001100011011100100010111111110011101"
|
||||
},
|
||||
/* 67*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3922]795[20]01", 0, 1, 200, 1, "Encoding method 5 '01100XX' with following AI",
|
||||
/* 67*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3922]795[20]01", 0, 1, 200, 1, "Encoding method 5 '01100XX' with following AI",
|
||||
"01000110110000110010111111110000101111000100001010010111100110111110101111110000111000101100001101110001111011010111100011111100001010011110111010000110001110001011001011111111001110100111110001110101"
|
||||
},
|
||||
/* 68*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3932]0081234", 0, 1, 200, 1, "24724:2011 7.2.5.4.6, encoding method 6 '01101XX', no following AIs",
|
||||
/* 68*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3932]0081234", 0, 1, 200, 1, "24724:2011 7.2.5.4.6, encoding method 6 '01101XX', no following AIs",
|
||||
"01001110000101100010111111110000101110100000110010010111100110111110101111110000111000101100001101110001111011010111100011111100001011000011010111100100111110001011101011111111001110001101111001011101"
|
||||
},
|
||||
/* 69*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3932]0081234[20]01", 0, 1, 232, 1, "Encoding method 6 '01101XX' with following AI",
|
||||
/* 69*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3932]0081234[20]01", 0, 1, 232, 1, "Encoding method 6 '01101XX' with following AI",
|
||||
"0100001101000100111011111111000010110000101000111001011110011011111010111110000001100010110000110111000111101101011110001111110000101100001101011110010011111000101110101111111100111000100110011110010011101111001000100011110000001010"
|
||||
},
|
||||
/* 70*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3932]A401234", ZINT_WARN_NONCOMPLIANT, 1, 232, 0, "Possible encoding method 6 '01101XX' but invalid currency code so encoding method 1; BWIPP no check",
|
||||
/* 70*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3932]A401234", ZINT_WARN_NONCOMPLIANT, 1, 232, 0, "Possible encoding method 6 '01101XX' but invalid currency code so encoding method 1; BWIPP no check (craps out)",
|
||||
"0100011000010011011011111111000010100100011111001101011110011011111010111110000001100010110000110111000111101101011110001111110000101100011001111001010001011011000000101111111100111001101011111110110001111001001110100011110000001010"
|
||||
},
|
||||
/* 71*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3102]099999[11]201209", 0, 1, 200, 1, "Encoding method 7 '0111000' with weight <= 99999 and valid date",
|
||||
/* 71*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]90012345678908[3932]A401234", 0, 1, 232, 0, "Possible encoding method 6 '01101XX' but invalid currency code so encoding method 1; BWIPP no check (craps out)",
|
||||
"0100011000010011011011111111000010100100011111001101011110011011111010111110000001100010110000110111000111101101011110001111110000101100011001111001010001011011000000101111111100111001101011111110110001111001001110100011110000001010"
|
||||
},
|
||||
/* 72*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3102]099999[11]201209", 0, 1, 200, 1, "Encoding method 7 '0111000' with weight <= 99999 and valid date",
|
||||
"01000101111001000010111111110000101000110111000010010111100110111110101111110000111000101100001101110001111011010111100011111100001010111100100001000100000011100101001011111111001110010000100100011101"
|
||||
},
|
||||
/* 72*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3102]099999", 0, 1, 200, 1, "Encoding method 7 '0111000' with weight <= 99999 but no date",
|
||||
/* 73*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3102]099999", 0, 1, 200, 1, "Encoding method 7 '0111000' with weight <= 99999 but no date",
|
||||
"01000111011000010010111111110000101000110111000010010111100110111110101111110000111000101100001101110001111011010111100011111100001010111100100001000110100100011000001011111111001110011001111010000101"
|
||||
},
|
||||
/* 73*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3102]100000[11]201209", 0, 1, 281, 1, "Possible encoding method 7 '0111000' but weight > 99999 so encoding method 1",
|
||||
/* 74*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3102]100000[11]201209", 0, 1, 281, 1, "Possible encoding method 7 '0111000' but weight > 99999 so encoding method 1",
|
||||
"01010011110001110010111111110000101001000111110011010111100110111110101111100000011000101100001101110001111011010111100011111100001010010110001110000110010000011110101011111111001110000011100110101100001001110100011000110000000010100101100000100001011100011001111010111111111001101"
|
||||
},
|
||||
/* 74*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3102]099999[11]200000", ZINT_WARN_NONCOMPLIANT, 1, 281, 0, "Possible encoding method 7 '0111000' with weight <= 99999 but date invalid so encoding method 1; BWIPP need method to pass `dontlint` option",
|
||||
/* 75*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3102]099999[11]200000", ZINT_WARN_NONCOMPLIANT, 1, 281, 0, "Possible encoding method 7 '0111000' with weight <= 99999 but date invalid so encoding method 1; BWIPP requires `dontlint` (GS1NOCHECK_MODE)",
|
||||
"01011001110001001110111111110000101001000111110011010111100110111110101111100000011000101100001101110001111011010111100011111100001010010110001110000110010011110100001011111111001110110011100010111100001001110100011000110000000010101100001000000101010111101111110010111111111001101"
|
||||
},
|
||||
/* 75*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3201]099999[11]201209", 0, 1, 200, 1, "Encoding method 8 '0111001' with weight <= 99999 and valid date",
|
||||
/* 76*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]90012345678908[3102]099999[11]200000", 0, 1, 281, 1, "Possible encoding method 7 '0111000' with weight <= 99999 but date invalid so encoding method 1",
|
||||
"01011001110001001110111111110000101001000111110011010111100110111110101111100000011000101100001101110001111011010111100011111100001010010110001110000110010011110100001011111111001110110011100010111100001001110100011000110000000010101100001000000101010111101111110010111111111001101"
|
||||
},
|
||||
/* 77*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3201]099999[11]201209", 0, 1, 200, 1, "Encoding method 8 '0111001' with weight <= 99999 and valid date",
|
||||
"01001000001101001110111111110000101110100011000010010111100110111110101111110000111000101100001101110001111011010111100011111100001011000100001101100111010111001110001011111111001110010000100100011101"
|
||||
},
|
||||
/* 76*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3201]099999", 0, 1, 200, 1, "Encoding method 8 '0111001' with weight <= 99999 but no date",
|
||||
/* 78*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3201]099999", 0, 1, 200, 1, "Encoding method 8 '0111001' with weight <= 99999 but no date",
|
||||
"01000101110010000110111111110000101110100011000010010111100110111110101111110000111000101100001101110001111011010111100011111100001011000100001101100111010000111011101011111111001110011001111010000101"
|
||||
},
|
||||
/* 77*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3201]100000[11]201209", 0, 1, 281, 1, "Possible encoding method 8 '0111001' but weight > 99999 so encoding method 1",
|
||||
/* 79*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3201]100000[11]201209", 0, 1, 281, 1, "Possible encoding method 8 '0111001' but weight > 99999 so encoding method 1",
|
||||
"01011101100011000110111111110000101001000111110011010111100110111110101111100000011000101100001101110001111011010111100011111100001011101010000110000111011110001100101011111111001110000011100110101100001001110100011000110000000010100101100000100001011100011001111010111111111001101"
|
||||
},
|
||||
/* 78*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3201]099999[11]000000", ZINT_WARN_NONCOMPLIANT, 1, 281, 0, "Possible encoding method 8 '0111001' but date invalid so encoding method 1; BWIPP need method to pass `dontlint` option",
|
||||
/* 80*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3201]099999[11]000000", ZINT_WARN_NONCOMPLIANT, 1, 281, 0, "Possible encoding method 8 '0111001' but date invalid so encoding method 1; BWIPP requires `dontlint` (GS1NOCHECK_MODE)",
|
||||
"01011110100001001110111111110000101001000111110011010111100110111110101111100000011000101100001101110001111011010111100011111100001011101010000110000111000011110101101011111111001110110011100010111100001110100001011000110000000010101100001000000101010111101111110010111111111001101"
|
||||
},
|
||||
/* 79*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3100]099999[13]201209", 0, 1, 200, 1, "Encoding method 9 '0111010' with weight <= 99999 and valid date",
|
||||
/* 81*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]90012345678908[3201]099999[11]000000", 0, 1, 281, 1, "Possible encoding method 8 '0111001' but date invalid so encoding method 1",
|
||||
"01011110100001001110111111110000101001000111110011010111100110111110101111100000011000101100001101110001111011010111100011111100001011101010000110000111000011110101101011111111001110110011100010111100001110100001011000110000000010101100001000000101010111101111110010111111111001101"
|
||||
},
|
||||
/* 82*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3100]099999[13]201209", 0, 1, 200, 1, "Encoding method 9 '0111010' with weight <= 99999 and valid date",
|
||||
"01001000001101001110111111110000101111001010000010010111100110111110101111110000111000101100001101110001111011010111100011111100001011000111000001010111010000110110001011111111001110010000100100011101"
|
||||
},
|
||||
/* 80*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3204]099999[13]201209", 0, 1, 200, 1, "Encoding method 10 '0111011' with weight <= 99999 and valid date",
|
||||
/* 83*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3204]099999[13]201209", 0, 1, 200, 1, "Encoding method 10 '0111011' with weight <= 99999 and valid date",
|
||||
"01001000111000010110111111110000101100101000001110010111100110111110101111110000111000101100001101110001111011010111100011111100001010011101000011110101110000101111101011111111001110010000100100011101"
|
||||
},
|
||||
/* 81*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3103]012233[15]991231", 0, 1, 200, 1, "24724:2011 7.2.5.4.4, encoding method 11 '0111100' with weight <= 99999 and valid date",
|
||||
/* 84*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3103]012233[15]991231", 0, 1, 200, 1, "24724:2011 7.2.5.4.4, encoding method 11 '0111100' with weight <= 99999 and valid date",
|
||||
"01001100000100111010111111110000101011100100000110010111100110111110101111110000111000101100001101110001111011010111100011111100001011000011010110000111001100110001001011111111001110001101111010000101"
|
||||
},
|
||||
/* 82*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3205]099999[15]201209", 0, 1, 200, 1, "Encoding method 12 '0111101' with weight <= 99999 and valid date",
|
||||
/* 85*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3205]099999[15]201209", 0, 1, 200, 1, "Encoding method 12 '0111101' with weight <= 99999 and valid date",
|
||||
"01001110000010011010111111110000101000001101110100010111100110111110101111110000111000101100001101110001111011010111100011111100001011110011010001100101001100011000001011111111001110010000100100011101"
|
||||
},
|
||||
/* 83*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3105]099999[17]201209", 0, 1, 200, 1, "Encoding method 13 '0111110' with weight <= 99999 and valid date",
|
||||
/* 86*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3105]099999[17]201209", 0, 1, 200, 1, "Encoding method 13 '0111110' with weight <= 99999 and valid date",
|
||||
"01000111010000110010111111110000101110000100110100010111100110111110101111110000111000101100001101110001111011010111100011111100001011110011010001100101001100011000001011111111001110010000100100011101"
|
||||
},
|
||||
/* 84*/ { BARCODE_DBAR_EXP, -1, "[01]90012345678908[3200]099999[17]201209", 0, 1, 200, 1, "Encoding method 14 '0111111' with weight <= 99999 and valid date",
|
||||
/* 87*/ { BARCODE_DBAR_EXP, -1, -1, "[01]90012345678908[3200]099999[17]201209", 0, 1, 200, 1, "Encoding method 14 '0111111' with weight <= 99999 and valid date",
|
||||
"01001110000010100110111111110000101111000100010100010111100110111110101111110000111000101100001101110001111011010111100011111100001011000111000001010111010000110110001011111111001110010000100100011101"
|
||||
},
|
||||
/* 85*/ { BARCODE_DBAR_EXPSTK, 4, "[8110]106141416543213500110000310123196000", 0, 5, 200, 1, "North American Coupon Application Guideline (NACAG) Figure 1 (& Appendix C: Example 6)",
|
||||
/* 88*/ { BARCODE_DBAR_EXPSTK, -1, 4, "[8110]106141416543213500110000310123196000", 0, 5, 200, 1, "North American Coupon Application Guideline (NACAG) Figure 1 (& Appendix C: Example 6)",
|
||||
"01001100101110001110111111110000101000001101000001010111100110111000101111100000011011010001000000110000111100001010100011111100001010000010101111000111010000011001101011111111001110000001101101000101"
|
||||
"00000011010001110001000000001010010111110010111110101000011001000111010000010101000100101110111111001111000011110101010100000010100101111101010000111000101111100110010100000000100001111110010010110000"
|
||||
"00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"00000100010110000110100000001010101010111100111101110010110001110011101000000000100010000011010010000100011110111011001000101010101010011101111111010000000000000000000000000000000000000000000000000000"
|
||||
"00100011101001111001001111110000010101000011000010001101001110001100010111111111001101111100101101111011100001000100110011000000000101100010000000101010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 86*/ { BARCODE_DBAR_EXPSTK, 3, "[8110]10614141011111275110111", 0, 5, 151, 1, "NACAG Figure 3",
|
||||
/* 89*/ { BARCODE_DBAR_EXPSTK, -1, 3, "[8110]10614141011111275110111", 0, 5, 151, 1, "NACAG Figure 3",
|
||||
"0101011110011100001011111111000010100000110100000101011110011011100010111110000001101101000100000011000011100001101010001111110000101010000011000111010"
|
||||
"0000100001100011110100000000101001011111001011111010100001100100011101000001010100010010111011111100111100011110010101010000001010010101111100111000000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"0000001000100001011010000000010000111001101101100001100111100100100010100001010100100001101011111000000000000000000000000000000000000000000000000000000"
|
||||
"1011110111011110100101111111100111000110010010011110011000011011011100011110000001011110010100000100100000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 87*/ { BARCODE_DBAR_EXPSTK, 6, "[8110]106141410222223100110222111101231023456721104561045678991201", 0, 5, 298, 1, "NACAG Figure 4",
|
||||
/* 90*/ { BARCODE_DBAR_EXPSTK, -1, 6, "[8110]106141410222223100110222111101231023456721104561045678991201", 0, 5, 298, 1, "NACAG Figure 4",
|
||||
"0100101111101001111011111111000010110010000011001101011110011011100010111100000000101101000100000011000011100001101010001111110000101011000011100001010111000011011110101111000000111010011111000101110001110110011001100011110000001011100110000101000110101111110111001011111111001110011010011100001101"
|
||||
"0000010000010110000100000000101001001101111100110010100001100100011101000010101010010010111011111100111100011110010101010000001010010100111100011110101000111100100001010000101010000101100000111010001110001001100110010100001010100100011001111010111001010000001000110100000000100001100101100011110000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"0000011010011011100010100101010100100111000100000101010000111000110010100000101010001111000101110100011001110001101000100000001010101011011110000111010111110001101011101000000000100011110100100010000110101100111000001000101010101000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0010000101100100011100011000000001011000111011111010101111000111001101011111000000110000111010001011100110001110010111001111110000010100100001111000101000001110010100010111111111001100001011011101111001010011000111110011000000000101000000000000000000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 88*/ { BARCODE_DBAR_EXPSTK, 5, "[8110]1061414165432131501101201211014092110256100126663101231", 0, 5, 249, 1, "NACAG Appendix C: Example 1",
|
||||
/* 91*/ { BARCODE_DBAR_EXPSTK, -1, 5, "[8110]1061414165432131501101201211014092110256100126663101231", 0, 5, 249, 1, "NACAG Appendix C: Example 1",
|
||||
"010111101100011011101111111100001011001000001100110101111001101110001011110000000010110100010000001100001111000010101000111111000010100000101011110001110100000110011010111100000011101001111000101111000111011001001110001111000000101011001000001110010"
|
||||
"000000010011100100010000000010100100110111110011001010000110010001110100001010101001001011101111110011110000111101010101000000101001011111010100001110001011111001100101000010101000010110000111010000111000100110110001010000101010010100110111110000000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"000001110000100101101000000101000011110100100011100111100001001101001010010101010010011111110101101100010010110011111010000010101000111101010000010001110001001100110010001010101010100011000111001011000010011010000010100000000010000000000000000000000"
|
||||
"101110001111011010010111111000011100001011011100011000011110110010110001100000000101100000001010010011101101001100000101111100000011000010101111101110001110110011001100110000000001011100111000110100111101100101111101011111111100110100000000000000000"
|
||||
},
|
||||
/* 89*/ { BARCODE_DBAR_EXPSTK, 4, "[8110]106141410012342501106501013085093101231", 0, 5, 200, 1, "NACAG Appendix C: Example 2",
|
||||
/* 92*/ { BARCODE_DBAR_EXPSTK, -1, 4, "[8110]106141410012342501106501013085093101231", 0, 5, 200, 1, "NACAG Appendix C: Example 2",
|
||||
"01001100101110001110111111110000101000001101000001010111100110111000101111100000011011010001000000110000111000011010100011111100001010000110011000110111001110000010101011111111001110011110010001100101"
|
||||
"00000011010001110001000000001010010111110010111110101000011001000111010000010101000100101110111111001111000111100101010100000010100101111001100111001000110001111101010100000000100001100001101110010000"
|
||||
"00000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"00000100100001001110100000001010101011111101001011110000110001001011101000000000100010111000110010000111011001101000001000101010101010011011001000010000000000000000000000000000000000000000000000000000"
|
||||
"00100011011110110001001111110000010100000010110100001111001110110100010111111111001101000111001101111000100110010111110011000000000101100100110111100010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 90*/ { BARCODE_DBAR_EXPSTK, 5, "[8110]106141410012471011076011110850921108609310123191000", 0, 5, 249, 1, "NACAG Appendix C: Example 3",
|
||||
/* 93*/ { BARCODE_DBAR_EXPSTK, -1, 5, "[8110]106141410012471011076011110850921108609310123191000", 0, 5, 249, 1, "NACAG Appendix C: Example 3",
|
||||
"010101111101111000101111111100001010000011000101000101111001101110001011110000000010110100010000001100001110000110101000111111000010100001100110001101001000010000111010111100000011100011100011011001011100001001101110001111000000101001100010000111010"
|
||||
"000010000010000111010000000010100101111100111010111010000110010001110100001010101001001011101111110011110001111001010101000000101001011110011001110010110111101111000101000010101000011100011100100110100011110110010001010000101010010110011101111000000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
"000010000001000010101000000101000011110111011110110111101101011100001010010101010010101000011111011101111101110011001010000010101000101001111001110001000001100110001010000000101010100111111101101000000000000000000000000000000000000000000000000000000"
|
||||
"101001111110111101010111111000011100001000100001001000010010100011110001100000000101010111100000100010000010001100110101111100000011010110000110001110111110011001110100111111000001011000000010010100100000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 91*/ { BARCODE_DBAR_EXPSTK, 6, "[8110]106141411234562891101201212085010048000214025610048000310123191000", 0, 5, 298, 1, "NACAG Appendix C: Example 4",
|
||||
/* 94*/ { BARCODE_DBAR_EXPSTK, -1, 6, "[8110]106141411234562891101201212085010048000214025610048000310123191000", 0, 5, 298, 1, "NACAG Appendix C: Example 4",
|
||||
"0100111111001110101011111111000010100000110001010001011110011011100010111100000000101101000100000011000011100001101010001111110000101010011000111000010101110001000000101111000000111001000001001110010011000011011101100011110000001010000010010110000100011001011000001011111111001110001110101100111101"
|
||||
"0000000000110001010100000000101001011111001110101110100001100100011101000010101010010010111011111100111100011110010101010000001010010101100111000111101010001110111111010000101010000110111110110001101100111100100010010100001010100101111101101001111011100110100111110100000000100001110001010011000000"
|
||||
"0000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010000"
|
||||
"0000001110011100111010100101010100101001111011111101000100011101100010100000101010001110110010001000010111101100001110100000001010101000011101111010110010111110001001101000000000100011100001011000010111001010111000001000101010101010001111001001100000000000000000000000000000000000000000000000000000"
|
||||
"0010110001100011000100011000000001010110000100000010111011100010011101011111000000110001001101110111101000010011110001001111110000010111100010000101001101000001110110010111111111001100011110100111101000110101000111110011000000000101110000110110011010000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
/* 92*/ { BARCODE_DBAR_EXPSTK, 5, "[8110]1061414154321031501101201211014092110256100126663101231", 0, 5, 249, 1, "NACAG Appendix C: Example 5",
|
||||
/* 95*/ { BARCODE_DBAR_EXPSTK, -1, 5, "[8110]1061414154321031501101201211014092110256100126663101231", 0, 5, 249, 1, "NACAG Appendix C: Example 5",
|
||||
"010100111111010011101111111100001011001000001100110101111001101110001011110000000010110100010000001100001111000010101000111111000010101100100000001001100011101011000010111100000011101001111000101111000111011001001110001111000000101011001000001110010"
|
||||
"000011000000101100010000000010100100110111110011001010000110010001110100001010101001001011101111110011110000111101010101000000101001010011011111110110011100010100111101000010101000010110000111010000111000100110110001010000101010010100110111110000000"
|
||||
"000001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000"
|
||||
@ -787,14 +797,14 @@ static void test_examples(int index, int generate, int debug) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -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, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (const unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, \"%s\", %d, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), data[i].option_2,
|
||||
printf(" /*%3d*/ { %s, %s, %d, \"%s\", %d, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(symbol->symbology), testUtilInputModeName(data[i].input_mode), data[i].option_2,
|
||||
data[i].data, data[i].ret, symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
printf(" },\n");
|
||||
@ -1130,6 +1140,7 @@ static void test_general_field(int index, int generate, int debug) {
|
||||
static void test_binary_buffer_size(int index, int generate, int debug) {
|
||||
|
||||
struct item {
|
||||
int input_mode;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
@ -1138,14 +1149,17 @@ static void test_binary_buffer_size(int index, int generate, int debug) {
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { "[91]1", 0, 1, 102, "Minimum digit" },
|
||||
/* 1*/ { "[91]+", 0, 1, 102, "Minimum ISO-646" },
|
||||
/* 2*/ { "[00]123456789012345675[00]123456789012345675[00]123456789012345675[91]12345678", 0, 1, 543, "70 == any AIs max" },
|
||||
/* 3*/ { "[00]123456789012345675[00]123456789012345675[00]123456789012345675[91]123456789", ZINT_ERROR_TOO_LONG, 0, 0, "71 > any AIs max" },
|
||||
/* 4*/ { "[01]12345678901231[00]123456789012345675[00]123456789012345675[91]1234567890123456", 0, 1, 543, "74 == 01 + other AIs max" },
|
||||
/* 5*/ { "[01]12345678901231[00]123456789012345675[00]123456789012345675[91]12345678901234567", ZINT_ERROR_TOO_LONG, 0, 0, "75 > 01 + other AIs max" },
|
||||
/* 6*/ { "[01]92345678901237[3920]123456789012345[00]123456789012345675[91]1234567890123456789", 0, 1, 543, "77 (incl. FNC1 after 3920) == 01 + 392x + other AIs max" },
|
||||
/* 7*/ { "[01]92345678901237[3920]123456789012345[00]123456789012345675[91]12345678901234567890", ZINT_ERROR_TOO_LONG, 0, 0, "78 > 01 + 392x + other AIs max" },
|
||||
/* 0*/ { -1, "[91]1", 0, 1, 102, "Minimum digit" },
|
||||
/* 1*/ { -1, "[91]+", 0, 1, 102, "Minimum ISO-646" },
|
||||
/* 2*/ { -1, "[00]123456789012345675[00]123456789012345675[00]123456789012345675[91]12345678", 0, 1, 543, "70 == any AIs max" },
|
||||
/* 3*/ { -1, "[00]123456789012345675[00]123456789012345675[00]123456789012345675[91]123456789", ZINT_ERROR_TOO_LONG, 0, 0, "71 > any AIs max" },
|
||||
/* 4*/ { GS1NOCHECK_MODE, "[00]123456789012345675[00]123456789012345675[00]123456789012345675[91]123456789", ZINT_ERROR_TOO_LONG, 0, 0, "No check doesn't affect limit" },
|
||||
/* 5*/ { -1, "[01]12345678901231[00]123456789012345675[00]123456789012345675[91]1234567890123456", 0, 1, 543, "74 == 01 + other AIs max" },
|
||||
/* 6*/ { -1, "[01]12345678901231[00]123456789012345675[00]123456789012345675[91]12345678901234567", ZINT_ERROR_TOO_LONG, 0, 0, "75 > 01 + other AIs max" },
|
||||
/* 7*/ { GS1NOCHECK_MODE, "[01]12345678901231[00]123456789012345675[00]123456789012345675[91]12345678901234567", ZINT_ERROR_TOO_LONG, 0, 0, "No check doesn't affect limit" },
|
||||
/* 8*/ { -1, "[01]92345678901237[3920]123456789012345[00]123456789012345675[91]1234567890123456789", 0, 1, 543, "77 (incl. FNC1 after 3920) == 01 + 392x + other AIs max" },
|
||||
/* 9*/ { -1, "[01]92345678901237[3920]123456789012345[00]123456789012345675[91]12345678901234567890", ZINT_ERROR_TOO_LONG, 0, 0, "78 > 01 + 392x + other AIs max" },
|
||||
/* 10*/ { GS1NOCHECK_MODE, "[01]92345678901237[3920]123456789012345[00]123456789012345675[91]12345678901234567890", ZINT_ERROR_TOO_LONG, 0, 0, "No check doesn't affect limit" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -1160,14 +1174,14 @@ static void test_binary_buffer_size(int index, int generate, int debug) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DBAR_EXP, -1 /*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, (const unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%2d*/ { \"%s\", %s, %d, %d, \"%s\" },\n",
|
||||
i, data[i].data, testUtilErrorName(ret), symbol->rows, symbol->width, data[i].comment);
|
||||
printf(" /*%3d*/ { %s, \"%s\", %s, %d, %d, \"%s\" },\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].data, testUtilErrorName(ret), symbol->rows, symbol->width, data[i].comment);
|
||||
} else {
|
||||
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);
|
||||
@ -1183,21 +1197,23 @@ static void test_hrt(int index, int debug) {
|
||||
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
char *data;
|
||||
|
||||
int ret;
|
||||
char *expected;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DBAR_OMN, "1234567890123", "(01)12345678901231" },
|
||||
/* 1*/ { BARCODE_DBAR_OMN, "12345678901231", "(01)12345678901231" },
|
||||
/* 2*/ { BARCODE_DBAR_OMN, "1000000000009", "(01)10000000000090" },
|
||||
/* 3*/ { BARCODE_DBAR_LTD, "1341056790138", "(01)13410567901384" },
|
||||
/* 4*/ { BARCODE_DBAR_LTD, "13410567901384", "(01)13410567901384" },
|
||||
/* 5*/ { BARCODE_DBAR_EXP, "[01]12345678901231", "(01)12345678901231" },
|
||||
/* 6*/ { BARCODE_DBAR_STK, "12345678901231", "" },
|
||||
/* 7*/ { BARCODE_DBAR_OMNSTK, "10000000000090", "" },
|
||||
/* 8*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901231", "" },
|
||||
/* 0*/ { BARCODE_DBAR_OMN, -1, "1234567890123", 0, "(01)12345678901231" },
|
||||
/* 1*/ { BARCODE_DBAR_OMN, -1, "12345678901231", 0, "(01)12345678901231" },
|
||||
/* 4*/ { BARCODE_DBAR_OMN, -1, "1000000000009", 0, "(01)10000000000090" },
|
||||
/* 5*/ { BARCODE_DBAR_LTD, -1, "1341056790138", 0, "(01)13410567901384" },
|
||||
/* 6*/ { BARCODE_DBAR_LTD, -1, "13410567901384", 0, "(01)13410567901384" },
|
||||
/* 9*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", 0, "(01)12345678901231" }, // See test_hrt() in "test_gs1.c" for full HRT tests
|
||||
/* 10*/ { BARCODE_DBAR_STK, -1, "12345678901231", 0, "" }, // No HRT for stacked
|
||||
/* 11*/ { BARCODE_DBAR_OMNSTK, -1, "10000000000090", 0, "" },
|
||||
/* 12*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", 0, "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -1212,10 +1228,10 @@ static void test_hrt(int index, int debug) {
|
||||
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, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (const unsigned char *) data[i].data, length);
|
||||
assert_zero(ret, "i:%d ZBarcode_Encode ret %d != 0 %s\n", i, 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_zero(strcmp((const char *) symbol->text, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->text, data[i].expected);
|
||||
|
||||
@ -1229,41 +1245,70 @@ static void test_input(int index, int debug) {
|
||||
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
int option_2;
|
||||
char *data;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
char *expected_errtxt;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DBAR_OMN, -1, "1234567890123", 0, 1, 96 },
|
||||
/* 1*/ { BARCODE_DBAR_OMN, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 2*/ { BARCODE_DBAR_OMN, -1, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1 },
|
||||
/* 3*/ { BARCODE_DBAR_OMN, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 4*/ { BARCODE_DBAR_LTD, -1, "1234567890123", 0, 1, 79 },
|
||||
/* 5*/ { BARCODE_DBAR_LTD, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 6*/ { BARCODE_DBAR_LTD, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1 },
|
||||
/* 7*/ { BARCODE_DBAR_LTD, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 8*/ { BARCODE_DBAR_LTD, -1, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 9*/ { BARCODE_DBAR_LTD, -1, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 10*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134 },
|
||||
/* 11*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", 0, 1, 134 },
|
||||
/* 12*/ { BARCODE_DBAR_EXP, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 13*/ { BARCODE_DBAR_EXP, -1, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 14*/ { BARCODE_DBAR_STK, -1, "1234567890123", 0, 3, 50 },
|
||||
/* 15*/ { BARCODE_DBAR_STK, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 16*/ { BARCODE_DBAR_STK, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1 },
|
||||
/* 17*/ { BARCODE_DBAR_STK, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 18*/ { BARCODE_DBAR_OMNSTK, -1, "1234567890123", 0, 5, 50 },
|
||||
/* 19*/ { BARCODE_DBAR_OMNSTK, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 20*/ { BARCODE_DBAR_OMNSTK, -1, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1 },
|
||||
/* 21*/ { BARCODE_DBAR_OMNSTK, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 22*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 5, 102 },
|
||||
/* 23*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", 0, 5, 102 },
|
||||
/* 24*/ { BARCODE_DBAR_EXPSTK, -1, "[01]123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 25*/ { BARCODE_DBAR_EXPSTK, -1, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 26*/ { BARCODE_DBAR_EXPSTK, 1, "[01]12345678901231", 0, 9, 53 },
|
||||
/* 0*/ { BARCODE_DBAR_OMN, -1, -1, "1234567890123", 0, 1, 96, "" },
|
||||
/* 1*/ { BARCODE_DBAR_OMN, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character in data (digits only)" },
|
||||
/* 2*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character in data (digits only)" },
|
||||
/* 3*/ { BARCODE_DBAR_OMN, -1, -1, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '4', expecting '1'" },
|
||||
/* 4*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, "12345678901234", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '4', expecting '1'" }, // Still checked
|
||||
/* 5*/ { BARCODE_DBAR_OMN, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input too long (14 character maximum)" },
|
||||
/* 6*/ { BARCODE_DBAR_OMN, GS1NOCHECK_MODE, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input too long (14 character maximum)" },
|
||||
/* 7*/ { BARCODE_DBAR_LTD, -1, -1, "1234567890123", 0, 1, 79, "" },
|
||||
/* 8*/ { BARCODE_DBAR_LTD, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 383: Invalid character in data (digits only)" },
|
||||
/* 9*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 383: Invalid character in data (digits only)" },
|
||||
/* 10*/ { BARCODE_DBAR_LTD, -1, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 389: Invalid check digit '5', expecting '1'" },
|
||||
/* 11*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 389: Invalid check digit '5', expecting '1'" }, // Still checked
|
||||
/* 12*/ { BARCODE_DBAR_LTD, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input too long (14 character maximum)" },
|
||||
/* 13*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 382: Input too long (14 character maximum)" },
|
||||
/* 14*/ { BARCODE_DBAR_LTD, -1, -1, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input out of range (0 to 1999999999999)" },
|
||||
/* 15*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, "2234567890123", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input out of range (0 to 1999999999999)" },
|
||||
/* 16*/ { BARCODE_DBAR_LTD, -1, -1, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input out of range (0 to 1999999999999)" },
|
||||
/* 17*/ { BARCODE_DBAR_LTD, GS1NOCHECK_MODE, -1, "22345678901238", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 384: Input out of range (0 to 1999999999999)" },
|
||||
/* 18*/ { BARCODE_DBAR_EXP, -1, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 261: AI (01) position 14: Bad checksum '4', expected '1'" },
|
||||
/* 19*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]12345678901234", 0, 1, 134, "" },
|
||||
/* 20*/ { BARCODE_DBAR_EXP, -1, -1, "[01]12345678901231", 0, 1, 134, "" },
|
||||
/* 21*/ { BARCODE_DBAR_EXP, -1, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)" },
|
||||
/* 22*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)" },
|
||||
/* 23*/ { BARCODE_DBAR_EXP, -1, -1, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 259: Invalid data length for AI (01)" },
|
||||
/* 24*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]123456789012315", 0, 1, 151, "" },
|
||||
/* 25*/ { BARCODE_DBAR_EXP, -1, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 1, 134, "Warning 261: AI (01) position 14: Bad checksum '4', expected '1'" },
|
||||
/* 26*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]12345678901234", 0, 1, 134, "" },
|
||||
/* 27*/ { BARCODE_DBAR_EXP, -1, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_ ", ZINT_WARN_NONCOMPLIANT, 1, 526, "Warning 261: AI (91) position 21: Invalid CSET 82 character ' '" }, // ISOIEC punc
|
||||
/* 28*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_ ", 0, 1, 526, "" },
|
||||
/* 29*/ { BARCODE_DBAR_EXP, -1, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_", 0, 1, 494, "" }, // ISOIEC punc less space
|
||||
/* 30*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, -1, "[01]12345678901231[91]!\"%&'()*+,-./:;<=>?_", 0, 1, 494, "" },
|
||||
/* 31*/ { BARCODE_DBAR_STK, -1, -1, "1234567890123", 0, 3, 50, "" },
|
||||
/* 32*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character in data (digits only)" },
|
||||
/* 33*/ { BARCODE_DBAR_STK, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character in data (digits only)" },
|
||||
/* 34*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character in data (digits only)" },
|
||||
/* 35*/ { BARCODE_DBAR_STK, -1, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '5', expecting '1'" },
|
||||
/* 36*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, "12345678901235", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '5', expecting '1'" }, // Still checked
|
||||
/* 37*/ { BARCODE_DBAR_STK, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input too long (14 character maximum)" },
|
||||
/* 38*/ { BARCODE_DBAR_STK, GS1NOCHECK_MODE, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input too long (14 character maximum)" },
|
||||
/* 39*/ { BARCODE_DBAR_OMNSTK, -1, -1, "1234567890123", 0, 5, 50, "" },
|
||||
/* 40*/ { BARCODE_DBAR_OMNSTK, -1, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character in data (digits only)" },
|
||||
/* 41*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, "123456789012A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 381: Invalid character in data (digits only)" },
|
||||
/* 42*/ { BARCODE_DBAR_OMNSTK, -1, -1, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '6', expecting '1'" },
|
||||
/* 43*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, "12345678901236", ZINT_ERROR_INVALID_CHECK, -1, -1, "Error 388: Invalid check digit '6', expecting '1'" }, // Still checked
|
||||
/* 44*/ { BARCODE_DBAR_OMNSTK, -1, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input too long (14 character maximum)" },
|
||||
/* 45*/ { BARCODE_DBAR_OMNSTK, GS1NOCHECK_MODE, -1, "123456789012315", ZINT_ERROR_TOO_LONG, -1, -1, "Error 380: Input too long (14 character maximum)" },
|
||||
/* 46*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, 5, 102, "Warning 261: AI (01) position 14: Bad checksum '4', expected '1'" },
|
||||
/* 47*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, "[01]12345678901234", 0, 5, 102, "" },
|
||||
/* 48*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]12345678901231", 0, 5, 102, "" },
|
||||
/* 49*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)" },
|
||||
/* 50*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, "[01]1234567890123A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 385: Invalid character in Compressed Field data (digits only)" },
|
||||
/* 51*/ { BARCODE_DBAR_EXPSTK, -1, -1, "[01]123456789012315", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 259: Invalid data length for AI (01)" },
|
||||
/* 52*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, -1, "[01]123456789012315", 0, 5, 102, "" },
|
||||
/* 53*/ { BARCODE_DBAR_EXPSTK, -1, 1, "[01]12345678901231", 0, 9, 53, "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -1278,10 +1323,11 @@ static void test_input(int index, int debug) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -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, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (const 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_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt);
|
||||
|
||||
if (ret < ZINT_ERROR) {
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
|
||||
|
@ -543,6 +543,7 @@ const char *testUtilInputModeName(int input_mode) {
|
||||
static const struct item data[] = {
|
||||
{ "ESCAPE_MODE", ESCAPE_MODE, 8 },
|
||||
{ "GS1PARENS_MODE", GS1PARENS_MODE, 16 },
|
||||
{ "GS1NOCHECK_MODE", GS1NOCHECK_MODE, 32 },
|
||||
};
|
||||
static const int data_size = ARRAY_SIZE(data);
|
||||
int set, i;
|
||||
@ -550,7 +551,7 @@ const char *testUtilInputModeName(int input_mode) {
|
||||
if (input_mode < 0) {
|
||||
return "-1";
|
||||
}
|
||||
buf[0] = '\0';
|
||||
*buf = '\0';
|
||||
if ((input_mode & 0x7) & UNICODE_MODE) {
|
||||
strcpy(buf, "UNICODE_MODE");
|
||||
set = UNICODE_MODE;
|
||||
@ -558,7 +559,6 @@ const char *testUtilInputModeName(int input_mode) {
|
||||
strcpy(buf, "GS1_MODE");
|
||||
set = GS1_MODE;
|
||||
} else {
|
||||
strcpy(buf, "DATA_MODE");
|
||||
set = DATA_MODE;
|
||||
}
|
||||
for (i = 0; i < data_size; i++) {
|
||||
@ -578,6 +578,9 @@ const char *testUtilInputModeName(int input_mode) {
|
||||
fprintf(stderr, "testUtilInputModeName: unknown input mode %d (%d)\n", input_mode & set, input_mode);
|
||||
abort();
|
||||
}
|
||||
if (set == DATA_MODE && *buf == '\0') {
|
||||
strcpy(buf, "DATA_MODE");
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
@ -719,21 +722,32 @@ char *testUtilEscape(char *buffer, int length, char *escaped, int escaped_size)
|
||||
unsigned char *b = (unsigned char *) buffer;
|
||||
unsigned char *be = b + length;
|
||||
int non_utf8 = !testUtilIsValidUTF8(b, length);
|
||||
int chunk = -1;
|
||||
|
||||
for (i = 0; b < be && i < escaped_size; b++) {
|
||||
if (non_utf8 || *b < ' ' || *b == '\177') {
|
||||
if (i < escaped_size - 4) {
|
||||
// For VC6-compatibility need to split literal strings into <= 2K chunks
|
||||
if (i > 2040 && i / 2040 != chunk) {
|
||||
chunk = i / 2040;
|
||||
if (i + 3 < escaped_size) {
|
||||
escaped[i] = '"';
|
||||
escaped[i + 1] = ' ';
|
||||
escaped[i + 2] = '"';
|
||||
}
|
||||
i += 3;
|
||||
}
|
||||
if (non_utf8 || *b < ' ' || *b == '\177') {
|
||||
if (i + 4 < escaped_size) {
|
||||
sprintf(escaped + i, "\\%.3o", *b);
|
||||
}
|
||||
i += 4;
|
||||
} else if (*b == '\\' || *b == '"') {
|
||||
if (i < escaped_size - 2) {
|
||||
if (i + 2 < escaped_size) {
|
||||
escaped[i] = '\\';
|
||||
escaped[i + 1] = *b;
|
||||
}
|
||||
i += 2;
|
||||
} else if (b + 1 < be && *b == 0xC2 && *(b + 1) < 0xA0) {
|
||||
if (i < escaped_size - 8) {
|
||||
if (i + 8 < escaped_size) {
|
||||
sprintf(escaped + i, "\\%.3o\\%.3o", *b, *(b + 1));
|
||||
}
|
||||
i += 8;
|
||||
@ -2465,6 +2479,11 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
||||
strlen(bwipp_opts_buf) ? " " : "", option_2 * 2);
|
||||
bwipp_opts = bwipp_opts_buf;
|
||||
}
|
||||
|
||||
if (symbol->input_mode & GS1NOCHECK_MODE) {
|
||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
||||
bwipp_opts = bwipp_opts_buf;
|
||||
}
|
||||
} else {
|
||||
if (gs1_cvt) {
|
||||
if (*data != obracket && !upcean) {
|
||||
@ -2495,6 +2514,11 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
||||
bwipp_opts = bwipp_opts_buf;
|
||||
}
|
||||
}
|
||||
|
||||
if (symbol->input_mode & GS1NOCHECK_MODE) {
|
||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdontlint", strlen(bwipp_opts_buf) ? " " : "");
|
||||
bwipp_opts = bwipp_opts_buf;
|
||||
}
|
||||
} else {
|
||||
if (testUtilBwippEscape(bwipp_data, bwipp_data_size, data, data_len, symbol->input_mode & ESCAPE_MODE,
|
||||
eci, &parse, &parsefnc) == NULL) {
|
||||
|
@ -107,7 +107,7 @@ static void upca_draw(const unsigned char source[], const int length, char dest[
|
||||
|
||||
/* Make a UPC-A barcode, allowing for composite if `cc_rows` set */
|
||||
static int upca_cc(struct zint_symbol *symbol, const unsigned char source[], int length, char dest[], int cc_rows) {
|
||||
unsigned char gtin[13];
|
||||
unsigned char *gtin = symbol->text;
|
||||
float height;
|
||||
int error_number = 0;
|
||||
|
||||
@ -129,7 +129,6 @@ static int upca_cc(struct zint_symbol *symbol, const unsigned char source[], int
|
||||
}
|
||||
|
||||
upca_draw(gtin, length, dest);
|
||||
ustrcpy(symbol->text, gtin);
|
||||
|
||||
#ifdef COMPLIANT_HEIGHTS
|
||||
/* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
|
||||
@ -163,7 +162,7 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
char emode, check_digit, parity[8];
|
||||
char src_check_digit = '\0';
|
||||
unsigned char equivalent[12];
|
||||
char hrt[9];
|
||||
unsigned char *hrt = symbol->text;
|
||||
float height;
|
||||
int error_number = 0;
|
||||
|
||||
@ -298,8 +297,6 @@ static int upce_cc(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
printf("UPC-E: %s, equivalent: %s, hrt: %s, Check digit: %c\n", source, equivalent, hrt, check_digit);
|
||||
}
|
||||
|
||||
ustrcpy(symbol->text, hrt);
|
||||
|
||||
#ifdef COMPLIANT_HEIGHTS
|
||||
/* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
|
||||
same as minimum GS1 General Specifications 21.0.1 5.12.3.1 */
|
||||
@ -392,7 +389,7 @@ static int ean13_cc(struct zint_symbol *symbol, const unsigned char source[], in
|
||||
int cc_rows) {
|
||||
int i, half_way;
|
||||
char parity[6];
|
||||
unsigned char gtin[14];
|
||||
unsigned char *gtin = symbol->text;
|
||||
float height;
|
||||
int error_number = 0;
|
||||
|
||||
@ -439,7 +436,6 @@ static int ean13_cc(struct zint_symbol *symbol, const unsigned char source[], in
|
||||
|
||||
/* stop character */
|
||||
strcat(dest, "111");
|
||||
ustrcpy(symbol->text, gtin);
|
||||
|
||||
#ifdef COMPLIANT_HEIGHTS
|
||||
/* BS EN 797:1996 4.5.1 Nominal dimensions 22.85mm / 0.33mm (X) ~ 69.24,
|
||||
@ -468,7 +464,7 @@ static int ean13(struct zint_symbol *symbol, const unsigned char source[], int l
|
||||
|
||||
static int ean8_cc(struct zint_symbol *symbol, const unsigned char source[], int length, char dest[], int cc_rows) {
|
||||
/* EAN-8 is basically the same as UPC-A but with fewer digits */
|
||||
unsigned char gtin[10];
|
||||
unsigned char *gtin = symbol->text;
|
||||
float height;
|
||||
int error_number = 0;
|
||||
|
||||
@ -490,7 +486,6 @@ static int ean8_cc(struct zint_symbol *symbol, const unsigned char source[], int
|
||||
}
|
||||
|
||||
upca_draw(gtin, length, dest);
|
||||
ustrcpy(symbol->text, gtin);
|
||||
|
||||
#ifdef COMPLIANT_HEIGHTS
|
||||
/* BS EN 797:1996 4.5.1 Nominal dimensions 18.23mm / 0.33mm (X) ~ 55.24,
|
||||
|
@ -262,6 +262,7 @@ extern "C" {
|
||||
/* The following may be OR-ed with above */
|
||||
#define ESCAPE_MODE 8 /* Process escape sequences */
|
||||
#define GS1PARENS_MODE 16 /* Process parentheses as GS1 AI delimiters (instead of square brackets) */
|
||||
#define GS1NOCHECK_MODE 32 /* Do not check validity of GS1 data (except that printable ASCII only) */
|
||||
|
||||
/* Data Matrix specific options (`symbol->option_3`) */
|
||||
#define DM_SQUARE 100 /* Only consider square versions on automatic symbol size selection */
|
||||
@ -291,7 +292,6 @@ extern "C" {
|
||||
|
||||
/* Warning warn (`symbol->warn_level`) */
|
||||
#define WARN_DEFAULT 0 /* Default behaviour */
|
||||
#define WARN_ZPL_COMPAT 1 /* ZPL compatible behaviour */
|
||||
#define WARN_FAIL_ALL 2 /* Treat warning as error */
|
||||
|
||||
/* Capability flags (ZBarcode_Cap() `cap_flag`) */
|
||||
|
@ -61,6 +61,7 @@ namespace Zint {
|
||||
m_whitespace = 0;
|
||||
m_vwhitespace = 0;
|
||||
m_gs1parens = false;
|
||||
m_gs1nocheck = false;
|
||||
m_gssep = false;
|
||||
m_reader_init = false;
|
||||
m_rotate_angle = 0;
|
||||
@ -98,6 +99,9 @@ namespace Zint {
|
||||
if (m_gs1parens) {
|
||||
m_zintSymbol->input_mode |= GS1PARENS_MODE;
|
||||
}
|
||||
if (m_gs1nocheck) {
|
||||
m_zintSymbol->input_mode |= GS1NOCHECK_MODE;
|
||||
}
|
||||
if (m_gssep) {
|
||||
m_zintSymbol->output_options |= GS1_GS_SEPARATOR;
|
||||
}
|
||||
@ -333,6 +337,10 @@ namespace Zint {
|
||||
m_gs1parens = gs1parens;
|
||||
}
|
||||
|
||||
void QZint::setGS1NoCheck(bool gs1nocheck) {
|
||||
m_gs1nocheck = gs1nocheck;
|
||||
}
|
||||
|
||||
void QZint::setReaderInit(bool reader_init) {
|
||||
m_reader_init = reader_init;
|
||||
}
|
||||
|
@ -101,6 +101,8 @@ public:
|
||||
|
||||
void setGS1Parens(bool gs1parens);
|
||||
|
||||
void setGS1NoCheck(bool gs1nocheck);
|
||||
|
||||
void setReaderInit(bool reader_init);
|
||||
|
||||
void setDebug(bool debug);
|
||||
@ -172,6 +174,7 @@ private:
|
||||
int target_size_horiz;
|
||||
int target_size_vert;
|
||||
bool m_gs1parens;
|
||||
bool m_gs1nocheck;
|
||||
bool m_gssep;
|
||||
bool m_reader_init;
|
||||
bool m_debug;
|
||||
|
@ -28,6 +28,7 @@
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
*/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
/*
|
||||
History
|
||||
|
||||
@ -117,6 +118,10 @@
|
||||
- Added -vwhitesp option
|
||||
2021-05-28 GL
|
||||
- -cols maximum changed from 108 to 200 (DotCode)
|
||||
2021-07-09 GL
|
||||
- Removed -wzpl, added -gs1nocheck
|
||||
- Made -format position independent
|
||||
- Tabs -> spaces
|
||||
*/
|
||||
|
||||
#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
|
||||
@ -453,6 +458,7 @@ static char help_message[] = "zint tcl(stub,obj) dll\n"
|
||||
" -format binary|unicode|gs1: input data format. Default:unicode\n"
|
||||
" -fullmultibyte bool: allow multibyte compaction for xQR, HanXin, Gridmatrix\n"
|
||||
/* cli option --gs1 replaced by -format */
|
||||
" -gs1nocheck bool: for gs1, do not check validity of data (allows non-standard symbols)\n"
|
||||
" -gs1parens bool: for gs1, AIs enclosed in parentheses instead of square brackets\n"
|
||||
" -gssep bool: for gs1, use gs as separator instead fnc1 (Datamatrix only)\n"
|
||||
" -height double: Symbol height in modules\n"
|
||||
@ -480,7 +486,6 @@ static char help_message[] = "zint tcl(stub,obj) dll\n"
|
||||
" -vwhitesp integer: vertical quiet zone in modules\n"
|
||||
" -whitesp integer: horizontal quiet zone in modules\n"
|
||||
" -werror bool: Convert all warnings into errors\n"
|
||||
" -wzpl bool: ZPL compatibility mode (allows non-standard symbols)\n"
|
||||
" -to {x0 y0 ?width? ?height?}: place to put in photo image\n"
|
||||
"\n"
|
||||
"zint symbologies: List available symbologies\n"
|
||||
@ -559,7 +564,7 @@ static int Zint(ClientData tkFlagPtr, Tcl_Interp *interp, int objc,
|
||||
/* > Check if option argument is given and decode it */
|
||||
if (objc > 1)
|
||||
{
|
||||
char *subCmds[] = {"encode", "symbologies", "eci", "version", "help", NULL};
|
||||
char *subCmds[] = {"encode", "symbologies", "eci", "version", "help", NULL};
|
||||
if(Tcl_GetIndexFromObj(interp, objv[1], (const char **) subCmds,
|
||||
"option", 0, &Index)
|
||||
== TCL_ERROR)
|
||||
@ -700,18 +705,20 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
char *optionList[] = {
|
||||
"-addongap", "-barcode", "-bg", "-bind", "-bold", "-border", "-box",
|
||||
"-cols", "-dmre", "-dotsize", "-dotty", "-eci", "-fg", "-format",
|
||||
"-fullmultibyte", "-gs1parens", "-gssep", "-height", "-init", "-mask", "-mode",
|
||||
"-fullmultibyte", "-gs1nocheck", "-gs1parens", "-gssep", "-height",
|
||||
"-init", "-mask", "-mode",
|
||||
"-nobackground", "-notext", "-primary", "-reverse", "-rotate",
|
||||
"-rows", "-scale", "-scmvv", "-secure", "-separator", "-smalltext",
|
||||
"-square", "-to", "-vers", "-vwhitesp", "-werror", "-whitesp", "-wzpl",
|
||||
"-square", "-to", "-vers", "-vwhitesp", "-werror", "-whitesp",
|
||||
NULL};
|
||||
enum iOption {
|
||||
iAddonGap, iBarcode, iBG, iBind, iBold, iBorder, iBox,
|
||||
iCols, iDMRE, iDotSize, iDotty, iECI, iFG, iFormat,
|
||||
iFullMultiByte, iGS1Parens, iGSSep, iHeight, iInit, iMask, iMode,
|
||||
iFullMultiByte, iGS1NoCheck, iGS1Parens, iGSSep, iHeight,
|
||||
iInit, iMask, iMode,
|
||||
iNoBackground, iNoText, iPrimary, iReverse, iRotate,
|
||||
iRows, iScale, iSCMvv, iSecure, iSeparator, iSmallText,
|
||||
iSquare, iTo, iVers, iVWhiteSp, iWError, iWhiteSp, iWZPL
|
||||
iSquare, iTo, iVers, iVWhiteSp, iWError, iWhiteSp
|
||||
};
|
||||
int optionIndex;
|
||||
int intValue;
|
||||
@ -733,6 +740,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
case iBox:
|
||||
case iDMRE:
|
||||
case iDotty:
|
||||
case iGS1NoCheck:
|
||||
case iGS1Parens:
|
||||
case iGSSep:
|
||||
case iInit:
|
||||
@ -743,7 +751,6 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
case iFullMultiByte:
|
||||
case iReverse:
|
||||
case iWError:
|
||||
case iWZPL:
|
||||
/* >> Binary options */
|
||||
if (TCL_OK != Tcl_GetBooleanFromObj(interp, objv[optionPos+1],
|
||||
&intValue))
|
||||
@ -855,6 +862,13 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
my_symbol->output_options &= ~BARCODE_DOTTY_MODE;
|
||||
}
|
||||
break;
|
||||
case iGS1NoCheck:
|
||||
if (intValue) {
|
||||
my_symbol->input_mode |= GS1NOCHECK_MODE;
|
||||
} else {
|
||||
my_symbol->input_mode &= ~GS1NOCHECK_MODE;
|
||||
}
|
||||
break;
|
||||
case iGS1Parens:
|
||||
if (intValue) {
|
||||
my_symbol->input_mode |= GS1PARENS_MODE;
|
||||
@ -907,11 +921,6 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
my_symbol->warn_level = WARN_FAIL_ALL;
|
||||
}
|
||||
break;
|
||||
case iWZPL:
|
||||
if (intValue) {
|
||||
my_symbol->warn_level = WARN_ZPL_COMPAT;
|
||||
}
|
||||
break;
|
||||
case iFG:
|
||||
strncpy(my_symbol->fgcolour, pStr, lStr);
|
||||
my_symbol->fgcolour[lStr]='\0';
|
||||
@ -1115,9 +1124,9 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
break;
|
||||
}
|
||||
switch (intValue) {
|
||||
case iBinary: my_symbol->input_mode = DATA_MODE; break;
|
||||
case iGS1: my_symbol->input_mode = GS1_MODE; break;
|
||||
default: my_symbol->input_mode = UNICODE_MODE; break;
|
||||
case iBinary: my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | DATA_MODE; break;
|
||||
case iGS1: my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE; break;
|
||||
default: my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | UNICODE_MODE; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1130,15 +1139,15 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* >>> option_3 is set by three values depending on the symbology */
|
||||
/* On wrong symbology, the option is ignored(as does the zint program)*/
|
||||
if (fFullMultiByte && (cap & ZINT_CAP_FULL_MULTIBYTE)) {
|
||||
my_symbol->option_3 = ZINT_FULL_MULTIBYTE;
|
||||
}
|
||||
if (Mask && (cap & ZINT_CAP_MASK)) {
|
||||
my_symbol->option_3 |= Mask << 8;
|
||||
}
|
||||
if (fFullMultiByte && (cap & ZINT_CAP_FULL_MULTIBYTE)) {
|
||||
my_symbol->option_3 = ZINT_FULL_MULTIBYTE;
|
||||
}
|
||||
if (Mask && (cap & ZINT_CAP_MASK)) {
|
||||
my_symbol->option_3 |= Mask << 8;
|
||||
}
|
||||
if (Separator && (cap & ZINT_CAP_STACKABLE)) {
|
||||
my_symbol->option_3 = Separator;
|
||||
}
|
||||
my_symbol->option_3 = Separator;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* >>> option_2 is set by two values depending on the symbology */
|
||||
/* On wrong symbology, the option is ignored(as does the zint program)*/
|
||||
@ -1152,15 +1161,15 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
if (!fError) {
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* >>> Get input mode */
|
||||
if (my_symbol->input_mode == DATA_MODE) {
|
||||
if ((my_symbol->input_mode & 0x07) == DATA_MODE) {
|
||||
/* Binary data */
|
||||
pStr = (char *) Tcl_GetByteArrayFromObj(objv[2], &lStr);
|
||||
} else {
|
||||
/* UTF8 Data */
|
||||
pStr = Tcl_GetStringFromObj(objv[2], &lStr);
|
||||
Tcl_UtfToExternalDString( hZINTEncoding, pStr, lStr, &dsInput);
|
||||
pStr = Tcl_DStringValue( &dsInput );
|
||||
lStr = Tcl_DStringLength( &dsInput );
|
||||
pStr = Tcl_GetStringFromObj(objv[2], &lStr);
|
||||
Tcl_UtfToExternalDString( hZINTEncoding, pStr, lStr, &dsInput);
|
||||
pStr = Tcl_DStringValue( &dsInput );
|
||||
lStr = Tcl_DStringLength( &dsInput );
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
@ -1410,36 +1410,47 @@ symbology.
|
||||
The way in which the input data is encoded can be set using the input_mode
|
||||
property. Valid values are shown in the table below.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Value | Effect
|
||||
------------------------------------------------------------------------------
|
||||
DATA_MODE | Uses full ASCII range interpreted as Latin-1 or binary data.
|
||||
UNICODE_MODE | Uses pre-formatted UTF-8 input.
|
||||
GS1_MODE | Encodes GS1 data using FNC1 characters.
|
||||
|
|
||||
ESCAPE_MODE | Process input data for escape sequences.
|
||||
GS1PARENS_MODE | Parentheses (round brackets) used in input data instead of
|
||||
| square brackets to delimit GS1 Application Identifiers
|
||||
| (parentheses must not otherwise occur in the data).
|
||||
------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
Value | Effect
|
||||
-------------------------------------------------------------------------------
|
||||
DATA_MODE | Uses full ASCII range interpreted as Latin-1 or binary data.
|
||||
UNICODE_MODE | Uses pre-formatted UTF-8 input.
|
||||
GS1_MODE | Encodes GS1 data using FNC1 characters.
|
||||
----------------|--------------------------------------------------------------
|
||||
ESCAPE_MODE | Process input data for escape sequences.
|
||||
GS1PARENS_MODE | Parentheses (round brackets) used in input data instead of
|
||||
| square brackets to delimit GS1 Application Identifiers
|
||||
| (parentheses must not otherwise occur in the data).
|
||||
GS1NOCHECK_MODE | Do not check GS1 data for validity, i.e. suppress checks for
|
||||
| valid AIs and data lengths. Invalid characters (e.g.
|
||||
| control characters, extended ASCII characters) are still
|
||||
| checked for.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
The default mode is DATA_MODE.
|
||||
|
||||
DATA_MODE, UNICODE_MODE and GS1_MODE are mutually exclusive, whereas ESCAPE_MODE
|
||||
and GS1PARENS_MODE are optional. So, for example, you can set
|
||||
DATA_MODE, UNICODE_MODE and GS1_MODE are mutually exclusive, whereas ESCAPE_MODE,
|
||||
GS1PARENS_MODE and GS1NOCHECK_MODE are optional. So, for example, you can set
|
||||
|
||||
my_symbol->input_mode = UNICODE_MODE | ESCAPE_MODE;
|
||||
|
||||
or
|
||||
|
||||
my_symbol->input_mode = GS1_MODE | GS1PARENS_MODE;
|
||||
my_symbol->input_mode = GS1_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE;
|
||||
|
||||
whereas
|
||||
|
||||
my_symbol->input_mode = DATA_MODE | GS1_MODE;
|
||||
|
||||
is not valid. Permissible escape sequences are listed in section 4.1. An
|
||||
example of GS1PARENS_MODE usage is given in section 6.1.11.3.
|
||||
is not valid.
|
||||
|
||||
Permissible escape sequences are listed in section 4.1. An example of
|
||||
GS1PARENS_MODE usage is given in section 6.1.11.3.
|
||||
|
||||
GS1NOCHECK_MODE is for use with legacy systems that have data that does not
|
||||
conform to the current GS1 standard. Non-printable ASCII input is still checked
|
||||
for, as is the validity of GS1 data specified without AIs (e.g. linear data for
|
||||
GS1 DataBar Omnidirectional/Limited/etc.).
|
||||
|
||||
5.11 Verifying Symbology Availability
|
||||
-------------------------------------
|
||||
|
@ -1,3 +1,5 @@
|
||||
mkdir isotest_out
|
||||
cd isotest_out
|
||||
echo Creating images for Code 49...
|
||||
zint -o aimbc6_fig1.gif -b 24 -d "MULTIPLE ROWS IN CODE 49"
|
||||
zint -o aimbc6_fig3.gif -b 24 -d "EXAMPLE 2"
|
||||
@ -75,7 +77,7 @@ zint -o aimdtsc15032_fig1.gif -b 144 --secure=2 -d "ULTRACODE_123456789!"
|
||||
zint -o aimdtsc15032_figg2.gif -b 144 --secure=2 -d "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS"
|
||||
zint -o aimdtsc15032_figg3.gif -b 144 --secure=2 -d "אולטרה-קוד1234"
|
||||
zint -o aimdtsc15032_figg4a.gif -b 144 --secure=2 -d "https://aimglobal.org/jcrv3tX"
|
||||
zint -o aimdtsc15032_figg6.gif -b 144 --gs1 -d "[01]03453120000011[17]20121125[10]ABCD1234"
|
||||
zint -o aimdtsc15032_figg6.gif -b 144 --gs1 -d "[01]03453120000011[17]121125[10]ABCD1234"
|
||||
echo Creating images of EAN/UPC...
|
||||
zint -o en797_fig1.gif -b 13 -d 501234567890
|
||||
zint -o en797_fig2.gif -b 13 -d 2012345
|
||||
@ -98,7 +100,7 @@ zint -o iso16022_figo2.gif -b 71 -d "123456"
|
||||
zint -o iso16022_figr1.gif -b 71 -d "30Q324343430794<OQQ"
|
||||
echo Creating images for Maxicode
|
||||
zint -o iso16023_fig2.gif -b 57 --mode=4 -d "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL..."
|
||||
zint -o iso16023_figb2.gif -b 57 --mode=2 --primary="152382802840001" -d "[)>\R01\G961Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G634 ALPHA DR\GPITTSBURGH\GPA\R\E"
|
||||
zint -o iso16023_figb2.gif -b 57 --mode=2 --primary="152382802840001" -d "[)>\R01\G961Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G634 ALPHA DR\GPITTSBURGH\GPA\R\E" --esc
|
||||
zint -o iso16023_figh1.gif -b 57 --mode=4 -d "Maxi Code (19 chars)"
|
||||
echo Creating images for QR Code...
|
||||
zint -o iso18004_fig1.gif -b 58 -d "QR Code Symbol"
|
||||
@ -113,7 +115,7 @@ zint -o iso24723_fig3.gif -b 136 --mode=1 --primary=121230 -d "[15]021231"
|
||||
zint -o iso24723_fig4.gif -b 130 --mode=1 --primary=1234567 -d "[21]A12345678"
|
||||
zint -o iso24723_fig5.gif -b 130 --mode=1 --primary=331234567890 -d "[99]1234-abcd"
|
||||
zint -o iso24723_fig6.gif -b 137 --mode=1 --primary=341234567890 -d "[17]010200"
|
||||
zint -o iso24723_fig7.gif -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o iso24723_fig7.gif -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
zint -o iso24723_fig8.gif -b 132 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
zint -o iso24723_fig9.gif -b 134 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
zint -o iso24723_fig10.gif -b 139 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678"
|
||||
|
@ -140,6 +140,7 @@ static void usage(void) {
|
||||
" --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n"
|
||||
" --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\n"
|
||||
" --gs1 Treat input as GS1 compatible data\n"
|
||||
" --gs1nocheck Do not check validity of GS1 data\n"
|
||||
" --gs1parens Process parentheses \"()\" as GS1 AI delimiters, not \"[]\"\n"
|
||||
" --gssep Use separator GS for GS1 (Data Matrix)\n"
|
||||
" -h, --help Display help message\n"
|
||||
@ -167,7 +168,6 @@ static void usage(void) {
|
||||
" --vwhitesp=NUMBER Set height of vertical whitespace in multiples of X-dim\n"
|
||||
" -w, --whitesp=NUMBER Set width of horizontal whitespace in multiples of X-dim\n"
|
||||
" --werror Convert all warnings into errors\n"
|
||||
" --wzpl ZPL compatibility mode (allows non-standard symbols)\n"
|
||||
);
|
||||
}
|
||||
|
||||
@ -799,10 +799,11 @@ int main(int argc, char **argv) {
|
||||
OPT_ADDONGAP = 128, OPT_BATCH, OPT_BINARY, OPT_BG, OPT_BIND, OPT_BOLD, OPT_BORDER,
|
||||
OPT_BOX, OPT_CMYK, OPT_COLS, OPT_DIRECT, OPT_DMRE, OPT_DOTSIZE, OPT_DOTTY, OPT_DUMP,
|
||||
OPT_ECI, OPT_ESC, OPT_FG, OPT_FILETYPE, OPT_FONTSIZE, OPT_FULLMULTIBYTE,
|
||||
OPT_GS1, OPT_GS1PARENS, OPT_GSSEP, OPT_HEIGHT, OPT_INIT, OPT_MIRROR, OPT_MASK, OPT_MODE,
|
||||
OPT_GS1, OPT_GS1NOCHECK, OPT_GS1PARENS, OPT_GSSEP,
|
||||
OPT_HEIGHT, OPT_INIT, OPT_MIRROR, OPT_MASK, OPT_MODE,
|
||||
OPT_NOBACKGROUND, OPT_NOTEXT, OPT_PRIMARY, OPT_ROTATE, OPT_ROWS, OPT_SCALE,
|
||||
OPT_SCMVV, OPT_SECURE, OPT_SEPARATOR, OPT_SMALL, OPT_SQUARE, OPT_VERBOSE, OPT_VERS,
|
||||
OPT_VWHITESP, OPT_WERROR, OPT_WZPL,
|
||||
OPT_VWHITESP, OPT_WERROR,
|
||||
};
|
||||
int option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
@ -831,6 +832,7 @@ int main(int argc, char **argv) {
|
||||
{"fontsize", 1, NULL, OPT_FONTSIZE},
|
||||
{"fullmultibyte", 0, NULL, OPT_FULLMULTIBYTE},
|
||||
{"gs1", 0, 0, OPT_GS1},
|
||||
{"gs1nocheck", 0, NULL, OPT_GS1NOCHECK},
|
||||
{"gs1parens", 0, NULL, OPT_GS1PARENS},
|
||||
{"gssep", 0, NULL, OPT_GSSEP},
|
||||
{"height", 1, NULL, OPT_HEIGHT},
|
||||
@ -859,7 +861,6 @@ int main(int argc, char **argv) {
|
||||
{"vwhitesp", 1, NULL, OPT_VWHITESP},
|
||||
{"werror", 0, NULL, OPT_WERROR},
|
||||
{"whitesp", 1, NULL, 'w'},
|
||||
{"wzpl", 0, NULL, OPT_WZPL},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
int c = getopt_long(argc, argv, "b:d:ehi:o:rtw:", long_options, &option_index);
|
||||
@ -1003,6 +1004,9 @@ int main(int argc, char **argv) {
|
||||
case OPT_GS1:
|
||||
my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE;
|
||||
break;
|
||||
case OPT_GS1NOCHECK:
|
||||
my_symbol->input_mode |= GS1NOCHECK_MODE;
|
||||
break;
|
||||
case OPT_GS1PARENS:
|
||||
my_symbol->input_mode |= GS1PARENS_MODE;
|
||||
break;
|
||||
@ -1182,9 +1186,6 @@ int main(int argc, char **argv) {
|
||||
case OPT_WERROR:
|
||||
my_symbol->warn_level = WARN_FAIL_ALL;
|
||||
break;
|
||||
case OPT_WZPL:
|
||||
my_symbol->warn_level = WARN_ZPL_COMPAT;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage();
|
||||
|
@ -1,3 +1,5 @@
|
||||
mkdir test_out
|
||||
cd test_out
|
||||
echo testing Code 11
|
||||
zint -o bar01.txt -b 1 -d 87654321
|
||||
zint -o bar01.gif -b 1 --height=50 --border=10 -d 87654321
|
||||
@ -27,9 +29,9 @@ zint -o bar08.txt -b 8 -d CODE39
|
||||
zint -o bar08.gif -b 8 --height=50 --border=10 -d CODE39
|
||||
zint -o bar08.svg -b 8 --height=50 --border=10 -d CODE39
|
||||
echo testing Extended Code 39
|
||||
zint -o bar09.txt -b 9 -d 'Code 39e'
|
||||
zint -o bar09.gif -b 9 --height=50 --border=10 -d 'Code 39e'
|
||||
zint -o bar09.svg -b 9 --height=50 --border=10 -d 'Code 39e'
|
||||
zint -o bar09.txt -b 9 -d "Code 39e"
|
||||
zint -o bar09.gif -b 9 --height=50 --border=10 -d "Code 39e"
|
||||
zint -o bar09.svg -b 9 --height=50 --border=10 -d "Code 39e"
|
||||
echo testing EAN8
|
||||
zint -o bar10.txt -b 13 -d 7654321
|
||||
zint -o bar10.gif -b 13 --height=50 --border=10 -d 7654321
|
||||
@ -63,9 +65,9 @@ zint -o bar18.txt -b 18 -d D765432C
|
||||
zint -o bar18.gif -b 18 --height=50 --border=10 -d D765432C
|
||||
zint -o bar18.svg -b 18 --height=50 --border=10 -d D765432C
|
||||
echo testing Code 128
|
||||
zint -o bar20.txt -b 20 -d 'Code 128'
|
||||
zint -o bar20.gif -b 20 --height=50 --border=10 -d 'Code 128'
|
||||
zint -o bar20.svg -b 20 --height=50 --border=10 -d 'Code 128'
|
||||
zint -o bar20.txt -b 20 -d "Code 128"
|
||||
zint -o bar20.gif -b 20 --height=50 --border=10 -d "Code 128"
|
||||
zint -o bar20.svg -b 20 --height=50 --border=10 -d "Code 128"
|
||||
echo testing Deutsche Post Leitcode
|
||||
zint -o bar21.txt -b 21 -d 3210987654321
|
||||
zint -o bar21.gif -b 21 --height=50 --border=10 -d 3210987654321
|
||||
@ -86,9 +88,9 @@ zint -o bar24.txt -b 24 -d "Demonstration Code 49"
|
||||
zint -o bar24.gif -b 24 -d "Demonstration Code 49"
|
||||
zint -o bar24.svg -b 24 -d "Demonstration Code 49"
|
||||
echo testing Code 93
|
||||
zint -o bar25.txt -b 25 -d 'Code 93'
|
||||
zint -o bar25.gif -b 25 --height=50 --border=10 -d 'Code 93'
|
||||
zint -o bar25.svg -b 25 --height=50 --border=10 -d 'Code 93'
|
||||
zint -o bar25.txt -b 25 -d "Code 93"
|
||||
zint -o bar25.gif -b 25 --height=50 --border=10 -d "Code 93"
|
||||
zint -o bar25.svg -b 25 --height=50 --border=10 -d "Code 93"
|
||||
echo testing Flattermarken
|
||||
zint -o bar28.txt -b 28 -d 87654321
|
||||
zint -o bar28.gif -b 28 --height=50 --border=10 -d 87654321
|
||||
@ -106,9 +108,9 @@ zint -o bar31.txt -b 31 -d "[01]90012345678908[3103]001750"
|
||||
zint -o bar31.gif -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750"
|
||||
zint -o bar31.svg -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750"
|
||||
echo testing Telepen Alpha
|
||||
zint -o bar32.txt -b 32 -d 'Telepen'
|
||||
zint -o bar32.gif -b 32 --height=50 --border=10 -d 'Telepen'
|
||||
zint -o bar32.svg -b 32 --height=50 --border=10 -d 'Telepen'
|
||||
zint -o bar32.txt -b 32 -d "Telepen"
|
||||
zint -o bar32.gif -b 32 --height=50 --border=10 -d "Telepen"
|
||||
zint -o bar32.svg -b 32 --height=50 --border=10 -d "Telepen"
|
||||
echo testing UPC A
|
||||
zint -o bar34.txt -b 34 -d 10987654321
|
||||
zint -o bar34.gif -b 34 --height=50 --border=10 -d 10987654321
|
||||
@ -185,9 +187,9 @@ echo testing QR Code
|
||||
zint -o bar58.txt -b 58 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58.gif -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58.svg -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint"
|
||||
zint -o bar58k.txt -b 58 --kanji -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.gif -b 58 --kanji --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.svg -b 58 --kanji --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.txt -b 58 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.gif -b 58 --border=10 -d "画像内の単語を非表示にする"
|
||||
zint -o bar58k.svg -b 58 --border=10 -d "画像内の単語を非表示にする"
|
||||
echo testing Code 128 Subset B
|
||||
zint -o bar60.txt -b 60 -d 87654321
|
||||
zint -o bar60.gif -b 60 --height=50 --border=10 -d 87654321
|
||||
@ -201,9 +203,9 @@ zint -o bar64.txt -b 63 -d 87654321AUSPS
|
||||
zint -o bar64.gif -b 63 --border=10 -d 87654321AUSPS
|
||||
zint -o bar64.svg -b 63 --border=10 -d 87654321AUSPS
|
||||
echo testing Australian Post Customer 3
|
||||
zint -o bar65.txt -b 63 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.gif -b 63 --border=10 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.svg -b 63 --border=10 -d '87654321 AUSTRALIA'
|
||||
zint -o bar65.txt -b 63 -d "87654321 AUSTRALIA"
|
||||
zint -o bar65.gif -b 63 --border=10 -d "87654321 AUSTRALIA"
|
||||
zint -o bar65.svg -b 63 --border=10 -d "87654321 AUSTRALIA"
|
||||
echo testing Australian Post Reply Paid
|
||||
zint -o bar66.txt -b 66 -d 87654321
|
||||
zint -o bar66.gif -b 66 --border=10 -d 87654321
|
||||
@ -296,9 +298,9 @@ zint -o bar89.txt -b 89 -d 3210987654321
|
||||
zint -o bar89.gif -b 89 --height=50 --border=10 -d 3210987654321
|
||||
zint -o bar89.svg -b 89 --height=50 --border=10 -d 3210987654321
|
||||
echo testing KIX Code
|
||||
zint -o bar90.txt -b 90 -d '1231FZ13Xhs'
|
||||
zint -o bar90.gif -b 90 --border=10 -d '1231FZ13Xhs'
|
||||
zint -o bar90.svg -b 90 --border=10 -d '1231FZ13Xhs'
|
||||
zint -o bar90.txt -b 90 -d "1231FZ13Xhs"
|
||||
zint -o bar90.gif -b 90 --border=10 -d "1231FZ13Xhs"
|
||||
zint -o bar90.svg -b 90 --border=10 -d "1231FZ13Xhs"
|
||||
echo testing Aztec Code
|
||||
zint -o bar92.txt -b 92 -d "Demonstration Aztec Code symbol generated by libzint"
|
||||
zint -o bar92.gif -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint"
|
||||
@ -314,9 +316,9 @@ echo testing Micro QR Code
|
||||
zint -o bar97.txt -b 97 -d "MicroQR Code"
|
||||
zint -o bar97.gif -b 97 --border=10 -d "MicroQR Code"
|
||||
zint -o bar97.svg -b 97 --border=10 -d "MicroQR Code"
|
||||
zint -o bar97k.txt -b 97 --kanji -d "小さい"
|
||||
zint -o bar97k.gif -b 97 --kanji --border=10 -d "小さい"
|
||||
zint -o bar97k.svg -b 97 --kanji --border=10 -d "小さい"
|
||||
zint -o bar97k.txt -b 97 -d "小さい"
|
||||
zint -o bar97k.gif -b 97 --border=10 -d "小さい"
|
||||
zint -o bar97k.svg -b 97 --border=10 -d "小さい"
|
||||
echo testing HIBC LIC 128
|
||||
zint -o bar98.txt -b 98 -d "A99912345/9901510X3"
|
||||
zint -o bar98.gif -b 98 --border=10 -d "A99912345/9901510X3"
|
||||
@ -385,9 +387,9 @@ zint -o bar132.txt -b 132 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
zint -o bar132.gif -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
zint -o bar132.svg -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102"
|
||||
echo testing DataBar Limited Composite with CC-B
|
||||
zint -o bar133.txt -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.gif -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.svg -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv"
|
||||
zint -o bar133.txt -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
zint -o bar133.gif -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
zint -o bar133.svg -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" --gs1nocheck
|
||||
echo testing DataBar Expanded Composite with CC-A
|
||||
zint -o bar134.txt -b 134 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
zint -o bar134.gif -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E"
|
||||
|
@ -910,10 +910,10 @@ static void test_other_opts(int index, int debug) {
|
||||
/* 13*/ { 19, "1", -1, " --werror", NULL, "Error 207: Codabar 18 not supported" },
|
||||
/* 14*/ { BARCODE_GS1_128, "[01]12345678901231", -1, "", NULL, "" },
|
||||
/* 15*/ { BARCODE_GS1_128, "0112345678901231", -1, "", NULL, "Error 252: Data does not start with an AI" },
|
||||
/* 16*/ { BARCODE_GS1_128, "0112345678901231", -1, " --wzpl", NULL, "Warning 252: Data does not start with an AI" },
|
||||
/* 16*/ { BARCODE_GS1_128, "0112345678901231", -1, " --gs1nocheck", NULL, "Error 252: Data does not start with an AI" },
|
||||
/* 17*/ { BARCODE_GS1_128, "[00]376104250021234569", -1, "", NULL, "" },
|
||||
/* 18*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, "", NULL, "Warning 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
/* 19*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --wzpl", NULL, "Warning 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
/* 19*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --gs1nocheck", NULL, "" },
|
||||
/* 20*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --werror", NULL, "Error 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
|
@ -22,7 +22,7 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>460</height>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -109,13 +109,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>300</height>
|
||||
<height>320</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>300</height>
|
||||
<height>320</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
@ -548,6 +548,37 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkRInit">
|
||||
<property name="toolTip">
|
||||
<string>Create reader initialisation/programming symbol
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Reader Init</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="chksLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_chksLayout">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkEscape">
|
||||
<property name="toolTip">
|
||||
@ -607,13 +638,13 @@ as delimiters for GS1 Application Identifiers
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkRInit">
|
||||
<widget class="QCheckBox" name="chkGS1NoCheck">
|
||||
<property name="toolTip">
|
||||
<string>Create reader initialisation/programming symbol
|
||||
<string>Do not check GS1 data for validity
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Reader Init</string>
|
||||
<string>GS1 &No Check</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
|
@ -168,6 +168,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
|
||||
chkData->setChecked(settings.value("studio/chk_data").toInt() ? true : false);
|
||||
chkRInit->setChecked(settings.value("studio/chk_rinit").toInt() ? true : false);
|
||||
chkGS1Parens->setChecked(settings.value("studio/chk_gs1parens").toInt() ? true : false);
|
||||
chkGS1NoCheck->setChecked(settings.value("studio/chk_gs1nocheck").toInt() ? true : false);
|
||||
chkAutoHeight->setChecked(settings.value("studio/appearance/autoheight", 1).toInt() ? true : false);
|
||||
heightb->setValue(settings.value("studio/appearance/height", 50.0f).toFloat());
|
||||
bwidth->setValue(settings.value("studio/appearance/border", 0).toInt());
|
||||
@ -205,6 +206,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
|
||||
connect(chkData, SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
connect(chkRInit, SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
connect(chkGS1Parens, SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
connect(chkGS1NoCheck, SIGNAL(stateChanged( int )), SLOT(update_preview()));
|
||||
connect(spnWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
|
||||
connect(spnVWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
|
||||
connect(btnAbout, SIGNAL(clicked( bool )), SLOT(about()));
|
||||
@ -259,6 +261,7 @@ MainWindow::~MainWindow()
|
||||
settings.setValue("studio/chk_data", chkData->isChecked() ? 1 : 0);
|
||||
settings.setValue("studio/chk_rinit", chkRInit->isChecked() ? 1 : 0);
|
||||
settings.setValue("studio/chk_gs1parens", chkGS1Parens->isChecked() ? 1 : 0);
|
||||
settings.setValue("studio/chk_gs1nocheck", chkGS1NoCheck->isChecked() ? 1 : 0);
|
||||
settings.setValue("studio/appearance/autoheight", chkAutoHeight->isChecked() ? 1 : 0);
|
||||
settings.setValue("studio/appearance/height", heightb->value());
|
||||
settings.setValue("studio/appearance/border", bwidth->value());
|
||||
@ -1011,6 +1014,7 @@ void MainWindow::change_options()
|
||||
|
||||
cmbECI->setEnabled(m_bc.bc.supportsECI(symbology)); /* Will need checking again in update_preview() as encoding mode dependent (HIBC) */
|
||||
chkGS1Parens->setEnabled(m_bc.bc.supportsGS1(symbology)); /* Ditto (GS1) */
|
||||
chkGS1NoCheck->setEnabled(m_bc.bc.supportsGS1(symbology)); /* Ditto (GS1) */
|
||||
chkRInit->setEnabled(m_bc.bc.supportsReaderInit(symbology)); /* Ditto (HIBC and GS1) */
|
||||
chkAutoHeight->setEnabled(!m_bc.bc.isFixedRatio(symbology));
|
||||
chkHRTShow->setEnabled(m_bc.bc.hasHRT(symbology));
|
||||
@ -1612,6 +1616,7 @@ void MainWindow::update_preview()
|
||||
lblECI->setEnabled(cmbECI->isEnabled());
|
||||
}
|
||||
chkGS1Parens->setEnabled(m_bc.bc.supportsGS1());
|
||||
chkGS1NoCheck->setEnabled(m_bc.bc.supportsGS1());
|
||||
chkRInit->setEnabled(m_bc.bc.supportsReaderInit() && (m_bc.bc.inputMode() & 0x07) != GS1_MODE);
|
||||
|
||||
if (!grpComposite->isHidden() && chkComposite->isChecked())
|
||||
@ -1624,6 +1629,7 @@ void MainWindow::update_preview()
|
||||
}
|
||||
m_bc.bc.setECI(cmbECI->isEnabled() ? cmbECI->currentIndex() : 0);
|
||||
m_bc.bc.setGS1Parens(chkGS1Parens->isEnabled() && chkGS1Parens->isChecked());
|
||||
m_bc.bc.setGS1NoCheck(chkGS1NoCheck->isEnabled() && chkGS1NoCheck->isChecked());
|
||||
m_bc.bc.setReaderInit(chkRInit->isEnabled() && chkRInit->isChecked());
|
||||
m_bc.bc.setShowText(chkHRTShow->isEnabled() && chkHRTShow->isChecked());
|
||||
m_bc.bc.setBorderType(btype->currentIndex());
|
||||
@ -1933,6 +1939,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) {
|
||||
settings.setValue(QString("studio/bc/%1/chk_rinit").arg(name), chkRInit->isChecked() ? 1 : 0);
|
||||
}
|
||||
settings.setValue(QString("studio/bc/%1/chk_gs1parens").arg(name), chkGS1Parens->isChecked() ? 1 : 0);
|
||||
settings.setValue(QString("studio/bc/%1/chk_gs1nocheck").arg(name), chkGS1NoCheck->isChecked() ? 1 : 0);
|
||||
if (chkAutoHeight->isEnabled()) {
|
||||
settings.setValue(QString("studio/bc/%1/appearance/autoheight").arg(name), chkAutoHeight->isChecked() ? 1 : 0);
|
||||
settings.setValue(QString("studio/bc/%1/appearance/height").arg(name), heightb->value());
|
||||
@ -2185,6 +2192,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) {
|
||||
chkRInit->setChecked(settings.value(QString("studio/bc/%1/chk_rinit").arg(name)).toInt() ? true : false);
|
||||
}
|
||||
chkGS1Parens->setChecked(settings.value(QString("studio/bc/%1/chk_gs1parens").arg(name)).toInt() ? true : false);
|
||||
chkGS1NoCheck->setChecked(settings.value(QString("studio/bc/%1/chk_gs1nocheck").arg(name)).toInt() ? true : false);
|
||||
if (chkAutoHeight->isEnabled()) {
|
||||
chkAutoHeight->setChecked(settings.value(QString("studio/bc/%1/appearance/autoheight").arg(name), 1).toInt() ? true : false);
|
||||
heightb->setValue(settings.value(QString("studio/bc/%1/appearance/height").arg(name), 50.0f).toFloat());
|
||||
|
Loading…
Reference in New Issue
Block a user