mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Add Structured Append support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, MAXICODE, MICROPDF417, PDF417, QRCODE, ULTRA DOTCODE: use pre-calculated generator poly coeffs in Reed-Solomon for performance improvement PDF417/MICROPDF417: use common routine pdf417_initial() GUI: code lines <= 118, shorthand widget_obj(), shorten calling upcean_addon_gap(), upcean_guard_descent() various backend: var name debug -> debug_print
This commit is contained in:
parent
e8b1f7a12e
commit
c0791ad85e
@ -24,6 +24,8 @@ Changes
|
||||
- Add output_options BARCODE_QUIET_ZONES and BARCODE_NO_QUIET_ZONES
|
||||
- Allow dummy AI "[]" if GS1NOCHECK_MODE and has data (#204)
|
||||
- raster.c: improve non-half-integer interpolation performance
|
||||
- Add Structured Append support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
|
||||
GRIDMATRIX, MAXICODE, MICROPDF417, PDF417, QRCODE, ULTRA
|
||||
|
||||
Bugs
|
||||
----
|
||||
|
@ -70,11 +70,13 @@ static int c25_common(struct zint_symbol *symbol, const unsigned char source[],
|
||||
int have_checkdigit = symbol->option_2 == 1 || symbol->option_2 == 2;
|
||||
|
||||
if (length > max) {
|
||||
/* errtxt 301: 303: 305: 307: */
|
||||
sprintf(symbol->errtxt, "%d: Input too long (%d character maximum)", error_base, max);
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
error_number = is_sane(NEON, source, length);
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
/* errtxt 302: 304: 306: 308: */
|
||||
sprintf(symbol->errtxt, "%d: Invalid character in data (digits only)", error_base + 1);
|
||||
return error_number;
|
||||
}
|
||||
|
@ -99,8 +99,8 @@ static int az_bin_append_posn(const int arg, const int length, char *binary, con
|
||||
return bin_append_posn(arg, length, binary, bin_posn);
|
||||
}
|
||||
|
||||
static int aztec_text_process(const unsigned char source[], int src_len, char binary_string[], const int gs1,
|
||||
const int eci, int *data_length, const int debug) {
|
||||
static int aztec_text_process(const unsigned char source[], int src_len, int bp, char binary_string[], const int gs1,
|
||||
const int eci, int *data_length, const int debug_print) {
|
||||
|
||||
int i, j;
|
||||
char current_mode;
|
||||
@ -108,7 +108,6 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
|
||||
char next_mode;
|
||||
int reduced_length;
|
||||
int byte_mode = 0;
|
||||
int bp;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
char encode_mode[src_len + 1];
|
||||
@ -190,7 +189,7 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
|
||||
}
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("First Pass:\n");
|
||||
printf("%.*s\n", src_len, encode_mode);
|
||||
}
|
||||
@ -455,13 +454,11 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
|
||||
}
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("%.*s\n", reduced_length, reduced_source);
|
||||
printf("%.*s\n", reduced_length, reduced_encode_mode);
|
||||
}
|
||||
|
||||
bp = 0;
|
||||
|
||||
if (gs1) {
|
||||
bp = bin_append_posn(0, 5, binary_string, bp); // P/S
|
||||
bp = bin_append_posn(0, 5, binary_string, bp); // FLG(n)
|
||||
@ -727,7 +724,7 @@ static int aztec_text_process(const unsigned char source[], int src_len, char bi
|
||||
}
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Binary String:\n");
|
||||
printf("%.*s\n", bp, binary_string);
|
||||
}
|
||||
@ -833,8 +830,9 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
unsigned char desc_data[4], desc_ecc[6];
|
||||
int error_number, compact, data_length, data_maxsize, codeword_size, adjusted_length;
|
||||
int remainder, padbits, count, gs1, adjustment_size;
|
||||
int debug = (symbol->debug & ZINT_DEBUG_PRINT), reader = 0;
|
||||
int debug_print = (symbol->debug & ZINT_DEBUG_PRINT), reader = 0;
|
||||
int comp_loop = 4;
|
||||
int bp = 0;
|
||||
rs_t rs;
|
||||
rs_uint_t rs_uint;
|
||||
|
||||
@ -857,7 +855,51 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
error_number = aztec_text_process(source, length, binary_string, gs1, symbol->eci, &data_length, debug);
|
||||
if (symbol->structapp.count) {
|
||||
/* Structured Append info as string <SP> + ID + <SP> + index + count + NUL */
|
||||
unsigned char sa_src[1 + sizeof(symbol->structapp.id) + 1 + 1 + 1 + 1] = {0};
|
||||
int sa_len;
|
||||
int id_len;
|
||||
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 26) {
|
||||
strcpy(symbol->errtxt, "701: Structured Append count out of range (2-26)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "702: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
for (id_len = 0; id_len < 32 && symbol->structapp.id[id_len]; id_len++);
|
||||
|
||||
if (id_len && chr_cnt((const unsigned char *) symbol->structapp.id, id_len, ' ')) {
|
||||
strcpy(symbol->errtxt, "703: Structured Append ID cannot contain spaces");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
bp = bin_append_posn(29, 5, binary_string, bp); // M/L
|
||||
bp = bin_append_posn(29, 5, binary_string, bp); // U/L
|
||||
|
||||
sa_len = 0;
|
||||
if (id_len) { /* ID has a space on either side */
|
||||
sa_src[sa_len++] = ' ';
|
||||
memcpy(sa_src + sa_len, symbol->structapp.id, id_len);
|
||||
sa_len += id_len;
|
||||
sa_src[sa_len++] = ' ';
|
||||
}
|
||||
sa_src[sa_len++] = 'A' + symbol->structapp.index - 1;
|
||||
sa_src[sa_len++] = 'A' + symbol->structapp.count - 1;
|
||||
if (debug_print) {
|
||||
printf("Structured Append Count: %d, Index: %d, ID: %.32s, String: %s\n",
|
||||
symbol->structapp.count, symbol->structapp.count, symbol->structapp.id, sa_src);
|
||||
}
|
||||
|
||||
(void) aztec_text_process(sa_src, sa_len, bp, binary_string, 0 /*gs1*/, 0 /*eci*/, &bp, debug_print);
|
||||
/* Will be in U/L due to uppercase A-Z index/count indicators at end */
|
||||
}
|
||||
|
||||
error_number = aztec_text_process(source, length, bp, binary_string, gs1, symbol->eci, &data_length,
|
||||
debug_print);
|
||||
|
||||
if (error_number != 0) {
|
||||
strcpy(symbol->errtxt, "502: Input too long or too many extended ASCII characters");
|
||||
@ -1003,7 +1045,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
if (padbits == codeword_size) {
|
||||
padbits = 0;
|
||||
}
|
||||
if (debug) printf("Remainder: %d Pad bits: %d\n", remainder, padbits);
|
||||
if (debug_print) printf("Remainder: %d Pad bits: %d\n", remainder, padbits);
|
||||
|
||||
for (i = 0; i < padbits; i++) {
|
||||
adjusted_string[adjusted_length++] = '1';
|
||||
@ -1019,7 +1061,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
adjusted_string[adjusted_length - 1] = '0';
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Codewords:\n");
|
||||
for (i = 0; i < (adjusted_length / codeword_size); i++) {
|
||||
for (j = 0; j < codeword_size; j++) {
|
||||
@ -1093,7 +1135,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
if (padbits == codeword_size) {
|
||||
padbits = 0;
|
||||
}
|
||||
if (debug) printf("Remainder: %d Pad bits: %d\n", remainder, padbits);
|
||||
if (debug_print) printf("Remainder: %d Pad bits: %d\n", remainder, padbits);
|
||||
|
||||
for (i = 0; i < padbits; i++) {
|
||||
adjusted_string[adjusted_length++] = '1';
|
||||
@ -1121,7 +1163,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Codewords:\n");
|
||||
for (i = 0; i < (adjusted_length / codeword_size); i++) {
|
||||
printf("%.*s ", codeword_size, adjusted_string + i * codeword_size);
|
||||
@ -1144,7 +1186,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
ecc_blocks = AztecSizes[layers - 1] - data_blocks;
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Generating a %s symbol with %d layers\n", compact ? "compact" : "full-size", layers);
|
||||
printf("Requires %d", compact ? AztecCompactSizes[layers - 1] : AztecSizes[layers - 1]);
|
||||
printf(" codewords of %d-bits\n", codeword_size);
|
||||
@ -1193,7 +1235,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
case 12:
|
||||
if (!rs_uint_init_gf(&rs_uint, 0x1069, 4095)) { /* Can fail on malloc() */
|
||||
/* Note using AUSPOST error nos range as out of 50x ones & 51x taken by CODEONE */
|
||||
strcpy(symbol->errtxt, "400: Insufficient memory for Reed-Solomon log tables");
|
||||
strcpy(symbol->errtxt, "700: Insufficient memory for Reed-Solomon log tables");
|
||||
return ZINT_ERROR_MEMORY;
|
||||
}
|
||||
rs_uint_init_code(&rs_uint, ecc_blocks, 1);
|
||||
@ -1249,7 +1291,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
descriptor[i] = '0';
|
||||
}
|
||||
}
|
||||
if (debug) printf("Mode Message = %.8s\n", descriptor);
|
||||
if (debug_print) printf("Mode Message = %.8s\n", descriptor);
|
||||
} else {
|
||||
/* The first 5 bits represent the number of layers minus 1 */
|
||||
for (i = 0; i < 5; i++) {
|
||||
@ -1277,7 +1319,7 @@ INTERNAL int aztec(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
descriptor[i] = '0';
|
||||
}
|
||||
}
|
||||
if (debug) printf("Mode Message = %.16s\n", descriptor);
|
||||
if (debug_print) printf("Mode Message = %.16s\n", descriptor);
|
||||
}
|
||||
|
||||
/* Split into 4-bit codewords */
|
||||
@ -1409,7 +1451,7 @@ INTERNAL int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int
|
||||
char binary_string[28];
|
||||
unsigned char data_codewords[3], ecc_codewords[6];
|
||||
int bp = 0;
|
||||
int debug = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
rs_t rs;
|
||||
|
||||
input_value = 0;
|
||||
@ -1460,7 +1502,7 @@ INTERNAL int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int
|
||||
}
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Binary String: %.28s\n", binary_string);
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
/* Channel code precalculated values to avoid excessive looping */
|
||||
/* To generate uncomment CHANNEL_GENERATE_PRECALCS define and run "./test_channel -f generate -g" */
|
||||
/* To generate uncomment CHANNEL_GENERATE_PRECALCS define and run "backend/tests/test_channel -f generate -g" */
|
||||
/* Paste result below here */
|
||||
static channel_precalc channel_precalcs7[] = {
|
||||
{ 115338, { 1, 3, 1, 1, 1, 1, 5, 1, }, { 1, 1, 1, 2, 1, 2, 3, 3, }, { 1, 7, 5, 5, 5, 5, 5, }, { 1, 7, 7, 7, 6, 6, 5, }, },
|
||||
|
@ -533,8 +533,8 @@ typedef const struct s_channel_precalc {
|
||||
//#define CHANNEL_GENERATE_PRECALCS
|
||||
|
||||
#ifdef CHANNEL_GENERATE_PRECALCS
|
||||
/* To generate precalc tables uncomment CHANNEL_GENERATE_PRECALCS define and run "./test_channel -f generate -g" and
|
||||
place result in "channel_precalcs.h" */
|
||||
/* To generate precalc tables uncomment CHANNEL_GENERATE_PRECALCS define and run
|
||||
"backend/tests/test_channel -f generate -g" and place result in "channel_precalcs.h" */
|
||||
static void channel_generate_precalc(int channels, long value, int mod, int last, int B[8], int S[8], int bmax[7],
|
||||
int smax[7]) {
|
||||
int i;
|
||||
@ -706,7 +706,7 @@ INTERNAL int channel_code(struct zint_symbol *symbol, unsigned char source[], in
|
||||
|
||||
if (target_value > max_ranges[channels]) {
|
||||
if (channels == 8) {
|
||||
sprintf(symbol->errtxt, "305: Value out of range (0 to %d)", max_ranges[channels]);
|
||||
sprintf(symbol->errtxt, "318: Value out of range (0 to %d)", max_ranges[channels]);
|
||||
} else {
|
||||
sprintf(symbol->errtxt, "335: Value out of range (0 to %d) for %d channels",
|
||||
max_ranges[channels], channels);
|
||||
|
@ -517,9 +517,38 @@ static int c1_encode(struct zint_symbol *symbol, unsigned char source[], unsigne
|
||||
} else {
|
||||
target[tp++] = 232; /* FNC1 */
|
||||
}
|
||||
/* Note ignoring ECI if GS1 mode (up to caller to warn) */
|
||||
/* Note ignoring Structured Append and ECI if GS1 mode (up to caller to warn/error) */
|
||||
} else {
|
||||
if (symbol->eci) {
|
||||
if (symbol->structapp.count) {
|
||||
if (symbol->structapp.count < 16) { /* Group mode */
|
||||
if (symbol->eci && symbol->structapp.index == 1) { /* Initial pad indicator for 1st symbol only */
|
||||
target[tp++] = 129; /* Pad */
|
||||
target[tp++] = 233; /* FNC2 */
|
||||
target[tp++] = (symbol->structapp.index - 1) * 15 + (symbol->structapp.count - 1);
|
||||
target[tp++] = '\\' + 1; /* Escape char */
|
||||
} else {
|
||||
target[tp++] = (symbol->structapp.index - 1) * 15 + (symbol->structapp.count - 1);
|
||||
target[tp++] = 233; /* FNC2 */
|
||||
}
|
||||
} else { /* Extended Group mode */
|
||||
if (symbol->eci && symbol->structapp.index == 1) { /* Initial pad indicator for 1st symbol only */
|
||||
target[tp++] = 129; /* Pad */
|
||||
target[tp++] = '\\' + 1; /* Escape char */
|
||||
target[tp++] = 233; /* FNC2 */
|
||||
target[tp++] = symbol->structapp.index;
|
||||
target[tp++] = symbol->structapp.count;
|
||||
} else {
|
||||
target[tp++] = symbol->structapp.index;
|
||||
target[tp++] = symbol->structapp.count;
|
||||
target[tp++] = 233; /* FNC2 */
|
||||
}
|
||||
}
|
||||
if (symbol->eci) {
|
||||
eci_escape(symbol->eci, source, length, eci_buf, eci_length);
|
||||
source = eci_buf;
|
||||
length = eci_length;
|
||||
}
|
||||
} else if (symbol->eci) {
|
||||
target[tp++] = 129; /* Pad */
|
||||
target[tp++] = '\\' + 1; /* Escape char */
|
||||
eci_escape(symbol->eci, source, length, eci_buf, eci_length);
|
||||
@ -942,6 +971,25 @@ INTERNAL int code_one(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if (symbol->structapp.count) {
|
||||
if ((symbol->input_mode & 0x07) == GS1_MODE) {
|
||||
strcpy(symbol->errtxt, "710: Cannot have Structured Append and GS1 mode at the same time");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 128) {
|
||||
strcpy(symbol->errtxt, "711: Structured Append count out of range (2-128)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "712: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.id[0]) {
|
||||
strcpy(symbol->errtxt, "713: Structured Append ID not available for Code One");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
}
|
||||
|
||||
if (symbol->option_2 == 9) {
|
||||
/* Version S */
|
||||
int codewords;
|
||||
@ -949,6 +997,10 @@ INTERNAL int code_one(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
unsigned int data[30], ecc[15];
|
||||
int block_width;
|
||||
|
||||
if (symbol->structapp.count) { /* Version S */
|
||||
strcpy(symbol->errtxt, "714: Structured Append not supported for Version S");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (length > 18) {
|
||||
strcpy(symbol->errtxt, "514: Input data too long for Version S");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
@ -1460,7 +1512,10 @@ INTERNAL int code_one(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
|
||||
if (symbol->option_2 == 9) { /* Version S */
|
||||
if (symbol->eci || (symbol->input_mode & 0x07) == GS1_MODE) {
|
||||
strcpy(symbol->errtxt, "511: ECI and GS1 mode ignored for Version S");
|
||||
sprintf(symbol->errtxt, "511: %s ignored for Version S",
|
||||
symbol->eci && (symbol->input_mode & 0x07) == GS1_MODE
|
||||
? "ECI and GS1 mode"
|
||||
: symbol->eci ? "ECI" : "GS1 mode");
|
||||
error_number = ZINT_WARN_INVALID_OPTION;
|
||||
}
|
||||
} else if (symbol->eci && (symbol->input_mode & 0x07) == GS1_MODE) {
|
||||
|
@ -1151,7 +1151,7 @@ INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int
|
||||
}
|
||||
|
||||
if ((identifier < 32) || (identifier > 127)) {
|
||||
strcpy(symbol->errtxt, "301: Invalid DPD identifier (first character), ASCII values 32 to 127 only");
|
||||
strcpy(symbol->errtxt, "343: Invalid DPD identifier (first character), ASCII values 32 to 127 only");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height,
|
||||
return error_number;
|
||||
}
|
||||
|
||||
/* Removes excess precision from floats - see https://stackoverflow.com/q/503436/664741 */
|
||||
/* Removes excess precision from floats - see https://stackoverflow.com/q/503436 */
|
||||
INTERNAL float stripf(const float arg) {
|
||||
return *((volatile const float *) &arg);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Is float integral value? (https://stackoverflow.com/a/40404149/664741) */
|
||||
/* Is float integral value? (https://stackoverflow.com/a/40404149) */
|
||||
#define isfintf(arg) (fmodf(arg, 1.0f) == 0.0f)
|
||||
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && !defined(ZINT_TEST) && !defined(__MINGW32__)
|
||||
|
@ -30,6 +30,6 @@ HRESULT DllGetVersion (DLLVERSIONINFO2* pdvi)
|
||||
return S_OK;
|
||||
}
|
||||
#else
|
||||
/* https://stackoverflow.com/a/26541331/664741 Suppresses gcc warning ISO C forbids an empty translation unit */
|
||||
/* https://stackoverflow.com/a/26541331 Suppresses gcc warning ISO C forbids an empty translation unit */
|
||||
typedef int make_iso_compilers_happy;
|
||||
#endif /* _WIN32 */
|
||||
|
@ -632,9 +632,61 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
sp = 0;
|
||||
tp = 0;
|
||||
|
||||
/* step (a) */
|
||||
current_mode = DM_ASCII;
|
||||
next_mode = DM_ASCII;
|
||||
if (symbol->structapp.count) {
|
||||
int id1, id2;
|
||||
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 16) {
|
||||
strcpy(symbol->errtxt, "720: Structured Append count out of range (2-16)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "721: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.id[0]) {
|
||||
int id, id_len, id1_err, id2_err;
|
||||
|
||||
for (id_len = 0; id_len < 32 && symbol->structapp.id[id_len]; id_len++);
|
||||
|
||||
if (id_len > 6) { /* ID1 * 1000 + ID2 */
|
||||
strcpy(symbol->errtxt, "722: Structured Append ID too long (6 digit maximum)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
id = to_int((const unsigned char *) symbol->structapp.id, id_len);
|
||||
if (id == -1) {
|
||||
strcpy(symbol->errtxt, "723: Invalid Structured Append ID (digits only)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
id1 = id / 1000;
|
||||
id2 = id % 1000;
|
||||
id1_err = id1 < 1 || id1 > 254;
|
||||
id2_err = id2 < 1 || id2 > 254;
|
||||
if (id1_err || id2_err) {
|
||||
if (id1_err && id2_err) {
|
||||
sprintf(symbol->errtxt,
|
||||
"724: Structured Append ID1 '%03d' and ID2 '%03d' out of range (001-254) (ID '%03d%03d')",
|
||||
id1, id2, id1, id2);
|
||||
} else if (id1_err) {
|
||||
sprintf(symbol->errtxt,
|
||||
"725: Structured Append ID1 '%03d' out of range (001-254) (ID '%03d%03d')",
|
||||
id1, id1, id2);
|
||||
} else {
|
||||
sprintf(symbol->errtxt,
|
||||
"726: Structured Append ID2 '%03d' out of range (001-254) (ID '%03d%03d')",
|
||||
id2, id1, id2);
|
||||
}
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
} else {
|
||||
id1 = id2 = 1;
|
||||
}
|
||||
|
||||
target[tp++] = 233;
|
||||
target[tp++] = (17 - symbol->structapp.count) | ((symbol->structapp.index - 1) << 4);
|
||||
target[tp++] = id1;
|
||||
target[tp++] = id2;
|
||||
}
|
||||
|
||||
/* gs1 flag values: 0: no gs1, 1: gs1 with FNC1 serparator, 2: GS separator */
|
||||
if ((symbol->input_mode & 0x07) == GS1_MODE) {
|
||||
@ -657,11 +709,14 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
if (gs1) {
|
||||
strcpy(symbol->errtxt, "521: Cannot encode in GS1 mode and Reader Initialisation at the same time");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
} else {
|
||||
target[tp] = 234;
|
||||
tp++; /* Reader Programming */
|
||||
if (debug) printf("RP ");
|
||||
}
|
||||
if (symbol->structapp.count) {
|
||||
strcpy(symbol->errtxt, "727: Cannot have Structured Append and Reader Initialisation at the same time");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
target[tp] = 234;
|
||||
tp++; /* Reader Programming */
|
||||
if (debug) printf("RP ");
|
||||
}
|
||||
|
||||
if (symbol->eci > 0) {
|
||||
@ -696,6 +751,7 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
&& (source[5] == '5' || source[5] == '6')
|
||||
&& source[6] == '\x1d'
|
||||
&& source[inputlen - 2] == '\x1e' && source[inputlen - 1] == '\x04') {
|
||||
|
||||
/* Output macro Codeword */
|
||||
if (source[5] == '5') {
|
||||
target[tp] = 236;
|
||||
@ -711,6 +767,10 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[],
|
||||
*p_length -= 2;
|
||||
}
|
||||
|
||||
/* step (a) */
|
||||
current_mode = DM_ASCII;
|
||||
next_mode = DM_ASCII;
|
||||
|
||||
while (sp < inputlen) {
|
||||
|
||||
current_mode = next_mode;
|
||||
@ -1089,7 +1149,7 @@ static int data_matrix_200(struct zint_symbol *symbol, const unsigned char sourc
|
||||
unsigned char binary[2200];
|
||||
int binlen;
|
||||
int symbolsize;
|
||||
int taillength, error_number = 0;
|
||||
int taillength, error_number;
|
||||
int H, W, FH, FW, datablock, bytes, rsblock;
|
||||
int debug = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
|
||||
|
@ -280,22 +280,71 @@ static int score_array(const char Dots[], const int Hgt, const int Wid) {
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
static void rsencode(const int nd, const int nc, unsigned char *wd) {
|
||||
// roots (antilogs): root[0] = 1; for (i = 1; i < GF - 1; i++) root[i] = (PM * root[i - 1]) % GF;
|
||||
static int root[GF - 1] = {
|
||||
1, 3, 9, 27, 81, 17, 51, 40, 7, 21,
|
||||
63, 76, 2, 6, 18, 54, 49, 34, 102, 80,
|
||||
14, 42, 13, 39, 4, 12, 36, 108, 98, 68,
|
||||
91, 47, 28, 84, 26, 78, 8, 24, 72, 103,
|
||||
83, 23, 69, 94, 56, 55, 52, 43, 16, 48,
|
||||
31, 93, 53, 46, 25, 75, 112, 110, 104, 86,
|
||||
32, 96, 62, 73, 106, 92, 50, 37, 111, 107,
|
||||
95, 59, 64, 79, 11, 33, 99, 71, 100, 74,
|
||||
109, 101, 77, 5, 15, 45, 22, 66, 85, 29,
|
||||
87, 35, 105, 89, 41, 10, 30, 90, 44, 19,
|
||||
57, 58, 61, 70, 97, 65, 82, 20, 60, 67,
|
||||
88, 38
|
||||
/* Pre-calculated coefficients for GF(113) of generator polys of degree 3 to 39. To generate run
|
||||
"backend/tests/test_dotcode -f generate -g" and place result below */
|
||||
static const char coefs[820 - 5] = { /* 40*(41 + 1)/2 == 820 less 2 + 3 (degrees 1 and 2) */
|
||||
1, 74, 12, 62,
|
||||
1, 106, 7, 107, 63,
|
||||
1, 89, 13, 101, 52, 59,
|
||||
1, 38, 107, 3, 99, 6, 42,
|
||||
1, 111, 56, 17, 92, 1, 28, 15,
|
||||
1, 104, 70, 77, 86, 35, 21, 45, 8,
|
||||
1, 83, 33, 76, 51, 37, 77, 56, 80, 58,
|
||||
1, 20, 2, 31, 9, 101, 6, 64, 55, 103, 75,
|
||||
1, 57, 64, 105, 26, 95, 14, 60, 50, 104, 44, 63,
|
||||
1, 55, 63, 90, 42, 43, 50, 32, 43, 4, 62, 88, 100,
|
||||
1, 49, 72, 51, 67, 17, 18, 71, 77, 85, 38, 55, 24, 78,
|
||||
1, 31, 94, 111, 53, 54, 51, 86, 42, 55, 90, 49, 51, 98, 65,
|
||||
1, 90, 2, 7, 48, 17, 73, 44, 31, 47, 58, 48, 4, 56, 84, 106,
|
||||
1, 41, 112, 22, 44, 38, 31, 83, 22, 110, 15, 31, 25, 86, 52, 58, 4,
|
||||
1, 7, 74, 56, 87, 11, 95, 46, 25, 40, 4, 86, 101, 27, 66, 98, 66, 90,
|
||||
1, 18, 38, 79, 25, 64, 103, 74, 79, 89, 105, 17, 30, 8, 24, 33, 14, 25, 86,
|
||||
1, 51, 67, 90, 33, 98, 68, 83, 35, 97, 104, 92, 26, 94, 62, 34, 86, 35, 7, 13,
|
||||
1, 37, 31, 56, 16, 88, 52, 35, 3, 59, 102, 105, 94, 69, 102, 70, 62, 74, 82, 28, 44,
|
||||
1, 108, 59, 110, 37, 94, 85, 111, 2, 46, 110, 2, 91, 76, 29, 80, 60, 69, 25, 87, 111, 73,
|
||||
1, 95, 11, 21, 76, 65, 106, 23, 28, 20, 77, 41, 65, 23, 58, 42, 37, 80, 32, 101, 110, 99,
|
||||
68,
|
||||
1, 56, 35, 44, 48, 39, 57, 70, 35, 58, 88, 89, 48, 87, 65, 40, 94, 106, 76, 96, 13, 103,
|
||||
49, 60,
|
||||
1, 52, 37, 17, 98, 73, 14, 68, 94, 31, 82, 76, 31, 8, 56, 6, 47, 69, 104, 18, 81, 51,
|
||||
89, 90, 99,
|
||||
1, 40, 91, 25, 7, 27, 42, 13, 69, 33, 49, 109, 23, 88, 73, 12, 88, 70, 67, 13, 91, 96,
|
||||
42, 39, 36, 55,
|
||||
1, 4, 7, 26, 11, 1, 87, 83, 53, 35, 104, 40, 54, 51, 69, 96, 108, 66, 33, 87, 75, 97,
|
||||
89, 109, 101, 2, 54,
|
||||
1, 9, 27, 61, 28, 56, 92, 66, 16, 74, 53, 108, 28, 95, 98, 102, 23, 41, 24, 26, 58, 20,
|
||||
9, 102, 81, 55, 64, 44,
|
||||
1, 24, 49, 14, 39, 24, 28, 90, 102, 88, 33, 112, 66, 63, 54, 103, 84, 47, 74, 47, 109, 99,
|
||||
83, 11, 29, 27, 98, 100, 95,
|
||||
1, 69, 112, 72, 104, 84, 91, 107, 84, 45, 38, 15, 21, 95, 64, 47, 86, 98, 42, 100, 77, 32,
|
||||
18, 17, 72, 89, 70, 103, 75, 94,
|
||||
1, 91, 48, 50, 106, 112, 18, 75, 65, 85, 11, 60, 12, 105, 7, 99, 103, 69, 51, 7, 17, 31,
|
||||
44, 74, 107, 91, 107, 61, 81, 49, 34,
|
||||
1, 44, 65, 54, 16, 102, 65, 20, 43, 81, 84, 108, 17, 106, 44, 109, 83, 87, 85, 96, 27, 23,
|
||||
56, 40, 19, 34, 11, 4, 39, 84, 104, 97,
|
||||
1, 16, 76, 42, 86, 106, 34, 8, 48, 7, 76, 16, 44, 82, 14, 7, 82, 23, 22, 89, 51, 58,
|
||||
90, 54, 29, 67, 76, 35, 40, 9, 12, 10, 109,
|
||||
1, 45, 88, 99, 61, 1, 57, 90, 54, 43, 53, 73, 56, 2, 19, 74, 59, 28, 11, 49, 33, 68,
|
||||
77, 65, 13, 4, 98, 92, 38, 39, 47, 19, 60, 110,
|
||||
1, 19, 48, 71, 86, 110, 31, 77, 87, 108, 65, 51, 79, 15, 80, 32, 56, 76, 74, 102, 2, 1,
|
||||
4, 97, 18, 5, 107, 30, 19, 68, 50, 40, 18, 19, 78,
|
||||
1, 54, 35, 56, 85, 69, 39, 32, 70, 102, 3, 66, 56, 68, 40, 7, 46, 2, 22, 93, 69, 71,
|
||||
39, 11, 23, 70, 56, 46, 52, 55, 57, 95, 62, 84, 65, 18,
|
||||
1, 46, 55, 2, 89, 67, 52, 59, 40, 107, 91, 42, 93, 72, 61, 26, 103, 86, 6, 30, 3, 84,
|
||||
36, 38, 48, 112, 61, 50, 23, 91, 69, 91, 93, 40, 71, 63, 82,
|
||||
1, 22, 81, 38, 41, 78, 26, 54, 93, 51, 9, 5, 102, 100, 28, 31, 44, 100, 89, 112, 74, 12,
|
||||
54, 78, 40, 90, 85, 55, 66, 104, 32, 17, 56, 68, 15, 54, 39, 66,
|
||||
1, 63, 79, 82, 17, 64, 60, 103, 47, 22, 66, 35, 81, 101, 60, 49, 72, 96, 8, 32, 33, 108,
|
||||
94, 32, 74, 35, 46, 37, 61, 98, 2, 86, 75, 104, 91, 104, 106, 83, 107,
|
||||
1, 73, 31, 81, 46, 8, 22, 25, 60, 40, 60, 17, 92, 7, 53, 84, 110, 25, 64, 112, 14, 99,
|
||||
44, 68, 55, 97, 57, 45, 92, 30, 78, 106, 31, 63, 1, 110, 16, 13, 33, 53,
|
||||
};
|
||||
int i, j, k, nw, start, step, c[GF];
|
||||
static const short cinds[39 - 2] = { /* Indexes into above coefs[] array */
|
||||
0, 4, 9, 15, 22, 30, 39, 49, 60, 72, 85, 99, 114, 130, 147, 165, 184, 204, 225, 247, 270, 294,
|
||||
319, 345, 372, 400, 429, 459, 490, 522, 555, 589, 624, 660, 697, 735, 774,
|
||||
};
|
||||
int i, j, k, nw, start, step;
|
||||
const char *c;
|
||||
|
||||
// Here we compute how many interleaved R-S blocks will be needed
|
||||
nw = nd + nc;
|
||||
@ -306,33 +355,27 @@ static void rsencode(const int nd, const int nc, unsigned char *wd) {
|
||||
int ND = (nd - start + step - 1) / step;
|
||||
int NW = (nw - start + step - 1) / step;
|
||||
int NC = NW - ND;
|
||||
unsigned char *e = wd + start + ND * step;
|
||||
|
||||
// first compute the generator polynomial "c" of order "NC":
|
||||
|
||||
// Keep clang-tidy happy (as far as UndefinedBinaryOperatorResult warning below at least)
|
||||
memset(c, 0, GF * sizeof(int));
|
||||
|
||||
c[0] = 1;
|
||||
for (i = 1; i <= NC; i++) {
|
||||
for (j = NC; j >= 1; j--) {
|
||||
c[j] = (GF + c[j] - (root[i] * c[j - 1]) % GF) % GF;
|
||||
}
|
||||
}
|
||||
// first set the generator polynomial "c" of order "NC":
|
||||
c = coefs + cinds[NC - 3];
|
||||
|
||||
// & then compute the corresponding checkword values into wd[]
|
||||
// ... (a) starting at wd[start] & (b) stepping by step
|
||||
for (i = ND; i < NW; i++) {
|
||||
wd[start + i * step] = 0;
|
||||
for (i = 0; i < NC; i++) {
|
||||
e[i * step] = 0;
|
||||
}
|
||||
for (i = 0; i < ND; i++) {
|
||||
k = (wd[start + i * step] + wd[start + ND * step]) % GF;
|
||||
k = (wd[start + i * step] + e[0]) % GF;
|
||||
for (j = 0; j < NC - 1; j++) {
|
||||
wd[start + (ND + j) * step] = (GF - ((c[j + 1] * k) % GF) + wd[start + (ND + j + 1) * step]) % GF;
|
||||
e[j * step] = (GF - ((c[j + 1] * k) % GF) + e[(j + 1) * step]) % GF;
|
||||
}
|
||||
wd[start + (ND + NC - 1) * step] = (GF - ((c[NC] * k) % GF)) % GF;
|
||||
e[(NC - 1) * step] = (GF - ((c[NC] * k) % GF)) % GF;
|
||||
}
|
||||
for (i = ND; i < NW; i++) {
|
||||
wd[start + i * step] = (GF - wd[start + i * step]) % GF;
|
||||
for (i = 0; i < NC; i++) {
|
||||
if (e[i * step]) {
|
||||
e[i * step] = GF - e[i * step];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -490,7 +533,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
int input_position, array_length, i;
|
||||
char encoding_mode;
|
||||
int inside_macro;
|
||||
int debug = (symbol->debug & ZINT_DEBUG_PRINT);
|
||||
int debug_print = (symbol->debug & ZINT_DEBUG_PRINT);
|
||||
int binary_buffer_size = 0;
|
||||
int lawrencium[6]; // Reversed radix 103 values
|
||||
int nx;
|
||||
@ -557,7 +600,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
// inside_macro only gets set to 97, 98 or 99 if the last two characters are RS/EOT
|
||||
input_position += 2;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("A ");
|
||||
}
|
||||
}
|
||||
@ -567,7 +610,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
// inside_macro only gets set to 100 if the last character is EOT
|
||||
input_position++;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("B ");
|
||||
}
|
||||
}
|
||||
@ -592,7 +635,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
input_position += 7;
|
||||
inside_macro = 97;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C1/1 ");
|
||||
}
|
||||
}
|
||||
@ -606,7 +649,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
input_position += 7;
|
||||
inside_macro = 98;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C1/2 ");
|
||||
}
|
||||
}
|
||||
@ -620,7 +663,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
input_position += 7;
|
||||
inside_macro = 99;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C1/3 ");
|
||||
}
|
||||
}
|
||||
@ -636,7 +679,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
input_position += 4;
|
||||
inside_macro = 100;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C1/4 ");
|
||||
}
|
||||
}
|
||||
@ -657,7 +700,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
array_length++;
|
||||
input_position += 10;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C2/1 ");
|
||||
}
|
||||
}
|
||||
@ -675,7 +718,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
}
|
||||
array_length++;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C2/2 ");
|
||||
}
|
||||
}
|
||||
@ -703,7 +746,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'X';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C3 ");
|
||||
}
|
||||
}
|
||||
@ -746,7 +789,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
}
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("C4 ");
|
||||
}
|
||||
}
|
||||
@ -770,7 +813,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'C';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("D1 ");
|
||||
}
|
||||
}
|
||||
@ -783,7 +826,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
array_length++;
|
||||
input_position++;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("D2/1 ");
|
||||
}
|
||||
} else {
|
||||
@ -822,7 +865,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
if (done == 1) {
|
||||
array_length++;
|
||||
input_position++;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("D2/2 ");
|
||||
}
|
||||
}
|
||||
@ -852,7 +895,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'X';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("D3 ");
|
||||
}
|
||||
}
|
||||
@ -876,7 +919,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'A';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("D4 ");
|
||||
}
|
||||
}
|
||||
@ -899,7 +942,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'C';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("E1 ");
|
||||
}
|
||||
}
|
||||
@ -913,7 +956,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
array_length++;
|
||||
input_position++;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("E2/1 ");
|
||||
}
|
||||
} else {
|
||||
@ -926,7 +969,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
array_length++;
|
||||
input_position++;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("E2/2 ");
|
||||
}
|
||||
}
|
||||
@ -955,7 +998,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'X';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("E3 ");
|
||||
}
|
||||
}
|
||||
@ -991,7 +1034,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'B';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("E4 ");
|
||||
}
|
||||
}
|
||||
@ -1028,7 +1071,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
encoding_mode = 'C';
|
||||
}
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("F1 ");
|
||||
}
|
||||
}
|
||||
@ -1063,7 +1106,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
}
|
||||
input_position++;
|
||||
done = 1;
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("F2 ");
|
||||
}
|
||||
}
|
||||
@ -1093,7 +1136,7 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
}
|
||||
array_length++;
|
||||
// done = 1 // As long as last branch not needed
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("F3 ");
|
||||
}
|
||||
}
|
||||
@ -1115,7 +1158,28 @@ static int dotcode_encode_message(struct zint_symbol *symbol, const unsigned cha
|
||||
*(binary_finish) = 1;
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (symbol->structapp.count) {
|
||||
/* Need Code Set A or B - choosing A here (TEC-IT chooses B) */
|
||||
if (encoding_mode == 'C') {
|
||||
codeword_array[array_length++] = 101; /* Latch A */
|
||||
} else if (encoding_mode == 'X') {
|
||||
codeword_array[array_length++] = 109; /* Terminate with Latch A */
|
||||
*binary_finish = 0;
|
||||
}
|
||||
if (symbol->structapp.index < 10) {
|
||||
codeword_array[array_length++] = 16 + symbol->structapp.index; /* '0' + index for 1-9 */
|
||||
} else {
|
||||
codeword_array[array_length++] = 33 + symbol->structapp.index - 10; /* 'A' + index for A-Z */
|
||||
}
|
||||
if (symbol->structapp.count < 10) {
|
||||
codeword_array[array_length++] = 16 + symbol->structapp.count; /* '0' + count for 1-9 */
|
||||
} else {
|
||||
codeword_array[array_length++] = 33 + symbol->structapp.count - 10; /* 'A' + count for A-Z */
|
||||
}
|
||||
codeword_array[array_length++] = 108; /* FNC2 as last codeword */
|
||||
}
|
||||
|
||||
if (debug_print) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
@ -1135,8 +1199,6 @@ static int make_dotstream(const unsigned char masked_array[], const int array_le
|
||||
bp = bin_append_posn(dot_patterns[masked_array[i]], 9, dot_stream, bp);
|
||||
}
|
||||
|
||||
dot_stream[bp] = '\0';
|
||||
|
||||
return bp;
|
||||
}
|
||||
|
||||
@ -1320,10 +1382,10 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
int dot_stream_length;
|
||||
int high_score, best_mask;
|
||||
int binary_finish = 0;
|
||||
int debug = symbol->debug;
|
||||
int debug_print = (symbol->debug & ZINT_DEBUG_PRINT);
|
||||
int padding_dots, is_first;
|
||||
/* Allow up to 4 codewords per input + 2 (FNC) + 4 (ECI) + 2 (special char 1st position) */
|
||||
int codeword_array_len = length * 4 + 8;
|
||||
/* Allow 4 codewords per input + 2 (FNC) + 4 (ECI) + 2 (special char 1st position) + 4 (Structured Append) */
|
||||
int codeword_array_len = length * 4 + 8 + 3;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
unsigned char codeword_array[codeword_array_len];
|
||||
@ -1344,6 +1406,21 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
user_mask = 0; /* Ignore */
|
||||
}
|
||||
|
||||
if (symbol->structapp.count) {
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 35) {
|
||||
strcpy(symbol->errtxt, "730: Structured Append count out of range (2-35)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "731: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.id[0]) {
|
||||
strcpy(symbol->errtxt, "732: Structured Append ID not available for DotCode");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
}
|
||||
|
||||
data_length = dotcode_encode_message(symbol, source, length, codeword_array, &binary_finish);
|
||||
|
||||
/* Suppresses clang-tidy clang-analyzer-core.UndefinedBinaryOperatorResult/uninitialized.ArraySubscript
|
||||
@ -1352,7 +1429,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
|
||||
ecc_length = 3 + (data_length / 2);
|
||||
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Codeword length = %d, ECC length = %d\n", data_length, ecc_length);
|
||||
printf("Codewords: ");
|
||||
for (i = 0; i < data_length; i++) {
|
||||
@ -1361,7 +1438,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
printf("\n");
|
||||
}
|
||||
#ifdef ZINT_TEST
|
||||
if (debug & ZINT_DEBUG_TEST) {
|
||||
if (symbol->debug & ZINT_DEBUG_TEST) {
|
||||
debug_test_codeword_dump(symbol, codeword_array, data_length);
|
||||
}
|
||||
#endif
|
||||
@ -1419,7 +1496,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
}
|
||||
}
|
||||
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Width = %d, Height = %d\n", width, height);
|
||||
}
|
||||
|
||||
@ -1488,7 +1565,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
|
||||
if (user_mask) {
|
||||
best_mask = user_mask - 1;
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Applying mask %d (specified)\n", best_mask);
|
||||
}
|
||||
} else {
|
||||
@ -1501,14 +1578,14 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
|
||||
/* Add pad bits */
|
||||
for (jc = dot_stream_length; jc < n_dots; jc++) {
|
||||
strcat(dot_stream, "1");
|
||||
dot_stream[dot_stream_length++] = '1';
|
||||
}
|
||||
|
||||
fold_dotstream(dot_stream, width, height, dot_array);
|
||||
|
||||
mask_score[i] = score_array(dot_array, height, width);
|
||||
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Mask %d score is %d\n", i, mask_score[i]);
|
||||
}
|
||||
}
|
||||
@ -1525,7 +1602,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
|
||||
/* Re-evaluate using forced corners if needed */
|
||||
if (high_score <= (height * width) / 2) {
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("High score %d <= %d (height * width) / 2\n", high_score, (height * width) / 2);
|
||||
}
|
||||
|
||||
@ -1537,7 +1614,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
|
||||
/* Add pad bits */
|
||||
for (jc = dot_stream_length; jc < n_dots; jc++) {
|
||||
strcat(dot_stream, "1");
|
||||
dot_stream[dot_stream_length++] = '1';
|
||||
}
|
||||
|
||||
fold_dotstream(dot_stream, width, height, dot_array);
|
||||
@ -1546,7 +1623,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
|
||||
mask_score[i + 4] = score_array(dot_array, height, width);
|
||||
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Mask %d score is %d\n", i + 4, mask_score[i + 4]);
|
||||
}
|
||||
}
|
||||
@ -1559,7 +1636,7 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
}
|
||||
}
|
||||
|
||||
if (debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Applying mask %d, high_score %d\n", best_mask, high_score);
|
||||
}
|
||||
}
|
||||
@ -1567,12 +1644,26 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
/* Apply best mask */
|
||||
apply_mask(best_mask % 4, data_length, masked_codeword_array, codeword_array, ecc_length);
|
||||
|
||||
if (debug_print) {
|
||||
printf("Masked codewords (%d):", data_length);
|
||||
for (i = 1; i < data_length + 1; i++) {
|
||||
printf(" [%d]", masked_codeword_array[i]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("Masked ECCs (%d):", ecc_length);
|
||||
for (i = data_length + 1; i < data_length + ecc_length + 1; i++) {
|
||||
printf(" [%d]", masked_codeword_array[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
dot_stream_length = make_dotstream(masked_codeword_array, (data_length + ecc_length + 1), dot_stream);
|
||||
|
||||
/* Add pad bits */
|
||||
for (jc = dot_stream_length; jc < n_dots; jc++) {
|
||||
strcat(dot_stream, "1");
|
||||
dot_stream[dot_stream_length++] = '1';
|
||||
}
|
||||
if (debug_print) printf("Binary (%d): %.*s\n", dot_stream_length, dot_stream_length, dot_stream);
|
||||
|
||||
fold_dotstream(dot_stream, width, height, dot_array);
|
||||
|
||||
|
@ -324,8 +324,8 @@ static int add_shift_char(char binary[], int bp, int shifty, int debug) {
|
||||
return bp;
|
||||
}
|
||||
|
||||
static int gm_encode(unsigned int gbdata[], const int length, char binary[], const int reader, const int eci,
|
||||
int *bin_len, int debug) {
|
||||
static int gm_encode(unsigned int gbdata[], const int length, char binary[], const int reader,
|
||||
const struct zint_structapp *p_structapp, const int eci, int *bin_len, int debug) {
|
||||
/* Create a binary stream representation of the input data.
|
||||
7 sets are defined - Chinese characters, Numerals, Lower case letters, Upper case letters,
|
||||
Mixed numerals and latters, Control characters and 8-bit binary data */
|
||||
@ -352,10 +352,18 @@ static int gm_encode(unsigned int gbdata[], const int length, char binary[], con
|
||||
current_mode = 0;
|
||||
number_pad_posn = 0;
|
||||
|
||||
if (reader) {
|
||||
if (reader && (!p_structapp || p_structapp->index == 1)) { /* Appears only in 1st symbol if Structured Append */
|
||||
bp = bin_append_posn(10, 4, binary, bp); /* FNC3 - Reader Initialisation */
|
||||
}
|
||||
|
||||
if (p_structapp) {
|
||||
bp = bin_append_posn(9, 4, binary, bp); /* FNC2 - Structured Append */
|
||||
bp = bin_append_posn(to_int((const unsigned char *) p_structapp->id, (int) strlen(p_structapp->id)), 8,
|
||||
binary, bp); /* File signature */
|
||||
bp = bin_append_posn(p_structapp->count - 1, 4, binary, bp);
|
||||
bp = bin_append_posn(p_structapp->index - 1, 4, binary, bp);
|
||||
}
|
||||
|
||||
if (eci != 0) {
|
||||
/* ECI assignment according to Table 8 */
|
||||
bp = bin_append_posn(12, 4, binary, bp); /* ECI */
|
||||
@ -1007,6 +1015,7 @@ INTERNAL int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int
|
||||
int data_cw, input_latch = 0;
|
||||
unsigned char word[1460] = {0};
|
||||
int data_max, reader = 0;
|
||||
const struct zint_structapp *p_structapp = NULL;
|
||||
int size_squared;
|
||||
int bin_len;
|
||||
int eci_length = get_eci_length(symbol->eci, source, length);
|
||||
@ -1046,12 +1055,44 @@ INTERNAL int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int
|
||||
|
||||
if (symbol->output_options & READER_INIT) reader = 1;
|
||||
|
||||
if (symbol->structapp.count) {
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 16) {
|
||||
strcpy(symbol->errtxt, "536: Structured Append count out of range (2-16)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "537: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.id[0]) {
|
||||
int id, id_len;
|
||||
|
||||
for (id_len = 0; id_len < 32 && symbol->structapp.id[id_len]; id_len++);
|
||||
|
||||
if (id_len > 3) { /* 255 (8 bits) */
|
||||
strcpy(symbol->errtxt, "538: Structured Append ID too long (3 digit maximum)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
id = to_int((const unsigned char *) symbol->structapp.id, id_len);
|
||||
if (id == -1) {
|
||||
strcpy(symbol->errtxt, "539: Invalid Structured Append ID (digits only)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (id > 255) {
|
||||
sprintf(symbol->errtxt, "530: Structured Append ID '%d' out of range (0-255)", id);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
}
|
||||
p_structapp = &symbol->structapp;
|
||||
}
|
||||
|
||||
if (symbol->eci > 811799) {
|
||||
strcpy(symbol->errtxt, "533: Invalid ECI");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
error_number = gm_encode(gbdata, length, binary, reader, symbol->eci, &bin_len, symbol->debug);
|
||||
error_number = gm_encode(gbdata, length, binary, reader, p_structapp, symbol->eci, &bin_len, symbol->debug);
|
||||
if (error_number != 0) {
|
||||
strcpy(symbol->errtxt, "531: Input data too long");
|
||||
return error_number;
|
||||
|
@ -44,7 +44,7 @@
|
||||
#define TECHNETIUM "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"
|
||||
|
||||
/* It's assumed that int is at least 32 bits, the following will compile-time fail if not
|
||||
* https://stackoverflow.com/a/1980056/664741 */
|
||||
* https://stackoverflow.com/a/1980056 */
|
||||
typedef int static_assert_int_at_least_32bits[CHAR_BIT != 8 || sizeof(int) < 4 ? -1 : 1];
|
||||
|
||||
/* Create and initialize a symbol structure */
|
||||
@ -413,12 +413,15 @@ static int gs1_compliant(const int symbology) {
|
||||
case BARCODE_CODE16K:
|
||||
case BARCODE_AZTEC:
|
||||
case BARCODE_DATAMATRIX:
|
||||
case BARCODE_CODEONE:
|
||||
case BARCODE_CODE49:
|
||||
case BARCODE_QRCODE:
|
||||
case BARCODE_DOTCODE:
|
||||
case BARCODE_RMQR:
|
||||
case BARCODE_CODEONE:
|
||||
case BARCODE_ULTRA:
|
||||
case BARCODE_RMQR:
|
||||
// TODO: case BARCODE_CODABLOCKF:
|
||||
// TODO: case BARCODE_HANXIN:
|
||||
// TODO: case BARCODE_GRIDMATRIX:
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
@ -970,7 +973,7 @@ int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int
|
||||
symbol->symbology = BARCODE_PLESSEY;
|
||||
} else if (symbol->symbology == 48) {
|
||||
symbol->symbology = BARCODE_NVE18;
|
||||
} else if (symbol->symbology == 54) { /* General Parcel up to tbarcode 9, Brazelian CEPNet for tbarcode 10+ */
|
||||
} else if (symbol->symbology == 54) { /* General Parcel up to tbarcode 9, Brazilian CEPNet for tbarcode 10+ */
|
||||
warn_number = error_tag(symbol, ZINT_WARN_INVALID_OPTION, "210: General Parcel Code not supported");
|
||||
if (warn_number >= ZINT_ERROR) {
|
||||
return warn_number;
|
||||
@ -1603,6 +1606,28 @@ unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cap_flag & ZINT_CAP_STRUCTAPP) {
|
||||
switch (symbol_id) {
|
||||
case BARCODE_PDF417:
|
||||
case BARCODE_PDF417COMP:
|
||||
case BARCODE_MAXICODE:
|
||||
case BARCODE_QRCODE: /* Note does not include MICROQR, UPNQR or rMQR */
|
||||
case BARCODE_DATAMATRIX:
|
||||
case BARCODE_MICROPDF417:
|
||||
case BARCODE_AZTEC:
|
||||
case BARCODE_HIBC_DM:
|
||||
case BARCODE_HIBC_QR:
|
||||
case BARCODE_HIBC_PDF:
|
||||
case BARCODE_HIBC_MICPDF:
|
||||
case BARCODE_HIBC_AZTEC:
|
||||
case BARCODE_DOTCODE:
|
||||
case BARCODE_CODEONE:
|
||||
case BARCODE_GRIDMATRIX:
|
||||
case BARCODE_ULTRA:
|
||||
result |= ZINT_CAP_STRUCTAPP;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ static int bestSurroundingSet(const int index, const int length, const unsigned
|
||||
|
||||
/* Format text according to Appendix A */
|
||||
static int maxi_text_process(unsigned char maxi_codeword[144], const int mode, const unsigned char in_source[],
|
||||
int length, const int eci, const int scm_vv, const int debug_print) {
|
||||
int length, const int structapp_cw, const int eci, const int scm_vv, const int debug_print) {
|
||||
|
||||
unsigned char set[144], character[144] = {0};
|
||||
int i, count, current_set, padding_set;
|
||||
@ -447,6 +447,14 @@ static int maxi_text_process(unsigned char maxi_codeword[144], const int mode, c
|
||||
}
|
||||
}
|
||||
|
||||
/* Insert Structured Append at beginning if needed */
|
||||
if (structapp_cw) {
|
||||
maxi_bump(set, character, 0, &length);
|
||||
character[0] = 33; // PAD
|
||||
maxi_bump(set, character, 1, &length);
|
||||
character[1] = structapp_cw;
|
||||
}
|
||||
|
||||
if (debug_print) printf("Length: %d\n", length);
|
||||
|
||||
if (((mode == 2) || (mode == 3)) && (length > 84)) {
|
||||
@ -490,7 +498,7 @@ static void maxi_do_primary_2(unsigned char maxi_codeword[144], const unsigned c
|
||||
const int postcode_length, const int country, const int service) {
|
||||
int postcode_num;
|
||||
|
||||
postcode_num = atoi((const char *) postcode);
|
||||
postcode_num = to_int(postcode, postcode_length);
|
||||
|
||||
maxi_codeword[0] = ((postcode_num & 0x03) << 4) | 2;
|
||||
maxi_codeword[1] = ((postcode_num & 0xfc) >> 2);
|
||||
@ -531,6 +539,8 @@ INTERNAL int maxicode(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
int error_number = 0, eclen;
|
||||
unsigned char maxi_codeword[144] = {0};
|
||||
int scm_vv = -1;
|
||||
int structapp_cw = 0;
|
||||
int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
|
||||
mode = symbol->option_1;
|
||||
|
||||
@ -621,18 +631,34 @@ INTERNAL int maxicode(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
scm_vv = symbol->option_2 - 1;
|
||||
}
|
||||
|
||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Postcode: %s, Country Code: %d, Service Class: %d\n", postcode, countrycode, service);
|
||||
}
|
||||
} else {
|
||||
maxi_codeword[0] = mode;
|
||||
}
|
||||
|
||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Mode: %d\n", mode);
|
||||
}
|
||||
|
||||
i = maxi_text_process(maxi_codeword, mode, source, length, symbol->eci, scm_vv, symbol->debug & ZINT_DEBUG_PRINT);
|
||||
if (symbol->structapp.count) {
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 8) {
|
||||
strcpy(symbol->errtxt, "558: Structured Append count out of range (2-8)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "559: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.id[0]) {
|
||||
strcpy(symbol->errtxt, "549: Structured Append ID not available for MaxiCode");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
structapp_cw = (symbol->structapp.count - 1) | ((symbol->structapp.index - 1) << 3);
|
||||
}
|
||||
|
||||
i = maxi_text_process(maxi_codeword, mode, source, length, structapp_cw, symbol->eci, scm_vv, debug_print);
|
||||
if (i == ZINT_ERROR_TOO_LONG) {
|
||||
strcpy(symbol->errtxt, "553: Input data too long");
|
||||
return i;
|
||||
@ -649,7 +675,7 @@ INTERNAL int maxicode(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
maxi_do_secondary_chk_even(maxi_codeword, eclen / 2); // do error correction of even
|
||||
maxi_do_secondary_chk_odd(maxi_codeword, eclen / 2); // do error correction of odd
|
||||
|
||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||
if (debug_print) {
|
||||
printf("Codewords:");
|
||||
for (i = 0; i < 144; i++) printf(" %d", maxi_codeword[i]);
|
||||
printf("\n");
|
||||
|
347
backend/pdf417.c
347
backend/pdf417.c
@ -1,7 +1,7 @@
|
||||
/* pdf417.c - Handles PDF417 stacked symbology */
|
||||
|
||||
/* Zint - A barcode generating program using libpng
|
||||
Copyright (C) 2008-2020 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2008-2021 Robin Stuart <rstuart114@gmail.com>
|
||||
Portions Copyright (C) 2004 Grandzebu
|
||||
Bug Fixes thanks to KL Chin <klchin@users.sourceforge.net>
|
||||
|
||||
@ -398,14 +398,14 @@ static void textprocess(int *chainemc, int *mclength, const unsigned char chaine
|
||||
|
||||
/* 671 */
|
||||
INTERNAL void byteprocess(int *chainemc, int *mclength, const unsigned char chaine[], int start, const int length,
|
||||
const int debug) {
|
||||
const int debug_print) {
|
||||
|
||||
if (debug) printf("\nEntering byte mode at position %d\n", start);
|
||||
if (debug_print) printf("\nEntering byte mode at position %d\n", start);
|
||||
|
||||
if (length == 1) {
|
||||
chainemc[(*mclength)++] = 913;
|
||||
chainemc[(*mclength)++] = chaine[start];
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("913 %d\n", chainemc[*mclength - 1]);
|
||||
}
|
||||
} else {
|
||||
@ -413,13 +413,13 @@ INTERNAL void byteprocess(int *chainemc, int *mclength, const unsigned char chai
|
||||
/* select the switch for multiple of 6 bytes */
|
||||
if (length % 6 == 0) {
|
||||
chainemc[(*mclength)++] = 924;
|
||||
if (debug) printf("924 ");
|
||||
if (debug_print) printf("924 ");
|
||||
} else {
|
||||
/* Default mode for MICROPDF417 is Byte Compaction (ISO/IEC 24728:2006 5.4.3), but not emitting it
|
||||
* depends on whether an ECI has been emitted previously (or not) it appears, so simpler and safer
|
||||
* to always emit it. */
|
||||
chainemc[(*mclength)++] = 901;
|
||||
if (debug) printf("901 ");
|
||||
if (debug_print) printf("901 ");
|
||||
}
|
||||
|
||||
len = 0;
|
||||
@ -508,20 +508,13 @@ static void numbprocess(int *chainemc, int *mclength, const unsigned char chaine
|
||||
}
|
||||
}
|
||||
|
||||
/* 366 */
|
||||
static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int length) {
|
||||
int i, k, j, indexchaine, indexliste, mode, longueur, loop, mccorrection[520] = {0}, offset;
|
||||
int total, chainemc[PDF417_MAX_LEN], mclength, c1, c2, c3, dummy[35];
|
||||
/* Initial processing of data, shared by `pdf417enc()` and `micro_pdf417()` */
|
||||
static int pdf417_initial(struct zint_symbol *symbol, unsigned char chaine[], const int length, const int is_micro,
|
||||
int chainemc[PDF417_MAX_LEN], int *p_mclength, int structapp_cws[18], int *p_structapp_cp) {
|
||||
int i, indexchaine, indexliste, mode;
|
||||
int liste[2][PDF417_MAX_LEN] = {{0}};
|
||||
char pattern[580];
|
||||
int bp = 0;
|
||||
int error_number;
|
||||
int debug = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
|
||||
if (length > PDF417_MAX_LEN) {
|
||||
strcpy(symbol->errtxt, "463: Input string too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
int mclength, structapp_cp = 0;
|
||||
int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
|
||||
/* 456 */
|
||||
indexliste = 0;
|
||||
@ -543,7 +536,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
/* 474 */
|
||||
pdfsmooth(liste, &indexliste);
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Initial block pattern:\n");
|
||||
for (i = 0; i < indexliste; i++) {
|
||||
printf("Len: %d Type: ", liste[0][i]);
|
||||
@ -564,6 +557,56 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
indexchaine = 0;
|
||||
mclength = 0;
|
||||
|
||||
if (symbol->structapp.count) {
|
||||
int id_cnt = 0, ids[10];
|
||||
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 99999) {
|
||||
strcpy(symbol->errtxt, "740: Structured Append count out of range (2-99999)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "741: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.id[0]) {
|
||||
int id_len;
|
||||
|
||||
for (id_len = 0; id_len < 32 && symbol->structapp.id[id_len]; id_len++);
|
||||
|
||||
if (id_len > 30) { /* 10 triplets */
|
||||
strcpy(symbol->errtxt, "742: Structured Append ID too long (30 digit maximum)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
for (i = 0; i < id_len; i += 3, id_cnt++) {
|
||||
int triplet_len = i + 3 < id_len ? 3 : id_len - i;
|
||||
ids[id_cnt] = to_int((const unsigned char *) (symbol->structapp.id + i), triplet_len);
|
||||
if (ids[id_cnt] == -1) {
|
||||
strcpy(symbol->errtxt, "743: Invalid Structured Append ID (digits only)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (ids[id_cnt] > 899) {
|
||||
sprintf(symbol->errtxt, "744: Structured Append ID triplet %d '%03d' out of range (000-899)",
|
||||
id_cnt + 1, ids[id_cnt]);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
}
|
||||
}
|
||||
structapp_cws[structapp_cp++] = 928; /* Macro marker */
|
||||
structapp_cws[structapp_cp++] = (100000 + symbol->structapp.index - 1) / 900; /* Segment index 1 */
|
||||
structapp_cws[structapp_cp++] = (100000 + symbol->structapp.index - 1) % 900; /* Segment index 2 */
|
||||
for (i = 0; i < id_cnt; i++) {
|
||||
structapp_cws[structapp_cp++] = ids[i];
|
||||
}
|
||||
structapp_cws[structapp_cp++] = 923; /* Optional field */
|
||||
structapp_cws[structapp_cp++] = 1; /* Segment count tag */
|
||||
structapp_cws[structapp_cp++] = (100000 + symbol->structapp.count) / 900; /* Segment count 1 */
|
||||
structapp_cws[structapp_cp++] = (100000 + symbol->structapp.count) % 900; /* Segment count 2 */
|
||||
if (symbol->structapp.index == symbol->structapp.count) {
|
||||
structapp_cws[structapp_cp++] = 922; /* Special last segment terminator */
|
||||
}
|
||||
}
|
||||
|
||||
if (symbol->output_options & READER_INIT) {
|
||||
chainemc[mclength] = 921; /* Reader Initialisation */
|
||||
mclength++;
|
||||
@ -598,10 +641,10 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
for (i = 0; i < indexliste; i++) {
|
||||
switch (liste[1][i]) {
|
||||
case TEX: /* 547 - text mode */
|
||||
textprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], 0 /*is_micro*/);
|
||||
textprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], is_micro);
|
||||
break;
|
||||
case BYT: /* 670 - octet stream mode */
|
||||
byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], debug);
|
||||
byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], debug_print);
|
||||
break;
|
||||
case NUM: /* 712 - numeric mode */
|
||||
numbprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i]);
|
||||
@ -611,7 +654,36 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
}
|
||||
assert(mclength > 0); /* Suppress clang-analyzer-core.uninitialized.Assign warning */
|
||||
|
||||
if (debug) {
|
||||
*p_mclength = mclength;
|
||||
*p_structapp_cp = structapp_cp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 366 */
|
||||
static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int length) {
|
||||
int i, k, j, longueur, loop, mccorrection[520] = {0}, offset;
|
||||
int total, chainemc[PDF417_MAX_LEN], mclength, c1, c2, c3, dummy[35];
|
||||
char pattern[580];
|
||||
int bp = 0;
|
||||
int structapp_cws[18] = {0}; /* 3 (Index) + 10 (ID) + 4 (Count) + 1 (Last) */
|
||||
int structapp_cp = 0;
|
||||
int error_number;
|
||||
int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
static int ecc_num_cws[] = { 2, 4, 8, 16, 32, 64, 128, 256, 512 };
|
||||
|
||||
if (length > PDF417_MAX_LEN) {
|
||||
strcpy(symbol->errtxt, "463: Input string too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
error_number = pdf417_initial(symbol, chaine, length, 0 /*is_micro*/, chainemc, &mclength, structapp_cws,
|
||||
&structapp_cp);
|
||||
if (error_number >= ZINT_ERROR) {
|
||||
return error_number;
|
||||
}
|
||||
|
||||
if (debug_print) {
|
||||
printf("\nCompressed data stream (%d):\n", mclength);
|
||||
for (i = 0; i < mclength; i++) {
|
||||
printf("%d ", chainemc[i]);
|
||||
@ -621,44 +693,42 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
|
||||
/* 752 - Now take care of the number of CWs per row */
|
||||
if (symbol->option_1 < 0) {
|
||||
if (mclength <= 40) {
|
||||
if (mclength + structapp_cp <= 40) {
|
||||
symbol->option_1 = 2;
|
||||
} else if (mclength <= 160) {
|
||||
} else if (mclength + structapp_cp <= 160) {
|
||||
symbol->option_1 = 3;
|
||||
} else if (mclength <= 320) {
|
||||
} else if (mclength + structapp_cp <= 320) {
|
||||
symbol->option_1 = 4;
|
||||
} else if (mclength <= 863) {
|
||||
} else if (mclength + structapp_cp <= 863) {
|
||||
symbol->option_1 = 5;
|
||||
} else {
|
||||
symbol->option_1 = 6;
|
||||
}
|
||||
}
|
||||
k = 1;
|
||||
for (loop = 1; loop <= (symbol->option_1 + 1); loop++) {
|
||||
k *= 2;
|
||||
}
|
||||
longueur = mclength;
|
||||
if (longueur + k > 928) {
|
||||
k = ecc_num_cws[symbol->option_1];
|
||||
longueur = mclength + structapp_cp + k;
|
||||
if (longueur > 928) {
|
||||
/* Enforce maximum codeword limit */
|
||||
strcpy(symbol->errtxt, "464: Input string too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
if (symbol->option_2 < 1) {
|
||||
symbol->option_2 = (int) (0.5 + sqrt((longueur + k) / 3.0));
|
||||
symbol->option_2 = (int) (0.5 + sqrt(longueur / 3.0));
|
||||
}
|
||||
if (((longueur + k) / symbol->option_2) > 90) {
|
||||
if ((longueur / symbol->option_2) > 90) {
|
||||
/* stop the symbol from becoming too high */
|
||||
symbol->option_2 = symbol->option_2 + 1;
|
||||
|
||||
if (((longueur + k) / symbol->option_2) > 90) {
|
||||
if ((longueur / symbol->option_2) > 90) {
|
||||
strcpy(symbol->errtxt, "465: Data too long for specified number of columns");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
}
|
||||
assert(symbol->option_2 >= 1); /* Suppress clang-analyzer-core.CallAndMessage */
|
||||
|
||||
/* 781 - Padding calculation */
|
||||
longueur = mclength + 1 + k;
|
||||
longueur = mclength + structapp_cp + 1 + k;
|
||||
i = 0;
|
||||
if ((longueur / symbol->option_2) < 3) {
|
||||
i = (symbol->option_2 * 3) - longueur; /* A bar code must have at least three rows */
|
||||
@ -673,6 +743,14 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
mclength++;
|
||||
i--;
|
||||
}
|
||||
|
||||
/* We add the Structured Append Macro Control Block if any */
|
||||
if (structapp_cp) {
|
||||
for (i = 0; i < structapp_cp; i++) {
|
||||
chainemc[mclength++] = structapp_cws[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* we add the length descriptor */
|
||||
for (i = mclength; i > 0; i--) {
|
||||
chainemc[i] = chainemc[i - 1];
|
||||
@ -716,7 +794,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
chainemc[mclength++] = mccorrection[i] ? 929 - mccorrection[i] : 0;
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Complete CW string (%d):\n", mclength);
|
||||
for (i = 0; i < mclength; i++) {
|
||||
printf("%d ", chainemc[i]);
|
||||
@ -732,7 +810,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
||||
symbol->rows = mclength / symbol->option_2;
|
||||
assert(symbol->rows > 0); /* Suppress clang-analyzer-core.DivideZero warning */
|
||||
|
||||
if (debug) printf("\nSymbol size:\n%d columns x %d rows\n", symbol->option_2, symbol->rows);
|
||||
if (debug_print) printf("\nSymbol size:\n%d columns x %d rows\n", symbol->option_2, symbol->rows);
|
||||
|
||||
/* 818 - The CW string is finished */
|
||||
c1 = (symbol->rows - 1) / 3;
|
||||
@ -830,14 +908,15 @@ INTERNAL int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
|
||||
/* like PDF417 only much smaller! */
|
||||
INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length) {
|
||||
int i, k, j, indexchaine, indexliste, mode, longueur, mccorrection[50] = {0}, offset;
|
||||
int i, k, j, longueur, mccorrection[50] = {0}, offset;
|
||||
int total, chainemc[PDF417_MAX_LEN], mclength, error_number = 0;
|
||||
int liste[2][PDF417_MAX_LEN] = {{0}};
|
||||
char pattern[580];
|
||||
int bp = 0;
|
||||
int structapp_cws[18] = {0}; /* 3 (Index) + 10 (ID) + 4 (Count) + 1 (Last) */
|
||||
int structapp_cp = 0;
|
||||
int variant, LeftRAPStart, CentreRAPStart, RightRAPStart, StartCluster;
|
||||
int LeftRAP, CentreRAP, RightRAP, Cluster, loop;
|
||||
int debug = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
|
||||
if (length > MICRO_PDF417_MAX_LEN) {
|
||||
strcpy(symbol->errtxt, "474: Input data too long");
|
||||
@ -846,97 +925,15 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
|
||||
/* Encoding starts out the same as PDF417, so use the same code */
|
||||
|
||||
/* 456 */
|
||||
indexliste = 0;
|
||||
indexchaine = 0;
|
||||
|
||||
mode = quelmode(chaine[indexchaine]);
|
||||
|
||||
/* 463 */
|
||||
do {
|
||||
liste[1][indexliste] = mode;
|
||||
while ((liste[1][indexliste] == mode) && (indexchaine < length)) {
|
||||
liste[0][indexliste]++;
|
||||
indexchaine++;
|
||||
mode = quelmode(chaine[indexchaine]);
|
||||
}
|
||||
indexliste++;
|
||||
} while (indexchaine < length);
|
||||
|
||||
/* 474 */
|
||||
pdfsmooth(liste, &indexliste);
|
||||
|
||||
if (debug) {
|
||||
printf("Initial mapping:\n");
|
||||
for (i = 0; i < indexliste; i++) {
|
||||
printf("len: %d type: ", liste[0][i]);
|
||||
switch (liste[1][i]) {
|
||||
case TEX: printf("TEXT\n");
|
||||
break;
|
||||
case BYT: printf("BYTE\n");
|
||||
break;
|
||||
case NUM: printf("NUMBER\n");
|
||||
break;
|
||||
default: printf("*ERROR*\n"); /* Should never happen */ /* Not reached */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 541 - now compress the data */
|
||||
indexchaine = 0;
|
||||
mclength = 0;
|
||||
|
||||
if (symbol->output_options & READER_INIT) {
|
||||
chainemc[mclength] = 921; /* Reader Initialisation */
|
||||
mclength++;
|
||||
}
|
||||
|
||||
if (symbol->eci != 0) {
|
||||
|
||||
/* Encoding ECI assignment number, according to Table 8 */
|
||||
if (symbol->eci <= 899) {
|
||||
chainemc[mclength] = 927; /* ECI */
|
||||
mclength++;
|
||||
chainemc[mclength] = symbol->eci;
|
||||
mclength++;
|
||||
} else if (symbol->eci <= 810899) {
|
||||
chainemc[mclength] = 926; /* ECI */
|
||||
mclength++;
|
||||
chainemc[mclength] = (symbol->eci / 900) - 1;
|
||||
mclength++;
|
||||
chainemc[mclength] = symbol->eci % 900;
|
||||
mclength++;
|
||||
} else {
|
||||
if (symbol->eci > 811799) {
|
||||
strcpy(symbol->errtxt, "473: Invalid ECI");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
chainemc[mclength] = 925; /* ECI */
|
||||
mclength++;
|
||||
chainemc[mclength] = symbol->eci - 810900;
|
||||
mclength++;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < indexliste; i++) {
|
||||
switch (liste[1][i]) {
|
||||
case TEX: /* 547 - text mode */
|
||||
textprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], 1 /*is_micro*/);
|
||||
break;
|
||||
case BYT: /* 670 - octet stream mode */
|
||||
byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], debug);
|
||||
break;
|
||||
case NUM: /* 712 - numeric mode */
|
||||
numbprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i]);
|
||||
break;
|
||||
}
|
||||
indexchaine = indexchaine + liste[0][i];
|
||||
error_number = pdf417_initial(symbol, chaine, length, 1 /*is_micro*/, chainemc, &mclength, structapp_cws,
|
||||
&structapp_cp);
|
||||
if (error_number >= ZINT_ERROR) {
|
||||
return error_number;
|
||||
}
|
||||
|
||||
/* This is where it all changes! */
|
||||
|
||||
if (mclength > 126) {
|
||||
if (mclength + structapp_cp > 126) {
|
||||
strcpy(symbol->errtxt, "467: Input data too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
@ -949,7 +946,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
error_number = ZINT_WARN_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("\nEncoded Data Stream (%d):\n", mclength);
|
||||
for (i = 0; i < mclength; i++) {
|
||||
printf("%3d ", chainemc[i]);
|
||||
@ -961,7 +958,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
|
||||
variant = 0;
|
||||
|
||||
if ((symbol->option_2 == 1) && (mclength > 20)) {
|
||||
if ((symbol->option_2 == 1) && (mclength + structapp_cp > 20)) {
|
||||
/* the user specified 1 column but the data doesn't fit - go to automatic */
|
||||
strcpy(symbol->errtxt, "469: Specified symbol size too small for data");
|
||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||
@ -971,7 +968,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
error_number = ZINT_WARN_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if ((symbol->option_2 == 2) && (mclength > 37)) {
|
||||
if ((symbol->option_2 == 2) && (mclength + structapp_cp > 37)) {
|
||||
/* the user specified 2 columns but the data doesn't fit - go to automatic */
|
||||
strcpy(symbol->errtxt, "470: Specified symbol size too small for data");
|
||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||
@ -981,7 +978,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
error_number = ZINT_WARN_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if ((symbol->option_2 == 3) && (mclength > 82)) {
|
||||
if ((symbol->option_2 == 3) && (mclength + structapp_cp > 82)) {
|
||||
/* the user specified 3 columns but the data doesn't fit - go to automatic */
|
||||
strcpy(symbol->errtxt, "471: Specified symbol size too small for data");
|
||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||
@ -993,80 +990,80 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
|
||||
if (symbol->option_2 == 1) {
|
||||
/* the user specified 1 column and the data does fit */
|
||||
if (mclength <= 4) {
|
||||
if (mclength + structapp_cp <= 4) {
|
||||
variant = 1;
|
||||
} else if (mclength <= 7) {
|
||||
} else if (mclength + structapp_cp <= 7) {
|
||||
variant = 2;
|
||||
} else if (mclength <= 10) {
|
||||
} else if (mclength + structapp_cp <= 10) {
|
||||
variant = 3;
|
||||
} else if (mclength <= 12) {
|
||||
} else if (mclength + structapp_cp <= 12) {
|
||||
variant = 4;
|
||||
} else if (mclength <= 16) {
|
||||
} else if (mclength + structapp_cp <= 16) {
|
||||
variant = 5;
|
||||
} else {
|
||||
variant = 6;
|
||||
}
|
||||
} else if (symbol->option_2 == 2) {
|
||||
/* the user specified 2 columns and the data does fit */
|
||||
if (mclength <= 8) {
|
||||
if (mclength + structapp_cp <= 8) {
|
||||
variant = 7;
|
||||
} else if (mclength <= 13) {
|
||||
} else if (mclength + structapp_cp <= 13) {
|
||||
variant = 8;
|
||||
} else if (mclength <= 19) {
|
||||
} else if (mclength + structapp_cp <= 19) {
|
||||
variant = 9;
|
||||
} else if (mclength <= 24) {
|
||||
} else if (mclength + structapp_cp <= 24) {
|
||||
variant = 10;
|
||||
} else if (mclength <= 29) {
|
||||
} else if (mclength + structapp_cp <= 29) {
|
||||
variant = 11;
|
||||
} else if (mclength <= 33) {
|
||||
} else if (mclength + structapp_cp <= 33) {
|
||||
variant = 12;
|
||||
} else {
|
||||
variant = 13;
|
||||
}
|
||||
} else if (symbol->option_2 == 3) {
|
||||
/* the user specified 3 columns and the data does fit */
|
||||
if (mclength <= 6) {
|
||||
if (mclength + structapp_cp <= 6) {
|
||||
variant = 14;
|
||||
} else if (mclength <= 10) {
|
||||
} else if (mclength + structapp_cp <= 10) {
|
||||
variant = 15;
|
||||
} else if (mclength <= 14) {
|
||||
} else if (mclength + structapp_cp <= 14) {
|
||||
variant = 16;
|
||||
} else if (mclength <= 18) {
|
||||
} else if (mclength + structapp_cp <= 18) {
|
||||
variant = 17;
|
||||
} else if (mclength <= 24) {
|
||||
} else if (mclength + structapp_cp <= 24) {
|
||||
variant = 18;
|
||||
} else if (mclength <= 34) {
|
||||
} else if (mclength + structapp_cp <= 34) {
|
||||
variant = 19;
|
||||
} else if (mclength <= 46) {
|
||||
} else if (mclength + structapp_cp <= 46) {
|
||||
variant = 20;
|
||||
} else if (mclength <= 58) {
|
||||
} else if (mclength + structapp_cp <= 58) {
|
||||
variant = 21;
|
||||
} else if (mclength <= 70) {
|
||||
} else if (mclength + structapp_cp <= 70) {
|
||||
variant = 22;
|
||||
} else {
|
||||
variant = 23;
|
||||
}
|
||||
} else if (symbol->option_2 == 4) {
|
||||
/* the user specified 4 columns and the data does fit */
|
||||
if (mclength <= 8) {
|
||||
if (mclength + structapp_cp <= 8) {
|
||||
variant = 24;
|
||||
} else if (mclength <= 12) {
|
||||
} else if (mclength + structapp_cp <= 12) {
|
||||
variant = 25;
|
||||
} else if (mclength <= 18) {
|
||||
} else if (mclength + structapp_cp <= 18) {
|
||||
variant = 26;
|
||||
} else if (mclength <= 24) {
|
||||
} else if (mclength + structapp_cp <= 24) {
|
||||
variant = 27;
|
||||
} else if (mclength <= 30) {
|
||||
} else if (mclength + structapp_cp <= 30) {
|
||||
variant = 28;
|
||||
} else if (mclength <= 39) {
|
||||
} else if (mclength + structapp_cp <= 39) {
|
||||
variant = 29;
|
||||
} else if (mclength <= 54) {
|
||||
} else if (mclength + structapp_cp <= 54) {
|
||||
variant = 30;
|
||||
} else if (mclength <= 72) {
|
||||
} else if (mclength + structapp_cp <= 72) {
|
||||
variant = 31;
|
||||
} else if (mclength <= 90) {
|
||||
} else if (mclength + structapp_cp <= 90) {
|
||||
variant = 32;
|
||||
} else if (mclength <= 108) {
|
||||
} else if (mclength + structapp_cp <= 108) {
|
||||
variant = 33;
|
||||
} else {
|
||||
variant = 34;
|
||||
@ -1074,10 +1071,11 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
} else {
|
||||
/* Zint can choose automatically from all available variations */
|
||||
for (i = 27; i >= 0; i--) {
|
||||
|
||||
if (MicroAutosize[i] >= mclength) {
|
||||
/* Note mclength + structapp_cp <= 126 and MicroAutosize[27] == 126 so variant will be set */
|
||||
if (MicroAutosize[i] >= mclength + structapp_cp) {
|
||||
variant = MicroAutosize[i + 28];
|
||||
} else {
|
||||
assert(variant > 0); /* Suppress clang-tidy clang-analyzer-core.uninitialized.Assign */
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1089,10 +1087,10 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
symbol->rows = MicroVariants[variant + 34]; /* rows */
|
||||
k = MicroVariants[variant + 68]; /* number of EC CWs */
|
||||
longueur = (symbol->option_2 * symbol->rows) - k; /* number of non-EC CWs */
|
||||
i = longueur - mclength; /* amount of padding required */
|
||||
i = longueur - (mclength + structapp_cp); /* amount of padding required */
|
||||
offset = MicroVariants[variant + 102]; /* coefficient offset */
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("\nChoose symbol size:\n");
|
||||
printf("%d columns x %d rows, variant %d\n", symbol->option_2, symbol->rows, variant + 1);
|
||||
printf("%d data codewords (including %d pads), %d ecc codewords\n", longueur, i, k);
|
||||
@ -1106,6 +1104,13 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
i--;
|
||||
}
|
||||
|
||||
/* We add the Structured Append Macro Control Block if any */
|
||||
if (structapp_cp) {
|
||||
for (i = 0; i < structapp_cp; i++) {
|
||||
chainemc[mclength++] = structapp_cws[i];
|
||||
}
|
||||
}
|
||||
|
||||
/* Reed-Solomon error correction */
|
||||
longueur = mclength;
|
||||
for (i = 0; i < longueur; i++) {
|
||||
@ -1130,7 +1135,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
mclength++;
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (debug_print) {
|
||||
printf("Encoded Data Stream with ECC (%d):\n", mclength);
|
||||
for (i = 0; i < mclength; i++) {
|
||||
printf("%3d ", chainemc[i]);
|
||||
@ -1157,9 +1162,9 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
Cluster = StartCluster;
|
||||
/* Cluster can be 0, 1 or 2 for Cluster(0), Cluster(3) and Cluster(6) */
|
||||
|
||||
if (debug) printf("\nInternal row representation:\n");
|
||||
if (debug_print) printf("\nInternal row representation:\n");
|
||||
for (i = 0; i < symbol->rows; i++) {
|
||||
if (debug) printf("row %d: ", i);
|
||||
if (debug_print) printf("row %d: ", i);
|
||||
bp = 0;
|
||||
offset = 929 * Cluster;
|
||||
k = i * symbol->option_2;
|
||||
@ -1188,7 +1193,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
||||
}
|
||||
bp = bin_append_posn(rap_side[RightRAP - 1], 10, pattern, bp);
|
||||
pattern[bp++] = '1'; /* stop */
|
||||
if (debug) printf("%.*s\n", bp, pattern);
|
||||
if (debug_print) printf("%.*s\n", bp, pattern);
|
||||
|
||||
/* so now pattern[] holds the string of '1's and '0's. - copy this to the symbol */
|
||||
for (loop = 0; loop < bp; loop++) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2008-2017 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2008-2021 Robin Stuart <rstuart114@gmail.com>
|
||||
Portions Copyright (C) 2004 Grandzebu
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@ -472,7 +472,7 @@ static const unsigned short int Microcoeffs[344] = {
|
||||
};
|
||||
|
||||
/* rows, columns, error codewords, k-offset of valid MicroPDF417 sizes from ISO/IEC 24728:2006 */
|
||||
static const unsigned short int MicroVariants[170] ={
|
||||
static const unsigned short int MicroVariants[170] = {
|
||||
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
11, 14, 17, 20, 24, 28, 8, 11, 14, 17, 20, 23, 26, 6, 8, 10, 12, 15, 20, 26, 32, 38, 44, 4, 6, 8, 10, 12, 15, 20, 26, 32, 38, 44,
|
||||
7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 11, 13, 15, 12, 14, 16, 18, 21, 26, 32, 38, 44, 50, 8, 12, 14, 16, 18, 21, 26, 32, 38, 44, 50,
|
||||
@ -481,7 +481,7 @@ static const unsigned short int MicroVariants[170] ={
|
||||
/* rows, columns, error codewords, k-offset */
|
||||
|
||||
/* following is Left RAP, Centre RAP, Right RAP and Start Cluster from ISO/IEC 24728:2006 tables 10, 11 and 12 */
|
||||
static const char RAPTable[136] ={
|
||||
static const char RAPTable[136] = {
|
||||
1, 8, 36, 19, 9, 25, 1, 1, 8, 36, 19, 9, 27, 1, 7, 15, 25, 37, 1, 1, 21, 15, 1, 47, 1, 7, 15, 25, 37, 1, 1, 21, 15, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 15, 25, 37, 17, 9, 29, 31, 25, 19, 1, 7, 15, 25, 37, 17, 9, 29, 31, 25,
|
||||
9, 8, 36, 19, 17, 33, 1, 9, 8, 36, 19, 17, 35, 1, 7, 15, 25, 37, 33, 17, 37, 47, 49, 43, 1, 7, 15, 25, 37, 33, 17, 37, 47, 49,
|
||||
|
@ -341,6 +341,6 @@ INTERNAL int png_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
/* https://stackoverflow.com/a/26541331/664741 Suppresses gcc warning ISO C forbids an empty translation unit */
|
||||
/* https://stackoverflow.com/a/26541331 Suppresses gcc warning ISO C forbids an empty translation unit */
|
||||
typedef int make_iso_compilers_happy;
|
||||
#endif /* NO_PNG */
|
||||
|
101
backend/qr.c
101
backend/qr.c
@ -394,8 +394,8 @@ static int terminator_bits(const int version) {
|
||||
|
||||
/* Convert input data to a binary stream and add padding */
|
||||
static void qr_binary(unsigned char datastream[], const int version, const int target_codewords, const char mode[],
|
||||
const unsigned int jisdata[], const int length, const int gs1, const int eci, const int est_binlen,
|
||||
const int debug_print) {
|
||||
const unsigned int jisdata[], const int length, const struct zint_structapp *p_structapp, const int gs1,
|
||||
const int eci, const int est_binlen, const int debug_print) {
|
||||
int position = 0;
|
||||
int i, j, bp;
|
||||
int termbits, padbits, modebits;
|
||||
@ -411,6 +411,14 @@ static void qr_binary(unsigned char datastream[], const int version, const int t
|
||||
*binary = '\0';
|
||||
bp = 0;
|
||||
|
||||
if (p_structapp) {
|
||||
bp = bin_append_posn(3, 4, binary, bp); /* Structured Append indicator */
|
||||
bp = bin_append_posn(p_structapp->index - 1, 4, binary, bp);
|
||||
bp = bin_append_posn(p_structapp->count - 1, 4, binary, bp);
|
||||
bp = bin_append_posn(to_int((const unsigned char *) p_structapp->id, (int) strlen(p_structapp->id)), 8,
|
||||
binary, bp); /* Parity */
|
||||
}
|
||||
|
||||
if (gs1) { /* Not applicable to MICROQR */
|
||||
if (version < RMQR_VERSION) {
|
||||
bp = bin_append_posn(5, 4, binary, bp); /* FNC1 */
|
||||
@ -1431,7 +1439,7 @@ static int blockLength(const int start, const char inputMode[], const int inputL
|
||||
}
|
||||
|
||||
static int getBinaryLength(const int version, char inputMode[], const unsigned int inputData[], const int inputLength,
|
||||
const int gs1, const int eci, const int debug_print) {
|
||||
const struct zint_structapp *p_structapp, const int gs1, const int eci, const int debug_print) {
|
||||
/* Calculate the actual bitlength of the proposed binary string */
|
||||
int i, j;
|
||||
char currentMode;
|
||||
@ -1443,6 +1451,10 @@ static int getBinaryLength(const int version, char inputMode[], const unsigned i
|
||||
|
||||
currentMode = ' '; // Null
|
||||
|
||||
if (p_structapp) {
|
||||
count += 4 + 8 + 8;
|
||||
}
|
||||
|
||||
if (gs1 == 1) { /* Not applicable to MICROQR */
|
||||
if (version < RMQR_VERSION) {
|
||||
count += 4;
|
||||
@ -1534,6 +1546,7 @@ INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
int user_mask;
|
||||
int canShrink;
|
||||
int size_squared;
|
||||
const struct zint_structapp *p_structapp = NULL;
|
||||
int debug_print = symbol->debug & ZINT_DEBUG_PRINT;
|
||||
int eci_length = get_eci_length(symbol->eci, source, length);
|
||||
|
||||
@ -1581,7 +1594,39 @@ INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
}
|
||||
}
|
||||
|
||||
est_binlen = getBinaryLength(40, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
if (symbol->structapp.count) {
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 16) {
|
||||
strcpy(symbol->errtxt, "750: Structured Append count out of range (2-16)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "751: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.id[0]) {
|
||||
int id, id_len;
|
||||
|
||||
for (id_len = 0; id_len < 32 && symbol->structapp.id[id_len]; id_len++);
|
||||
|
||||
if (id_len > 3) { /* 255 */
|
||||
strcpy(symbol->errtxt, "752: Structured Append ID too long (3 digit maximum)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
id = to_int((const unsigned char *) symbol->structapp.id, id_len);
|
||||
if (id == -1) {
|
||||
strcpy(symbol->errtxt, "753: Invalid Structured Append ID (digits only)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (id > 255) {
|
||||
sprintf(symbol->errtxt, "754: Structured Append ID '%d' out of range (0-255)", id);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
}
|
||||
p_structapp = &symbol->structapp;
|
||||
}
|
||||
|
||||
est_binlen = getBinaryLength(40, mode, jisdata, length, p_structapp, gs1, symbol->eci, debug_print);
|
||||
|
||||
ecc_level = LEVEL_L;
|
||||
max_cw = 2956;
|
||||
@ -1632,7 +1677,7 @@ INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
}
|
||||
}
|
||||
if (autosize != 40) {
|
||||
est_binlen = getBinaryLength(autosize, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(autosize, mode, jisdata, length, p_structapp, gs1, symbol->eci, debug_print);
|
||||
}
|
||||
|
||||
// Now see if the optimised binary will fit in a smaller symbol.
|
||||
@ -1644,7 +1689,8 @@ INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
} else {
|
||||
prev_est_binlen = est_binlen;
|
||||
memcpy(prev_mode, mode, length);
|
||||
est_binlen = getBinaryLength(autosize - 1, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(autosize - 1, mode, jisdata, length, p_structapp, gs1, symbol->eci,
|
||||
debug_print);
|
||||
|
||||
switch (ecc_level) {
|
||||
case LEVEL_L:
|
||||
@ -1689,7 +1735,8 @@ INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
*/
|
||||
if (symbol->option_2 > version) {
|
||||
version = symbol->option_2;
|
||||
est_binlen = getBinaryLength(symbol->option_2, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(symbol->option_2, mode, jisdata, length, p_structapp, gs1, symbol->eci,
|
||||
debug_print);
|
||||
}
|
||||
|
||||
if (symbol->option_2 < version) {
|
||||
@ -1741,8 +1788,8 @@ INTERNAL int qr_code(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
fullstream = (unsigned char *) _alloca(qr_total_codewords[version - 1] + 1);
|
||||
#endif
|
||||
|
||||
qr_binary(datastream, version, target_codewords, mode, jisdata, length, gs1, symbol->eci, est_binlen,
|
||||
debug_print);
|
||||
qr_binary(datastream, version, target_codewords, mode, jisdata, length, p_structapp, gs1, symbol->eci,
|
||||
est_binlen, debug_print);
|
||||
#ifdef ZINT_TEST
|
||||
if (symbol->debug & ZINT_DEBUG_TEST) debug_test_codeword_dump(symbol, datastream, target_codewords);
|
||||
#endif
|
||||
@ -2482,8 +2529,8 @@ INTERNAL int microqr(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
/* Determine length of binary data */
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (version_valid[i]) {
|
||||
binary_count[i] = getBinaryLength(MICROQR_VERSION + i, mode, jisdata, length, 0 /*gs1*/, 0 /*eci*/,
|
||||
debug_print);
|
||||
binary_count[i] = getBinaryLength(MICROQR_VERSION + i, mode, jisdata, length, NULL /*p_structapp*/,
|
||||
0 /*gs1*/, 0 /*eci*/, debug_print);
|
||||
} else {
|
||||
binary_count[i] = 128 + 1;
|
||||
}
|
||||
@ -2568,7 +2615,7 @@ INTERNAL int microqr(struct zint_symbol *symbol, unsigned char source[], int len
|
||||
qr_define_mode(mode, jisdata, length, 0 /*gs1*/, MICROQR_VERSION + version, debug_print);
|
||||
|
||||
qr_binary((unsigned char *) full_stream, MICROQR_VERSION + version, 0 /*target_codewords*/, mode, jisdata, length,
|
||||
0 /*gs1*/, 0 /*eci*/, binary_count[version], debug_print);
|
||||
NULL /*p_structapp*/, 0 /*gs1*/, 0 /*eci*/, binary_count[version], debug_print);
|
||||
|
||||
if (debug_print) printf("Binary (%d): %s\n", (int) strlen(full_stream), full_stream);
|
||||
|
||||
@ -2746,7 +2793,7 @@ INTERNAL int upnqr(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
break;
|
||||
}
|
||||
|
||||
est_binlen = getBinaryLength(15, mode, jisdata, length, 0, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(15, mode, jisdata, length, NULL /*p_structapp*/, 0, symbol->eci, debug_print);
|
||||
|
||||
ecc_level = LEVEL_M;
|
||||
|
||||
@ -2767,7 +2814,8 @@ INTERNAL int upnqr(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
fullstream = (unsigned char *) _alloca(qr_total_codewords[version - 1] + 1);
|
||||
#endif
|
||||
|
||||
qr_binary(datastream, version, target_codewords, mode, jisdata, length, 0, symbol->eci, est_binlen, debug_print);
|
||||
qr_binary(datastream, version, target_codewords, mode, jisdata, length, NULL /*p_structapp*/, 0 /*gs1*/,
|
||||
symbol->eci, est_binlen, debug_print);
|
||||
#ifdef ZINT_TEST
|
||||
if (symbol->debug & ZINT_DEBUG_TEST) debug_test_codeword_dump(symbol, datastream, target_codewords);
|
||||
#endif
|
||||
@ -2972,7 +3020,8 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length
|
||||
}
|
||||
}
|
||||
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + 31, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + 31, mode, jisdata, length, NULL /*p_structapp*/, gs1, symbol->eci,
|
||||
debug_print);
|
||||
|
||||
ecc_level = LEVEL_M;
|
||||
max_cw = 152;
|
||||
@ -3008,8 +3057,8 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length
|
||||
autosize = 31;
|
||||
best_footprint = rmqr_height[31] * rmqr_width[31];
|
||||
for (version = 30; version >= 0; version--) {
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, gs1, symbol->eci,
|
||||
debug_print);
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, NULL /*p_structapp*/, gs1,
|
||||
symbol->eci, debug_print);
|
||||
footprint = rmqr_height[version] * rmqr_width[version];
|
||||
if (ecc_level == LEVEL_M) {
|
||||
if (8 * rmqr_data_codewords_M[version] >= est_binlen) {
|
||||
@ -3028,20 +3077,23 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length
|
||||
}
|
||||
}
|
||||
version = autosize;
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, NULL /*p_structapp*/, gs1,
|
||||
symbol->eci, debug_print);
|
||||
}
|
||||
|
||||
if ((symbol->option_2 >= 1) && (symbol->option_2 <= 32)) {
|
||||
// User specified symbol size
|
||||
version = symbol->option_2 - 1;
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, NULL /*p_structapp*/, gs1,
|
||||
symbol->eci, debug_print);
|
||||
}
|
||||
|
||||
if (symbol->option_2 >= 33) {
|
||||
// User has specified symbol height only
|
||||
version = rmqr_fixed_height_upper_bound[symbol->option_2 - 32];
|
||||
for (i = version - 1; i > rmqr_fixed_height_upper_bound[symbol->option_2 - 33]; i--) {
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + i, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + i, mode, jisdata, length, NULL /*p_structapp*/, gs1,
|
||||
symbol->eci, debug_print);
|
||||
if (ecc_level == LEVEL_M) {
|
||||
if (8 * rmqr_data_codewords_M[i] >= est_binlen) {
|
||||
version = i;
|
||||
@ -3052,7 +3104,8 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length
|
||||
}
|
||||
}
|
||||
}
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, gs1, symbol->eci, debug_print);
|
||||
est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, NULL /*p_structapp*/, gs1,
|
||||
symbol->eci, debug_print);
|
||||
}
|
||||
|
||||
if (symbol->option_1 == -1) {
|
||||
@ -3072,7 +3125,7 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length
|
||||
|
||||
if (est_binlen > (target_codewords * 8)) {
|
||||
// User has selected a symbol too small for the data
|
||||
strcpy(symbol->errtxt, "580: Input too long for selected symbol size");
|
||||
strcpy(symbol->errtxt, "560: Input too long for selected symbol size");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
@ -3092,8 +3145,8 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length
|
||||
fullstream = (unsigned char *) _alloca(rmqr_total_codewords[version] + 1);
|
||||
#endif
|
||||
|
||||
qr_binary(datastream, RMQR_VERSION + version, target_codewords, mode, jisdata, length, gs1, symbol->eci,
|
||||
est_binlen, debug_print);
|
||||
qr_binary(datastream, RMQR_VERSION + version, target_codewords, mode, jisdata, length, NULL /*p_structapp*/, gs1,
|
||||
symbol->eci, est_binlen, debug_print);
|
||||
#ifdef ZINT_TEST
|
||||
if (symbol->debug & ZINT_DEBUG_TEST) debug_test_codeword_dump(symbol, datastream, target_codewords);
|
||||
#endif
|
||||
|
@ -72,8 +72,8 @@ INTERNAL void rs_init_gf(rs_t *rs, const unsigned int prime_poly) {
|
||||
const unsigned char *alog;
|
||||
};
|
||||
/* To add a new prime poly of degree <= 8 add its details to this table and to the table in `test_generate()`
|
||||
* in "backend/tests/test_reedsol.c" and regenerate the log tables by running "./test_reedsol -f generate -g".
|
||||
* Paste the result in "reedsol_logs.h" */
|
||||
in "backend/tests/test_reedsol.c" and regenerate the log tables by running
|
||||
"backend/tests/test_reedsol -f generate -g". Paste the result in "reedsol_logs.h" */
|
||||
static const struct item data[] = {
|
||||
{ logt_0x13, alog_0x13 }, /* 0 000- */
|
||||
{ logt_0x25, alog_0x25 }, /* 0 001- */
|
||||
|
@ -36,7 +36,7 @@
|
||||
/* Static log/antilog tables for prime polys of up to degree 8 (> 8 too large so generated at runtime instead).
|
||||
* Antilog tables doubled to avoid mod. */
|
||||
|
||||
/* Paste output of "./test_reedsol -f generate -g" here */
|
||||
/* Paste output of "backend/tests/test_reedsol -f generate -g" here */
|
||||
static const unsigned char logt_0x13[16] = {
|
||||
0x00, 0x00, 0x01, 0x04, 0x02, 0x08, 0x05, 0x0A, 0x03, 0x0E, 0x09, 0x07, 0x06, 0x0D, 0x0B, 0x0C,
|
||||
};
|
||||
|
BIN
backend/tests/data/gif/datamatrix_seq2of9.gif
Normal file
BIN
backend/tests/data/gif/datamatrix_seq2of9.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 162 B |
BIN
backend/tests/data/png/aztec_z1_seq4of7.png
Normal file
BIN
backend/tests/data/png/aztec_z1_seq4of7.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
@ -39,31 +39,39 @@ static void test_options(int index, int debug) {
|
||||
int output_options;
|
||||
int option_1;
|
||||
int option_2;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
const char *expected_errtxt;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_AZTEC, -1, -1, -1, -1, "1234567890", 0, 15, 15 },
|
||||
/* 1*/ { BARCODE_AZTEC, -1, -1, 1, -1, "1234567890", 0, 15, 15 },
|
||||
/* 2*/ { BARCODE_AZTEC, -1, -1, 4, -1, "1234567890", 0, 19, 19 },
|
||||
/* 3*/ { BARCODE_AZTEC, -1, -1, 5, -1, "1234567890", ZINT_WARN_INVALID_OPTION, 15, 15 },
|
||||
/* 4*/ { BARCODE_AZTEC, -1, -1, -1, 1, "12345678901234567890", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 5*/ { BARCODE_AZTEC, -1, -1, -1, 36, "1234567890", 0, 151, 151 },
|
||||
/* 6*/ { BARCODE_AZTEC, -1, -1, -1, 37, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 },
|
||||
/* 7*/ { BARCODE_AZTEC, GS1_MODE, READER_INIT, -1, -1, "[91]A", ZINT_ERROR_INVALID_OPTION, -1, -1 },
|
||||
/* 8*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, "[91]A", 0, 15, 15 },
|
||||
/* 9*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, "(91)A", 0, 15, 15 },
|
||||
/* 10*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 26, "A", 0, 109, 109 }, // 22 layers
|
||||
/* 11*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 27, "A", ZINT_ERROR_TOO_LONG, -1, -1 }, // 23 layers
|
||||
/* 12*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 1, "A", 0, 15, 15 }, // Compact 1 layer
|
||||
/* 13*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 2, "A", 0, 19, 19 }, // Compact 2 layers gets set to full 1 layer if READER_INIT set
|
||||
/* 14*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "0001", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 15*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 16*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "256", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
||||
/* 0*/ { BARCODE_AZTEC, -1, -1, -1, -1, { 0, 0, "" }, "1234567890", 0, 15, 15, "" },
|
||||
/* 1*/ { BARCODE_AZTEC, -1, -1, 1, -1, { 0, 0, "" }, "1234567890", 0, 15, 15, "" },
|
||||
/* 2*/ { BARCODE_AZTEC, -1, -1, 4, -1, { 0, 0, "" }, "1234567890", 0, 19, 19, "" },
|
||||
/* 3*/ { BARCODE_AZTEC, -1, -1, 5, -1, { 0, 0, "" }, "1234567890", ZINT_WARN_INVALID_OPTION, 15, 15, "Warning 503: Invalid error correction level - using default instead" },
|
||||
/* 4*/ { BARCODE_AZTEC, -1, -1, -1, 1, { 0, 0, "" }, "12345678901234567890", ZINT_ERROR_TOO_LONG, -1, -1, "Error 505: Data too long for specified Aztec Code symbol size" },
|
||||
/* 5*/ { BARCODE_AZTEC, -1, -1, -1, 36, { 0, 0, "" }, "1234567890", 0, 151, 151, "" },
|
||||
/* 6*/ { BARCODE_AZTEC, -1, -1, -1, 37, { 0, 0, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 510: Invalid Aztec Code size" },
|
||||
/* 7*/ { BARCODE_AZTEC, GS1_MODE, READER_INIT, -1, -1, { 0, 0, "" }, "[91]A", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 501: Cannot encode in GS1 and Reader Initialisation mode at the same time" },
|
||||
/* 8*/ { BARCODE_AZTEC, GS1_MODE, -1, -1, -1, { 0, 0, "" }, "[91]A", 0, 15, 15, "" },
|
||||
/* 9*/ { BARCODE_AZTEC, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, { 0, 0, "" }, "(91)A", 0, 15, 15, "" },
|
||||
/* 10*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 26, { 0, 0, "" }, "A", 0, 109, 109, "" }, // 22 layers
|
||||
/* 11*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 27, { 0, 0, "" }, "A", ZINT_ERROR_TOO_LONG, -1, -1, "Error 506: Data too long for reader initialisation symbol" }, // 23 layers
|
||||
/* 12*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 1, { 0, 0, "" }, "A", 0, 15, 15, "" }, // Compact 1 layer
|
||||
/* 13*/ { BARCODE_AZTEC, -1, READER_INIT, -1, 2, { 0, 0, "" }, "A", 0, 19, 19, "" }, // Compact 2 layers gets set to full 1 layer if READER_INIT set
|
||||
/* 14*/ { BARCODE_AZRUNE, -1, -1, -1, -1, { 0, 0, "" }, "0001", ZINT_ERROR_TOO_LONG, -1, -1, "Error 507: Input too large (3 character maximum)" },
|
||||
/* 15*/ { BARCODE_AZRUNE, -1, -1, -1, -1, { 0, 0, "" }, "A", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 508: Invalid character in data (digits only)" },
|
||||
/* 16*/ { BARCODE_AZRUNE, -1, -1, -1, -1, { 0, 0, "" }, "256", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 509: Input out of range (0 to 255)" },
|
||||
/* 17*/ { BARCODE_AZTEC, -1, -1, -1, -1, { 1, 2, "" }, "1234567890", 0, 15, 15, "" },
|
||||
/* 18*/ { BARCODE_AZTEC, -1, -1, -1, -1, { 1, 2, "12345678901234567890123456789012" }, "1234567890", 0, 23, 23, "" },
|
||||
/* 19*/ { BARCODE_AZTEC, -1, -1, -1, -1, { 1, 1, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 701: Structured Append count out of range (2-26)" },
|
||||
/* 20*/ { BARCODE_AZTEC, -1, -1, -1, -1, { 0, 2, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 702: Structured Append index out of range (1-2)" },
|
||||
/* 21*/ { BARCODE_AZTEC, -1, -1, -1, -1, { 3, 2, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 702: Structured Append index out of range (1-2)" },
|
||||
/* 22*/ { BARCODE_AZTEC, -1, -1, -1, -1, { 1, 2, "A B" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 703: Structured Append ID cannot contain spaces" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -79,6 +87,9 @@ static void test_options(int index, int debug) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
@ -87,6 +98,7 @@ static void test_options(int index, int debug) {
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, symbol->errtxt);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, symbol->errtxt);
|
||||
}
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d symbol->errtxt %s != %s\n", i, symbol->errtxt, data[i].expected_errtxt);
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -583,8 +583,8 @@ static void test_dpd_input(int index, int generate, int debug) {
|
||||
/* 1*/ { "12345678901234567890123456789", ZINT_ERROR_TOO_LONG, -1, "Error 349: DPD input wrong length (28 characters required)", "" },
|
||||
/* 2*/ { "123456789012345678901234567,", ZINT_ERROR_INVALID_DATA, -1, "Error 300: Invalid character in DPD data (alphanumerics only)", "Alphanumerics only in body" },
|
||||
/* 3*/ { ",234567890123456789012345678", 0, 211, "(19) 104 12 18 99 34 56 78 90 12 34 56 78 90 12 34 56 78 64 106", "Non-alphanumeric DPD Identifier (Barcode ID) allowed" },
|
||||
/* 4*/ { "\037234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 301: Invalid DPD identifier (first character), ASCII values 32 to 127 only", "Control char <US> as DPD Identifier" },
|
||||
/* 5*/ { "é234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 301: Invalid DPD identifier (first character), ASCII values 32 to 127 only", "Extended ASCII as DPD Identifier" },
|
||||
/* 4*/ { "\037234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 343: Invalid DPD identifier (first character), ASCII values 32 to 127 only", "Control char <US> as DPD Identifier" },
|
||||
/* 5*/ { "é234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 343: Invalid DPD identifier (first character), ASCII values 32 to 127 only", "Extended ASCII as DPD Identifier" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
@ -36,6 +36,7 @@ static void test_large(int index, int debug) {
|
||||
struct item {
|
||||
int symbology;
|
||||
int option_2;
|
||||
struct zint_structapp structapp;
|
||||
char *pattern;
|
||||
int length;
|
||||
int ret;
|
||||
@ -45,302 +46,304 @@ static void test_large(int index, int debug) {
|
||||
// ISO/IEC 16022:2006 Table 7 and ISO/IEC 21471:2020 (DMRE) Table 7
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DATAMATRIX, -1, "1", 3116, 0, 144, 144 },
|
||||
/* 1*/ { BARCODE_DATAMATRIX, -1, "1", 3117, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 2*/ { BARCODE_DATAMATRIX, -1, "A", 2335, 0, 144, 144 },
|
||||
/* 3*/ { BARCODE_DATAMATRIX, -1, "A", 2336, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 4*/ { BARCODE_DATAMATRIX, -1, "\200", 1556, 0, 144, 144 }, // Spec says 1555 but 1556 correct as only single byte count of 0 required
|
||||
/* 5*/ { BARCODE_DATAMATRIX, -1, "\200", 1557, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 6*/ { BARCODE_HIBC_DM, -1, "1", 110, 0, 32, 32 },
|
||||
/* 7*/ { BARCODE_HIBC_DM, -1, "1", 111, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 8*/ { BARCODE_DATAMATRIX, 1, "1", 6, 0, 10, 10 },
|
||||
/* 9*/ { BARCODE_DATAMATRIX, 1, "1", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 10*/ { BARCODE_DATAMATRIX, 1, "A", 3, 0, 10, 10 },
|
||||
/* 11*/ { BARCODE_DATAMATRIX, 1, "A", 4, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 12*/ { BARCODE_DATAMATRIX, 1, "\200", 1, 0, 10, 10 },
|
||||
/* 13*/ { BARCODE_DATAMATRIX, 1, "\200", 2, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 14*/ { BARCODE_DATAMATRIX, 2, "1", 10, 0, 12, 12 },
|
||||
/* 15*/ { BARCODE_DATAMATRIX, 2, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 16*/ { BARCODE_DATAMATRIX, 2, "A", 6, 0, 12, 12 },
|
||||
/* 17*/ { BARCODE_DATAMATRIX, 2, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 18*/ { BARCODE_DATAMATRIX, 2, "\200", 3, 0, 12, 12 },
|
||||
/* 19*/ { BARCODE_DATAMATRIX, 2, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 20*/ { BARCODE_DATAMATRIX, 3, "1", 16, 0, 14, 14 },
|
||||
/* 21*/ { BARCODE_DATAMATRIX, 3, "1", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 22*/ { BARCODE_DATAMATRIX, 3, "A", 10, 0, 14, 14 },
|
||||
/* 23*/ { BARCODE_DATAMATRIX, 3, "A", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 24*/ { BARCODE_DATAMATRIX, 3, "\200", 6, 0, 14, 14 },
|
||||
/* 25*/ { BARCODE_DATAMATRIX, 3, "\200", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 26*/ { BARCODE_DATAMATRIX, 4, "1", 24, 0, 16, 16 },
|
||||
/* 27*/ { BARCODE_DATAMATRIX, 4, "1", 25, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 28*/ { BARCODE_DATAMATRIX, 4, "A", 16, 0, 16, 16 },
|
||||
/* 29*/ { BARCODE_DATAMATRIX, 4, "A", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 30*/ { BARCODE_DATAMATRIX, 4, "\200", 10, 0, 16, 16 },
|
||||
/* 31*/ { BARCODE_DATAMATRIX, 4, "\200", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 32*/ { BARCODE_DATAMATRIX, 5, "1", 36, 0, 18, 18 },
|
||||
/* 33*/ { BARCODE_DATAMATRIX, 5, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 34*/ { BARCODE_DATAMATRIX, 5, "A", 25, 0, 18, 18 },
|
||||
/* 35*/ { BARCODE_DATAMATRIX, 5, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 36*/ { BARCODE_DATAMATRIX, 5, "\200", 16, 0, 18, 18 },
|
||||
/* 37*/ { BARCODE_DATAMATRIX, 5, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 38*/ { BARCODE_DATAMATRIX, 6, "1", 44, 0, 20, 20 },
|
||||
/* 39*/ { BARCODE_DATAMATRIX, 6, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 40*/ { BARCODE_DATAMATRIX, 6, "A", 31, 0, 20, 20 },
|
||||
/* 41*/ { BARCODE_DATAMATRIX, 6, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 42*/ { BARCODE_DATAMATRIX, 6, "\200", 20, 0, 20, 20 },
|
||||
/* 43*/ { BARCODE_DATAMATRIX, 6, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 44*/ { BARCODE_DATAMATRIX, 7, "1", 60, 0, 22, 22 },
|
||||
/* 45*/ { BARCODE_DATAMATRIX, 7, "1", 61, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 46*/ { BARCODE_DATAMATRIX, 7, "A", 43, 0, 22, 22 },
|
||||
/* 47*/ { BARCODE_DATAMATRIX, 7, "A", 44, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 48*/ { BARCODE_DATAMATRIX, 7, "\200", 28, 0, 22, 22 },
|
||||
/* 49*/ { BARCODE_DATAMATRIX, 7, "\200", 29, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 50*/ { BARCODE_DATAMATRIX, 8, "1", 72, 0, 24, 24 },
|
||||
/* 51*/ { BARCODE_DATAMATRIX, 8, "1", 73, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 52*/ { BARCODE_DATAMATRIX, 8, "A", 52, 0, 24, 24 },
|
||||
/* 53*/ { BARCODE_DATAMATRIX, 8, "A", 53, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 54*/ { BARCODE_DATAMATRIX, 8, "\200", 34, 0, 24, 24 },
|
||||
/* 55*/ { BARCODE_DATAMATRIX, 8, "\200", 35, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 56*/ { BARCODE_DATAMATRIX, 9, "1", 88, 0, 26, 26 },
|
||||
/* 57*/ { BARCODE_DATAMATRIX, 9, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 58*/ { BARCODE_DATAMATRIX, 9, "A", 64, 0, 26, 26 },
|
||||
/* 59*/ { BARCODE_DATAMATRIX, 9, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 60*/ { BARCODE_DATAMATRIX, 9, "\200", 42, 0, 26, 26 },
|
||||
/* 61*/ { BARCODE_DATAMATRIX, 9, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 62*/ { BARCODE_DATAMATRIX, 10, "1", 124, 0, 32, 32 },
|
||||
/* 63*/ { BARCODE_DATAMATRIX, 10, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 64*/ { BARCODE_DATAMATRIX, 10, "A", 91, 0, 32, 32 },
|
||||
/* 65*/ { BARCODE_DATAMATRIX, 10, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 66*/ { BARCODE_DATAMATRIX, 10, "\200", 60, 0, 32, 32 },
|
||||
/* 67*/ { BARCODE_DATAMATRIX, 10, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 68*/ { BARCODE_DATAMATRIX, 11, "1", 172, 0, 36, 36 },
|
||||
/* 69*/ { BARCODE_DATAMATRIX, 11, "1", 173, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 70*/ { BARCODE_DATAMATRIX, 11, "A", 127, 0, 36, 36 },
|
||||
/* 71*/ { BARCODE_DATAMATRIX, 11, "A", 128, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 72*/ { BARCODE_DATAMATRIX, 11, "\200", 84, 0, 36, 36 },
|
||||
/* 73*/ { BARCODE_DATAMATRIX, 11, "\200", 85, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 74*/ { BARCODE_DATAMATRIX, 12, "1", 228, 0, 40, 40 },
|
||||
/* 75*/ { BARCODE_DATAMATRIX, 12, "1", 229, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 76*/ { BARCODE_DATAMATRIX, 12, "A", 169, 0, 40, 40 },
|
||||
/* 77*/ { BARCODE_DATAMATRIX, 12, "A", 170, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 78*/ { BARCODE_DATAMATRIX, 12, "\200", 112, 0, 40, 40 },
|
||||
/* 79*/ { BARCODE_DATAMATRIX, 12, "\200", 113, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 80*/ { BARCODE_DATAMATRIX, 13, "1", 288, 0, 44, 44 },
|
||||
/* 81*/ { BARCODE_DATAMATRIX, 13, "1", 289, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 82*/ { BARCODE_DATAMATRIX, 13, "A", 214, 0, 44, 44 },
|
||||
/* 83*/ { BARCODE_DATAMATRIX, 13, "A", 215, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 84*/ { BARCODE_DATAMATRIX, 13, "\200", 142, 0, 44, 44 },
|
||||
/* 85*/ { BARCODE_DATAMATRIX, 13, "\200", 143, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 86*/ { BARCODE_DATAMATRIX, 14, "1", 348, 0, 48, 48 },
|
||||
/* 87*/ { BARCODE_DATAMATRIX, 14, "1", 349, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 88*/ { BARCODE_DATAMATRIX, 14, "A", 259, 0, 48, 48 },
|
||||
/* 89*/ { BARCODE_DATAMATRIX, 14, "A", 260, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 90*/ { BARCODE_DATAMATRIX, 14, "\200", 172, 0, 48, 48 },
|
||||
/* 91*/ { BARCODE_DATAMATRIX, 14, "\200", 173, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 92*/ { BARCODE_DATAMATRIX, 15, "1", 408, 0, 52, 52 },
|
||||
/* 93*/ { BARCODE_DATAMATRIX, 15, "1", 409, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 94*/ { BARCODE_DATAMATRIX, 15, "A", 304, 0, 52, 52 },
|
||||
/* 95*/ { BARCODE_DATAMATRIX, 15, "A", 305, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 96*/ { BARCODE_DATAMATRIX, 15, "\200", 202, 0, 52, 52 },
|
||||
/* 97*/ { BARCODE_DATAMATRIX, 15, "\200", 203, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 98*/ { BARCODE_DATAMATRIX, 16, "1", 560, 0, 64, 64 },
|
||||
/* 99*/ { BARCODE_DATAMATRIX, 16, "1", 561, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*100*/ { BARCODE_DATAMATRIX, 16, "A", 418, 0, 64, 64 },
|
||||
/*101*/ { BARCODE_DATAMATRIX, 16, "A", 419, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*102*/ { BARCODE_DATAMATRIX, 16, "\200", 278, 0, 64, 64 }, // Spec says 277 but 278 correct as only single byte count of 0 required
|
||||
/*103*/ { BARCODE_DATAMATRIX, 16, "\200", 279, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*104*/ { BARCODE_DATAMATRIX, 17, "1", 736, 0, 72, 72 },
|
||||
/*105*/ { BARCODE_DATAMATRIX, 17, "1", 737, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*106*/ { BARCODE_DATAMATRIX, 17, "A", 550, 0, 72, 72 },
|
||||
/*107*/ { BARCODE_DATAMATRIX, 17, "A", 551, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*108*/ { BARCODE_DATAMATRIX, 17, "\200", 366, 0, 72, 72 }, // Spec says 365 but 366 correct as only single byte count of 0 required
|
||||
/*109*/ { BARCODE_DATAMATRIX, 17, "\200", 367, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*110*/ { BARCODE_DATAMATRIX, 18, "1", 912, 0, 80, 80 },
|
||||
/*111*/ { BARCODE_DATAMATRIX, 18, "1", 913, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*112*/ { BARCODE_DATAMATRIX, 18, "A", 682, 0, 80, 80 },
|
||||
/*113*/ { BARCODE_DATAMATRIX, 18, "A", 683, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*114*/ { BARCODE_DATAMATRIX, 18, "\200", 454, 0, 80, 80 }, // Spec says 453 but 454 correct as only single byte count of 0 required
|
||||
/*115*/ { BARCODE_DATAMATRIX, 18, "\200", 455, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*116*/ { BARCODE_DATAMATRIX, 19, "1", 1152, 0, 88, 88 },
|
||||
/*117*/ { BARCODE_DATAMATRIX, 19, "1", 1153, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*118*/ { BARCODE_DATAMATRIX, 19, "A", 862, 0, 88, 88 },
|
||||
/*119*/ { BARCODE_DATAMATRIX, 19, "A", 863, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*120*/ { BARCODE_DATAMATRIX, 19, "\200", 574, 0, 88, 88 }, // Spec says 573 but 574 correct as only single byte count of 0 required
|
||||
/*121*/ { BARCODE_DATAMATRIX, 19, "\200", 575, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*122*/ { BARCODE_DATAMATRIX, 20, "1", 1392, 0, 96, 96 },
|
||||
/*123*/ { BARCODE_DATAMATRIX, 20, "1", 1393, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*124*/ { BARCODE_DATAMATRIX, 20, "A", 1042, 0, 96, 96 },
|
||||
/*125*/ { BARCODE_DATAMATRIX, 20, "A", 1043, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*126*/ { BARCODE_DATAMATRIX, 20, "\200", 694, 0, 96, 96 }, // Spec says 693 but 694 correct as only single byte count of 0 required
|
||||
/*127*/ { BARCODE_DATAMATRIX, 20, "\200", 695, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*128*/ { BARCODE_DATAMATRIX, 21, "1", 1632, 0, 104, 104 },
|
||||
/*129*/ { BARCODE_DATAMATRIX, 21, "1", 1633, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*130*/ { BARCODE_DATAMATRIX, 21, "A", 1222, 0, 104, 104 },
|
||||
/*131*/ { BARCODE_DATAMATRIX, 21, "A", 1223, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*132*/ { BARCODE_DATAMATRIX, 21, "\200", 814, 0, 104, 104 }, // Spec says 813 but 814 correct as only single byte count of 0 required
|
||||
/*133*/ { BARCODE_DATAMATRIX, 21, "\200", 815, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*134*/ { BARCODE_DATAMATRIX, 22, "1", 2100, 0, 120, 120 },
|
||||
/*135*/ { BARCODE_DATAMATRIX, 22, "1", 2101, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*136*/ { BARCODE_DATAMATRIX, 22, "A", 1573, 0, 120, 120 },
|
||||
/*137*/ { BARCODE_DATAMATRIX, 22, "A", 1574, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*138*/ { BARCODE_DATAMATRIX, 22, "\200", 1048, 0, 120, 120 }, // Spec says 1047 but 1048 correct as only single byte count of 0 required
|
||||
/*139*/ { BARCODE_DATAMATRIX, 22, "\200", 1049, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*140*/ { BARCODE_DATAMATRIX, 23, "1", 2608, 0, 132, 132 },
|
||||
/*141*/ { BARCODE_DATAMATRIX, 23, "1", 2609, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*142*/ { BARCODE_DATAMATRIX, 23, "A", 1954, 0, 132, 132 },
|
||||
/*143*/ { BARCODE_DATAMATRIX, 23, "A", 1955, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*144*/ { BARCODE_DATAMATRIX, 23, "\200", 1302, 0, 132, 132 }, // Spec says 1301 but 1302 correct as only single byte count of 0 required
|
||||
/*145*/ { BARCODE_DATAMATRIX, 23, "\200", 1303, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*146*/ { BARCODE_DATAMATRIX, 24, "1", 3116, 0, 144, 144 },
|
||||
/*147*/ { BARCODE_DATAMATRIX, 24, "1", 3117, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*148*/ { BARCODE_DATAMATRIX, 24, "A", 2335, 0, 144, 144 },
|
||||
/*149*/ { BARCODE_DATAMATRIX, 24, "A", 2336, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*150*/ { BARCODE_DATAMATRIX, 24, "\200", 1556, 0, 144, 144 }, // Spec says 1555 but 1556 correct as only single byte count of 0 required
|
||||
/*151*/ { BARCODE_DATAMATRIX, 24, "\200", 1557, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*152*/ { BARCODE_DATAMATRIX, 25, "1", 10, 0, 8, 18 },
|
||||
/*153*/ { BARCODE_DATAMATRIX, 25, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*154*/ { BARCODE_DATAMATRIX, 25, "A", 6, 0, 8, 18 },
|
||||
/*155*/ { BARCODE_DATAMATRIX, 25, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*156*/ { BARCODE_DATAMATRIX, 25, "\200", 3, 0, 8, 18 },
|
||||
/*157*/ { BARCODE_DATAMATRIX, 25, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*158*/ { BARCODE_DATAMATRIX, 26, "1", 20, 0, 8, 32 },
|
||||
/*159*/ { BARCODE_DATAMATRIX, 26, "1", 21, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*160*/ { BARCODE_DATAMATRIX, 26, "A", 13, 0, 8, 32 },
|
||||
/*161*/ { BARCODE_DATAMATRIX, 26, "A", 14, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*162*/ { BARCODE_DATAMATRIX, 26, "\200", 8, 0, 8, 32 },
|
||||
/*163*/ { BARCODE_DATAMATRIX, 26, "\200", 9, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*164*/ { BARCODE_DATAMATRIX, 27, "1", 32, 0, 12, 26 },
|
||||
/*165*/ { BARCODE_DATAMATRIX, 27, "1", 33, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*166*/ { BARCODE_DATAMATRIX, 27, "A", 22, 0, 12, 26 },
|
||||
/*167*/ { BARCODE_DATAMATRIX, 27, "A", 23, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*168*/ { BARCODE_DATAMATRIX, 27, "\200", 14, 0, 12, 26 },
|
||||
/*169*/ { BARCODE_DATAMATRIX, 27, "\200", 15, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*170*/ { BARCODE_DATAMATRIX, 28, "1", 44, 0, 12, 36 },
|
||||
/*171*/ { BARCODE_DATAMATRIX, 28, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*172*/ { BARCODE_DATAMATRIX, 28, "A", 31, 0, 12, 36 },
|
||||
/*173*/ { BARCODE_DATAMATRIX, 28, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*174*/ { BARCODE_DATAMATRIX, 28, "\200", 20, 0, 12, 36 },
|
||||
/*175*/ { BARCODE_DATAMATRIX, 28, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*176*/ { BARCODE_DATAMATRIX, 29, "1", 64, 0, 16, 36 },
|
||||
/*177*/ { BARCODE_DATAMATRIX, 29, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*178*/ { BARCODE_DATAMATRIX, 29, "A", 46, 0, 16, 36 },
|
||||
/*179*/ { BARCODE_DATAMATRIX, 29, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*180*/ { BARCODE_DATAMATRIX, 29, "\200", 30, 0, 16, 36 },
|
||||
/*181*/ { BARCODE_DATAMATRIX, 29, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*182*/ { BARCODE_DATAMATRIX, 30, "1", 98, 0, 16, 48 },
|
||||
/*183*/ { BARCODE_DATAMATRIX, 30, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*184*/ { BARCODE_DATAMATRIX, 30, "A", 72, 0, 16, 48 },
|
||||
/*185*/ { BARCODE_DATAMATRIX, 30, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*186*/ { BARCODE_DATAMATRIX, 30, "\200", 47, 0, 16, 48 },
|
||||
/*187*/ { BARCODE_DATAMATRIX, 30, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*188*/ { BARCODE_DATAMATRIX, 31, "1", 36, 0, 8, 48 },
|
||||
/*189*/ { BARCODE_DATAMATRIX, 31, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*190*/ { BARCODE_DATAMATRIX, 31, "A", 25, 0, 8, 48 },
|
||||
/*191*/ { BARCODE_DATAMATRIX, 31, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*192*/ { BARCODE_DATAMATRIX, 31, "\200", 16, 0, 8, 48 },
|
||||
/*193*/ { BARCODE_DATAMATRIX, 31, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*194*/ { BARCODE_DATAMATRIX, 32, "1", 48, 0, 8, 64 },
|
||||
/*195*/ { BARCODE_DATAMATRIX, 32, "1", 49, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*196*/ { BARCODE_DATAMATRIX, 32, "A", 34, 0, 8, 64 },
|
||||
/*197*/ { BARCODE_DATAMATRIX, 32, "A", 35, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*198*/ { BARCODE_DATAMATRIX, 32, "\200", 22, 0, 8, 64 },
|
||||
/*199*/ { BARCODE_DATAMATRIX, 32, "\200", 23, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*200*/ { BARCODE_DATAMATRIX, 33, "1", 64, 0, 8, 80 },
|
||||
/*201*/ { BARCODE_DATAMATRIX, 33, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*202*/ { BARCODE_DATAMATRIX, 33, "A", 46, 0, 8, 80 },
|
||||
/*203*/ { BARCODE_DATAMATRIX, 33, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*204*/ { BARCODE_DATAMATRIX, 33, "\200", 30, 0, 8, 80 },
|
||||
/*205*/ { BARCODE_DATAMATRIX, 33, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*206*/ { BARCODE_DATAMATRIX, 34, "1", 76, 0, 8, 96 },
|
||||
/*207*/ { BARCODE_DATAMATRIX, 34, "1", 77, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*208*/ { BARCODE_DATAMATRIX, 34, "A", 55, 0, 8, 96 },
|
||||
/*209*/ { BARCODE_DATAMATRIX, 34, "A", 56, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*210*/ { BARCODE_DATAMATRIX, 34, "\200", 36, 0, 8, 96 },
|
||||
/*211*/ { BARCODE_DATAMATRIX, 34, "\200", 37, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*212*/ { BARCODE_DATAMATRIX, 35, "1", 98, 0, 8, 120 },
|
||||
/*213*/ { BARCODE_DATAMATRIX, 35, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*214*/ { BARCODE_DATAMATRIX, 35, "A", 72, 0, 8, 120 },
|
||||
/*215*/ { BARCODE_DATAMATRIX, 35, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*216*/ { BARCODE_DATAMATRIX, 35, "\200", 47, 0, 8, 120 },
|
||||
/*217*/ { BARCODE_DATAMATRIX, 35, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*218*/ { BARCODE_DATAMATRIX, 36, "1", 126, 0, 8, 144 },
|
||||
/*219*/ { BARCODE_DATAMATRIX, 36, "1", 127, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*220*/ { BARCODE_DATAMATRIX, 36, "A", 93, 0, 8, 144 },
|
||||
/*221*/ { BARCODE_DATAMATRIX, 36, "A", 94, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*222*/ { BARCODE_DATAMATRIX, 36, "\200", 61, 0, 8, 144 },
|
||||
/*223*/ { BARCODE_DATAMATRIX, 36, "\200", 62, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*224*/ { BARCODE_DATAMATRIX, 37, "1", 86, 0, 12, 64 },
|
||||
/*225*/ { BARCODE_DATAMATRIX, 37, "1", 87, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*226*/ { BARCODE_DATAMATRIX, 37, "A", 63, 0, 12, 64 },
|
||||
/*227*/ { BARCODE_DATAMATRIX, 37, "A", 64, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*228*/ { BARCODE_DATAMATRIX, 37, "\200", 41, 0, 12, 64 },
|
||||
/*229*/ { BARCODE_DATAMATRIX, 37, "\200", 42, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*230*/ { BARCODE_DATAMATRIX, 38, "1", 128, 0, 12, 88 },
|
||||
/*231*/ { BARCODE_DATAMATRIX, 38, "1", 129, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*232*/ { BARCODE_DATAMATRIX, 38, "A", 94, 0, 12, 88 },
|
||||
/*233*/ { BARCODE_DATAMATRIX, 38, "A", 95, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*234*/ { BARCODE_DATAMATRIX, 38, "\200", 62, 0, 12, 88 },
|
||||
/*235*/ { BARCODE_DATAMATRIX, 38, "\200", 63, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*236*/ { BARCODE_DATAMATRIX, 39, "1", 124, 0, 16, 64 },
|
||||
/*237*/ { BARCODE_DATAMATRIX, 39, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*238*/ { BARCODE_DATAMATRIX, 39, "A", 91, 0, 16, 64 },
|
||||
/*239*/ { BARCODE_DATAMATRIX, 39, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*240*/ { BARCODE_DATAMATRIX, 39, "\200", 60, 0, 16, 64 },
|
||||
/*241*/ { BARCODE_DATAMATRIX, 39, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*242*/ { BARCODE_DATAMATRIX, 40, "1", 88, 0, 20, 36 },
|
||||
/*243*/ { BARCODE_DATAMATRIX, 40, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*244*/ { BARCODE_DATAMATRIX, 40, "A", 64, 0, 20, 36 },
|
||||
/*245*/ { BARCODE_DATAMATRIX, 40, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*246*/ { BARCODE_DATAMATRIX, 40, "\200", 42, 0, 20, 36 },
|
||||
/*247*/ { BARCODE_DATAMATRIX, 40, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*248*/ { BARCODE_DATAMATRIX, 41, "1", 112, 0, 20, 44 },
|
||||
/*249*/ { BARCODE_DATAMATRIX, 41, "1", 113, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*250*/ { BARCODE_DATAMATRIX, 41, "A", 82, 0, 20, 44 },
|
||||
/*251*/ { BARCODE_DATAMATRIX, 41, "A", 83, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*252*/ { BARCODE_DATAMATRIX, 41, "\200", 54, 0, 20, 44 },
|
||||
/*253*/ { BARCODE_DATAMATRIX, 41, "\200", 55, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*254*/ { BARCODE_DATAMATRIX, 42, "1", 168, 0, 20, 64 }, // Spec says 186 but typo
|
||||
/*255*/ { BARCODE_DATAMATRIX, 42, "1", 169, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*256*/ { BARCODE_DATAMATRIX, 42, "A", 124, 0, 20, 64 },
|
||||
/*257*/ { BARCODE_DATAMATRIX, 42, "A", 125, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*258*/ { BARCODE_DATAMATRIX, 42, "\200", 82, 0, 20, 64 },
|
||||
/*259*/ { BARCODE_DATAMATRIX, 42, "\200", 83, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*260*/ { BARCODE_DATAMATRIX, 43, "1", 144, 0, 22, 48 },
|
||||
/*261*/ { BARCODE_DATAMATRIX, 43, "1", 145, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*262*/ { BARCODE_DATAMATRIX, 43, "A", 106, 0, 22, 48 },
|
||||
/*263*/ { BARCODE_DATAMATRIX, 43, "A", 107, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*264*/ { BARCODE_DATAMATRIX, 43, "\200", 70, 0, 22, 48 },
|
||||
/*265*/ { BARCODE_DATAMATRIX, 43, "\200", 71, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*266*/ { BARCODE_DATAMATRIX, 44, "1", 160, 0, 24, 48 },
|
||||
/*267*/ { BARCODE_DATAMATRIX, 44, "1", 161, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*268*/ { BARCODE_DATAMATRIX, 44, "A", 118, 0, 24, 48 },
|
||||
/*269*/ { BARCODE_DATAMATRIX, 44, "A", 119, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*270*/ { BARCODE_DATAMATRIX, 44, "\200", 78, 0, 24, 48 },
|
||||
/*271*/ { BARCODE_DATAMATRIX, 44, "\200", 79, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*272*/ { BARCODE_DATAMATRIX, 45, "1", 216, 0, 24, 64 },
|
||||
/*273*/ { BARCODE_DATAMATRIX, 45, "1", 217, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*274*/ { BARCODE_DATAMATRIX, 45, "A", 160, 0, 24, 64 },
|
||||
/*275*/ { BARCODE_DATAMATRIX, 45, "A", 161, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*276*/ { BARCODE_DATAMATRIX, 45, "\200", 106, 0, 24, 64 },
|
||||
/*277*/ { BARCODE_DATAMATRIX, 45, "\200", 107, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*278*/ { BARCODE_DATAMATRIX, 46, "1", 140, 0, 26, 40 },
|
||||
/*279*/ { BARCODE_DATAMATRIX, 46, "1", 141, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*280*/ { BARCODE_DATAMATRIX, 46, "A", 103, 0, 26, 40 },
|
||||
/*281*/ { BARCODE_DATAMATRIX, 46, "A", 104, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*282*/ { BARCODE_DATAMATRIX, 46, "\200", 68, 0, 26, 40 },
|
||||
/*283*/ { BARCODE_DATAMATRIX, 46, "\200", 69, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*284*/ { BARCODE_DATAMATRIX, 47, "1", 180, 0, 26, 48 },
|
||||
/*285*/ { BARCODE_DATAMATRIX, 47, "1", 181, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*286*/ { BARCODE_DATAMATRIX, 47, "A", 133, 0, 26, 48 },
|
||||
/*287*/ { BARCODE_DATAMATRIX, 47, "A", 134, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*288*/ { BARCODE_DATAMATRIX, 47, "\200", 88, 0, 26, 48 },
|
||||
/*289*/ { BARCODE_DATAMATRIX, 47, "\200", 89, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*290*/ { BARCODE_DATAMATRIX, 48, "1", 236, 0, 26, 64 },
|
||||
/*291*/ { BARCODE_DATAMATRIX, 48, "1", 237, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*292*/ { BARCODE_DATAMATRIX, 48, "A", 175, 0, 26, 64 },
|
||||
/*293*/ { BARCODE_DATAMATRIX, 48, "A", 176, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*294*/ { BARCODE_DATAMATRIX, 48, "\200", 116, 0, 26, 64 },
|
||||
/*295*/ { BARCODE_DATAMATRIX, 48, "\200", 117, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 0*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "1", 3116, 0, 144, 144 },
|
||||
/* 1*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "1", 3117, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 2*/ { BARCODE_DATAMATRIX, -1, { 1, 2, "001001"}, "1", 3108, 0, 144, 144 }, // Structured Append 4 codewords overhead == 8 digits
|
||||
/* 3*/ { BARCODE_DATAMATRIX, -1, { 1, 2, "001001"}, "1", 3109, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 4*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "A", 2335, 0, 144, 144 },
|
||||
/* 5*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "A", 2336, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 6*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "\200", 1556, 0, 144, 144 }, // Spec says 1555 but 1556 correct as only single byte count of 0 required
|
||||
/* 7*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "\200", 1557, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 8*/ { BARCODE_HIBC_DM, -1, { 0, 0, "" }, "1", 110, 0, 32, 32 },
|
||||
/* 9*/ { BARCODE_HIBC_DM, -1, { 0, 0, "" }, "1", 111, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 10*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "1", 6, 0, 10, 10 },
|
||||
/* 11*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "1", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 12*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "A", 3, 0, 10, 10 },
|
||||
/* 13*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "A", 4, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 14*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "\200", 1, 0, 10, 10 },
|
||||
/* 15*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "\200", 2, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 16*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "1", 10, 0, 12, 12 },
|
||||
/* 17*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 18*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "A", 6, 0, 12, 12 },
|
||||
/* 19*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 20*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "\200", 3, 0, 12, 12 },
|
||||
/* 21*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 22*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "1", 16, 0, 14, 14 },
|
||||
/* 23*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "1", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 24*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "A", 10, 0, 14, 14 },
|
||||
/* 25*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "A", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 26*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "\200", 6, 0, 14, 14 },
|
||||
/* 27*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "\200", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 28*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "1", 24, 0, 16, 16 },
|
||||
/* 29*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "1", 25, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 30*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "A", 16, 0, 16, 16 },
|
||||
/* 31*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "A", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 32*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "\200", 10, 0, 16, 16 },
|
||||
/* 33*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "\200", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 34*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "1", 36, 0, 18, 18 },
|
||||
/* 35*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 36*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "A", 25, 0, 18, 18 },
|
||||
/* 37*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 38*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "\200", 16, 0, 18, 18 },
|
||||
/* 39*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 40*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "1", 44, 0, 20, 20 },
|
||||
/* 41*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 42*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "A", 31, 0, 20, 20 },
|
||||
/* 43*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 44*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "\200", 20, 0, 20, 20 },
|
||||
/* 45*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 46*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "1", 60, 0, 22, 22 },
|
||||
/* 47*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "1", 61, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 48*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "A", 43, 0, 22, 22 },
|
||||
/* 49*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "A", 44, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 50*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "\200", 28, 0, 22, 22 },
|
||||
/* 51*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "\200", 29, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 52*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "1", 72, 0, 24, 24 },
|
||||
/* 53*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "1", 73, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 54*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "A", 52, 0, 24, 24 },
|
||||
/* 55*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "A", 53, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 56*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "\200", 34, 0, 24, 24 },
|
||||
/* 57*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "\200", 35, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 58*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "1", 88, 0, 26, 26 },
|
||||
/* 59*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 60*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "A", 64, 0, 26, 26 },
|
||||
/* 61*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 62*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "\200", 42, 0, 26, 26 },
|
||||
/* 63*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 64*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "1", 124, 0, 32, 32 },
|
||||
/* 65*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 66*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "A", 91, 0, 32, 32 },
|
||||
/* 67*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 68*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "\200", 60, 0, 32, 32 },
|
||||
/* 69*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 70*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "1", 172, 0, 36, 36 },
|
||||
/* 71*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "1", 173, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 72*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "A", 127, 0, 36, 36 },
|
||||
/* 73*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "A", 128, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 74*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "\200", 84, 0, 36, 36 },
|
||||
/* 75*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "\200", 85, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 76*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "1", 228, 0, 40, 40 },
|
||||
/* 77*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "1", 229, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 78*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "A", 169, 0, 40, 40 },
|
||||
/* 79*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "A", 170, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 80*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "\200", 112, 0, 40, 40 },
|
||||
/* 81*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "\200", 113, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 82*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "1", 288, 0, 44, 44 },
|
||||
/* 83*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "1", 289, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 84*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "A", 214, 0, 44, 44 },
|
||||
/* 85*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "A", 215, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 86*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "\200", 142, 0, 44, 44 },
|
||||
/* 87*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "\200", 143, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 88*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "1", 348, 0, 48, 48 },
|
||||
/* 89*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "1", 349, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 90*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "A", 259, 0, 48, 48 },
|
||||
/* 91*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "A", 260, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 92*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "\200", 172, 0, 48, 48 },
|
||||
/* 93*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "\200", 173, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 94*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "1", 408, 0, 52, 52 },
|
||||
/* 95*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "1", 409, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 96*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "A", 304, 0, 52, 52 },
|
||||
/* 97*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "A", 305, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 98*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "\200", 202, 0, 52, 52 },
|
||||
/* 99*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "\200", 203, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*100*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "1", 560, 0, 64, 64 },
|
||||
/*101*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "1", 561, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*102*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "A", 418, 0, 64, 64 },
|
||||
/*103*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "A", 419, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*104*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "\200", 278, 0, 64, 64 }, // Spec says 277 but 278 correct as only single byte count of 0 required
|
||||
/*105*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "\200", 279, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*106*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "1", 736, 0, 72, 72 },
|
||||
/*107*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "1", 737, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*108*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "A", 550, 0, 72, 72 },
|
||||
/*109*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "A", 551, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*110*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "\200", 366, 0, 72, 72 }, // Spec says 365 but 366 correct as only single byte count of 0 required
|
||||
/*111*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "\200", 367, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*112*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "1", 912, 0, 80, 80 },
|
||||
/*113*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "1", 913, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*114*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "A", 682, 0, 80, 80 },
|
||||
/*115*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "A", 683, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*116*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "\200", 454, 0, 80, 80 }, // Spec says 453 but 454 correct as only single byte count of 0 required
|
||||
/*117*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "\200", 455, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*118*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "1", 1152, 0, 88, 88 },
|
||||
/*119*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "1", 1153, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*120*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "A", 862, 0, 88, 88 },
|
||||
/*121*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "A", 863, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*122*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "\200", 574, 0, 88, 88 }, // Spec says 573 but 574 correct as only single byte count of 0 required
|
||||
/*123*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "\200", 575, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*124*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "1", 1392, 0, 96, 96 },
|
||||
/*125*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "1", 1393, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*126*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "A", 1042, 0, 96, 96 },
|
||||
/*127*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "A", 1043, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*128*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "\200", 694, 0, 96, 96 }, // Spec says 693 but 694 correct as only single byte count of 0 required
|
||||
/*129*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "\200", 695, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*130*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "1", 1632, 0, 104, 104 },
|
||||
/*131*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "1", 1633, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*132*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "A", 1222, 0, 104, 104 },
|
||||
/*133*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "A", 1223, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*134*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "\200", 814, 0, 104, 104 }, // Spec says 813 but 814 correct as only single byte count of 0 required
|
||||
/*135*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "\200", 815, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*136*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "1", 2100, 0, 120, 120 },
|
||||
/*137*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "1", 2101, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*138*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "A", 1573, 0, 120, 120 },
|
||||
/*139*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "A", 1574, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*140*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "\200", 1048, 0, 120, 120 }, // Spec says 1047 but 1048 correct as only single byte count of 0 required
|
||||
/*141*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "\200", 1049, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*142*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "1", 2608, 0, 132, 132 },
|
||||
/*143*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "1", 2609, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*144*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "A", 1954, 0, 132, 132 },
|
||||
/*145*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "A", 1955, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*146*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "\200", 1302, 0, 132, 132 }, // Spec says 1301 but 1302 correct as only single byte count of 0 required
|
||||
/*147*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "\200", 1303, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*148*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "1", 3116, 0, 144, 144 },
|
||||
/*149*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "1", 3117, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*150*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "A", 2335, 0, 144, 144 },
|
||||
/*151*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "A", 2336, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*152*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "\200", 1556, 0, 144, 144 }, // Spec says 1555 but 1556 correct as only single byte count of 0 required
|
||||
/*153*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "\200", 1557, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*154*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "1", 10, 0, 8, 18 },
|
||||
/*155*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*156*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "A", 6, 0, 8, 18 },
|
||||
/*157*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*158*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "\200", 3, 0, 8, 18 },
|
||||
/*159*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*160*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "1", 20, 0, 8, 32 },
|
||||
/*161*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "1", 21, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*162*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "A", 13, 0, 8, 32 },
|
||||
/*163*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "A", 14, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*164*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "\200", 8, 0, 8, 32 },
|
||||
/*165*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "\200", 9, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*166*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "1", 32, 0, 12, 26 },
|
||||
/*167*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "1", 33, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*168*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "A", 22, 0, 12, 26 },
|
||||
/*169*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "A", 23, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*170*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "\200", 14, 0, 12, 26 },
|
||||
/*171*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "\200", 15, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*172*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "1", 44, 0, 12, 36 },
|
||||
/*173*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*174*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "A", 31, 0, 12, 36 },
|
||||
/*175*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*176*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "\200", 20, 0, 12, 36 },
|
||||
/*177*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*178*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "1", 64, 0, 16, 36 },
|
||||
/*179*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*180*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "A", 46, 0, 16, 36 },
|
||||
/*181*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*182*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "\200", 30, 0, 16, 36 },
|
||||
/*183*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*184*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "1", 98, 0, 16, 48 },
|
||||
/*185*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*186*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "A", 72, 0, 16, 48 },
|
||||
/*187*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*188*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "\200", 47, 0, 16, 48 },
|
||||
/*189*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*190*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "1", 36, 0, 8, 48 },
|
||||
/*191*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*192*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "A", 25, 0, 8, 48 },
|
||||
/*193*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*194*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "\200", 16, 0, 8, 48 },
|
||||
/*195*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*196*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "1", 48, 0, 8, 64 },
|
||||
/*197*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "1", 49, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*198*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "A", 34, 0, 8, 64 },
|
||||
/*199*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "A", 35, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*200*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "\200", 22, 0, 8, 64 },
|
||||
/*201*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "\200", 23, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*202*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "1", 64, 0, 8, 80 },
|
||||
/*203*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*204*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "A", 46, 0, 8, 80 },
|
||||
/*205*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*206*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "\200", 30, 0, 8, 80 },
|
||||
/*207*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*208*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "1", 76, 0, 8, 96 },
|
||||
/*209*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "1", 77, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*210*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "A", 55, 0, 8, 96 },
|
||||
/*211*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "A", 56, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*212*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "\200", 36, 0, 8, 96 },
|
||||
/*213*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "\200", 37, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*214*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "1", 98, 0, 8, 120 },
|
||||
/*215*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*216*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "A", 72, 0, 8, 120 },
|
||||
/*217*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*218*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "\200", 47, 0, 8, 120 },
|
||||
/*219*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*220*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "1", 126, 0, 8, 144 },
|
||||
/*221*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "1", 127, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*222*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "A", 93, 0, 8, 144 },
|
||||
/*223*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "A", 94, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*224*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "\200", 61, 0, 8, 144 },
|
||||
/*225*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "\200", 62, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*226*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "1", 86, 0, 12, 64 },
|
||||
/*227*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "1", 87, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*228*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "A", 63, 0, 12, 64 },
|
||||
/*229*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "A", 64, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*230*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "\200", 41, 0, 12, 64 },
|
||||
/*231*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "\200", 42, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*232*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "1", 128, 0, 12, 88 },
|
||||
/*233*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "1", 129, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*234*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "A", 94, 0, 12, 88 },
|
||||
/*235*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "A", 95, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*236*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "\200", 62, 0, 12, 88 },
|
||||
/*237*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "\200", 63, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*238*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "1", 124, 0, 16, 64 },
|
||||
/*239*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*240*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "A", 91, 0, 16, 64 },
|
||||
/*241*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*242*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "\200", 60, 0, 16, 64 },
|
||||
/*243*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*244*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "1", 88, 0, 20, 36 },
|
||||
/*245*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*246*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "A", 64, 0, 20, 36 },
|
||||
/*247*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*248*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "\200", 42, 0, 20, 36 },
|
||||
/*249*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*250*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "1", 112, 0, 20, 44 },
|
||||
/*251*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "1", 113, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*252*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "A", 82, 0, 20, 44 },
|
||||
/*253*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "A", 83, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*254*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "\200", 54, 0, 20, 44 },
|
||||
/*255*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "\200", 55, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*256*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "1", 168, 0, 20, 64 }, // Spec says 186 but typo
|
||||
/*257*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "1", 169, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*258*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "A", 124, 0, 20, 64 },
|
||||
/*259*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "A", 125, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*260*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "\200", 82, 0, 20, 64 },
|
||||
/*261*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "\200", 83, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*262*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "1", 144, 0, 22, 48 },
|
||||
/*263*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "1", 145, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*264*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "A", 106, 0, 22, 48 },
|
||||
/*265*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "A", 107, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*266*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "\200", 70, 0, 22, 48 },
|
||||
/*267*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "\200", 71, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*268*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "1", 160, 0, 24, 48 },
|
||||
/*269*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "1", 161, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*270*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "A", 118, 0, 24, 48 },
|
||||
/*271*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "A", 119, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*272*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "\200", 78, 0, 24, 48 },
|
||||
/*273*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "\200", 79, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*274*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "1", 216, 0, 24, 64 },
|
||||
/*275*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "1", 217, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*276*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "A", 160, 0, 24, 64 },
|
||||
/*277*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "A", 161, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*278*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "\200", 106, 0, 24, 64 },
|
||||
/*279*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "\200", 107, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*280*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "1", 140, 0, 26, 40 },
|
||||
/*281*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "1", 141, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*282*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "A", 103, 0, 26, 40 },
|
||||
/*283*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "A", 104, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*284*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "\200", 68, 0, 26, 40 },
|
||||
/*285*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "\200", 69, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*286*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "1", 180, 0, 26, 48 },
|
||||
/*287*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "1", 181, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*288*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "A", 133, 0, 26, 48 },
|
||||
/*289*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "A", 134, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*290*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "\200", 88, 0, 26, 48 },
|
||||
/*291*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "\200", 89, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*292*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "1", 236, 0, 26, 64 },
|
||||
/*293*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "1", 237, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*294*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "A", 175, 0, 26, 64 },
|
||||
/*295*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "A", 176, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/*296*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "\200", 116, 0, 26, 64 },
|
||||
/*297*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "\200", 117, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -361,6 +364,9 @@ static void test_large(int index, int debug) {
|
||||
assert_equal(data[i].length, (int) strlen(data_buf), "i:%d length %d != strlen(data_buf) %d\n", i, data[i].length, (int) strlen(data_buf));
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data_buf, data[i].length, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
@ -424,27 +430,47 @@ static void test_options(int index, int debug) {
|
||||
int option_1;
|
||||
int option_2;
|
||||
int option_3;
|
||||
int output_options;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
const char *expected_errtxt;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, "1", 0, 10, 10 },
|
||||
/* 1*/ { BARCODE_DATAMATRIX, -1, 2, -1, -1, "1", ZINT_ERROR_INVALID_OPTION, -1, -1 },
|
||||
/* 2*/ { BARCODE_DATAMATRIX, -1, -1, 1, -1, "1", 0, 10, 10 },
|
||||
/* 3*/ { BARCODE_DATAMATRIX, -1, -1, 2, -1, "1", 0, 12, 12 },
|
||||
/* 4*/ { BARCODE_DATAMATRIX, -1, -1, 48, -1, "1", 0, 26, 64 },
|
||||
/* 5*/ { BARCODE_DATAMATRIX, -1, -1, 49, -1, "1", 0, 10, 10 }, // Ignored
|
||||
/* 6*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, "ABCDEFGHIJK", 0, 8, 32 },
|
||||
/* 7*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, "ABCDEFGHIJK", 0, 16, 16 },
|
||||
/* 8*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 32, 32 },
|
||||
/* 9*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 20, 44 },
|
||||
/* 10*/ { BARCODE_DATAMATRIX, -1, -1, -1, 9999, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 32, 32 }, // Ignored
|
||||
/* 11*/ { BARCODE_DATAMATRIX, GS1_MODE, -1, -1, -1, "[90]12", 0, 10, 10 },
|
||||
/* 12*/ { BARCODE_DATAMATRIX, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, "(90)12", 0, 10, 10 },
|
||||
/* 0*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "1", 0, 10, 10, "" },
|
||||
/* 1*/ { BARCODE_DATAMATRIX, -1, 2, -1, -1, -1, { 0, 0, "" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 524: Older Data Matrix standards are no longer supported" },
|
||||
/* 2*/ { BARCODE_DATAMATRIX, -1, -1, 1, -1, -1, { 0, 0, "" }, "1", 0, 10, 10, "" },
|
||||
/* 3*/ { BARCODE_DATAMATRIX, -1, -1, 2, -1, -1, { 0, 0, "" }, "1", 0, 12, 12, "" },
|
||||
/* 4*/ { BARCODE_DATAMATRIX, -1, -1, 48, -1, -1, { 0, 0, "" }, "1", 0, 26, 64, "" },
|
||||
/* 5*/ { BARCODE_DATAMATRIX, -1, -1, 49, -1, -1, { 0, 0, "" }, "1", 0, 10, 10, "" }, // Ignored
|
||||
/* 6*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJK", 0, 8, 32, "" },
|
||||
/* 7*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "ABCDEFGHIJK", 0, 16, 16, "" },
|
||||
/* 8*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 32, 32, "" },
|
||||
/* 9*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 20, 44, "" },
|
||||
/* 10*/ { BARCODE_DATAMATRIX, -1, -1, -1, 9999, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 32, 32, "" }, // Ignored
|
||||
/* 11*/ { BARCODE_DATAMATRIX, GS1_MODE, -1, -1, -1, -1, { 0, 0, "" }, "[90]12", 0, 10, 10, "" },
|
||||
/* 12*/ { BARCODE_DATAMATRIX, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(90)12", 0, 10, 10, "" },
|
||||
/* 13*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 1, 2, "" }, "1", 0, 12, 12, "" },
|
||||
/* 14*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 16, 16, "" }, "1", 0, 12, 12, "" },
|
||||
/* 15*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 1, 1, "" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 720: Structured Append count out of range (2-16)" },
|
||||
/* 16*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 1, 17, "" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 720: Structured Append count out of range (2-16)" },
|
||||
/* 17*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 16, "" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 721: Structured Append index out of range (1-16)" },
|
||||
/* 18*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 17, 16, "" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 721: Structured Append index out of range (1-16)" },
|
||||
/* 19*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "1001" }, "1", 0, 12, 12, "" },
|
||||
/* 20*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "A" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 723: Invalid Structured Append ID (digits only)" },
|
||||
/* 21*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "0" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 724: Structured Append ID1 '000' and ID2 '000' out of range (001-254) (ID '000000')" },
|
||||
/* 22*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "1" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 725: Structured Append ID1 '000' out of range (001-254) (ID '000001')" },
|
||||
/* 23*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "1000" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 726: Structured Append ID2 '000' out of range (001-254) (ID '001000')" },
|
||||
/* 24*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "001255" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 726: Structured Append ID2 '255' out of range (001-254) (ID '001255')" },
|
||||
/* 25*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "255001" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 725: Structured Append ID1 '255' out of range (001-254) (ID '255001')" },
|
||||
/* 26*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "255255" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 724: Structured Append ID1 '255' and ID2 '255' out of range (001-254) (ID '255255')" },
|
||||
/* 27*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "1234567" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 722: Structured Append ID too long (6 digit maximum)" },
|
||||
/* 28*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, READER_INIT, { 2, 3, "1001" }, "1", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 727: Cannot have Structured Append and Reader Initialisation at the same time" },
|
||||
/* 29*/ { BARCODE_DATAMATRIX, ESCAPE_MODE, -1, -1, -1, -1, { 2, 3, "1001" }, "[)>\\R05\\GA\\R\\E", 0, 12, 26, "" }, // Macro05/06 ignored if have Structured Append TODO: error/warning
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -459,7 +485,10 @@ static void test_options(int index, int debug) {
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, data[i].option_3, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, data[i].option_3, data[i].output_options, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
@ -468,6 +497,7 @@ static void test_options(int index, int debug) {
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, symbol->errtxt);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, symbol->errtxt);
|
||||
}
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d symbol->errtxt %s != %s\n", i, symbol->errtxt, data[i].expected_errtxt);
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
}
|
||||
|
@ -83,25 +83,33 @@ static void test_options(int index, int debug) {
|
||||
int output_options;
|
||||
int option_2;
|
||||
int option_3;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
const char *expected_errtxt;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { -1, -1, -1, -1, "1", 0, 9, 14 },
|
||||
/* 1*/ { -1, -1, -1, -1, "1234567890", 0, 12, 19 },
|
||||
/* 2*/ { -1, -1, 19, -1, "1234567890", 0, 12, 19 },
|
||||
/* 3*/ { -1, -1, 12, -1, "1234567890", 0, 19, 12 },
|
||||
/* 4*/ { -1, -1, 5, -1, "1234567890", 0, 44, 5 },
|
||||
/* 5*/ { -1, -1, 4, -1, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 }, // Cols < 5
|
||||
/* 6*/ { -1, -1, 200, -1, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 }, // Not enough data - height 3 too small
|
||||
/* 7*/ { -1, -1, 200, -1, "1234567890123456789012345678901234567890", 0, 5, 200 }, // Cols 200 max
|
||||
/* 8*/ { -1, -1, 200, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 7, 200 },
|
||||
/* 9*/ { -1, -1, 201, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 },
|
||||
/* 10*/ { -1, -1, -1, 10 << 8, "1", 0, 9, 14 }, // Mask > 8 + 1 ignored
|
||||
/* 0*/ { -1, -1, -1, -1, { 0, 0, "" }, "1", 0, 9, 14, "" },
|
||||
/* 1*/ { -1, -1, -1, -1, { 0, 0, "" }, "1234567890", 0, 12, 19, "" },
|
||||
/* 2*/ { -1, -1, 19, -1, { 0, 0, "" }, "1234567890", 0, 12, 19, "" },
|
||||
/* 3*/ { -1, -1, 12, -1, { 0, 0, "" }, "1234567890", 0, 19, 12, "" },
|
||||
/* 4*/ { -1, -1, 5, -1, { 0, 0, "" }, "1234567890", 0, 44, 5, "" },
|
||||
/* 5*/ { -1, -1, 4, -1, { 0, 0, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 529: Symbol width 4 is too small" }, // Cols < 5
|
||||
/* 6*/ { -1, -1, 200, -1, { 0, 0, "" }, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 529: Symbol height 3 is too small" }, // Not enough data - height 3 too small
|
||||
/* 7*/ { -1, -1, 200, -1, { 0, 0, "" }, "1234567890123456789012345678901234567890", 0, 5, 200, "" }, // Cols 200 max
|
||||
/* 8*/ { -1, -1, 200, -1, { 0, 0, "" }, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 7, 200, "" },
|
||||
/* 9*/ { -1, -1, 201, -1, { 0, 0, "" }, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 528: Symbol width 201 is too large" },
|
||||
/* 10*/ { -1, -1, -1, 10 << 8, { 0, 0, "" }, "1", 0, 9, 14, "" }, // Mask > 8 + 1 ignored
|
||||
/* 11*/ { -1, -1, 19, -1, { 0, 0, "" }, "ABCDE", 0, 12, 19, "" },
|
||||
/* 12*/ { -1, -1, 19, -1, { 35, 35, "" }, "ABCDE", 0, 16, 19, "" },
|
||||
/* 13*/ { -1, -1, 19, -1, { 1, 1, "" }, "ABCDE", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 730: Structured Append count out of range (2-35)" },
|
||||
/* 14*/ { -1, -1, 19, -1, { 1, 36, "" }, "ABCDE", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 730: Structured Append count out of range (2-35)" },
|
||||
/* 15*/ { -1, -1, 19, -1, { 3, 2, "" }, "ABCDE", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 731: Structured Append index out of range (1-2)" },
|
||||
/* 16*/ { -1, -1, 19, -1, { 1, 2, "1" }, "ABCDE", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 732: Structured Append ID not available for DotCode" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -117,6 +125,9 @@ static void test_options(int index, int debug) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DOTCODE, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, data[i].option_3, data[i].output_options, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
@ -125,6 +136,7 @@ static void test_options(int index, int debug) {
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, symbol->errtxt);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, 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);
|
||||
}
|
||||
@ -137,6 +149,7 @@ static void test_input(int index, int generate, int debug) {
|
||||
struct item {
|
||||
int input_mode;
|
||||
int eci;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int length;
|
||||
int ret;
|
||||
@ -144,44 +157,48 @@ static void test_input(int index, int generate, int debug) {
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { UNICODE_MODE, -1, "A", -1, 0, "66 21", "" },
|
||||
/* 1*/ { UNICODE_MODE, 3, "A", -1, 0, "6C 03 66 21", "" },
|
||||
/* 2*/ { UNICODE_MODE, 40, "A", -1, 0, "6C 28 00 00 66 21", "" },
|
||||
/* 3*/ { UNICODE_MODE, 113, "A", -1, 0, "6C 28 00 49 66 21", "" },
|
||||
/* 4*/ { UNICODE_MODE, 899, "A", -1, 0, "6C 28 07 44 66 21", "" },
|
||||
/* 5*/ { UNICODE_MODE, 12769, "A", -1, 0, "6C 28 70 49 66 21", "" },
|
||||
/* 6*/ { UNICODE_MODE, 811799, "A", -1, 0, "6C 67 40 50 66 21", "" },
|
||||
/* 7*/ { UNICODE_MODE, 811800, "A", -1, ZINT_ERROR_INVALID_OPTION, "", "" },
|
||||
/* 8*/ { UNICODE_MODE, -1, "\000", 1, 0, "65 40", "LatchA (0x65) NUL" },
|
||||
/* 9*/ { UNICODE_MODE, -1, "\010", -1, 0, "65 48", "LatchA (0x65) BS" },
|
||||
/* 10*/ { UNICODE_MODE, -1, "\011", -1, 0, "65 49", "Lead special; LatchA (0x65) HT" },
|
||||
/* 11*/ { UNICODE_MODE, -1, "\034", -1, 0, "65 5C", "Lead special; LatchA (0x65) FS" },
|
||||
/* 12*/ { UNICODE_MODE, -1, "\035", -1, 0, "65 5D", "Lead special; LatchA (0x65) GS" },
|
||||
/* 13*/ { UNICODE_MODE, -1, "\036", -1, 0, "65 5E", "Lead special; LatchA (0x65) RS" },
|
||||
/* 14*/ { UNICODE_MODE, -1, "\037", -1, 0, "65 5F", "LatchA (0x65) US" },
|
||||
/* 15*/ { UNICODE_MODE, -1, "\177", -1, 0, "66 5F", "ShiftB (0x66) DEL" },
|
||||
/* 16*/ { UNICODE_MODE, -1, "[)>\03605\035A\036\004", -1, 0, "6A 61 21", "[)>RS 05 GS A RS EOT; LatchB (0x6A) Macro97 (0x61) A" },
|
||||
/* 17*/ { UNICODE_MODE, -1, "[)>\03606\035\011\034\035\036\036\004", -1, 0, "6A 62 61 62 63 64", "[)>RS 06 GS HT FS GS RS RS EOT; LatchB (0x6A) Macro98 (0x62) HT FS GS RS" },
|
||||
/* 18*/ { UNICODE_MODE, -1, "[)>\03612\03512345\036\004", -1, 0, "6A 63 11 67 17 2D", "[)>RS 12 GS A RS EOT; LatchB (0x6A) Macro99 (0x63) 1 2xShiftC (0x67) 23 45" },
|
||||
/* 19*/ { UNICODE_MODE, -1, "[)>\03601Blah\004", -1, 0, "6A 64 10 11 22 4C 41 48", "[)>RS 01 Blah EOT; LatchB (0x6A) Macro100 (0x64) 0 1 B l a h" },
|
||||
/* 20*/ { UNICODE_MODE, -1, "[)>\03605\035A\004", -1, 0, "6A 64 10 15 63 21", "[)>RS 05 GS A EOT; LatchB (0x6A) Macro100 (0x64) 0 5 HT A" },
|
||||
/* 21*/ { UNICODE_MODE, -1, "[)>\03606A\004", -1, 0, "6A 64 10 16 21", "[)>RS 06 A EOT; LatchB (0x6A) Macro100 (0x64) 0 6 A" },
|
||||
/* 22*/ { UNICODE_MODE, -1, "[)>\036991\036\004", -1, 0, "6A 64 19 19 11 64", "[)>RS 99 1 RS EOT; LatchB (0x6A) Macro100 (0x64) 9 9 1 RS" },
|
||||
/* 23*/ { UNICODE_MODE, -1, "1712345610", -1, 0, "6B 64 0C 22 38", "FNC1 (0x6B) 17..10 12 34 56" },
|
||||
/* 24*/ { GS1_MODE, -1, "[17]123456[10]123", -1, ZINT_WARN_NONCOMPLIANT, "64 0C 22 38 0C 66 13", "17..10 12 34 56 12 ShiftB (0x66) 3" },
|
||||
/* 25*/ { GS1_MODE, -1, "[90]ABC[90]abc[90]123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
||||
/* 26*/ { GS1_MODE | GS1PARENS_MODE, -1, "(90)ABC(90)abc(90)123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
||||
/* 27*/ { UNICODE_MODE, -1, "99aA[{00\000", 9, 0, "6B 63 6A 41 21 3B 5B 10 10 65 40", "FNC1 (0x6B) 99 LatchB (0x6A) a A [ { 0 0 ShiftA (0x65) NUL" },
|
||||
/* 28*/ { UNICODE_MODE, -1, "\015\012", -1, 0, "66 60", "ShiftB (0x66) CR/LF" },
|
||||
/* 29*/ { UNICODE_MODE, -1, "A\015\012", -1, 0, "67 21 60", "2xShiftB (0x67) A CR/LF" },
|
||||
/* 30*/ { UNICODE_MODE, -1, "\015\015\012", -1, 0, "65 4D 4D 4A", "LatchA (0x65) CR CR LF" },
|
||||
/* 31*/ { UNICODE_MODE, -1, "ABCDE12345678", -1, 0, "6A 21 22 23 24 25 69 0C 22 38 4E", "LatchB (0x6A) A B C D 4xShiftC 12 34 56 78" },
|
||||
/* 32*/ { UNICODE_MODE, -1, "\000ABCD1234567890", 15, 0, "65 40 21 22 23 24 6A 0C 22 38 4E 5A", "LatchA (0x65) NULL A B C D LatchC (0x6A) 12 34 56 78 90" },
|
||||
/* 33*/ { DATA_MODE, -1, "\141\142\143\144\145\200\201\202\203\204\377", -1, 0, "6A 41 42 43 44 45 70 31 5A 35 21 5A 5F 02 31", "LatchB (0x6A) a b c d e BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x84 0xFF" },
|
||||
/* 34*/ { DATA_MODE, -1, "\200\061\062\240\063\064\201\202\065\066", -1, 0, "6E 40 0C 6F 00 22 70 03 10 42 6E 15 16", "UpperShiftA (0x6E) NUL 12 UpperShiftB (0x6F) SP 34 BinaryLatch (0x70) 0x81 0x82 TermB (0x6E) 5 6" },
|
||||
/* 35*/ { DATA_MODE, -1, "\200\201\202\203\061\062\063\064", -1, 0, "70 13 56 0A 59 2C 67 0C 22", "BinaryLatch (0x70) 0x80 0x81 0x82 0x83 Intr2xShiftC (0x67) 12 3" },
|
||||
/* 36*/ { DATA_MODE, -1, "\001\200\201\202\203\204\200\201\202\203\204", -1, 0, "65 41 70 31 5A 35 21 5A 5F 31 5A 35 21 5A 5F", "LatchA (0x65) SOH BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x80 0x81 0x82 0x83" },
|
||||
/* 37*/ { UNICODE_MODE, -1, "\001abc\011\015\012\036", -1, 0, "65 41 65 41 42 43 61 60 64", "LatchA (0x65) SOH 6xShiftB (0x65) a b c HT CR/LF RS" },
|
||||
/* 0*/ { UNICODE_MODE, -1, { 0, 0, "" }, "A", -1, 0, "66 21", "" },
|
||||
/* 1*/ { UNICODE_MODE, 3, { 0, 0, "" }, "A", -1, 0, "6C 03 66 21", "" },
|
||||
/* 2*/ { UNICODE_MODE, 40, { 0, 0, "" }, "A", -1, 0, "6C 28 00 00 66 21", "" },
|
||||
/* 3*/ { UNICODE_MODE, 113, { 0, 0, "" }, "A", -1, 0, "6C 28 00 49 66 21", "" },
|
||||
/* 4*/ { UNICODE_MODE, 899, { 0, 0, "" }, "A", -1, 0, "6C 28 07 44 66 21", "" },
|
||||
/* 5*/ { UNICODE_MODE, 12769, { 0, 0, "" }, "A", -1, 0, "6C 28 70 49 66 21", "" },
|
||||
/* 6*/ { UNICODE_MODE, 811799, { 0, 0, "" }, "A", -1, 0, "6C 67 40 50 66 21", "" },
|
||||
/* 7*/ { UNICODE_MODE, 811800, { 0, 0, "" }, "A", -1, ZINT_ERROR_INVALID_OPTION, "Error 525: Invalid ECI", "" },
|
||||
/* 8*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\000", 1, 0, "65 40", "LatchA (0x65) NUL" },
|
||||
/* 9*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\010", -1, 0, "65 48", "LatchA (0x65) BS" },
|
||||
/* 10*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\011", -1, 0, "65 49", "Lead special; LatchA (0x65) HT" },
|
||||
/* 11*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\034", -1, 0, "65 5C", "Lead special; LatchA (0x65) FS" },
|
||||
/* 12*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\035", -1, 0, "65 5D", "Lead special; LatchA (0x65) GS" },
|
||||
/* 13*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\036", -1, 0, "65 5E", "Lead special; LatchA (0x65) RS" },
|
||||
/* 14*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\037", -1, 0, "65 5F", "LatchA (0x65) US" },
|
||||
/* 15*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\177", -1, 0, "66 5F", "ShiftB (0x66) DEL" },
|
||||
/* 16*/ { UNICODE_MODE, -1, { 0, 0, "" }, "[)>\03605\035A\036\004", -1, 0, "6A 61 21", "[)>RS 05 GS A RS EOT; LatchB (0x6A) Macro97 (0x61) A" },
|
||||
/* 17*/ { UNICODE_MODE, -1, { 0, 0, "" }, "[)>\03606\035\011\034\035\036\036\004", -1, 0, "6A 62 61 62 63 64", "[)>RS 06 GS HT FS GS RS RS EOT; LatchB (0x6A) Macro98 (0x62) HT FS GS RS" },
|
||||
/* 18*/ { UNICODE_MODE, -1, { 0, 0, "" }, "[)>\03612\03512345\036\004", -1, 0, "6A 63 11 67 17 2D", "[)>RS 12 GS A RS EOT; LatchB (0x6A) Macro99 (0x63) 1 2xShiftC (0x67) 23 45" },
|
||||
/* 19*/ { UNICODE_MODE, -1, { 0, 0, "" }, "[)>\03601Blah\004", -1, 0, "6A 64 10 11 22 4C 41 48", "[)>RS 01 Blah EOT; LatchB (0x6A) Macro100 (0x64) 0 1 B l a h" },
|
||||
/* 20*/ { UNICODE_MODE, -1, { 0, 0, "" }, "[)>\03605\035A\004", -1, 0, "6A 64 10 15 63 21", "[)>RS 05 GS A EOT; LatchB (0x6A) Macro100 (0x64) 0 5 HT A" },
|
||||
/* 21*/ { UNICODE_MODE, -1, { 0, 0, "" }, "[)>\03606A\004", -1, 0, "6A 64 10 16 21", "[)>RS 06 A EOT; LatchB (0x6A) Macro100 (0x64) 0 6 A" },
|
||||
/* 22*/ { UNICODE_MODE, -1, { 0, 0, "" }, "[)>\036991\036\004", -1, 0, "6A 64 19 19 11 64", "[)>RS 99 1 RS EOT; LatchB (0x6A) Macro100 (0x64) 9 9 1 RS" },
|
||||
/* 23*/ { UNICODE_MODE, -1, { 0, 0, "" }, "1712345610", -1, 0, "6B 64 0C 22 38", "FNC1 (0x6B) 17..10 12 34 56" },
|
||||
/* 24*/ { GS1_MODE, -1, { 0, 0, "" }, "[17]123456[10]123", -1, ZINT_WARN_NONCOMPLIANT, "64 0C 22 38 0C 66 13", "17..10 12 34 56 12 ShiftB (0x66) 3" },
|
||||
/* 25*/ { GS1_MODE, -1, { 0, 0, "" }, "[90]ABC[90]abc[90]123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
||||
/* 26*/ { GS1_MODE | GS1PARENS_MODE, -1, { 0, 0, "" }, "(90)ABC(90)abc(90)123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
||||
/* 27*/ { UNICODE_MODE, -1, { 0, 0, "" }, "99aA[{00\000", 9, 0, "6B 63 6A 41 21 3B 5B 10 10 65 40", "FNC1 (0x6B) 99 LatchB (0x6A) a A [ { 0 0 ShiftA (0x65) NUL" },
|
||||
/* 28*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\015\012", -1, 0, "66 60", "ShiftB (0x66) CR/LF" },
|
||||
/* 29*/ { UNICODE_MODE, -1, { 0, 0, "" }, "A\015\012", -1, 0, "67 21 60", "2xShiftB (0x67) A CR/LF" },
|
||||
/* 30*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\015\015\012", -1, 0, "65 4D 4D 4A", "LatchA (0x65) CR CR LF" },
|
||||
/* 31*/ { UNICODE_MODE, -1, { 0, 0, "" }, "ABCDE12345678", -1, 0, "6A 21 22 23 24 25 69 0C 22 38 4E", "LatchB (0x6A) A B C D 4xShiftC 12 34 56 78" },
|
||||
/* 32*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\000ABCD1234567890", 15, 0, "65 40 21 22 23 24 6A 0C 22 38 4E 5A", "LatchA (0x65) NULL A B C D LatchC (0x6A) 12 34 56 78 90" },
|
||||
/* 33*/ { DATA_MODE, -1, { 0, 0, "" }, "\141\142\143\144\145\200\201\202\203\204\377", -1, 0, "6A 41 42 43 44 45 70 31 5A 35 21 5A 5F 02 31", "LatchB (0x6A) a b c d e BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x84 0xFF" },
|
||||
/* 34*/ { DATA_MODE, -1, { 0, 0, "" }, "\200\061\062\240\063\064\201\202\065\066", -1, 0, "6E 40 0C 6F 00 22 70 03 10 42 6E 15 16", "UpperShiftA (0x6E) NUL 12 UpperShiftB (0x6F) SP 34 BinaryLatch (0x70) 0x81 0x82 TermB (0x6E) 5 6" },
|
||||
/* 35*/ { DATA_MODE, -1, { 0, 0, "" }, "\200\201\202\203\061\062\063\064", -1, 0, "70 13 56 0A 59 2C 67 0C 22", "BinaryLatch (0x70) 0x80 0x81 0x82 0x83 Intr2xShiftC (0x67) 12 3" },
|
||||
/* 36*/ { DATA_MODE, -1, { 0, 0, "" }, "\001\200\201\202\203\204\200\201\202\203\204", -1, 0, "65 41 70 31 5A 35 21 5A 5F 31 5A 35 21 5A 5F", "LatchA (0x65) SOH BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x80 0x81 0x82 0x83" },
|
||||
/* 37*/ { UNICODE_MODE, -1, { 0, 0, "" }, "\001abc\011\015\012\036", -1, 0, "65 41 65 41 42 43 61 60 64", "LatchA (0x65) SOH 6xShiftB (0x65) a b c HT CR/LF RS" },
|
||||
/* 38*/ { UNICODE_MODE, -1, { 35, 35, "" }, "ABCDE", -1, 0, "6A 21 22 23 24 25 3A 3A 6C", "LatchB (0x6A) A B C D E Z Z FNC2" },
|
||||
/* 39*/ { UNICODE_MODE, -1, { 9, 10, "" }, "1234567890", -1, 0, "6B 0C 22 38 4E 5A 65 19 21 6C", "FNC1 (0x6B) 12 34 56 78 90 LatchA (0x65) 9 A FNC2" },
|
||||
/* 40*/ { UNICODE_MODE, -1, { 2, 3, "" }, "\001\002\003\004", -1, 0, "65 41 42 43 44 12 13 6C", "LatchA (0x65) <SOH> <STX> <ETX> <EOT> 2 3 FNC2" },
|
||||
/* 41*/ { DATA_MODE, -1, { 1, 34, "" }, "\200\201\202\203", -1, 0, "70 13 56 0A 59 2C 6D 11 39 6C", "BinaryLatch (0x70) (...) TermA (0x6D) 1 Y FNC2" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -201,18 +218,21 @@ static void test_input(int index, int generate, int debug) {
|
||||
debug |= ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DOTCODE, data[i].input_mode, data[i].eci, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, \"%s\", %d, %s, \"%s\", \"%s\" },\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].eci, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||
printf(" /*%3d*/ { %s, %d, { %d, %d, \"%s\" }, \"%s\", %d, %s, \"%s\", \"%s\" },\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].eci,
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||
data[i].length, testUtilErrorName(data[i].ret), symbol->errtxt, data[i].comment);
|
||||
} else {
|
||||
if (ret < ZINT_ERROR) {
|
||||
assert_zero(strcmp((char *) symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||
}
|
||||
assert_zero(strcmp((char *) symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||
}
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
@ -227,6 +247,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
int input_mode;
|
||||
int option_2;
|
||||
int option_3;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int length;
|
||||
int ret;
|
||||
@ -239,7 +260,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
};
|
||||
// ISS DotCode, Rev 4.0, DRAFT 0.15, TSC Pre-PR #5, MAY 28, 2019
|
||||
struct item data[] = {
|
||||
/* 0*/ { GS1_MODE, 64, -1, "[01]00012345678905[17]201231[10]ABC123456", -1, 0, 9, 64, 1, "ISS DotCode Rev 4.0 Figure 1 (left), same",
|
||||
/* 0*/ { GS1_MODE, 64, -1, { 0, 0, "" }, "[01]00012345678905[17]201231[10]ABC123456", -1, 0, 9, 64, 1, "ISS DotCode Rev 4.0 Figure 1 (left), same",
|
||||
"1010000000101000101010000010000010001010100010101000101000001010"
|
||||
"0100010001010001010001000001010100010100010001000100010101000001"
|
||||
"1010001010000000101010100010001010000010101000000010100010100000"
|
||||
@ -250,7 +271,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0001010100010001010100010001010000010001010000000101010001010101"
|
||||
"1000100010001000100010100010001010001000101000101000100010000010"
|
||||
},
|
||||
/* 1*/ { GS1_MODE, -1, -1, "[01]00012345678905[17]201231[10]ABC123456", -1, 0, 20, 29, 1, "ISS DotCode Rev 4.0 Figure 1 (right) (and Figure 10), same",
|
||||
/* 1*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[01]00012345678905[17]201231[10]ABC123456", -1, 0, 20, 29, 1, "ISS DotCode Rev 4.0 Figure 1 (right) (and Figure 10), same",
|
||||
"10101000101010100010101000101"
|
||||
"00010100010100010100000001010"
|
||||
"00001010100010000000101010000"
|
||||
@ -272,7 +293,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10000010101000100000001000001"
|
||||
"01000100010101010000000101010"
|
||||
},
|
||||
/* 2*/ { GS1_MODE, -1, 1 << 8, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 5 (and Figure 6 top-left) when Mask = 0, same",
|
||||
/* 2*/ { GS1_MODE, -1, 1 << 8, { 0, 0, "" }, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 5 (and Figure 6 top-left) when Mask = 0, same",
|
||||
"10101000100010000000001"
|
||||
"01000101010001010000000"
|
||||
"00100010001000101000100"
|
||||
@ -290,7 +311,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10101000001000101010001"
|
||||
"01000001010101010000010"
|
||||
},
|
||||
/* 3*/ { GS1_MODE, -1, 2 << 8, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 top-right Mask = 1, same",
|
||||
/* 3*/ { GS1_MODE, -1, 2 << 8, { 0, 0, "" }, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 top-right Mask = 1, same",
|
||||
"10000000001010001000101"
|
||||
"01010101000100000101000"
|
||||
"00100010000000100000001"
|
||||
@ -308,7 +329,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10000010101010100010101"
|
||||
"01000101000101010101010"
|
||||
},
|
||||
/* 4*/ { GS1_MODE, -1, 3 << 8, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 bottom-left Mask = 2, same",
|
||||
/* 4*/ { GS1_MODE, -1, 3 << 8, { 0, 0, "" }, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 bottom-left Mask = 2, same",
|
||||
"10100000101010100010001"
|
||||
"01000101000100000000010"
|
||||
"10101010001010000010000"
|
||||
@ -326,7 +347,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10101010000000001010001"
|
||||
"01010101000001000101010"
|
||||
},
|
||||
/* 5*/ { GS1_MODE, -1, 4 << 8, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 bottom-right Mask = 3, same",
|
||||
/* 5*/ { GS1_MODE, -1, 4 << 8, { 0, 0, "" }, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 bottom-right Mask = 3, same",
|
||||
"10000000100000001010101"
|
||||
"01010001010100010001000"
|
||||
"10001000001010101010100"
|
||||
@ -344,7 +365,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10001000001010001000001"
|
||||
"01010100000101000100010"
|
||||
},
|
||||
/* 6*/ { GS1_MODE, -1, -1, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 top-right, auto Mask = 1, same",
|
||||
/* 6*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[17]070620[10]ABC123456", -1, 0, 16, 23, 1, "ISS DotCode Rev 4.0 Figure 6 top-right, auto Mask = 1, same",
|
||||
"10000000001010001000101"
|
||||
"01010101000100000101000"
|
||||
"00100010000000100000001"
|
||||
@ -362,7 +383,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10000010101010100010101"
|
||||
"01000101000101010101010"
|
||||
},
|
||||
/* 7*/ { UNICODE_MODE, -1, 1 << 8, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A top-left Mask = 0, same; BWIPP automatically primes mask",
|
||||
/* 7*/ { UNICODE_MODE, -1, 1 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A top-left Mask = 0, same; BWIPP automatically primes mask",
|
||||
"1010101010100"
|
||||
"0000010001010"
|
||||
"0000101000101"
|
||||
@ -374,7 +395,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000100010001"
|
||||
"0000000000000"
|
||||
},
|
||||
/* 8*/ { UNICODE_MODE, -1, 2 << 8, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A top-right Mask = 1, same; BWIPP automatically primes mask",
|
||||
/* 8*/ { UNICODE_MODE, -1, 2 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A top-right Mask = 1, same; BWIPP automatically primes mask",
|
||||
"1010001000101"
|
||||
"0000000100010"
|
||||
"0000100000001"
|
||||
@ -386,7 +407,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0000000010001"
|
||||
"0001000001000"
|
||||
},
|
||||
/* 9*/ { UNICODE_MODE, -1, 3 << 8, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A bottom-left Mask = 2, same; BWIPP automatically primes mask",
|
||||
/* 9*/ { UNICODE_MODE, -1, 3 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A bottom-left Mask = 2, same; BWIPP automatically primes mask",
|
||||
"1010001010100"
|
||||
"0001000000000"
|
||||
"1000100010101"
|
||||
@ -398,7 +419,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000100010101"
|
||||
"0001000100000"
|
||||
},
|
||||
/* 10*/ { UNICODE_MODE, -1, 4 << 8, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A bottom-right Mask = 3, same; BWIPP automatically primes mask",
|
||||
/* 10*/ { UNICODE_MODE, -1, 4 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Figure 7A bottom-right Mask = 3, same; BWIPP automatically primes mask",
|
||||
"1010001000100"
|
||||
"0001000001010"
|
||||
"1000001000000"
|
||||
@ -410,7 +431,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000001010001"
|
||||
"0101010101010"
|
||||
},
|
||||
/* 11*/ { UNICODE_MODE, -1, 5 << 8, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B top-left Mask = 0' (4), same",
|
||||
/* 11*/ { UNICODE_MODE, -1, 5 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B top-left Mask = 0' (4), same",
|
||||
"1010101010101"
|
||||
"0000010001010"
|
||||
"0000101000101"
|
||||
@ -422,7 +443,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000100010001"
|
||||
"0100000000010"
|
||||
},
|
||||
/* 12*/ { UNICODE_MODE, -1, 6 << 8, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B top-right Mask = 1' (5), same",
|
||||
/* 12*/ { UNICODE_MODE, -1, 6 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B top-right Mask = 1' (5), same",
|
||||
"1010001000101"
|
||||
"0000000100010"
|
||||
"0000100000001"
|
||||
@ -434,7 +455,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000000010001"
|
||||
"0101000001010"
|
||||
},
|
||||
/* 13*/ { UNICODE_MODE, -1, 7 << 8, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B bottom-left Mask = 2' (6), same",
|
||||
/* 13*/ { UNICODE_MODE, -1, 7 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B bottom-left Mask = 2' (6), same",
|
||||
"1010001010101"
|
||||
"0001000000000"
|
||||
"1000100010101"
|
||||
@ -446,7 +467,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000100010101"
|
||||
"0101000100010"
|
||||
},
|
||||
/* 14*/ { UNICODE_MODE, -1, 8 << 8, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B bottom-right Mask = 3' (7), same",
|
||||
/* 14*/ { UNICODE_MODE, -1, 8 << 8, { 0, 0, "" }, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B bottom-right Mask = 3' (7), same",
|
||||
"1010001000101"
|
||||
"0001000001010"
|
||||
"1000001000000"
|
||||
@ -458,7 +479,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000001010001"
|
||||
"0101010101010"
|
||||
},
|
||||
/* 15*/ { UNICODE_MODE, -1, -1, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B bottom-left auto Mask = 2' (6), same",
|
||||
/* 15*/ { UNICODE_MODE, -1, -1, { 0, 0, "" }, "2741", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Figure 7B bottom-left auto Mask = 2' (6), same",
|
||||
"1010001010101"
|
||||
"0001000000000"
|
||||
"1000100010101"
|
||||
@ -470,7 +491,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000100010101"
|
||||
"0101000100010"
|
||||
},
|
||||
/* 16*/ { GS1_MODE, 40, -1, "[01]00012345678905", -1, 0, 7, 40, 1, "ISS DotCode Rev 4.0 Figure 8 top-left 7x40, Mask = 1, same",
|
||||
/* 16*/ { GS1_MODE, 40, -1, { 0, 0, "" }, "[01]00012345678905", -1, 0, 7, 40, 1, "ISS DotCode Rev 4.0 Figure 8 top-left 7x40, Mask = 1, same",
|
||||
"1010101010001000100010100010101000001000"
|
||||
"0000010101000100010100010000010001000001"
|
||||
"1010001000001000001000101010001000101000"
|
||||
@ -479,7 +500,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0001010001010001000100000001010100010001"
|
||||
"1000100010001000100010100010001010001000"
|
||||
},
|
||||
/* 17*/ { GS1_MODE, 18, -1, "[01]00012345678905", -1, 0, 17, 18, 1, "ISS DotCode Rev 4.0 Figure 8 top-right 17x18 **NOT SAME** no matter what mask; but same as BWIPP and verified manually against tec-it",
|
||||
/* 17*/ { GS1_MODE, 18, -1, { 0, 0, "" }, "[01]00012345678905", -1, 0, 17, 18, 1, "ISS DotCode Rev 4.0 Figure 8 top-right 17x18 **NOT SAME** no matter what mask; but same as BWIPP and verified manually against tec-it",
|
||||
"101000001000101010"
|
||||
"010100000101010001"
|
||||
"000000101000001010"
|
||||
@ -498,7 +519,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010001010001000101"
|
||||
"100010001000100010"
|
||||
},
|
||||
/* 18*/ { GS1_MODE, 35, -1, "[01]00012345678905", -1, 0, 8, 35, 1, "ISS DotCode Rev 4.0 Figure 8 bottom-left 8x35, Mask = 3, same",
|
||||
/* 18*/ { GS1_MODE, 35, -1, { 0, 0, "" }, "[01]00012345678905", -1, 0, 8, 35, 1, "ISS DotCode Rev 4.0 Figure 8 bottom-left 8x35, Mask = 3, same",
|
||||
"10100010000000000010100000100010101"
|
||||
"00010101010001000000010100010100000"
|
||||
"10001000101010101010001010000010101"
|
||||
@ -508,7 +529,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10000010101010101010000010000010001"
|
||||
"01000001000101000100010100010001000"
|
||||
},
|
||||
/* 19*/ { GS1_MODE, 17, -1, "[01]00012345678905", -1, 0, 18, 17, 1, "ISS DotCode Rev 4.0 Figure 8 bottom-right 18x17 **NOT SAME** no matter what mask; same as BWIPP; verified manually against tec-it",
|
||||
/* 19*/ { GS1_MODE, 17, -1, { 0, 0, "" }, "[01]00012345678905", -1, 0, 18, 17, 1, "ISS DotCode Rev 4.0 Figure 8 bottom-right 18x17 **NOT SAME** no matter what mask; same as BWIPP; verified manually against tec-it",
|
||||
"10101000001000001"
|
||||
"01000001010100010"
|
||||
"00000000100010001"
|
||||
@ -528,7 +549,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10101010101010101"
|
||||
"01010101000101010"
|
||||
},
|
||||
/* 20*/ { UNICODE_MODE, 35, -1, "Dots can be Square!", -1, 0, 18, 35, 1, "ISS DotCode Rev 4.0 Figure 11 **NOT SAME**; same as BWIPP; verified manually against tec-it",
|
||||
/* 20*/ { UNICODE_MODE, 35, -1, { 0, 0, "" }, "Dots can be Square!", -1, 0, 18, 35, 1, "ISS DotCode Rev 4.0 Figure 11 **NOT SAME**; same as BWIPP; verified manually against tec-it",
|
||||
"10000010101000000000000000101010101"
|
||||
"01010101000101000100010100000001000"
|
||||
"00001000000010101000101010101010000"
|
||||
@ -548,7 +569,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10101000101000001000100010101000101"
|
||||
"01000001000001000101010001000000010"
|
||||
},
|
||||
/* 21*/ { GS1_MODE, -1, 1 << 8, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 0, same; BWIPP automatically primes mask",
|
||||
/* 21*/ { GS1_MODE, -1, 1 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 0, same; BWIPP automatically primes mask",
|
||||
"0000001010000"
|
||||
"0001010000010"
|
||||
"0000000010001"
|
||||
@ -560,7 +581,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0010000000101"
|
||||
"0101000101010"
|
||||
},
|
||||
/* 22*/ { GS1_MODE, -1, 2 << 8, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 1, same; BWIPP automatically primes mask",
|
||||
/* 22*/ { GS1_MODE, -1, 2 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 1, same; BWIPP automatically primes mask",
|
||||
"0000100000001"
|
||||
"0001010000000"
|
||||
"0000000000001"
|
||||
@ -572,7 +593,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0010101000101"
|
||||
"0100010101000"
|
||||
},
|
||||
/* 23*/ { GS1_MODE, -1, 3 << 8, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 2, same; BWIPP automatically primes mask",
|
||||
/* 23*/ { GS1_MODE, -1, 3 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 2, same; BWIPP automatically primes mask",
|
||||
"0000100010100"
|
||||
"0000000000000"
|
||||
"1000101010101"
|
||||
@ -584,7 +605,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0000000010001"
|
||||
"0100000001010"
|
||||
},
|
||||
/* 24*/ { GS1_MODE, -1, 4 << 8, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 3, same; BWIPP automatically primes mask",
|
||||
/* 24*/ { GS1_MODE, -1, 4 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 0, "ISS DotCode Rev 4.0 Table G.1 Mask 3, same; BWIPP automatically primes mask",
|
||||
"0000000000000"
|
||||
"0001010001000"
|
||||
"1000001010000"
|
||||
@ -596,7 +617,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000000010000"
|
||||
"0100000000010"
|
||||
},
|
||||
/* 25*/ { GS1_MODE, -1, 5 << 8, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 0' (4), same",
|
||||
/* 25*/ { GS1_MODE, -1, 5 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 0' (4), same",
|
||||
"1000001010001"
|
||||
"0001010000010"
|
||||
"0000000010001"
|
||||
@ -608,7 +629,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1010000000101"
|
||||
"0101000101010"
|
||||
},
|
||||
/* 26*/ { GS1_MODE, -1, 6 << 8, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 1' (5), same",
|
||||
/* 26*/ { GS1_MODE, -1, 6 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 1' (5), same",
|
||||
"1000100000001"
|
||||
"0001010000000"
|
||||
"0000000000001"
|
||||
@ -620,7 +641,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1010101000101"
|
||||
"0100010101010"
|
||||
},
|
||||
/* 27*/ { GS1_MODE, -1, 7 << 8, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 2' (6), same",
|
||||
/* 27*/ { GS1_MODE, -1, 7 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 2' (6), same",
|
||||
"1000100010101"
|
||||
"0000000000000"
|
||||
"1000101010101"
|
||||
@ -632,7 +653,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000000010001"
|
||||
"0100000001010"
|
||||
},
|
||||
/* 28*/ { GS1_MODE, -1, 8 << 8, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 3' (7), same",
|
||||
/* 28*/ { GS1_MODE, -1, 8 << 8, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 Mask 3' (7), same",
|
||||
"1000000000001"
|
||||
"0001010001000"
|
||||
"1000001010000"
|
||||
@ -644,7 +665,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000000010001"
|
||||
"0100000000010"
|
||||
},
|
||||
/* 29*/ { GS1_MODE, -1, -1, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 auto Mask 0' (4); all mask scores match Table G.1",
|
||||
/* 29*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[99]8766", -1, 0, 10, 13, 1, "ISS DotCode Rev 4.0 Table G.1 auto Mask 0' (4); all mask scores match Table G.1",
|
||||
"1000001010001"
|
||||
"0001010000010"
|
||||
"0000000010001"
|
||||
@ -656,7 +677,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1010000000101"
|
||||
"0101000101010"
|
||||
},
|
||||
/* 30*/ { UNICODE_MODE, 6, -1, "A", -1, 0, 19, 6, 1, "ISS DotCode Rev 4.0 5.2.1.4 2) Table 4, 1 padding dot available; verified manually against tec-it",
|
||||
/* 30*/ { UNICODE_MODE, 6, -1, { 0, 0, "" }, "A", -1, 0, 19, 6, 1, "ISS DotCode Rev 4.0 5.2.1.4 2) Table 4, 1 padding dot available; verified manually against tec-it",
|
||||
"101000"
|
||||
"000101"
|
||||
"101010"
|
||||
@ -677,7 +698,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010000"
|
||||
"101000"
|
||||
},
|
||||
/* 31*/ { UNICODE_MODE, 94, -1, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS", -1, 0, 37, 94, 1, "Interleaved R-S; verified manually against tec-it",
|
||||
/* 31*/ { UNICODE_MODE, 94, -1, { 0, 0, "" }, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS", -1, 0, 37, 94, 1, "Interleaved R-S; verified manually against tec-it",
|
||||
"1000001010000000100010000010101010101000001000100000001010101000001000001000101010001000101010"
|
||||
"0101010000000101000001010001010001010100010001000001000000010101010000000101010100010001010100"
|
||||
"0010101000100010000010101010000000101010000010101000001000100010100000100010100010001000101000"
|
||||
@ -716,7 +737,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0001000101010100000001010101000001010000010001010001000100010000010001000101010001010001000001"
|
||||
"0010001000001010101000000010101000101000001000001010100000101010001000000010100000001010101000"
|
||||
},
|
||||
/* 32*/ { GS1_MODE, 50, -1, "[17]070620[10]ABC123456", -1, 0, 7, 50, 1, "GS1 Gen Spec Figure 5.1-8.",
|
||||
/* 32*/ { GS1_MODE, 50, -1, { 0, 0, "" }, "[17]070620[10]ABC123456", -1, 0, 7, 50, 1, "GS1 Gen Spec Figure 5.1-8.",
|
||||
"10000010101000100010101010001000000010100000100000"
|
||||
"01000101000101010100000100010000010001000001010101"
|
||||
"00001010001000101000101000100010001010100000000010"
|
||||
@ -725,14 +746,14 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"00010001010000000100010101000100010001010001000101"
|
||||
"10001000001010101000001000100010100010100000101010"
|
||||
},
|
||||
/* 33*/ { UNICODE_MODE, 200, -1, "123456789012345678901234567890123456789012345678901234567890", -1, 0, 5, 200, 1, "Max cols",
|
||||
/* 33*/ { UNICODE_MODE, 200, -1, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890", -1, 0, 5, 200, 1, "Max cols",
|
||||
"10101000100010101010000010101000000010001000100000101010100010100000101000100010000000101000101010001010100000100000101010100000001000101000001010100010001010000010001010001010100000100010101000000010"
|
||||
"00010101010000000101000100010001000101000101000100010001000001010001000001010100000001000101010000000101010100010101010000010001000101010001000001000001010000010100010001010101000001000001010100000001"
|
||||
"10100010000000100010101000101010100000001010001000100000101000101000001000101010001000000010101010100010101000000010100010001000001010100000101000100000101010100010000000001000001010101000101010100000"
|
||||
"00010001010001010000000101000100010001010000010000010100010100000100010101010001000101000000010100010001010100010000010100000101000100010100000101010000000101000001010100010100010001000101000001010001"
|
||||
"10100010001010101000000010001000001010001010001000001010100010000000101010001010000010101010000000101000100010100010100000100010100010001010100000001010101000001010000000001000101000101010000010101010"
|
||||
},
|
||||
/* 34*/ { UNICODE_MODE, 19, -1, "4", -1, 0, 6, 19, 1, "Mask 1 selected",
|
||||
/* 34*/ { UNICODE_MODE, 19, -1, { 0, 0, "" }, "4", -1, 0, 6, 19, 1, "Mask 1 selected",
|
||||
"1010100000101000101"
|
||||
"0100000000010001010"
|
||||
"0010101010000000000"
|
||||
@ -740,7 +761,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000100010001010001"
|
||||
"0001010101010101010"
|
||||
},
|
||||
/* 35*/ { UNICODE_MODE, 19, 3 << 8, "4", -1, 0, 6, 19, 0, "Mask 2 specified, unlit right edge mask; BWIPP automatically primes mask",
|
||||
/* 35*/ { UNICODE_MODE, 19, 3 << 8, { 0, 0, "" }, "4", -1, 0, 6, 19, 0, "Mask 2 specified, unlit right edge mask; BWIPP automatically primes mask",
|
||||
"1010101010000000100"
|
||||
"0000000101000100010"
|
||||
"1010100000001010100"
|
||||
@ -748,7 +769,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000001010100010100"
|
||||
"0101000100010001010"
|
||||
},
|
||||
/* 36*/ { UNICODE_MODE, 19, 7 << 8, "4", -1, 0, 6, 19, 1, "Mask 2' specified",
|
||||
/* 36*/ { UNICODE_MODE, 19, 7 << 8, { 0, 0, "" }, "4", -1, 0, 6, 19, 1, "Mask 2' specified",
|
||||
"1010101010000000101"
|
||||
"0000000101000100010"
|
||||
"1010100000001010100"
|
||||
@ -756,7 +777,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1000001010100010101"
|
||||
"0101000100010001010"
|
||||
},
|
||||
/* 37*/ { GS1_MODE, -1, -1, "[10]12[20]12", -1, 0, 12, 17, 1, "Code Set C with FNC1",
|
||||
/* 37*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[10]12[20]12", -1, 0, 12, 17, 1, "Code Set C with FNC1",
|
||||
"10100000001000001"
|
||||
"00010100010101010"
|
||||
"10001000100000001"
|
||||
@ -770,7 +791,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10000010100000101"
|
||||
"01000100010101010"
|
||||
},
|
||||
/* 38*/ { UNICODE_MODE, -1, -1, "1234\011\034\035\036", -1, 0, 14, 21, 1, "Code Set B HT FS GS RS",
|
||||
/* 38*/ { UNICODE_MODE, -1, -1, { 0, 0, "" }, "1234\011\034\035\036", -1, 0, 14, 21, 1, "Code Set B HT FS GS RS",
|
||||
"100010001000001010101"
|
||||
"010001000001000001000"
|
||||
"100010100010101010001"
|
||||
@ -786,7 +807,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"001010101000101010001"
|
||||
"010101010001000101000"
|
||||
},
|
||||
/* 39*/ { UNICODE_MODE, 17, -1, "abcd\015\012", -1, 0, 14, 17, 1, "Code Set B CRLF",
|
||||
/* 39*/ { UNICODE_MODE, 17, -1, { 0, 0, "" }, "abcd\015\012", -1, 0, 14, 17, 1, "Code Set B CRLF",
|
||||
"00001000001000101"
|
||||
"01000101010001000"
|
||||
"10100000100010101"
|
||||
@ -802,7 +823,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10100000001010000"
|
||||
"01010001000101000"
|
||||
},
|
||||
/* 40*/ { DATA_MODE, -1, -1, "\101\102\103\104\105\106\107\200\101\102\240\101", -1, 0, 18, 27, 1, "Code Set B Upper Shift A Upper Shift B",
|
||||
/* 40*/ { DATA_MODE, -1, -1, { 0, 0, "" }, "\101\102\103\104\105\106\107\200\101\102\240\101", -1, 0, 18, 27, 1, "Code Set B Upper Shift A Upper Shift B",
|
||||
"101010100000101000101000001"
|
||||
"010100010101000100010101000"
|
||||
"000010001010100000101010101"
|
||||
@ -822,7 +843,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"100010101000000010001000001"
|
||||
"010001000100000101000001010"
|
||||
},
|
||||
/* 41*/ { UNICODE_MODE, -1, -1, "ABCDEF\001G1234H", -1, 0, 16, 25, 1, "Code Set A 4x Shift C",
|
||||
/* 41*/ { UNICODE_MODE, -1, -1, { 0, 0, "" }, "ABCDEF\001G1234H", -1, 0, 16, 25, 1, "Code Set A 4x Shift C",
|
||||
"0010101010100000100000101"
|
||||
"0000000100010101000001000"
|
||||
"1000100000101000100000101"
|
||||
@ -840,7 +861,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"1010101010001000101000000"
|
||||
"0000010100010101000101010"
|
||||
},
|
||||
/* 42*/ { UNICODE_MODE, -1, -1, "ABCDEF\001ab\011\034\035\036\001A", -1, 0, 19, 28, 1, "Code Set A 6x Shift B HT FS GS RS",
|
||||
/* 42*/ { UNICODE_MODE, -1, -1, { 0, 0, "" }, "ABCDEF\001ab\011\034\035\036\001A", -1, 0, 19, 28, 1, "Code Set A 6x Shift B HT FS GS RS",
|
||||
"1000001010100010101010101010"
|
||||
"0101000000010100010101010001"
|
||||
"0010001010100000101000001010"
|
||||
@ -861,7 +882,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0001010000010100000100010101"
|
||||
"1010100010000000101010101010"
|
||||
},
|
||||
/* 43*/ { UNICODE_MODE, -1, -1, "ABCDEF\001abcdefgA", -1, 0, 19, 28, 1, "Code Set A Latch B",
|
||||
/* 43*/ { UNICODE_MODE, -1, -1, { 0, 0, "" }, "ABCDEF\001abcdefgA", -1, 0, 19, 28, 1, "Code Set A Latch B",
|
||||
"1010001010100010101010101010"
|
||||
"0100010101010000000100010001"
|
||||
"1010000010100000100010101000"
|
||||
@ -882,7 +903,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"0001010000010100000100010101"
|
||||
"1010100010000000101010101010"
|
||||
},
|
||||
/* 44*/ { DATA_MODE, -1, -1, "\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\200", -1, 0, 20, 29, 1, "Binary Latch C",
|
||||
/* 44*/ { DATA_MODE, -1, -1, { 0, 0, "" }, "\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\200", -1, 0, 20, 29, 1, "Binary Latch C",
|
||||
"10101010000010100010101010001"
|
||||
"01010001000101010001000000010"
|
||||
"00001010101000101010001000001"
|
||||
@ -904,6 +925,36 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"10000010100010000010001000101"
|
||||
"01000100000100010001010101010"
|
||||
},
|
||||
/* 45*/ { UNICODE_MODE, -1, -1, { 11, 24, "" }, "ABCDEFG", -1, 0, 16, 23, 1, "Structured Append",
|
||||
"10101000001000101000001"
|
||||
"01010101000001010001010"
|
||||
"10101010100010000000001"
|
||||
"01000001010000010100010"
|
||||
"10000000101010100010101"
|
||||
"01010100010101010101000"
|
||||
"10000010101010101000101"
|
||||
"00010100010100000000010"
|
||||
"00101000100000001010001"
|
||||
"00010100000001000100000"
|
||||
"00100010000000001010101"
|
||||
"01010101010001010101000"
|
||||
"10000000001010000000001"
|
||||
"00000000010100010001010"
|
||||
"10001010101000100010001"
|
||||
"01000001000100010101010"
|
||||
},
|
||||
/* 46*/ { UNICODE_MODE, -1, -1, { 0, 0, "" }, "1234", -1, 0, 10, 13, 1, "",
|
||||
"0010100000001"
|
||||
"0000000001010"
|
||||
"1000000010101"
|
||||
"0101010101000"
|
||||
"1000101000000"
|
||||
"0100010100010"
|
||||
"1000000010100"
|
||||
"0101010000010"
|
||||
"1000101000001"
|
||||
"0101010101000"
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -920,18 +971,23 @@ static void test_encode(int index, int generate, int debug) {
|
||||
for (i = 0; i < data_size; i++) {
|
||||
|
||||
if (index != -1 && i != index) continue;
|
||||
if ((debug & ZINT_DEBUG_TEST_PRINT) && !(debug & ZINT_DEBUG_TEST_LESS_NOISY)) printf("i:%d\n", i);
|
||||
|
||||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DOTCODE, data[i].input_mode, -1 /*eci*/, -1, data[i].option_2, data[i].option_3, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, %s, \"%s\", %d, %s, %d, %d, %d, \"%s\",\n",
|
||||
printf(" /*%3d*/ { %s, %d, %s, { %d, %d, \"%s\" }, \"%s\", %d, %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].option_2, testUtilOption3Name(data[i].option_3),
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
|
||||
testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
@ -1025,6 +1081,140 @@ static void test_fuzz(int index, int debug) {
|
||||
testFinish();
|
||||
}
|
||||
|
||||
#define GF 113
|
||||
|
||||
// Dummy to generate pre-calculated coefficients for GF(113) of generator polys of degree 3 to 39
|
||||
static void test_generate(int generate) {
|
||||
|
||||
// roots (antilogs): root[0] = 1; for (i = 1; i < GF - 1; i++) root[i] = (PM * root[i - 1]) % GF;
|
||||
static int root[GF - 1] = {
|
||||
1, 3, 9, 27, 81, 17, 51, 40, 7, 21,
|
||||
63, 76, 2, 6, 18, 54, 49, 34, 102, 80,
|
||||
14, 42, 13, 39, 4, 12, 36, 108, 98, 68,
|
||||
91, 47, 28, 84, 26, 78, 8, 24, 72, 103,
|
||||
83, 23, 69, 94, 56, 55, 52, 43, 16, 48,
|
||||
31, 93, 53, 46, 25, 75, 112, 110, 104, 86,
|
||||
32, 96, 62, 73, 106, 92, 50, 37, 111, 107,
|
||||
95, 59, 64, 79, 11, 33, 99, 71, 100, 74,
|
||||
109, 101, 77, 5, 15, 45, 22, 66, 85, 29,
|
||||
87, 35, 105, 89, 41, 10, 30, 90, 44, 19,
|
||||
57, 58, 61, 70, 97, 65, 82, 20, 60, 67,
|
||||
88, 38
|
||||
};
|
||||
int i, j, nc, cind, ci;
|
||||
|
||||
// Degree nc has nc + 1 terms
|
||||
char coefs[820 - 5] = {0}; // 40*(41 + 1)/2 == 820 less 2 + 3 (degrees 1 and 2)
|
||||
int cinds[39 - 2] = {0};
|
||||
|
||||
if (!generate) {
|
||||
return;
|
||||
}
|
||||
|
||||
printf(" static const char coefs[820 - 5] = { /* 40*(41 + 1)/2 == 820 less 2 + 3 (degrees 1 and 2) */\n");
|
||||
for (nc = 3, cind = 0, ci = 0; nc <= 39; cind += nc + 1, ci++, nc++) {
|
||||
cinds[ci] = cind;
|
||||
|
||||
coefs[cind] = 1;
|
||||
for (i = 1; i <= nc; i++) {
|
||||
for (j = nc; j >= 1; j--) {
|
||||
coefs[cind + j] = (GF + coefs[cind + j] - (root[i] * coefs[cind + j - 1]) % GF) % GF;
|
||||
}
|
||||
}
|
||||
printf(" ");
|
||||
for (i = 0; i <= nc; i++) {
|
||||
if (i == 22) printf("\n ");
|
||||
printf(" %3d,", coefs[cinds[ci] + i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf(" };\n");
|
||||
|
||||
printf(" static const short cinds[39 - 2] = { /* Indexes into above coefs[] array */\n ");
|
||||
for (i = 0; i < ARRAY_SIZE(cinds); i++) {
|
||||
if (i == 22) printf("\n ");
|
||||
printf(" %3d,", cinds[i]);
|
||||
}
|
||||
printf("\n };\n");
|
||||
}
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define TEST_PERF_ITERATIONS 1000
|
||||
|
||||
// Not a real test, just performance indicator
|
||||
static void test_perf(int index, int debug) {
|
||||
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
int option_1;
|
||||
int option_2;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DOTCODE, -1, -1, -1,
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM"
|
||||
"NOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJK"
|
||||
"LMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFG"
|
||||
"HIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567"
|
||||
"890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcde"
|
||||
"fghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO",
|
||||
0, 124, 185, "960 chars, text/numeric" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
||||
clock_t start, total_encode = 0, total_buffer = 0, diff_encode, diff_buffer;
|
||||
|
||||
if (!(debug & ZINT_DEBUG_TEST_PERFORMANCE)) { /* -d 256 */
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < data_size; i++) {
|
||||
int j;
|
||||
|
||||
if (index != -1 && i != index) continue;
|
||||
|
||||
diff_encode = diff_buffer = 0;
|
||||
|
||||
for (j = 0; j < TEST_PERF_ITERATIONS; j++) {
|
||||
struct zint_symbol *symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
start = clock();
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
diff_encode += clock() - start;
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
assert_equal(symbol->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);
|
||||
|
||||
start = clock();
|
||||
ret = ZBarcode_Buffer(symbol, 0 /*rotate_angle*/);
|
||||
diff_buffer += clock() - start;
|
||||
assert_zero(ret, "i:%d ZBarcode_Buffer ret %d != 0 (%s)\n", i, ret, symbol->errtxt);
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
}
|
||||
|
||||
printf("%s: diff_encode %gms, diff_buffer %gms\n", data[i].comment, diff_encode * 1000.0 / CLOCKS_PER_SEC, diff_buffer * 1000.0 / CLOCKS_PER_SEC);
|
||||
|
||||
total_encode += diff_encode;
|
||||
total_buffer += diff_buffer;
|
||||
}
|
||||
if (index != -1) {
|
||||
printf("totals: encode %gms, buffer %gms\n", total_encode * 1000.0 / CLOCKS_PER_SEC, total_buffer * 1000.0 / CLOCKS_PER_SEC);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
|
||||
@ -1033,6 +1223,9 @@ int main(int argc, char *argv[]) {
|
||||
{ "test_input", test_input, 1, 1, 1 },
|
||||
{ "test_encode", test_encode, 1, 1, 1 },
|
||||
{ "test_fuzz", test_fuzz, 1, 0, 1 },
|
||||
{ "test_fuzz", test_fuzz, 1, 0, 1 },
|
||||
{ "test_generate", test_generate, 0, 1, 0 },
|
||||
{ "test_perf", test_perf, 1, 0, 1 },
|
||||
};
|
||||
|
||||
testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
|
||||
|
@ -132,6 +132,7 @@ static void test_print(int index, int generate, int debug) {
|
||||
float height;
|
||||
float scale;
|
||||
float dot_size;
|
||||
struct zint_structapp structapp;
|
||||
char *fgcolour;
|
||||
char *bgcolour;
|
||||
char *data;
|
||||
@ -139,34 +140,35 @@ static void test_print(int index, int generate, int debug) {
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, "", "", "12", "dotcode_1.0.gif", "" },
|
||||
/* 1*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0.1, "", "", "12", "dotcode_1.0_ds0.1.gif", "" },
|
||||
/* 2*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 1.1, "", "", "12", "dotcode_1.0_ds1.1.gif", "" },
|
||||
/* 3*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 0, "", "", "12", "dotcode_1.5.gif", "" },
|
||||
/* 4*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 0.4, "", "", "12", "dotcode_1.5_ds0.4.gif", "" },
|
||||
/* 5*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 1.1, "", "", "12", "dotcode_1.5_ds1.1.gif", "" },
|
||||
/* 6*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 2.1, "", "", "12", "dotcode_1.5_ds2.1.gif", "" },
|
||||
/* 7*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 0, "", "", "12", "dotcode_2.0.gif", "" },
|
||||
/* 8*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 0.9, "", "", "12", "dotcode_2.0_ds0.9.gif", "" },
|
||||
/* 9*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 1.1, "", "", "12", "dotcode_2.0_ds1.1.gif", "" },
|
||||
/* 10*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 0, "", "", "12", "dotcode_3.0.gif", "" },
|
||||
/* 11*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 0.4, "", "", "12", "dotcode_3.0_ds0.4.gif", "" },
|
||||
/* 12*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 1.1, "", "", "12", "dotcode_3.0_ds1.1.gif", "" },
|
||||
/* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 0, "", "", "12", "dotcode_3.5.gif", "" },
|
||||
/* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 0.4, "", "", "12", "dotcode_3.5_ds0.4.gif", "" },
|
||||
/* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 1.1, "", "", "12", "dotcode_3.5_ds1.1.gif", "" },
|
||||
/* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 0, "", "", "12", "dotcode_5.0.gif", "" },
|
||||
/* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 0.2, "", "", "12", "dotcode_5.0_ds0.2.gif", "" },
|
||||
/* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 1.1, "", "", "12", "dotcode_5.0_ds1.1.gif", "" },
|
||||
/* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 1.7, "", "", "12", "dotcode_5.0_ds1.7.gif", "" },
|
||||
/* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, "2674C344", "FDFFC2CC", "12", "dotcode_bgfgalpha.gif", "" },
|
||||
/* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, "00000000", "FFFFFF00", "12", "dotcode_bgfgtrans.gif", "" },
|
||||
/* 22*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, 0, 0, 0, "0000FF", "FF0000", "12", "ultra_fgbg_hvwsp1_box1.gif", "" },
|
||||
/* 23*/ { BARCODE_ITF14, 4, BARCODE_BIND, 24, -1, -1, -1, 61.8, 3, 0, "", "", "0501054800395", "itf14_height61.8_bind4_wsp24_3.gif", "#204 ARM-Cortex crash" },
|
||||
/* 24*/ { BARCODE_ITF14, 0, BARCODE_BIND, -1, -1, -1, -1, 0.5, 0.5, 0, "", "", "0501054800395", "itf14_height0.5_box0_0.5.gif", "No box, no text" },
|
||||
/* 25*/ { BARCODE_ITF14, -1, -1, -1, -1, -1, -1, 0.5, 1.1, 0, "", "", "0501054800395", "itf14_height0.5_1.1.gif", "" },
|
||||
/* 26*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, 0.5, 0, 0, "", "", "1234567890", "code16k_height0.5_wsp3_vwsp5.gif", "Separator covers bars" },
|
||||
/* 27*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, 1.5, 0, 0, "", "", "1234567890", "code16k_height1.5_wsp3_vwsp5.gif", "" },
|
||||
/* 0*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "12", "dotcode_1.0.gif", "" },
|
||||
/* 1*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0.1, { 0, 0, "" }, "", "", "12", "dotcode_1.0_ds0.1.gif", "" },
|
||||
/* 2*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_1.0_ds1.1.gif", "" },
|
||||
/* 3*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 0, { 0, 0, "" }, "", "", "12", "dotcode_1.5.gif", "" },
|
||||
/* 4*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds0.4.gif", "" },
|
||||
/* 5*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds1.1.gif", "" },
|
||||
/* 6*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 2.1, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds2.1.gif", "" },
|
||||
/* 7*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 0, { 0, 0, "" }, "", "", "12", "dotcode_2.0.gif", "" },
|
||||
/* 8*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 0.9, { 0, 0, "" }, "", "", "12", "dotcode_2.0_ds0.9.gif", "" },
|
||||
/* 9*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_2.0_ds1.1.gif", "" },
|
||||
/* 10*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 0, { 0, 0, "" }, "", "", "12", "dotcode_3.0.gif", "" },
|
||||
/* 11*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_3.0_ds0.4.gif", "" },
|
||||
/* 12*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_3.0_ds1.1.gif", "" },
|
||||
/* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 0, { 0, 0, "" }, "", "", "12", "dotcode_3.5.gif", "" },
|
||||
/* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_3.5_ds0.4.gif", "" },
|
||||
/* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_3.5_ds1.1.gif", "" },
|
||||
/* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 0, { 0, 0, "" }, "", "", "12", "dotcode_5.0.gif", "" },
|
||||
/* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 0.2, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds0.2.gif", "" },
|
||||
/* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds1.1.gif", "" },
|
||||
/* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 1.7, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds1.7.gif", "" },
|
||||
/* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "2674C344", "FDFFC2CC", "12", "dotcode_bgfgalpha.gif", "" },
|
||||
/* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "00000000", "FFFFFF00", "12", "dotcode_bgfgtrans.gif", "" },
|
||||
/* 22*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF", "FF0000", "12", "ultra_fgbg_hvwsp1_box1.gif", "" },
|
||||
/* 23*/ { BARCODE_ITF14, 4, BARCODE_BIND, 24, -1, -1, -1, 61.8, 3, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height61.8_bind4_wsp24_3.gif", "#204 ARM-Cortex crash" },
|
||||
/* 24*/ { BARCODE_ITF14, 0, BARCODE_BIND, -1, -1, -1, -1, 0.5, 0.5, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height0.5_box0_0.5.gif", "No box, no text" },
|
||||
/* 25*/ { BARCODE_ITF14, -1, -1, -1, -1, -1, -1, 0.5, 1.1, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height0.5_1.1.gif", "" },
|
||||
/* 26*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, 0.5, 0, 0, { 0, 0, "" }, "", "", "1234567890", "code16k_height0.5_wsp3_vwsp5.gif", "Separator covers bars" },
|
||||
/* 27*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, 1.5, 0, 0, { 0, 0, "" }, "", "", "1234567890", "code16k_height1.5_wsp3_vwsp5.gif", "" },
|
||||
/* 28*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 2, 9, "001002" }, "", "", "1234567890", "datamatrix_seq2of9.gif", "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -217,6 +219,9 @@ static void test_print(int index, int generate, int debug) {
|
||||
if (data[i].dot_size) {
|
||||
symbol->dot_size = data[i].dot_size;
|
||||
}
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
if (*data[i].fgcolour) {
|
||||
strcpy(symbol->fgcolour, data[i].fgcolour);
|
||||
}
|
||||
|
@ -96,29 +96,40 @@ static void test_large(int index, int debug) {
|
||||
static void test_options(int index, int debug) {
|
||||
|
||||
struct item {
|
||||
char *data;
|
||||
int option_1;
|
||||
int option_2;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret_encode;
|
||||
int ret_vector;
|
||||
int expected_size;
|
||||
const char *expected_errtxt;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { "12345", 0, 0, 0, 0, 18 },
|
||||
/* 1*/ { "12345", 0, 1, 0, 0, 18 },
|
||||
/* 2*/ { "12345", 0, 2, 0, 0, 30 },
|
||||
/* 3*/ { "12345", 0, 14, 0, 0, 18 }, // Version > max version 13 so ignored
|
||||
/* 4*/ { "12345", 0, 13, 0, 0, 162 },
|
||||
/* 5*/ { "1234567890123456789", 0, 1, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 6*/ { "1234567890123456789", 0, 2, 0, 0, 30 },
|
||||
/* 7*/ { "123456789012345678", 0, 0, 0, 0, 30 }, // Version auto-set to 2
|
||||
/* 8*/ { "123456789012345678", 0, 1, 0, 0, 18 },
|
||||
/* 9*/ { "123456789012345678", 5, 1, 0, 0, 18 }, // Version specified so overrides ECC level which gets reduced to 4
|
||||
/* 10*/ { "123456789012345678", 5, 0, 0, 0, 30 }, // Version not specified so increased to allow for ECC level
|
||||
/* 11*/ { "123456789012345678", 6, 0, 0, 0, 30 }, // ECC > max ECC 5 so ignored and auto-settings version 2, ECC 4 used
|
||||
/* 12*/ { "123456789012345678", 1, 0, 0, 0, 30 }, // ECC < min ECC 2, ECC 2 used
|
||||
/* 13*/ { "123456789012345678", 4, 1, 0, 0, 18 },
|
||||
/* 0*/ { 0, 0, { 0, 0, "" }, "12345", 0, 0, 18, "" },
|
||||
/* 1*/ { 0, 1, { 0, 0, "" }, "12345", 0, 0, 18, "" },
|
||||
/* 2*/ { 0, 2, { 0, 0, "" }, "12345", 0, 0, 30, "" },
|
||||
/* 3*/ { 0, 14, { 0, 0, "" }, "12345", 0, 0, 18, "" }, // Version > max version 13 so ignored
|
||||
/* 4*/ { 0, 13, { 0, 0, "" }, "12345", 0, 0, 162, "" },
|
||||
/* 5*/ { 0, 1, { 0, 0, "" }, "1234567890123456789", ZINT_ERROR_TOO_LONG, -1, -1, "Error 534: Input data too long for selected symbol size" },
|
||||
/* 6*/ { 0, 2, { 0, 0, "" }, "1234567890123456789", 0, 0, 30, "" },
|
||||
/* 7*/ { 0, 0, { 0, 0, "" }, "123456789012345678", 0, 0, 30, "" }, // Version auto-set to 2
|
||||
/* 8*/ { 0, 1, { 0, 0, "" }, "123456789012345678", 0, 0, 18, "" },
|
||||
/* 9*/ { 5, 1, { 0, 0, "" }, "123456789012345678", 0, 0, 18, "" }, // Version specified so overrides ECC level which gets reduced to 4
|
||||
/* 10*/ { 5, 0, { 0, 0, "" }, "123456789012345678", 0, 0, 30, "" }, // Version not specified so increased to allow for ECC level
|
||||
/* 11*/ { 6, 0, { 0, 0, "" }, "123456789012345678", 0, 0, 30, "" }, // ECC > max ECC 5 so ignored and auto-settings version 2, ECC 4 used
|
||||
/* 12*/ { 1, 0, { 0, 0, "" }, "123456789012345678", 0, 0, 30, "" }, // ECC < min ECC 2, ECC 2 used
|
||||
/* 13*/ { 4, 1, { 0, 0, "" }, "123456789012345678", 0, 0, 18, "" },
|
||||
/* 14*/ { 0, 0, { 1, 2, "" }, "12345", 0, 0, 18, "" },
|
||||
/* 15*/ { 0, 0, { 1, 1, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 536: Structured Append count out of range (2-16)" },
|
||||
/* 16*/ { 0, 0, { 1, 17, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 536: Structured Append count out of range (2-16)" },
|
||||
/* 17*/ { 0, 0, { 0, 2, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 537: Structured Append index out of range (1-2)" },
|
||||
/* 18*/ { 0, 0, { 3, 2, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 537: Structured Append index out of range (1-2)" },
|
||||
/* 19*/ { 0, 0, { 1, 2, "255" }, "12345", 0, 0, 18, "" },
|
||||
/* 20*/ { 0, 0, { 1, 2, "1234" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 538: Structured Append ID too long (3 digit maximum)" },
|
||||
/* 21*/ { 0, 0, { 1, 2, "A" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 539: Invalid Structured Append ID (digits only)" },
|
||||
/* 22*/ { 0, 0, { 1, 2, "256" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 530: Structured Append ID '256' out of range (0-255)" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -134,15 +145,21 @@ static void test_options(int index, int debug) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_GRIDMATRIX, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret_encode, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret_encode, symbol->errtxt);
|
||||
if (ret < ZINT_ERROR) {
|
||||
assert_equal(symbol->width, data[i].expected_size, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_size);
|
||||
assert_equal(symbol->rows, data[i].expected_size, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_size);
|
||||
}
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d symbol->errtxt %s != %s\n", i, symbol->errtxt, data[i].expected_errtxt);
|
||||
|
||||
if (data[i].ret_vector != -1) {
|
||||
ret = ZBarcode_Buffer_Vector(symbol, 0);
|
||||
assert_equal(ret, data[i].ret_vector, "i:%d ZBarcode_Buffer_Vector ret %d != %d\n", i, ret, data[i].ret_vector);
|
||||
assert_equal(symbol->width, data[i].expected_size, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_size);
|
||||
assert_equal(symbol->rows, data[i].expected_size, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_size);
|
||||
}
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
@ -158,6 +175,7 @@ static void test_input(int index, int generate, int debug) {
|
||||
int eci;
|
||||
int output_options;
|
||||
int option_3;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
int expected_eci;
|
||||
@ -170,117 +188,122 @@ static void test_input(int index, int generate, int debug) {
|
||||
// ㈩ U+3229 in GB 2312 0x226E
|
||||
// 一 U+4E00 in GB 2312 0x523B
|
||||
struct item data[] = {
|
||||
/* 0*/ { UNICODE_MODE, 0, -1, -1, "é", 0, 0, "30 01 69 00", "B1 (ISO 8859-1)" },
|
||||
/* 1*/ { UNICODE_MODE, 3, -1, -1, "é", 0, 3, "60 01 58 00 74 40", "ECI-3 B1 (ISO 8859-1)" },
|
||||
/* 2*/ { UNICODE_MODE, 29, -1, -1, "é", 0, 29, "60 0E 44 2A 37 7C 00", "ECI-29 H1 (GB 2312)" },
|
||||
/* 3*/ { UNICODE_MODE, 26, -1, -1, "é", 0, 26, "60 0D 18 01 61 6A 20", "ECI-26 B2 (UTF-8)" },
|
||||
/* 4*/ { UNICODE_MODE, 26, -1, ZINT_FULL_MULTIBYTE, "é", 0, 26, "60 0D 05 28 4F 7C 00", "ECI-26 H1 (UTF-8) (full multibyte)" },
|
||||
/* 5*/ { DATA_MODE, 0, -1, -1, "é", 0, 0, "30 03 43 54 40", "B2 (UTF-8)" },
|
||||
/* 6*/ { DATA_MODE, 0, -1, ZINT_FULL_MULTIBYTE, "é", 0, 0, "0A 51 1F 78 00", "H1 (UTF-8) (full multibyte)" },
|
||||
/* 7*/ { DATA_MODE, 0, -1, -1, "\351", 0, 0, "30 01 69 00", "B1 (ISO 8859-1) (0xE9)" },
|
||||
/* 8*/ { UNICODE_MODE, 0, -1, -1, "β", 0, 0, "08 40 2F 78 00", "H1 (GB 2312)" },
|
||||
/* 9*/ { UNICODE_MODE, 9, -1, -1, "β", 0, 9, "60 04 58 00 71 00", "ECI-9 B1 (ISO 8859-7)" },
|
||||
/* 10*/ { UNICODE_MODE, 29, -1, -1, "β", 0, 29, "60 0E 44 20 17 7C 00", "ECI-29 H1 (GB 2312)" },
|
||||
/* 11*/ { UNICODE_MODE, 26, -1, -1, "β", 0, 26, "60 0D 18 01 67 2C 40", "ECI-26 H1 (UTF-8)" },
|
||||
/* 12*/ { UNICODE_MODE, 26, -1, ZINT_FULL_MULTIBYTE, "β", 0, 26, "60 0D 05 6B 17 7C 00", "ECI-26 H1 (UTF-8) (full multibyte)" },
|
||||
/* 13*/ { DATA_MODE, 0, -1, -1, "β", 0, 0, "30 03 4E 59 00", "B2 (UTF-8)" },
|
||||
/* 14*/ { DATA_MODE, 0, -1, ZINT_FULL_MULTIBYTE, "β", 0, 0, "0B 56 2F 78 00", "H1 (UTF-8) (full multibyte)" },
|
||||
/* 15*/ { UNICODE_MODE, 0, -1, -1, "ÿ", 0, 0, "30 01 7F 00", "B1 (ISO 8859-1)" },
|
||||
/* 16*/ { UNICODE_MODE, 0, -1, -1, "ÿÿÿ", 0, 0, "30 05 7F 7F 7F 60", "B3 (ISO 8859-1)" },
|
||||
/* 17*/ { UNICODE_MODE, 0, -1, -1, "㈩一", 0, 0, "08 15 68 0E 7F 70 00", "H2 (GB 2312)" },
|
||||
/* 18*/ { UNICODE_MODE, 29, -1, -1, "㈩一", 0, 29, "60 0E 44 0A 74 07 3F 78 00", "ECI-29 H2 (GB 2312)" },
|
||||
/* 19*/ { DATA_MODE, 0, -1, -1, "\177\177", 0, 0, "30 02 7F 3F 40", "B2 (ASCII)" },
|
||||
/* 20*/ { DATA_MODE, 0, -1, -1, "\177\177\177", 0, 0, "30 04 7F 3F 5F 60", "B3 (ASCII)" },
|
||||
/* 21*/ { UNICODE_MODE, 0, -1, -1, "123", 0, 0, "10 1E 7F 68", "N3 (ASCII)" },
|
||||
/* 22*/ { UNICODE_MODE, 0, -1, -1, " 123", 0, 0, "11 7A 03 6F 7D 00", "N4 (ASCII)" },
|
||||
/* 23*/ { UNICODE_MODE, 0, -1, -1, "1+23", 0, 0, "11 7B 03 6F 7D 00", "N4 (ASCII)" },
|
||||
/* 24*/ { UNICODE_MODE, 0, -1, -1, "12.3", 0, 0, "11 7C 63 6F 7D 00", "N4 (ASCII)" },
|
||||
/* 25*/ { UNICODE_MODE, 0, -1, -1, "123,", 0, 0, "10 1E 7F 73 76 5E 60", "N3 L1 (ASCII)" },
|
||||
/* 26*/ { UNICODE_MODE, 0, -1, -1, "123,4", 0, 0, "14 1E 7F 51 48 3F 50", "N5 (ASCII)" },
|
||||
/* 27*/ { UNICODE_MODE, 0, -1, -1, "\015\012123", 0, 0, "11 7D 63 6F 7D 00", "N4 (ASCII) (EOL)" },
|
||||
/* 28*/ { UNICODE_MODE, 0, -1, -1, "1\015\01223", 0, 0, "11 7E 03 6F 7D 00", "N4 (ASCII) (EOL)" },
|
||||
/* 29*/ { UNICODE_MODE, 0, -1, -1, "12\015\0123", 0, 0, "11 7E 23 6F 7D 00", "N4 (ASCII) (EOL)" },
|
||||
/* 30*/ { UNICODE_MODE, 0, -1, -1, "123\015\012", 0, 0, "10 1E 7F 7C 01 06 42 40", "N3 B2 (ASCII) (EOL)" },
|
||||
/* 31*/ { UNICODE_MODE, 0, -1, -1, "123\015\0124", 0, 0, "14 1E 7F 5D 48 3F 50", "N5 (ASCII) (EOL)" },
|
||||
/* 32*/ { UNICODE_MODE, 0, -1, -1, "2.2.0", 0, 0, "15 7C 46 73 78 40 07 7A", "N5 (ASCII)" },
|
||||
/* 33*/ { UNICODE_MODE, 0, -1, -1, "2.2.0.5", 0, 0, "30 0C 32 17 0C 45 63 01 38 6A 00", "B7 (ASCII)" },
|
||||
/* 34*/ { UNICODE_MODE, 0, -1, -1, "2.2.0.56", 0, 0, "13 7C 46 73 78 40 07 71 46 0F 74", "N8 (ASCII)" },
|
||||
/* 35*/ { UNICODE_MODE, 0, -1, -1, "20.12.13.\015\012", 0, 0, "11 7C 66 27 79 0D 2F 7F 00 45 60 68 28 00", "N8 B3 (ASCII)" },
|
||||
/* 36*/ { UNICODE_MODE, 0, -1, -1, "ABCDE\011F", 0, 0, "20 01 08 32 3E 49 17 30", "U7 (ASCII)" },
|
||||
/* 37*/ { UNICODE_MODE, 0, -1, -1, "1 1234ABCD12.2abcd-12", 0, 0, "13 7A 23 41 2A 3F 68 01 08 3E 4F 66 1E 5F 70 00 44 1F 2F 6E 0F 0F 74", "N6 U4 N4 L4 N3 (ASCII)" },
|
||||
/* 38*/ { UNICODE_MODE, 0, -1, -1, "1 123ABCDE12.2abcd-12", 0, 0, "28 1F 40 42 06 28 59 43 27 01 05 7D 56 42 49 16 34 7F 6D 30 08 2F 60", "M21 (ASCII)" },
|
||||
/* 39*/ { UNICODE_MODE, 0, -1, -1, "国外通信教材 Matlab6.5", 0, 0, "09 63 27 20 4E 24 1F 05 21 58 22 13 7E 1E 4C 78 09 56 00 3D 3F 4A 45 3F 50", "H6 U2 L5 N3 (GB 2312) (Same as D.2 example)" },
|
||||
/* 40*/ { UNICODE_MODE, 0, -1, -1, "AAT", 0, 0, "20 00 4F 30", "U3 (ASCII)" },
|
||||
/* 41*/ { UNICODE_MODE, 0, -1, -1, "aat", 0, 0, "18 00 4F 30", "L3 (ASCII)" },
|
||||
/* 42*/ { UNICODE_MODE, 0, -1, -1, "AAT2556", 0, 0, "20 00 4F 58 7F 65 47 7A", "U3 N4 (ASCII) (note same bit count as M7)" },
|
||||
/* 43*/ { UNICODE_MODE, 0, -1, -1, "AAT2556 ", 0, 0, "29 22 4E 42 0A 14 37 6F 60", "M8 (ASCII)" },
|
||||
/* 44*/ { UNICODE_MODE, 0, -1, -1, "AAT2556 电", 0, 0, "29 22 4E 42 0A 14 37 6F 62 2C 1F 7E 00", "M8 H1 (GB 2312)" },
|
||||
/* 45*/ { UNICODE_MODE, 0, -1, -1, " 200", 0, 0, "11 7A 06 23 7D 00", "N4 (ASCII)" },
|
||||
/* 46*/ { UNICODE_MODE, 0, -1, -1, " 200mA至", 0, 0, "2F 60 40 00 60 2B 78 63 41 7F 40", "M6 H1 (GB 2312)" },
|
||||
/* 47*/ { UNICODE_MODE, 0, -1, -1, "2A tel:86 019 82512738", 0, 0, "28 22 5F 4F 29 48 5F 6D 7E 6F 55 57 1F 28 63 0F 5A 11 64 0F 74", "M2 L5(with control) N15 (ASCII)" },
|
||||
/* 48*/ { UNICODE_MODE, 0, -1, -1, "至2A tel:86 019 82512738", 0, 0, "30 07 56 60 4C 48 13 6A 32 17 7B 3F 5B 75 35 67 6A 18 63 76 44 39 03 7D 00", "B4 L5(with control) N15 (GB 2312)" },
|
||||
/* 49*/ { UNICODE_MODE, 0, -1, -1, "AAT2556 电池充电器+降压转换器 200mA至2A tel:86 019 82512738", 0, 0, "(62) 29 22 22 1C 4E 41 42 7E 0A 40 14 00 37 7E 6F 00 62 7E 2C 00 1C 7E 4B 00 41 7E 18 00", "M8 H11 M6 B4 L5(with control) N15 (GB 2312) (*NOT SAME* as D3 example Figure D.1, M8 H11 M6 H1 M3 L4(with control) N15, which uses a few more bits)" },
|
||||
/* 50*/ { UNICODE_MODE, 0, -1, -1, "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::", 0, 0, "(588) 37 68 68 68 68 68 74 7E 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B512 (ASCII)" },
|
||||
/* 51*/ { UNICODE_MODE, 0, -1, -1, "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\177", 0, 0, "(591) 37 68 68 68 68 68 74 7E 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B513 (ASCII)" },
|
||||
/* 52*/ { UNICODE_MODE, 0, -1, -1, ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::至", 0, 0, "(591) 37 68 68 68 68 68 74 7C 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B511 H1 (GB 2312)" },
|
||||
/* 53*/ { UNICODE_MODE, 0, -1, -1, ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::至:", 0, 0, "(592) 37 68 68 68 68 68 74 7E 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B513 (GB 2312)" },
|
||||
/* 54*/ { UNICODE_MODE, 0, -1, -1, "电电123456", 0, 0, "09 30 72 61 7F 70 41 76 72 1F 68", "H2 (GB 2312) N6" },
|
||||
/* 55*/ { UNICODE_MODE, 0, -1, -1, "电电abcdef", 0, 0, "09 30 72 61 7F 71 00 08 43 10 5D 40", "H2 (GB 2312) L6" },
|
||||
/* 56*/ { UNICODE_MODE, 0, -1, -1, "电电电电电\011\011\011", 0, 0, "09 30 72 61 65 43 4B 07 16 0F 7F 14 02 04 42 21 10", "H5 (GB 2312) B3" },
|
||||
/* 57*/ { UNICODE_MODE, 0, -1, -1, "1234567电电", 0, 0, "14 1E 6E 22 5E 3F 59 30 72 61 7F 70 00", "N7 H2 (GB 2312)" },
|
||||
/* 58*/ { UNICODE_MODE, 0, -1, -1, "12345678mA 2", 0, 0, "12 1E 6E 23 06 3F 76 02 5F 02 7E 00", "N8 M4" },
|
||||
/* 59*/ { UNICODE_MODE, 0, -1, -1, "ABCDEFG电电", 0, 0, "20 01 08 32 0A 37 05 43 4B 07 7F 40", "U7 H2 (GB 2312)" },
|
||||
/* 60*/ { UNICODE_MODE, 0, -1, -1, "ABCDEFGHIJ8mA 2", 0, 0, "20 01 08 32 0A 31 68 27 70 46 02 5F 02 7E 00", "U10 M5" },
|
||||
/* 61*/ { UNICODE_MODE, 0, -1, -1, "ABCDEFGHIJ\011\011\011\011", 0, 0, "20 01 08 32 0A 31 68 27 78 03 04 42 21 10 48 00", "U10 B4" },
|
||||
/* 62*/ { UNICODE_MODE, 0, -1, -1, "8mA B123456789", 0, 0, "29 0C 05 3E 17 7C 40 7B 39 0C 2B 7E 40", "M5 N9" },
|
||||
/* 63*/ { UNICODE_MODE, 0, -1, -1, "8mA aABCDEFGH", 0, 0, "29 0C 05 3E 49 7D 00 04 21 48 29 47 6C", "M5 U8" },
|
||||
/* 64*/ { UNICODE_MODE, 0, -1, -1, "\011\011\011\011123456", 0, 0, "30 06 09 04 42 21 12 03 6D 64 3F 50", "B4 N6" },
|
||||
/* 65*/ { UNICODE_MODE, 0, -1, -1, "\011\011\011\011ABCDEF", 0, 0, "30 06 09 04 42 21 14 00 11 06 21 3B", "B4 U6" },
|
||||
/* 66*/ { UNICODE_MODE, 0, -1, -1, "\011\011\011\0118mA 2", 0, 0, "30 06 09 04 42 21 15 11 40 57 60 5F 40", "B4 M5" },
|
||||
/* 67*/ { UNICODE_MODE, 0, -1, -1, "电电电电电\015\012", 0, 0, "09 30 72 61 65 43 4B 07 16 0F 73 03 7E 00", "H7 (GB 2312)" },
|
||||
/* 68*/ { UNICODE_MODE, 0, -1, -1, "电电电电电12", 0, 0, "09 30 72 61 65 43 4B 07 16 0F 7B 37 7E 00", "H7 (GB 2312)" },
|
||||
/* 69*/ { UNICODE_MODE, 0, -1, -1, "1234567.8\015\012123456", 0, 0, "10 1E 6E 23 79 30 67 77 0F 37 11 7E 40", "N17" },
|
||||
/* 70*/ { UNICODE_MODE, 0, -1, -1, "˘", ZINT_WARN_USES_ECI, 4, "Warning 60 02 18 00 51 00", "ECI-4 B1 (ISO 8859-2)" },
|
||||
/* 71*/ { UNICODE_MODE, 4, -1, -1, "˘", 0, 4, "60 02 18 00 51 00", "ECI-4 B1 (ISO 8859-2)" },
|
||||
/* 72*/ { UNICODE_MODE, 0, -1, -1, "Ħ", ZINT_WARN_USES_ECI, 5, "Warning 60 02 58 00 50 40", "ECI-5 B1 (ISO 8859-3)" },
|
||||
/* 73*/ { UNICODE_MODE, 5, -1, -1, "Ħ", 0, 5, "60 02 58 00 50 40", "ECI-5 B1 (ISO 8859-3)" },
|
||||
/* 74*/ { UNICODE_MODE, 6, -1, -1, "ĸ", 0, 6, "60 03 18 00 51 00", "ECI-6 B1 (ISO 8859-4)" },
|
||||
/* 75*/ { UNICODE_MODE, 7, -1, -1, "Ж", 0, 7, "60 03 58 00 5B 00", "ECI-7 B1 (ISO 8859-5)" },
|
||||
/* 76*/ { UNICODE_MODE, 0, -1, -1, "Ș", ZINT_WARN_USES_ECI, 18, "Warning 60 09 18 00 55 00", "ECI-18 B1 (ISO 8859-16)" },
|
||||
/* 77*/ { UNICODE_MODE, 18, -1, -1, "Ș", 0, 18, "60 09 18 00 55 00", "ECI-18 B1 (ISO 8859-16)" },
|
||||
/* 78*/ { UNICODE_MODE, 0, -1, -1, "テ", 0, 0, "08 34 6F 78 00", "H1 (GB 2312)" },
|
||||
/* 79*/ { UNICODE_MODE, 20, -1, -1, "テ", 0, 20, "60 0A 18 01 41 59 20", "ECI-20 B2 (SHIFT JIS)" },
|
||||
/* 80*/ { UNICODE_MODE, 20, -1, -1, "テテ", 0, 20, "60 0A 18 03 41 59 30 36 28 00", "ECI-20 B4 (SHIFT JIS)" },
|
||||
/* 81*/ { UNICODE_MODE, 20, -1, -1, "\\\\", 0, 20, "60 0A 18 03 40 57 70 15 78 00", "ECI-20 B4 (SHIFT JIS)" },
|
||||
/* 82*/ { UNICODE_MODE, 0, -1, -1, "…", 0, 0, "08 01 5F 78 00", "H1 (GB 2312)" },
|
||||
/* 83*/ { UNICODE_MODE, 21, -1, -1, "…", 0, 21, "60 0A 58 00 42 40", "ECI-21 B1 (Win 1250)" },
|
||||
/* 84*/ { UNICODE_MODE, 0, -1, -1, "Ґ", ZINT_WARN_USES_ECI, 22, "Warning 60 0B 18 00 52 40", "ECI-22 B1 (Win 1251)" },
|
||||
/* 85*/ { UNICODE_MODE, 22, -1, -1, "Ґ", 0, 22, "60 0B 18 00 52 40", "ECI-22 B1 (Win 1251)" },
|
||||
/* 86*/ { UNICODE_MODE, 0, -1, -1, "˜", ZINT_WARN_USES_ECI, 23, "Warning 60 0B 58 00 4C 00", "ECI-23 B1 (Win 1252)" },
|
||||
/* 87*/ { UNICODE_MODE, 23, -1, -1, "˜", 0, 23, "60 0B 58 00 4C 00", "ECI-23 B1 (Win 1252)" },
|
||||
/* 88*/ { UNICODE_MODE, 24, -1, -1, "پ", 0, 24, "60 0C 18 00 40 40", "ECI-24 B1 (Win 1256)" },
|
||||
/* 89*/ { UNICODE_MODE, 0, -1, -1, "က", ZINT_WARN_USES_ECI, 26, "Warning 60 0D 18 02 70 60 10 00", "ECI-26 B3 (UTF-8)" },
|
||||
/* 90*/ { UNICODE_MODE, 25, -1, -1, "က", 0, 25, "60 0C 58 01 08 00 00", "ECI-25 B2 (UCS-2BE)" },
|
||||
/* 91*/ { UNICODE_MODE, 25, -1, -1, "ကက", 0, 25, "60 0C 58 03 08 00 02 00 00 00", "ECI-25 B4 (UCS-2BE)" },
|
||||
/* 92*/ { UNICODE_MODE, 25, -1, -1, "12", 0, 25, "60 0C 58 03 00 0C 20 03 10 00", "ECI-25 B4 (UCS-2BE ASCII)" },
|
||||
/* 93*/ { UNICODE_MODE, 27, -1, -1, "@", 0, 27, "60 0D 4F 77 2E 60", "ECI-27 L1 (ASCII)" },
|
||||
/* 94*/ { UNICODE_MODE, 0, -1, -1, "龘", ZINT_WARN_USES_ECI, 26, "Warning 60 0D 18 02 74 6F 53 00", "ECI-26 B3 (UTF-8)" },
|
||||
/* 95*/ { UNICODE_MODE, 28, -1, -1, "龘", 0, 28, "60 0E 18 01 7C 75 20", "ECI-28 B2 (Big5)" },
|
||||
/* 96*/ { UNICODE_MODE, 28, -1, -1, "龘龘", 0, 28, "60 0E 18 03 7C 75 3F 1D 28 00", "ECI-28 B4 (Big5)" },
|
||||
/* 97*/ { UNICODE_MODE, 0, -1, -1, "齄", 0, 0, "0F 4B 6F 78 00", "H1 (GB 2312)" },
|
||||
/* 98*/ { UNICODE_MODE, 29, -1, -1, "齄", 0, 29, "60 0E 47 65 77 7C 00", "ECI-29 H1 (GB 2312)" },
|
||||
/* 99*/ { UNICODE_MODE, 29, -1, -1, "齄齄", 0, 29, "60 0E 47 65 77 4B 6F 78 00", "ECI-29 H2 (GB 2312)" },
|
||||
/*100*/ { UNICODE_MODE, 0, -1, -1, "가", ZINT_WARN_USES_ECI, 26, "Warning 60 0D 18 02 75 2C 10 00", "ECI-26 B3 (UTF-8)" },
|
||||
/*101*/ { UNICODE_MODE, 30, -1, -1, "가", 0, 30, "60 0F 18 01 58 28 20", "ECI-30 B2 (EUC-KR)" },
|
||||
/*102*/ { UNICODE_MODE, 30, -1, -1, "가가", 0, 30, "60 0F 18 03 58 28 36 0A 08 00", "ECI-30 B4 (EUC-KR)" },
|
||||
/*103*/ { UNICODE_MODE, 170, -1, -1, "?", 0, 170, "60 55 0F 77 26 60", "ECI-170 L1 (ASCII invariant)" },
|
||||
/*104*/ { DATA_MODE, 899, -1, -1, "\200", 0, 899, "63 41 58 00 40 00", "ECI-899 B1 (8-bit binary)" },
|
||||
/*105*/ { UNICODE_MODE, 900, -1, -1, "é", 0, 900, "63 42 18 01 61 6A 20", "ECI-900 B2 (no conversion)" },
|
||||
/*106*/ { UNICODE_MODE, 1024, -1, -1, "é", 0, 1024, "64 08 00 30 03 43 54 40", "ECI-1024 B2 (no conversion)" },
|
||||
/*107*/ { UNICODE_MODE, 32768, -1, -1, "é", 0, 32768, "66 08 00 01 40 0E 0E 52 00", "ECI-32768 B2 (no conversion)" },
|
||||
/*108*/ { UNICODE_MODE, 811800, -1, -1, "é", ZINT_ERROR_INVALID_OPTION, 811800, "Error 533: Invalid ECI", "" },
|
||||
/*109*/ { UNICODE_MODE, 3, -1, -1, "β", ZINT_ERROR_INVALID_DATA, 3, "Error 535: Invalid character in input data for ECI 3", "" },
|
||||
/*110*/ { UNICODE_MODE, 0, READER_INIT, -1, "12", 0, 0, "51 11 71 7E 40", "" },
|
||||
/* 0*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "é", 0, 0, "30 01 69 00", "B1 (ISO 8859-1)" },
|
||||
/* 1*/ { UNICODE_MODE, 3, -1, -1, { 0, 0, "" }, "é", 0, 3, "60 01 58 00 74 40", "ECI-3 B1 (ISO 8859-1)" },
|
||||
/* 2*/ { UNICODE_MODE, 29, -1, -1, { 0, 0, "" }, "é", 0, 29, "60 0E 44 2A 37 7C 00", "ECI-29 H1 (GB 2312)" },
|
||||
/* 3*/ { UNICODE_MODE, 26, -1, -1, { 0, 0, "" }, "é", 0, 26, "60 0D 18 01 61 6A 20", "ECI-26 B2 (UTF-8)" },
|
||||
/* 4*/ { UNICODE_MODE, 26, -1, ZINT_FULL_MULTIBYTE, { 0, 0, "" }, "é", 0, 26, "60 0D 05 28 4F 7C 00", "ECI-26 H1 (UTF-8) (full multibyte)" },
|
||||
/* 5*/ { DATA_MODE, 0, -1, -1, { 0, 0, "" }, "é", 0, 0, "30 03 43 54 40", "B2 (UTF-8)" },
|
||||
/* 6*/ { DATA_MODE, 0, -1, ZINT_FULL_MULTIBYTE, { 0, 0, "" }, "é", 0, 0, "0A 51 1F 78 00", "H1 (UTF-8) (full multibyte)" },
|
||||
/* 7*/ { DATA_MODE, 0, -1, -1, { 0, 0, "" }, "\351", 0, 0, "30 01 69 00", "B1 (ISO 8859-1) (0xE9)" },
|
||||
/* 8*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "β", 0, 0, "08 40 2F 78 00", "H1 (GB 2312)" },
|
||||
/* 9*/ { UNICODE_MODE, 9, -1, -1, { 0, 0, "" }, "β", 0, 9, "60 04 58 00 71 00", "ECI-9 B1 (ISO 8859-7)" },
|
||||
/* 10*/ { UNICODE_MODE, 29, -1, -1, { 0, 0, "" }, "β", 0, 29, "60 0E 44 20 17 7C 00", "ECI-29 H1 (GB 2312)" },
|
||||
/* 11*/ { UNICODE_MODE, 26, -1, -1, { 0, 0, "" }, "β", 0, 26, "60 0D 18 01 67 2C 40", "ECI-26 H1 (UTF-8)" },
|
||||
/* 12*/ { UNICODE_MODE, 26, -1, ZINT_FULL_MULTIBYTE, { 0, 0, "" }, "β", 0, 26, "60 0D 05 6B 17 7C 00", "ECI-26 H1 (UTF-8) (full multibyte)" },
|
||||
/* 13*/ { DATA_MODE, 0, -1, -1, { 0, 0, "" }, "β", 0, 0, "30 03 4E 59 00", "B2 (UTF-8)" },
|
||||
/* 14*/ { DATA_MODE, 0, -1, ZINT_FULL_MULTIBYTE, { 0, 0, "" }, "β", 0, 0, "0B 56 2F 78 00", "H1 (UTF-8) (full multibyte)" },
|
||||
/* 15*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ÿ", 0, 0, "30 01 7F 00", "B1 (ISO 8859-1)" },
|
||||
/* 16*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ÿÿÿ", 0, 0, "30 05 7F 7F 7F 60", "B3 (ISO 8859-1)" },
|
||||
/* 17*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "㈩一", 0, 0, "08 15 68 0E 7F 70 00", "H2 (GB 2312)" },
|
||||
/* 18*/ { UNICODE_MODE, 29, -1, -1, { 0, 0, "" }, "㈩一", 0, 29, "60 0E 44 0A 74 07 3F 78 00", "ECI-29 H2 (GB 2312)" },
|
||||
/* 19*/ { DATA_MODE, 0, -1, -1, { 0, 0, "" }, "\177\177", 0, 0, "30 02 7F 3F 40", "B2 (ASCII)" },
|
||||
/* 20*/ { DATA_MODE, 0, -1, -1, { 0, 0, "" }, "\177\177\177", 0, 0, "30 04 7F 3F 5F 60", "B3 (ASCII)" },
|
||||
/* 21*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "123", 0, 0, "10 1E 7F 68", "N3 (ASCII)" },
|
||||
/* 22*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, " 123", 0, 0, "11 7A 03 6F 7D 00", "N4 (ASCII)" },
|
||||
/* 23*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "1+23", 0, 0, "11 7B 03 6F 7D 00", "N4 (ASCII)" },
|
||||
/* 24*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "12.3", 0, 0, "11 7C 63 6F 7D 00", "N4 (ASCII)" },
|
||||
/* 25*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "123,", 0, 0, "10 1E 7F 73 76 5E 60", "N3 L1 (ASCII)" },
|
||||
/* 26*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "123,4", 0, 0, "14 1E 7F 51 48 3F 50", "N5 (ASCII)" },
|
||||
/* 27*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "\015\012123", 0, 0, "11 7D 63 6F 7D 00", "N4 (ASCII) (EOL)" },
|
||||
/* 28*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "1\015\01223", 0, 0, "11 7E 03 6F 7D 00", "N4 (ASCII) (EOL)" },
|
||||
/* 29*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "12\015\0123", 0, 0, "11 7E 23 6F 7D 00", "N4 (ASCII) (EOL)" },
|
||||
/* 30*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "123\015\012", 0, 0, "10 1E 7F 7C 01 06 42 40", "N3 B2 (ASCII) (EOL)" },
|
||||
/* 31*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "123\015\0124", 0, 0, "14 1E 7F 5D 48 3F 50", "N5 (ASCII) (EOL)" },
|
||||
/* 32*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "2.2.0", 0, 0, "15 7C 46 73 78 40 07 7A", "N5 (ASCII)" },
|
||||
/* 33*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "2.2.0.5", 0, 0, "30 0C 32 17 0C 45 63 01 38 6A 00", "B7 (ASCII)" },
|
||||
/* 34*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "2.2.0.56", 0, 0, "13 7C 46 73 78 40 07 71 46 0F 74", "N8 (ASCII)" },
|
||||
/* 35*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "20.12.13.\015\012", 0, 0, "11 7C 66 27 79 0D 2F 7F 00 45 60 68 28 00", "N8 B3 (ASCII)" },
|
||||
/* 36*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ABCDE\011F", 0, 0, "20 01 08 32 3E 49 17 30", "U7 (ASCII)" },
|
||||
/* 37*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "1 1234ABCD12.2abcd-12", 0, 0, "13 7A 23 41 2A 3F 68 01 08 3E 4F 66 1E 5F 70 00 44 1F 2F 6E 0F 0F 74", "N6 U4 N4 L4 N3 (ASCII)" },
|
||||
/* 38*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "1 123ABCDE12.2abcd-12", 0, 0, "28 1F 40 42 06 28 59 43 27 01 05 7D 56 42 49 16 34 7F 6D 30 08 2F 60", "M21 (ASCII)" },
|
||||
/* 39*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "国外通信教材 Matlab6.5", 0, 0, "09 63 27 20 4E 24 1F 05 21 58 22 13 7E 1E 4C 78 09 56 00 3D 3F 4A 45 3F 50", "H6 U2 L5 N3 (GB 2312) (Same as D.2 example)" },
|
||||
/* 40*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "AAT", 0, 0, "20 00 4F 30", "U3 (ASCII)" },
|
||||
/* 41*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "aat", 0, 0, "18 00 4F 30", "L3 (ASCII)" },
|
||||
/* 42*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "AAT2556", 0, 0, "20 00 4F 58 7F 65 47 7A", "U3 N4 (ASCII) (note same bit count as M7)" },
|
||||
/* 43*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "AAT2556 ", 0, 0, "29 22 4E 42 0A 14 37 6F 60", "M8 (ASCII)" },
|
||||
/* 44*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "AAT2556 电", 0, 0, "29 22 4E 42 0A 14 37 6F 62 2C 1F 7E 00", "M8 H1 (GB 2312)" },
|
||||
/* 45*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, " 200", 0, 0, "11 7A 06 23 7D 00", "N4 (ASCII)" },
|
||||
/* 46*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, " 200mA至", 0, 0, "2F 60 40 00 60 2B 78 63 41 7F 40", "M6 H1 (GB 2312)" },
|
||||
/* 47*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "2A tel:86 019 82512738", 0, 0, "28 22 5F 4F 29 48 5F 6D 7E 6F 55 57 1F 28 63 0F 5A 11 64 0F 74", "M2 L5(with control) N15 (ASCII)" },
|
||||
/* 48*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "至2A tel:86 019 82512738", 0, 0, "30 07 56 60 4C 48 13 6A 32 17 7B 3F 5B 75 35 67 6A 18 63 76 44 39 03 7D 00", "B4 L5(with control) N15 (GB 2312)" },
|
||||
/* 49*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "AAT2556 电池充电器+降压转换器 200mA至2A tel:86 019 82512738", 0, 0, "(62) 29 22 22 1C 4E 41 42 7E 0A 40 14 00 37 7E 6F 00 62 7E 2C 00 1C 7E 4B 00 41 7E 18 00", "M8 H11 M6 B4 L5(with control) N15 (GB 2312) (*NOT SAME* as D3 example Figure D.1, M8 H11 M6 H1 M3 L4(with control) N15, which uses a few more bits)" },
|
||||
/* 50*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::", 0, 0, "(588) 37 68 68 68 68 68 74 7E 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B512 (ASCII)" },
|
||||
/* 51*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\177", 0, 0, "(591) 37 68 68 68 68 68 74 7E 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B513 (ASCII)" },
|
||||
/* 52*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::至", 0, 0, "(591) 37 68 68 68 68 68 74 7C 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B511 H1 (GB 2312)" },
|
||||
/* 53*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::至:", 0, 0, "(592) 37 68 68 68 68 68 74 7E 74 74 74 74 74 3A 3A 3A 3A 3A 3A 3A 1D 1D 1D 1D 1D 1D 1D 0E", "B513 (GB 2312)" },
|
||||
/* 54*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "电电123456", 0, 0, "09 30 72 61 7F 70 41 76 72 1F 68", "H2 (GB 2312) N6" },
|
||||
/* 55*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "电电abcdef", 0, 0, "09 30 72 61 7F 71 00 08 43 10 5D 40", "H2 (GB 2312) L6" },
|
||||
/* 56*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "电电电电电\011\011\011", 0, 0, "09 30 72 61 65 43 4B 07 16 0F 7F 14 02 04 42 21 10", "H5 (GB 2312) B3" },
|
||||
/* 57*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "1234567电电", 0, 0, "14 1E 6E 22 5E 3F 59 30 72 61 7F 70 00", "N7 H2 (GB 2312)" },
|
||||
/* 58*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "12345678mA 2", 0, 0, "12 1E 6E 23 06 3F 76 02 5F 02 7E 00", "N8 M4" },
|
||||
/* 59*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ABCDEFG电电", 0, 0, "20 01 08 32 0A 37 05 43 4B 07 7F 40", "U7 H2 (GB 2312)" },
|
||||
/* 60*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ABCDEFGHIJ8mA 2", 0, 0, "20 01 08 32 0A 31 68 27 70 46 02 5F 02 7E 00", "U10 M5" },
|
||||
/* 61*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ABCDEFGHIJ\011\011\011\011", 0, 0, "20 01 08 32 0A 31 68 27 78 03 04 42 21 10 48 00", "U10 B4" },
|
||||
/* 62*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "8mA B123456789", 0, 0, "29 0C 05 3E 17 7C 40 7B 39 0C 2B 7E 40", "M5 N9" },
|
||||
/* 63*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "8mA aABCDEFGH", 0, 0, "29 0C 05 3E 49 7D 00 04 21 48 29 47 6C", "M5 U8" },
|
||||
/* 64*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "\011\011\011\011123456", 0, 0, "30 06 09 04 42 21 12 03 6D 64 3F 50", "B4 N6" },
|
||||
/* 65*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "\011\011\011\011ABCDEF", 0, 0, "30 06 09 04 42 21 14 00 11 06 21 3B", "B4 U6" },
|
||||
/* 66*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "\011\011\011\0118mA 2", 0, 0, "30 06 09 04 42 21 15 11 40 57 60 5F 40", "B4 M5" },
|
||||
/* 67*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "电电电电电\015\012", 0, 0, "09 30 72 61 65 43 4B 07 16 0F 73 03 7E 00", "H7 (GB 2312)" },
|
||||
/* 68*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "电电电电电12", 0, 0, "09 30 72 61 65 43 4B 07 16 0F 7B 37 7E 00", "H7 (GB 2312)" },
|
||||
/* 69*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "1234567.8\015\012123456", 0, 0, "10 1E 6E 23 79 30 67 77 0F 37 11 7E 40", "N17" },
|
||||
/* 70*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "˘", ZINT_WARN_USES_ECI, 4, "Warning 60 02 18 00 51 00", "ECI-4 B1 (ISO 8859-2)" },
|
||||
/* 71*/ { UNICODE_MODE, 4, -1, -1, { 0, 0, "" }, "˘", 0, 4, "60 02 18 00 51 00", "ECI-4 B1 (ISO 8859-2)" },
|
||||
/* 72*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "Ħ", ZINT_WARN_USES_ECI, 5, "Warning 60 02 58 00 50 40", "ECI-5 B1 (ISO 8859-3)" },
|
||||
/* 73*/ { UNICODE_MODE, 5, -1, -1, { 0, 0, "" }, "Ħ", 0, 5, "60 02 58 00 50 40", "ECI-5 B1 (ISO 8859-3)" },
|
||||
/* 74*/ { UNICODE_MODE, 6, -1, -1, { 0, 0, "" }, "ĸ", 0, 6, "60 03 18 00 51 00", "ECI-6 B1 (ISO 8859-4)" },
|
||||
/* 75*/ { UNICODE_MODE, 7, -1, -1, { 0, 0, "" }, "Ж", 0, 7, "60 03 58 00 5B 00", "ECI-7 B1 (ISO 8859-5)" },
|
||||
/* 76*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "Ș", ZINT_WARN_USES_ECI, 18, "Warning 60 09 18 00 55 00", "ECI-18 B1 (ISO 8859-16)" },
|
||||
/* 77*/ { UNICODE_MODE, 18, -1, -1, { 0, 0, "" }, "Ș", 0, 18, "60 09 18 00 55 00", "ECI-18 B1 (ISO 8859-16)" },
|
||||
/* 78*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "テ", 0, 0, "08 34 6F 78 00", "H1 (GB 2312)" },
|
||||
/* 79*/ { UNICODE_MODE, 20, -1, -1, { 0, 0, "" }, "テ", 0, 20, "60 0A 18 01 41 59 20", "ECI-20 B2 (SHIFT JIS)" },
|
||||
/* 80*/ { UNICODE_MODE, 20, -1, -1, { 0, 0, "" }, "テテ", 0, 20, "60 0A 18 03 41 59 30 36 28 00", "ECI-20 B4 (SHIFT JIS)" },
|
||||
/* 81*/ { UNICODE_MODE, 20, -1, -1, { 0, 0, "" }, "\\\\", 0, 20, "60 0A 18 03 40 57 70 15 78 00", "ECI-20 B4 (SHIFT JIS)" },
|
||||
/* 82*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "…", 0, 0, "08 01 5F 78 00", "H1 (GB 2312)" },
|
||||
/* 83*/ { UNICODE_MODE, 21, -1, -1, { 0, 0, "" }, "…", 0, 21, "60 0A 58 00 42 40", "ECI-21 B1 (Win 1250)" },
|
||||
/* 84*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "Ґ", ZINT_WARN_USES_ECI, 22, "Warning 60 0B 18 00 52 40", "ECI-22 B1 (Win 1251)" },
|
||||
/* 85*/ { UNICODE_MODE, 22, -1, -1, { 0, 0, "" }, "Ґ", 0, 22, "60 0B 18 00 52 40", "ECI-22 B1 (Win 1251)" },
|
||||
/* 86*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "˜", ZINT_WARN_USES_ECI, 23, "Warning 60 0B 58 00 4C 00", "ECI-23 B1 (Win 1252)" },
|
||||
/* 87*/ { UNICODE_MODE, 23, -1, -1, { 0, 0, "" }, "˜", 0, 23, "60 0B 58 00 4C 00", "ECI-23 B1 (Win 1252)" },
|
||||
/* 88*/ { UNICODE_MODE, 24, -1, -1, { 0, 0, "" }, "پ", 0, 24, "60 0C 18 00 40 40", "ECI-24 B1 (Win 1256)" },
|
||||
/* 89*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "က", ZINT_WARN_USES_ECI, 26, "Warning 60 0D 18 02 70 60 10 00", "ECI-26 B3 (UTF-8)" },
|
||||
/* 90*/ { UNICODE_MODE, 25, -1, -1, { 0, 0, "" }, "က", 0, 25, "60 0C 58 01 08 00 00", "ECI-25 B2 (UCS-2BE)" },
|
||||
/* 91*/ { UNICODE_MODE, 25, -1, -1, { 0, 0, "" }, "ကက", 0, 25, "60 0C 58 03 08 00 02 00 00 00", "ECI-25 B4 (UCS-2BE)" },
|
||||
/* 92*/ { UNICODE_MODE, 25, -1, -1, { 0, 0, "" }, "12", 0, 25, "60 0C 58 03 00 0C 20 03 10 00", "ECI-25 B4 (UCS-2BE ASCII)" },
|
||||
/* 93*/ { UNICODE_MODE, 27, -1, -1, { 0, 0, "" }, "@", 0, 27, "60 0D 4F 77 2E 60", "ECI-27 L1 (ASCII)" },
|
||||
/* 94*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "龘", ZINT_WARN_USES_ECI, 26, "Warning 60 0D 18 02 74 6F 53 00", "ECI-26 B3 (UTF-8)" },
|
||||
/* 95*/ { UNICODE_MODE, 28, -1, -1, { 0, 0, "" }, "龘", 0, 28, "60 0E 18 01 7C 75 20", "ECI-28 B2 (Big5)" },
|
||||
/* 96*/ { UNICODE_MODE, 28, -1, -1, { 0, 0, "" }, "龘龘", 0, 28, "60 0E 18 03 7C 75 3F 1D 28 00", "ECI-28 B4 (Big5)" },
|
||||
/* 97*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "齄", 0, 0, "0F 4B 6F 78 00", "H1 (GB 2312)" },
|
||||
/* 98*/ { UNICODE_MODE, 29, -1, -1, { 0, 0, "" }, "齄", 0, 29, "60 0E 47 65 77 7C 00", "ECI-29 H1 (GB 2312)" },
|
||||
/* 99*/ { UNICODE_MODE, 29, -1, -1, { 0, 0, "" }, "齄齄", 0, 29, "60 0E 47 65 77 4B 6F 78 00", "ECI-29 H2 (GB 2312)" },
|
||||
/*100*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "가", ZINT_WARN_USES_ECI, 26, "Warning 60 0D 18 02 75 2C 10 00", "ECI-26 B3 (UTF-8)" },
|
||||
/*101*/ { UNICODE_MODE, 30, -1, -1, { 0, 0, "" }, "가", 0, 30, "60 0F 18 01 58 28 20", "ECI-30 B2 (EUC-KR)" },
|
||||
/*102*/ { UNICODE_MODE, 30, -1, -1, { 0, 0, "" }, "가가", 0, 30, "60 0F 18 03 58 28 36 0A 08 00", "ECI-30 B4 (EUC-KR)" },
|
||||
/*103*/ { UNICODE_MODE, 170, -1, -1, { 0, 0, "" }, "?", 0, 170, "60 55 0F 77 26 60", "ECI-170 L1 (ASCII invariant)" },
|
||||
/*104*/ { DATA_MODE, 899, -1, -1, { 0, 0, "" }, "\200", 0, 899, "63 41 58 00 40 00", "ECI-899 B1 (8-bit binary)" },
|
||||
/*105*/ { UNICODE_MODE, 900, -1, -1, { 0, 0, "" }, "é", 0, 900, "63 42 18 01 61 6A 20", "ECI-900 B2 (no conversion)" },
|
||||
/*106*/ { UNICODE_MODE, 1024, -1, -1, { 0, 0, "" }, "é", 0, 1024, "64 08 00 30 03 43 54 40", "ECI-1024 B2 (no conversion)" },
|
||||
/*107*/ { UNICODE_MODE, 32768, -1, -1, { 0, 0, "" }, "é", 0, 32768, "66 08 00 01 40 0E 0E 52 00", "ECI-32768 B2 (no conversion)" },
|
||||
/*108*/ { UNICODE_MODE, 811800, -1, -1, { 0, 0, "" }, "é", ZINT_ERROR_INVALID_OPTION, 811800, "Error 533: Invalid ECI", "" },
|
||||
/*109*/ { UNICODE_MODE, 3, -1, -1, { 0, 0, "" }, "β", ZINT_ERROR_INVALID_DATA, 3, "Error 535: Invalid character in input data for ECI 3", "" },
|
||||
/*110*/ { UNICODE_MODE, 0, READER_INIT, -1, { 0, 0, "" }, "12", 0, 0, "51 11 71 7E 40", "" },
|
||||
/*111*/ { UNICODE_MODE, 0, -1, -1, { 1, 16, "" }, "12", 0, 0, "48 03 60 24 3C 3F 50", "FNC2 ID0 Cnt15 Ind0 N2" },
|
||||
/*112*/ { UNICODE_MODE, 0, READER_INIT, -1, { 1, 16, "" }, "12", 0, 0, "54 40 1E 02 23 63 7D 00", "FNC3 FNC2 ID0 Cnt15 Ind0 N2" },
|
||||
/*113*/ { UNICODE_MODE, 0, -1, -1, { 2, 16, "" }, "12", 0, 0, "48 03 62 24 3C 3F 50", "FNC2 ID0 Cnt15 Ind1 N2" },
|
||||
/*114*/ { UNICODE_MODE, 0, READER_INIT, -1, { 2, 16, "" }, "12", 0, 0, "48 03 62 24 3C 3F 50", "FNC2 ID0 Cnt15 Ind1 N2 (FNC3 omitted)" },
|
||||
/*115*/ { UNICODE_MODE, 0, -1, -1, { 3, 3, "255" }, "12", 0, 0, "4F 7C 44 24 3C 3F 50", "FNC2 ID256 Cnt2 Ind2 N2" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -300,13 +323,17 @@ static void test_input(int index, int generate, int debug) {
|
||||
debug |= ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_GRIDMATRIX, data[i].input_mode, data[i].eci, -1 /*option_1*/, -1, data[i].option_3, data[i].output_options, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d\n", i, ret, data[i].ret);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, %s, %s, \"%s\", %s, %d, \"%s\", \"%s\" },\n",
|
||||
printf(" /*%3d*/ { %s, %d, %s, %s, { %d, %d, \"%s\" }, \"%s\", %s, %d, \"%s\", \"%s\" },\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].eci, testUtilOutputOptionsName(data[i].output_options), testUtilOption3Name(data[i].option_3),
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||
testUtilErrorName(data[i].ret), ret < ZINT_ERROR ? symbol->eci : -1, symbol->errtxt, data[i].comment);
|
||||
} else {
|
||||
|
@ -471,11 +471,11 @@ static void test_cap(int index) {
|
||||
/* 0*/ { BARCODE_CODE128, ZINT_CAP_HRT, ZINT_CAP_HRT },
|
||||
/* 1*/ { BARCODE_CODE128, ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_GS1, ZINT_CAP_HRT | ZINT_CAP_STACKABLE },
|
||||
/* 2*/ { BARCODE_PDF417, ZINT_CAP_HRT | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE, ZINT_CAP_ECI | ZINT_CAP_READER_INIT },
|
||||
/* 3*/ { BARCODE_QRCODE, ZINT_CAP_HRT | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK, ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK },
|
||||
/* 3*/ { BARCODE_QRCODE, ZINT_CAP_HRT | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP, ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP },
|
||||
/* 4*/ { BARCODE_EANX_CC, ZINT_CAP_HRT | ZINT_CAP_COMPOSITE | ZINT_CAP_EXTENDABLE | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES, ZINT_CAP_HRT | ZINT_CAP_COMPOSITE | ZINT_CAP_EXTENDABLE | ZINT_CAP_GS1 | ZINT_CAP_QUIET_ZONES },
|
||||
/* 5*/ { BARCODE_HANXIN, ZINT_CAP_DOTTY | ZINT_CAP_QUIET_ZONES | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK, ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK },
|
||||
/* 6*/ { BARCODE_CODE11, ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_FIXED_RATIO | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE, 0 },
|
||||
/* 7*/ { BARCODE_POSTNET, ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_COMPOSITE | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK, 0 },
|
||||
/* 7*/ { BARCODE_POSTNET, ZINT_CAP_HRT | ZINT_CAP_STACKABLE | ZINT_CAP_EXTENDABLE | ZINT_CAP_COMPOSITE | ZINT_CAP_ECI | ZINT_CAP_GS1 | ZINT_CAP_DOTTY | ZINT_CAP_FIXED_RATIO | ZINT_CAP_READER_INIT | ZINT_CAP_FULL_MULTIBYTE | ZINT_CAP_MASK | ZINT_CAP_STRUCTAPP, 0 },
|
||||
/* 8*/ { 0, 0, 0 },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
|
@ -122,6 +122,7 @@ static void test_input(int index, int generate, int debug) {
|
||||
int eci;
|
||||
int option_1;
|
||||
int option_2;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int length;
|
||||
char *primary;
|
||||
@ -131,50 +132,56 @@ static void test_input(int index, int generate, int debug) {
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "", 0, 30, "(144) 04 01 21 21 21 21 21 21 21 21 08 0E 19 2B 20 0C 24 06 32 1C 21 21 21 21 21 21 21 21", "" },
|
||||
/* 1*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
||||
/* 2*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "A123456", ZINT_ERROR_INVALID_DATA, 0, "Error 555: Non-numeric postcode in Primary Message", "" },
|
||||
/* 3*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 4*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1 123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 5*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
||||
/* 6*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
||||
/* 7*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 8*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
||||
/* 9*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
||||
/* 10*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "0-digit postcode" },
|
||||
/* 11*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "12345678123456", 0, 30, "(144) 22 13 21 31 0B 00 32 1E 20 1C 04 14 07 30 10 07 08 28 1D 09 01 21 21 21 21 21 21 21", "8-digit postcode" },
|
||||
/* 12*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
||||
/* 13*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
||||
/* 14*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "1123456", 0, 30, "(144) 03 08 08 08 08 18 3C 1E 20 1C 13 37 07 2C 26 2D 18 29 3F 2C 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 15*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
||||
/* 16*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDEF123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "6-alphanumeric postcode" },
|
||||
/* 17*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDEFG123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "7-alphanumeric postcode truncated" },
|
||||
/* 18*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDE123456", 0, 30, "(144) 03 18 01 31 20 10 30 1E 20 1C 0F 38 38 1A 39 10 2F 37 22 12 01 21 21 21 21 21 21 21", "5-alphanumeric postcode" },
|
||||
/* 19*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AAAAAA 840001", 0, 30, "(144) 13 10 10 10 10 10 00 12 07 00 17 36 2E 38 04 29 16 0D 27 16 01 21 21 21 21 21 21 21", "6-alphanumeric postcode with padding" },
|
||||
/* 20*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AAAAA A840001", 0, 30, "(144) 03 18 10 10 10 10 00 12 07 00 19 07 29 31 26 01 23 2C 2E 07 01 21 21 21 21 21 21 21", "7-alphanumeric with embedded padding truncated" },
|
||||
/* 21*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AA\015AAA840001", ZINT_ERROR_INVALID_DATA, 0, "Error 556: Invalid character in postcode in Primary Message", "Alphanumeric postcode with CR" },
|
||||
/* 22*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "A#%-/A840001", 0, 30, "(144) 13 30 1B 1B 39 18 00 12 07 00 3F 1E 25 07 2A 1E 14 3C 28 2D 01 21 21 21 21 21 21 21", "Alphanumeric postcode with non-control Code A chars" },
|
||||
/* 23*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1A23456", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric country code" },
|
||||
/* 24*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "12345678912345A", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric service class" },
|
||||
/* 25*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "Auto-determine mode 2" },
|
||||
/* 26*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 554: Primary Message empty", "Auto-determine mode 2/3 requires primary message" },
|
||||
/* 27*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "A23456123456", 0, 30, "(144) 23 1D 0D 3D 2C 1C 30 1E 20 1C 24 35 30 31 2A 0D 17 14 16 3D 01 21 21 21 21 21 21 21", "Auto-determine mode 3" },
|
||||
/* 28*/ { UNICODE_MODE, -1, -1, 100, "A", -1, "123456123456", 0, 30, "(144) 02 10 22 07 00 20 31 1E 20 1C 0E 29 13 1B 0D 26 36 25 3B 22 3B 2A 29 3B 28 1E 30 31", "SCM prefix version" },
|
||||
/* 29*/ { UNICODE_MODE, -1, -1, 101, "A", -1, "123456123456", ZINT_ERROR_INVALID_OPTION, 0, "Error 557: Invalid SCM prefix version", "SCM prefix version" },
|
||||
/* 30*/ { UNICODE_MODE, 3, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 03 01 21 21 21 21 21 21 2F 14 23 21 05 24 27 00 24 0C 21 21 21 21 21 21 21 21", "" },
|
||||
/* 31*/ { UNICODE_MODE, 31, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 1F 01 21 21 21 21 21 21 00 2F 0E 09 39 3B 24 1A 21 05 21 21 21 21 21 21 21 21", "ECI 0x1F" },
|
||||
/* 32*/ { UNICODE_MODE, 32, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 20 20 01 21 21 21 21 21 3D 15 0F 30 0D 22 24 35 22 06 21 21 21 21 21 21 21 21", "ECI 0x20" },
|
||||
/* 33*/ { UNICODE_MODE, 1023, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 2F 3F 01 21 21 21 21 21 2E 27 23 1D 35 19 21 04 3A 26 21 21 21 21 21 21 21 21", "ECI 0x3FF" },
|
||||
/* 34*/ { UNICODE_MODE, 1024, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 30 10 00 01 21 21 21 21 11 2F 15 10 1D 29 06 35 14 2B 21 21 21 21 21 21 21 21", "ECI 0x400" },
|
||||
/* 35*/ { UNICODE_MODE, 32767, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 37 3F 3F 01 21 21 21 21 3E 15 12 01 07 30 39 27 04 2B 21 21 21 21 21 21 21 21", "ECI 0x7FFF" },
|
||||
/* 36*/ { UNICODE_MODE, 32768, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 08 00 00 01 21 21 21 10 30 3A 04 26 23 0E 21 3D 0F 21 21 21 21 21 21 21 21", "ECI 0x8000" },
|
||||
/* 37*/ { UNICODE_MODE, 65535, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 0F 3F 3F 01 21 21 21 1C 0E 1D 39 3B 0D 38 25 00 30 21 21 21 21 21 21 21 21", "ECI 0xFFFF" },
|
||||
/* 38*/ { UNICODE_MODE, 65536, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 10 00 00 01 21 21 21 2B 1F 24 06 38 2E 17 1B 10 2F 21 21 21 21 21 21 21 21", "ECI 0x10000" },
|
||||
/* 39*/ { UNICODE_MODE, 131071, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 1F 3F 3F 01 21 21 21 0F 05 09 04 2F 3A 17 09 36 31 21 21 21 21 21 21 21 21", "ECI 0x1FFFF" },
|
||||
/* 40*/ { UNICODE_MODE, 999999, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 3B 34 08 3F 01 21 21 21 26 3B 2B 23 08 17 32 05 26 35 21 21 21 21 21 21 21 21", "Max ECI" },
|
||||
/* 41*/ { UNICODE_MODE, -1, 1, -1, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 550: Invalid MaxiCode Mode", "" },
|
||||
/* 42*/ { UNICODE_MODE, -1, -1, -1, "\015", -1, "", 0, 30, "(144) 04 00 21 21 21 21 21 21 21 21 37 32 10 01 24 1B 10 11 38 0C 21 21 21 21 21 21 21 21", "" },
|
||||
/* 43*/ { UNICODE_MODE, -1, -1, -1, "\001\034\001\035\001\036\001a:b", -1, "", 0, 30, "(144) 04 3E 3E 01 20 01 21 01 22 01 27 0B 35 01 08 0D 16 02 17 1A 3F 01 33 02 21 21 21 21", "" },
|
||||
/* 0*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 01 21 21 21 21 21 21 21 21 08 0E 19 2B 20 0C 24 06 32 1C 21 21 21 21 21 21 21 21", "" },
|
||||
/* 1*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
||||
/* 2*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "A123456", ZINT_ERROR_INVALID_DATA, 0, "Error 555: Non-numeric postcode in Primary Message", "" },
|
||||
/* 3*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 4*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "1 123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 5*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
||||
/* 6*/ { UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
||||
/* 7*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 8*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
||||
/* 9*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
||||
/* 10*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "0-digit postcode" },
|
||||
/* 11*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "12345678123456", 0, 30, "(144) 22 13 21 31 0B 00 32 1E 20 1C 04 14 07 30 10 07 08 28 1D 09 01 21 21 21 21 21 21 21", "8-digit postcode" },
|
||||
/* 12*/ { UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
||||
/* 13*/ { UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
||||
/* 14*/ { UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", -1, "1123456", 0, 30, "(144) 03 08 08 08 08 18 3C 1E 20 1C 13 37 07 2C 26 2D 18 29 3F 2C 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||
/* 15*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
||||
/* 16*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "ABCDEF123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "6-alphanumeric postcode" },
|
||||
/* 17*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "ABCDEFG123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "7-alphanumeric postcode truncated" },
|
||||
/* 18*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "ABCDE123456", 0, 30, "(144) 03 18 01 31 20 10 30 1E 20 1C 0F 38 38 1A 39 10 2F 37 22 12 01 21 21 21 21 21 21 21", "5-alphanumeric postcode" },
|
||||
/* 19*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "AAAAAA 840001", 0, 30, "(144) 13 10 10 10 10 10 00 12 07 00 17 36 2E 38 04 29 16 0D 27 16 01 21 21 21 21 21 21 21", "6-alphanumeric postcode with padding" },
|
||||
/* 20*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "AAAAA A840001", 0, 30, "(144) 03 18 10 10 10 10 00 12 07 00 19 07 29 31 26 01 23 2C 2E 07 01 21 21 21 21 21 21 21", "7-alphanumeric with embedded padding truncated" },
|
||||
/* 21*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "AA\015AAA840001", ZINT_ERROR_INVALID_DATA, 0, "Error 556: Invalid character in postcode in Primary Message", "Alphanumeric postcode with CR" },
|
||||
/* 22*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "A#%-/A840001", 0, 30, "(144) 13 30 1B 1B 39 18 00 12 07 00 3F 1E 25 07 2A 1E 14 3C 28 2D 01 21 21 21 21 21 21 21", "Alphanumeric postcode with non-control Code A chars" },
|
||||
/* 23*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "1A23456", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric country code" },
|
||||
/* 24*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", -1, "12345678912345A", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric service class" },
|
||||
/* 25*/ { UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "Auto-determine mode 2" },
|
||||
/* 26*/ { UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 554: Primary Message empty", "Auto-determine mode 2/3 requires primary message" },
|
||||
/* 27*/ { UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", -1, "A23456123456", 0, 30, "(144) 23 1D 0D 3D 2C 1C 30 1E 20 1C 24 35 30 31 2A 0D 17 14 16 3D 01 21 21 21 21 21 21 21", "Auto-determine mode 3" },
|
||||
/* 28*/ { UNICODE_MODE, -1, -1, 100, { 0, 0, "" }, "A", -1, "123456123456", 0, 30, "(144) 02 10 22 07 00 20 31 1E 20 1C 0E 29 13 1B 0D 26 36 25 3B 22 3B 2A 29 3B 28 1E 30 31", "SCM prefix version" },
|
||||
/* 29*/ { UNICODE_MODE, -1, -1, 101, { 0, 0, "" }, "A", -1, "123456123456", ZINT_ERROR_INVALID_OPTION, 0, "Error 557: Invalid SCM prefix version", "SCM prefix version" },
|
||||
/* 30*/ { UNICODE_MODE, 3, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 03 01 21 21 21 21 21 21 2F 14 23 21 05 24 27 00 24 0C 21 21 21 21 21 21 21 21", "" },
|
||||
/* 31*/ { UNICODE_MODE, 31, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 1F 01 21 21 21 21 21 21 00 2F 0E 09 39 3B 24 1A 21 05 21 21 21 21 21 21 21 21", "ECI 0x1F" },
|
||||
/* 32*/ { UNICODE_MODE, 32, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 20 20 01 21 21 21 21 21 3D 15 0F 30 0D 22 24 35 22 06 21 21 21 21 21 21 21 21", "ECI 0x20" },
|
||||
/* 33*/ { UNICODE_MODE, 1023, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 2F 3F 01 21 21 21 21 21 2E 27 23 1D 35 19 21 04 3A 26 21 21 21 21 21 21 21 21", "ECI 0x3FF" },
|
||||
/* 34*/ { UNICODE_MODE, 1024, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 30 10 00 01 21 21 21 21 11 2F 15 10 1D 29 06 35 14 2B 21 21 21 21 21 21 21 21", "ECI 0x400" },
|
||||
/* 35*/ { UNICODE_MODE, 32767, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 37 3F 3F 01 21 21 21 21 3E 15 12 01 07 30 39 27 04 2B 21 21 21 21 21 21 21 21", "ECI 0x7FFF" },
|
||||
/* 36*/ { UNICODE_MODE, 32768, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 38 08 00 00 01 21 21 21 10 30 3A 04 26 23 0E 21 3D 0F 21 21 21 21 21 21 21 21", "ECI 0x8000" },
|
||||
/* 37*/ { UNICODE_MODE, 65535, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 38 0F 3F 3F 01 21 21 21 1C 0E 1D 39 3B 0D 38 25 00 30 21 21 21 21 21 21 21 21", "ECI 0xFFFF" },
|
||||
/* 38*/ { UNICODE_MODE, 65536, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 38 10 00 00 01 21 21 21 2B 1F 24 06 38 2E 17 1B 10 2F 21 21 21 21 21 21 21 21", "ECI 0x10000" },
|
||||
/* 39*/ { UNICODE_MODE, 131071, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 38 1F 3F 3F 01 21 21 21 0F 05 09 04 2F 3A 17 09 36 31 21 21 21 21 21 21 21 21", "ECI 0x1FFFF" },
|
||||
/* 40*/ { UNICODE_MODE, 999999, -1, -1, { 0, 0, "" }, "A", -1, "", 0, 30, "(144) 04 1B 3B 34 08 3F 01 21 21 21 26 3B 2B 23 08 17 32 05 26 35 21 21 21 21 21 21 21 21", "Max ECI" },
|
||||
/* 41*/ { UNICODE_MODE, -1, 1, -1, { 0, 0, "" }, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 550: Invalid MaxiCode Mode", "" },
|
||||
/* 42*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "\015", -1, "", 0, 30, "(144) 04 00 21 21 21 21 21 21 21 21 37 32 10 01 24 1B 10 11 38 0C 21 21 21 21 21 21 21 21", "" },
|
||||
/* 43*/ { UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "\001\034\001\035\001\036\001a:b", -1, "", 0, 30, "(144) 04 3E 3E 01 20 01 21 01 22 01 27 0B 35 01 08 0D 16 02 17 1A 3F 01 33 02 21 21 21 21", "" },
|
||||
/* 44*/ { UNICODE_MODE, -1, -1, -1, { 1, 2, "" }, "A", -1, "", 0, 30, "(144) 04 21 01 01 21 21 21 21 21 21 09 0B 26 03 37 0E 25 27 07 1E 21 21 21 21 21 21 21 21", "" },
|
||||
/* 45*/ { UNICODE_MODE, -1, -1, -1, { 0, 2, "" }, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 559: Structured Append index out of range (1-2)", "" },
|
||||
/* 46*/ { UNICODE_MODE, -1, -1, -1, { 1, 1, "" }, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 558: Structured Append count out of range (2-8)", "" },
|
||||
/* 47*/ { UNICODE_MODE, -1, -1, -1, { 1, 9, "" }, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 558: Structured Append count out of range (2-8)", "" },
|
||||
/* 48*/ { UNICODE_MODE, -1, -1, -1, { 3, 2, "" }, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 559: Structured Append index out of range (1-2)", "" },
|
||||
/* 49*/ { UNICODE_MODE, -1, -1, -1, { 1, 2, "A" }, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 549: Structured Append ID not available for MaxiCode", "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -194,14 +201,18 @@ static void test_input(int index, int generate, int debug) {
|
||||
symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_MAXICODE, data[i].input_mode, data[i].eci, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
strcpy(symbol->primary, data[i].primary);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, %d, %d, \"%s\", %d, \"%s\", %s, %d, \"%s\", \"%s\" },\n",
|
||||
printf(" /*%3d*/ { %s, %d, %d, %d, { %d, %d, \"%s\" }, \"%s\", %d, \"%s\", %s, %d, \"%s\", \"%s\" },\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_1, data[i].option_2,
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length, data[i].primary,
|
||||
testUtilErrorName(data[i].ret), symbol->width, symbol->errtxt, data[i].comment);
|
||||
} else {
|
||||
@ -223,6 +234,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
int input_mode;
|
||||
int option_1;
|
||||
int option_2;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int length;
|
||||
char *primary;
|
||||
@ -235,7 +247,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
char *expected;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { -1, -1, -1, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", -1, "", 0, 33, 30, 1, "ISO/IEC 16023:2000 Figure 2 (and L1), same",
|
||||
/* 0*/ { -1, -1, -1, { 0, 0, "" }, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", -1, "", 0, 33, 30, 1, "ISO/IEC 16023:2000 Figure 2 (and L1), same",
|
||||
"011111010000001000001000100111"
|
||||
"000100000001000000001010000000"
|
||||
"001011001100100110110010010010"
|
||||
@ -270,7 +282,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"001001101111101101101010011100"
|
||||
"001011000000111101100100001000"
|
||||
},
|
||||
/* 1*/ { -1, 4, -1, "MaxiCode (19 chars)", -1, "", 0, 33, 30, 0, "ISO/IEC 16023:2000 Figure H1 **NOT SAME** different encodation (figure uses '3 Shift A' among other differences); BWIPP different encodation again",
|
||||
/* 1*/ { -1, 4, -1, { 0, 0, "" }, "MaxiCode (19 chars)", -1, "", 0, 33, 30, 0, "ISO/IEC 16023:2000 Figure H1 **NOT SAME** different encodation (figure uses '3 Shift A' among other differences); BWIPP different encodation again",
|
||||
"001101011111011100000010101111"
|
||||
"101100010001001100010000001100"
|
||||
"101100001010001111001001111101"
|
||||
@ -305,7 +317,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010110010110001110100000010100"
|
||||
"010011110011000001010111100111"
|
||||
},
|
||||
/* 2*/ { DATA_MODE | ESCAPE_MODE, 2, 96, "1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G634 ALPHA DR\\GPITTSBURGH\\GPA\\R\\E", -1, "152382802840001", 0, 33, 30, 0, "ISO/IEC 16023:2000 Figure B2 **NOT SAME** uses different encodation (figure uses Latch B/Latch A instead of Shift B for '>\\R', and precedes PAD chars with Latch B); BWIPP different encodation again",
|
||||
/* 2*/ { DATA_MODE | ESCAPE_MODE, 2, 96, { 0, 0, "" }, "1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G634 ALPHA DR\\GPITTSBURGH\\GPA\\R\\E", -1, "152382802840001", 0, 33, 30, 0, "ISO/IEC 16023:2000 Figure B2 **NOT SAME** uses different encodation (figure precedes PAD chars with Latch B); BWIPP different encodation again",
|
||||
"110101110110111110111111101111"
|
||||
"010101010111000011011000010010"
|
||||
"110110110001001010101010010011"
|
||||
@ -340,7 +352,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010110101101000001111000100110"
|
||||
"110110100000010000001011110011"
|
||||
},
|
||||
/* 3*/ { -1, 3, -1, "CEN", -1, "B1050056999", 0, 33, 30, 1, "ISO/IEC 16023:2000 B.1 Example (primary only given, data arbitrary); verified manually against tec-it",
|
||||
/* 3*/ { -1, 3, -1, { 0, 0, "" }, "CEN", -1, "B1050056999", 0, 33, 30, 1, "ISO/IEC 16023:2000 B.1 Example (primary only given, data arbitrary); verified manually against tec-it",
|
||||
"000000010101010101010101010111"
|
||||
"001011000000000000000000000010"
|
||||
"111001101010101010101010101000"
|
||||
@ -375,7 +387,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010010001001110010000101000010"
|
||||
"010001011010000011010010011100"
|
||||
},
|
||||
/* 4*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, "Comité Européen de Normalisation\034rue de Stassart 36\034B-1050 BRUXELLES\034TEL +3225196811", -1, "", 0, 33, 30, 0, "ISO/IEC 16023:2000 Example F.5 **NOT SAME** uses different encodation (2 Shift A among other things); BWIPP different encodation again",
|
||||
/* 4*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, { 0, 0, "" }, "Comité Européen de Normalisation\034rue de Stassart 36\034B-1050 BRUXELLES\034TEL +3225196811", -1, "", 0, 33, 30, 0, "ISO/IEC 16023:2000 Example F.5 **NOT SAME** uses different encodation (2 Shift A among other things); BWIPP different encodation again",
|
||||
"010010100010110000000100001111"
|
||||
"001010001100110110111110100110"
|
||||
"001010011100101010011100100000"
|
||||
@ -410,7 +422,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"001011110011100001001001101100"
|
||||
"000010111011111010110011000011"
|
||||
},
|
||||
/* 5*/ { -1, -1, -1, "999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", -1, "", 0, 33, 30, 1, "Numeric compaction, verified manually against tec-it",
|
||||
/* 5*/ { -1, -1, -1, { 0, 0, "" }, "999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", -1, "", 0, 33, 30, 1, "Numeric compaction, verified manually against tec-it",
|
||||
"010111101101010111101101010111"
|
||||
"111011110110111011110110111010"
|
||||
"001111111101001111111101001100"
|
||||
@ -445,7 +457,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"111010101011001101111001011010"
|
||||
"011110011111000011101011111011"
|
||||
},
|
||||
/* 6*/ { -1, 5, -1, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\037\237\240\242\243\244\245\246\247\251\255\256\266\225\226\227\230\231\232\233\234\235\236", 51, "", 0, 33, 30, 1, "Mode 5 set E",
|
||||
/* 6*/ { -1, 5, -1, { 0, 0, "" }, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\037\237\240\242\243\244\245\246\247\251\255\256\266\225\226\227\230\231\232\233\234\235\236", 51, "", 0, 33, 30, 1, "Mode 5 set E",
|
||||
"000000000000000000101010101011"
|
||||
"100101010111111111000000001010"
|
||||
"110010011100100111001001110010"
|
||||
@ -480,7 +492,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"100111110000101000000001110100"
|
||||
"100101010010100000010101000111"
|
||||
},
|
||||
/* 7*/ { -1, 6, -1, "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377\241\250\253\257\260\264\267\270\273\277\212\213\214\215\216\217\220\221\222\223\224", -1, "", 0, 33, 30, 1, "Mode 6 set D",
|
||||
/* 7*/ { -1, 6, -1, { 0, 0, "" }, "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377\241\250\253\257\260\264\267\270\273\277\212\213\214\215\216\217\220\221\222\223\224", -1, "", 0, 33, 30, 1, "Mode 6 set D",
|
||||
"000000000000000000101010101011"
|
||||
"100101010111111111000000001010"
|
||||
"110010011100100111001001110001"
|
||||
@ -515,7 +527,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"011111001010000101000011000110"
|
||||
"101111010010011100100011110010"
|
||||
},
|
||||
/* 8*/ { -1, 6, -1, "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\252\254\261\262\263\265\271\272\274\275\276\200\201\202\203\204\205\206\207\210\211", -1, "", 0, 33, 30, 1, "Mode 6 set C",
|
||||
/* 8*/ { -1, 6, -1, { 0, 0, "" }, "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\252\254\261\262\263\265\271\272\274\275\276\200\201\202\203\204\205\206\207\210\211", -1, "", 0, 33, 30, 1, "Mode 6 set C",
|
||||
"000000000000000000101010101011"
|
||||
"100101010111111111000000001010"
|
||||
"110010011100100111001001110001"
|
||||
@ -550,7 +562,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"011111001010000101000011000110"
|
||||
"101111010010011100100011110010"
|
||||
},
|
||||
/* 9*/ { UNICODE_MODE, 4, -1, "ABCDabcdAabcABabcABCabcABCDaABCabABCabcABCéa", -1, "", 0, 33, 30, 1, "Mode 4 LCHB SHA 2SHA 3SHA LCHA SHB LCHB 3SHA 3SHA SHD",
|
||||
/* 9*/ { UNICODE_MODE, 4, -1, { 0, 0, "" }, "ABCDabcdAabcABabcABCabcABCDaABCabABCabcABCéa", -1, "", 0, 33, 30, 1, "Mode 4 LCHB SHA 2SHA 3SHA LCHA SHB LCHB 3SHA 3SHA SHD",
|
||||
"110000000011000000000011000011"
|
||||
"010000000001000000000001000000"
|
||||
"111010011100100110011110100101"
|
||||
@ -585,7 +597,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"110001000010011110111101111000"
|
||||
"011010011011111110001000000010"
|
||||
},
|
||||
/* 10*/ { UNICODE_MODE, 4, -1, "ÀÁÂÃ1", -1, "", 0, 33, 30, 1, "Mode 4 LCKC LCHA",
|
||||
/* 10*/ { UNICODE_MODE, 4, -1, { 0, 0, "" }, "ÀÁÂÃ1", -1, "", 0, 33, 30, 1, "Mode 4 LCKC LCHA",
|
||||
"010101010101010101010101010111"
|
||||
"000000000000000000000000000000"
|
||||
"101010101010101010101010101010"
|
||||
@ -620,7 +632,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010110101111010110101010111100"
|
||||
"010100000000010110101010010100"
|
||||
},
|
||||
/* 11*/ { UNICODE_MODE, 4, -1, "ÀÁÂÃ123456789", -1, "", 0, 33, 30, 1, "Mode 4 LCKC NS",
|
||||
/* 11*/ { UNICODE_MODE, 4, -1, { 0, 0, "" }, "ÀÁÂÃ123456789", -1, "", 0, 33, 30, 1, "Mode 4 LCKC NS",
|
||||
"111110110101010101010101010111"
|
||||
"111010010000000000000000000000"
|
||||
"000010011010101010101010101000"
|
||||
@ -655,7 +667,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"000000111100011110100001110000"
|
||||
"101000000010100111001011110101"
|
||||
},
|
||||
/* 12*/ { UNICODE_MODE, 4, -1, "àáâã1", -1, "", 0, 33, 30, 1, "Mode 4 LCKD LCHA",
|
||||
/* 12*/ { UNICODE_MODE, 4, -1, { 0, 0, "" }, "àáâã1", -1, "", 0, 33, 30, 1, "Mode 4 LCKD LCHA",
|
||||
"010101010101010101010101010111"
|
||||
"000000000000000000000000000000"
|
||||
"101010101010101010101010101010"
|
||||
@ -690,7 +702,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010110101111010110101010111100"
|
||||
"010100000000010110101010010100"
|
||||
},
|
||||
/* 13*/ { UNICODE_MODE, 4, -1, "¢£¤¥1", -1, "", 0, 33, 30, 1, "Mode 4 LCKE LCHA",
|
||||
/* 13*/ { UNICODE_MODE, 4, -1, { 0, 0, "" }, "¢£¤¥1", -1, "", 0, 33, 30, 1, "Mode 4 LCKE LCHA",
|
||||
"010101010101010101010101010111"
|
||||
"000000000000000000000000000000"
|
||||
"101010101010101010101010101010"
|
||||
@ -725,7 +737,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"010110101111010110101010111100"
|
||||
"010100000000010110101010010100"
|
||||
},
|
||||
/* 14*/ { UNICODE_MODE, 4, -1, "¢£¤¥123456789", -1, "", 0, 33, 30, 1, "Mode 4 LCKE NS",
|
||||
/* 14*/ { UNICODE_MODE, 4, -1, { 0, 0, "" }, "¢£¤¥123456789", -1, "", 0, 33, 30, 1, "Mode 4 LCKE NS",
|
||||
"111110110101010101010101010111"
|
||||
"111010010000000000000000000000"
|
||||
"000010011010101010101010101000"
|
||||
@ -760,7 +772,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"000000111100011110100001110000"
|
||||
"101000000010100111001011110101"
|
||||
},
|
||||
/* 15*/ { UNICODE_MODE, 4, -1, "ABCDE12abcde1ÀÁÂ⣤¥1àáâãabcde123A123456789àáâ㢣¤¥abc", -1, "", 0, 33, 30, 1, "Mode 4 mixed sets",
|
||||
/* 15*/ { UNICODE_MODE, 4, -1, { 0, 0, "" }, "ABCDE12abcde1ÀÁÂ⣤¥1àáâãabcde123A123456789àáâ㢣¤¥abc", -1, "", 0, 33, 30, 1, "Mode 4 mixed sets",
|
||||
"000000001111111100000000111111"
|
||||
"000010100100111100000000111100"
|
||||
"011100101110000000100111010100"
|
||||
@ -795,6 +807,76 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"100011000001110011101110101000"
|
||||
"001001110010111101100100010001"
|
||||
},
|
||||
/* 16*/ { UNICODE_MODE, 4, -1, { 3, 7, "" }, "THIS IS A 91 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, APPENDED, MAXICODE SYMBOL...", -1, "", 0, 33, 30, 1, "Mode 4 Structured Append",
|
||||
"010001111101000000100000100011"
|
||||
"000000010000000100000000101000"
|
||||
"001000101000110010011011001000"
|
||||
"000100011000100100000000011000"
|
||||
"110000001010000010101100000010"
|
||||
"100010000010110010001111000100"
|
||||
"001010000000011000001001000010"
|
||||
"100000001010001001001000100110"
|
||||
"101111101110000000100000011010"
|
||||
"000100010011101000000110000010"
|
||||
"110000000111100010001100111100"
|
||||
"100010001010000000000011000010"
|
||||
"000000001010000000010101110101"
|
||||
"111010110000000000010100101100"
|
||||
"110010111100000000001100000011"
|
||||
"000010010000000000001010000100"
|
||||
"111000001000000000001000000000"
|
||||
"011000010000000000001100100000"
|
||||
"000000001100000000011001010000"
|
||||
"101010010100000000000111001100"
|
||||
"001000000000000000001000001001"
|
||||
"000000000010000000000000100000"
|
||||
"101011000110011011000001010001"
|
||||
"100011111010000001000010001000"
|
||||
"011010000000000101011111110010"
|
||||
"000001110011111111111010100000"
|
||||
"001110100111000101011001001100"
|
||||
"011010010100110111100101011100"
|
||||
"101101001001011111000110110111"
|
||||
"110001110110110001000011001010"
|
||||
"011100001000111100110111011110"
|
||||
"010101011101100110111011100100"
|
||||
"011001000011110011011110111010"
|
||||
},
|
||||
/* 17*/ { UNICODE_MODE, 3, -1, { 1, 8, "" }, "COMMISSION FOR EUROPEAN NORMALIZATION, RUE DE STASSART 36, B-1050 BRUXELLES", -1, "B1050056999", 0, 33, 30, 1, "Mode 3 Structured Append",
|
||||
"010000000000001010000000010011"
|
||||
"001000111111010000011111001000"
|
||||
"101111111010101111101101000101"
|
||||
"000001000000100010100001100010"
|
||||
"111100110010001100101000001110"
|
||||
"110100011010001101101000011100"
|
||||
"100000000010001000000001011010"
|
||||
"001100110101001001111111000010"
|
||||
"011010001001100010110100000111"
|
||||
"100100000111100000100101001000"
|
||||
"000010100001110000010100101010"
|
||||
"110010001000000011010000101000"
|
||||
"100010111100000000100010001001"
|
||||
"100000001100000000011000000000"
|
||||
"001011100100000000011111100100"
|
||||
"010111011000000000000011011010"
|
||||
"001110101000000000001000001000"
|
||||
"000001110000000000001011000000"
|
||||
"000111010000000000011111111101"
|
||||
"001100101000000000011100100010"
|
||||
"011010111100000000001000100000"
|
||||
"000010101110000000011110000110"
|
||||
"111001101110000001111000000000"
|
||||
"001000101011011001000101010000"
|
||||
"000010010101010101010000111101"
|
||||
"111000000000000000001110100000"
|
||||
"001011101010101010101000100010"
|
||||
"001100110110100101101100010110"
|
||||
"111100110000110110000010011001"
|
||||
"011100011110101010001100000000"
|
||||
"011001100010001111111000101001"
|
||||
"011111110000111010001010001100"
|
||||
"110010001001001011011111100111"
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -816,14 +898,19 @@ static void test_encode(int index, int generate, int debug) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_MAXICODE, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
strcpy(symbol->primary, data[i].primary);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, %d, \"%s\", %d, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].option_1, data[i].option_2, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
|
||||
printf(" /*%3d*/ { %s, %d, %d, { %d, %d, \"%s\" }, \"%s\", %d, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].option_1, data[i].option_2,
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
|
||||
data[i].primary, testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
printf(" },\n");
|
||||
|
@ -39,6 +39,7 @@ static void test_options(int index, int debug) {
|
||||
int option_2;
|
||||
int option_3;
|
||||
int warn_level;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret_encode;
|
||||
int ret_vector;
|
||||
@ -47,31 +48,50 @@ static void test_options(int index, int debug) {
|
||||
int expected_option_2;
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
const char *expected_errtxt;
|
||||
int compare_previous;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, "12345", 0, 0, 2, 2, 6, 103, -1 }, // ECC auto-set to 2, cols auto-set to 2
|
||||
/* 1*/ { BARCODE_PDF417, -1, -1, 928, 0, "12345", 0, 0, 2, 2, 6, 103, 0 }, // Option 3 ignored
|
||||
/* 2*/ { BARCODE_PDF417, -1, -1, 300, 0, "12345", 0, 0, 2, 2, 6, 103, 0 }, // Option 3 ignored
|
||||
/* 3*/ { BARCODE_PDF417, 3, -1, -1, 0, "12345", 0, 0, 3, 3, 7, 120, -1 }, // ECC 3, cols auto-set to 3
|
||||
/* 4*/ { BARCODE_PDF417, 3, 2, -1, 0, "12345", 0, 0, 3, 2, 10, 103, -1 }, // ECC 3, cols 2
|
||||
/* 5*/ { BARCODE_PDF417, 8, 2, -1, 0, "12345", ZINT_ERROR_TOO_LONG, -1, 8, 3, 0, 0, -1 }, // ECC 8, cols 2, fails
|
||||
/* 6*/ { BARCODE_PDF417, 7, 2, -1, 0, "12345", 0, 0, 7, 3, 87, 120, -1 }, // ECC 7, cols 2 auto-upped to 3 (no warning, unlike MICROPDF417)
|
||||
/* 7*/ { BARCODE_PDF417, -1, 10, -1, 0, "12345", 0, 0, 2, 10, 3, 239, -1 }, // ECC auto-set to 2, cols 10
|
||||
/* 8*/ { BARCODE_PDF417, 9, -1, -1, 0, "12345", ZINT_WARN_INVALID_OPTION, 0, 2, 2, 6, 103, -1 }, // Invalid ECC, auto-set
|
||||
/* 9*/ { BARCODE_PDF417, -1, 31, -1, 0, "12345", ZINT_WARN_INVALID_OPTION, 0, 2, 2, 6, 103, 0 }, // Invalid cols, auto-set
|
||||
/* 10*/ { BARCODE_PDF417, 9, -1, -1, WARN_FAIL_ALL, "12345", ZINT_ERROR_INVALID_OPTION, -1, 9, 0, 0, 0, -1 }, // Invalid ECC
|
||||
/* 11*/ { BARCODE_PDF417, -1, 31, -1, WARN_FAIL_ALL, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, 31, 0, 0, -1 }, // Invalid cols
|
||||
/* 12*/ { BARCODE_PDF417, -1, 1, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI", ZINT_ERROR_TOO_LONG, -1, 4, 2, 0, 0, -1 }, // Cols 1 too small
|
||||
/* 13*/ { BARCODE_MICROPDF417, -1, 5, -1, 0, "12345", ZINT_WARN_INVALID_OPTION, 0, -1, 1, 11, 38, -1 }, // Invalid cols, auto-set to 1
|
||||
/* 14*/ { BARCODE_MICROPDF417, -1, 5, -1, WARN_FAIL_ALL, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, 5, 0, 0, -1 }, // Invalid cols
|
||||
/* 15*/ { BARCODE_MICROPDF417, -1, 1, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM", ZINT_WARN_INVALID_OPTION, 0, -1, 2, 17, 55, -1 }, // Cols 1 too small, auto-upped to 2 with warning
|
||||
/* 16*/ { BARCODE_MICROPDF417, -1, 1, -1, WARN_FAIL_ALL, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM", ZINT_ERROR_INVALID_OPTION, 0, -1, 1, 0, 0, -1 }, // Cols 1 too small
|
||||
/* 17*/ { BARCODE_MICROPDF417, -1, 2, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWX", ZINT_WARN_INVALID_OPTION, 0, -1, 4, 15, 99, -1 }, // Cols 2 too small, auto-upped to 4 with warning
|
||||
/* 18*/ { BARCODE_MICROPDF417, -1, 2, -1, WARN_FAIL_ALL, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWX", ZINT_ERROR_INVALID_OPTION, 0, -1, 2, 0, 0, -1 }, // Cols 2 too small
|
||||
/* 19*/ { BARCODE_MICROPDF417, -1, 3, -1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKL", ZINT_WARN_INVALID_OPTION, 0, -1, 4, 32, 99, -1 }, // Cols 3 too small, auto-upped to 4 with warning
|
||||
/* 20*/ { BARCODE_MICROPDF417, -1, 3, -1, WARN_FAIL_ALL, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKL", ZINT_ERROR_INVALID_OPTION, 0, -1, 3, 0, 0, -1 }, // Cols 3 too small
|
||||
/* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, { 0, 0, "" }, "12345", 0, 0, 2, 2, 6, 103, "", -1 }, // ECC auto-set to 2, cols auto-set to 2
|
||||
/* 1*/ { BARCODE_PDF417, -1, -1, 928, 0, { 0, 0, "" }, "12345", 0, 0, 2, 2, 6, 103, "", 0 }, // Option 3 ignored
|
||||
/* 2*/ { BARCODE_PDF417, -1, -1, 300, 0, { 0, 0, "" }, "12345", 0, 0, 2, 2, 6, 103, "", 0 }, // Option 3 ignored
|
||||
/* 3*/ { BARCODE_PDF417, 3, -1, -1, 0, { 0, 0, "" }, "12345", 0, 0, 3, 3, 7, 120, "", -1 }, // ECC 3, cols auto-set to 3
|
||||
/* 4*/ { BARCODE_PDF417, 3, 2, -1, 0, { 0, 0, "" }, "12345", 0, 0, 3, 2, 10, 103, "", -1 }, // ECC 3, cols 2
|
||||
/* 5*/ { BARCODE_PDF417, 8, 2, -1, 0, { 0, 0, "" }, "12345", ZINT_ERROR_TOO_LONG, -1, 8, 3, 0, 0, "Error 465: Data too long for specified number of columns", -1 }, // ECC 8, cols 2, fails
|
||||
/* 6*/ { BARCODE_PDF417, 7, 2, -1, 0, { 0, 0, "" }, "12345", 0, 0, 7, 3, 87, 120, "", -1 }, // ECC 7, cols 2 auto-upped to 3 (no warning, unlike MICROPDF417)
|
||||
/* 7*/ { BARCODE_PDF417, -1, 10, -1, 0, { 0, 0, "" }, "12345", 0, 0, 2, 10, 3, 239, "", -1 }, // ECC auto-set to 2, cols 10
|
||||
/* 8*/ { BARCODE_PDF417, 9, -1, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, 2, 2, 6, 103, "Warning 460: Security value out of range", -1 }, // Invalid ECC, auto-set
|
||||
/* 9*/ { BARCODE_PDF417, -1, 31, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, 2, 2, 6, 103, "Warning 461: Number of columns out of range", 0 }, // Invalid cols, auto-set
|
||||
/* 10*/ { BARCODE_PDF417, 9, -1, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, 9, 0, 0, 0, "Error 460: Security value out of range", -1 }, // Invalid ECC
|
||||
/* 11*/ { BARCODE_PDF417, -1, 31, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, 31, 0, 0, "Error 461: Number of columns out of range", -1 }, // Invalid cols
|
||||
/* 12*/ { BARCODE_PDF417, -1, 1, -1, 0, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI", ZINT_ERROR_TOO_LONG, -1, 4, 2, 0, 0, "Error 465: Data too long for specified number of columns", -1 }, // Cols 1 too small
|
||||
/* 13*/ { BARCODE_MICROPDF417, -1, 5, -1, 0, { 0, 0, "" }, "12345", ZINT_WARN_INVALID_OPTION, 0, -1, 1, 11, 38, "Warning 468: Specified width out of range", -1 }, // Invalid cols, auto-set to 1
|
||||
/* 14*/ { BARCODE_MICROPDF417, -1, 5, -1, WARN_FAIL_ALL, { 0, 0, "" }, "12345", ZINT_ERROR_INVALID_OPTION, -1, -1, 5, 0, 0, "Error 468: Specified width out of range", -1 }, // Invalid cols
|
||||
/* 15*/ { BARCODE_MICROPDF417, -1, 1, -1, 0, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM", ZINT_WARN_INVALID_OPTION, 0, -1, 2, 17, 55, "Warning 469: Specified symbol size too small for data", -1 }, // Cols 1 too small, auto-upped to 2 with warning
|
||||
/* 16*/ { BARCODE_MICROPDF417, -1, 1, -1, WARN_FAIL_ALL, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM", ZINT_ERROR_INVALID_OPTION, 0, -1, 1, 0, 0, "Error 469: Specified symbol size too small for data", -1 }, // Cols 1 too small
|
||||
/* 17*/ { BARCODE_MICROPDF417, -1, 2, -1, 0, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWX", ZINT_WARN_INVALID_OPTION, 0, -1, 4, 15, 99, "Warning 470: Specified symbol size too small for data", -1 }, // Cols 2 too small, auto-upped to 4 with warning
|
||||
/* 18*/ { BARCODE_MICROPDF417, -1, 2, -1, WARN_FAIL_ALL, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWX", ZINT_ERROR_INVALID_OPTION, 0, -1, 2, 0, 0, "Error 470: Specified symbol size too small for data", -1 }, // Cols 2 too small
|
||||
/* 19*/ { BARCODE_MICROPDF417, -1, 3, -1, 0, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKL", ZINT_WARN_INVALID_OPTION, 0, -1, 4, 32, 99, "Warning 471: Specified symbol size too small for data", -1 }, // Cols 3 too small, auto-upped to 4 with warning
|
||||
/* 20*/ { BARCODE_MICROPDF417, -1, 3, -1, WARN_FAIL_ALL, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKLMOPQRSTUVWXYZABCDEFGHIJKL", ZINT_ERROR_INVALID_OPTION, 0, -1, 3, 0, 0, "Error 471: Specified symbol size too small for data", -1 }, // Cols 3 too small
|
||||
/* 21*/ { BARCODE_PDF417, -1, 1, -1, 0, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH", 0, 0, 3, 2, 89, 103, "", -1 }, // Cols 1 just fits
|
||||
/* 22*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH", ZINT_ERROR_TOO_LONG, -1, 4, 2, 0, 0, "Error 465: Data too long for specified number of columns", -1 }, // Cols 1 too small with Structured Append
|
||||
/* 23*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRST", 0, 0, 3, 2, 89, 103, "", -1 }, // Cols 1 with Structured Append just fits
|
||||
/* 24*/ { BARCODE_PDF417, -1, 1, -1, 0, { 2, 2, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", ZINT_ERROR_TOO_LONG, -1, 4, 2, 0, 0, "Error 465: Data too long for specified number of columns", -1 }, // Cols 1 too small with Structured Append as last symbol (uses extra terminating codeword)
|
||||
/* 25*/ { BARCODE_PDF417, -1, 1, -1, 0, { 2, 2, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQR", 0, 0, 3, 2, 89, 103, "", -1 }, // Cols 1 with Structured Append as last symbol just fits with 1 less character pair
|
||||
/* 26*/ { BARCODE_PDF417, -1, 1, -1, 0, { 3, 2, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRST", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 741: Structured Append index out of range (1-2)", -1 },
|
||||
/* 27*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 1, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRST", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 740: Structured Append count out of range (2-99999)", -1 },
|
||||
/* 28*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 100000, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRST", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 740: Structured Append count out of range (2-99999)", -1 },
|
||||
/* 29*/ { BARCODE_PDF417, -1, 1, -1, 0, { 0, 2, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRST", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 741: Structured Append index out of range (1-2)", -1 },
|
||||
/* 30*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "1" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQR", 0, 0, 3, 2, 89, 103, "", -1 },
|
||||
/* 31*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "123123" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP", 0, 0, 3, 2, 89, 103, "", -1 },
|
||||
/* 32*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "123123123123123123123123123123" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 0, 3, 2, 89, 103, "", -1 },
|
||||
/* 33*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "1231231231231231231231231231231" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 742: Structured Append ID too long (30 digit maximum)", -1 },
|
||||
/* 34*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "23123123123123123123123123123" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 0, 3, 2, 89, 103, "", -1 },
|
||||
/* 35*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "A" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQR", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 743: Invalid Structured Append ID (digits only)", -1 },
|
||||
/* 36*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "900" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQR", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 744: Structured Append ID triplet 1 '900' out of range (000-899)", -1 },
|
||||
/* 37*/ { BARCODE_PDF417, -1, 1, -1, 0, { 1, 2, "123123123123123123123123901123" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ", ZINT_ERROR_INVALID_OPTION, -1, -1, 1, 0, 0, "Error 744: Structured Append ID triplet 9 '901' out of range (000-899)", -1 },
|
||||
/* 38*/ { BARCODE_MICROPDF417, -1, -1, -1, 0, { 1, 2, "1231231231231231231231231231231" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH", ZINT_ERROR_INVALID_OPTION, -1, -1, 0, 0, 0, "Error 742: Structured Append ID too long (30 digit maximum)", -1 }, // Micro PDF417 same error checking code
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -92,6 +112,9 @@ static void test_options(int index, int debug) {
|
||||
if (data[i].warn_level) {
|
||||
symbol->warn_level = data[i].warn_level;
|
||||
}
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret_encode, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret_encode, symbol->errtxt);
|
||||
@ -106,6 +129,7 @@ static void test_options(int index, int debug) {
|
||||
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, symbol->errtxt);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, 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 (index == -1 && data[i].compare_previous != -1) {
|
||||
ret = testUtilSymbolCmp(symbol, &previous_symbol);
|
||||
@ -190,6 +214,7 @@ static void test_input(int index, int generate, int debug) {
|
||||
int eci;
|
||||
int option_1;
|
||||
int option_2;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
int expected_eci;
|
||||
@ -201,43 +226,51 @@ static void test_input(int index, int generate, int debug) {
|
||||
// é U+00E9 (\351, 233), UTF-8 C3A9
|
||||
// β U+03B2 in ISO 8859-7 Greek (but not other ISO 8859 or Win page) (\342, 226), UTF-8 CEB2
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, "é", 0, 0, 6, 103, "(12) 4 913 233 900 398 878 279 350 217 295 231 77", "" },
|
||||
/* 1*/ { BARCODE_PDF417, UNICODE_MODE, 3, -1, -1, "é", 0, 3, 7, 103, "(14) 6 927 3 913 233 900 162 81 551 529 607 384 164 108", "" },
|
||||
/* 2*/ { BARCODE_PDF417, UNICODE_MODE, 26, -1, -1, "é", 0, 26, 7, 103, "(14) 6 927 26 901 195 169 574 701 519 908 84 241 360 642", "" },
|
||||
/* 3*/ { BARCODE_PDF417, UNICODE_MODE, 9, -1, -1, "β", 0, 9, 7, 103, "(14) 6 927 9 913 226 900 487 92 418 278 838 500 576 84", "" },
|
||||
/* 4*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, "β", ZINT_WARN_USES_ECI, 9, 7, 103, "Warning (14) 6 927 9 913 226 900 487 92 418 278 838 500 576 84", "" },
|
||||
/* 5*/ { BARCODE_PDF417, UNICODE_MODE, 3, -1, -1, "β", ZINT_ERROR_INVALID_DATA, 3, 0, 0, "Error 244: Invalid character in input data for ECI 3", "" },
|
||||
/* 6*/ { BARCODE_PDF417, UNICODE_MODE, 899, -1, -1, "A", 0, 899, 7, 103, "(14) 6 927 899 900 29 900 727 69 915 482 371 771 641 35", "" },
|
||||
/* 7*/ { BARCODE_PDF417, UNICODE_MODE, 900, -1, -1, "A", 0, 900, 7, 103, "(14) 6 926 0 0 900 29 56 795 921 763 468 267 410 129", "" },
|
||||
/* 8*/ { BARCODE_PDF417, UNICODE_MODE, 810899, -1, -1, "A", 0, 810899, 7, 103, "(14) 6 926 899 899 900 29 847 901 749 718 89 792 660 273", "" },
|
||||
/* 9*/ { BARCODE_PDF417, UNICODE_MODE, 810900, -1, -1, "A", 0, 810900, 7, 103, "(14) 6 925 0 900 29 900 652 613 857 390 38 450 415 899", "" },
|
||||
/* 10*/ { BARCODE_PDF417, UNICODE_MODE, 811799, -1, -1, "A", 0, 811799, 7, 103, "(14) 6 925 899 900 29 900 456 300 328 160 510 753 157 159", "" },
|
||||
/* 11*/ { BARCODE_PDF417, UNICODE_MODE, 811800, -1, -1, "A", ZINT_ERROR_INVALID_OPTION, 811800, 0, 0, "Error 472: Invalid ECI", "" },
|
||||
/* 12*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, "é", 0, 0, 11, 38, "(11) 913 233 900 900 805 609 847 211 598 4 603", "" },
|
||||
/* 13*/ { BARCODE_MICROPDF417, UNICODE_MODE, 3, -1, -1, "é", 0, 3, 11, 38, "(11) 927 3 913 233 803 477 85 249 824 813 830", "" },
|
||||
/* 14*/ { BARCODE_MICROPDF417, UNICODE_MODE, 26, -1, -1, "é", 0, 26, 6, 82, "(18) 927 26 901 195 169 900 288 96 509 365 709 784 713 403 219 81 851 866", "" },
|
||||
/* 15*/ { BARCODE_MICROPDF417, UNICODE_MODE, 9, -1, -1, "β", 0, 9, 11, 38, "(11) 927 9 913 226 23 103 74 194 394 667 324", "" },
|
||||
/* 16*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, "β", ZINT_WARN_USES_ECI, 9, 11, 38, "Warning (11) 927 9 913 226 23 103 74 194 394 667 324", "" },
|
||||
/* 17*/ { BARCODE_MICROPDF417, UNICODE_MODE, 3, -1, -1, "β", ZINT_ERROR_INVALID_DATA, 3, 0, 0, "Error 244: Invalid character in input data for ECI 3", "" },
|
||||
/* 18*/ { BARCODE_MICROPDF417, UNICODE_MODE, 899, -1, -1, "A", 0, 899, 11, 38, "(11) 927 899 900 29 533 437 884 3 617 241 747", "" },
|
||||
/* 19*/ { BARCODE_MICROPDF417, UNICODE_MODE, 900, -1, -1, "A", 0, 900, 6, 82, "(18) 926 0 0 900 29 900 913 543 414 141 214 886 461 1 419 422 54 495", "" },
|
||||
/* 20*/ { BARCODE_MICROPDF417, UNICODE_MODE, 810899, -1, -1, "A", 0, 810899, 6, 82, "(18) 926 899 899 900 29 900 351 555 241 509 787 583 3 326 41 628 534 151", "" },
|
||||
/* 21*/ { BARCODE_MICROPDF417, UNICODE_MODE, 810900, -1, -1, "A", 0, 810900, 11, 38, "(11) 925 0 900 29 233 533 43 483 708 659 704", "" },
|
||||
/* 22*/ { BARCODE_MICROPDF417, UNICODE_MODE, 811800, -1, -1, "A", ZINT_ERROR_INVALID_OPTION, 811800, 0, 0, "Error 473: Invalid ECI", "" },
|
||||
/* 23*/ { BARCODE_HIBC_PDF, UNICODE_MODE, -1, -1, -1, ",", ZINT_ERROR_INVALID_DATA, 0, 0, 0, "Error 203: Invalid character in data (alphanumerics, space and \"-.$/+%\" only)", "" },
|
||||
/* 24*/ { BARCODE_HIBC_MICPDF, UNICODE_MODE, -1, -1, -1, ",", ZINT_ERROR_INVALID_DATA, 0, 0, 0, "Error 203: Invalid character in data (alphanumerics, space and \"-.$/+%\" only)", "" },
|
||||
/* 25*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, "AB{} C#+ de{} {}F 12{} G{} H", 0, 0, 12, 120, "(36) 28 1 865 807 896 782 855 626 807 94 865 807 896 808 776 839 176 808 32 776 839 806 208", "" },
|
||||
/* 26*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, "{} #+ de{} 12{} {} H", 0, 0, 10, 120, "(30) 22 865 807 896 808 470 807 94 865 807 896 808 32 776 839 806 865 807 896 787 900 900", "" },
|
||||
/* 27*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, "A", 0, 0, 5, 103, "(10) 2 29 478 509 903 637 74 490 760 21", "" },
|
||||
/* 28*/ { BARCODE_PDF417, UNICODE_MODE, -1, 0, -1, "A", 0, 0, 4, 86, "(4) 2 29 347 502", "" },
|
||||
/* 29*/ { BARCODE_PDF417, UNICODE_MODE, -1, 1, -1, "A", 0, 0, 6, 86, "(6) 2 29 752 533 551 139", "" },
|
||||
/* 30*/ { BARCODE_PDF417, UNICODE_MODE, -1, 2, -1, "A", 0, 0, 5, 103, "(10) 2 29 478 509 903 637 74 490 760 21", "" },
|
||||
/* 31*/ { BARCODE_PDF417, UNICODE_MODE, -1, 3, -1, "A", 0, 0, 9, 103, "(18) 2 29 290 888 64 789 390 182 22 197 347 41 298 467 387 917 455 196", "" },
|
||||
/* 32*/ { BARCODE_PDF417, UNICODE_MODE, -1, 4, -1, "A", 0, 0, 12, 120, "(36) 4 29 900 900 702 212 753 721 695 584 222 459 110 594 813 465 718 912 667 349 852 602", "" },
|
||||
/* 33*/ { BARCODE_PDF417, UNICODE_MODE, -1, 5, -1, "A", 0, 0, 14, 154, "(70) 6 29 900 900 900 900 774 599 527 418 850 374 921 763 922 772 572 661 584 902 578 696", "" },
|
||||
/* 34*/ { BARCODE_PDF417, UNICODE_MODE, -1, 6, -1, "A", 0, 0, 19, 188, "(133) 5 29 900 900 900 113 261 822 368 600 652 404 869 860 902 184 702 611 323 195 794 566", "" },
|
||||
/* 35*/ { BARCODE_PDF417, UNICODE_MODE, -1, 7, -1, "A", 0, 0, 29, 222, "(261) 5 29 900 900 900 384 614 456 20 422 177 78 492 215 859 765 864 755 572 621 891 97 538", "" },
|
||||
/* 36*/ { BARCODE_PDF417, UNICODE_MODE, -1, 8, -1, "A", 0, 0, 40, 290, "(520) 8 29 900 900 900 900 900 900 255 576 871 499 885 500 866 196 784 681 589 448 428 108", "" },
|
||||
/* 0*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "é", 0, 0, 6, 103, "(12) 4 913 233 900 398 878 279 350 217 295 231 77", "" },
|
||||
/* 1*/ { BARCODE_PDF417, UNICODE_MODE, 3, -1, -1, { 0, 0, "" }, "é", 0, 3, 7, 103, "(14) 6 927 3 913 233 900 162 81 551 529 607 384 164 108", "" },
|
||||
/* 2*/ { BARCODE_PDF417, UNICODE_MODE, 26, -1, -1, { 0, 0, "" }, "é", 0, 26, 7, 103, "(14) 6 927 26 901 195 169 574 701 519 908 84 241 360 642", "" },
|
||||
/* 3*/ { BARCODE_PDF417, UNICODE_MODE, 9, -1, -1, { 0, 0, "" }, "β", 0, 9, 7, 103, "(14) 6 927 9 913 226 900 487 92 418 278 838 500 576 84", "" },
|
||||
/* 4*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "β", ZINT_WARN_USES_ECI, 9, 7, 103, "Warning (14) 6 927 9 913 226 900 487 92 418 278 838 500 576 84", "" },
|
||||
/* 5*/ { BARCODE_PDF417, UNICODE_MODE, 3, -1, -1, { 0, 0, "" }, "β", ZINT_ERROR_INVALID_DATA, 3, 0, 0, "Error 244: Invalid character in input data for ECI 3", "" },
|
||||
/* 6*/ { BARCODE_PDF417, UNICODE_MODE, 899, -1, -1, { 0, 0, "" }, "A", 0, 899, 7, 103, "(14) 6 927 899 900 29 900 727 69 915 482 371 771 641 35", "" },
|
||||
/* 7*/ { BARCODE_PDF417, UNICODE_MODE, 900, -1, -1, { 0, 0, "" }, "A", 0, 900, 7, 103, "(14) 6 926 0 0 900 29 56 795 921 763 468 267 410 129", "" },
|
||||
/* 8*/ { BARCODE_PDF417, UNICODE_MODE, 810899, -1, -1, { 0, 0, "" }, "A", 0, 810899, 7, 103, "(14) 6 926 899 899 900 29 847 901 749 718 89 792 660 273", "" },
|
||||
/* 9*/ { BARCODE_PDF417, UNICODE_MODE, 810900, -1, -1, { 0, 0, "" }, "A", 0, 810900, 7, 103, "(14) 6 925 0 900 29 900 652 613 857 390 38 450 415 899", "" },
|
||||
/* 10*/ { BARCODE_PDF417, UNICODE_MODE, 811799, -1, -1, { 0, 0, "" }, "A", 0, 811799, 7, 103, "(14) 6 925 899 900 29 900 456 300 328 160 510 753 157 159", "" },
|
||||
/* 11*/ { BARCODE_PDF417, UNICODE_MODE, 811800, -1, -1, { 0, 0, "" }, "A", ZINT_ERROR_INVALID_OPTION, 811800, 0, 0, "Error 472: Invalid ECI", "" },
|
||||
/* 12*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "é", 0, 0, 11, 38, "(11) 913 233 900 900 805 609 847 211 598 4 603", "" },
|
||||
/* 13*/ { BARCODE_MICROPDF417, UNICODE_MODE, 3, -1, -1, { 0, 0, "" }, "é", 0, 3, 11, 38, "(11) 927 3 913 233 803 477 85 249 824 813 830", "" },
|
||||
/* 14*/ { BARCODE_MICROPDF417, UNICODE_MODE, 26, -1, -1, { 0, 0, "" }, "é", 0, 26, 6, 82, "(18) 927 26 901 195 169 900 288 96 509 365 709 784 713 403 219 81 851 866", "" },
|
||||
/* 15*/ { BARCODE_MICROPDF417, UNICODE_MODE, 9, -1, -1, { 0, 0, "" }, "β", 0, 9, 11, 38, "(11) 927 9 913 226 23 103 74 194 394 667 324", "" },
|
||||
/* 16*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "β", ZINT_WARN_USES_ECI, 9, 11, 38, "Warning (11) 927 9 913 226 23 103 74 194 394 667 324", "" },
|
||||
/* 17*/ { BARCODE_MICROPDF417, UNICODE_MODE, 3, -1, -1, { 0, 0, "" }, "β", ZINT_ERROR_INVALID_DATA, 3, 0, 0, "Error 244: Invalid character in input data for ECI 3", "" },
|
||||
/* 18*/ { BARCODE_MICROPDF417, UNICODE_MODE, 899, -1, -1, { 0, 0, "" }, "A", 0, 899, 11, 38, "(11) 927 899 900 29 533 437 884 3 617 241 747", "" },
|
||||
/* 19*/ { BARCODE_MICROPDF417, UNICODE_MODE, 900, -1, -1, { 0, 0, "" }, "A", 0, 900, 6, 82, "(18) 926 0 0 900 29 900 913 543 414 141 214 886 461 1 419 422 54 495", "" },
|
||||
/* 20*/ { BARCODE_MICROPDF417, UNICODE_MODE, 810899, -1, -1, { 0, 0, "" }, "A", 0, 810899, 6, 82, "(18) 926 899 899 900 29 900 351 555 241 509 787 583 3 326 41 628 534 151", "" },
|
||||
/* 21*/ { BARCODE_MICROPDF417, UNICODE_MODE, 810900, -1, -1, { 0, 0, "" }, "A", 0, 810900, 11, 38, "(11) 925 0 900 29 233 533 43 483 708 659 704", "" },
|
||||
/* 22*/ { BARCODE_MICROPDF417, UNICODE_MODE, 811800, -1, -1, { 0, 0, "" }, "A", ZINT_ERROR_INVALID_OPTION, 811800, 0, 0, "Error 472: Invalid ECI", "" },
|
||||
/* 23*/ { BARCODE_HIBC_PDF, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, ",", ZINT_ERROR_INVALID_DATA, 0, 0, 0, "Error 203: Invalid character in data (alphanumerics, space and \"-.$/+%\" only)", "" },
|
||||
/* 24*/ { BARCODE_HIBC_MICPDF, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, ",", ZINT_ERROR_INVALID_DATA, 0, 0, 0, "Error 203: Invalid character in data (alphanumerics, space and \"-.$/+%\" only)", "" },
|
||||
/* 25*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "AB{} C#+ de{} {}F 12{} G{} H", 0, 0, 12, 120, "(36) 28 1 865 807 896 782 855 626 807 94 865 807 896 808 776 839 176 808 32 776 839 806 208", "" },
|
||||
/* 26*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "{} #+ de{} 12{} {} H", 0, 0, 10, 120, "(30) 22 865 807 896 808 470 807 94 865 807 896 808 32 776 839 806 865 807 896 787 900 900", "" },
|
||||
/* 27*/ { BARCODE_PDF417, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "A", 0, 0, 5, 103, "(10) 2 29 478 509 903 637 74 490 760 21", "" },
|
||||
/* 28*/ { BARCODE_PDF417, UNICODE_MODE, -1, 0, -1, { 0, 0, "" }, "A", 0, 0, 4, 86, "(4) 2 29 347 502", "" },
|
||||
/* 29*/ { BARCODE_PDF417, UNICODE_MODE, -1, 1, -1, { 0, 0, "" }, "A", 0, 0, 6, 86, "(6) 2 29 752 533 551 139", "" },
|
||||
/* 30*/ { BARCODE_PDF417, UNICODE_MODE, -1, 2, -1, { 0, 0, "" }, "A", 0, 0, 5, 103, "(10) 2 29 478 509 903 637 74 490 760 21", "" },
|
||||
/* 31*/ { BARCODE_PDF417, UNICODE_MODE, -1, 3, -1, { 0, 0, "" }, "A", 0, 0, 9, 103, "(18) 2 29 290 888 64 789 390 182 22 197 347 41 298 467 387 917 455 196", "" },
|
||||
/* 32*/ { BARCODE_PDF417, UNICODE_MODE, -1, 4, -1, { 0, 0, "" }, "A", 0, 0, 12, 120, "(36) 4 29 900 900 702 212 753 721 695 584 222 459 110 594 813 465 718 912 667 349 852 602", "" },
|
||||
/* 33*/ { BARCODE_PDF417, UNICODE_MODE, -1, 5, -1, { 0, 0, "" }, "A", 0, 0, 14, 154, "(70) 6 29 900 900 900 900 774 599 527 418 850 374 921 763 922 772 572 661 584 902 578 696", "" },
|
||||
/* 34*/ { BARCODE_PDF417, UNICODE_MODE, -1, 6, -1, { 0, 0, "" }, "A", 0, 0, 19, 188, "(133) 5 29 900 900 900 113 261 822 368 600 652 404 869 860 902 184 702 611 323 195 794 566", "" },
|
||||
/* 35*/ { BARCODE_PDF417, UNICODE_MODE, -1, 7, -1, { 0, 0, "" }, "A", 0, 0, 29, 222, "(261) 5 29 900 900 900 384 614 456 20 422 177 78 492 215 859 765 864 755 572 621 891 97 538", "" },
|
||||
/* 36*/ { BARCODE_PDF417, UNICODE_MODE, -1, 8, -1, { 0, 0, "" }, "A", 0, 0, 40, 290, "(520) 8 29 900 900 900 900 900 900 255 576 871 499 885 500 866 196 784 681 589 448 428 108", "" },
|
||||
/* 37*/ { BARCODE_PDF417, UNICODE_MODE, -1, 8, -1, { 1, 4, "017053" }, "A", 0, 0, 41, 290, "(533) 21 29 900 900 900 900 900 900 900 900 900 900 928 111 100 17 53 923 1 111 104 903 71", "H.4 example" },
|
||||
/* 38*/ { BARCODE_PDF417, UNICODE_MODE, -1, 8, -1, { 4, 4, "017053" }, "A", 0, 0, 41, 290, "(533) 21 29 900 900 900 900 900 900 900 900 900 928 111 103 17 53 923 1 111 104 922 772 754", "H.4 example last segment" },
|
||||
/* 39*/ { BARCODE_PDF417, UNICODE_MODE, -1, 8, -1, { 2, 4, "" }, "A", 0, 0, 41, 290, "(533) 21 29 900 900 900 900 900 900 900 900 900 900 900 900 928 111 101 923 1 111 104 583", "No ID" },
|
||||
/* 40*/ { BARCODE_PDF417, UNICODE_MODE, -1, 8, -1, { 99998, 99999, "12345" }, "A", 0, 0, 41, 290, "(533) 21 29 900 900 900 900 900 900 900 900 900 900 928 222 197 123 45 923 1 222 199 198", "IDs '123', '045'" },
|
||||
/* 41*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, { 1, 4, "017053" }, "A", 0, 0, 6, 99, "(24) 900 29 900 928 111 100 17 53 923 1 111 104 430 136 328 218 796 853 32 421 712 477 363", "H.4 example" },
|
||||
/* 42*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, { 4, 4, "017053" }, "A", 0, 0, 6, 99, "(24) 900 29 928 111 103 17 53 923 1 111 104 922 837 837 774 835 701 445 926 428 285 851 334", "H.4 example last segment" },
|
||||
/* 43*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, { 3, 4, "" }, "A", 0, 0, 17, 38, "(17) 900 29 900 928 111 102 923 1 111 104 343 717 634 693 618 860 618", "No ID" },
|
||||
/* 44*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, -1, -1, { 99999, 99999, "100200300" }, "A", 0, 0, 11, 55, "(22) 900 29 928 222 198 100 200 300 923 1 222 199 922 693 699 895 719 637 154 478 399 638", "IDs '100', '200', '300'" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -257,13 +290,17 @@ static void test_input(int index, int generate, int debug) {
|
||||
symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, data[i].eci, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %s, %d, %d, %d, \"%s\", %s, %d, %d, %d, \"%s\", \"%s\" },\n",
|
||||
printf(" /*%3d*/ { %s, %s, %d, %d, %d, { %d, %d, \"%s\" }, \"%s\", %s, %d, %d, %d, \"%s\", \"%s\" },\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_1, data[i].option_2,
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), testUtilErrorName(data[i].ret),
|
||||
symbol->eci, symbol->rows, symbol->width, symbol->errtxt, data[i].comment);
|
||||
} else {
|
||||
|
@ -131,6 +131,7 @@ static void test_print(int index, int generate, int debug) {
|
||||
int option_2;
|
||||
float height;
|
||||
float scale;
|
||||
struct zint_structapp structapp;
|
||||
char *fgcolour;
|
||||
char *bgcolour;
|
||||
char *data;
|
||||
@ -140,62 +141,62 @@ static void test_print(int index, int generate, int debug) {
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, 0, 0, "", "", "Égjpqy", "", 0, "code128_egrave_bold.png", "" },
|
||||
/* 1*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, 0, 0, "", "", "Égjpqy", "", 0, "code128_egrave_bold_box3.png", "" },
|
||||
/* 2*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, 0, 0, "", "", "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.png", "" },
|
||||
/* 3*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, 3, -1, 0, 0, "", "", "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.png", "" },
|
||||
/* 4*/ { BARCODE_CODABLOCKF, -1, 3, -1, -1, -1, -1, 3, -1, 0, 0, "", "", "AAAAAAAAA", "", 0, "codablockf_3rows.png", "" },
|
||||
/* 5*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, -1, -1, 0, 0, "", "", "AAAAAAAAA", "", 0, "codablockf_hvwsp2.png", "" },
|
||||
/* 6*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, 0, 0, "", "", "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.png", "" },
|
||||
/* 7*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" },
|
||||
/* 8*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" },
|
||||
/* 9*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" },
|
||||
/* 10*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" },
|
||||
/* 11*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" },
|
||||
/* 12*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.png", "" },
|
||||
/* 13*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "614141234417+12345", "", 0, "upca_5addon.png", "" },
|
||||
/* 14*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, 0, -1, -1, 0, 0, "", "", "614141234417+12345", "", 0, "upca_5addon_notext.png", "" },
|
||||
/* 15*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, 0, 0, "", "", "614141234417+12345", "", 0, "upca_5addon_bind3.png", "" },
|
||||
/* 16*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.png", "" },
|
||||
/* 17*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.png", "" },
|
||||
/* 18*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.png", "" },
|
||||
/* 19*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.png", "" },
|
||||
/* 20*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12", "", 0, "upce_2addon.png", "" },
|
||||
/* 21*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", 0, "upce_5addon.png", "" },
|
||||
/* 22*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", 0, "upce_5addon_small.png", "" },
|
||||
/* 23*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.png", "" },
|
||||
/* 24*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.png", "" },
|
||||
/* 25*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.png", "" },
|
||||
/* 26*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12", "", 0, "ean8_2addon.png", "" },
|
||||
/* 27*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", 0, "ean8_5addon.png", "" },
|
||||
/* 28*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9876543+65", "[91]1234567", 0, "ean8_cc_2addon_cca_4x3.png", "" },
|
||||
/* 29*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9876543+74083", "[91]123456789012345678", 0, "ean8_cc_5addon_ccb_8x3.png", "" },
|
||||
/* 30*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12345", "", 0, "ean5.png", "" },
|
||||
/* 31*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12", "", 0, "ean2.png", "" },
|
||||
/* 32*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, "", "", "123", "", 0, "code39_small.png", "" },
|
||||
/* 33*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, "", "", "12345", "", 0, "postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" },
|
||||
/* 34*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "CFCECDCC", "12345", "", 0, "pdf417_bgalpha.png", "" },
|
||||
/* 35*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "30313233", "", "12345", "", 0, "pdf417_fgalpha.png", "" },
|
||||
/* 36*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "20212244", "CFCECDCC", "12345", "", 0, "pdf417_bgfgalpha.png", "" },
|
||||
/* 37*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, "0000007F", "FF000033", "12345", "", 0, "ultra_bgfgalpha.png", "" },
|
||||
/* 38*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, "", "FF000033", "12345", "", 0, "ultra_bgalpha.png", "" },
|
||||
/* 39*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, "0000007F", "FF0000", "12345", "", 0, "ultra_fgalpha.png", "" },
|
||||
/* 40*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "0000007F", "", "12345", "", 0, "ultra_fgalpha_nobg.png", "" },
|
||||
/* 41*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "", "", "12345", "", 0, "ultra_hvwsp1_box1.png", "" },
|
||||
/* 42*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "00FF007F", "BABDB6", "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" },
|
||||
/* 43*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, "", "", "1", "", 0, "ultra_odd.png", "" },
|
||||
/* 44*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" },
|
||||
/* 45*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, 0, 0.7, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" },
|
||||
/* 46*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.4, "1111117F", "EEEEEEEE", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" },
|
||||
/* 47*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2.1, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" },
|
||||
/* 48*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" },
|
||||
/* 49*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, 0, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" },
|
||||
/* 50*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, 0, 2.0f, "", "", "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" },
|
||||
/* 51*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, 2.0f, "", "", "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" },
|
||||
/* 52*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12345678909", "", 0, "dbar_ltd.png", "" },
|
||||
/* 53*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5.0, 0, "", "", "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" },
|
||||
/* 54*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, 0, "", "", "12345678901234567890", "", 0, "imail_height7.75.png", "" },
|
||||
/* 55*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567890", "", 0, "aztec.png", "" },
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "Égjpqy", "", 0, "code128_egrave_bold.png", "" },
|
||||
/* 1*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "Égjpqy", "", 0, "code128_egrave_bold_box3.png", "" },
|
||||
/* 2*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.png", "" },
|
||||
/* 3*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, 3, -1, 0, 0, { 0, 0, "" }, "", "", "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.png", "" },
|
||||
/* 4*/ { BARCODE_CODABLOCKF, -1, 3, -1, -1, -1, -1, 3, -1, 0, 0, { 0, 0, "" }, "", "", "AAAAAAAAA", "", 0, "codablockf_3rows.png", "" },
|
||||
/* 5*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "AAAAAAAAA", "", 0, "codablockf_hvwsp2.png", "" },
|
||||
/* 6*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.png", "" },
|
||||
/* 7*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" },
|
||||
/* 8*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" },
|
||||
/* 9*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" },
|
||||
/* 10*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" },
|
||||
/* 11*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" },
|
||||
/* 12*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.png", "" },
|
||||
/* 13*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "614141234417+12345", "", 0, "upca_5addon.png", "" },
|
||||
/* 14*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, 0, -1, -1, 0, 0, { 0, 0, "" }, "", "", "614141234417+12345", "", 0, "upca_5addon_notext.png", "" },
|
||||
/* 15*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "614141234417+12345", "", 0, "upca_5addon_bind3.png", "" },
|
||||
/* 16*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.png", "" },
|
||||
/* 17*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.png", "" },
|
||||
/* 18*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.png", "" },
|
||||
/* 19*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.png", "" },
|
||||
/* 20*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "1234567+12", "", 0, "upce_2addon.png", "" },
|
||||
/* 21*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "1234567+12345", "", 0, "upce_5addon.png", "" },
|
||||
/* 22*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "1234567+12345", "", 0, "upce_5addon_small.png", "" },
|
||||
/* 23*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0, 0, { 0, 0, "" }, "", "", "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.png", "" },
|
||||
/* 24*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0, 0, { 0, 0, "" }, "", "", "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.png", "" },
|
||||
/* 25*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0, 0, { 0, 0, "" }, "", "", "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.png", "" },
|
||||
/* 26*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "1234567+12", "", 0, "ean8_2addon.png", "" },
|
||||
/* 27*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "1234567+12345", "", 0, "ean8_5addon.png", "" },
|
||||
/* 28*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "9876543+65", "[91]1234567", 0, "ean8_cc_2addon_cca_4x3.png", "" },
|
||||
/* 29*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "9876543+74083", "[91]123456789012345678", 0, "ean8_cc_5addon_ccb_8x3.png", "" },
|
||||
/* 30*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "12345", "", 0, "ean5.png", "" },
|
||||
/* 31*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "12", "", 0, "ean2.png", "" },
|
||||
/* 32*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "123", "", 0, "code39_small.png", "" },
|
||||
/* 33*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, { 0, 0, "" }, "", "", "12345", "", 0, "postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" },
|
||||
/* 34*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "CFCECDCC", "12345", "", 0, "pdf417_bgalpha.png", "" },
|
||||
/* 35*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "30313233", "", "12345", "", 0, "pdf417_fgalpha.png", "" },
|
||||
/* 36*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "20212244", "CFCECDCC", "12345", "", 0, "pdf417_bgfgalpha.png", "" },
|
||||
/* 37*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "FF000033", "12345", "", 0, "ultra_bgfgalpha.png", "" },
|
||||
/* 38*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "FF000033", "12345", "", 0, "ultra_bgalpha.png", "" },
|
||||
/* 39*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "FF0000", "12345", "", 0, "ultra_fgalpha.png", "" },
|
||||
/* 40*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "0000007F", "", "12345", "", 0, "ultra_fgalpha_nobg.png", "" },
|
||||
/* 41*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "12345", "", 0, "ultra_hvwsp1_box1.png", "" },
|
||||
/* 42*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "00FF007F", "BABDB6", "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" },
|
||||
/* 43*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, { 0, 0, "" }, "", "", "1", "", 0, "ultra_odd.png", "" },
|
||||
/* 44*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.5, { 0, 0, "" }, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" },
|
||||
/* 45*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, 0, 0.7, { 0, 0, "" }, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" },
|
||||
/* 46*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.4, { 0, 0, "" }, "1111117F", "EEEEEEEE", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" },
|
||||
/* 47*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2.1, { 0, 0, "" }, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" },
|
||||
/* 48*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" },
|
||||
/* 49*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" },
|
||||
/* 50*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, 0, 2.0f, { 0, 0, "" }, "", "", "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" },
|
||||
/* 51*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0, 2.0f, { 0, 0, "" }, "", "", "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" },
|
||||
/* 52*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 0, 0, "" }, "", "", "12345678909", "", 0, "dbar_ltd.png", "" },
|
||||
/* 53*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5.0, 0, { 0, 0, "" }, "", "", "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" },
|
||||
/* 54*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, 0, { 0, 0, "" }, "", "", "12345678901234567890", "", 0, "imail_height7.75.png", "" },
|
||||
/* 55*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, { 4, 7, "Z1.txt" }, "", "", "3456", "", 0, "aztec_z1_seq4of7.png", "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -248,6 +249,9 @@ static void test_print(int index, int generate, int debug) {
|
||||
if (data[i].whitespace_height != -1) {
|
||||
symbol->whitespace_height = data[i].whitespace_height;
|
||||
}
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
if (*data[i].fgcolour) {
|
||||
strcpy(symbol->fgcolour, data[i].fgcolour);
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ static void test_qr_options(int index, int debug) {
|
||||
struct item {
|
||||
int option_1;
|
||||
int option_2;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret_encode;
|
||||
int ret_vector;
|
||||
@ -45,40 +46,48 @@ static void test_qr_options(int index, int debug) {
|
||||
// 貫 U+8CAB kanji, in Shift JIS 0x8AD1 (\212\321), UTF-8 E8B2AB
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { -1, -1, "12345", 0, 0, 21, -1 }, // ECC auto-set to 1 (L), version auto-set to 1
|
||||
/* 1*/ { 5, -1, "12345", 0, 0, 21, 0 }, // ECC > 4 ignored
|
||||
/* 2*/ { -1, 41, "12345", 0, 0, 21, 0 }, // Version > 40 ignored
|
||||
/* 3*/ { -1, 2, "12345", 0, 0, 25, -1 }, // ECC auto-set to 4 (Q), version 2
|
||||
/* 4*/ { 4, 2, "12345", 0, 0, 25, 0 }, // ECC 4 (Q), version 2
|
||||
/* 5*/ { 1, 2, "12345", 0, 0, 25, 1 }, // ECC 1 (L), version 2
|
||||
/* 6*/ { -1, -1, "貫やぐ識禁", 0, 0, 21, -1 }, // ECC auto-set to 1 (L), version auto-set to 1
|
||||
/* 7*/ { 1, -1, "貫やぐ識禁", 0, 0, 21, 0 }, // Version auto-set to 1
|
||||
/* 8*/ { -1, 1, "貫やぐ識禁", 0, 0, 21, 0 }, // ECC auto-set to 1 (L)
|
||||
/* 9*/ { 1, 1, "貫やぐ識禁", 0, 0, 21, 0 },
|
||||
/* 10*/ { 2, 1, "貫やぐ識禁", ZINT_ERROR_TOO_LONG, -1, 0, -1 }, // ECC 2 (M), version 1
|
||||
/* 11*/ { 2, -1, "貫やぐ識禁", 0, 0, 25, -1 }, // Version auto-set to 2
|
||||
/* 12*/ { 2, 2, "貫やぐ識禁", 0, 0, 25, 0 },
|
||||
/* 13*/ { 1, 2, "貫やぐ識禁", 0, 0, 25, 1 },
|
||||
/* 14*/ { -1, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 29, -1 }, // ECC auto-set to 1 (L), version auto-set to 3
|
||||
/* 15*/ { 1, 3, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 29, 0 },
|
||||
/* 16*/ { 2, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 33, -1 }, // ECC 2 (M), version auto-set to 4
|
||||
/* 17*/ { 2, 4, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 33, 0 },
|
||||
/* 18*/ { 3, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 37, -1 }, // ECC 3 (Q), version auto-set to 5
|
||||
/* 19*/ { 3, 5, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 37, 0 },
|
||||
/* 20*/ { 4, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 41, -1 }, // ECC 4 (H), version auto-set to 6
|
||||
/* 21*/ { 4, 6, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 41, 0 },
|
||||
/* 22*/ { -1, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 69, -1 }, // ECC auto-set to 1, version auto-set to 13
|
||||
/* 23*/ { 1, 13, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 69, 0 },
|
||||
/* 24*/ { 4, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 101, -1 }, // ECC 4, version auto-set to 21
|
||||
/* 25*/ { 4, 21, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 101, 0 },
|
||||
/* 26*/ { -1, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 105, -1 }, // ECC auto-set to 1, version auto-set to 22
|
||||
/* 27*/ { 1, 22, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 105, 0 },
|
||||
/* 28*/ { 4, -1, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 153, 1 }, // ECC 4, version auto-set 34
|
||||
/* 29*/ { 4, 34, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 153, 0 },
|
||||
/* 30*/ { 4, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, 0, 177, -1 }, // 1852 alphanumerics max for ECC 4 (H)
|
||||
/* 31*/ { 1, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, 0, 177, -1 }, // 4296 alphanumerics max for ECC 1 (L)
|
||||
/* 32*/ { 4, -1, "貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫", 0, -1, 0, -1 }, // 424 Kanji, ECC 4 (Q), version 1
|
||||
/* 33*/ { 4, -1, "貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫", ZINT_ERROR_TOO_LONG, -1, 0, -1 }, // 425 Kanji, ECC 4 (Q), version 1
|
||||
/* 0*/ { -1, -1, { 0, 0, "" }, "12345", 0, 0, 21, -1 }, // ECC auto-set to 1 (L), version auto-set to 1
|
||||
/* 1*/ { 5, -1, { 0, 0, "" }, "12345", 0, 0, 21, 0 }, // ECC > 4 ignored
|
||||
/* 2*/ { -1, 41, { 0, 0, "" }, "12345", 0, 0, 21, 0 }, // Version > 40 ignored
|
||||
/* 3*/ { -1, 2, { 0, 0, "" }, "12345", 0, 0, 25, -1 }, // ECC auto-set to 4 (Q), version 2
|
||||
/* 4*/ { 4, 2, { 0, 0, "" }, "12345", 0, 0, 25, 0 }, // ECC 4 (Q), version 2
|
||||
/* 5*/ { 1, 2, { 0, 0, "" }, "12345", 0, 0, 25, 1 }, // ECC 1 (L), version 2
|
||||
/* 6*/ { -1, -1, { 0, 0, "" }, "貫やぐ識禁", 0, 0, 21, -1 }, // ECC auto-set to 1 (L), version auto-set to 1
|
||||
/* 7*/ { 1, -1, { 0, 0, "" }, "貫やぐ識禁", 0, 0, 21, 0 }, // Version auto-set to 1
|
||||
/* 8*/ { -1, 1, { 0, 0, "" }, "貫やぐ識禁", 0, 0, 21, 0 }, // ECC auto-set to 1 (L)
|
||||
/* 9*/ { 1, 1, { 0, 0, "" }, "貫やぐ識禁", 0, 0, 21, 0 },
|
||||
/* 10*/ { 2, 1, { 0, 0, "" }, "貫やぐ識禁", ZINT_ERROR_TOO_LONG, -1, 0, -1 }, // ECC 2 (M), version 1
|
||||
/* 11*/ { 2, -1, { 0, 0, "" }, "貫やぐ識禁", 0, 0, 25, -1 }, // Version auto-set to 2
|
||||
/* 12*/ { 2, 2, { 0, 0, "" }, "貫やぐ識禁", 0, 0, 25, 0 },
|
||||
/* 13*/ { 1, 2, { 0, 0, "" }, "貫やぐ識禁", 0, 0, 25, 1 },
|
||||
/* 14*/ { -1, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 29, -1 }, // ECC auto-set to 1 (L), version auto-set to 3
|
||||
/* 15*/ { 1, 3, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 29, 0 },
|
||||
/* 16*/ { 2, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 33, -1 }, // ECC 2 (M), version auto-set to 4
|
||||
/* 17*/ { 2, 4, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 33, 0 },
|
||||
/* 18*/ { 3, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 37, -1 }, // ECC 3 (Q), version auto-set to 5
|
||||
/* 19*/ { 3, 5, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 37, 0 },
|
||||
/* 20*/ { 4, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 41, -1 }, // ECC 4 (H), version auto-set to 6
|
||||
/* 21*/ { 4, 6, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁", 0, 0, 41, 0 },
|
||||
/* 22*/ { -1, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 69, -1 }, // ECC auto-set to 1, version auto-set to 13
|
||||
/* 23*/ { 1, 13, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 69, 0 },
|
||||
/* 24*/ { 4, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 101, -1 }, // ECC 4, version auto-set to 21
|
||||
/* 25*/ { 4, 21, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。", 0, 0, 101, 0 },
|
||||
/* 26*/ { -1, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 105, -1 }, // ECC auto-set to 1, version auto-set to 22
|
||||
/* 27*/ { 1, 22, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 105, 0 },
|
||||
/* 28*/ { 4, -1, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 153, 1 }, // ECC 4, version auto-set 34
|
||||
/* 29*/ { 4, 34, { 0, 0, "" }, "貫やぐ識禁ぱい再2間変字全ノレ没無8裁花ほゃ過法ひなご札17能つーびれ投覧マ勝動エヨ額界よみ作皇ナヲニ打題ヌルヲ掲布益フが。入35能ト権話しこを断兆モヘ細情おじ名4減エヘイハ側機はょが意見想ハ業独案ユヲウ患職ヲ平美さ毎放どぽたけ家没べお化富べ町大シ情魚ッでれ一冬すぼめり。社ト可化モマ試音ばじご育青康演ぴぎ権型固スで能麩ぜらもほ河都しちほラ収90作の年要とだむ部動ま者断チ第41一1米索焦茂げむしれ。測フ物使だて目月国スリカハ夏検にいへ児72告物ゆは載核ロアメヱ登輸どべゃ催行アフエハ議歌ワ河倫剖だ。記タケウ因載ヒイホヤ禁3輩彦関トえび肝区勝ワリロ成禁ぼよ界白ウヒキレ中島べせぜい各安うしぽリ覧生テ基一でむしゃ中新トヒキソ声碁スしび起田ア信大未ゅもばち。", 0, 0, 153, 0 },
|
||||
/* 30*/ { 4, -1, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, 0, 177, -1 }, // 1852 alphanumerics max for ECC 4 (H)
|
||||
/* 31*/ { 1, -1, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, 0, 177, -1 }, // 4296 alphanumerics max for ECC 1 (L)
|
||||
/* 32*/ { 4, -1, { 0, 0, "" }, "貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫", 0, -1, 0, -1 }, // 424 Kanji, ECC 4 (Q), version 1
|
||||
/* 33*/ { 4, -1, { 0, 0, "" }, "貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫貫", ZINT_ERROR_TOO_LONG, -1, 0, -1 }, // 425 Kanji, ECC 4 (Q), version 1
|
||||
/* 34*/ { 4, 1, { 0, 0, "" }, "12345678901234567", 0, 0, 21, -1 },
|
||||
/* 35*/ { 4, 1, { 1, 2, "" }, "12345678901234567", ZINT_ERROR_TOO_LONG, -1, 0, -1 },
|
||||
/* 36*/ { 4, 1, { 1, 2, "" }, "123456789012", ZINT_ERROR_TOO_LONG, -1, 0, -1 },
|
||||
/* 37*/ { 4, 1, { 1, 2, "" }, "12345678901", 0, 0, 21, -1 },
|
||||
/* 38*/ { 4, 1, { 3, 16, "123" }, "12345678901", 0, 0, 21, -1 },
|
||||
/* 39*/ { 4, 1, { 3, 17, "123" }, "12345678901", ZINT_ERROR_INVALID_OPTION, -1, 0, -1 }, // Bad Structured Append count
|
||||
/* 40*/ { 4, 1, { 3, 2, "123" }, "12345678901", ZINT_ERROR_INVALID_OPTION, -1, 0, -1 }, // Bad Structured Append index
|
||||
/* 41*/ { 4, 1, { 1, 2, "256" }, "12345678901", ZINT_ERROR_INVALID_OPTION, -1, 0, -1 }, // Bad Structured Append ID
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -97,6 +106,9 @@ static void test_qr_options(int index, int debug) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_QRCODE, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret_encode, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret_encode, symbol->errtxt);
|
||||
@ -278,7 +290,7 @@ static void test_qr_input(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_qr_input");
|
||||
|
||||
@ -343,7 +355,7 @@ static void test_qr_gs1(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_qr_gs1");
|
||||
|
||||
@ -421,7 +433,7 @@ static void test_qr_optimize(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_qr_optimize");
|
||||
|
||||
@ -462,6 +474,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
int option_1;
|
||||
int option_2;
|
||||
int option_3;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
@ -473,7 +486,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
};
|
||||
// や U+3084 kanji, in Shift JIS 0x82E2 (\202\342), UTF-8 E38284; its 2nd byte 0xE2 + 0x40-FC also form Shift JIS
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_QRCODE, UNICODE_MODE, -1, -1, -1, "QR Code Symbol", 0, 21, 21, 0, "ISO 18004 Figure 1 **NOT SAME** uses mask 110 instead of 101; BWIPP uses 101",
|
||||
/* 0*/ { BARCODE_QRCODE, UNICODE_MODE, -1, -1, -1, { 0, 0, "" }, "QR Code Symbol", 0, 21, 21, 0, "ISO 18004 Figure 1 **NOT SAME** uses mask 110 instead of 101; BWIPP uses 101",
|
||||
"111111101001101111111"
|
||||
"100000101001101000001"
|
||||
"101110101100101011101"
|
||||
@ -496,7 +509,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100001101111111"
|
||||
"111111101001011000000"
|
||||
},
|
||||
/* 1*/ { BARCODE_QRCODE, UNICODE_MODE, -1, -1, 6 << 8, "QR Code Symbol", 0, 21, 21, 1, "ISO 18004 Figure 1, explicit mask 101, same",
|
||||
/* 1*/ { BARCODE_QRCODE, UNICODE_MODE, -1, -1, 6 << 8, { 0, 0, "" }, "QR Code Symbol", 0, 21, 21, 1, "ISO 18004 Figure 1, explicit mask 101, same",
|
||||
"111111100001101111111"
|
||||
"100000101001101000001"
|
||||
"101110101110101011101"
|
||||
@ -519,7 +532,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100001110111100"
|
||||
"111111101011001010010"
|
||||
},
|
||||
/* 2*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 33, 33, 1, "ISO 18004 Figure 29, same (mask 100)",
|
||||
/* 2*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 33, 33, 1, "ISO 18004 Figure 29 (top), same (mask 100)",
|
||||
"111111101100110010010010101111111"
|
||||
"100000100010111010111000101000001"
|
||||
"101110100000001101101100001011101"
|
||||
@ -554,7 +567,99 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100010110111000110101001001"
|
||||
"111111101101101011010000111100011"
|
||||
},
|
||||
/* 3*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, -1, "01234567", 0, 21, 21, 0, "ISO 18004 Annex I I.2, same (mask 010); BWIPP uses mask 000",
|
||||
/* 3*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, -1, { 1, 4, "1" }, "ABCDEFGHIJKLMN", 0, 21, 21, 1, "ISO 18004 Figure 29 (bottom 1st), same",
|
||||
"111111100110001111111"
|
||||
"100000101001101000001"
|
||||
"101110100010001011101"
|
||||
"101110100110001011101"
|
||||
"101110101110101011101"
|
||||
"100000100110101000001"
|
||||
"111111101010101111111"
|
||||
"000000000011100000000"
|
||||
"101010100011000010010"
|
||||
"100011011111010011011"
|
||||
"100010111110101110101"
|
||||
"010110000101011000000"
|
||||
"110000111110110111001"
|
||||
"000000001011010001010"
|
||||
"111111100101110011101"
|
||||
"100000100100001110101"
|
||||
"101110101101011000101"
|
||||
"101110100110100110110"
|
||||
"101110101011010011101"
|
||||
"100000100101110000001"
|
||||
"111111101000110110101"
|
||||
},
|
||||
/* 4*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, 8 << 8, { 2, 4, "1" }, "OPQRSTUVWXYZ0123", 0, 21, 21, 1, "ISO 18004 Figure 29 (bottom 2nd), same with explicit mask 111 (auto 011)",
|
||||
"111111100011101111111"
|
||||
"100000100001101000001"
|
||||
"101110100001101011101"
|
||||
"101110100101101011101"
|
||||
"101110100100101011101"
|
||||
"100000101000001000001"
|
||||
"111111101010101111111"
|
||||
"000000000111000000000"
|
||||
"100101101001010100000"
|
||||
"010111001001110011011"
|
||||
"011110101011010010111"
|
||||
"010100011110100110101"
|
||||
"011100101100111110101"
|
||||
"000000001011011100000"
|
||||
"111111100110100011100"
|
||||
"100000101001010100001"
|
||||
"101110100100101101111"
|
||||
"101110101100000010001"
|
||||
"101110100110101001101"
|
||||
"100000100111100011111"
|
||||
"111111101011011110100"
|
||||
},
|
||||
/* 5*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, -1, { 3, 4, "1" }, "456789ABCDEFGHIJ", 0, 21, 21, 1, "ISO 18004 Figure 29 (bottom 3rd), same",
|
||||
"111111100101001111111"
|
||||
"100000100011101000001"
|
||||
"101110100010101011101"
|
||||
"101110100111101011101"
|
||||
"101110100010101011101"
|
||||
"100000101110001000001"
|
||||
"111111101010101111111"
|
||||
"000000000001000000000"
|
||||
"100101101101010100000"
|
||||
"011011000001100111011"
|
||||
"101010111101010110111"
|
||||
"011001000101010100101"
|
||||
"011111100110000110101"
|
||||
"000000001010000111000"
|
||||
"111111100100101101100"
|
||||
"100000101101011001101"
|
||||
"101110100010001101011"
|
||||
"101110101101101110110"
|
||||
"101110100100011001101"
|
||||
"100000100011100101011"
|
||||
"111111101011000011000"
|
||||
},
|
||||
/* 6*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, -1, { 4, 4, "1" }, "KLMNOPQRSTUVWXYZ", 0, 21, 21, 1, "ISO 18004 Figure 29 (bottom 4th), same",
|
||||
"111111101011101111111"
|
||||
"100000101010101000001"
|
||||
"101110100011001011101"
|
||||
"101110101100001011101"
|
||||
"101110100111001011101"
|
||||
"100000100110001000001"
|
||||
"111111101010101111111"
|
||||
"000000001101000000000"
|
||||
"101101110110101001011"
|
||||
"010001011000010000101"
|
||||
"010000111010100101001"
|
||||
"110101001110001000100"
|
||||
"001101100000110000100"
|
||||
"000000001010101001001"
|
||||
"111111101111010111110"
|
||||
"100000101000101000011"
|
||||
"101110100101011000001"
|
||||
"101110101001111100101"
|
||||
"101110101001101111100"
|
||||
"100000100010110010010"
|
||||
"111111101110110101110"
|
||||
},
|
||||
/* 7*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, -1, { 0, 0, "" }, "01234567", 0, 21, 21, 0, "ISO 18004 Annex I I.2, same (mask 010); BWIPP uses mask 000",
|
||||
"111111100101101111111"
|
||||
"100000100111101000001"
|
||||
"101110101000001011101"
|
||||
@ -577,7 +682,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100000000110110"
|
||||
"111111101111010010100"
|
||||
},
|
||||
/* 4*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, 1 << 8, "01234567", 0, 21, 21, 1, "ISO 18004 Annex I Figure I.2, explicit mask 000, same as BWIPP",
|
||||
/* 8*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, 1 << 8, { 0, 0, "" }, "01234567", 0, 21, 21, 1, "ISO 18004 Annex I Figure I.2, explicit mask 000, same as BWIPP",
|
||||
"111111100011101111111"
|
||||
"100000101110001000001"
|
||||
"101110100110001011101"
|
||||
@ -600,7 +705,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100001110111000"
|
||||
"111111101001011100101"
|
||||
},
|
||||
/* 5*/ { BARCODE_QRCODE, GS1_MODE, 1, -1, -1, "[01]09501101530003[8200]http://example.com", 0, 25, 25, 0, "GS1 General Specifications 21.0.1 Figure 5.1-7 **NOT SAME** figure uses Byte encodation only; BWIPP uses mask 001",
|
||||
/* 9*/ { BARCODE_QRCODE, GS1_MODE, 1, -1, -1, { 0, 0, "" }, "[01]09501101530003[8200]http://example.com", 0, 25, 25, 0, "GS1 General Specifications 21.0.1 Figure 5.1-7 **NOT SAME** figure uses Byte encodation only; BWIPP uses mask 001",
|
||||
"1111111001101101001111111"
|
||||
"1000001010010101001000001"
|
||||
"1011101011111010101011101"
|
||||
@ -627,7 +732,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"1000001010110101100111010"
|
||||
"1111111011101100010010111"
|
||||
},
|
||||
/* 6*/ { BARCODE_QRCODE, GS1_MODE, 1, -1, 2 << 8, "[01]09501101530003[8200]http://example.com", 0, 25, 25, 1, "GS1 General Specifications 21.0.1 Figure 5.1-7, explicit mask 001, same as BWIPP",
|
||||
/* 10*/ { BARCODE_QRCODE, GS1_MODE, 1, -1, 2 << 8, { 0, 0, "" }, "[01]09501101530003[8200]http://example.com", 0, 25, 25, 1, "GS1 General Specifications 21.0.1 Figure 5.1-7, explicit mask 001, same as BWIPP",
|
||||
"1111111010111000001111111"
|
||||
"1000001011100100101000001"
|
||||
"1011101000111101101011101"
|
||||
@ -654,7 +759,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"1000001011110010100000010"
|
||||
"1111111010111001000111101"
|
||||
},
|
||||
/* 7*/ { BARCODE_QRCODE, GS1_MODE, 2, -1, -1, "[01]00857674002010[8200]http://www.gs1.org/", 0, 29, 29, 0, "GS1 General Specifications 21.0.1 Figure 5.7.3-1, same (mask 011); BWIPP uses mask 101",
|
||||
/* 11*/ { BARCODE_QRCODE, GS1_MODE, 2, -1, -1, { 0, 0, "" }, "[01]00857674002010[8200]http://www.gs1.org/", 0, 29, 29, 0, "GS1 General Specifications 21.0.1 Figure 5.7.3-1, same (mask 011); BWIPP uses mask 101",
|
||||
"11111110100101110101001111111"
|
||||
"10000010111101001000001000001"
|
||||
"10111010010000001110001011101"
|
||||
@ -685,7 +790,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"10000010010111010001110010100"
|
||||
"11111110101111111011110100110"
|
||||
},
|
||||
/* 8*/ { BARCODE_QRCODE, GS1_MODE, 2, -1, 6 << 8, "[01]00857674002010[8200]http://www.gs1.org/", 0, 29, 29, 1, "GS1 General Specifications 21.0.1 Figure 5.7.3-1, explicit mask 101, same as BWIPP",
|
||||
/* 12*/ { BARCODE_QRCODE, GS1_MODE, 2, -1, 6 << 8, { 0, 0, "" }, "[01]00857674002010[8200]http://www.gs1.org/", 0, 29, 29, 1, "GS1 General Specifications 21.0.1 Figure 5.7.3-1, explicit mask 101, same as BWIPP",
|
||||
"11111110001000011000101111111"
|
||||
"10000010111011101110101000001"
|
||||
"10111010101011010101001011101"
|
||||
@ -716,7 +821,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"10000010001111101001001010011"
|
||||
"11111110111001001101000010000"
|
||||
},
|
||||
/* 9*/ { BARCODE_HIBC_QR, -1, 2, -1, -1, "H123ABC01234567890", 0, 21, 21, 1, "ANSI/HIBC 2.6 - 2016 Figure C5 same (mask 001)",
|
||||
/* 13*/ { BARCODE_HIBC_QR, -1, 2, -1, -1, { 0, 0, "" }, "H123ABC01234567890", 0, 21, 21, 1, "ANSI/HIBC 2.6 - 2016 Figure C5 same (mask 001)",
|
||||
"111111101010001111111"
|
||||
"100000100100101000001"
|
||||
"101110101011001011101"
|
||||
@ -739,7 +844,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100100101111001"
|
||||
"111111101111011001111"
|
||||
},
|
||||
/* 10*/ { BARCODE_HIBC_QR, -1, 2, -1, -1, "/EU720060FF0/O523201", 0, 25, 25, 0, "HIBC/PAS Section 2.2 2nd Purchase Order **NOT SAME** uses mask 100 instead of 011; BWIPP uses mask 011",
|
||||
/* 14*/ { BARCODE_HIBC_QR, -1, 2, -1, -1, { 0, 0, "" }, "/EU720060FF0/O523201", 0, 25, 25, 0, "HIBC/PAS Section 2.2 2nd Purchase Order **NOT SAME** uses mask 100 instead of 011; BWIPP uses mask 011",
|
||||
"1111111011011110101111111"
|
||||
"1000001001001111001000001"
|
||||
"1011101001010010001011101"
|
||||
@ -766,7 +871,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"1000001000010100100011111"
|
||||
"1111111010101101111000001"
|
||||
},
|
||||
/* 11*/ { BARCODE_HIBC_QR, -1, 2, -1, 4 << 8, "/EU720060FF0/O523201", 0, 25, 25, 1, "HIBC/PAS Section 2.2 2nd Purchase Order same, explicit mask 011",
|
||||
/* 15*/ { BARCODE_HIBC_QR, -1, 2, -1, 4 << 8, { 0, 0, "" }, "/EU720060FF0/O523201", 0, 25, 25, 1, "HIBC/PAS Section 2.2 2nd Purchase Order same, explicit mask 011",
|
||||
"1111111010011001101111111"
|
||||
"1000001011010011001000001"
|
||||
"1011101000000111001011101"
|
||||
@ -793,7 +898,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"1000001001000001110110101"
|
||||
"1111111011101010111111001"
|
||||
},
|
||||
/* 12*/ { BARCODE_HIBC_QR, -1, 2, -1, -1, "/KN12345", 0, 21, 21, 1, "HIBC/PAS Section 2.2 Asset Tag **NOT SAME** uses mask 000 instead of 100",
|
||||
/* 16*/ { BARCODE_HIBC_QR, -1, 2, -1, -1, { 0, 0, "" }, "/KN12345", 0, 21, 21, 1, "HIBC/PAS Section 2.2 Asset Tag **NOT SAME** uses mask 000 instead of 100",
|
||||
"111111100000101111111"
|
||||
"100000101010101000001"
|
||||
"101110100011001011101"
|
||||
@ -816,7 +921,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100100001100111"
|
||||
"111111101000101110101"
|
||||
},
|
||||
/* 13*/ { BARCODE_HIBC_QR, -1, 2, -1, 5 << 8, "/KN12345", 0, 21, 21, 1, "HIBC/PAS Section 2.2 Asset Tag, same, explicit mask 100",
|
||||
/* 17*/ { BARCODE_HIBC_QR, -1, 2, -1, 5 << 8, { 0, 0, "" }, "/KN12345", 0, 21, 21, 1, "HIBC/PAS Section 2.2 Asset Tag, same, explicit mask 100",
|
||||
"111111101010101111111"
|
||||
"100000100111001000001"
|
||||
"101110100110101011101"
|
||||
@ -839,7 +944,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100110011110101"
|
||||
"111111101010111100111"
|
||||
},
|
||||
/* 14*/ { BARCODE_QRCODE, UNICODE_MODE, 1, -1, -1, "12345678901234567890123456789012345678901", 0, 21, 21, 1, "Max capacity ECC 1 Version 1 41 numbers",
|
||||
/* 18*/ { BARCODE_QRCODE, UNICODE_MODE, 1, -1, -1, { 0, 0, "" }, "12345678901234567890123456789012345678901", 0, 21, 21, 1, "Max capacity ECC 1 Version 1 41 numbers",
|
||||
"111111101001001111111"
|
||||
"100000101100101000001"
|
||||
"101110101011101011101"
|
||||
@ -862,7 +967,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000101000101001010"
|
||||
"111111101010110000111"
|
||||
},
|
||||
/* 15*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, -1, "12345678901234567890123456789012345678901", 0, 25, 25, 1, "ECC 2 auto-sets version 2",
|
||||
/* 19*/ { BARCODE_QRCODE, UNICODE_MODE, 2, -1, -1, { 0, 0, "" }, "12345678901234567890123456789012345678901", 0, 25, 25, 1, "ECC 2 auto-sets version 2",
|
||||
"1111111011001110101111111"
|
||||
"1000001001000000001000001"
|
||||
"1011101011001111101011101"
|
||||
@ -889,7 +994,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"1000001000000100111010110"
|
||||
"1111111010011100001100111"
|
||||
},
|
||||
/* 16*/ { BARCODE_QRCODE, UNICODE_MODE, 4, 10, -1, "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点", 0, 57, 57, 1, "Max capacity ECC 4 Version 10 74 kanji",
|
||||
/* 20*/ { BARCODE_QRCODE, UNICODE_MODE, 4, 10, -1, { 0, 0, "" }, "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点", 0, 57, 57, 1, "Max capacity ECC 4 Version 10 74 kanji",
|
||||
"111111100111100000011001000011111100010010011011001111111"
|
||||
"100000100011100101110000101000101001101111000001001000001"
|
||||
"101110101001011100010001111110111100101001100011001011101"
|
||||
@ -948,7 +1053,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100110011101110011001101110110101010001101000011011"
|
||||
"111111100010001101010110001001000001001011001001011001011"
|
||||
},
|
||||
/* 17*/ { BARCODE_QRCODE, UNICODE_MODE, 4, 27, -1, "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点", 0, 125, 125, 1, "Max capacity ECC 4 Version 27 385 kanji",
|
||||
/* 21*/ { BARCODE_QRCODE, UNICODE_MODE, 4, 27, -1, { 0, 0, "" }, "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点", 0, 125, 125, 1, "Max capacity ECC 4 Version 27 385 kanji",
|
||||
"11111110101001001100111100100011110001010011110000001100010110100011101010111000011101101001011111001111101101101001101111111"
|
||||
"10000010110001101110011001101111000101001011011001100110101000101010011110000000101000100101101110110000011110100110001000001"
|
||||
"10111010100000000100000101000101111001011001010100100100100000000101100011010001100111101010010101101101101101101101001011101"
|
||||
@ -1075,7 +1180,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"10000010010111001111010001100001010001010110110001100000111101011100000010010111101001001100101101111011011001000001101001110"
|
||||
"11111110000000010001110110000001010111011111000000111111010101110100101000110111000101101011001100000101101101101001100111111"
|
||||
},
|
||||
/* 18*/ { BARCODE_QRCODE, UNICODE_MODE, 4, 40, -1, "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点" "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点", 0, 177, 177, 1, "Max capacity ECC 4 Version 40 784 kanji",
|
||||
/* 22*/ { BARCODE_QRCODE, UNICODE_MODE, 4, 40, -1, { 0, 0, "" }, "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点" "点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点点", 0, 177, 177, 1, "Max capacity ECC 4 Version 40 784 kanji",
|
||||
"111111101010001111111101101110111010110111001110101000010001011011011101001110110011111011010000010101001010011110010000010110111111001001011111101000010010111111001010001111111"
|
||||
"100000101010110001001000101111011001001100100110110000000111110101111011110001101110000111000100101111010011001111100111111001001011011011110011011111111001000010010010101000001"
|
||||
"101110101001001101111001110010010100000000111001001011111000001001111111101010000111011010011010010001111010111001100011000011110100101110001010110001011110011011011010001011101"
|
||||
@ -1253,9 +1358,8 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"101110101010001011100101111010101100101000101001100110010011111001110110010100001111001101110110111110001101101110111011011011011011110011010111110001011111101011011011011111100"
|
||||
"100000100000010000101110000100011000011110011100010100000011111110010100001100010010001001110010000000110010100111101101010110111111001000101010011011011000011110111110000000000"
|
||||
"111111100000001110110110101010011010010100111111101001111101110111010110101111000111011001110100010111000100111000011011001011010011010011010101111010000011100001000011111011001"
|
||||
|
||||
},
|
||||
/* 19*/ { BARCODE_QRCODE, UNICODE_MODE, 4, -1, ZINT_FULL_MULTIBYTE, "áA", 0, 21, 21, 1, "Mask automatic (001)",
|
||||
/* 23*/ { BARCODE_QRCODE, UNICODE_MODE, 4, -1, ZINT_FULL_MULTIBYTE, { 0, 0, "" }, "áA", 0, 21, 21, 1, "Mask automatic (001)",
|
||||
"111111100101101111111"
|
||||
"100000101001101000001"
|
||||
"101110101010101011101"
|
||||
@ -1278,7 +1382,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100100111010000"
|
||||
"111111100011001000110"
|
||||
},
|
||||
/* 20*/ { BARCODE_QRCODE, UNICODE_MODE, 4, -1, ZINT_FULL_MULTIBYTE | (8 << 8), "áA", 0, 21, 21, 1, "Mask 111",
|
||||
/* 24*/ { BARCODE_QRCODE, UNICODE_MODE, 4, -1, ZINT_FULL_MULTIBYTE | (8 << 8), { 0, 0, "" }, "áA", 0, 21, 21, 1, "Mask 111",
|
||||
"111111101000101111111"
|
||||
"100000101110101000001"
|
||||
"101110100110101011101"
|
||||
@ -1301,7 +1405,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100011111101000"
|
||||
"111111100111010100101"
|
||||
},
|
||||
/* 21*/ { BARCODE_QRCODE, UNICODE_MODE, 4, -1, ZINT_FULL_MULTIBYTE | (9 << 8), "áA", 0, 21, 21, 1, "Mask > 111 ignored",
|
||||
/* 25*/ { BARCODE_QRCODE, UNICODE_MODE, 4, -1, ZINT_FULL_MULTIBYTE | (9 << 8), { 0, 0, "" }, "áA", 0, 21, 21, 1, "Mask > 111 ignored",
|
||||
"111111100101101111111"
|
||||
"100000101001101000001"
|
||||
"101110101010101011101"
|
||||
@ -1324,7 +1428,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100100111010000"
|
||||
"111111100011001000110"
|
||||
},
|
||||
/* 22*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, -1, "1234567890", 0, 21, 21, 0, "test_print example, automatic mask 001 (same score as mask 010); BWIPP uses mask 010",
|
||||
/* 26*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, -1, { 0, 0, "" }, "1234567890", 0, 21, 21, 0, "test_print example, automatic mask 001 (same score as mask 010); BWIPP uses mask 010",
|
||||
"111111101001101111111"
|
||||
"100000100100101000001"
|
||||
"101110101001001011101"
|
||||
@ -1347,7 +1451,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100001011000010"
|
||||
"111111101011111111111"
|
||||
},
|
||||
/* 23*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, 3 << 8, "1234567890", 0, 21, 21, 1, "test_print example, explicit mask 010",
|
||||
/* 27*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, 3 << 8, { 0, 0, "" }, "1234567890", 0, 21, 21, 1, "test_print example, explicit mask 010",
|
||||
"111111100010101111111"
|
||||
"100000100000001000001"
|
||||
"101110101010001011101"
|
||||
@ -1370,7 +1474,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
"100000100101111100110"
|
||||
"111111101000100100100"
|
||||
},
|
||||
/* 24*/ { BARCODE_QRCODE, UNICODE_MODE, 1, 2, 2 << 8, "?ややややwやややや ややややや", 0, 25, 25, 1, "Data with Shift JIS '2nd byte 1st byte' matches; explicit mask 001 (auto 000) to match BWIPP",
|
||||
/* 28*/ { BARCODE_QRCODE, UNICODE_MODE, 1, 2, 2 << 8, { 0, 0, "" }, "?ややややwやややや ややややや", 0, 25, 25, 1, "Data with Shift JIS '2nd byte 1st byte' matches; explicit mask 001 (auto 000) to match BWIPP",
|
||||
"1111111010111110001111111"
|
||||
"1000001011100101001000001"
|
||||
"1011101000111110101011101"
|
||||
@ -1402,7 +1506,7 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
char bwipp_buf[32768];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
@ -1419,14 +1523,18 @@ static void test_qr_encode(int index, int generate, int debug) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, data[i].option_3, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %s, %d, %d, %s, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
printf(" /*%3d*/ { %s, %s, %d, %d, %s, { %d, %d, \"%s\" }, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode),
|
||||
data[i].option_1, data[i].option_2, testUtilOption3Name(data[i].option_3),
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), testUtilErrorName(data[i].ret),
|
||||
symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
@ -1718,7 +1826,7 @@ static void test_microqr_input(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_microqr_input");
|
||||
|
||||
@ -1801,7 +1909,7 @@ static void test_microqr_padding(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_microqr_padding");
|
||||
|
||||
@ -1871,7 +1979,7 @@ static void test_microqr_optimize(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_microqr_optimize");
|
||||
|
||||
@ -2203,7 +2311,7 @@ static void test_microqr_encode(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
char bwipp_buf[32768];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
@ -2355,7 +2463,7 @@ static void test_upnqr_input(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_upnqr_input");
|
||||
|
||||
@ -2775,7 +2883,7 @@ static void test_rmqr_input(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_rmqr_input");
|
||||
|
||||
@ -2839,7 +2947,7 @@ static void test_rmqr_gs1(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_rmqr_gs1");
|
||||
|
||||
@ -2908,7 +3016,7 @@ static void test_rmqr_optimize(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
|
||||
testStart("test_rmqr_optimize");
|
||||
|
||||
@ -3328,7 +3436,7 @@ static void test_rmqr_encode(int index, int generate, int debug) {
|
||||
int i, length, ret;
|
||||
struct zint_symbol *symbol;
|
||||
|
||||
char escaped[1024];
|
||||
char escaped[4096];
|
||||
char bwipp_buf[32768];
|
||||
char bwipp_msg[1024];
|
||||
|
||||
|
@ -36,6 +36,7 @@ static void test_large(int index, int debug) {
|
||||
struct item {
|
||||
int option_1;
|
||||
int option_3;
|
||||
struct zint_structapp structapp;
|
||||
char *pattern;
|
||||
int length;
|
||||
int ret;
|
||||
@ -44,35 +45,43 @@ static void test_large(int index, int debug) {
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { -1, -1, "1", 252, 0, 31, 66 }, // Default EC2
|
||||
/* 1*/ { -1, -1, "1", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 2*/ { -1, -1, "1", ZINT_MAX_DATA_LEN, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 3*/ { -1, -1, "A", 252, 0, 31, 66 },
|
||||
/* 4*/ { -1, -1, "A", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 5*/ { -1, -1, "\200", 252, 0, 31, 66 },
|
||||
/* 6*/ { -1, -1, "\200", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 7*/ { -1, -1, "\001", 252, 0, 31, 66 },
|
||||
/* 8*/ { -1, -1, "\001", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 9*/ { -1, ULTRA_COMPRESSION, "1", 504, 0, 31, 66 },
|
||||
/* 10*/ { -1, ULTRA_COMPRESSION, "1", 505, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 11*/ { -1, ULTRA_COMPRESSION, "A", 375, 0, 31, 66 },
|
||||
/* 12*/ { -1, ULTRA_COMPRESSION, "A", 376, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 13*/ { -1, ULTRA_COMPRESSION, "\200", 252, 0, 31, 66 },
|
||||
/* 14*/ { -1, ULTRA_COMPRESSION, "\200", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 15*/ { -1, ULTRA_COMPRESSION, "\001", 252, 0, 31, 66 },
|
||||
/* 16*/ { -1, ULTRA_COMPRESSION, "\001", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 17*/ { 1, -1, "1", 276, 0, 31, 66 },
|
||||
/* 18*/ { 1, -1, "1", 277, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 19*/ { 2, -1, "1", 263, 0, 31, 66 },
|
||||
/* 20*/ { 2, -1, "1", 264, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 21*/ { 3, -1, "1", 252, 0, 31, 66 },
|
||||
/* 22*/ { 3, -1, "1", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 23*/ { 4, -1, "1", 234, 0, 31, 66 },
|
||||
/* 24*/ { 4, -1, "1", 235, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 25*/ { 5, -1, "1", 220, 0, 31, 66 },
|
||||
/* 26*/ { 5, -1, "1", 221, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 27*/ { 6, -1, "1", 202, 0, 31, 66 },
|
||||
/* 28*/ { 6, -1, "1", 203, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 0*/ { -1, -1, { 0, 0, "" }, "1", 252, 0, 31, 66 }, // Default EC2
|
||||
/* 1*/ { -1, -1, { 0, 0, "" }, "1", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 2*/ { -1, -1, { 0, 0, "" }, "1", ZINT_MAX_DATA_LEN, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 3*/ { -1, -1, { 1, 2, "" }, "1", 251, 0, 31, 66 }, // Structured Append no File Number 1 codeword overhead
|
||||
/* 4*/ { -1, -1, { 1, 2, "" }, "1", 252, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 5*/ { -1, -1, { 1, 2, "1" }, "1", 249, 0, 31, 66 }, // Structured Append with File Number 3 codewords overhead
|
||||
/* 6*/ { -1, -1, { 1, 2, "1" }, "1", 250, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 7*/ { -1, -1, { 0, 0, "" }, "A", 252, 0, 31, 66 },
|
||||
/* 8*/ { -1, -1, { 0, 0, "" }, "A", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 9*/ { -1, -1, { 0, 0, "" }, "\200", 252, 0, 31, 66 },
|
||||
/* 10*/ { -1, -1, { 0, 0, "" }, "\200", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 11*/ { -1, -1, { 0, 0, "" }, "\001", 252, 0, 31, 66 },
|
||||
/* 12*/ { -1, -1, { 0, 0, "" }, "\001", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 13*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "1", 504, 0, 31, 66 },
|
||||
/* 14*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "1", 505, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 15*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "A", 375, 0, 31, 66 },
|
||||
/* 16*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "A", 376, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 17*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "\200", 252, 0, 31, 66 },
|
||||
/* 18*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "\200", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 19*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "\001", 252, 0, 31, 66 },
|
||||
/* 20*/ { -1, ULTRA_COMPRESSION, { 0, 0, "" }, "\001", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 21*/ { 1, -1, { 0, 0, "" }, "1", 276, 0, 31, 66 },
|
||||
/* 22*/ { 1, -1, { 0, 0, "" }, "1", 277, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 23*/ { 1, -1, { 1, 2, "" }, "1", 275, 0, 31, 66 },
|
||||
/* 24*/ { 1, -1, { 1, 2, "" }, "1", 276, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 25*/ { 1, -1, { 1, 2, "1" }, "1", 273, 0, 31, 66 },
|
||||
/* 26*/ { 1, -1, { 1, 2, "1" }, "1", 274, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 27*/ { 2, -1, { 0, 0, "" }, "1", 263, 0, 31, 66 },
|
||||
/* 28*/ { 2, -1, { 0, 0, "" }, "1", 264, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 29*/ { 3, -1, { 0, 0, "" }, "1", 252, 0, 31, 66 },
|
||||
/* 30*/ { 3, -1, { 0, 0, "" }, "1", 253, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 31*/ { 4, -1, { 0, 0, "" }, "1", 234, 0, 31, 66 },
|
||||
/* 32*/ { 4, -1, { 0, 0, "" }, "1", 235, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 33*/ { 5, -1, { 0, 0, "" }, "1", 220, 0, 31, 66 },
|
||||
/* 34*/ { 5, -1, { 0, 0, "" }, "1", 221, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
/* 35*/ { 6, -1, { 0, 0, "" }, "1", 202, 0, 31, 66 },
|
||||
/* 36*/ { 6, -1, { 0, 0, "" }, "1", 203, ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -93,6 +102,9 @@ static void test_large(int index, int debug) {
|
||||
assert_equal(data[i].length, (int) strlen(data_buf), "i:%d length %d != strlen(data_buf) %d\n", i, data[i].length, (int) strlen(data_buf));
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_ULTRA, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, -1, data[i].option_3, -1 /*output_options*/, data_buf, data[i].length, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
@ -174,66 +186,77 @@ static void test_input(int index, int generate, int debug) {
|
||||
int eci;
|
||||
int option_1;
|
||||
int option_3;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
char *expected;
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { UNICODE_MODE, 0, -1, -1, "A", 0, "(2) 257 65", "" },
|
||||
/* 1*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "A", 0, "(2) 272 65", "" },
|
||||
/* 2*/ { UNICODE_MODE, 0, -1, -1, "12", 0, "(3) 257 49 50", "" },
|
||||
/* 3*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "12", 0, "(2) 272 140", "" },
|
||||
/* 4*/ { UNICODE_MODE, 0, -1, -1, "123", 0, "(4) 257 49 50 51", "" },
|
||||
/* 5*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "123", 0, "(3) 272 140 51", "" },
|
||||
/* 6*/ { UNICODE_MODE, 0, -1, -1, "ABC", 0, "(4) 257 65 66 67", "" },
|
||||
/* 7*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "ABC", 0, "(4) 272 65 66 67", "" },
|
||||
/* 8*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "ULTRACODE_123456789!", 0, "(17) 272 85 76 84 82 65 67 79 68 69 95 140 162 184 206 57 33", "" },
|
||||
/* 9*/ { UNICODE_MODE, 0, -1, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, "(253) 257 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65", "252 chars EC2" },
|
||||
/* 10*/ { UNICODE_MODE, 0, -1, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ZINT_ERROR_TOO_LONG, "Error 591: Data too long for selected error correction capacity", "253 chars EC2" },
|
||||
/* 11*/ { UNICODE_MODE, 0, 1, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, "(277) 257 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65", "276 chars EC0" },
|
||||
/* 12*/ { UNICODE_MODE, 0, 1, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ZINT_ERROR_TOO_LONG, "Error 591: Data too long for selected error correction capacity", "277 chars EC0" },
|
||||
/* 13*/ { UNICODE_MODE, 0, -1, -1, "é", 0, "(2) 257 233", "" },
|
||||
/* 14*/ { UNICODE_MODE, 0, -1, -1, "β", ZINT_WARN_USES_ECI, "Warning (2) 263 226", "" },
|
||||
/* 15*/ { UNICODE_MODE, 9, -1, -1, "β", 0, "(2) 263 226", "" },
|
||||
/* 16*/ { UNICODE_MODE, 9, -1, -1, "βAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, "(253) 263 226 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65", "249 chars EC2" },
|
||||
/* 17*/ { UNICODE_MODE, 9, -1, ULTRA_COMPRESSION, "A", 0, "(2) 272 65", "Note ECI ignored and not outputted if ULTRA_COMPRESSION and all ASCII" },
|
||||
/* 18*/ { UNICODE_MODE, 15, -1, -1, "Ŗ", 0, "(2) 268 170", "" },
|
||||
/* 19*/ { DATA_MODE, 898, -1, -1, "\001\002\003\004\377", 0, "(7) 278 130 1 2 3 4 255", "" },
|
||||
/* 20*/ { DATA_MODE, 899, -1, -1, "\001\002\003\004\377", 0, "(6) 280 1 2 3 4 255", "" },
|
||||
/* 21*/ { DATA_MODE, 900, -1, -1, "\001\002\003\004\377", 0, "(9) 257 274 137 128 1 2 3 4 255", "" },
|
||||
/* 22*/ { DATA_MODE, 9999, -1, -1, "\001\002\003\004\377", 0, "(9) 257 274 227 227 1 2 3 4 255", "" },
|
||||
/* 23*/ { DATA_MODE, 10000, -1, -1, "\001\002\003\004\377", 0, "(10) 257 275 129 128 128 1 2 3 4 255", "" },
|
||||
/* 24*/ { DATA_MODE, 811799, -1, -1, "\001\002\003\004\377", 0, "(10) 257 275 209 145 227 1 2 3 4 255", "" },
|
||||
/* 25*/ { DATA_MODE, 811800, -1, -1, "\001\002\003\004\377", ZINT_ERROR_INVALID_OPTION, "Error 590: ECI value not supported by Ultracode", "" },
|
||||
/* 26*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "123,456,789/12,/3,4,/5//", 0, "(15) 272 140 231 173 234 206 257 140 44 262 242 44 264 47 47", "Mode: a (24)" },
|
||||
/* 27*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS", 0, "(32) 257 256 46 151 78 210 205 208 258 5 148 28 72 2 167 52 127 193 83 75 211 267 76 65 32", "Mode: cccccc88cccccccccc8888aaa8cccccc (32)" },
|
||||
/* 28*/ { UNICODE_MODE, 0, -1, -1, "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS", 0, "(33) 257 72 69 73 77 65 83 205 208 65 32 75 69 78 78 65 82 65 72 193 83 75 211 76 65 32 205", "" },
|
||||
/* 29*/ { UNICODE_MODE, 10, -1, ULTRA_COMPRESSION, "אולטרה-קוד1234", 0, "(14) 264 224 229 236 232 248 228 45 247 229 227 267 140 162", "Mode: 8888888888aaaa (14); Figure G.3" },
|
||||
/* 30*/ { UNICODE_MODE, 10, -1, -1, "אולטרה-קוד1234", 0, "(15) 264 224 229 236 232 248 228 45 247 229 227 49 50 51 52", "" },
|
||||
/* 31*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "https://aimglobal.org/jcrv3tX", 0, "(16) 282 266 1 74 41 19 6 168 270 212 59 106 144 56 265 70", "Mode: c (21); Figure G.4a" },
|
||||
/* 32*/ { UNICODE_MODE, 0, -1, -1, "https://aimglobal.org/jcrv3tX", 0, "(22) 282 97 105 109 103 108 111 98 97 108 46 111 114 103 47 106 99 114 118 51 116 88", "" },
|
||||
/* 33*/ { GS1_MODE, 0, -1, -1, "[01]03453120000011[17]121125[10]ABCD1234", 0, "(20) 273 129 131 173 159 148 128 128 139 145 140 139 153 138 65 66 67 68 140 162", "Mode: a (34); Figure G.6 uses C43 for 6 of last 7 chars (same codeword count)" },
|
||||
/* 34*/ { GS1_MODE, 0, -1, -1, "[17]120508[10]ABCD1234[410]9501101020917", 0, "(21) 273 145 140 133 136 138 65 66 67 68 140 162 272 169 137 178 139 129 130 137 145", "Mode: a (35)" },
|
||||
/* 35*/ { GS1_MODE, 0, -1, -1, "[17]120508[10]ABCDEFGHI[410]9501101020917", 0, "(24) 273 145 140 133 136 138 65 66 67 68 69 70 71 72 73 272 169 137 178 139 129 130 137 145", "Mode: a (36)" },
|
||||
/* 36*/ { GS1_MODE | GS1PARENS_MODE, 0, -1, -1, "(17)120508(10)ABCDEFGHI(410)9501101020917", 0, "(24) 273 145 140 133 136 138 65 66 67 68 69 70 71 72 73 272 169 137 178 139 129 130 137 145", "Mode: a (36)" },
|
||||
/* 37*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "ftp://", 0, "(4) 272 278 269 165", "Mode: c (6)" },
|
||||
/* 38*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, ".cgi", 0, "(4) 272 278 274 131", "Mode: c (4)" },
|
||||
/* 39*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "ftp://a.cgi", 0, "(6) 272 280 269 123 274 131", "Mode: c (11)" },
|
||||
/* 40*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "e: file:f.shtml !", 0, "(12) 272 280 30 94 236 235 72 233 39 52 267 250", "Mode: c (17)" },
|
||||
/* 41*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "Aaatel:", 0, "(6) 272 280 262 76 6 89", "Mode: c (7)" },
|
||||
/* 42*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "Aatel:a", 0, "(6) 272 280 262 76 271 161", "Mode: c (7)" },
|
||||
/* 43*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "Atel:aAa", 0, "(8) 272 275 6 89 275 148 0 42", "Mode: c (8)" },
|
||||
/* 44*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "tel:AAaa", 0, "(8) 272 275 271 161 6 28 262 118", "Mode: c (8)" },
|
||||
/* 45*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "AAaatel:aA", 0, "(10) 272 276 0 42 0 41 118 46 6 156", "Mode: c (10)" },
|
||||
/* 46*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "émailto:étel:éfile:éhttp://éhttps://éftp://", 0, "(18) 257 233 276 282 233 277 282 233 278 282 233 279 282 233 280 282 233 281", "Mode: 8ccccccc8cccc8ccccc8ccccccc8cccccccc8cccccc (43)" },
|
||||
/* 47*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "éhttp://www.url.com", 0, "(9) 257 233 279 269 186 113 81 45 252", "Mode: 8cccccccccccccccccc (19)" },
|
||||
/* 48*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "éhttps://www.url.com", 0, "(9) 257 233 280 269 186 113 81 45 252", "Mode: 8ccccccccccccccccccc (20)" },
|
||||
/* 49*/ { UNICODE_MODE, 0, -1, -1, "http://url.com", 0, "(8) 281 117 114 108 46 99 111 109", "Mode: 8888888 (7)" },
|
||||
/* 50*/ { UNICODE_MODE, 0, -1, -1, "https://url.com", 0, "(8) 282 117 114 108 46 99 111 109", "Mode: 8888888 (7)" },
|
||||
/* 51*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "http://url.com", 0, "(6) 281 262 133 216 269 251", "Mode: ccccccc (7)" },
|
||||
/* 52*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "https://url.com", 0, "(6) 282 262 133 216 269 251", "Mode: ccccccc (7)" },
|
||||
/* 53*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "{", 0, "(2) 272 123", "Mode: a (1)" },
|
||||
/* 0*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "A", 0, "(2) 257 65", "" },
|
||||
/* 1*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "A", 0, "(2) 272 65", "" },
|
||||
/* 2*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "12", 0, "(3) 257 49 50", "" },
|
||||
/* 3*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "12", 0, "(2) 272 140", "" },
|
||||
/* 4*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "123", 0, "(4) 257 49 50 51", "" },
|
||||
/* 5*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "123", 0, "(3) 272 140 51", "" },
|
||||
/* 6*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ABC", 0, "(4) 257 65 66 67", "" },
|
||||
/* 7*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "ABC", 0, "(4) 272 65 66 67", "" },
|
||||
/* 8*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "ULTRACODE_123456789!", 0, "(17) 272 85 76 84 82 65 67 79 68 69 95 140 162 184 206 57 33", "" },
|
||||
/* 9*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, "(253) 257 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65", "252 chars EC2" },
|
||||
/* 10*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ZINT_ERROR_TOO_LONG, "Error 591: Data too long for selected error correction capacity", "253 chars EC2" },
|
||||
/* 11*/ { UNICODE_MODE, 0, 1, -1, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, "(277) 257 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65", "276 chars EC0" },
|
||||
/* 12*/ { UNICODE_MODE, 0, 1, -1, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ZINT_ERROR_TOO_LONG, "Error 591: Data too long for selected error correction capacity", "277 chars EC0" },
|
||||
/* 13*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "é", 0, "(2) 257 233", "" },
|
||||
/* 14*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "β", ZINT_WARN_USES_ECI, "Warning (2) 263 226", "" },
|
||||
/* 15*/ { UNICODE_MODE, 9, -1, -1, { 0, 0, "" }, "β", 0, "(2) 263 226", "" },
|
||||
/* 16*/ { UNICODE_MODE, 9, -1, -1, { 0, 0, "" }, "βAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 0, "(253) 263 226 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65", "249 chars EC2" },
|
||||
/* 17*/ { UNICODE_MODE, 9, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "A", 0, "(2) 272 65", "Note ECI ignored and not outputted if ULTRA_COMPRESSION and all ASCII" },
|
||||
/* 18*/ { UNICODE_MODE, 15, -1, -1, { 0, 0, "" }, "Ŗ", 0, "(2) 268 170", "" },
|
||||
/* 19*/ { DATA_MODE, 898, -1, -1, { 0, 0, "" }, "\001\002\003\004\377", 0, "(7) 278 130 1 2 3 4 255", "" },
|
||||
/* 20*/ { DATA_MODE, 899, -1, -1, { 0, 0, "" }, "\001\002\003\004\377", 0, "(6) 280 1 2 3 4 255", "" },
|
||||
/* 21*/ { DATA_MODE, 900, -1, -1, { 0, 0, "" }, "\001\002\003\004\377", 0, "(9) 257 274 137 128 1 2 3 4 255", "" },
|
||||
/* 22*/ { DATA_MODE, 9999, -1, -1, { 0, 0, "" }, "\001\002\003\004\377", 0, "(9) 257 274 227 227 1 2 3 4 255", "" },
|
||||
/* 23*/ { DATA_MODE, 10000, -1, -1, { 0, 0, "" }, "\001\002\003\004\377", 0, "(10) 257 275 129 128 128 1 2 3 4 255", "" },
|
||||
/* 24*/ { DATA_MODE, 811799, -1, -1, { 0, 0, "" }, "\001\002\003\004\377", 0, "(10) 257 275 209 145 227 1 2 3 4 255", "" },
|
||||
/* 25*/ { DATA_MODE, 811800, -1, -1, { 0, 0, "" }, "\001\002\003\004\377", ZINT_ERROR_INVALID_OPTION, "Error 590: ECI value not supported by Ultracode", "" },
|
||||
/* 26*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "123,456,789/12,/3,4,/5//", 0, "(15) 272 140 231 173 234 206 257 140 44 262 242 44 264 47 47", "Mode: a (24)" },
|
||||
/* 27*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS", 0, "(32) 257 256 46 151 78 210 205 208 258 5 148 28 72 2 167 52 127 193 83 75 211 267 76 65 32", "Mode: cccccc88cccccccccc8888aaa8cccccc (32)" },
|
||||
/* 28*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS", 0, "(33) 257 72 69 73 77 65 83 205 208 65 32 75 69 78 78 65 82 65 72 193 83 75 211 76 65 32 205", "" },
|
||||
/* 29*/ { UNICODE_MODE, 10, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "אולטרה-קוד1234", 0, "(14) 264 224 229 236 232 248 228 45 247 229 227 267 140 162", "Mode: 8888888888aaaa (14); Figure G.3" },
|
||||
/* 30*/ { UNICODE_MODE, 10, -1, -1, { 0, 0, "" }, "אולטרה-קוד1234", 0, "(15) 264 224 229 236 232 248 228 45 247 229 227 49 50 51 52", "" },
|
||||
/* 31*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "https://aimglobal.org/jcrv3tX", 0, "(16) 282 266 1 74 41 19 6 168 270 212 59 106 144 56 265 70", "Mode: c (21); Figure G.4a" },
|
||||
/* 32*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "https://aimglobal.org/jcrv3tX", 0, "(22) 282 97 105 109 103 108 111 98 97 108 46 111 114 103 47 106 99 114 118 51 116 88", "" },
|
||||
/* 33*/ { GS1_MODE, 0, -1, -1, { 0, 0, "" }, "[01]03453120000011[17]121125[10]ABCD1234", 0, "(20) 273 129 131 173 159 148 128 128 139 145 140 139 153 138 65 66 67 68 140 162", "Mode: a (34); Figure G.6 uses C43 for 6 of last 7 chars (same codeword count)" },
|
||||
/* 34*/ { GS1_MODE, 0, -1, -1, { 0, 0, "" }, "[17]120508[10]ABCD1234[410]9501101020917", 0, "(21) 273 145 140 133 136 138 65 66 67 68 140 162 272 169 137 178 139 129 130 137 145", "Mode: a (35)" },
|
||||
/* 35*/ { GS1_MODE, 0, -1, -1, { 0, 0, "" }, "[17]120508[10]ABCDEFGHI[410]9501101020917", 0, "(24) 273 145 140 133 136 138 65 66 67 68 69 70 71 72 73 272 169 137 178 139 129 130 137 145", "Mode: a (36)" },
|
||||
/* 36*/ { GS1_MODE | GS1PARENS_MODE, 0, -1, -1, { 0, 0, "" }, "(17)120508(10)ABCDEFGHI(410)9501101020917", 0, "(24) 273 145 140 133 136 138 65 66 67 68 69 70 71 72 73 272 169 137 178 139 129 130 137 145", "Mode: a (36)" },
|
||||
/* 37*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "ftp://", 0, "(4) 272 278 269 165", "Mode: c (6)" },
|
||||
/* 38*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, ".cgi", 0, "(4) 272 278 274 131", "Mode: c (4)" },
|
||||
/* 39*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "ftp://a.cgi", 0, "(6) 272 280 269 123 274 131", "Mode: c (11)" },
|
||||
/* 40*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "e: file:f.shtml !", 0, "(12) 272 280 30 94 236 235 72 233 39 52 267 250", "Mode: c (17)" },
|
||||
/* 41*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "Aaatel:", 0, "(6) 272 280 262 76 6 89", "Mode: c (7)" },
|
||||
/* 42*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "Aatel:a", 0, "(6) 272 280 262 76 271 161", "Mode: c (7)" },
|
||||
/* 43*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "Atel:aAa", 0, "(8) 272 275 6 89 275 148 0 42", "Mode: c (8)" },
|
||||
/* 44*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "tel:AAaa", 0, "(8) 272 275 271 161 6 28 262 118", "Mode: c (8)" },
|
||||
/* 45*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "AAaatel:aA", 0, "(10) 272 276 0 42 0 41 118 46 6 156", "Mode: c (10)" },
|
||||
/* 46*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "émailto:étel:éfile:éhttp://éhttps://éftp://", 0, "(18) 257 233 276 282 233 277 282 233 278 282 233 279 282 233 280 282 233 281", "Mode: 8ccccccc8cccc8ccccc8ccccccc8cccccccc8cccccc (43)" },
|
||||
/* 47*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "éhttp://www.url.com", 0, "(9) 257 233 279 269 186 113 81 45 252", "Mode: 8cccccccccccccccccc (19)" },
|
||||
/* 48*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "éhttps://www.url.com", 0, "(9) 257 233 280 269 186 113 81 45 252", "Mode: 8ccccccccccccccccccc (20)" },
|
||||
/* 49*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "http://url.com", 0, "(8) 281 117 114 108 46 99 111 109", "Mode: 8888888 (7)" },
|
||||
/* 50*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "https://url.com", 0, "(8) 282 117 114 108 46 99 111 109", "Mode: 8888888 (7)" },
|
||||
/* 51*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "http://url.com", 0, "(6) 281 262 133 216 269 251", "Mode: ccccccc (7)" },
|
||||
/* 52*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "https://url.com", 0, "(6) 282 262 133 216 269 251", "Mode: ccccccc (7)" },
|
||||
/* 53*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "{", 0, "(2) 272 123", "Mode: a (1)" },
|
||||
/* 54*/ { UNICODE_MODE, 0, -1, -1, { 2, 3, "" }, "A", 0, "(2) 257 65", "" },
|
||||
/* 55*/ { UNICODE_MODE, 0, -1, -1, { 1, 1, "" }, "A", ZINT_ERROR_INVALID_OPTION, "Error 558: Structured Append count out of range (2-8)", "" },
|
||||
/* 56*/ { UNICODE_MODE, 0, -1, -1, { 1, 9, "" }, "A", ZINT_ERROR_INVALID_OPTION, "Error 558: Structured Append count out of range (2-8)", "" },
|
||||
/* 57*/ { UNICODE_MODE, 0, -1, -1, { 0, 3, "" }, "A", ZINT_ERROR_INVALID_OPTION, "Error 559: Structured Append index out of range (1-3)", "" },
|
||||
/* 58*/ { UNICODE_MODE, 0, -1, -1, { 4, 3, "" }, "A", ZINT_ERROR_INVALID_OPTION, "Error 559: Structured Append index out of range (1-3)", "" },
|
||||
/* 59*/ { UNICODE_MODE, 0, -1, -1, { 8, 8, "0" }, "A", 0, "(2) 257 65", "" },
|
||||
/* 60*/ { UNICODE_MODE, 0, -1, -1, { 8, 8, "80088" }, "A", 0, "(2) 257 65", "" },
|
||||
/* 61*/ { UNICODE_MODE, 0, -1, -1, { 8, 8, "123456" }, "A", ZINT_ERROR_INVALID_OPTION, "Error 727: Structured Append ID too long (5 digit maximum)", "" },
|
||||
/* 62*/ { UNICODE_MODE, 0, -1, -1, { 8, 8, "A" }, "A", ZINT_ERROR_INVALID_OPTION, "Error 728: Invalid Structured Append ID (digits only)", "" },
|
||||
/* 63*/ { UNICODE_MODE, 0, -1, -1, { 8, 8, "80089" }, "A", ZINT_ERROR_INVALID_OPTION, "Error 729: Structured Append ID '80089' out of range (1-80088)", "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -254,13 +277,17 @@ static void test_input(int index, int generate, int debug) {
|
||||
symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_ULTRA, data[i].input_mode, data[i].eci, data[i].option_1, -1, data[i].option_3, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d\n", i, ret, data[i].ret);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, %d, %s, \"%s\", %s, \"%s\", \"%s\" },\n",
|
||||
printf(" /*%3d*/ { %s, %d, %d, %s, { %d, %d, \"%s\" }, \"%s\", %s, \"%s\", \"%s\" },\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_1, testUtilOption3Name(data[i].option_3),
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), testUtilErrorName(data[i].ret), symbol->errtxt, data[i].comment);
|
||||
} else {
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||
@ -279,6 +306,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
int eci;
|
||||
int option_1;
|
||||
int option_3;
|
||||
struct zint_structapp structapp;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
@ -291,7 +319,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
// Based on AIMD/TSC15032-43 (v 0.99c), with values updated from BWIPP update 2021-07-14
|
||||
// https://github.com/bwipp/postscriptbarcode/commit/4255810845fa8d45c6192dd30aee1fdad1aaf0cc
|
||||
struct item data[] = {
|
||||
/* 0*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "ULTRACODE_123456789!", 0, 13, 22, 1, "AIMD/TSC15032-43 Figure G.1 **NOT SAME** different compression",
|
||||
/* 0*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "ULTRACODE_123456789!", 0, 13, 22, 1, "AIMD/TSC15032-43 Figure G.1 **NOT SAME** different compression",
|
||||
"7777777777777777777777"
|
||||
"7857865353533131551857"
|
||||
"7767853515611616136717"
|
||||
@ -306,7 +334,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"7817851653331136333857"
|
||||
"7777777777777777777777"
|
||||
},
|
||||
/* 1*/ { UNICODE_MODE, 0, -1, -1, "ULTRACODE_123456789!", 0, 13, 24, 1, "AIMD/TSC15032-43 Figure G.1 **NOT SAME** no compression",
|
||||
/* 1*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "ULTRACODE_123456789!", 0, 13, 24, 1, "AIMD/TSC15032-43 Figure G.1 **NOT SAME** no compression",
|
||||
"777777777777777777777777"
|
||||
"785786533153313111181157"
|
||||
"776783361661161666676617"
|
||||
@ -321,7 +349,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"781786166533113663683357"
|
||||
"777777777777777777777777"
|
||||
},
|
||||
/* 2*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS", 0, 19, 23, 1, "AIMD/TSC15032-43 Figure G.2 **NOT SAME** different compression",
|
||||
/* 2*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS", 0, 19, 23, 1, "AIMD/TSC15032-43 Figure G.2 **NOT SAME** different compression",
|
||||
"77777777777777777777777"
|
||||
"78878663151561555158557"
|
||||
"77878315565635366667617"
|
||||
@ -342,7 +370,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78878333656153153368617"
|
||||
"77777777777777777777777"
|
||||
},
|
||||
/* 3*/ { DATA_MODE, 0, -1, -1, "\110\105\111\115\101\123\315\320\101\040\113\105\116\116\101\122\101\110\301\123\113\323\114\101\040\315\123\114\101\116\104\123", 0, 19, 23, 1, "AIMD/TSC15032-43 Figure G.2 **NOT SAME** no compression",
|
||||
/* 3*/ { DATA_MODE, 0, -1, -1, { 0, 0, "" }, "\110\105\111\115\101\123\315\320\101\040\113\105\116\116\101\122\101\110\301\123\113\323\114\101\040\315\123\114\101\116\104\123", 0, 19, 23, 1, "AIMD/TSC15032-43 Figure G.2 **NOT SAME** no compression",
|
||||
"77777777777777777777777"
|
||||
"78878633151153313358137"
|
||||
"77878315666661161167617"
|
||||
@ -363,7 +391,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78878361115516163138317"
|
||||
"77777777777777777777777"
|
||||
},
|
||||
/* 4*/ { UNICODE_MODE, 10, -1, ULTRA_COMPRESSION, "אולטרה-קוד1234", 0, 13, 19, 1, "AIMD/TSC15032-43 Figure G.3 Same except DCC correct whereas DCC in Figure G.3 is incorrent",
|
||||
/* 4*/ { UNICODE_MODE, 10, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "אולטרה-קוד1234", 0, 13, 19, 1, "AIMD/TSC15032-43 Figure G.3 Same except DCC correct whereas DCC in Figure G.3 is incorrent",
|
||||
"7777777777777777777"
|
||||
"7857865565566616657"
|
||||
"7737853333613351517"
|
||||
@ -378,7 +406,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"7817851316355311357"
|
||||
"7777777777777777777"
|
||||
},
|
||||
/* 5*/ { DATA_MODE, 0, -1, -1, "\340\345\354\350\370\344\055\367\345\343\061\062\063\064", 0, 13, 20, 1, "AIMD/TSC15032-43 Figure G.3 **NOT SAME** no compression",
|
||||
/* 5*/ { DATA_MODE, 0, -1, -1, { 0, 0, "" }, "\340\345\354\350\370\344\055\367\345\343\061\062\063\064", 0, 13, 20, 1, "AIMD/TSC15032-43 Figure G.3 **NOT SAME** no compression",
|
||||
"77777777777777777777"
|
||||
"78578611115666161157"
|
||||
"77678333656133516617"
|
||||
@ -393,7 +421,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78178613653553116357"
|
||||
"77777777777777777777"
|
||||
},
|
||||
/* 6*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, "https://aimglobal.org/jcrv3tX", 0, 13, 20, 1, "AIMD/TSC15032-43 Figure G.4a **NOT SAME** different compression; also DCC incorrect in figure",
|
||||
/* 6*/ { UNICODE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "https://aimglobal.org/jcrv3tX", 0, 13, 20, 1, "AIMD/TSC15032-43 Figure G.4a **NOT SAME** different compression; also DCC incorrect in figure",
|
||||
"77777777777777777777"
|
||||
"78578655115631563137"
|
||||
"77678563356513315617"
|
||||
@ -408,7 +436,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78178163363613633157"
|
||||
"77777777777777777777"
|
||||
},
|
||||
/* 7*/ { GS1_MODE, 0, -1, -1, "[01]03453120000011[17]121125[10]ABCD1234", 0, 13, 23, 1, "AIMD/TSC15032-43 Figure G.6 **NOT SAME** different compression and ECC; also DCC incorrect in figure",
|
||||
/* 7*/ { GS1_MODE, 0, -1, -1, { 0, 0, "" }, "[01]03453120000011[17]121125[10]ABCD1234", 0, 13, 23, 1, "AIMD/TSC15032-43 Figure G.6 **NOT SAME** different compression and ECC; also DCC incorrect in figure",
|
||||
"77777777777777777777777"
|
||||
"78578616535355353318157"
|
||||
"77678553116631616667617"
|
||||
@ -423,7 +451,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78178335533356531518357"
|
||||
"77777777777777777777777"
|
||||
},
|
||||
/* 8*/ { UNICODE_MODE, 0, -1, -1, "A", 0, 13, 13, 1, "",
|
||||
/* 8*/ { UNICODE_MODE, 0, -1, -1, { 0, 0, "" }, "A", 0, 13, 13, 1, "",
|
||||
"7777777777777"
|
||||
"7857863335517"
|
||||
"7717835163667"
|
||||
@ -438,7 +466,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"7817833536357"
|
||||
"7777777777777"
|
||||
},
|
||||
/* 9*/ { UNICODE_MODE, 0, 2, -1, "1234567890123456789012", 0, 13, 24, 1, "Length 22 == 25 MCC (C) with EC1 so 6 ECC by Table 12",
|
||||
/* 9*/ { UNICODE_MODE, 0, 2, -1, { 0, 0, "" }, "1234567890123456789012", 0, 13, 24, 1, "Length 22 == 25 MCC (C) with EC1 so 6 ECC by Table 12",
|
||||
"777777777777777777777777"
|
||||
"785786663111111111181117"
|
||||
"776783555536666666676667"
|
||||
@ -453,7 +481,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"781786155535516355186337"
|
||||
"777777777777777777777777"
|
||||
},
|
||||
/* 10*/ { UNICODE_MODE, 0, 2, -1, "12345678901234567890123", 0, 13, 25, 1, "Length 23 == 26 MCC (C) with EC1 so 7 ECC by Table 12",
|
||||
/* 10*/ { UNICODE_MODE, 0, 2, -1, { 0, 0, "" }, "12345678901234567890123", 0, 13, 25, 1, "Length 23 == 26 MCC (C) with EC1 so 7 ECC by Table 12",
|
||||
"7777777777777777777777777"
|
||||
"7857863655511111111811117"
|
||||
"7767831563666666666766667"
|
||||
@ -468,7 +496,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"7817835653363636636836657"
|
||||
"7777777777777777777777777"
|
||||
},
|
||||
/* 11*/ { UNICODE_MODE, 0, 1, -1, "1", 0, 13, 11, 1, "Figure 3a min 2-row, EC0",
|
||||
/* 11*/ { UNICODE_MODE, 0, 1, -1, { 0, 0, "" }, "1", 0, 13, 11, 1, "Figure 3a min 2-row, EC0",
|
||||
"77777777777"
|
||||
"78578661517"
|
||||
"77178355667"
|
||||
@ -483,7 +511,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78178365567"
|
||||
"77777777777"
|
||||
},
|
||||
/* 12*/ { UNICODE_MODE, 0, 6, -1, "1234567890123456789012", 0, 13, 28, 0, "Figure 3a max 2-row, EC5 **NOT SAME** extra col due to BWIPP update 2021-07-14; BWIPP chooses 3 rows instead",
|
||||
/* 12*/ { UNICODE_MODE, 0, 6, -1, { 0, 0, "" }, "1234567890123456789012", 0, 13, 28, 0, "Figure 3a max 2-row, EC5 **NOT SAME** extra col due to BWIPP update 2021-07-14; BWIPP chooses 3 rows instead",
|
||||
"7777777777777777777777777777"
|
||||
"7857863331131511111811111157"
|
||||
"7717835613316666666766666617"
|
||||
@ -498,7 +526,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"7817863633563563636863636637"
|
||||
"7777777777777777777777777777"
|
||||
},
|
||||
/* 13*/ { UNICODE_MODE, 0, 1, -1, "12345678901234567890123456789012345", 0, 19, 22, 1, "Figure 3b min 3-row, EC0 **NOT SAME** Zint min not same as real min as chooses lower rows first (would need row option)",
|
||||
/* 13*/ { UNICODE_MODE, 0, 1, -1, { 0, 0, "" }, "12345678901234567890123456789012345", 0, 19, 22, 1, "Figure 3b min 3-row, EC0 **NOT SAME** Zint min not same as real min as chooses lower rows first (would need row option)",
|
||||
"7777777777777777777777"
|
||||
"7887866511111111111817"
|
||||
"7787833666666666666767"
|
||||
@ -519,7 +547,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"7887831331656665333867"
|
||||
"7777777777777777777777"
|
||||
},
|
||||
/* 14*/ { UNICODE_MODE, 0, 6, -1, "1234567890123456789012345678901234567890123456789012345", 0, 19, 38, 0, "Figure 3b max 3-row, EC5 **NOT SAME** extra col due to BWIPP update 2021-07-14; BWIPP chooses 4 rows instead",
|
||||
/* 14*/ { UNICODE_MODE, 0, 6, -1, { 0, 0, "" }, "1234567890123456789012345678901234567890123456789012345", 0, 19, 38, 0, "Figure 3b max 3-row, EC5 **NOT SAME** extra col due to BWIPP update 2021-07-14; BWIPP chooses 4 rows instead",
|
||||
"77777777777777777777777777777777777777"
|
||||
"78878611311563611118111111111111111817"
|
||||
"77878366156351555667666666666666666767"
|
||||
@ -540,7 +568,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78878166553313356538331656665333165837"
|
||||
"77777777777777777777777777777777777777"
|
||||
},
|
||||
/* 15*/ { UNICODE_MODE, 0, 1, -1, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 25, 30, 1, "Figure 3c min 4-row, EC0 **NOT SAME** Zint min not same as real min as chooses lower rows first (would need row option)",
|
||||
/* 15*/ { UNICODE_MODE, 0, 1, -1, { 0, 0, "" }, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 25, 30, 1, "Figure 3c min 4-row, EC0 **NOT SAME** Zint min not same as real min as chooses lower rows first (would need row option)",
|
||||
"777777777777777777777777777777"
|
||||
"788786511111111111181111111117"
|
||||
"778783166666666666676666666667"
|
||||
@ -567,7 +595,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"788785533666336663386663366667"
|
||||
"777777777777777777777777777777"
|
||||
},
|
||||
/* 16*/ { UNICODE_MODE, 0, 6, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456", 0, 25, 50, 0, "Figure 3c max 4-row **NOT SAME** extra col due to BWIPP update 2021-07-14; BWIPP chooses 5 rows instead",
|
||||
/* 16*/ { UNICODE_MODE, 0, 6, -1, { 0, 0, "" }, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456", 0, 25, 50, 0, "Figure 3c max 4-row **NOT SAME** extra col due to BWIPP update 2021-07-14; BWIPP chooses 5 rows instead",
|
||||
"77777777777777777777777777777777777777777777777777"
|
||||
"78878631533313135518111111111111111811111111111117"
|
||||
"77878315116161313667666666666666666766666666666667"
|
||||
@ -594,7 +622,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78878633351651561668633666336663366863366633666337"
|
||||
"77777777777777777777777777777777777777777777777777"
|
||||
},
|
||||
/* 17*/ { UNICODE_MODE, 0, 1, -1, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", 0, 31, 42, 1, "Figure 3d min 5-row, EC0 **NOT SAME** Zint min not same as real min as chooses lower rows first (would need row option)",
|
||||
/* 17*/ { UNICODE_MODE, 0, 1, -1, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", 0, 31, 42, 1, "Figure 3d min 5-row, EC0 **NOT SAME** Zint min not same as real min as chooses lower rows first (would need row option)",
|
||||
"777777777777777777777777777777777777777777"
|
||||
"788786511111111111181111111111111118111117"
|
||||
"778783366666666666676666666666666667666667"
|
||||
@ -627,7 +655,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"788783616161616161681616161616161618616167"
|
||||
"777777777777777777777777777777777777777777"
|
||||
},
|
||||
/* 18*/ { UNICODE_MODE, 0, 6, -1, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 31, 66, 1, "Figure 3d max 5-row, EC5 **NOT SAME** Max columns due to 282 limit is 60 not 61 as shown",
|
||||
/* 18*/ { UNICODE_MODE, 0, 6, -1, { 0, 0, "" }, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012", 0, 31, 66, 1, "Figure 3d max 5-row, EC5 **NOT SAME** Max columns due to 282 limit is 60 not 61 as shown",
|
||||
"777777777777777777777777777777777777777777777777777777777777777777"
|
||||
"788786563656553165385551111111111118111111111111111811111111111117"
|
||||
"778783136511335313673366666666666667666666666666666766666666666667"
|
||||
@ -660,7 +688,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"788786316551515665186353535353535358353535353535353853535353535357"
|
||||
"777777777777777777777777777777777777777777777777777777777777777777"
|
||||
},
|
||||
/* 19*/ { UNICODE_MODE | ESCAPE_MODE, 0, -1, -1, "[)>\\R06\\G17V12345\\G1P234TYU\\GS6789\\R\\E", 0, 13, 27, 0, "06 Macro; not supported by BWIPP",
|
||||
/* 19*/ { UNICODE_MODE | ESCAPE_MODE, 0, -1, -1, { 0, 0, "" }, "[)>\\R06\\G17V12345\\G1P234TYU\\GS6789\\R\\E", 0, 13, 27, 0, "06 Macro; not supported by BWIPP",
|
||||
"777777777777777777777777777"
|
||||
"785786311655611111181311157"
|
||||
"771783153516566666676156617"
|
||||
@ -675,7 +703,7 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"781783531133356335585331617"
|
||||
"777777777777777777777777777"
|
||||
},
|
||||
/* 20*/ { UNICODE_MODE | ESCAPE_MODE, 0, -1, ULTRA_COMPRESSION, "[)>\\R06\\G17V12345\\G1P234TYU\\GS6789\\R\\E", 0, 13, 23, 0, "06 Macro; not supported by BWIPP",
|
||||
/* 20*/ { UNICODE_MODE | ESCAPE_MODE, 0, -1, ULTRA_COMPRESSION, { 0, 0, "" }, "[)>\\R06\\G17V12345\\G1P234TYU\\GS6789\\R\\E", 0, 13, 23, 0, "06 Macro; not supported by BWIPP",
|
||||
"77777777777777777777777"
|
||||
"78578613335635131318557"
|
||||
"77678536566511516157617"
|
||||
@ -690,6 +718,36 @@ static void test_encode(int index, int generate, int debug) {
|
||||
"78178116153635315338657"
|
||||
"77777777777777777777777"
|
||||
},
|
||||
/* 21*/ { UNICODE_MODE, 0, -1, -1, { 1, 2, "" }, "A", 0, 13, 14, 1, "Structured Append without File Number",
|
||||
"77777777777777"
|
||||
"78578633165557"
|
||||
"77378351336117"
|
||||
"78178666115357"
|
||||
"77578533636617"
|
||||
"78378156565557"
|
||||
"77878787878787"
|
||||
"78678153513117"
|
||||
"77178365631637"
|
||||
"78578133353557"
|
||||
"77678651566317"
|
||||
"78178535111557"
|
||||
"77777777777777"
|
||||
},
|
||||
/* 22*/ { UNICODE_MODE, 0, -1, -1, { 8, 8, "283" }, "A", 0, 13, 15, 1, "Structured Append with File Number",
|
||||
"777777777777777"
|
||||
"785786353356157"
|
||||
"773783115665317"
|
||||
"781786661553157"
|
||||
"776785535165317"
|
||||
"783781613656557"
|
||||
"778787878787877"
|
||||
"786781563131117"
|
||||
"771783651313637"
|
||||
"786785336531557"
|
||||
"773781115663317"
|
||||
"781785653516557"
|
||||
"777777777777777"
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
@ -712,13 +770,17 @@ static void test_encode(int index, int generate, int debug) {
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_ULTRA, data[i].input_mode, data[i].eci, data[i].option_1, -1, data[i].option_3, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
if (data[i].structapp.count) {
|
||||
symbol->structapp = data[i].structapp;
|
||||
}
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %d, %d, %s, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
printf(" /*%3d*/ { %s, %d, %d, %s, { %d, %d, \"%s\" }, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_1, testUtilOption3Name(data[i].option_3),
|
||||
data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), testUtilErrorName(data[i].ret),
|
||||
symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
|
@ -728,7 +728,7 @@ char *testUtilEscape(char *buffer, int length, char *escaped, int escaped_size)
|
||||
|
||||
for (i = 0; b < be && i < escaped_size; b++) {
|
||||
// For VC6-compatibility need to split literal strings into <= 2K chunks
|
||||
if (i > 2040 && i / 2040 != chunk) {
|
||||
if (i > 2040 && i / 2040 != chunk && (*b & 0xC0) != 0x80) { // Avoid UTF-8 continuations
|
||||
chunk = i / 2040;
|
||||
if (i + 3 < escaped_size) {
|
||||
escaped[i] = '"';
|
||||
@ -2195,6 +2195,13 @@ static const char *testUtilBwippName(int index, const struct zint_symbol *symbol
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
if (symbol->structapp.count && symbology != BARCODE_MAXICODE) {
|
||||
if (debug & ZINT_DEBUG_TEST_PRINT) {
|
||||
printf("i:%d %s not BWIPP compatible, Structured Append not supported\n",
|
||||
index, testUtilBarcodeName(symbology));
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (symbology == BARCODE_CODE11) {
|
||||
if (option_2 != 1 && option_2 != 2) { /* 2 check digits (Zint default) not supported */
|
||||
@ -2867,6 +2874,11 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
||||
parse = 1;
|
||||
}
|
||||
}
|
||||
if (symbol->structapp.count) {
|
||||
sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%ssam=%c%c",
|
||||
strlen(bwipp_opts_buf) ? " " : "", itoc(symbol->structapp.index), itoc(symbol->structapp.count));
|
||||
bwipp_opts = bwipp_opts_buf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
101
backend/ultra.c
101
backend/ultra.c
@ -796,7 +796,7 @@ static int ultra_generate_codewords(struct zint_symbol *symbol, const unsigned c
|
||||
mode[crop_length] = '\0';
|
||||
|
||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||
printf("Mode: %s (%d)\n", mode, (int) strlen(mode));
|
||||
printf("Mode (%d): %s\n", (int) strlen(mode), mode);
|
||||
}
|
||||
|
||||
/* Use results from test to perform actual mode switching */
|
||||
@ -858,6 +858,8 @@ static int ultra_generate_codewords(struct zint_symbol *symbol, const unsigned c
|
||||
INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
int data_cw_count = 0;
|
||||
int acc, qcc;
|
||||
int scr[3] = {0}, scr_cw_count = 0; /* Symbol Control Region (only if have Structured Append) */
|
||||
int dr_count;
|
||||
int ecc_level;
|
||||
int rows, columns;
|
||||
int total_cws;
|
||||
@ -875,16 +877,59 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
char *pattern;
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
cw_memalloc = length * 2;
|
||||
if (cw_memalloc < 283) {
|
||||
cw_memalloc = 283;
|
||||
}
|
||||
|
||||
if (symbol->eci > 811799) {
|
||||
strcpy(symbol->errtxt, "590: ECI value not supported by Ultracode");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if (symbol->structapp.count) {
|
||||
int link2 = 2; /* Draft Table 7, Structured Append Group (SAG) with no File Number */
|
||||
|
||||
if (symbol->structapp.count < 2 || symbol->structapp.count > 8) {
|
||||
strcpy(symbol->errtxt, "558: Structured Append count out of range (2-8)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (symbol->structapp.index < 1 || symbol->structapp.index > symbol->structapp.count) {
|
||||
sprintf(symbol->errtxt, "559: Structured Append index out of range (1-%d)", symbol->structapp.count);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
scr_cw_count = 1;
|
||||
|
||||
if (symbol->structapp.id[0]) {
|
||||
int id, id_len;
|
||||
|
||||
for (id_len = 0; id_len < 32 && symbol->structapp.id[id_len]; id_len++);
|
||||
|
||||
if (id_len > 5) { /* 282 * 283 + 282 = 80088 */
|
||||
strcpy(symbol->errtxt, "727: Structured Append ID too long (5 digit maximum)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
id = to_int((const unsigned char *) symbol->structapp.id, id_len);
|
||||
if (id == -1) {
|
||||
strcpy(symbol->errtxt, "728: Invalid Structured Append ID (digits only)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (id > 80088) {
|
||||
sprintf(symbol->errtxt, "729: Structured Append ID '%d' out of range (1-80088)", id);
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
if (id) {
|
||||
link2 = 3; /* Missing from draft Table 7 but mentioned 7.4.3 - SAG with File Number */
|
||||
scr[1] = id / 283;
|
||||
scr[2] = id % 283; /* 7.4.3.2 says 1-282 but can be 0 if id >= 283 */
|
||||
scr_cw_count += 2;
|
||||
}
|
||||
}
|
||||
|
||||
scr[0] = link2 * 70 + (symbol->structapp.count - 1) * 8 + symbol->structapp.index - 1;
|
||||
}
|
||||
|
||||
cw_memalloc = length * 2;
|
||||
if (cw_memalloc < 283) {
|
||||
cw_memalloc = 283;
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
int data_codewords[cw_memalloc];
|
||||
#else
|
||||
@ -906,7 +951,7 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
}
|
||||
#endif
|
||||
|
||||
data_cw_count += 2; // 2 == MCC + ACC (data codeword count includes start char)
|
||||
data_cw_count += 2 + scr_cw_count; // 2 == MCC + ACC (data codeword count includes start char)
|
||||
|
||||
/* Default ECC level is EC2 */
|
||||
if ((symbol->option_1 <= 0) || (symbol->option_1 > 6)) {
|
||||
@ -926,12 +971,25 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
}
|
||||
|
||||
}
|
||||
acc = qcc - 3;
|
||||
|
||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||
printf("EC%d codewords: %d\n", ecc_level + 1, qcc);
|
||||
}
|
||||
|
||||
acc = qcc - 3;
|
||||
if (scr_cw_count) {
|
||||
acc += 70; /* Link1 = 1 (* 70) means SCR present */
|
||||
}
|
||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||
printf("MCC: %d, ACC: %d, SCR: %d", data_cw_count, acc, scr_cw_count);
|
||||
if (scr_cw_count) {
|
||||
printf(", SCR0: %d", scr[0]);
|
||||
if (scr_cw_count > 1) {
|
||||
printf(", SCR1: %d, SCR2: %d", scr[1], scr[2]);
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/* Maximum capacity is 282 codewords */
|
||||
total_cws = data_cw_count + qcc + 3; // 3 == TCC pattern + RSEC pattern + QCC pattern
|
||||
if (total_cws - 3 > 282) {
|
||||
@ -941,8 +999,8 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
|
||||
rows = 5;
|
||||
for (i = 2; i >= 0; i--) {
|
||||
// Total codewords less 6 overhead (Start + MCC + ACC + 3 TCC/RSEC/QCC patterns)
|
||||
if (total_cws - 6 <= ultra_maxsize[i]) {
|
||||
// Total codewords less 6 (+ SCR) overhead (Start + MCC + ACC (+ SCR) + 3 TCC/RSEC/QCC patterns)
|
||||
if (total_cws - (6 + scr_cw_count) <= ultra_maxsize[i]) {
|
||||
rows--;
|
||||
}
|
||||
}
|
||||
@ -957,17 +1015,19 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
columns += columns / 15; // Secondary vertical clock tracks
|
||||
|
||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||
printf("Calculated size is %d rows by %d columns\n", rows, columns);
|
||||
printf("Calculated size is %d rows by %d columns (pads %d)\n", rows, columns, pads);
|
||||
}
|
||||
|
||||
/* Insert MCC and ACC into data codewords */
|
||||
for (i = 282; i > 2; i--) {
|
||||
data_codewords[i] = data_codewords[i - 2];
|
||||
/* Insert MCC and ACC and possibly SCR into data codewords */
|
||||
for (i = 282; i > 2 + scr_cw_count; i--) {
|
||||
data_codewords[i] = data_codewords[i - (2 + scr_cw_count)];
|
||||
}
|
||||
data_codewords[1] = data_cw_count; // MCC
|
||||
data_codewords[2] = acc; // ACC
|
||||
for (i = 0; i < scr_cw_count; i++) { // SCR
|
||||
data_codewords[3 + i] = scr[i];
|
||||
}
|
||||
|
||||
locn = 0;
|
||||
/* Calculate error correction codewords (RSEC) */
|
||||
|
||||
ultra_gf283((short) data_cw_count, (short) qcc, data_codewords);
|
||||
@ -981,6 +1041,7 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
}
|
||||
|
||||
/* Rearrange to make final codeword sequence */
|
||||
locn = 0;
|
||||
codeword[locn++] = data_codewords[282 - (data_cw_count + qcc)]; // Start Character
|
||||
codeword[locn++] = data_cw_count; // MCC
|
||||
for (i = 0; i < qcc; i++) {
|
||||
@ -989,8 +1050,12 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
codeword[locn++] = data_cw_count + qcc; // TCC = C + Q - section 6.11.4
|
||||
codeword[locn++] = 283; // Separator
|
||||
codeword[locn++] = acc; // ACC
|
||||
for (i = 0; i < (data_cw_count - 3); i++) {
|
||||
codeword[locn++] = data_codewords[(282 - ((data_cw_count - 3) + qcc)) + i]; // Data Region
|
||||
for (i = 0; i < scr_cw_count; i++) { // SCR
|
||||
codeword[locn++] = scr[i];
|
||||
}
|
||||
dr_count = data_cw_count - (3 + scr_cw_count);
|
||||
for (i = 0; i < dr_count; i++) {
|
||||
codeword[locn++] = data_codewords[(282 - (dr_count + qcc)) + i]; // Data Region
|
||||
}
|
||||
for (i = 0; i < pads; i++) {
|
||||
codeword[locn++] = 284; // Pad pattern
|
||||
|
@ -562,7 +562,7 @@ static int isbn(struct zint_symbol *symbol, unsigned char source[], const int sr
|
||||
/* "X" can only occur in last position */
|
||||
error_number = is_sane(NEON, source, 12);
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "277: Invalid character in data, \"X\" allowed in last position only");
|
||||
strcpy(symbol->errtxt, "282: Invalid character in data, \"X\" allowed in last position only");
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -586,7 +586,7 @@ static int isbn(struct zint_symbol *symbol, unsigned char source[], const int sr
|
||||
/* "X" can only occur in last position */
|
||||
error_number = is_sane(NEON, source, 9);
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "277: Invalid character in data, \"X\" allowed in last position only");
|
||||
strcpy(symbol->errtxt, "296: Invalid character in data, \"X\" allowed in last position only");
|
||||
return error_number;
|
||||
}
|
||||
|
||||
|
@ -378,8 +378,8 @@ static void vector_reduce_rectangles(struct zint_symbol *symbol) {
|
||||
target = prev->next;
|
||||
|
||||
while (target) {
|
||||
if ((rect->x == target->x) && (rect->width == target->width) && (stripf(rect->y + rect->height) == target->y)
|
||||
&& (rect->colour == target->colour)) {
|
||||
if ((rect->x == target->x) && (rect->width == target->width)
|
||||
&& (stripf(rect->y + rect->height) == target->y) && (rect->colour == target->colour)) {
|
||||
rect->height += target->height;
|
||||
prev->next = target->next;
|
||||
free(target);
|
||||
|
@ -81,6 +81,13 @@ extern "C" {
|
||||
struct zint_vector_circle *circles; /* Pointer to first circle */
|
||||
};
|
||||
|
||||
/* Structured Append info - ignored unless `zint_structapp.count` is set to non-zero value */
|
||||
struct zint_structapp {
|
||||
int index; /* Position in Structured Append sequence, 1-based. Must be <= count */
|
||||
int count; /* Number of symbols in Structured Append sequence. Set >= 2 to add SA Info */
|
||||
char id[32]; /* Optional ID to distinguish sequence, ASCII, NUL-terminated unless max 32 long */
|
||||
};
|
||||
|
||||
/* Main symbol structure */
|
||||
struct zint_symbol {
|
||||
int symbology; /* Symbol to use (see BARCODE_XXX below) */
|
||||
@ -105,6 +112,7 @@ extern "C" {
|
||||
int eci; /* Extended Channel Interpretation. Default 0 (none) */
|
||||
float dot_size; /* Size of dots used in BARCODE_DOTTY_MODE */
|
||||
float guard_descent; /* Height in X-dimensions that UPC/EAN guard bars descend. Default 5 */
|
||||
struct zint_structapp structapp; /* Structured Append info. Default structapp.count 0 (none) */
|
||||
int warn_level; /* Affects error/warning value returned by Zint API (see WARN_XXX below) */
|
||||
int debug; /* Debugging flags */
|
||||
unsigned char text[128]; /* Human Readable Text (if any), UTF-8, NUL-terminated (output only) */
|
||||
@ -314,6 +322,7 @@ extern "C" {
|
||||
#define ZINT_CAP_READER_INIT 0x0200 /* Supports Reader Initialisation? */
|
||||
#define ZINT_CAP_FULL_MULTIBYTE 0x0400 /* Supports full-multibyte option? */
|
||||
#define ZINT_CAP_MASK 0x0800 /* Is mask selectable? */
|
||||
#define ZINT_CAP_STRUCTAPP 0x1000 /* Supports Structured Append? */
|
||||
|
||||
/* The largest amount of data that can be encoded is 4350 4-byte UTF-8 chars in Han Xin Code */
|
||||
#define ZINT_MAX_DATA_LEN 17400
|
||||
|
@ -57,6 +57,7 @@ namespace Zint {
|
||||
m_dotty = false;
|
||||
m_dot_size = 4.0f / 5.0f;
|
||||
m_guardDescent = 5.0f;
|
||||
memset(&m_structapp, 0, sizeof(m_structapp));
|
||||
m_whitespace = 0;
|
||||
m_vwhitespace = 0;
|
||||
m_gs1parens = false;
|
||||
@ -104,6 +105,7 @@ namespace Zint {
|
||||
}
|
||||
m_zintSymbol->dot_size = m_dot_size;
|
||||
m_zintSymbol->guard_descent = m_guardDescent;
|
||||
m_zintSymbol->structapp = m_structapp;
|
||||
m_zintSymbol->show_hrt = m_show_hrt ? 1 : 0;
|
||||
m_zintSymbol->eci = m_eci;
|
||||
m_zintSymbol->scale = m_scale;
|
||||
@ -246,6 +248,31 @@ namespace Zint {
|
||||
m_guardDescent = guardDescent;
|
||||
}
|
||||
|
||||
void QZint::setStructApp(const int count, const int index, const QString& id) {
|
||||
if (count) {
|
||||
m_structapp.count = count;
|
||||
m_structapp.index = index;
|
||||
memset(m_structapp.id, 0, sizeof(m_structapp.id));
|
||||
if (!id.isEmpty()) {
|
||||
QByteArray idArr = id.toLatin1();
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
#endif
|
||||
strncpy(m_structapp.id, idArr, sizeof(m_structapp.id));
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
clearStructApp();
|
||||
}
|
||||
}
|
||||
|
||||
void QZint::clearStructApp() {
|
||||
memset(&m_structapp, 0, sizeof(m_structapp));
|
||||
}
|
||||
|
||||
QColor QZint::fgColor() const {
|
||||
return m_fgColor;
|
||||
}
|
||||
@ -441,7 +468,8 @@ namespace Zint {
|
||||
resetSymbol();
|
||||
strcpy(m_zintSymbol->outfile, filename.toLatin1().left(255));
|
||||
QByteArray bstr = m_text.toUtf8();
|
||||
m_error = ZBarcode_Encode_and_Print(m_zintSymbol, (unsigned char *) bstr.data(), bstr.length(), m_rotate_angle);
|
||||
m_error = ZBarcode_Encode_and_Print(m_zintSymbol, (unsigned char *) bstr.data(), bstr.length(),
|
||||
m_rotate_angle);
|
||||
if (m_error >= ZINT_ERROR) {
|
||||
m_lastError = m_zintSymbol->errtxt;
|
||||
return false;
|
||||
@ -479,6 +507,7 @@ namespace Zint {
|
||||
}
|
||||
}
|
||||
|
||||
/* Note: legacy argument `mode` is not used */
|
||||
void QZint::render(QPainter& painter, const QRectF& paintRect, AspectRatioMode /*mode*/) {
|
||||
struct zint_vector_rect *rect;
|
||||
struct zint_vector_hexagon *hex;
|
||||
@ -639,4 +668,4 @@ namespace Zint {
|
||||
|
||||
painter.restore();
|
||||
}
|
||||
}
|
||||
} /* namespace Zint */
|
||||
|
@ -72,6 +72,9 @@ public:
|
||||
float guardDescent() const;
|
||||
void setGuardDescent(float guardDescent);
|
||||
|
||||
void setStructApp(const int count, const int index, const QString& id);
|
||||
void clearStructApp();
|
||||
|
||||
QColor fgColor() const;
|
||||
void setFgColor(const QColor& fgColor);
|
||||
|
||||
@ -181,6 +184,7 @@ private:
|
||||
bool m_dotty;
|
||||
float m_dot_size;
|
||||
float m_guardDescent;
|
||||
struct zint_structapp m_structapp;
|
||||
bool m_gs1parens;
|
||||
bool m_gs1nocheck;
|
||||
bool m_gssep;
|
||||
@ -193,6 +197,6 @@ private:
|
||||
int target_size_vert; /* Legacy */
|
||||
};
|
||||
|
||||
}
|
||||
} /* namespace Zint */
|
||||
|
||||
#endif /* QZINT_H */
|
||||
|
@ -127,6 +127,9 @@
|
||||
- iHeight check int -> double
|
||||
2021-09-24 GL
|
||||
- Added -quietzones and -noquietzones options
|
||||
2021-09-27 GL
|
||||
- Added -structapp
|
||||
- Split up -to parsing (could seg fault if given non-int for X0 or Y0)
|
||||
*/
|
||||
|
||||
#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
|
||||
@ -429,7 +432,6 @@ static int s_eci_number[] = {
|
||||
3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30
|
||||
};
|
||||
|
||||
|
||||
/* Version information */
|
||||
static char version_string[] = VERSION;
|
||||
/* Help text */
|
||||
@ -489,6 +491,7 @@ static char help_message[] = "zint tcl(stub,obj) dll\n"
|
||||
/* cli option --small replaced by -smalltext */
|
||||
" -smalltext bool: tiny interpretation line font\n"
|
||||
" -square bool: force Data Matrix symbols to be square\n"
|
||||
" -structapp {index count ?id?}: set Structured Append info\n"
|
||||
/* cli option --types not supported */
|
||||
" -vers integer: Symbology option\n"
|
||||
" -vwhitesp integer: vertical quiet zone in modules\n"
|
||||
@ -717,7 +720,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
"-height", "-init", "-mask", "-mode",
|
||||
"-nobackground", "-noquietzones", "-notext", "-primary", "-quietzones",
|
||||
"-reverse", "-rotate", "-rows", "-scale", "-scmvv",
|
||||
"-secure", "-separator", "-smalltext", "-square",
|
||||
"-secure", "-separator", "-smalltext", "-square", "-structapp",
|
||||
"-to", "-vers", "-vwhitesp", "-werror", "-whitesp",
|
||||
NULL};
|
||||
enum iOption {
|
||||
@ -727,7 +730,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
iHeight, iInit, iMask, iMode,
|
||||
iNoBackground, iNoQuietZones, iNoText, iPrimary, iQuietZones,
|
||||
iReverse, iRotate, iRows, iScale, iSCMvv,
|
||||
iSecure, iSeparator, iSmallText, iSquare,
|
||||
iSecure, iSeparator, iSmallText, iSquare, iStructApp,
|
||||
iTo, iVers, iVWhiteSp, iWError, iWhiteSp
|
||||
};
|
||||
int optionIndex;
|
||||
@ -819,7 +822,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
Tcl_UtfToExternalDString( hZINTEncoding, pStr, lStr, &dString);
|
||||
if (Tcl_DStringLength(&dString) > (optionIndex==iPrimary?90:250)) {
|
||||
Tcl_DStringFree(&dString);
|
||||
Tcl_SetObjResult(interp,Tcl_NewStringObj("String to long", -1));
|
||||
Tcl_SetObjResult(interp,Tcl_NewStringObj("String too long", -1));
|
||||
fError = 1;
|
||||
}
|
||||
break;
|
||||
@ -1109,6 +1112,54 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
case iWhiteSp:
|
||||
my_symbol->whitespace_width = intValue;
|
||||
break;
|
||||
case iStructApp:
|
||||
/* >> Decode the -structapp parameter as list of index count ?ID? */
|
||||
{
|
||||
Tcl_Obj *poParam;
|
||||
struct zint_structapp structapp = { 0, 0, "" };
|
||||
char *pStructAppId = NULL;
|
||||
int lStructAppId = 0;
|
||||
if (TCL_OK != Tcl_ListObjLength(interp,
|
||||
objv[optionPos+1], &lStr))
|
||||
{
|
||||
fError = 1;
|
||||
} else if ( ! ( lStr == 2 || lStr == 3 ) ) {
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_NewStringObj(
|
||||
"option -structapp not a list of 2 or 3", -1));
|
||||
fError = 1;
|
||||
} else {
|
||||
if (TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
0, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp, poParam, &structapp.index)
|
||||
|| TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
1, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp, poParam, &structapp.count))
|
||||
{
|
||||
fError = 1;
|
||||
}
|
||||
if (!fError && lStr == 3 && (
|
||||
TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
2, &poParam)
|
||||
|| !(pStructAppId = Tcl_GetStringFromObj(poParam, &lStructAppId))
|
||||
|| lStructAppId > 32
|
||||
))
|
||||
{
|
||||
if (lStructAppId > 32) {
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_NewStringObj("Structured Append ID too long", -1));
|
||||
}
|
||||
fError = 1;
|
||||
}
|
||||
if (!fError) {
|
||||
my_symbol->structapp = structapp;
|
||||
if (lStr == 3 && pStructAppId && lStructAppId) {
|
||||
strncpy(my_symbol->structapp.id, pStructAppId, lStructAppId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case iTo:
|
||||
/* >> Decode the -to parameter as list of X0 Y0 ?Width Height? */
|
||||
{
|
||||
@ -1122,25 +1173,29 @@ static int Encode(Tcl_Interp *interp, int objc,
|
||||
Tcl_NewStringObj(
|
||||
"option -to not a list of 2 or 4", -1));
|
||||
fError = 1;
|
||||
} else if ((
|
||||
TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
0, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,&destX0)
|
||||
|| TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
1, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,&destY0)
|
||||
|| lStr == 4) && (
|
||||
TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
2, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,
|
||||
&destWidth)
|
||||
|| TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
3, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,
|
||||
&destHeight)
|
||||
))
|
||||
{
|
||||
fError = 1;
|
||||
} else {
|
||||
if (TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
0, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,&destX0)
|
||||
|| TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
1, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,&destY0))
|
||||
{
|
||||
fError = 1;
|
||||
}
|
||||
if (!fError && lStr == 4 && (
|
||||
TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
2, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,
|
||||
&destWidth)
|
||||
|| TCL_OK != Tcl_ListObjIndex(interp, objv[optionPos+1],
|
||||
3, &poParam)
|
||||
|| TCL_OK != Tcl_GetIntFromObj(interp,poParam,
|
||||
&destHeight)
|
||||
))
|
||||
{
|
||||
fError = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -478,7 +478,6 @@ vector files so that...
|
||||
zint --bg=ff0000 --fg=ffffff00 ...
|
||||
|
||||
will give different results for PNG and SVG. Experimentation is advised!
|
||||
Also note that these options don't work properly with MaxiCode yet.
|
||||
|
||||
In addition the --nobackground option will simply remove the background from
|
||||
PNG, GIF, TIF, SVG, EMF and EPS files.
|
||||
@ -765,7 +764,7 @@ PCX | ZSoft Paintbrush image
|
||||
PNG | Portable Network Graphic
|
||||
SVG | Scalable Vector Graphic
|
||||
TIF | Tagged Image File Format
|
||||
TXT | Text file (see 4.16)
|
||||
TXT | Text file (see 4.17)
|
||||
--------------------------------------------------------------
|
||||
|
||||
=============================================================================
|
||||
@ -799,7 +798,26 @@ minimum dot size is 0.01, the maximum is 20.
|
||||
|
||||
The default and minimum scale for raster output in dotty mode is 1.
|
||||
|
||||
4.15 Help options
|
||||
4.15 Structured Append
|
||||
----------------------
|
||||
Structured Append is a method of splitting data among several symbols so that
|
||||
they form a sequence that can be scanned and re-assembled in the correct order
|
||||
on reading, and is available for Aztec Code, Code One, Data Matrix, DotCode,
|
||||
Grid Matrix, MaxiCode, MicroPDF417, PDF417, QR Code and Ultracode.
|
||||
|
||||
The --structapp option marks a symbol as part of a Structured Append sequence,
|
||||
and has the format
|
||||
|
||||
--structapp=I,C[,ID]
|
||||
|
||||
where I is the index (position) of the symbol in the Structured Append sequence,
|
||||
C is the count or total number of symbols in the sequence, and ID is an optional
|
||||
identifier (not available for Code One, DotCode or MaxiCode) that is the same
|
||||
for all symbols belonging to the same sequence. The index is 1-based and goes
|
||||
from 1 to count. Count must be 2 or more. See the individual symbologies for
|
||||
further details.
|
||||
|
||||
4.16 Help options
|
||||
-----------------
|
||||
There are three help options which give information about how to use the
|
||||
command line. The -h or --help option will display a list of all of the valid
|
||||
@ -810,7 +828,7 @@ ID numbers and names.
|
||||
|
||||
The -e or --ecinos option gives a list of the ECI codes.
|
||||
|
||||
4.16 Other output options
|
||||
4.17 Other output options
|
||||
-------------------------
|
||||
For linear barcodes the text present in the output image can be removed by
|
||||
using the --notext option.
|
||||
@ -1108,6 +1126,9 @@ dot_size | float | Size of dots used in dotty | 4.0 / 5.0
|
||||
| | mode. |
|
||||
guard_descent | float | Height of guard bar descent | 5.0
|
||||
| | (UPC/EAN only). |
|
||||
structapp | Structured | Mark a symbol as part of a | count 0
|
||||
| Append | sequence of symbols. | (disabled)
|
||||
| structure | |
|
||||
warn_level | integer | Affects error/warning value | WARN_DEFAULT
|
||||
| | returned by Zint API. |
|
||||
text | unsigned | Human Readable Text, which | "" (empty)
|
||||
@ -1512,11 +1533,13 @@ ZINT_CAP_ECI | Does the symbology support Extended Channel
|
||||
| Interpretations?
|
||||
ZINT_CAP_GS1 | Does the symbology support GS1 data?
|
||||
ZINT_CAP_DOTTY | Can the symbology be outputted as dots?
|
||||
ZINT_CAP_QUIET_ZONES | Does the symbology have default quiet zones?
|
||||
ZINT_CAP_FIXED_RATIO | Does the symbology have a fixed width-to-height
|
||||
| (aspect) ratio?
|
||||
ZINT_CAP_READER_INIT | Does the symbology support Reader Initialisation?
|
||||
ZINT_CAP_FULL_MULTIBYTE | Is the ZINT_FULL_MULTIBYTE option applicable?
|
||||
ZINT_CAP_MASK | Is mask selection applicable?
|
||||
ZINT_CAP_STRUCTAPP | Does the symbology support Structured Append?
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
For example:
|
||||
@ -2050,6 +2073,13 @@ mechanism. A separate symbology ID can be used to encode Health Industry
|
||||
Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check
|
||||
digit to the encoded data.
|
||||
|
||||
PDF417 supports Structured Append of up to a 99,999 symbols and a numeric ID of
|
||||
up to 30 digits, which can be set by using the --structapp option (see section
|
||||
4.15) or the API structapp variable. The ID consists of up to 10 triplets, each
|
||||
ranging from "000" to "899". For instance "123456789" would be a valid ID of 3
|
||||
triplets. However "123456900" would not, as the last triplet "900" exceeds
|
||||
"899". The triplets are 0-filled, for instance "1234" becomes "123004".
|
||||
|
||||
6.2.5 Compact PDF417
|
||||
--------------------
|
||||
Previously known as Truncated PDF417. Options are the same as for PDF417 above.
|
||||
@ -2065,7 +2095,8 @@ determined using the --cols switch or option_2 as with PDF417. This symbology
|
||||
uses Latin-1 character encoding by default but also supports the ECI encoding
|
||||
mechanism. A separate symbology ID can be used to encode Health Industry
|
||||
Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check
|
||||
digit to the encoded data.
|
||||
digit to the encoded data. MicroPDF417 supports Structured Append the same as
|
||||
PDF417, for which see details.
|
||||
|
||||
6.2.7 GS1 DataBar Stacked (ISO 24724)
|
||||
-------------------------------------
|
||||
@ -2380,8 +2411,16 @@ DMRE symbol sizes may be activated in automatic size mode using the option
|
||||
--dmre or by the API option_3 = DM_DMRE
|
||||
|
||||
GS1 data may be encoded using FNC1 (preferred) or GS as separator.
|
||||
Use the option --gssep to change to GS or use the API
|
||||
output_options |= GS1_GS_SEPARATOR
|
||||
Use the option --gssep to change to GS or use the API output_options |=
|
||||
GS1_GS_SEPARATOR
|
||||
|
||||
Data Matrix supports Structured Append of up to 16 symbols and a numeric ID
|
||||
(file identifications), which can be set by using the --structapp option (see
|
||||
section 4.15) or the API structapp variable. The ID consists of 2 numbers ID1
|
||||
and ID2, each of which can range from 1 to 254, and is specified as the single
|
||||
number ID1 * 1000 + ID2, so for instance ID1 "123" and ID2 "234" would be given
|
||||
as "123234". Note that both ID1 and ID2 must be non-zero, so e.g. "123000" or
|
||||
"000123" would be invalid IDs. If an ID is not given it defaults to "001001".
|
||||
|
||||
6.6.2 QR Code (ISO 18004)
|
||||
-------------------------
|
||||
@ -2467,6 +2506,13 @@ by using the --mask= switch with values 0-7, or by setting option_3 to
|
||||
(N + 1) << 8 where N is 0-7. To use with ZINT_FULL_MULTIBYTE set option_3 =
|
||||
ZINT_FULL_MULTIBYTE | (N + 1) << 8.
|
||||
|
||||
QR Code supports Structured Append of up to 16 symbols and a numeric ID
|
||||
(parity), which can be set by using the --structapp option (see section 4.15) or
|
||||
the API structapp variable. The parity ID ranges from 0 and 255, and for full
|
||||
compliance should be set to the value obtained by XOR-ing together each byte of
|
||||
the complete data forming the sequence. Currently this calculation must be done
|
||||
outside of Zint. If an ID is not given it defaults to 0.
|
||||
|
||||
6.6.3 Micro QR Code (ISO 18004)
|
||||
-------------------------------
|
||||
A miniature version of the QR Code symbol for short messages. ECC levels can be
|
||||
@ -2651,6 +2697,10 @@ Mode | Maximum Data Length | Maximum Data Length | Number of Error
|
||||
-----------------------------------------------------------------------------
|
||||
* - secondary only
|
||||
|
||||
MaxiCode supports Structured Append of up to 8 symbols, which can be set by
|
||||
using the --structapp option (see section 4.15) or the API structapp variable.
|
||||
It does not support specifying an ID.
|
||||
|
||||
MaxiCode uses a different scaling than other symbols for raster output, see
|
||||
4.9.2.
|
||||
|
||||
@ -2736,11 +2786,16 @@ A separate symbology ID can be used to encode Health Industry Barcode (HIBC)
|
||||
data which adds a leading '+' character and a modulo-49 check digit to the
|
||||
encoded data.
|
||||
|
||||
Aztec Code supports Structured Append of up to 26 symbols and an optional
|
||||
alphanumeric ID of up to 32 characters, which can be set by using the
|
||||
--structapp option (see section 4.15) or the API structapp variable. The ID
|
||||
cannot contain spaces. If an ID is not given, no ID is encoded.
|
||||
|
||||
6.6.8 Aztec Runes
|
||||
-----------------
|
||||
A truncated version of compact Aztec Code for encoding whole integers between 0
|
||||
and 255. Includes Reed-Solomon error correction. As defined in ISO/IEC 24778
|
||||
Annex A.
|
||||
Annex A. It does not support Structured Append.
|
||||
|
||||
6.6.9 Code One
|
||||
--------------
|
||||
@ -2770,6 +2825,11 @@ Input | Version | Size | Numeric | Alphanumeric
|
||||
Version S symbols can only encode numeric data. The width of version S and
|
||||
version T symbols is determined by the length of the input data.
|
||||
|
||||
Code One supports Structured Append of up to 128 symbols, which can be set by
|
||||
using the --structapp option (see section 4.15) or the API structapp variable.
|
||||
It does not support specifying an ID. Structured Append is not supported with
|
||||
GS1 data nor for Version S symbols.
|
||||
|
||||
6.6.10 Grid Matrix
|
||||
-----------------
|
||||
By default Grid Matrix supports encoding in Latin-1 and Chinese characters
|
||||
@ -2815,6 +2875,10 @@ Non-ASCII data density may be maximized by using the --fullmultibyte switch or
|
||||
by setting option_3 to ZINT_FULL_MULTIBYTE, but check that your barcode reader
|
||||
supports this before using.
|
||||
|
||||
Grid Matrix supports Structured Append of up to 16 symbols and a numeric ID
|
||||
(file signature), which can be set by using the --structapp option (see section
|
||||
4.15) or the API structapp variable. The ID ranges from 0 (default) and 255.
|
||||
|
||||
6.6.11 DotCode
|
||||
-------------
|
||||
DotCode uses a grid of dots in a rectangular formation to encode characters up
|
||||
@ -2833,6 +2897,10 @@ selected automatically by Zint but may be manually specified by using the
|
||||
--mask= switch with values 0-7, where 4-7 denote 0'-3', or by setting option_3
|
||||
to (N + 1) << 8 where N is 0-7.
|
||||
|
||||
DotCode supports Structured Append of up to 35 symbols, which can be set by
|
||||
using the --structapp option (see section 4.15) or the API structapp variable.
|
||||
It does not support specifying an ID.
|
||||
|
||||
6.6.12 Han Xin Code
|
||||
-------------------
|
||||
Also known as Chinese Sensible Code, Han Xin is a symbology which is still under
|
||||
@ -2982,6 +3050,11 @@ symbol->option_3 = ULTRA_COMPRESSION;
|
||||
WARNING: Ultracode data compression is experimental and should not be used
|
||||
in a production environment.
|
||||
|
||||
Ultracode supports Structured Append of up to 8 symbols and an optional numeric
|
||||
ID (File Number), which can be set by using the --structapp option (see section
|
||||
4.15) or the API structapp variable. The ID ranges from 1 and 80088. If an ID
|
||||
is not given, no ID is encoded.
|
||||
|
||||
6.7 Other Barcode-Like Markings
|
||||
-------------------------------
|
||||
6.7.1. Facing Identification Mark (FIM)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* It's assumed that int is at least 32 bits, the following will compile-time fail if not
|
||||
* https://stackoverflow.com/a/1980056/664741 */
|
||||
* https://stackoverflow.com/a/1980056 */
|
||||
typedef int static_assert_int_at_least_32bits[CHAR_BIT != 8 || sizeof(int) < 4 ? -1 : 1];
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
@ -166,6 +166,7 @@ static void usage(void) {
|
||||
" --separator=NUMBER Set height of row separator bars (stacked symbologies)\n"
|
||||
" --small Use small text\n"
|
||||
" --square Force Data Matrix symbols to be square\n"
|
||||
" --structapp=I,C[,ID] Set Structured Append info (I index, C count)\n"
|
||||
" -t, --types Display table of barcode types\n"
|
||||
" --vers=NUMBER Set symbol version (size, check digits, other options)\n"
|
||||
" --vwhitesp=NUMBER Set height of vertical whitespace in multiples of X-dim\n"
|
||||
@ -497,6 +498,61 @@ static int is_raster(const char *filetype, const int no_png) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Parse and validate Structured Append argument "index,count[,ID]" to "--structapp" */
|
||||
int validate_structapp(const char *optarg, struct zint_structapp *structapp) {
|
||||
char index[10] = {0}, count[10] = {0};
|
||||
const char *comma = strchr(optarg, ',');
|
||||
const char *comma2;
|
||||
if (!comma) {
|
||||
fprintf(stderr, "Error 155: Invalid Structured Append argument, expect \"index,count[,ID]\"\n");
|
||||
return 0;
|
||||
}
|
||||
if (comma == optarg || comma - optarg > 9) {
|
||||
fprintf(stderr, "Error 156: Structured Append index too %s\n", comma == optarg ? "short" : "long");
|
||||
return 0;
|
||||
}
|
||||
strncpy(index, optarg, comma - optarg);
|
||||
comma++;
|
||||
comma2 = strchr(comma, ',');
|
||||
if (comma2) {
|
||||
if (comma2 == comma || comma2 - comma > 9) {
|
||||
fprintf(stderr, "Error 157: Structured Append count too %s\n", comma2 == comma ? "short" : "long");
|
||||
return 0;
|
||||
}
|
||||
strncpy(count, comma, comma2 - comma);
|
||||
comma2++;
|
||||
if (!*comma2 || strlen(comma2) > 32) {
|
||||
fprintf(stderr, "Error 158: Structured Append ID too %s\n", !*comma2 ? "short" : "long");
|
||||
return 0;
|
||||
}
|
||||
strncpy(structapp->id, comma2, 32);
|
||||
} else {
|
||||
if (!*comma || strlen(comma) > 9) {
|
||||
fprintf(stderr, "Error 159: Structured Append count too %s\n", !*comma ? "short" : "long");
|
||||
return 0;
|
||||
}
|
||||
strcpy(count, comma);
|
||||
}
|
||||
if (!validate_int(index, &structapp->index)) {
|
||||
fprintf(stderr, "Error 160: Invalid Structured Append index (digits only)\n");
|
||||
return 0;
|
||||
}
|
||||
if (!validate_int(count, &structapp->count)) {
|
||||
fprintf(stderr, "Error 161: Invalid Structured Append count (digits only)\n");
|
||||
return 0;
|
||||
}
|
||||
if (structapp->count < 2) {
|
||||
fprintf(stderr, "Error 162: Invalid Structured Append count, must be >= 2\n");
|
||||
return 0;
|
||||
}
|
||||
if (structapp->index < 1 || structapp->index > structapp->count) {
|
||||
fprintf(stderr, "Error 163: Structured Append index out of range (1-%d)\n", structapp->count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Batch mode - output symbol for each line of text in `filename` */
|
||||
static int batch_process(struct zint_symbol *symbol, const char *filename, const int mirror_mode,
|
||||
const char *filetype, const int rotate_angle) {
|
||||
@ -807,8 +863,8 @@ int main(int argc, char **argv) {
|
||||
OPT_HEIGHT, OPT_INIT, OPT_MIRROR, OPT_MASK, OPT_MODE,
|
||||
OPT_NOBACKGROUND, OPT_NOQUIETZONES, OPT_NOTEXT, OPT_PRIMARY, OPT_QUIETZONES,
|
||||
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_SECURE, OPT_SEPARATOR, OPT_SMALL, OPT_SQUARE, OPT_STRUCTAPP,
|
||||
OPT_VERBOSE, OPT_VERS, OPT_VWHITESP, OPT_WERROR,
|
||||
};
|
||||
int option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
@ -863,6 +919,7 @@ int main(int argc, char **argv) {
|
||||
{"separator", 1, NULL, OPT_SEPARATOR},
|
||||
{"small", 0, NULL, OPT_SMALL},
|
||||
{"square", 0, NULL, OPT_SQUARE},
|
||||
{"structapp", 1, NULL, OPT_STRUCTAPP},
|
||||
{"types", 0, NULL, 't'},
|
||||
{"verbose", 0, NULL, OPT_VERBOSE}, // Currently undocumented, output some debug info
|
||||
{"vers", 1, NULL, OPT_VERS},
|
||||
@ -1026,7 +1083,8 @@ int main(int argc, char **argv) {
|
||||
if (float_opt >= 0.0f && float_opt <= 50.0f) {
|
||||
my_symbol->guard_descent = float_opt;
|
||||
} else {
|
||||
fprintf(stderr, "Warning 155: Guard bar descent '%g' out of range (0 to 50), ignoring\n", float_opt);
|
||||
fprintf(stderr, "Warning 155: Guard bar descent '%g' out of range (0 to 50), ignoring\n",
|
||||
float_opt);
|
||||
fflush(stderr);
|
||||
}
|
||||
break;
|
||||
@ -1035,7 +1093,8 @@ int main(int argc, char **argv) {
|
||||
if (float_opt >= 0.5f && float_opt <= 1000.0f) {
|
||||
my_symbol->height = float_opt;
|
||||
} else {
|
||||
fprintf(stderr, "Warning 110: Symbol height '%g' out of range (0.5 to 1000), ignoring\n", float_opt);
|
||||
fprintf(stderr, "Warning 110: Symbol height '%g' out of range (0.5 to 1000), ignoring\n",
|
||||
float_opt);
|
||||
fflush(stderr);
|
||||
}
|
||||
break;
|
||||
@ -1179,6 +1238,12 @@ int main(int argc, char **argv) {
|
||||
case OPT_SQUARE:
|
||||
my_symbol->option_3 = DM_SQUARE;
|
||||
break;
|
||||
case OPT_STRUCTAPP:
|
||||
memset(&my_symbol->structapp, 0, sizeof(my_symbol->structapp));
|
||||
if (!validate_structapp(optarg, &my_symbol->structapp)) {
|
||||
return do_exit(1);
|
||||
}
|
||||
break;
|
||||
case OPT_VERBOSE:
|
||||
my_symbol->debug = 1;
|
||||
break;
|
||||
|
@ -922,6 +922,22 @@ static void test_other_opts(int index, int debug) {
|
||||
/* 21*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, "", NULL, "Warning 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
/* 22*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --gs1nocheck", NULL, "" },
|
||||
/* 23*/ { BARCODE_GS1_128, "[00]376104250021234568", -1, " --werror", NULL, "Error 261: AI (00) position 18: Bad checksum '8', expected '9'" },
|
||||
/* 24*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "1", "Error 155: Invalid Structured Append argument, expect \"index,count[,ID]\"" },
|
||||
/* 25*/ { BARCODE_AZTEC, "1", -1, " --structapp=", ",", "Error 156: Structured Append index too short" },
|
||||
/* 26*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "1234567890,", "Error 156: Structured Append index too long" },
|
||||
/* 27*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,", "Error 159: Structured Append count too short" },
|
||||
/* 28*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,1234567890", "Error 159: Structured Append count too long" },
|
||||
/* 29*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,", "Error 158: Structured Append ID too short" },
|
||||
/* 30*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,1234567890,", "Error 157: Structured Append count too long" },
|
||||
/* 31*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,123456789012345678901234567890123", "Error 158: Structured Append ID too long" },
|
||||
/* 32*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "123456789,123456789,12345678901234567890123456789012", "Error 701: Structured Append count out of range (2-26)" },
|
||||
/* 33*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,26,12345678901234567890123456789012", "" },
|
||||
/* 34*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "A,26,12345678901234567890123456789012", "Error 160: Invalid Structured Append index (digits only)" },
|
||||
/* 35*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,A,12345678901234567890123456789012", "Error 161: Invalid Structured Append count (digits only)" },
|
||||
/* 36*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "26,1,12345678901234567890123456789012", "Error 162: Invalid Structured Append count, must be >= 2" },
|
||||
/* 37*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "0,2,12345678901234567890123456789012", "Error 163: Structured Append index out of range (1-2)" },
|
||||
/* 38*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "3,2,12345678901234567890123456789012", "Error 163: Structured Append index out of range (1-2)" },
|
||||
/* 39*/ { BARCODE_AZTEC, "1", -1, " --structapp=", "2,3,12345678901234567890123456789012", "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i;
|
||||
|
@ -83,7 +83,8 @@ void DataWindow::from_file()
|
||||
QString escape_string;
|
||||
|
||||
open_dialog.setWindowTitle("Open File");
|
||||
open_dialog.setDirectory(settings.value("studio/default_dir", QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
open_dialog.setDirectory(settings.value("studio/default_dir",
|
||||
QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
|
||||
if (open_dialog.exec()) {
|
||||
filename = open_dialog.selectedFiles().at(0);
|
||||
|
@ -34,7 +34,8 @@ ExportWindow::ExportWindow()
|
||||
#endif
|
||||
setupUi(this);
|
||||
|
||||
linDestPath->setText(settings.value("studio/export/destination", QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
linDestPath->setText(settings.value("studio/export/destination",
|
||||
QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
linPrefix->setText(settings.value("studio/export/file_prefix", "bcs_").toString());
|
||||
cmbFileName->setCurrentIndex(settings.value("studio/export/name_format", 0).toInt());
|
||||
cmbFileFormat->setCurrentIndex(settings.value("studio/export/filetype", 0).toInt());
|
||||
|
@ -27,6 +27,10 @@
|
||||
<property name="text">
|
||||
<string>Auto&matic Resizing</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Size, type and error correction level will
|
||||
be set based on data</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -40,6 +44,9 @@
|
||||
<property name="text">
|
||||
<string>Adjust Si&ze To:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set size (layers) and whether compact or not</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroupAztecSizeECC</string>
|
||||
</attribute>
|
||||
@ -50,6 +57,9 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set size (layers) and whether compact or not</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15 x 15 Compact</string>
|
||||
@ -237,6 +247,10 @@
|
||||
<property name="text">
|
||||
<string>Add Minimum E&rror Correction:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set minimum percentage of capacity to use
|
||||
for error correction codewords</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroupAztecSizeECC</string>
|
||||
</attribute>
|
||||
@ -247,6 +261,10 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set minimum percentage of capacity to use
|
||||
for error correction codewords</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10% + 3 words</string>
|
||||
@ -276,6 +294,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutAztecEncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -283,7 +304,10 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="radAztecStand">
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
<string>S&tandard</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@ -293,15 +317,409 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QRadioButton" name="radAztecGS1">
|
||||
<property name="text">
|
||||
<string>GS&1 Data Mode</string>
|
||||
<string>GS&1 Data</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="radAztecHIBC">
|
||||
<property name="text">
|
||||
<string>H&IBC Aztec Code</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as a Health Industry Barcode (HIBC)
|
||||
Labeler Identification Code (LIC)
|
||||
For Provider Applications Standard (PAS), preface
|
||||
the data with a slash "/"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxAztecStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Aztec Code supports Structured Append of up to
|
||||
26 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutAztecStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblAztecStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbAztecStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 26</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbAztecStructAppCount">
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 26</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>17</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>18</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>19</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>20</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>21</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>22</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>23</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>24</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>25</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>26</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerAztecStructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblAztecStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbAztecStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="cmbAztecStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>17</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>18</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>19</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>20</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>21</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>22</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>23</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>24</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>25</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>26</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblAztecStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID to indicate that symbols belong to
|
||||
the same Structured Append sequence
|
||||
Maximum length 32 and cannot contain spaces
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I&D:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>txtAztecStructAppID</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="4">
|
||||
<widget class="QLineEdit" name="txtAztecStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>32</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID to indicate that symbols belong to
|
||||
the same Structured Append sequence
|
||||
Maximum length 32 and cannot contain spaces
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -318,7 +736,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>43</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -25,6 +25,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutC128EncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -34,6 +37,9 @@
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -44,6 +50,10 @@
|
||||
<property name="text">
|
||||
<string>Subset &C Suppression</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Do not begin in Subset C mode,
|
||||
even if initial data is numeric</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -51,6 +61,10 @@
|
||||
<property name="text">
|
||||
<string>GS&1-128</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
@ -58,6 +72,12 @@
|
||||
<property name="text">
|
||||
<string>H&IBC 128</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as a Health Industry Barcode (HIBC)
|
||||
Labeler Identification Code (LIC)
|
||||
For Provider Applications Standard (PAS), preface
|
||||
the data with a slash "/"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -69,6 +69,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutC16kEncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
|
@ -69,6 +69,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutC49EncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
|
@ -640,6 +640,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -665,8 +668,8 @@
|
||||
<property name="toolTip">
|
||||
<string>Process data as a Health Industry Barcode (HIBC)
|
||||
Labeler Identification Code (LIC)
|
||||
For Provider Applications Standard (PAS),
|
||||
preface the data with a slash "/"</string>
|
||||
For Provider Applications Standard (PAS), preface
|
||||
the data with a slash "/"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>Symbol Si&ze:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set size (version) of symbol</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@ -37,6 +40,9 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbC1Size">
|
||||
<property name="toolTip">
|
||||
<string>Set size (version) of symbol</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -101,6 +107,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutC1EncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -110,6 +119,9 @@
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -121,9 +133,168 @@
|
||||
<string>GS&1 Data Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>GS1 system (Application Identifiers)
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxC1StructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Code One supports Structured Append of up to
|
||||
128 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutC1StructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblC1StructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnC1StructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 1 (Disabled) to 128</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spnC1StructAppCount">
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 1 (Disabled) to 128</string>
|
||||
</property>
|
||||
<property name="specialValueText">
|
||||
<string>1 (Disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>128</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerC1StructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblC1StructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnC1StructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QSpinBox" name="spnC1StructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>128</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="spacerC1StructApp5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblC1StructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Structured Append ID not available for Code One</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ID:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>txtC1StructAppIDDisabled</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLineEdit" name="txtC1StructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Structured Append ID not available for Code One</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>N/A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>Si&ze:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set height and width (H x W) of symbol</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbDM200Size</cstring>
|
||||
</property>
|
||||
@ -34,6 +37,9 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbDM200Size">
|
||||
<property name="toolTip">
|
||||
<string>Set height and width (H x W) of symbol</string>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>21</number>
|
||||
</property>
|
||||
@ -291,6 +297,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutDM200EncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -298,7 +307,10 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="radDM200Stand">
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
<string>S&tandard</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@ -308,15 +320,25 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QRadioButton" name="radDM200GS1">
|
||||
<property name="text">
|
||||
<string>GS&1 Data Mode</string>
|
||||
<string>GS&1 Data</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="radDM200HIBC">
|
||||
<property name="text">
|
||||
<string>H&IBC Data Matrix</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as a Health Industry Barcode (HIBC)
|
||||
Labeler Identification Code (LIC)
|
||||
For Provider Applications Standard (PAS), preface
|
||||
the data with a slash "/"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -327,6 +349,10 @@
|
||||
<property name="text">
|
||||
<string>Suppress &Rectangular Symbols in Automatic Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Only consider square versions on automatic symbol
|
||||
size selection</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -337,6 +363,10 @@
|
||||
<property name="text">
|
||||
<string>Allo&w DMRE in Automatic Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Consider DMRE versions on automatic symbol
|
||||
size selection</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -347,11 +377,352 @@
|
||||
<property name="text">
|
||||
<string>&Use separator GS for GS1</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Use Group Separator (ASCII 0x1D) to separate GS1 AIs
|
||||
instead of the preferred FNC1</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxDMStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Data Matrix supports Structured Append of up to
|
||||
16 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutDMStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblDMStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbDMStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 16</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbDMStructAppCount">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 16</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerDMStructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblDMStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbDMStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="cmbDMStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="spacerDMStructApp5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblDMStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>File IDs to indicate that symbols belong to
|
||||
the same Structured Append sequence
|
||||
Value of each ID ranges from 1 to 254
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I&D:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnDMStructAppID</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QSpinBox" name="spnDMStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>File ID1 to indicate that symbols belong to
|
||||
the same Structured Append sequence
|
||||
Value ranges from 1 to 254
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>254</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<widget class="QSpinBox" name="spnDMStructAppID2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>File ID2 to indicate that symbols belong to
|
||||
the same Structured Append sequence
|
||||
Value ranges from 1 to 254
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>254</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@ -360,7 +731,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>&Number of Data Columns:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set the width of the symbol</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@ -37,6 +40,9 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbDotCols">
|
||||
<property name="toolTip">
|
||||
<string>Set the width of the symbol</string>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>21</number>
|
||||
</property>
|
||||
@ -1032,6 +1038,11 @@
|
||||
<property name="text">
|
||||
<string>&Mask:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Manually specify which mask to use
|
||||
The prime masks 0' to 3' are the same
|
||||
as 0 to 3 with the corners lit</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbDotMask</cstring>
|
||||
</property>
|
||||
@ -1042,6 +1053,11 @@
|
||||
<property name="maxVisibleItems">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Manually specify which mask to use
|
||||
The prime masks 0' to 3' are the same
|
||||
as 0 to 3 with the corners lit</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -1096,6 +1112,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutDotEncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -1105,6 +1124,9 @@
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -1115,6 +1137,509 @@
|
||||
<property name="text">
|
||||
<string>GS&1 Data Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxDotStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>DotCode supports Structured Append of up to
|
||||
35 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutDotStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblDotStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbDotStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 35</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbDotStructAppCount">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 35</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>17</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>18</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>19</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>20</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>21</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>22</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>23</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>24</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>25</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>26</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>27</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>28</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>29</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>30</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>31</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>32</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>33</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>34</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>35</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerDotStructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblDotStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbDotStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="cmbDotStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>17</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>18</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>19</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>20</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>21</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>22</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>23</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>24</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>25</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>26</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>27</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>28</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>29</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>30</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>31</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>32</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>33</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>34</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>35</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="spacerDotStructApp5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblDotStructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Structured Append ID not available for DotCode</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ID:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>txtDotStructAppIDDisabled</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLineEdit" name="txtDotStructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Structured Append ID not available for DotCode</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>N/A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>Si&ze:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set size (version) of symbol</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbGridSize</cstring>
|
||||
</property>
|
||||
@ -34,6 +37,9 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbGridSize">
|
||||
<property name="toolTip">
|
||||
<string>Set size (version) of symbol</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -111,6 +117,10 @@
|
||||
<property name="text">
|
||||
<string>E&rror Correction:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbGridECC</cstring>
|
||||
</property>
|
||||
@ -118,6 +128,10 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cmbGridECC">
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -187,6 +201,321 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxGridStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Grid Matrix supports Structured Append of up to
|
||||
16 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutGridStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblGridStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbGridStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 16</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbGridStructAppCount">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 16</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerGridStructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblGridStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbGridStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="cmbGridStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="spacerGridStructApp5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblGridStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>ID (file signature) to indicate that symbols belong
|
||||
to the same Structured Append sequence
|
||||
Value ranges from 0 to 255
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I&D:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnGridStructAppID</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QSpinBox" name="spnGridStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>ID (file signature) to indicate that symbols belong
|
||||
to the same Structured Append sequence
|
||||
Value ranges from 0 to 255
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -118,7 +118,7 @@ be padded with spaces
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="0" column="1" colspan="4">
|
||||
<widget class="QLineEdit" name="txtMaxiSCMPostcode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -147,7 +147,7 @@ be padded with spaces
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>ISO 3166 numeric country code
|
||||
<string>ISO 3166-1 numeric country code
|
||||
Value ranges from 000 to 999
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
@ -168,7 +168,7 @@ Value ranges from 000 to 999
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>ISO 3166 numeric country code
|
||||
<string>ISO 3166-1 numeric country code
|
||||
Value ranges from 000 to 999
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
@ -189,7 +189,20 @@ Value ranges from 000 to 999
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="2">
|
||||
<spacer name="spacerMaxiSCM12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="lblMaxiSCMService">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -210,7 +223,7 @@ Value ranges from 000 to 999
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="1" column="4">
|
||||
<widget class="QSpinBox" name="spnMaxiSCMService">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -237,14 +250,15 @@ Value ranges from 000 to 999
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="chkMaxiSCMVV">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Prefix Structured Carrier Message with "[)>\R01\Gvv"
|
||||
(ANS MH10.8.2 Format 01) where "vv" is version given below
|
||||
(ANS MH10.8.2 Format 01) where "vv" is version
|
||||
specified as follows
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -252,7 +266,20 @@ Value ranges from 000 to 999
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="2" column="2">
|
||||
<spacer name="spacerMaxiSCM22">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="lblMaxiSCMVV">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -272,7 +299,7 @@ Value ranges from 000 to 999
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="2" column="4">
|
||||
<widget class="QSpinBox" name="spnMaxiSCMVV">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -301,6 +328,235 @@ Value ranges from 000 to 999
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxMaxiStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>MaxiCode supports Structured Append of up to
|
||||
8 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutMaxiStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblMaxiStructAppCount">
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 8</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbMaxiStructAppCount</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbMaxiStructAppCount">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 8</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerMaxiStructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblMaxiStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbMaxiStructAppIndex</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="cmbMaxiStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="spacerMaxiStructApp5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblMaxiStructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Structured Append ID not available for MaxiCode</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ID:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>txtMaxiStructAppIDDisabled</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLineEdit" name="txtMaxiStructAppIDDisabled">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Structured Append ID not available for MaxiCode</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>N/A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -27,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>&Number of Data Columns:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set number of data characters in a row</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@ -37,6 +40,9 @@
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="cmbMPDFCols">
|
||||
<property name="toolTip">
|
||||
<string>Set number of data characters in a row</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -71,6 +77,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutMPDFEncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -80,6 +89,9 @@
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -90,6 +102,151 @@
|
||||
<property name="text">
|
||||
<string>H&IBC MicroPDF417</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as a Health Industry Barcode (HIBC)
|
||||
Labeler Identification Code (LIC)
|
||||
For Provider Applications Standard (PAS), preface
|
||||
the data with a slash "/"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxMPDFStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>MicroPDF417 supports Structured Append of up to
|
||||
99,999 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutMPDFStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblMPDFStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnMPDFStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 1 (Disabled) to 99999</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spnMPDFStructAppCount">
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 1 (Disabled) to 99999</string>
|
||||
</property>
|
||||
<property name="specialValueText">
|
||||
<string>1 (Disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacerPDFStructApp">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblMPDFStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnMPDFStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QSpinBox" name="spnMPDFStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblMPDFStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID to indicate that symbols belong to the same
|
||||
Structured Append sequence
|
||||
Numbers only, in triplets, maximum length 30 (10 triplets)
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I&D:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>txtMPDFStructAppID</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="4">
|
||||
<widget class="QLineEdit" name="txtMPDFStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID to indicate that symbols belong to the same
|
||||
Structured Append sequence
|
||||
Numbers only, in triplets, maximum length 30 (10 triplets)
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -26,6 +26,9 @@
|
||||
<property name="text" >
|
||||
<string>&Number of Data Columns:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set number of data characters in a row</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@ -36,6 +39,9 @@
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="cmbPDFCols" >
|
||||
<property name="toolTip">
|
||||
<string>Set number of data characters in a row</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Automatic</string>
|
||||
@ -141,6 +147,56 @@
|
||||
<string>20</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>21</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>22</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>23</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>24</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>25</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>26</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>27</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>28</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>29</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>30</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
@ -148,6 +204,9 @@
|
||||
<property name="text" >
|
||||
<string>E&rror Correction Capacity:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set number of error correction characters</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
@ -158,6 +217,9 @@
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QComboBox" name="cmbPDFECC" >
|
||||
<property name="toolTip">
|
||||
<string>Set number of error correction characters</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Automatic</string>
|
||||
@ -217,6 +279,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutPDFEncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -226,6 +291,9 @@
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -236,6 +304,12 @@
|
||||
<property name="text">
|
||||
<string>H&IBC PDF417</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as a Health Industry Barcode (HIBC)
|
||||
Labeler Identification Code (LIC)
|
||||
For Provider Applications Standard (PAS), preface
|
||||
the data with a slash "/"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -243,6 +317,151 @@
|
||||
<property name="text">
|
||||
<string>&Compact PDF417</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Compact PDF417 (Truncated PDF417) mode omits the
|
||||
right row indicators and shortens the stop pattern</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxPDFStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>PDF417 supports Structured Append of up to
|
||||
99,999 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutPDFStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblPDFStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnPDFStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 1 (Disabled) to 99999</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spnPDFStructAppCount">
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 1 (Disabled) to 99999</string>
|
||||
</property>
|
||||
<property name="specialValueText">
|
||||
<string>1 (Disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacerPDFStructApp">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblPDFStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnPDFStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QSpinBox" name="spnPDFStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblPDFStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID to indicate that symbols belong to the same
|
||||
Structured Append sequence
|
||||
Numbers only, in triplets ranging from 000 to 899
|
||||
Maximum length 30 (10 triplets)
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I&D:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>txtPDFStructAppID</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="4">
|
||||
<widget class="QLineEdit" name="txtPDFStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID to indicate that symbols belong to the same
|
||||
Structured Append sequence
|
||||
Numbers only, in triplets ranging from 000 to 899
|
||||
Maximum length 30 (10 triplets)
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>Si&ze:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set size (version) of symbol</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbQRSize</cstring>
|
||||
</property>
|
||||
@ -37,6 +40,9 @@
|
||||
<property name="maxVisibleItems">
|
||||
<number>21</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set size (version) of symbol</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -249,6 +255,10 @@
|
||||
<property name="text">
|
||||
<string>E&rror Correction:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbQRECC</cstring>
|
||||
</property>
|
||||
@ -256,6 +266,10 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cmbQRECC">
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -288,6 +302,9 @@
|
||||
<property name="text">
|
||||
<string>&Mask:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Manually specify which mask to use</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbQRMask</cstring>
|
||||
</property>
|
||||
@ -298,6 +315,9 @@
|
||||
<property name="maxVisibleItems">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Manually specify which mask to use</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -352,6 +372,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutQREncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -359,7 +382,10 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="radQRStand">
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
<string>S&tandard</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@ -369,15 +395,25 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QRadioButton" name="radQRGS1">
|
||||
<property name="text">
|
||||
<string>GS&1 Data Mode</string>
|
||||
<string>GS&1 Data</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="radQRHIBC">
|
||||
<property name="text">
|
||||
<string>H&IBC QR Code</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as a Health Industry Barcode (HIBC)
|
||||
Labeler Identification Code (LIC)
|
||||
For Provider Applications Standard (PAS), preface
|
||||
the data with a slash "/"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -396,6 +432,321 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxQRStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>QR Code supports Structured Append of up to
|
||||
16 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutQRStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblQRStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbQRStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 16</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbQRStructAppCount">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 16</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerQRStructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblQRStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbQRStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="cmbQRStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>10</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>11</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>12</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>13</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>14</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>15</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="spacerQRStructApp5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblQRStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>ID (parity) to indicate that symbols belong
|
||||
to the same Structured Append sequence
|
||||
Value ranges from 0 to 255
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I&D:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnQRStructAppID</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QSpinBox" name="spnQRStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>ID (parity) to indicate that symbols belong
|
||||
to the same Structured Append sequence
|
||||
Value ranges from 0 to 255
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@ -407,7 +758,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -27,6 +27,9 @@
|
||||
<property name="text">
|
||||
<string>Si&ze:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set height and width (H x W) of symbol</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbRMQRSize</cstring>
|
||||
</property>
|
||||
@ -34,6 +37,9 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbRMQRSize">
|
||||
<property name="toolTip">
|
||||
<string>Set height and width (H x W) of symbol</string>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>21</number>
|
||||
</property>
|
||||
@ -239,6 +245,10 @@
|
||||
<property name="text">
|
||||
<string>E&rror Correction:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbRMQRECC</cstring>
|
||||
</property>
|
||||
@ -246,6 +256,10 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cmbRMQRECC">
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic</string>
|
||||
@ -270,6 +284,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutRMQREncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -279,6 +296,9 @@
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -289,6 +309,10 @@
|
||||
<property name="text">
|
||||
<string>GS&1 Data Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -78,7 +78,7 @@ Default 5
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G&uard Height:</string>
|
||||
<string>Guard Bar Des&cent:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
|
@ -88,7 +88,7 @@ Default 5
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G&uard Bar Descent:</string>
|
||||
<string>Guard Bar Des&cent:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
|
@ -27,6 +27,10 @@
|
||||
<property name="text">
|
||||
<string>Auto&matic Resizing</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Size and error correction level will be set
|
||||
based on data</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -37,6 +41,10 @@
|
||||
<property name="text">
|
||||
<string>E&rror Correction Level:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
@ -47,6 +55,10 @@
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set percentage of capacity to use for
|
||||
error correction codewords</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ECO - Error Detection Only</string>
|
||||
@ -86,6 +98,9 @@
|
||||
<property name="title">
|
||||
<string>Encoding Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>How to process data</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutUltraEncodingMode">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
@ -95,6 +110,9 @@
|
||||
<property name="text">
|
||||
<string>S&tandard Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -105,6 +123,248 @@
|
||||
<property name="text">
|
||||
<string>GS&1 Data Mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Process data as GS1 General Specifications data,
|
||||
formatted with Application Identifiers (AIs)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxUltraStructApp">
|
||||
<property name="title">
|
||||
<string>Structured Append</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Ultracode supports Structured Append of up to
|
||||
8 symbols</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayoutUltraStructApp">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblUltraStructAppCount">
|
||||
<property name="text">
|
||||
<string>C&ount:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbUltraStructAppCount</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 16</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbUltraStructAppCount">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark symbol as part of a Structured Append sequence
|
||||
containing a total of this number of symbols
|
||||
Value ranges from 2 to 8</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="spacerUltraStructApp2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblUltraStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inde&x:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cmbUltraStructAppIndex</cstring>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="cmbUltraStructAppIndex">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Position of symbol in Structured Append sequence
|
||||
Value ranges from 1 to count
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>6</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="spacerUltraStructApp5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lblUltraStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID (File Number) to indicate that symbols
|
||||
belong to the same Structured Append sequence
|
||||
Value ranges from 1 to 80088
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I&D:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignLeading|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spnUltraStructAppID</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QSpinBox" name="spnUltraStructAppID">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Optional ID (File Number) to indicate that symbols
|
||||
belong to the same Structured Append sequence
|
||||
Value ranges from 1 to 80088
|
||||
(ignored if disabled)</string>
|
||||
</property>
|
||||
<property name="specialValueText">
|
||||
<string>None</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>80088</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -49,31 +49,45 @@ public slots:
|
||||
void autoheight_ui_set();
|
||||
void HRTShow_ui_set();
|
||||
void dotty_ui_set();
|
||||
void structapp_ui_set();
|
||||
void on_encoded();
|
||||
void filter_symbologies();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void combobox_item_enabled(QComboBox *comboBox, int index, bool enabled);
|
||||
void upcean_addon_gap(QComboBox *comboBox, QLabel *label, int base);
|
||||
void upcean_guard_descent(QDoubleSpinBox *spnBox, QLabel *label);
|
||||
void upcean_addon_gap(const char *comboBoxName, const char *labelName, int base);
|
||||
void upcean_guard_descent(const char *spnBoxName, const char *labelName);
|
||||
void set_gs1_mode(bool gs1_mode);
|
||||
void set_smaller_font(QLabel *note);
|
||||
|
||||
QObject *widget_obj(const char *name);
|
||||
|
||||
const char *get_setting_name(int symbology);
|
||||
|
||||
int get_button_group_index(const QStringList &children);
|
||||
void set_radiobutton_from_setting(QSettings &settings, const QString &setting, const QStringList &children, int default_val = 0);
|
||||
void set_radiobutton_from_setting(QSettings &settings, const QString &setting, const QStringList &children,
|
||||
int default_val = 0);
|
||||
|
||||
int get_combobox_index(const QString &child);
|
||||
void set_combobox_from_setting(QSettings &settings, const QString &setting, const QString &child, int default_val = 0);
|
||||
void set_combobox_from_setting(QSettings &settings, const QString &setting, const QString &child,
|
||||
int default_val = 0);
|
||||
|
||||
int get_checkbox_val(const QString &child);
|
||||
void set_checkbox_from_setting(QSettings &settings, const QString &setting, const QString &child, int default_val = 0);
|
||||
void set_checkbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
|
||||
int default_val = 0);
|
||||
|
||||
double get_doublespinbox_val(const QString &child);
|
||||
void set_doublespinbox_from_setting(QSettings &settings, const QString &setting, const QString &child, float default_val = 0.0f);
|
||||
void set_doublespinbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
|
||||
float default_val = 0.0f);
|
||||
|
||||
QString get_lineedit_val(const QString &child);
|
||||
void set_lineedit_from_setting(QSettings &settings, const QString &setting, const QString &child, const char *default_val = "");
|
||||
void set_lineedit_from_setting(QSettings &settings, const QString &setting, const QString &child,
|
||||
const char *default_val = "");
|
||||
|
||||
int get_spinbox_val(const QString &child);
|
||||
void set_spinbox_from_setting(QSettings &settings, const QString &setting, const QString &child, int default_val = 0);
|
||||
void set_spinbox_from_setting(QSettings &settings, const QString &setting, const QString &child,
|
||||
int default_val = 0);
|
||||
|
||||
void save_sub_settings(QSettings &settings, int symbology);
|
||||
void load_sub_settings(QSettings &settings, int symbology);
|
||||
|
@ -183,7 +183,8 @@ void SequenceWindow::import()
|
||||
QByteArray outstream;
|
||||
|
||||
import_dialog.setWindowTitle("Import File");
|
||||
import_dialog.setDirectory(settings.value("studio/default_dir", QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
import_dialog.setDirectory(settings.value("studio/default_dir",
|
||||
QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
|
||||
if (import_dialog.exec()) {
|
||||
filename = import_dialog.selectedFiles().at(0);
|
||||
|
Loading…
Reference in New Issue
Block a user