From b36fba8ba66351a44d8fd8614bf33052fc2599d3 Mon Sep 17 00:00:00 2001 From: gitlost Date: Sat, 18 Dec 2021 16:22:02 +0000 Subject: [PATCH] DATAMATRIX: new algorithm for (near-)minimal encoding, props Alex Geller Add FAST_MODE input_mode flag and --fast CLI/Tcl option that selects older faster ISO algorithm (may be used by other symbologies in the future) and "Fast Encoding" checkbox to Data Matrix GUI GUI: adds Zint version numbers to DATAMATRIX sizes. --- ChangeLog | 3 + backend/dmatrix.c | 1147 +++-- backend/dmatrix.h | 4 +- backend/pdf417.c | 1 - .../svg/datamatrix_hvwsp1_bind1_dotty.svg | 148 +- .../data/svg/datamatrix_vwsp1_bind1_dotty.svg | 148 +- backend/tests/test_dmatrix.c | 4203 +++++++++++++---- backend/tests/test_dmatrix_variant.h | 969 ---- backend/tests/test_library.c | 2 +- backend/tests/test_qr.c | 19 +- backend/tests/testcommon.c | 7 +- backend/tests/testcommon.h | 3 +- backend/tests/tools/run_zxingcpp_tests.sh | 2 +- backend/zint.h | 15 +- backend_qt/backend_qt.pro | 1 + backend_qt/backend_vc8.pro | 1 + backend_qt/qzint.cpp | 2 + backend_tcl/zint.c | 15 +- docs/manual.txt | 9 +- frontend/main.c | 7 +- frontend/tests/test_args.c | 45 +- frontend_qt/grpDM.ui | 110 +- frontend_qt/mainwindow.cpp | 7 + win32/libzint.vcxproj | 1 + win32/vs2008/libzint.vcproj | 4 + win32/vs2015/libzint.vcxproj | 1 + win32/vs2015/vsx/libzintMD.vcxproj | 1 + win32/vs2019/libzint.vcxproj | 1 + 28 files changed, 4578 insertions(+), 2298 deletions(-) delete mode 100644 backend/tests/test_dmatrix_variant.h diff --git a/ChangeLog b/ChangeLog index fe819123..332361e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,9 @@ Changes - GUI: add CLI equivalent dialog (#163) - Add ZBarcode_BarcodeName() - GUI: data dialog: convert Line Feeds if escaping on input, escape on output +- DATAMATRIX: new algorithm for (near-)optimal encoding, props Alex Geller +- CLI/GUI/Tcl: add --fast option to select faster but less optimal DATAMATRIX + algorithm (previous default) Bugs ---- diff --git a/backend/dmatrix.c b/backend/dmatrix.c index c4a85cdb..7209eec6 100644 --- a/backend/dmatrix.c +++ b/backend/dmatrix.c @@ -41,6 +41,7 @@ #include #include +#include #include #ifdef _MSC_VER #include @@ -232,8 +233,9 @@ static int dm_isedifact(const unsigned char input, const int gs1) { return (input >= ' ' && input <= '^') && (!gs1 || input != '['); /* Can't encode GS1 FNC1/GS in EDIFACT */ } -static int dm_p_r_6_2_1(const unsigned char source[], const int length, const int sp) { - /* Annex P section (r)(6)(ii)(I) +/* Does Annex J section (r)(6)(ii)(I) apply? */ +static int dm_substep_r_6_2_1(const unsigned char source[], const int length, const int sp) { + /* Annex J section (r)(6)(ii)(I) "If one of the three X12 terminator/separator characters first occurs in the yet to be processed data before a non-X12 character..." */ @@ -282,7 +284,7 @@ static int dm_text_sp_cnt(const unsigned char source[], const int position, cons #define DM_MULT_MINUS_1 11 #define DM_MULT_CEIL(n) ((((n) + DM_MULT_MINUS_1) / DM_MULT) * DM_MULT) -/* 'look ahead test' from Annex P */ +/* 'look ahead test' from Annex J */ static int dm_look_ahead_test(const unsigned char source[], const int length, const int position, const int current_mode, const int mode_arg, const int gs1, const int debug_print) { int ascii_count, c40_count, text_count, x12_count, edf_count, b256_count; @@ -322,8 +324,8 @@ static int dm_look_ahead_test(const unsigned char source[], const int length, co } for (sp = position; sp < length; sp++) { - unsigned char c = source[sp]; - int is_extended = c & 0x80; + const unsigned char c = source[sp]; + const int is_extended = c & 0x80; /* ascii ... step (l) */ if ((c <= '9') && (c >= '0')) { @@ -445,7 +447,7 @@ static int dm_look_ahead_test(const unsigned char source[], const int length, co return DM_C40; /* step (r)(6)(i) */ } if (c40_count == x12_count) { - if (dm_p_r_6_2_1(source, length, sp) == 1) { + if (dm_substep_r_6_2_1(source, length, sp) == 1) { if (debug_print) printf("X12->"); return DM_X12; /* step (r)(6)(ii)(I) */ } @@ -583,44 +585,41 @@ static int dm_edi_buffer_xfer(int process_buffer[8], int process_p, unsigned cha return process_p; } -/* Get symbol size, as specified or else smallest containing `minimum` codewords */ -STATIC_UNLESS_ZINT_TEST int dm_get_symbolsize(struct zint_symbol *symbol, const int minimum) { +/* Get index of symbol size in codewords array `dm_matrixbytes`, as specified or + else smallest containing `minimum` codewords */ +static int dm_get_symbolsize(struct zint_symbol *symbol, const int minimum) { int i; if ((symbol->option_2 >= 1) && (symbol->option_2 <= DMSIZESCOUNT)) { return dm_intsymbol[symbol->option_2 - 1]; } - for (i = DMSIZESCOUNT - 2; i >= 0; i--) { - if (minimum > dm_matrixbytes[i]) { - if (symbol->option_3 == DM_DMRE) { - return i + 1; - } - if (symbol->option_3 == DM_SQUARE) { - /* Skip rectangular symbols in square only mode */ - while (i + 1 < DMSIZESCOUNT && dm_matrixH[i + 1] != dm_matrixW[i + 1]) { - i++; - } - return i + 1 < DMSIZESCOUNT ? i + 1 : 0; - } - /* Skip DMRE symbols in no dmre mode */ - while (i + 1 < DMSIZESCOUNT && dm_isDMRE[i + 1]) { - i++; - } - return i + 1 < DMSIZESCOUNT ? i + 1 : 0; - } + if (minimum > 1304) { + return minimum <= 1558 ? DMSIZESCOUNT - 1 : 0; } - return 0; + for (i = minimum >= 62 ? 23 : 0; minimum > dm_matrixbytes[i]; i++); + + if ((symbol->option_3 & 0x7F) == DM_DMRE) { + return i; + } + if ((symbol->option_3 & 0x7F) == DM_SQUARE) { + /* Skip rectangular symbols in square only mode */ + for (; dm_matrixH[i] != dm_matrixW[i]; i++); + return i; + } + /* Skip DMRE symbols in no dmre mode */ + for (; dm_isDMRE[i]; i++); + return i; } /* Number of codewords remaining in a particular version (may be negative) */ -STATIC_UNLESS_ZINT_TEST int dm_codewords_remaining(struct zint_symbol *symbol, const int tp, const int process_p) { +static int dm_codewords_remaining(struct zint_symbol *symbol, const int tp, const int process_p) { int symbolsize = dm_get_symbolsize(symbol, tp + process_p); /* Allow for the remaining data characters */ return dm_matrixbytes[symbolsize] - tp; } /* Number of C40/TEXT elements needed to encode `input` */ -STATIC_UNLESS_ZINT_TEST int dm_c40text_cnt(const int current_mode, const int gs1, unsigned char input) { +static int dm_c40text_cnt(const int current_mode, const int gs1, unsigned char input) { int cnt; if (gs1 && input == '[') { @@ -639,7 +638,7 @@ STATIC_UNLESS_ZINT_TEST int dm_c40text_cnt(const int current_mode, const int gs1 } /* Update Base 256 field length */ -STATIC_UNLESS_ZINT_TEST int dm_update_b256_field_length(unsigned char target[], int tp, int b256_start) { +static int dm_update_b256_field_length(unsigned char target[], int tp, int b256_start) { int b256_count = tp - (b256_start + 1); if (b256_count <= 249) { target[b256_start] = b256_count; @@ -655,7 +654,7 @@ STATIC_UNLESS_ZINT_TEST int dm_update_b256_field_length(unsigned char target[], } /* Switch from ASCII or Base 256 to another mode */ -STATIC_UNLESS_ZINT_TEST int dm_switch_mode(const int next_mode, unsigned char target[], int tp, int *b256_start, +static int dm_switch_mode(const int next_mode, unsigned char target[], int tp, int *p_b256_start, const int debug_print) { switch (next_mode) { case DM_ASCII: @@ -674,7 +673,7 @@ STATIC_UNLESS_ZINT_TEST int dm_switch_mode(const int next_mode, unsigned char ta if (debug_print) printf("EDI "); break; case DM_BASE256: target[tp++] = 231; - *b256_start = tp; + *p_b256_start = tp; target[tp++] = 0; /* Byte count holder (may be expanded to 2 codewords) */ if (debug_print) printf("BAS "); break; @@ -683,24 +682,826 @@ STATIC_UNLESS_ZINT_TEST int dm_switch_mode(const int next_mode, unsigned char ta return tp; } +/* Minimal encoding using Dijkstra-based algorithm by Alex Geller + Note due to the complicated end-of-data (EOD) conditions that Data Matrix has, this may not be fully minimal; + however no counter-examples are known at present */ + +#define DM_NUM_MODES 6 + +static char *dm_smodes[] = { "?", "ASCII", "C40", "TEXT", "X12", "EDF", "B256" }; + +/* The size of this structure could be significantly reduced using techniques pointed out by Alex Geller, + but not done currently to avoid the processing overhead */ +struct dm_edge { + unsigned char mode; + unsigned char endMode; /* Mode returned by `dm_getEndMode()` */ + unsigned short from; /* Position in input data, 0-based */ + unsigned short len; + unsigned short size; /* Cumulative number of codewords */ + unsigned short bytes; /* DM_BASE256 byte count, kept to avoid runtime calc */ + unsigned short previous; /* Index into edges array */ +}; + +/* Note 1st row of edges not used so valid previous cannot point there, i.e. won't be zero */ +#define DM_PREVIOUS(edges, edge) \ + ((edge)->previous ? (edges) + (edge)->previous : NULL) + +/* Determine if next 1 to 4 chars are at EOD and can be encoded as 1 or 2 ASCII codewords */ +static int dm_last_ascii(const unsigned char source[], const int length, const int from) { + if (length - from > 4 || from >= length) { + return 0; + } + if (length - from == 1) { + if (source[from] & 0x80) { + return 0; + } + return 1; + } + if (length - from == 2) { + if ((source[from] & 0x80) || (source[from + 1] & 0x80)) { + return 0; + } + if (source[from] <= '9' && source[from] >= '0' && source[from + 1] <= '9' && source[from + 1] >= '0') { + return 1; + } + return 2; + } + if (length - from == 3) { + if (source[from] <= '9' && source[from] >= '0' + && source[from + 1] <= '9' && source[from + 1] >= '0' && !(source[from + 2] & 0x80)) { + return 2; + } + if (source[from + 1] <= '9' && source[from + 1] >= '0' + && source[from + 2] <= '9' && source[from + 2] >= '0' && !(source[from] & 0x80)) { + return 2; + } + return 0; + } + if (source[from] <= '9' && source[from] >= '0' + && source[from + 1] <= '9' && source[from + 1] >= '0' + && source[from + 2] <= '9' && source[from + 2] >= '0' + && source[from + 3] <= '9' && source[from + 3] >= '0') { + return 2; + } + return 0; +} + +/* Treat EDIFACT edges specially, returning DM_ASCII mode if not full (i.e. encoding < 4 chars), or if + full and at EOD where 1 or 2 ASCII chars can be encoded */ +static int dm_getEndMode(struct zint_symbol *symbol, const unsigned char *source, const int length, const int mode, + const int from, const int len, const int size) { + if (mode == DM_EDIFACT) { + int last_ascii; + if (len < 4) { + return DM_ASCII; + } + last_ascii = dm_last_ascii(source, length, from + len); + if (last_ascii) { /* At EOD with remaining chars ASCII-encodable in 1 or 2 codewords */ + const int symbols_left = dm_codewords_remaining(symbol, size + last_ascii, 0); + /* If no codewords left and 1 or 2 ASCII-encodables or 1 codeword left and 1 ASCII-encodable */ + if (symbols_left <= 2 - last_ascii) { + return DM_ASCII; + } + } + } + return mode; +} + +//#define DM_TRACE +#include "dmatrix_trace.h" + +/* Return number of C40/TEXT codewords needed to encode characters in full batches of 3 (or less if EOD). + The number of characters encoded is returned in `len` */ +static int dm_getNumberOfC40Words(const unsigned char *source, const int length, const int from, const int mode, + int *len) { + int thirdsCount = 0; + int i; + + for (i = from; i < length; i++) { + const unsigned char ci = source[i]; + int remainder; + + if (dm_isc40text(mode, ci)) { + thirdsCount++; /* Native */ + } else if (!(ci & 0x80)) { + thirdsCount += 2; /* Shift */ + } else if (dm_isc40text(mode, (unsigned char) (ci & 0x7F))) { + thirdsCount += 3; /* Shift, Upper shift */ + } else { + thirdsCount += 4; /* Shift, Upper shift, shift */ + } + + remainder = thirdsCount % 3; + if (remainder == 0 || (remainder == 2 && i + 1 == length)) { + *len = i - from + 1; + return ((thirdsCount + 2) / 3) * 2; + } + } + *len = 0; + return 0; +} + +/* Initialize a new edge. Returns endMode */ +static int dm_new_Edge(struct zint_symbol *symbol, const unsigned char *source, const int length, + struct dm_edge *edges, const int mode, const int from, const int len, struct dm_edge *previous, + struct dm_edge *edge, const int cwds) { + int previousMode; + int size; + int last_ascii, symbols_left; + + edge->mode = mode; + edge->endMode = mode; + edge->from = from; + edge->len = len; + edge->bytes = 0; + if (previous) { + assert(previous->mode && previous->len && previous->size && previous->endMode); + previousMode = previous->endMode; + edge->previous = previous - edges; + size = previous->size; + } else { + previousMode = DM_ASCII; + edge->previous = 0; + size = 0; + } + + switch (mode) { + case DM_ASCII: + assert(previousMode != DM_EDIFACT); + size++; + if (source[from] & 0x80) { + size++; + } + if (previousMode != DM_ASCII && previousMode != DM_BASE256) { + size++; /* Unlatch to ASCII */ + } + break; + + case DM_BASE256: + assert(previousMode != DM_EDIFACT); + size++; + if (previousMode != DM_BASE256) { + size += 2; /* Byte count + latch to BASE256 */ + if (previousMode != DM_ASCII) { + size++; /* Unlatch to ASCII */ + } + edge->bytes = 1; + } else { + assert(previous); + edge->bytes = 1 + previous->bytes; + if (edge->bytes == 250) { + size++; /* Extra byte count */ + } + } + break; + + case DM_C40: + case DM_TEXT: + assert(previousMode != DM_EDIFACT); + size += cwds; + if (previousMode != mode) { + size++; /* Latch to this mode */ + if (previousMode != DM_ASCII && previousMode != DM_BASE256) { + size++; /* Unlatch to ASCII */ + } + } + if (from + len + 2 >= length) { /* If less than batch of 3 away from EOD */ + last_ascii = dm_last_ascii(source, length, from + len); + symbols_left = dm_codewords_remaining(symbol, size + last_ascii, 0); + if (symbols_left > 0) { + size++; /* We need an extra unlatch at the end */ + } + } + break; + + case DM_X12: + assert(previousMode != DM_EDIFACT); + size += 2; + if (previousMode != DM_X12) { + size++; /* Latch to this mode */ + if (previousMode != DM_ASCII && previousMode != DM_BASE256) { + size++; /* Unlatch to ASCII */ + } + } + if (from + len + 2 >= length) { /* If less than batch of 3 away from EOD */ + last_ascii = dm_last_ascii(source, length, from + len); + if (last_ascii == 2) { /* Only 1 ASCII-encodable allowed at EOD for X12, unlike C40/TEXT */ + size++; /* We need an extra unlatch at the end */ + } else { + symbols_left = dm_codewords_remaining(symbol, size + last_ascii, 0); + if (symbols_left > 0) { + size++; /* We need an extra unlatch at the end */ + } + } + } + break; + + case DM_EDIFACT: + size += 3; + if (previousMode != DM_EDIFACT) { + size++; /* Latch to this mode */ + if (previousMode != DM_ASCII && previousMode != DM_BASE256) { + size++; /* Unlatch to ASCII */ + } + } + edge->endMode = dm_getEndMode(symbol, source, length, mode, from, len, size); + break; + } + edge->size = size; + + return edge->endMode; +} + +/* Add an edge for a mode at a vertex if no existing edge or if more optimal than existing edge */ +static void dm_addEdge(struct zint_symbol *symbol, const unsigned char *source, const int length, + struct dm_edge *edges, const int mode, const int from, const int len, struct dm_edge *previous, + const int cwds) { + struct dm_edge edge; + const int endMode = dm_new_Edge(symbol, source, length, edges, mode, from, len, previous, &edge, cwds); + const int vertexIndex = from + len; + const int v_ij = vertexIndex * DM_NUM_MODES + endMode - 1; + + if (edges[v_ij].mode == 0 || edges[v_ij].size > edge.size) { + DM_TRACE_AddEdge(source, length, edges, previous, vertexIndex, &edge); + edges[v_ij] = edge; + } else { + DM_TRACE_NotAddEdge(source, length, edges, previous, vertexIndex, v_ij, &edge); + } +} + +/* Add edges for the various modes at a vertex */ +static void dm_addEdges(struct zint_symbol *symbol, const unsigned char source[], const int length, + struct dm_edge *edges, const int from, struct dm_edge *previous, const int gs1) { + int i, pos; + + /* Not possible to unlatch a full EDF edge to something else */ + if (previous == NULL || previous->endMode != DM_EDIFACT) { + + static const int c40text_modes[] = { DM_C40, DM_TEXT }; + + if (source[from] <= '9' && source[from] >= '0' && from + 1 < length + && source[from + 1] <= '9' && source[from + 1] >= '0') { + dm_addEdge(symbol, source, length, edges, DM_ASCII, from, 2, previous, 0); + /* If ASCII vertex, don't bother adding other edges as this will be optimal; suggested by Alex Geller */ + if (previous && previous->mode == DM_ASCII) { + return; + } + } else { + dm_addEdge(symbol, source, length, edges, DM_ASCII, from, 1, previous, 0); + } + + for (i = 0; i < ARRAY_SIZE(c40text_modes); i++) { + int len; + int cwds = dm_getNumberOfC40Words(source, length, from, c40text_modes[i], &len); + if (cwds) { + dm_addEdge(symbol, source, length, edges, c40text_modes[i], from, len, previous, cwds); + } + } + + if (from + 2 < length && dm_isX12(source[from]) && dm_isX12(source[from + 1]) && dm_isX12(source[from + 2])) { + dm_addEdge(symbol, source, length, edges, DM_X12, from, 3, previous, 0); + } + + if (gs1 != 1 || source[from] != '[') { + dm_addEdge(symbol, source, length, edges, DM_BASE256, from, 1, previous, 0); + } + } + + if (dm_isedifact(source[from], gs1)) { + /* We create 3 EDF edges, 2, 3 or 4 characters length. The 4-char normally doesn't have a latch to ASCII + unless it is 2 characters away from the end of the input. */ + for (i = 1, pos = from + i; i < 4 && pos < length && dm_isedifact(source[pos], gs1); i++, pos++) { + dm_addEdge(symbol, source, length, edges, DM_EDIFACT, from, i + 1, previous, 0); + } + } +} + +/* Calculate optimized encoding modes */ +static int dm_define_mode(struct zint_symbol *symbol, char modes[], const unsigned char source[], const int length, + const int gs1, const int debug_print) { + + int i, j, v_i; + int minimalJ, minimalSize; + struct dm_edge *edge; + int current_mode; + int mode_end, mode_len; + + struct dm_edge *edges = (struct dm_edge *) calloc((length + 1) * DM_NUM_MODES, sizeof(struct dm_edge)); + if (!edges) { + return 0; + } + dm_addEdges(symbol, source, length, edges, 0, NULL, gs1); + + DM_TRACE_Edges("DEBUG Initial situation\n", source, length, edges, 0); + + for (i = 1; i < length; i++) { + v_i = i * DM_NUM_MODES; + for (j = 0; j < DM_NUM_MODES; j++) { + if (edges[v_i + j].mode) { + dm_addEdges(symbol, source, length, edges, i, edges + v_i + j, gs1); + } + } + DM_TRACE_Edges("DEBUG situation after adding edges to vertices at position %d\n", source, length, edges, i); + } + + DM_TRACE_Edges("DEBUG Final situation\n", source, length, edges, length); + + v_i = length * DM_NUM_MODES; + minimalJ = -1; + minimalSize = INT_MAX; + for (j = 0; j < DM_NUM_MODES; j++) { + edge = edges + v_i + j; + if (edge->mode) { + if (debug_print) printf("edges[%d][%d][0] size %d\n", length, j, edge->size); + if (edge->size < minimalSize) { + minimalSize = edge->size; + minimalJ = j; + if (debug_print) printf(" set minimalJ %d\n", minimalJ); + } + } else { + if (debug_print) printf("edges[%d][%d][0] NULL\n", length, j); + } + } + assert(minimalJ >= 0); + + edge = edges + v_i + minimalJ; + mode_len = 0; + mode_end = length; + while (edge) { + current_mode = edge->mode; + mode_len += edge->len; + edge = DM_PREVIOUS(edges, edge); + if (!edge || edge->mode != current_mode) { + for (i = mode_end - mode_len; i < mode_end; i++) { + modes[i] = current_mode; + } + mode_end = mode_end - mode_len; + mode_len = 0; + } + } + if (debug_print) { + printf("modes (%d): ", length); + for (i = 0; i < length; i++) printf("%c", dm_smodes[(int) modes[i]][0]); + printf("\n"); + } + assert(mode_end == 0); + + free(edges); + + return 1; +} + +/* Do default minimal encodation */ +static int dm_minimalenc(struct zint_symbol *symbol, const unsigned char source[], const int length, int *p_sp, + unsigned char target[], int *p_tp, int process_buffer[8], int *p_process_p, int *p_b256_start, + int *p_current_mode, const int gs1, const int debug_print) { + int sp = *p_sp; + int tp = *p_tp; + int process_p = *p_process_p; + int current_mode = *p_current_mode; + int last_ascii, symbols_left; + int i; +#ifndef _MSC_VER + char modes[length]; +#else + char *modes = (char *) _alloca(length); +#endif + + assert(length <= 10921); /* Can only handle (10921 + 1) * 6 = 65532 < 65536 (2*16) due to sizeof(previous) */ + + if (!dm_define_mode(symbol, modes, source, length, gs1, debug_print)) { + strcpy(symbol->errtxt, "728: Insufficient memory for mode buffers"); + return ZINT_ERROR_MEMORY; + } + + while (sp < length) { + + if (modes[sp] != current_mode) { + switch (current_mode) { + case DM_C40: + case DM_TEXT: + case DM_X12: + process_p = 0; /* Throw away buffer if any */ + target[tp++] = 254; /* Unlatch */ + break; + case DM_EDIFACT: + last_ascii = dm_last_ascii(source, length, sp); + if (!last_ascii) { + process_buffer[process_p++] = 31; /* Unlatch */ + } else { + symbols_left = dm_codewords_remaining(symbol, tp + last_ascii, process_p); + if (debug_print) { + printf("process_p %d, last_ascii %d, symbols_left %d\n", + process_p, last_ascii, symbols_left); + } + if (symbols_left > 2 - last_ascii) { + process_buffer[process_p++] = 31; /* Unlatch */ + } + } + process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 1 /*empty*/, debug_print); + break; + case DM_BASE256: + tp = dm_update_b256_field_length(target, tp, *p_b256_start); + /* B.2.1 255-state randomising algorithm */ + for (i = *p_b256_start; i < tp; i++) { + const int prn = ((149 * (i + 1)) % 255) + 1; + target[i] = (unsigned char) ((target[i] + prn) & 0xFF); + } + break; + } + tp = dm_switch_mode(modes[sp], target, tp, p_b256_start, debug_print); + } + + current_mode = modes[sp]; + assert(current_mode); + + if (current_mode == DM_ASCII) { + + if (is_twodigits(source, length, sp)) { + target[tp++] = (unsigned char) ((10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130); + if (debug_print) printf("N%02d ", target[tp - 1] - 130); + sp += 2; + } else { + if (source[sp] & 0x80) { + target[tp++] = 235; /* FNC4 */ + target[tp++] = (source[sp] - 128) + 1; + if (debug_print) printf("FN4 A%02X ", target[tp - 1] - 1); + } else { + if (gs1 && (source[sp] == '[')) { + if (gs1 == 2) { + target[tp++] = 29 + 1; /* GS */ + if (debug_print) printf("GS "); + } else { + target[tp++] = 232; /* FNC1 */ + if (debug_print) printf("FN1 "); + } + } else { + target[tp++] = source[sp] + 1; + if (debug_print) printf("A%02X ", target[tp - 1] - 1); + } + } + sp++; + } + + } else if (current_mode == DM_C40 || current_mode == DM_TEXT) { + + int shift_set, value; + const char *ct_shift, *ct_value; + + if (current_mode == DM_C40) { + ct_shift = dm_c40_shift; + ct_value = dm_c40_value; + } else { + ct_shift = dm_text_shift; + ct_value = dm_text_value; + } + + if (source[sp] & 0x80) { + process_buffer[process_p++] = 1; + process_buffer[process_p++] = 30; /* Upper Shift */ + shift_set = ct_shift[source[sp] - 128]; + value = ct_value[source[sp] - 128]; + } else { + if (gs1 && (source[sp] == '[')) { + if (gs1 == 2) { + shift_set = ct_shift[29]; + value = ct_value[29]; /* GS */ + } else { + shift_set = 2; + value = 27; /* FNC1 */ + } + } else { + shift_set = ct_shift[source[sp]]; + value = ct_value[source[sp]]; + } + } + + if (shift_set != 0) { + process_buffer[process_p++] = shift_set - 1; + } + process_buffer[process_p++] = value; + + if (process_p >= 3) { + process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); + } + sp++; + + } else if (current_mode == DM_X12) { + + static const char x12_nonalphanum_chars[] = "\015*> "; + int value = 0; + + if ((source[sp] >= '0') && (source[sp] <= '9')) { + value = (source[sp] - '0') + 4; + } else if ((source[sp] >= 'A') && (source[sp] <= 'Z')) { + value = (source[sp] - 'A') + 14; + } else { + value = posn(x12_nonalphanum_chars, source[sp]); + } + + process_buffer[process_p++] = value; + + if (process_p >= 3) { + process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); + } + sp++; + + } else if (current_mode == DM_EDIFACT) { + + int value = source[sp]; + + if (value >= 64) { // '@' + value -= 64; + } + + process_buffer[process_p++] = value; + sp++; + + if (process_p >= 4) { + process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 0 /*empty*/, debug_print); + } + + } else if (current_mode == DM_BASE256) { + + if (gs1 == 2 && source[sp] == '[') { + target[tp++] = 29; /* GS */ + } else { + target[tp++] = source[sp]; + } + sp++; + if (debug_print) printf("B%02X ", target[tp - 1]); + } + + if (tp > 1558) { + strcpy(symbol->errtxt, "729: Data too long to fit in symbol"); + return ZINT_ERROR_TOO_LONG; + } + + } /* while */ + + *p_sp = sp; + *p_tp = tp; + *p_process_p = process_p; + *p_current_mode = current_mode; + + return 0; +} + +/* Encode using algorithm based on ISO/IEC 21471:2020 Annex J (was ISO/IEC 21471:2006 Annex P) */ +static int dm_isoenc(struct zint_symbol *symbol, const unsigned char source[], const int length, int *p_sp, + unsigned char target[], int *p_tp, int process_buffer[8], int *p_process_p, int *p_b256_start, + int *p_current_mode, const int gs1, const int debug_print) { + int sp = *p_sp; + int tp = *p_tp; + int process_p = *p_process_p; + int current_mode = *p_current_mode; + int not_first = 0; + int i; + + /* step (a) */ + int next_mode = DM_ASCII; + + while (sp < length) { + + current_mode = next_mode; + + /* step (b) - ASCII encodation */ + if (current_mode == DM_ASCII) { + next_mode = DM_ASCII; + + if (is_twodigits(source, length, sp)) { + target[tp++] = (unsigned char) ((10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130); + if (debug_print) printf("N%02d ", target[tp - 1] - 130); + sp += 2; + } else { + next_mode = dm_look_ahead_test(source, length, sp, current_mode, 0, gs1, debug_print); + + if (next_mode != DM_ASCII) { + tp = dm_switch_mode(next_mode, target, tp, p_b256_start, debug_print); + not_first = 0; + } else { + if (source[sp] & 0x80) { + target[tp++] = 235; /* FNC4 */ + target[tp++] = (source[sp] - 128) + 1; + if (debug_print) printf("FN4 A%02X ", target[tp - 1] - 1); + } else { + if (gs1 && (source[sp] == '[')) { + if (gs1 == 2) { + target[tp++] = 29 + 1; /* GS */ + if (debug_print) printf("GS "); + } else { + target[tp++] = 232; /* FNC1 */ + if (debug_print) printf("FN1 "); + } + } else { + target[tp++] = source[sp] + 1; + if (debug_print) printf("A%02X ", target[tp - 1] - 1); + } + } + sp++; + } + } + + /* step (c)/(d) C40/TEXT encodation */ + } else if (current_mode == DM_C40 || current_mode == DM_TEXT) { + + next_mode = current_mode; + if (process_p == 0 && not_first) { + next_mode = dm_look_ahead_test(source, length, sp, current_mode, process_p, gs1, debug_print); + } + + if (next_mode != current_mode) { + target[tp++] = 254; /* Unlatch */ + next_mode = DM_ASCII; + if (debug_print) printf("ASC "); + } else { + int shift_set, value; + const char *ct_shift, *ct_value; + + if (current_mode == DM_C40) { + ct_shift = dm_c40_shift; + ct_value = dm_c40_value; + } else { + ct_shift = dm_text_shift; + ct_value = dm_text_value; + } + + if (source[sp] & 0x80) { + process_buffer[process_p++] = 1; + process_buffer[process_p++] = 30; /* Upper Shift */ + shift_set = ct_shift[source[sp] - 128]; + value = ct_value[source[sp] - 128]; + } else { + if (gs1 && (source[sp] == '[')) { + if (gs1 == 2) { + shift_set = ct_shift[29]; + value = ct_value[29]; /* GS */ + } else { + shift_set = 2; + value = 27; /* FNC1 */ + } + } else { + shift_set = ct_shift[source[sp]]; + value = ct_value[source[sp]]; + } + } + + if (shift_set != 0) { + process_buffer[process_p++] = shift_set - 1; + } + process_buffer[process_p++] = value; + + if (process_p >= 3) { + process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); + } + sp++; + not_first = 1; + } + + /* step (e) X12 encodation */ + } else if (current_mode == DM_X12) { + + if (!dm_isX12(source[sp])) { + next_mode = DM_ASCII; + } else { + next_mode = DM_X12; + if (process_p == 0 && not_first) { + next_mode = dm_look_ahead_test(source, length, sp, current_mode, process_p, gs1, debug_print); + } + } + + if (next_mode != DM_X12) { + process_p = 0; /* Throw away buffer if any */ + target[tp++] = 254; /* Unlatch */ + next_mode = DM_ASCII; + if (debug_print) printf("ASC "); + } else { + static const char x12_nonalphanum_chars[] = "\015*> "; + int value = 0; + + if ((source[sp] <= '9') && (source[sp] >= '0')) { + value = (source[sp] - '0') + 4; + } else if ((source[sp] >= 'A') && (source[sp] <= 'Z')) { + value = (source[sp] - 'A') + 14; + } else { + value = posn(x12_nonalphanum_chars, source[sp]); + } + + process_buffer[process_p++] = value; + + if (process_p >= 3) { + process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); + } + sp++; + not_first = 1; + } + + /* step (f) EDIFACT encodation */ + } else if (current_mode == DM_EDIFACT) { + + if (!dm_isedifact(source[sp], gs1)) { + next_mode = DM_ASCII; + } else { + next_mode = DM_EDIFACT; + if (process_p == 3) { + /* Note different then spec Step (f)(2), which suggests checking when 0, but this seems to + work better in many cases as the switch to ASCII is "free" */ + next_mode = dm_look_ahead_test(source, length, sp, current_mode, process_p, gs1, debug_print); + } + } + + if (next_mode != DM_EDIFACT) { + process_buffer[process_p++] = 31; + process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 1 /*empty*/, debug_print); + next_mode = DM_ASCII; + if (debug_print) printf("ASC "); + } else { + int value = source[sp]; + + if (value >= 64) { // '@' + value -= 64; + } + + process_buffer[process_p++] = value; + sp++; + not_first = 1; + + if (process_p >= 4) { + process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 0 /*empty*/, + debug_print); + } + } + + /* step (g) Base 256 encodation */ + } else if (current_mode == DM_BASE256) { + + if (gs1 == 1 && source[sp] == '[') { + next_mode = DM_ASCII; + } else { + next_mode = DM_BASE256; + if (not_first) { + next_mode = dm_look_ahead_test(source, length, sp, current_mode, tp - (*p_b256_start + 1), gs1, + debug_print); + } + } + + if (next_mode != DM_BASE256) { + tp = dm_update_b256_field_length(target, tp, *p_b256_start); + /* B.2.1 255-state randomising algorithm */ + for (i = *p_b256_start; i < tp; i++) { + const int prn = ((149 * (i + 1)) % 255) + 1; + target[i] = (unsigned char) ((target[i] + prn) & 0xFF); + } + /* We switch directly here to avoid flipping back to Base 256 due to `dm_text_sp_cnt()` */ + tp = dm_switch_mode(next_mode, target, tp, p_b256_start, debug_print); + not_first = 0; + } else { + if (gs1 == 2 && source[sp] == '[') { + target[tp++] = 29; /* GS */ + } else { + target[tp++] = source[sp]; + } + sp++; + not_first = 1; + if (debug_print) printf("B%02X ", target[tp - 1]); + } + } + + if (tp > 1558) { + strcpy(symbol->errtxt, "520: Data too long to fit in symbol"); + return ZINT_ERROR_TOO_LONG; + } + + } /* while */ + + *p_sp = sp; + *p_tp = tp; + *p_process_p = process_p; + *p_current_mode = current_mode; + + return 0; +} + /* Encodes data using ASCII, C40, Text, X12, EDIFACT or Base 256 modes as appropriate Supports encoding FNC1 in supporting systems */ -static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], unsigned char target[], - int *p_length, int *p_binlen) { - - int sp; - int tp, i, gs1; - int current_mode, next_mode; - int not_first = 0; - int inputlen = *p_length; +STATIC_UNLESS_ZINT_TEST int dm_encode(struct zint_symbol *symbol, const unsigned char source[], + unsigned char target[], int *p_length, int *p_binlen) { + int sp = 0; + int tp = 0; + int current_mode = DM_ASCII; + int i, gs1; + int length = *p_length; int process_buffer[8]; /* holds remaining data to finalised */ int process_p = 0; /* number of characters left to finalise */ int b256_start = 0; int symbols_left; + int error_number; const int debug_print = symbol->debug & ZINT_DEBUG_PRINT; - sp = 0; - tp = 0; + if (length > 3116) { /* Max is 3166 digits */ + strcpy(symbol->errtxt, "760: Data too long to fit in symbol"); + return ZINT_ERROR_TOO_LONG; + } if (symbol->structapp.count) { int id1, id2; @@ -806,12 +1607,12 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], /* Check for Macro05/Macro06 */ /* "[)>[RS]05[GS]...[RS][EOT]" -> CW 236 */ /* "[)>[RS]06[GS]...[RS][EOT]" -> CW 237 */ - if (tp == 0 && sp == 0 && inputlen >= 9 + if (tp == 0 && sp == 0 && length >= 9 && source[0] == '[' && source[1] == ')' && source[2] == '>' && source[3] == '\x1e' && source[4] == '0' && (source[5] == '5' || source[5] == '6') && source[6] == '\x1d' - && source[inputlen - 2] == '\x1e' && source[inputlen - 1] == '\x04') { + && source[length - 2] == '\x1e' && source[length - 1] == '\x04') { /* Output macro Codeword */ if (source[5] == '5') { @@ -823,225 +1624,20 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], } /* Remove macro characters from input string */ sp = 7; - inputlen -= 2; + length -= 2; *p_length -= 2; } - /* step (a) */ - current_mode = DM_ASCII; - next_mode = DM_ASCII; - - while (sp < inputlen) { - - current_mode = next_mode; - - /* step (b) - ASCII encodation */ - if (current_mode == DM_ASCII) { - next_mode = DM_ASCII; - - if (is_twodigits(source, inputlen, sp)) { - target[tp++] = (unsigned char) ((10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130); - if (debug_print) printf("N%02d ", target[tp - 1] - 130); - sp += 2; - } else { - next_mode = dm_look_ahead_test(source, inputlen, sp, current_mode, 0, gs1, debug_print); - - if (next_mode != DM_ASCII) { - tp = dm_switch_mode(next_mode, target, tp, &b256_start, debug_print); - not_first = 0; - } else { - if (source[sp] & 0x80) { - target[tp++] = 235; /* FNC4 */ - target[tp++] = (source[sp] - 128) + 1; - if (debug_print) printf("FN4 A%02X ", target[tp - 1] - 1); - } else { - if (gs1 && (source[sp] == '[')) { - if (gs1 == 2) { - target[tp++] = 29 + 1; /* GS */ - if (debug_print) printf("GS "); - } else { - target[tp++] = 232; /* FNC1 */ - if (debug_print) printf("FN1 "); - } - } else { - target[tp++] = source[sp] + 1; - if (debug_print) printf("A%02X ", target[tp - 1] - 1); - } - } - sp++; - } - } - - /* step (c)/(d) C40/TEXT encodation */ - } else if (current_mode == DM_C40 || current_mode == DM_TEXT) { - - next_mode = current_mode; - if (process_p == 0 && not_first) { - next_mode = dm_look_ahead_test(source, inputlen, sp, current_mode, process_p, gs1, debug_print); - } - - if (next_mode != current_mode) { - target[tp++] = 254; /* Unlatch */ - next_mode = DM_ASCII; - if (debug_print) printf("ASC "); - } else { - int shift_set, value; - const char *ct_shift, *ct_value; - - if (current_mode == DM_C40) { - ct_shift = dm_c40_shift; - ct_value = dm_c40_value; - } else { - ct_shift = dm_text_shift; - ct_value = dm_text_value; - } - - if (source[sp] & 0x80) { - process_buffer[process_p++] = 1; - process_buffer[process_p++] = 30; /* Upper Shift */ - shift_set = ct_shift[source[sp] - 128]; - value = ct_value[source[sp] - 128]; - } else { - if (gs1 && (source[sp] == '[')) { - if (gs1 == 2) { - shift_set = ct_shift[29]; - value = ct_value[29]; /* GS */ - } else { - shift_set = 2; - value = 27; /* FNC1 */ - } - } else { - shift_set = ct_shift[source[sp]]; - value = ct_value[source[sp]]; - } - } - - if (shift_set != 0) { - process_buffer[process_p++] = shift_set - 1; - } - process_buffer[process_p++] = value; - - if (process_p >= 3) { - process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); - } - sp++; - not_first = 1; - } - - /* step (e) X12 encodation */ - } else if (current_mode == DM_X12) { - - if (!dm_isX12(source[sp])) { - next_mode = DM_ASCII; - } else { - next_mode = DM_X12; - if (process_p == 0 && not_first) { - next_mode = dm_look_ahead_test(source, inputlen, sp, current_mode, process_p, gs1, debug_print); - } - } - - if (next_mode != DM_X12) { - process_p = 0; /* Throw away buffer if any */ - target[tp++] = 254; /* Unlatch */ - next_mode = DM_ASCII; - if (debug_print) printf("ASC "); - } else { - static const char x12_nonalphanum_chars[] = "\015*> "; - int value = 0; - - if ((source[sp] <= '9') && (source[sp] >= '0')) { - value = (source[sp] - '0') + 4; - } else if ((source[sp] >= 'A') && (source[sp] <= 'Z')) { - value = (source[sp] - 'A') + 14; - } else { - value = posn(x12_nonalphanum_chars, source[sp]); - } - - process_buffer[process_p++] = value; - - if (process_p >= 3) { - process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); - } - sp++; - not_first = 1; - } - - /* step (f) EDIFACT encodation */ - } else if (current_mode == DM_EDIFACT) { - - if (!dm_isedifact(source[sp], gs1)) { - next_mode = DM_ASCII; - } else { - next_mode = DM_EDIFACT; - if (process_p == 3) { - /* Note different then spec Step (f)(1), which suggests checking when 0, but this seems to work - better in many cases as the switch to ASCII is "free" */ - next_mode = dm_look_ahead_test(source, inputlen, sp, current_mode, process_p, gs1, debug_print); - } - } - - if (next_mode != DM_EDIFACT) { - process_buffer[process_p++] = 31; - process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 1 /*empty*/, debug_print); - next_mode = DM_ASCII; - if (debug_print) printf("ASC "); - } else { - int value = source[sp]; - - if (value >= 64) { // '@' - value -= 64; - } - - process_buffer[process_p++] = value; - sp++; - not_first = 1; - - if (process_p >= 4) { - process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 0 /*empty*/, debug_print); - } - } - - /* step (g) Base 256 encodation */ - } else if (current_mode == DM_BASE256) { - - if (gs1 == 1 && source[sp] == '[') { - next_mode = DM_ASCII; - } else { - next_mode = DM_BASE256; - if (not_first) { - next_mode = dm_look_ahead_test(source, inputlen, sp, current_mode, tp - (b256_start + 1), gs1, - debug_print); - } - } - - if (next_mode != DM_BASE256) { - tp = dm_update_b256_field_length(target, tp, b256_start); - /* B.2.1 255-state randomising algorithm */ - for (i = b256_start; i < tp; i++) { - const int prn = ((149 * (i + 1)) % 255) + 1; - target[i] = (unsigned char) ((target[i] + prn) & 0xFF); - } - /* We switch directly here to avoid flipping back to Base 256 due to `dm_text_sp_cnt()` */ - tp = dm_switch_mode(next_mode, target, tp, &b256_start, debug_print); - not_first = 0; - } else { - if (gs1 == 2 && source[sp] == '[') { - target[tp++] = 29; /* GS */ - } else { - target[tp++] = source[sp]; - } - sp++; - not_first = 1; - if (debug_print) printf("B%02X ", target[tp - 1]); - } - } - - if (tp > 1558) { - strcpy(symbol->errtxt, "520: Data too long to fit in symbol"); - return ZINT_ERROR_TOO_LONG; - } - - } /* while */ + if (symbol->input_mode & FAST_MODE) { /* If FAST_MODE, do Annex J-based encodation */ + error_number = dm_isoenc(symbol, source, length, &sp, target, &tp, process_buffer, &process_p, + &b256_start, ¤t_mode, gs1, debug_print); + } else { /* Do default minimal encodation */ + error_number = dm_minimalenc(symbol, source, length, &sp, target, &tp, process_buffer, &process_p, + &b256_start, ¤t_mode, gs1, debug_print); + } + if (error_number != 0) { + return error_number; + } symbols_left = dm_codewords_remaining(symbol, tp, process_p); @@ -1064,14 +1660,14 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], process_buffer[process_p++] = 0; // Shift 1 (void) dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); - } else if (process_p == 1 && symbols_left <= 2 && dm_isc40text(current_mode, source[inputlen - 1])) { + } else if (process_p == 1 && symbols_left <= 2 && dm_isc40text(current_mode, source[length - 1])) { /* 5.2.5.2 (c)/(d) */ if (symbols_left > 1) { /* 5.2.5.2 (c) */ target[tp++] = 254; // Unlatch and encode remaining data in ascii. if (debug_print) printf("ASC "); } - target[tp++] = source[inputlen - 1] + 1; + target[tp++] = source[length - 1] + 1; if (debug_print) printf("A%02X ", target[tp - 1] - 1); } else { @@ -1083,12 +1679,13 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], total_cnt += cnt; process_p -= cnt; } + if (debug_print) printf("Mode %d, backtracked %d\n", current_mode, (total_cnt / 3) * 2); tp -= (total_cnt / 3) * 2; target[tp++] = 254; // Unlatch if (debug_print) printf("ASC "); - for (; sp < inputlen; sp++) { - if (is_twodigits(source, inputlen, sp)) { + for (; sp < length; sp++) { + if (is_twodigits(source, length, sp)) { target[tp++] = (unsigned char) ((10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130); if (debug_print) printf("N%02d ", target[tp - 1] - 130); sp++; @@ -1116,7 +1713,7 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], if (debug_print) printf("X12 "); if ((symbols_left == 1) && (process_p == 1)) { // Unlatch not required! - target[tp++] = source[inputlen - 1] + 1; + target[tp++] = source[length - 1] + 1; if (debug_print) printf("A%02X ", target[tp - 1] - 1); } else { if (symbols_left > 0) { @@ -1125,11 +1722,11 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], } if (process_p == 1) { - target[tp++] = source[inputlen - 1] + 1; + target[tp++] = source[length - 1] + 1; if (debug_print) printf("A%02X ", target[tp - 1] - 1); } else if (process_p == 2) { - target[tp++] = source[inputlen - 2] + 1; - target[tp++] = source[inputlen - 1] + 1; + target[tp++] = source[length - 2] + 1; + target[tp++] = source[length - 1] + 1; if (debug_print) printf("A%02X A%02X ", target[tp - 2] - 1, target[tp - 1] - 1); } } @@ -1138,11 +1735,11 @@ static int dm200encode(struct zint_symbol *symbol, const unsigned char source[], if (debug_print) printf("EDI "); if (symbols_left <= 2 && process_p <= symbols_left) { // Unlatch not required! if (process_p == 1) { - target[tp++] = source[inputlen - 1] + 1; + target[tp++] = source[length - 1] + 1; if (debug_print) printf("A%02X ", target[tp - 1] - 1); } else if (process_p == 2) { - target[tp++] = source[inputlen - 2] + 1; - target[tp++] = source[inputlen - 1] + 1; + target[tp++] = source[length - 2] + 1; + target[tp++] = source[length - 1] + 1; if (debug_print) printf("A%02X A%02X ", target[tp - 2] - 1, target[tp - 1] - 1); } } else { @@ -1194,7 +1791,7 @@ static void dm_add_tail(unsigned char target[], int tp, const int tail_length) { } } -static int datamatrix_200(struct zint_symbol *symbol, const unsigned char source[], int inputlen) { +static int dm_ecc200(struct zint_symbol *symbol, const unsigned char source[], int length) { int i, skew = 0; unsigned char binary[2200]; int binlen; @@ -1203,8 +1800,8 @@ static int datamatrix_200(struct zint_symbol *symbol, const unsigned char source int H, W, FH, FW, datablock, bytes, rsblock; const int debug_print = symbol->debug & ZINT_DEBUG_PRINT; - /* inputlen may be decremented by 2 if macro character is used */ - error_number = dm200encode(symbol, source, binary, &inputlen, &binlen); + /* `length` may be decremented by 2 if macro character is used */ + error_number = dm_encode(symbol, source, binary, &length, &binlen); if (error_number != 0) { return error_number; } @@ -1314,7 +1911,7 @@ INTERNAL int datamatrix(struct zint_symbol *symbol, unsigned char source[], int if (symbol->option_1 <= 1) { /* ECC 200 */ - error_number = datamatrix_200(symbol, source, length); + error_number = dm_ecc200(symbol, source, length); } else { /* ECC 000 - 140 */ strcpy(symbol->errtxt, "524: Older Data Matrix standards are no longer supported"); diff --git a/backend/dmatrix.h b/backend/dmatrix.h index 5bd46fd7..85dcf585 100644 --- a/backend/dmatrix.h +++ b/backend/dmatrix.h @@ -2,7 +2,7 @@ /* libzint - the open source barcode library - Copyright (C) 2009 - 2020 Robin Stuart + Copyright (C) 2009 - 2021 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -32,7 +32,7 @@ /* vim: set ts=4 sw=4 et : */ /* - Containes Extended Rectangular Data Matrix (DMRE) + Contains Extended Rectangular Data Matrix (DMRE) See http://www.dmre.info for information Contact: harald.oehlmann@eurodatacouncil.org */ diff --git a/backend/pdf417.c b/backend/pdf417.c index 97d7f5d1..fbc0bb4c 100644 --- a/backend/pdf417.c +++ b/backend/pdf417.c @@ -49,7 +49,6 @@ #ifndef _MSC_VER #include #else -#include #include "ms_stdint.h" #endif #include diff --git a/backend/tests/data/svg/datamatrix_hvwsp1_bind1_dotty.svg b/backend/tests/data/svg/datamatrix_hvwsp1_bind1_dotty.svg index 89fc6eb9..32419cc3 100644 --- a/backend/tests/data/svg/datamatrix_hvwsp1_bind1_dotty.svg +++ b/backend/tests/data/svg/datamatrix_hvwsp1_bind1_dotty.svg @@ -22,126 +22,147 @@ - + + - + - - - + + - - + - - + + - - + + + - + + + + + - + - - + + + - - + + + - + + + + + + + + + + - + + + - + + + - - - + + + + + - - - + + - - - - - + + + + - + - - - + - - - + + - + - - + + + + - - - + - + + + - + + + + @@ -150,50 +171,61 @@ - + + + + - - + + + + - + + - - + + - - + + - + + + + - + - + + - + + diff --git a/backend/tests/data/svg/datamatrix_vwsp1_bind1_dotty.svg b/backend/tests/data/svg/datamatrix_vwsp1_bind1_dotty.svg index c05ca1f2..0c3108c9 100644 --- a/backend/tests/data/svg/datamatrix_vwsp1_bind1_dotty.svg +++ b/backend/tests/data/svg/datamatrix_vwsp1_bind1_dotty.svg @@ -22,126 +22,147 @@ - + + - + - - - + + - - + - - + + - - + + + - + + + + + - + - - + + + - - + + + - + + + + + + + + + + - + + + - + + + - - - + + + + + - - - + + - - - - - + + + + - + - - - + - - - + + - + - - + + + + - - - + - + + + - + + + + @@ -150,50 +171,61 @@ - + + + + - - + + + + - + + - - + + - - + + - + + + + - + - + + - + + diff --git a/backend/tests/test_dmatrix.c b/backend/tests/test_dmatrix.c index 2fbce829..39bc5ac9 100644 --- a/backend/tests/test_dmatrix.c +++ b/backend/tests/test_dmatrix.c @@ -30,7 +30,7 @@ /* vim: set ts=4 sw=4 et : */ #include "testcommon.h" -#include "test_dmatrix_variant.h" +#include "../gs1.h" static void test_large(int index, int debug) { @@ -49,310 +49,311 @@ static void test_large(int index, int debug) { struct item data[] = { /* 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_DATAMATRIX, -1, { 0, 0, "" }, "\001", 1558, 0, 144, 144 }, - /* 9*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "\001", 1559, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 10*/ { BARCODE_HIBC_DM, -1, { 0, 0, "" }, "1", 110, 0, 32, 32 }, - /* 11*/ { BARCODE_HIBC_DM, -1, { 0, 0, "" }, "1", 111, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 12*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "1", 6, 0, 10, 10 }, - /* 13*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "1", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 14*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "A", 3, 0, 10, 10 }, - /* 15*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "A", 4, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 16*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "\200", 1, 0, 10, 10 }, - /* 17*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "\200", 2, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 18*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "1", 10, 0, 12, 12 }, - /* 19*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 20*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "A", 6, 0, 12, 12 }, - /* 21*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 22*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "\200", 3, 0, 12, 12 }, - /* 23*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 24*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "1", 16, 0, 14, 14 }, - /* 25*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "1", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 26*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "A", 10, 0, 14, 14 }, - /* 27*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "A", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 28*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "\200", 6, 0, 14, 14 }, - /* 29*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "\200", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 30*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "1", 24, 0, 16, 16 }, - /* 31*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "1", 25, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 32*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "A", 16, 0, 16, 16 }, - /* 33*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "A", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 34*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "\200", 10, 0, 16, 16 }, - /* 35*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "\200", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 36*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "1", 36, 0, 18, 18 }, - /* 37*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 38*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "A", 25, 0, 18, 18 }, - /* 39*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 40*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "\200", 16, 0, 18, 18 }, - /* 41*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 42*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "1", 44, 0, 20, 20 }, - /* 43*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 44*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "A", 31, 0, 20, 20 }, - /* 45*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 46*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "\200", 20, 0, 20, 20 }, - /* 47*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 48*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "1", 60, 0, 22, 22 }, - /* 49*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "1", 61, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 50*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "A", 43, 0, 22, 22 }, - /* 51*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "A", 44, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 52*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "\200", 28, 0, 22, 22 }, - /* 53*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "\200", 29, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 54*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "1", 72, 0, 24, 24 }, - /* 55*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "1", 73, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 56*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "A", 52, 0, 24, 24 }, - /* 57*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "A", 53, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 58*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "\200", 34, 0, 24, 24 }, - /* 59*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "\200", 35, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 60*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "1", 88, 0, 26, 26 }, - /* 61*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 62*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "A", 64, 0, 26, 26 }, - /* 63*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 64*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "\200", 42, 0, 26, 26 }, - /* 65*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 66*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "1", 124, 0, 32, 32 }, - /* 67*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 68*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "A", 91, 0, 32, 32 }, - /* 69*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 70*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "\200", 60, 0, 32, 32 }, - /* 71*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 72*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "1", 172, 0, 36, 36 }, - /* 73*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "1", 173, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 74*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "A", 127, 0, 36, 36 }, - /* 75*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "A", 128, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 76*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "\200", 84, 0, 36, 36 }, - /* 77*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "\200", 85, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 78*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "1", 228, 0, 40, 40 }, - /* 79*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "1", 229, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 80*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "A", 169, 0, 40, 40 }, - /* 81*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "A", 170, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 82*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "\200", 112, 0, 40, 40 }, - /* 83*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "\200", 113, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 84*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "1", 288, 0, 44, 44 }, - /* 85*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "1", 289, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 86*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "A", 214, 0, 44, 44 }, - /* 87*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "A", 215, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 88*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "\200", 142, 0, 44, 44 }, - /* 89*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "\200", 143, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 90*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "1", 348, 0, 48, 48 }, - /* 91*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "1", 349, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 92*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "A", 259, 0, 48, 48 }, - /* 93*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "A", 260, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 94*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "\200", 172, 0, 48, 48 }, - /* 95*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "\200", 173, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 96*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "1", 408, 0, 52, 52 }, - /* 97*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "1", 409, ZINT_ERROR_TOO_LONG, -1, -1 }, - /* 98*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "A", 304, 0, 52, 52 }, - /* 99*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "A", 305, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*100*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "\200", 202, 0, 52, 52 }, - /*101*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "\200", 203, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*102*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "1", 560, 0, 64, 64 }, - /*103*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "1", 561, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*104*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "A", 418, 0, 64, 64 }, - /*105*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "A", 419, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*106*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "\200", 278, 0, 64, 64 }, // Spec says 277 but 278 correct as only single byte count of 0 required - /*107*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "\200", 279, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*108*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "1", 736, 0, 72, 72 }, - /*109*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "1", 737, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*110*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "A", 550, 0, 72, 72 }, - /*111*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "A", 551, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*112*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "\200", 366, 0, 72, 72 }, // Spec says 365 but 366 correct as only single byte count of 0 required - /*113*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "\200", 367, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*114*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "1", 912, 0, 80, 80 }, - /*115*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "1", 913, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*116*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "A", 682, 0, 80, 80 }, - /*117*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "A", 683, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*118*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "\200", 454, 0, 80, 80 }, // Spec says 453 but 454 correct as only single byte count of 0 required - /*119*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "\200", 455, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*120*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "1", 1152, 0, 88, 88 }, - /*121*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "1", 1153, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*122*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "A", 862, 0, 88, 88 }, - /*123*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "A", 863, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*124*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "\200", 574, 0, 88, 88 }, // Spec says 573 but 574 correct as only single byte count of 0 required - /*125*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "\200", 575, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*126*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "1", 1392, 0, 96, 96 }, - /*127*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "1", 1393, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*128*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "A", 1042, 0, 96, 96 }, - /*129*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "A", 1043, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*130*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "\200", 694, 0, 96, 96 }, // Spec says 693 but 694 correct as only single byte count of 0 required - /*131*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "\200", 695, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*132*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "1", 1632, 0, 104, 104 }, - /*133*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "1", 1633, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*134*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "A", 1222, 0, 104, 104 }, - /*135*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "A", 1223, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*136*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "\200", 814, 0, 104, 104 }, // Spec says 813 but 814 correct as only single byte count of 0 required - /*137*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "\200", 815, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*138*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "1", 2100, 0, 120, 120 }, - /*139*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "1", 2101, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*140*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "A", 1573, 0, 120, 120 }, - /*141*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "A", 1574, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*142*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "\200", 1048, 0, 120, 120 }, // Spec says 1047 but 1048 correct as only single byte count of 0 required - /*143*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "\200", 1049, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*144*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "1", 2608, 0, 132, 132 }, - /*145*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "1", 2609, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*146*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "A", 1954, 0, 132, 132 }, - /*147*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "A", 1955, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*148*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "\200", 1302, 0, 132, 132 }, // Spec says 1301 but 1302 correct as only single byte count of 0 required - /*149*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "\200", 1303, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*150*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "1", 3116, 0, 144, 144 }, - /*151*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "1", 3117, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*152*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "A", 2335, 0, 144, 144 }, - /*153*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "A", 2336, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*154*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "\200", 1556, 0, 144, 144 }, // Spec says 1555 but 1556 correct as only single byte count of 0 required - /*155*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "\200", 1557, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*156*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "1", 10, 0, 8, 18 }, - /*157*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*158*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "A", 6, 0, 8, 18 }, - /*159*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*160*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "\200", 3, 0, 8, 18 }, - /*161*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*162*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "1", 20, 0, 8, 32 }, - /*163*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "1", 21, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*164*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "A", 13, 0, 8, 32 }, - /*165*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "A", 14, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*166*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "\200", 8, 0, 8, 32 }, - /*167*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "\200", 9, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*168*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "1", 32, 0, 12, 26 }, - /*169*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "1", 33, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*170*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "A", 22, 0, 12, 26 }, - /*171*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "A", 23, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*172*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "\200", 14, 0, 12, 26 }, - /*173*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "\200", 15, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*174*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "1", 44, 0, 12, 36 }, - /*175*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*176*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "A", 31, 0, 12, 36 }, - /*177*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*178*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "\200", 20, 0, 12, 36 }, - /*179*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*180*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "1", 64, 0, 16, 36 }, - /*181*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*182*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "A", 46, 0, 16, 36 }, - /*183*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*184*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "\200", 30, 0, 16, 36 }, - /*185*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*186*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "1", 98, 0, 16, 48 }, - /*187*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*188*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "A", 72, 0, 16, 48 }, - /*189*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*190*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "\200", 47, 0, 16, 48 }, - /*191*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*192*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "1", 36, 0, 8, 48 }, - /*193*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*194*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "A", 25, 0, 8, 48 }, - /*195*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*196*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "\200", 16, 0, 8, 48 }, - /*197*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*198*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "1", 48, 0, 8, 64 }, - /*199*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "1", 49, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*200*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "A", 34, 0, 8, 64 }, - /*201*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "A", 35, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*202*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "\200", 22, 0, 8, 64 }, - /*203*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "\200", 23, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*204*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "1", 64, 0, 8, 80 }, - /*205*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*206*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "A", 46, 0, 8, 80 }, - /*207*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*208*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "\200", 30, 0, 8, 80 }, - /*209*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*210*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "1", 76, 0, 8, 96 }, - /*211*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "1", 77, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*212*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "A", 55, 0, 8, 96 }, - /*213*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "A", 56, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*214*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "\200", 36, 0, 8, 96 }, - /*215*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "\200", 37, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*216*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "1", 98, 0, 8, 120 }, - /*217*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*218*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "A", 72, 0, 8, 120 }, - /*219*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*220*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "\200", 47, 0, 8, 120 }, - /*221*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*222*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "1", 126, 0, 8, 144 }, - /*223*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "1", 127, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*224*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "A", 93, 0, 8, 144 }, - /*225*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "A", 94, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*226*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "\200", 61, 0, 8, 144 }, - /*227*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "\200", 62, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*228*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "1", 86, 0, 12, 64 }, - /*229*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "1", 87, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*230*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "A", 63, 0, 12, 64 }, - /*231*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "A", 64, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*232*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "\200", 41, 0, 12, 64 }, - /*233*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "\200", 42, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*234*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "1", 128, 0, 12, 88 }, - /*235*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "1", 129, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*236*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "A", 94, 0, 12, 88 }, - /*237*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "A", 95, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*238*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "\200", 62, 0, 12, 88 }, - /*239*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "\200", 63, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*240*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "1", 124, 0, 16, 64 }, - /*241*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*242*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "A", 91, 0, 16, 64 }, - /*243*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*244*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "\200", 60, 0, 16, 64 }, - /*245*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*246*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "1", 88, 0, 20, 36 }, - /*247*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*248*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "A", 64, 0, 20, 36 }, - /*249*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*250*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "\200", 42, 0, 20, 36 }, - /*251*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*252*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "1", 112, 0, 20, 44 }, - /*253*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "1", 113, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*254*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "A", 82, 0, 20, 44 }, - /*255*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "A", 83, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*256*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "\200", 54, 0, 20, 44 }, - /*257*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "\200", 55, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*258*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "1", 168, 0, 20, 64 }, // Spec says 186 but typo - /*259*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "1", 169, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*260*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "A", 124, 0, 20, 64 }, - /*261*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "A", 125, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*262*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "\200", 82, 0, 20, 64 }, - /*263*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "\200", 83, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*264*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "1", 144, 0, 22, 48 }, - /*265*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "1", 145, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*266*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "A", 106, 0, 22, 48 }, - /*267*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "A", 107, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*268*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "\200", 70, 0, 22, 48 }, - /*269*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "\200", 71, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*270*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "1", 160, 0, 24, 48 }, - /*271*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "1", 161, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*272*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "A", 118, 0, 24, 48 }, - /*273*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "A", 119, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*274*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "\200", 78, 0, 24, 48 }, - /*275*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "\200", 79, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*276*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "1", 216, 0, 24, 64 }, - /*277*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "1", 217, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*278*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "A", 160, 0, 24, 64 }, - /*279*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "A", 161, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*280*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "\200", 106, 0, 24, 64 }, - /*281*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "\200", 107, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*282*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "1", 140, 0, 26, 40 }, - /*283*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "1", 141, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*284*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "A", 103, 0, 26, 40 }, - /*285*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "A", 104, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*286*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "\200", 68, 0, 26, 40 }, - /*287*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "\200", 69, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*288*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "1", 180, 0, 26, 48 }, - /*289*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "1", 181, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*290*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "A", 133, 0, 26, 48 }, - /*291*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "A", 134, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*292*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "\200", 88, 0, 26, 48 }, - /*293*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "\200", 89, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*294*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "1", 236, 0, 26, 64 }, - /*295*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "1", 237, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*296*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "A", 175, 0, 26, 64 }, - /*297*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "A", 176, ZINT_ERROR_TOO_LONG, -1, -1 }, - /*298*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "\200", 116, 0, 26, 64 }, - /*299*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "\200", 117, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 2*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "1", 10922, ZINT_ERROR_TOO_LONG, -1, -1 }, // Minimal encoding can handle max (10921 + 1) * 6 = 65532 < 65536 (2*16) due to sizeof(previous) + /* 3*/ { BARCODE_DATAMATRIX, -1, { 1, 2, "001001"}, "1", 3108, 0, 144, 144 }, // Structured Append 4 codewords overhead == 8 digits + /* 4*/ { BARCODE_DATAMATRIX, -1, { 1, 2, "001001"}, "1", 3109, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 5*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "A", 2335, 0, 144, 144 }, + /* 6*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "A", 2336, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 7*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "\200", 1556, 0, 144, 144 }, // Spec says 1555 but 1556 correct as only single byte count of 0 required + /* 8*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "\200", 1557, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 9*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "\001", 1558, 0, 144, 144 }, + /* 10*/ { BARCODE_DATAMATRIX, -1, { 0, 0, "" }, "\001", 1559, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 11*/ { BARCODE_HIBC_DM, -1, { 0, 0, "" }, "1", 110, 0, 32, 32 }, + /* 12*/ { BARCODE_HIBC_DM, -1, { 0, 0, "" }, "1", 111, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 13*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "1", 6, 0, 10, 10 }, + /* 14*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "1", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 15*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "A", 3, 0, 10, 10 }, + /* 16*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "A", 4, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 17*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "\200", 1, 0, 10, 10 }, + /* 18*/ { BARCODE_DATAMATRIX, 1, { 0, 0, "" }, "\200", 2, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 19*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "1", 10, 0, 12, 12 }, + /* 20*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 21*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "A", 6, 0, 12, 12 }, + /* 22*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 23*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "\200", 3, 0, 12, 12 }, + /* 24*/ { BARCODE_DATAMATRIX, 2, { 0, 0, "" }, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 25*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "1", 16, 0, 14, 14 }, + /* 26*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "1", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 27*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "A", 10, 0, 14, 14 }, + /* 28*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "A", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 29*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "\200", 6, 0, 14, 14 }, + /* 30*/ { BARCODE_DATAMATRIX, 3, { 0, 0, "" }, "\200", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 31*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "1", 24, 0, 16, 16 }, + /* 32*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "1", 25, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 33*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "A", 16, 0, 16, 16 }, + /* 34*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "A", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 35*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "\200", 10, 0, 16, 16 }, + /* 36*/ { BARCODE_DATAMATRIX, 4, { 0, 0, "" }, "\200", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 37*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "1", 36, 0, 18, 18 }, + /* 38*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 39*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "A", 25, 0, 18, 18 }, + /* 40*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 41*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "\200", 16, 0, 18, 18 }, + /* 42*/ { BARCODE_DATAMATRIX, 5, { 0, 0, "" }, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 43*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "1", 44, 0, 20, 20 }, + /* 44*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 45*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "A", 31, 0, 20, 20 }, + /* 46*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 47*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "\200", 20, 0, 20, 20 }, + /* 48*/ { BARCODE_DATAMATRIX, 6, { 0, 0, "" }, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 49*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "1", 60, 0, 22, 22 }, + /* 50*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "1", 61, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 51*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "A", 43, 0, 22, 22 }, + /* 52*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "A", 44, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 53*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "\200", 28, 0, 22, 22 }, + /* 54*/ { BARCODE_DATAMATRIX, 7, { 0, 0, "" }, "\200", 29, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 55*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "1", 72, 0, 24, 24 }, + /* 56*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "1", 73, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 57*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "A", 52, 0, 24, 24 }, + /* 58*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "A", 53, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 59*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "\200", 34, 0, 24, 24 }, + /* 60*/ { BARCODE_DATAMATRIX, 8, { 0, 0, "" }, "\200", 35, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 61*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "1", 88, 0, 26, 26 }, + /* 62*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 63*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "A", 64, 0, 26, 26 }, + /* 64*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 65*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "\200", 42, 0, 26, 26 }, + /* 66*/ { BARCODE_DATAMATRIX, 9, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 67*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "1", 124, 0, 32, 32 }, + /* 68*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 69*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "A", 91, 0, 32, 32 }, + /* 70*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 71*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "\200", 60, 0, 32, 32 }, + /* 72*/ { BARCODE_DATAMATRIX, 10, { 0, 0, "" }, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 73*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "1", 172, 0, 36, 36 }, + /* 74*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "1", 173, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 75*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "A", 127, 0, 36, 36 }, + /* 76*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "A", 128, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 77*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "\200", 84, 0, 36, 36 }, + /* 78*/ { BARCODE_DATAMATRIX, 11, { 0, 0, "" }, "\200", 85, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 79*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "1", 228, 0, 40, 40 }, + /* 80*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "1", 229, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 81*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "A", 169, 0, 40, 40 }, + /* 82*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "A", 170, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 83*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "\200", 112, 0, 40, 40 }, + /* 84*/ { BARCODE_DATAMATRIX, 12, { 0, 0, "" }, "\200", 113, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 85*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "1", 288, 0, 44, 44 }, + /* 86*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "1", 289, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 87*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "A", 214, 0, 44, 44 }, + /* 88*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "A", 215, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 89*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "\200", 142, 0, 44, 44 }, + /* 90*/ { BARCODE_DATAMATRIX, 13, { 0, 0, "" }, "\200", 143, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 91*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "1", 348, 0, 48, 48 }, + /* 92*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "1", 349, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 93*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "A", 259, 0, 48, 48 }, + /* 94*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "A", 260, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 95*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "\200", 172, 0, 48, 48 }, + /* 96*/ { BARCODE_DATAMATRIX, 14, { 0, 0, "" }, "\200", 173, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 97*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "1", 408, 0, 52, 52 }, + /* 98*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "1", 409, ZINT_ERROR_TOO_LONG, -1, -1 }, + /* 99*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "A", 304, 0, 52, 52 }, + /*100*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "A", 305, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*101*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "\200", 202, 0, 52, 52 }, + /*102*/ { BARCODE_DATAMATRIX, 15, { 0, 0, "" }, "\200", 203, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*103*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "1", 560, 0, 64, 64 }, + /*104*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "1", 561, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*105*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "A", 418, 0, 64, 64 }, + /*106*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "A", 419, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*107*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "\200", 278, 0, 64, 64 }, // Spec says 277 but 278 correct as only single byte count of 0 required + /*108*/ { BARCODE_DATAMATRIX, 16, { 0, 0, "" }, "\200", 279, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*109*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "1", 736, 0, 72, 72 }, + /*110*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "1", 737, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*111*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "A", 550, 0, 72, 72 }, + /*112*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "A", 551, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*113*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "\200", 366, 0, 72, 72 }, // Spec says 365 but 366 correct as only single byte count of 0 required + /*114*/ { BARCODE_DATAMATRIX, 17, { 0, 0, "" }, "\200", 367, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*115*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "1", 912, 0, 80, 80 }, + /*116*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "1", 913, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*117*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "A", 682, 0, 80, 80 }, + /*118*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "A", 683, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*119*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "\200", 454, 0, 80, 80 }, // Spec says 453 but 454 correct as only single byte count of 0 required + /*120*/ { BARCODE_DATAMATRIX, 18, { 0, 0, "" }, "\200", 455, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*121*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "1", 1152, 0, 88, 88 }, + /*122*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "1", 1153, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*123*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "A", 862, 0, 88, 88 }, + /*124*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "A", 863, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*125*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "\200", 574, 0, 88, 88 }, // Spec says 573 but 574 correct as only single byte count of 0 required + /*126*/ { BARCODE_DATAMATRIX, 19, { 0, 0, "" }, "\200", 575, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*127*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "1", 1392, 0, 96, 96 }, + /*128*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "1", 1393, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*129*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "A", 1042, 0, 96, 96 }, + /*130*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "A", 1043, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*131*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "\200", 694, 0, 96, 96 }, // Spec says 693 but 694 correct as only single byte count of 0 required + /*132*/ { BARCODE_DATAMATRIX, 20, { 0, 0, "" }, "\200", 695, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*133*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "1", 1632, 0, 104, 104 }, + /*134*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "1", 1633, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*135*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "A", 1222, 0, 104, 104 }, + /*136*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "A", 1223, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*137*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "\200", 814, 0, 104, 104 }, // Spec says 813 but 814 correct as only single byte count of 0 required + /*138*/ { BARCODE_DATAMATRIX, 21, { 0, 0, "" }, "\200", 815, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*139*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "1", 2100, 0, 120, 120 }, + /*140*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "1", 2101, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*141*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "A", 1573, 0, 120, 120 }, + /*142*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "A", 1574, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*143*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "\200", 1048, 0, 120, 120 }, // Spec says 1047 but 1048 correct as only single byte count of 0 required + /*144*/ { BARCODE_DATAMATRIX, 22, { 0, 0, "" }, "\200", 1049, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*145*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "1", 2608, 0, 132, 132 }, + /*146*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "1", 2609, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*147*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "A", 1954, 0, 132, 132 }, + /*148*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "A", 1955, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*149*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "\200", 1302, 0, 132, 132 }, // Spec says 1301 but 1302 correct as only single byte count of 0 required + /*150*/ { BARCODE_DATAMATRIX, 23, { 0, 0, "" }, "\200", 1303, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*151*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "1", 3116, 0, 144, 144 }, + /*152*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "1", 3117, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*153*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "A", 2335, 0, 144, 144 }, + /*154*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "A", 2336, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*155*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "\200", 1556, 0, 144, 144 }, // Spec says 1555 but 1556 correct as only single byte count of 0 required + /*156*/ { BARCODE_DATAMATRIX, 24, { 0, 0, "" }, "\200", 1557, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*157*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "1", 10, 0, 8, 18 }, + /*158*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "1", 11, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*159*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "A", 6, 0, 8, 18 }, + /*160*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "A", 7, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*161*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "\200", 3, 0, 8, 18 }, + /*162*/ { BARCODE_DATAMATRIX, 25, { 0, 0, "" }, "\200", 4, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*163*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "1", 20, 0, 8, 32 }, + /*164*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "1", 21, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*165*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "A", 13, 0, 8, 32 }, + /*166*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "A", 14, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*167*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "\200", 8, 0, 8, 32 }, + /*168*/ { BARCODE_DATAMATRIX, 26, { 0, 0, "" }, "\200", 9, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*169*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "1", 32, 0, 12, 26 }, + /*170*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "1", 33, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*171*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "A", 22, 0, 12, 26 }, + /*172*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "A", 23, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*173*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "\200", 14, 0, 12, 26 }, + /*174*/ { BARCODE_DATAMATRIX, 27, { 0, 0, "" }, "\200", 15, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*175*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "1", 44, 0, 12, 36 }, + /*176*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*177*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "A", 31, 0, 12, 36 }, + /*178*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "A", 32, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*179*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "\200", 20, 0, 12, 36 }, + /*180*/ { BARCODE_DATAMATRIX, 28, { 0, 0, "" }, "\200", 21, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*181*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "1", 64, 0, 16, 36 }, + /*182*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*183*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "A", 46, 0, 16, 36 }, + /*184*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*185*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "\200", 30, 0, 16, 36 }, + /*186*/ { BARCODE_DATAMATRIX, 29, { 0, 0, "" }, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*187*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "1", 98, 0, 16, 48 }, + /*188*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*189*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "A", 72, 0, 16, 48 }, + /*190*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*191*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "\200", 47, 0, 16, 48 }, + /*192*/ { BARCODE_DATAMATRIX, 30, { 0, 0, "" }, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*193*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "1", 36, 0, 8, 48 }, + /*194*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "1", 37, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*195*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "A", 25, 0, 8, 48 }, + /*196*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "A", 26, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*197*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "\200", 16, 0, 8, 48 }, + /*198*/ { BARCODE_DATAMATRIX, 31, { 0, 0, "" }, "\200", 17, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*199*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "1", 48, 0, 8, 64 }, + /*200*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "1", 49, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*201*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "A", 34, 0, 8, 64 }, + /*202*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "A", 35, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*203*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "\200", 22, 0, 8, 64 }, + /*204*/ { BARCODE_DATAMATRIX, 32, { 0, 0, "" }, "\200", 23, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*205*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "1", 64, 0, 8, 80 }, + /*206*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "1", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*207*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "A", 46, 0, 8, 80 }, + /*208*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*209*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "\200", 30, 0, 8, 80 }, + /*210*/ { BARCODE_DATAMATRIX, 33, { 0, 0, "" }, "\200", 31, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*211*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "1", 76, 0, 8, 96 }, + /*212*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "1", 77, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*213*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "A", 55, 0, 8, 96 }, + /*214*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "A", 56, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*215*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "\200", 36, 0, 8, 96 }, + /*216*/ { BARCODE_DATAMATRIX, 34, { 0, 0, "" }, "\200", 37, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*217*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "1", 98, 0, 8, 120 }, + /*218*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "1", 99, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*219*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "A", 72, 0, 8, 120 }, + /*220*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "A", 73, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*221*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "\200", 47, 0, 8, 120 }, + /*222*/ { BARCODE_DATAMATRIX, 35, { 0, 0, "" }, "\200", 48, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*223*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "1", 126, 0, 8, 144 }, + /*224*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "1", 127, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*225*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "A", 93, 0, 8, 144 }, + /*226*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "A", 94, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*227*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "\200", 61, 0, 8, 144 }, + /*228*/ { BARCODE_DATAMATRIX, 36, { 0, 0, "" }, "\200", 62, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*229*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "1", 86, 0, 12, 64 }, + /*230*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "1", 87, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*231*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "A", 63, 0, 12, 64 }, + /*232*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "A", 64, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*233*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "\200", 41, 0, 12, 64 }, + /*234*/ { BARCODE_DATAMATRIX, 37, { 0, 0, "" }, "\200", 42, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*235*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "1", 128, 0, 12, 88 }, + /*236*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "1", 129, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*237*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "A", 94, 0, 12, 88 }, + /*238*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "A", 95, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*239*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "\200", 62, 0, 12, 88 }, + /*240*/ { BARCODE_DATAMATRIX, 38, { 0, 0, "" }, "\200", 63, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*241*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "1", 124, 0, 16, 64 }, + /*242*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "1", 125, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*243*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "A", 91, 0, 16, 64 }, + /*244*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "A", 92, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*245*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "\200", 60, 0, 16, 64 }, + /*246*/ { BARCODE_DATAMATRIX, 39, { 0, 0, "" }, "\200", 61, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*247*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "1", 88, 0, 20, 36 }, + /*248*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*249*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "A", 64, 0, 20, 36 }, + /*250*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*251*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "\200", 42, 0, 20, 36 }, + /*252*/ { BARCODE_DATAMATRIX, 40, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*253*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "1", 112, 0, 20, 44 }, + /*254*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "1", 113, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*255*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "A", 82, 0, 20, 44 }, + /*256*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "A", 83, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*257*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "\200", 54, 0, 20, 44 }, + /*258*/ { BARCODE_DATAMATRIX, 41, { 0, 0, "" }, "\200", 55, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*259*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "1", 168, 0, 20, 64 }, // Spec says 186 but typo + /*260*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "1", 169, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*261*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "A", 124, 0, 20, 64 }, + /*262*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "A", 125, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*263*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "\200", 82, 0, 20, 64 }, + /*264*/ { BARCODE_DATAMATRIX, 42, { 0, 0, "" }, "\200", 83, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*265*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "1", 144, 0, 22, 48 }, + /*266*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "1", 145, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*267*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "A", 106, 0, 22, 48 }, + /*268*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "A", 107, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*269*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "\200", 70, 0, 22, 48 }, + /*270*/ { BARCODE_DATAMATRIX, 43, { 0, 0, "" }, "\200", 71, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*271*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "1", 160, 0, 24, 48 }, + /*272*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "1", 161, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*273*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "A", 118, 0, 24, 48 }, + /*274*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "A", 119, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*275*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "\200", 78, 0, 24, 48 }, + /*276*/ { BARCODE_DATAMATRIX, 44, { 0, 0, "" }, "\200", 79, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*277*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "1", 216, 0, 24, 64 }, + /*278*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "1", 217, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*279*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "A", 160, 0, 24, 64 }, + /*280*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "A", 161, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*281*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "\200", 106, 0, 24, 64 }, + /*282*/ { BARCODE_DATAMATRIX, 45, { 0, 0, "" }, "\200", 107, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*283*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "1", 140, 0, 26, 40 }, + /*284*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "1", 141, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*285*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "A", 103, 0, 26, 40 }, + /*286*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "A", 104, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*287*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "\200", 68, 0, 26, 40 }, + /*288*/ { BARCODE_DATAMATRIX, 46, { 0, 0, "" }, "\200", 69, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*289*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "1", 180, 0, 26, 48 }, + /*290*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "1", 181, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*291*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "A", 133, 0, 26, 48 }, + /*292*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "A", 134, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*293*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "\200", 88, 0, 26, 48 }, + /*294*/ { BARCODE_DATAMATRIX, 47, { 0, 0, "" }, "\200", 89, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*295*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "1", 236, 0, 26, 64 }, + /*296*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "1", 237, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*297*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "A", 175, 0, 26, 64 }, + /*298*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "A", 176, ZINT_ERROR_TOO_LONG, -1, -1 }, + /*299*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "\200", 116, 0, 26, 64 }, + /*300*/ { BARCODE_DATAMATRIX, 48, { 0, 0, "" }, "\200", 117, ZINT_ERROR_TOO_LONG, -1, -1 }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; struct zint_symbol *symbol; - char data_buf[3118]; + char data_buf[ZINT_MAX_DATA_LEN]; testStart("test_large"); @@ -379,6 +380,15 @@ static void test_large(int index, int debug) { assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width); } + symbol->input_mode |= FAST_MODE; + 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); + + if (ret < ZINT_ERROR) { + assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows); + assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width); + } + ZBarcode_Delete(symbol); } @@ -450,30 +460,97 @@ static void test_options(int index, int debug) { /* 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 + /* 6*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "____", 0, 12, 12, "" }, // 4 data + /* 7*/ { BARCODE_DATAMATRIX, -1, -1, 1, -1, -1, { 0, 0, "" }, "____", ZINT_ERROR_TOO_LONG, -1, -1, "Error 522: Input too long for selected symbol size" }, + /* 8*/ { BARCODE_DATAMATRIX, -1, -1, 25, -1, -1, { 0, 0, "" }, "____", 0, 8, 18, "" }, + /* 9*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "__________", 0, 8, 32, "" }, // 10 data + /* 10*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "__________", 0, 8, 32, "" }, + /* 11*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "__________", 0, 16, 16, "" }, + /* 12*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_______________", 0, 12, 26, "" }, // 15 data + /* 13*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_______________", 0, 12, 26, "" }, + /* 14*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_______________", 0, 18, 18, "" }, + /* 15*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "__________________", 0, 18, 18, "" }, // 18 data + /* 16*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "___________________", 0, 20, 20, "" }, // 19 data + /* 17*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_____________________", 0, 20, 20, "" }, // 21 data + /* 18*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_______________________", 0, 22, 22, "" }, // 23 data + /* 19*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_______________________", 0, 8, 64, "" }, + /* 20*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_______________________", 0, 22, 22, "" }, + /* 21*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_______________________________", 0, 16, 36, "" }, // 31 data + /* 22*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_______________________________", 0, 16, 36, "" }, + /* 23*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_______________________________", 0, 24, 24, "" }, + /* 24*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_____________________________________", 0, 26, 26, "" }, // 37 data + /* 25*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_____________________________________", 0, 8, 96, "" }, + /* 26*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_____________________________________", 0, 26, 26, "" }, + /* 27*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_______________________________________", 0, 26, 26, "" }, // 39 data + /* 28*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_______________________________________", 0, 12, 64, "" }, + /* 29*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_______________________________________", 0, 26, 26, "" }, + /* 30*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "___________________________________________", 0, 26, 26, "" }, // 43 data + /* 31*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "___________________________________________", 0, 12, 64, "" }, + /* 32*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "___________________________________________", 0, 26, 26, "" }, + /* 33*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "____________________________________________", 0, 26, 26, "" }, // 44 data + /* 34*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_____________________________________________", 0, 16, 48, "" }, // 45 data + /* 35*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_____________________________________________", 0, 16, 48, "" }, + /* 36*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_____________________________________________", 0, 32, 32, "" }, + /* 37*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_________________________________________________", 0, 16, 48, "" }, // 49 data + /* 38*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_________________________________________________", 0, 16, 48, "" }, + /* 39*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_________________________________________________", 0, 32, 32, "" }, + /* 40*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "__________________________________________________", 0, 32, 32, "" }, // 50 data + /* 41*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "__________________________________________________", 0, 20, 44, "" }, + /* 42*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "__________________________________________________", 0, 32, 32, "" }, + /* 43*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 32, 32, "" }, // 51 data + /* 44*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 20, 44, "" }, + /* 45*/ { BARCODE_DATAMATRIX, -1, -1, -1, 9999, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU", 0, 32, 32, "" }, // Ignored + /* 46*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_____________________________________________________________", 0, 32, 32, "" }, // 61 data + /* 47*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "______________________________________________________________", 0, 32, 32, "" }, // 62 data + /* 48*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_______________________________________________________________", 0, 36, 36, "" }, // 63 data + /* 49*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_______________________________________________________________", 0, 8, 144, "" }, + /* 50*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_______________________________________________________________", 0, 36, 36, "" }, + /* 51*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "________________________________________________________________", 0, 36, 36, "" }, // 64 data + /* 52*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "________________________________________________________________", 0, 12, 88, "" }, + /* 53*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "________________________________________________________________", 0, 36, 36, "" }, + /* 54*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_________________________________________________________________", 0, 36, 36, "" }, // 65 data + /* 55*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_________________________________________________________________", 0, 26, 40, "" }, + /* 56*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_________________________________________________________________", 0, 36, 36, "" }, + /* 57*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "______________________________________________________________________", 0, 36, 36, "" }, // 70 data + /* 58*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "______________________________________________________________________", 0, 26, 40, "" }, + /* 59*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "______________________________________________________________________", 0, 36, 36, "" }, + /* 60*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "_______________________________________________________________________", 0, 36, 36, "" }, // 71 data + /* 61*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "_______________________________________________________________________", 0, 22, 48, "" }, + /* 62*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "_______________________________________________________________________", 0, 36, 36, "" }, + /* 63*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "________________________________________________________________________________", 0, 36, 36, "" }, // 80 data + /* 64*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "________________________________________________________________________________", 0, 24, 48, "" }, + /* 65*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "________________________________________________________________________________", 0, 36, 36, "" }, + /* 66*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "____________________________________________________________________________________", 0, 36, 36, "" }, // 84 data + /* 67*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "____________________________________________________________________________________", 0, 20, 64, "" }, + /* 68*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "____________________________________________________________________________________", 0, 36, 36, "" }, + /* 69*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "__________________________________________________________________________________________", 0, 40, 40, "" }, // 90 data + /* 70*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "__________________________________________________________________________________________", 0, 26, 48, "" }, + /* 71*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "__________________________________________________________________________________________", 0, 40, 40, "" }, + /* 72*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "___________________________________________________________________________________________", 0, 40, 40, "" }, // 91 data + /* 73*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "___________________________________________________________________________________________", 0, 24, 64, "" }, + /* 74*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "___________________________________________________________________________________________", 0, 40, 40, "" }, + /* 75*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 0, 0, "" }, "______________________________________________________________________________________________________________________", 0, 44, 44, "" }, // 118 data + /* 76*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_DMRE, -1, { 0, 0, "" }, "______________________________________________________________________________________________________________________", 0, 26, 64, "" }, // 118 data + /* 77*/ { BARCODE_DATAMATRIX, -1, -1, -1, DM_SQUARE, -1, { 0, 0, "" }, "______________________________________________________________________________________________________________________", 0, 44, 44, "" }, // 118 data + /* 78*/ { BARCODE_DATAMATRIX, GS1_MODE, -1, -1, -1, -1, { 0, 0, "" }, "[90]12", 0, 10, 10, "" }, + /* 79*/ { BARCODE_DATAMATRIX, GS1_MODE | GS1PARENS_MODE, -1, -1, -1, -1, { 0, 0, "" }, "(90)12", 0, 10, 10, "" }, + /* 80*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 1, 2, "" }, "1", 0, 12, 12, "" }, + /* 81*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 16, 16, "" }, "1", 0, 12, 12, "" }, + /* 82*/ { 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)" }, + /* 83*/ { 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)" }, + /* 84*/ { 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)" }, + /* 85*/ { 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)" }, + /* 86*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, { 2, 3, "1001" }, "1", 0, 12, 12, "" }, + /* 87*/ { 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)" }, + /* 88*/ { 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')" }, + /* 89*/ { 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')" }, + /* 90*/ { 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')" }, + /* 91*/ { 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')" }, + /* 92*/ { 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')" }, + /* 93*/ { 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')" }, + /* 94*/ { 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)" }, + /* 95*/ { 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" }, + /* 96*/ { 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; @@ -503,6 +580,16 @@ static void test_options(int index, int debug) { } assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d symbol->errtxt %s != %s\n", i, symbol->errtxt, data[i].expected_errtxt); + symbol->input_mode |= FAST_MODE; + ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length); + assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode FAST_MODE ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); + + if (ret < ZINT_ERROR) { + assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows); + assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width); + } + 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); } @@ -567,6 +654,9 @@ static void test_reader_init(int index, int generate, int debug) { testFinish(); } +STATIC_UNLESS_ZINT_TEST int dm_encode(struct zint_symbol *symbol, const unsigned char source[], + unsigned char target[], int *p_length, int *p_binlen); + static void test_input(int index, int generate, int debug) { struct item { @@ -585,119 +675,249 @@ static void test_input(int index, int generate, int debug) { char *expected; char *comment; - int expected_diff; // Check minimize only (TODO: remove in the not-too-distant future) + int expected_diff; // Difference between default minimal encodation and ISO encodation (FAST_MODE) }; struct item data[] = { - /* 0*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 93 B0 1C 3C 76 FB D4 AB 16 11", "#208", 0 }, - /* 1*/ { UNICODE_MODE, 0, 5, -1, -1, "0466010592130100000k*AGUATY80", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 93 B0 1C 3C 76 FB D4 AB 16 11", "", 0 }, - /* 2*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY8", 0, 0, 18, 18, 0, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C E6 07 B7 82 5F D4 3D 08 EB 60 DA B1 82 72 50 A9 5B", "BWIPP different encodation (earlier change to C40)", 0 }, - /* 3*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80U", 0, 0, 20, 20, 1, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 FE 56 81 76 4F AB 22 B8 6F 0A", "", 0 }, - /* 4*/ { UNICODE_MODE, 0, 5, -1, -1, "0466010592130100000k*AGUATY80U", ZINT_ERROR_TOO_LONG, -1, 0, 0, 0, "Error 522: Input too long for selected symbol size", "", 0 }, - /* 5*/ { UNICODE_MODE, 0, 6, -1, -1, "0466010592130100000k*AGUATY80U", 0, 0, 20, 20, 1, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 FE 56 81 76 4F AB 22 B8 6F 0A", "", 0 }, - /* 6*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80UA", 0, 0, 20, 20, 1, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C E6 07 B7 82 5F D4 3D 1E 5F FE 81 1E 1B B0 FE E7 54", "", 0 }, - /* 7*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>", 0, 0, 14, 14, 1, "EE 0C A9 0C A9 FE 3F 81 42 B2 11 A8 F9 0A EC C1 1E 41", "X12 symbols_left 3, process_p 1", 0 }, - /* 8*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>*", 0, 0, 14, 14, 1, "EE 0C A9 0C A9 FE 3F 2B 3F 05 D2 10 1B 9A 55 2F 68 C5", "X12 symbols_left 3, process_p 2", 0 }, - /* 9*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>*\015", 0, 0, 14, 14, 1, "EE 0C A9 0C A9 0C A9 FE 1F 30 3F EE 45 C1 1C D7 5F 7E", "X12 symbols_left 1, process_p 0", 0 }, - /* 10*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEF", 0, 0, 12, 12, 1, "E6 59 E9 6D 24 3D 15 EF AA 21 F9 59", "C40 symbols_left 0, process_p 0", 0 }, - /* 11*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 FE 48 81 8C 7E 09 5E 10 64 BC 5F 4C 91", "C40 symbols_left 3, process_p 1", 0 }, - /* 12*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 FE 48 49 2E 31 00 73 3B 8F 4B 55 93 19", "C40 symbols_left 3, process_p 2", 0 }, - /* 13*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHI", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 80 5F FE 01 DE 20 9F AA C2 FF 8F 08 97", "C40 symbols_left 1, process_p 0", 0 }, - /* 14*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJ", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 80 5F 4B AD 47 09 12 FF 2F 95 CA 5B 4A", "C40 symbols_left 1, process_p 1", 0 }, - /* 15*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJK", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 4B 4C D8 69 88 60 B9 33 B9 31 E6 BF CA", "C40 symbols_left 3, process_p 2", 0 }, - /* 16*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEF\001G", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 00 3D FE 5D 5A F5 0A 8A 4E 1D 63 07 B9", "C40 symbols_left 1, process_p 0", 0 }, - /* 17*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG\001", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 02 FE 14 A3 27 63 01 2F B1 94 FE FA", "C40 symbols_left 1, process_p 0", 0 }, - /* 18*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG\001H", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 02 49 C2 E6 DD 06 89 51 BA 8E 9D 1F", "C40 symbols_left 1, process_p 1", 0 }, - /* 19*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH\001", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 02 81 BD 6D F3 94 FF 82 A6 BF BB F1 4F", "C40 symbols_left 1, process_p 1, backtracks", 0 }, - /* 20*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH\001", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 02 81 FB 93 AE 8B 1C 90 DF FE EB C5 A0 2A 6A 4F", "C40 symbols_left 1, process_p 1, backtracks", 0 }, - /* 21*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH\001I", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 02 4A E1 0D DD BC 56 E4 66 52 E6 AE 02", "C40 symbols_left 3, process_p 2, backtracks", 0 }, - /* 22*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH\001I", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 02 4A 81 93 51 DF C0 0C D3 F9 72 13 17 52 5B 7E", "C40 symbols_left 5, process_p 2, backtracks", 0 }, - /* 23*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHI\001", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 02 81 47 6C 3E 49 D3 FA 46 47 53 6E E5", "Switches to ASC for last char", 0 }, - /* 24*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHI\001", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 02 81 FB 93 33 E3 4F F7 2D 08 8A BF 64 C3 B0 26", "Switches to ASC for last char", 0 }, - /* 25*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH\001I\001", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 02 4A 02 81 BD 5D C0 B9 09 25 87 3A 09 23 9D C0", "C40 symbols_left 1, process_p 1, backtracks 2", 0 }, - /* 26*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEF+G", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 07 E5 FE 6B 35 71 7F 3D 57 59 46 F7 B9", "C40 symbols_left 1, process_p 0", 0 }, - /* 27*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG+", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 33 FE 33 F5 97 60 73 48 13 2E E5 74", "C40 symbols_left 1, process_p 0", 0 }, - /* 28*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG+H", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 33 49 E5 B0 6D 05 FB 36 18 34 86 91", "C40 symbols_left 1, process_p 1", 0 }, - /* 29*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH+", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 2C 81 02 BD 40 CF 3B 06 C2 DF 36 E0 48", "C40 symbols_left 1, process_p 1, backtracks", 0 }, - /* 30*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH+", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 2C 81 FB 93 F6 78 B5 69 0B 83 C6 32 62 1A D2 FF", "C40 symbols_left 1, process_p 1, backtracks", 0 }, - /* 31*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH+I", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 2C 4A 5E DD 6E E7 92 60 02 32 6B BF 05", "C40 symbols_left 3, process_p 2, backtracks", 0 }, - /* 32*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH+I", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 2C 4A 81 93 09 2C 69 F5 07 84 5F E4 D5 62 E3 CE", "C40 symbols_left 5, process_p 2, backtracks", 0 }, - /* 33*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHI+", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 2C 81 F8 BC 8D 12 17 7E 22 27 DE 7F E2", "C40 symbols_left 3, process_p 2, backtracks", 0 }, - /* 34*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHI+", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 2C 81 FB 93 6B 10 E6 0E F9 75 A7 48 A6 F3 08 96", "Switches to ASC for last char", 0 }, - /* 35*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFjG", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 0E 25 FE DA 14 D7 15 47 69 9D 4A 54 6D", "C40 symbols_left 1, process_p 0", 0 }, - /* 36*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGj", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 5B FE B5 F3 24 0A 99 26 D6 CC A8 40", "C40 symbols_left 1, process_p 0", 0 }, - /* 37*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGjH", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 5B 49 63 B6 DE 6F 11 58 DD D6 CB A5", "C40 symbols_left 1, process_p 1", 0 }, - /* 38*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHj", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 6B 81 ED 78 CB 9F 52 EE 52 88 91 67 96", "C40 symbols_left 1, process_p 1, backtracks", 0 }, - /* 39*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHj", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 6B 81 FB 93 BF 72 03 35 09 37 98 FF 39 A7 E3 6D", "C40 symbols_left 1, process_p 1, backtracks", 0 }, - /* 40*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHjI", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 6B 4A B1 18 E5 B7 FB 88 92 65 CC 38 DB", "C40 symbols_left 3, process_p 2, backtracks", 0 }, - /* 41*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHjI", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 6B 4A 81 93 40 26 DF A9 05 30 01 29 8E DF D2 5C", "C40 symbols_left 5, process_p 2, backtracks", 0 }, - /* 42*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIj", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 6B 81 17 79 06 42 7E 96 B2 70 79 F8 3C", "Switches to ASC for last char", 0 }, - /* 43*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJÊ", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 4B EB 4B 81 DD D9 F9 C9 C5 38 F3 4B DB 80 92 A7", "Switches to ASC for last 2 chars", 0 }, - /* 44*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKÊ", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 4B 4C EB 4B 15 17 46 06 70 F3 15 74 45 26 72 2D", "C40 symbols_left 3, process_p 2, backtracks", 0 }, - /* 45*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKª", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F 93 82 BB B2 FE 11 5C 60 32 A6 DE FC 7B 30 F1 03 56", "C40 symbols_left 1, process_p 0", 0 }, - /* 46*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKê", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F 93 82 BB DB FE 78 43 69 3C C2 FE F5 2E 1B 4F B6 04", "C40 symbols_left 1, process_p 0", 0 }, - /* 47*/ { GS1_MODE, 0, -1, -1, -1, "[10]ABCDEFGH[10]ABc", 0, 0, 12, 26, 1, "E8 8C E6 59 E9 6D 24 80 4A A9 8D FE 42 43 64 81 83 B4 8F 6B 95 F6 CE A6 3C 5C 77 86 08 50", "C40 symbols_left 3, process_p 1, backtracks", 0 }, - /* 48*/ { GS1_MODE, 0, -1, -1, GS1_GS_SEPARATOR, "[10]ABCDEFGH[10]ABc", 0, 0, 12, 26, 1, "E8 8C E6 59 E9 6D 24 80 49 B6 0D FE 42 43 64 81 79 E4 20 33 76 5C C7 23 E6 C5 FA 4C FF 88", "C40 symbols_left 3, process_p 1, backtracks", 0 }, - /* 49*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdef", 0, 0, 12, 12, 1, "EF 59 E9 6D 24 E2 CC D9 B4 55 E2 6A", "TEX symbols_left 0, process_p 0", 0 }, - /* 50*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefg", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 FE 68 81 A9 65 CD 3A A2 E9 E0 B7 E1 E5", "TEX symbols_left 3, process_p 1", 0 }, - /* 51*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 FE 68 69 68 36 28 3C 85 5A E9 D4 49 9A", "TEX symbols_left 3, process_p 2", 0 }, - /* 52*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghi", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 80 5F FE DA BF FA 16 71 15 22 4D E3 F3", "TEX symbols_left 1, process_p 0", 0 }, - /* 53*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdef\001g", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 00 3D FE 86 3B 2F 83 51 99 C0 A1 EC DD", "TEX symbols_left 1, process_p 0", 0 }, - /* 54*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefg\001", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 02 FE CF C2 FD EA DA F8 6C 56 15 9E", "TEX symbols_left 1, process_p 0", 0 }, - /* 55*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefg\001h", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 02 69 7A 9B EB A4 5E DE 99 25 01 8C", "TEX symbols_left 1, process_p 1", 0 }, - /* 56*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh\001", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 02 81 EB 84 25 32 6E 1B 5A FB 1D 25 4A", "TEX symbols_left 1, process_p 1, backtracks", 0 }, - /* 57*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefgh\001", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 02 81 FB 93 93 FD 1E 3B BA 1D 16 4D 59 41 EC B9", "TEX symbols_left 1, process_p 1, backtracks", 0 }, - /* 58*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh\001i", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 02 6A 31 35 48 9B 93 6E 15 BB 02 9D F4", "TEX symbols_left 3, process_p 2, backtracks", 0 }, - /* 59*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefgh\001i", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 02 6A 81 93 DE D7 EC 9B 7D 72 9C 68 B8 6E CF 31", "TEX symbols_left 3, process_p 2, backtracks", 0 }, - /* 60*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghi\001", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 80 5F FE 02 81 4D AB 30 86 CD D1 9D F3 15 F5 B1", "Switches to ASC for last char", 0 }, - /* 61*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh\001i\001", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 02 6A 02 81 32 55 EC 2E A7 AE 69 41 A6 1F 09 8F", "TEX symbols_left 1, process_p 1, backtracks 2", 0 }, - /* 62*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefJg", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 0E 25 FE 01 75 0D 9C 9C BE 40 88 BF 09", "TEX symbols_left 1, process_p 0", 0 }, - /* 63*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgJ", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 5B FE 6E 92 FE 83 42 F1 0B 0E 43 24", "TEX symbols_left 1, process_p 0", 0 }, - /* 64*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgJh", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 5B 69 DB CB E8 CD C6 D7 FE 7D 57 36", "TEX symbols_left 1, process_p 1", 0 }, - /* 65*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghJ", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 4B 81 15 8A 35 57 7F 33 B3 48 01 E0 BD", "TEX symbols_left 1, process_p 1, backtracks", 0 }, - /* 66*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefghJ", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 4B 81 FB 93 5B D4 D2 8B EE 85 F2 3E 3F 8E E5 04", "TEX symbols_left 1, process_p 1, backtracks", 0 }, - /* 67*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghJi", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 4B 6A CF 3B 58 FE 82 46 FC 08 1E 58 03", "TEX symbols_left 3, process_p 2, backtracks", 0 }, - /* 68*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefghJi", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 4B 6A 81 93 16 FE 20 2B 29 EA 78 1B DE A1 C6 8C", "TEX symbols_left 3, process_p 2, backtracks", 0 }, - /* 69*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghiJ", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 80 5F FE 4B 81 B3 A5 20 E3 DC F9 74 40 09 30 46", "Switches to ASC for last char", 0 }, - /* 70*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghijkÊ", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 80 5F 93 82 BB DB FE 3E C8 EC 73 58 A7 42 46 10 49 25 99", "TEX symbols_left 1, process_p 0", 0 }, - /* 71*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghijkª", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 80 5F 93 82 BB B2 FE 57 D7 E5 7D 3C 87 4B 13 3B F7 90 CB", "TEX symbols_left 1, process_p 0", 0 }, - /* 72*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghijkê", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 80 5F FE 6B 6C EB 6B 59 43 1A B1 96 F4 FF C5 B5 08 AE 2F", "TEX symbols_left 3, process_p 2, backtracks", 0 }, - /* 73*/ { GS1_MODE, 0, -1, -1, -1, "[10]abcdefgh[10]abC", 0, 0, 12, 26, 1, "E8 8C EF 59 E9 6D 24 80 4A A9 8D FE 62 63 44 81 88 DC 73 33 70 A1 83 EA 50 CB 4E 17 90 DB", "TEX symbols left 3, process_p 1, backtracks", 0 }, - /* 74*/ { GS1_MODE, 0, -1, -1, GS1_GS_SEPARATOR, "[10]abcdefgh[10]abC", 0, 0, 12, 26, 1, "E8 8C EF 59 E9 6D 24 80 49 B6 0D FE 62 63 44 81 72 8C DC 6B 93 0B 8A 6F 8A 52 C3 DD 67 03", "TEX symbols left 3, process_p 1, backtracks", 0 }, - /* 75*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>", 0, 0, 12, 12, 1, "EE 00 2B 00 2B 83 3B 0A CE 32 36 65", "X12 symbols_left 0, process_p 0", 0 }, - /* 76*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015", 0, 0, 14, 14, 1, "EE 00 2B 00 2B FE 0E 81 C0 6C BF 37 F6 D6 48 71 E2 38", "Switches to ASC for last char", 0 }, - /* 77*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*", 0, 0, 14, 14, 1, "EE 00 2B 00 2B FE 0E 2B BD DB 7C 8F 14 46 F1 9F 94 BC", "Switches to ASC for last 2 chars", 0 }, - /* 78*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>", 0, 0, 14, 14, 1, "EE 00 2B 00 2B 00 2B FE BF 81 70 74 1C 65 10 0C 06 38", "X12 symbols_left 1, process_p 0, ASC unlatch at end", 0 }, - /* 79*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015", 0, 0, 14, 14, 1, "EE 00 2B 00 2B 00 2B 0E 1C DB D8 26 3E EC CF 9C C3 4A", "X12 symbols_left 1, process_p 1, ASC no latch at end", 0 }, - /* 80*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015*", 0, 0, 8, 32, 1, "EE 00 2B 00 2B 00 2B FE 0E 2B 65 37 5F 2F F3 96 BE 9A 03 55 68", "X12 symbols_left 3, process_p 2, ASC last 2 chars", 0 }, - /* 81*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015*>", 0, 0, 8, 32, 1, "EE 00 2B 00 2B 00 2B 00 2B FE 6E 95 3A 10 58 4E 96 06 79 09 94", "X12 symbols_left 1, process_p 0, ASC unlatch at end", 0 }, - /* 82*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C", 0, 0, 14, 14, 1, "F0 00 1C 5E 0B 2F C3 81 2D 71 45 13 9B FF A1 B0 0B E2", "EDIFACT symbols_left 1, process_p 0", 0 }, - /* 83*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3", 0, 0, 14, 14, 1, "F0 00 1C 5E 0B 2F C3 34 81 E8 6C 9E CE 12 CB F5 58 3F", "EDIFACT symbols_left 1, process_p 1", 0 }, - /* 84*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B7 C0 33 C6 81 E1 63 6E 5E B4 27 30 C9", "EDIFACT symbols_left 3, process_p 2", 0 }, - /* 85*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B1 1F 4D E1 79 04 2B BC 05 6C 38 73 39", "EDIFACT symbols_left 3, process_p 3", 0 }, - /* 86*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B1 34 F4 EC B3 DC 03 A3 1F B5 86 C3 F7", "EDIFACT symbols_left 0, process_p 0", 0 }, - /* 87*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4=", 0, 0, 16, 16, 1, "F0 00 1C 5E 0B 2F C3 CE B1 34 3E 81 42 96 43 6E 92 0D A9 B1 65 3C CF 9B", "EDIFACT symbols_left 2, process_p 1", 0 }, - /* 88*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4=E", 0, 0, 16, 16, 1, "F0 00 1C 5E 0B 2F C3 CE B1 34 3E 46 AD 8C F2 D8 5D AF F3 65 08 1F E3 A5", "EDIFACT symbols_left 2, process_p 2", 0 }, - /* 89*/ { DATA_MODE, 0, -1, -1, -1, "\377\376", 0, 0, 12, 12, 1, "EB 80 EB 7F 81 6F A8 0F 21 6F 5F 88", "FN4 A7F FN4 A7E, 1 pad", 0 }, - /* 90*/ { DATA_MODE, 0, -1, -1, -1, "\377\376\375", 0, 0, 12, 12, 1, "E7 2C C0 55 E9 67 45 8A D2 7E A9 23", "BAS BFF BFE BFD, no padding", 0 }, - /* 91*/ { DATA_MODE, 3, -1, -1, -1, "\101\102\103\104\300\105\310", 0, 3, 16, 16, 0, "F1 04 42 43 E7 87 5B F1 03 1D 36 81 2C E3 87 24 2D FD 69 9C 87 FA 8A 73", "ECI 4 ASC A41 A42 BAS B43 B44 BC0 B45 BC8; BWIPP different encodation (uses only B256, same no. of codewords)", 0 }, - /* 92*/ { UNICODE_MODE, 26, -1, -1, -1, "ABCDÀEÈ", 0, 26, 12, 26, 1, "F1 1B E7 60 2D C4 5B F1 06 58 B3 C7 21 81 57 ED 3D C0 12 2E 6C 80 58 CC 2C 05 0D 31 FC 2D", "ECI 27 BAS B41 B42 B43 B44 BC3 B80 B45 BC3 B88", 0 }, - /* 93*/ { UNICODE_MODE, 0, -1, -1, -1, "β", ZINT_WARN_USES_ECI, 9, 12, 12, 1, "Warning F1 0A EB 63 81 41 56 DA C0 3D 2D CC", "ECI 10 FN4 A62", 0 }, - /* 94*/ { UNICODE_MODE, 127, -1, -1, -1, "A", 0, 127, 12, 12, 1, "F1 80 01 42 81 14 A2 86 07 F5 27 30", "ECI 128 A41", 0 }, - /* 95*/ { UNICODE_MODE, 16382, -1, -1, -1, "A", 0, 16382, 12, 12, 1, "F1 BF FE 42 81 29 57 AA A0 92 B2 45", "ECI 16383 A41", 0 }, - /* 96*/ { UNICODE_MODE, 810899, -1, -1, -1, "A", 0, 810899, 12, 12, 1, "F1 CC 51 05 42 BB A5 A7 8A C6 6E 0F", "ECI 810900 A41", 0 }, - /* 97*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R05\\GA\\R\\E", 0, 0, 10, 10, 1, "EC 42 81 5D 17 49 F6 B6", "Macro05 A41", 0 }, - /* 98*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKLM*", 0, 0, 16, 16, 1, "EE 59 E9 6D 24 80 5F 93 9A FE 4E 2B 09 FF 50 A2 83 BE 32 E1 2F 17 1E F3", "C40 == X12, p_r_6_2_1 true", 0 }, - /* 99*/ { UNICODE_MODE, 0, -1, -1, -1, "\015\015\015\015\015\015\015\015\015a\015\015\015\015\015\015\015", 0, 0, 12, 26, 1, "EE 00 01 00 01 00 01 FE 62 EE 00 01 00 01 FE 0E B5 9A 73 85 83 20 23 2C E0 EC EC BF 71 E0", "a not X12 encodable", 0 }, - /*100*/ { UNICODE_MODE, 0, -1, -1, -1, ".........a.......", 0, 0, 18, 18, 0, "(32) F0 BA EB AE BA EB AE B9 F0 62 2F 2F 2F 2F 2F 2F 2F 81 78 BE 1F 90 B8 89 73 66 DC BD", "a not EDIFACT encodable; BWIPP different encodation (switches to ASCII one dot before)", 0 }, - /*101*/ { GS1_MODE, 0, -1, -1, -1, "[90]........[91]....", 0, 0, 12, 26, 1, "E8 DC 2F 2F 2F 2F 2F 2F 2F 2F E8 DD 2F 2F 2F 2F C6 CC 13 68 0D 9D A9 A5 B8 D5 5A F3 7B 18", "Can't use GS1 EDIFACT if contains FNC1/GS", 0 }, - /*102*/ { GS1_MODE, 0, -1, -1, -1, "[90]........", 0, 0, 8, 32, 1, "E8 DC F0 BA EB AE BA EB AE 81 B1 C0 AB DA A5 92 AF E2 05 DE 56", "Can use GS1 EDIFACT if no FNC1/GS", 0 }, - /*103*/ { GS1_MODE, 0, -1, -1, -1, "[90]ABCDEFGH[91]ABCD", 0, 0, 12, 26, 1, "E8 DC E6 59 E9 6D 24 80 4A AA CE 59 E9 FE 45 81 6A 05 49 36 67 C8 00 DE 35 29 C5 9A 17 EA", "GS1 C40 ok", 0 }, - /*104*/ { GS1_MODE, 0, -1, -1, -1, "[90]ABCD", 0, 0, 14, 14, 1, "E8 DC 42 43 44 45 81 38 98 32 8C 23 4D 87 5A 95 04 A7", "Final ASC unlatch", 0 }, - /*105*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>......", 0, 0, 12, 26, 0, "EE 0C A9 0C A9 FE 3F 2F 2F 2F 2F 2F 2F 81 57 ED 0F 29 C7 9D 5D 64 61 94 14 CD A8 DF 65 8D", "X12 then ASC; BWIPP switches to ASCII earlier", 1 }, - /*106*/ { UNICODE_MODE, 0, 4, -1, -1, "ABCDEFGH", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 81 65 FB 93 F7 A4 EA B0 37 00 4F 4C 8A 99 0B 69", "", 0 }, - /*107*/ { UNICODE_MODE, 0, 26, -1, -1, "@@@@@@@@@_", 0, 0, 8, 32, 0, "F0 00 00 00 00 00 1F 41 41 60 63 50 E0 FE 8B 46 16 38 FE 58 AD", "BWIPP switches to ASCII later", 0 }, - /*108*/ { UNICODE_MODE, 0, 4, -1, -1, "@@@@@@@@@_", 0, 0, 16, 16, 0, "F0 00 00 00 00 00 1F 41 41 60 81 93 F9 B0 1A A1 B9 6C D3 01 38 CD 51 75", "BWIPP switches to ASCII later", 0 }, - /*109*/ { UNICODE_MODE, 0, -1, -1, -1, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", 0, 0, 26, 26, 1, "(72) F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "", 0 }, + /* 0*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 93 B0 1C 3C 76 FB D4 AB 16 11", "#208", 0 }, + /* 1*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 93 B0 1C 3C 76 FB D4 AB 16 11", "#208", 0 }, + /* 2*/ { UNICODE_MODE | FAST_MODE, 0, 5, -1, -1, "0466010592130100000k*AGUATY80", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 93 B0 1C 3C 76 FB D4 AB 16 11", "", 0 }, + /* 3*/ { UNICODE_MODE, 0, 5, -1, -1, "0466010592130100000k*AGUATY80", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 93 B0 1C 3C 76 FB D4 AB 16 11", "", 0 }, + /* 4*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY8", 0, 0, 18, 18, 0, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C E6 07 B7 82 5F D4 3D 08 EB 60 DA B1 82 72 50 A9 5B", "BWIPP different encodation (earlier change to C40)", 0 }, + /* 5*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY8", 0, 0, 18, 18, 0, "(32) 86 C4 83 87 DE 8F 83 82 82 31 6C 2B 42 E6 82 5F D4 3D 0A 34 D7 21 4E D2 8D C5 9C D7", "AAAAAAAAAAAAAAAAAAAAAACCCCCC; BWIPP different encodation", 0 }, + /* 6*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80U", 0, 0, 20, 20, 1, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 FE 56 81 76 4F AB 22 B8 6F 0A", "", 0 }, + /* 7*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80U", 0, 0, 20, 20, 0, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C F0 A8 11 D5 05 46 5F D2 56 81 76 3C D6 92 14 9F E2", "AAAAAAAAAAAAAAAAAAAAEEEEEEEAAA; BWIPP same as FAST_MODE", 0 }, + /* 8*/ { UNICODE_MODE | FAST_MODE, 0, 5, -1, -1, "0466010592130100000k*AGUATY80U", ZINT_ERROR_TOO_LONG, -1, 0, 0, 0, "Error 522: Input too long for selected symbol size", "", 0 }, + /* 9*/ { UNICODE_MODE, 0, 5, -1, -1, "0466010592130100000k*AGUATY80U", ZINT_ERROR_TOO_LONG, -1, 0, 0, 0, "Error 522: Input too long for selected symbol size", "", 0 }, + /* 10*/ { UNICODE_MODE | FAST_MODE, 0, 6, -1, -1, "0466010592130100000k*AGUATY80U", 0, 0, 20, 20, 1, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C EE 08 85 D6 D2 EF 65 FE 56 81 76 4F AB 22 B8 6F 0A", "", 0 }, + /* 11*/ { UNICODE_MODE, 0, 6, -1, -1, "0466010592130100000k*AGUATY80U", 0, 0, 20, 20, 0, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C F0 A8 11 D5 05 46 5F D2 56 81 76 3C D6 92 14 9F E2", "AAAAAAAAAAAAAAAAAAAAEEEEEEEAAA; BWIPP same as FAST_MODE", 0 }, + /* 12*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80UA", 0, 0, 20, 20, 1, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C E6 07 B7 82 5F D4 3D 1E 5F FE 81 1E 1B B0 FE E7 54", "", 0 }, + /* 13*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80UA", 0, 0, 20, 20, 0, "(40) 86 C4 83 87 DE 8F 83 82 82 31 6C F0 A8 11 D5 05 46 78 C1 50 5F 81 3B 50 EE DB AE A4", "AAAAAAAAAAAAAAAAAAAAEEEEEEEEEEE; BWIPP same as FAST_MODE", 0 }, + /* 14*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, ">*\015>*\015>", 0, 0, 14, 14, 1, "EE 0C A9 0C A9 FE 3F 81 42 B2 11 A8 F9 0A EC C1 1E 41", "X12 symbols_left 3, process_p 1", 0 }, + /* 15*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>", 0, 0, 14, 14, 0, "3F 2B 0E 3F 2B 0E 3F 81 37 3F 04 F9 CC 02 2D 70 E0 FF", "AAAAAAA; BWIPP same as FAST_MODE", 0 }, + /* 16*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, ">*\015>*\015>*", 0, 0, 14, 14, 1, "EE 0C A9 0C A9 FE 3F 2B 3F 05 D2 10 1B 9A 55 2F 68 C5", "X12 symbols_left 3, process_p 2", 0 }, + /* 17*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>*", 0, 0, 14, 14, 0, "3F 2B 0E 3F 2B 0E 3F 2B 4A 88 C7 41 2E 92 94 9E 96 7B", "AAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /* 18*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, ">*\015>*\015>*\015", 0, 0, 14, 14, 1, "EE 0C A9 0C A9 0C A9 FE 1F 30 3F EE 45 C1 1C D7 5F 7E", "X12 symbols_left 1, process_p 0", 0 }, + /* 19*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>*\015", 0, 0, 14, 14, 1, "EE 0C A9 0C A9 0C A9 FE 1F 30 3F EE 45 C1 1C D7 5F 7E", "X12 symbols_left 1, process_p 0", 0 }, + /* 20*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEF", 0, 0, 12, 12, 1, "E6 59 E9 6D 24 3D 15 EF AA 21 F9 59", "C40 symbols_left 0, process_p 0", 0 }, + /* 21*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEF", 0, 0, 12, 12, 1, "E6 59 E9 6D 24 3D 15 EF AA 21 F9 59", "CCCCCC", 0 }, + /* 22*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFG", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 FE 48 81 8C 7E 09 5E 10 64 BC 5F 4C 91", "C40 symbols_left 3, process_p 1", 0 }, + /* 23*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 DF 81 AB 07 40 5C C8 C2 F5 59 B3 10", "EEEEEEE; BWIPP same as FAST_MODE", 0 }, + /* 24*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGH", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 FE 48 49 2E 31 00 73 3B 8F 4B 55 93 19", "C40 symbols_left 3, process_p 2", 0 }, + /* 25*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 81 D1 4D 5F 96 32 9F B2 A0 C7 8D", "EEEEEEEE; BWIPP same as FAST_MODE", 1 }, + /* 26*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHI", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 80 5F FE 01 DE 20 9F AA C2 FF 8F 08 97", "C40 symbols_left 1, process_p 0", 0 }, + /* 27*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHI", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 4A 34 B0 7A 27 3C 38 82 4C 30 21", "EEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 28*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGH12", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 80 4E 33 B3 46 F3 D5 F5 C0 4F 12 F2 ED", "C40 symbols_left 1, process_p 1", 0 }, + /* 29*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH12", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 8E A7 6D C3 20 83 CE 1E A9 4F 39", "EEEEEEEEAA; BWIPP same as FAST_MODE", 0 }, + /* 30*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHé", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 4A BB DA FE E1 A4 57 73 2B 4E 06 10 FB EE 83", "C40 symbols_left 1, process_p 0", 0 }, + /* 31*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHé", 0, 0, 8, 32, 0, "42 F0 08 31 05 18 72 1F EB 6A 80 70 2B 11 BD 91 6B 5F C9 AC 43", "AEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 32*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJ", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 80 5F 4B AD 47 09 12 FF 2F 95 CA 5B 4A", "C40 symbols_left 1, process_p 1", 0 }, + /* 33*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJ", 0, 0, 14, 14, 0, "42 E6 60 52 73 8D 86 C8 67 A3 F9 29 73 9C 15 90 7E 16", "ACCCCCCCCC; BWIPP same as FAST_MODE", 0 }, + /* 34*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJK", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 4B 4C D8 69 88 60 B9 33 B9 31 E6 BF CA", "C40 symbols_left 3, process_p 2", 0 }, + /* 35*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJK", 0, 0, 8, 32, 0, "F0 04 20 C4 14 61 C8 24 A2 DF B6 77 90 C2 39 AA 9B 61 7E F1 E3", "EEEEEEEEEEE; BWIPP same as FAST_MODE", 0 }, + /* 36*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEF\001G", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 00 3D FE 5D 5A F5 0A 8A 4E 1D 63 07 B9", "C40 symbols_left 1, process_p 0", 0 }, + /* 37*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEF\001G", 0, 0, 14, 14, 0, "42 43 F0 0C 41 46 02 48 57 A1 80 C5 8F EC 72 33 0A 26", "AAEEEEAA; BWIPP same as FAST_MODE", 0 }, + /* 38*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFG\001", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 02 FE 14 A3 27 63 01 2F B1 94 FE FA", "C40 symbols_left 1, process_p 0", 0 }, + /* 39*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG\001", 0, 0, 14, 14, 0, "42 43 44 F0 10 51 87 02 50 0C 22 23 7E A3 2B DC 8A 62", "AAAEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 40*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFG\001H", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 02 49 C2 E6 DD 06 89 51 BA 8E 9D 1F", "C40 symbols_left 1, process_p 1", 0 }, + /* 41*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG\001H", 0, 0, 14, 14, 0, "42 E6 60 52 73 8D 00 3E 66 13 C0 89 73 A8 53 20 F7 6F", "ACCCCCCCC; BWIPP same as FAST_MODE", 0 }, + /* 42*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGH\001", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 02 81 BD 6D F3 94 FF 82 A6 BF BB F1 4F", "C40 symbols_left 1, process_p 1, backtracks", 0 }, + /* 43*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH\001", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 02 37 8F B4 A6 27 9E FA CF 1E 02", "EEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /* 44*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH\001", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 02 81 FB 93 AE 8B 1C 90 DF FE EB C5 A0 2A 6A 4F", "C40 symbols_left 1, process_p 1, backtracks", 0 }, + /* 45*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH\001", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 02 37 8F B4 A6 27 9E FA CF 1E 02", "EEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /* 46*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGH\001I", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 02 4A E1 0D DD BC 56 E4 66 52 E6 AE 02", "C40 symbols_left 3, process_p 2, backtracks", 0 }, + /* 47*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH\001I", 0, 0, 8, 32, 0, "42 43 44 45 F0 14 61 C8 02 4A 5F 21 C6 61 E1 7B 1C 13 FF 0D BA", "AAAAEEEEAA; BWIPP same as FAST_MODE", 0 }, + /* 48*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH\001I", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 02 4A 81 93 51 DF C0 0C D3 F9 72 13 17 52 5B 7E", "C40 symbols_left 5, process_p 2, backtracks", 0 }, + /* 49*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH\001I", 0, 0, 16, 16, 0, "42 F0 08 31 05 18 72 1F 02 4A 81 93 FD 86 6C AF 6E C6 7C 99 74 21 C4 EF", "AEEEEEEEAA; BWIPP same as FAST_MODE", 0 }, + /* 50*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHI\001", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 02 81 47 6C 3E 49 D3 FA 46 47 53 6E E5", "Switches to ASC for last char", 0 }, + /* 51*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHI\001", 0, 0, 8, 32, 0, "42 F0 08 31 05 18 72 09 02 81 FA 72 8B 50 63 F2 BD D9 2E 1D CD", "AEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 52*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHI\001", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 02 81 FB 93 33 E3 4F F7 2D 08 8A BF 64 C3 B0 26", "Switches to ASC for last char", 0 }, + /* 53*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHI\001", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 02 81 FB 93 33 E3 4F F7 2D 08 8A BF 64 C3 B0 26", "CCCCCCCCCA", 0 }, + /* 54*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGH\001I\001", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 02 4A 02 81 BD 5D C0 B9 09 25 87 3A 09 23 9D C0", "C40 symbols_left 1, process_p 1, backtracks 2", 0 }, + /* 55*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH\001I\001", 0, 0, 8, 32, 0, "42 E6 60 52 73 8D 83 42 89 82 5F 2E 1D 6C 18 BB 25 C3 BF 7F E1", "ACCCCCCCCCC; BWIPP same as FAST_MODE", 1 }, + /* 56*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEF+G", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 07 E5 FE 6B 35 71 7F 3D 57 59 46 F7 B9", "C40 symbols_left 1, process_p 0", 0 }, + /* 57*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEF+G", 0, 0, 14, 14, 0, "F0 04 20 C4 14 6A C7 81 28 87 C6 C4 D6 50 53 DE 8D 80", "EEEEEEEE; BWIPP same as FAST_MODE", 1 }, + /* 58*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFG+", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 33 FE 33 F5 97 60 73 48 13 2E E5 74", "C40 symbols_left 1, process_p 0", 0 }, + /* 59*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG+", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 EB 81 E8 04 8F 69 BD F5 01 28 03 0A", "EEEEEEEE; BWIPP same as FAST_MODE", 1 }, + /* 60*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFG+H", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 33 49 E5 B0 6D 05 FB 36 18 34 86 91", "C40 symbols_left 1, process_p 1", 0 }, + /* 61*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFG+H", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 EB 49 4A 4B 86 44 96 1E F6 22 DC 82", "EEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 62*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGH+", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 2C 81 02 BD 40 CF 3B 06 C2 DF 36 E0 48", "C40 symbols_left 1, process_p 1, backtracks", 0 }, + /* 63*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH+", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 2C 1F DD 3B 4F 62 48 0E 16 F9 5D", "EEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /* 64*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH+", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 2C 81 FB 93 F6 78 B5 69 0B 83 C6 32 62 1A D2 FF", "C40 symbols_left 1, process_p 1, backtracks", 0 }, + /* 65*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH+", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 2C 1F DD 3B 4F 62 48 0E 16 F9 5D", "EEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /* 66*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGH+I", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 2C 4A 5E DD 6E E7 92 60 02 32 6B BF 05", "C40 symbols_left 3, process_p 2, backtracks", 0 }, + /* 67*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGH+I", 0, 0, 8, 32, 0, "42 F0 08 31 05 18 72 2B 4A 81 E2 22 C5 B6 9C AB 0E F1 63 E5 EE", "AEEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /* 68*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH+I", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 2C 4A 81 93 09 2C 69 F5 07 84 5F E4 D5 62 E3 CE", "C40 symbols_left 5, process_p 2, backtracks", 0 }, + /* 69*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGH+I", 0, 0, 16, 16, 0, "42 43 F0 0C 41 46 1C 8A C9 7C 81 93 A8 91 6E F7 89 AB E8 A5 8E CA F0 34", "AAEEEEEEEE; BWIPP same as FAST_MODE", 0 }, + /* 70*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHI+", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 2C 81 F8 BC 8D 12 17 7E 22 27 DE 7F E2", "C40 symbols_left 3, process_p 2, backtracks", 0 }, + /* 71*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHI+", 0, 0, 8, 32, 0, "42 F0 08 31 05 18 72 09 2C 81 45 A2 38 0B A7 76 D9 B9 A3 0C CA", "AEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 72*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHI+", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 2C 81 FB 93 6B 10 E6 0E F9 75 A7 48 A6 F3 08 96", "Switches to ASC for last char", 0 }, + /* 73*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHI+", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 2C 81 FB 93 6B 10 E6 0E F9 75 A7 48 A6 F3 08 96", "CCCCCCCCCA", 0 }, + /* 74*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFjG", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 0E 25 FE DA 14 D7 15 47 69 9D 4A 54 6D", "C40 symbols_left 1, process_p 0", 0 }, + /* 75*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFjG", 0, 0, 14, 14, 0, "42 43 F0 0C 41 46 6B 48 77 B6 92 A1 DC 92 42 54 39 84", "AAEEEEAA; BWIPP same as FAST_MODE", 0 }, + /* 76*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGj", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 5B FE B5 F3 24 0A 99 26 D6 CC A8 40", "C40 symbols_left 1, process_p 0", 0 }, + /* 77*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGj", 0, 0, 14, 14, 0, "42 43 44 F0 10 51 87 6B 0D 41 FF FD 91 82 0B 8F CB AA", "AAAEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 78*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGjH", 0, 0, 14, 14, 1, "E6 59 E9 6D 24 7D 5B 49 63 B6 DE 6F 11 58 DD D6 CB A5", "C40 symbols_left 1, process_p 1", 0 }, + /* 79*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGjH", 0, 0, 14, 14, 0, "42 E6 60 52 73 8D 0E 26 0E F4 AD 89 C6 72 8A 26 34 65", "ACCCCCCCC; BWIPP same as FAST_MODE", 0 }, + /* 80*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHj", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 6B 81 ED 78 CB 9F 52 EE 52 88 91 67 96", "C40 symbols_left 1, process_p 1, backtracks", 0 }, + /* 81*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHj", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 6B 6A C2 69 78 C8 BF DA 9C 5F CA", "EEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /* 82*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHj", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 6B 81 FB 93 BF 72 03 35 09 37 98 FF 39 A7 E3 6D", "C40 symbols_left 1, process_p 1, backtracks", 0 }, + /* 83*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHj", 0, 0, 14, 14, 0, "F0 04 20 C4 14 61 C8 6B 6A C2 69 78 C8 BF DA 9C 5F CA", "EEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /* 84*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHjI", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 FE 48 49 6B 4A B1 18 E5 B7 FB 88 92 65 CC 38 DB", "C40 symbols_left 3, process_p 2, backtracks", 0 }, + /* 85*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHjI", 0, 0, 8, 32, 0, "42 43 44 45 F0 14 61 C8 6B 4A 0F 34 FE 6A 4C 17 E8 24 D5 9B 63", "AAAAEEEEAA; BWIPP same as FAST_MODE", 0 }, + /* 86*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHjI", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 6B 4A 81 93 40 26 DF A9 05 30 01 29 8E DF D2 5C", "C40 symbols_left 5, process_p 2, backtracks", 0 }, + /* 87*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "ABCDEFGHjI", 0, 0, 16, 16, 0, "42 F0 08 31 05 18 72 1F 6B 4A 81 93 EC 7F 73 0A B8 0F 0F A3 ED AC 4D CD", "AEEEEEEEAA; BWIPP same as FAST_MODE", 0 }, + /* 88*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIj", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 6B 81 17 79 06 42 7E 96 B2 70 79 F8 3C", "Switches to ASC for last char", 0 }, + /* 89*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIj", 0, 0, 8, 32, 0, "42 F0 08 31 05 18 72 09 6B 81 AA 67 B3 5B CE 9E 49 EE 04 8B 14", "AEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 90*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJÊ", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 4B EB 4B 81 DD D9 F9 C9 C5 38 F3 4B DB 80 92 A7", "Switches to ASC for last 2 chars", 0 }, + /* 91*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJÊ", 0, 0, 8, 32, 0, "42 E6 60 52 73 8D 86 C8 0B 08 72 65 72 59 41 70 1B CE 76 D7 1F", "ACCCCCCCCCC; BWIPP same as FAST_MODE", 0 }, + /* 92*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJKÊ", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F FE 4B 4C EB 4B 15 17 46 06 70 F3 15 74 45 26 72 2D", "C40 symbols_left 3, process_p 2, backtracks", 0 }, + /* 93*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKÊ", 0, 0, 16, 16, 0, "F0 04 20 C4 14 61 C8 24 A2 DF EB 4B A1 42 E9 2A A8 3B 79 8B E9 40 E9 58", "EEEEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 94*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJKª", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F 93 82 BB B2 FE 11 5C 60 32 A6 DE FC 7B 30 F1 03 56", "C40 symbols_left 1, process_p 0", 0 }, + /* 95*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKª", 0, 0, 16, 16, 0, "F0 04 20 C4 14 61 C8 24 A2 DF EB 2B 02 D1 85 74 F7 92 3F 2E 1F 07 A3 BE", "EEEEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 96*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJKê", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 80 5F 93 82 BB DB FE 78 43 69 3C C2 FE F5 2E 1B 4F B6 04", "C40 symbols_left 1, process_p 0", 0 }, + /* 97*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKê", 0, 0, 16, 16, 0, "F0 04 20 C4 14 61 C8 24 A2 DF EB 6B C0 33 CD FB 9D 5C A0 E8 BB 7D 34 E1", "EEEEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /* 98*/ { GS1_MODE | FAST_MODE, 0, -1, -1, -1, "[10]ABCDEFGH[10]ABc", 0, 0, 12, 26, 1, "E8 8C E6 59 E9 6D 24 80 4A A9 8D FE 42 43 64 81 83 B4 8F 6B 95 F6 CE A6 3C 5C 77 86 08 50", "C40 symbols_left 3, process_p 1, backtracks", 0 }, + /* 99*/ { GS1_MODE, 0, -1, -1, -1, "[10]ABCDEFGH[10]ABc", 0, 0, 12, 26, 0, "E8 8C 42 F0 08 31 05 18 72 1F E8 8C 42 43 64 81 12 DE 1C 0E B2 93 B3 C5 3C 58 A8 4A 83 4C", "AAAEEEEEEEAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*100*/ { GS1_MODE | FAST_MODE, 0, -1, -1, GS1_GS_SEPARATOR, "[10]ABCDEFGH[10]ABc", 0, 0, 12, 26, 1, "E8 8C E6 59 E9 6D 24 80 49 B6 0D FE 42 43 64 81 79 E4 20 33 76 5C C7 23 E6 C5 FA 4C FF 88", "C40 symbols_left 3, process_p 1, backtracks", 0 }, + /*101*/ { GS1_MODE, 0, -1, -1, GS1_GS_SEPARATOR, "[10]ABCDEFGH[10]ABc", 0, 0, 12, 26, 0, "E8 8C 42 F0 08 31 05 18 72 1F 1E 8C 42 43 64 81 4E 3D 4C 86 78 D4 97 78 85 01 48 D5 B9 29", "AAAEEEEEEEAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*102*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdef", 0, 0, 12, 12, 1, "EF 59 E9 6D 24 E2 CC D9 B4 55 E2 6A", "TEX symbols_left 0, process_p 0", 0 }, + /*103*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdef", 0, 0, 12, 12, 1, "EF 59 E9 6D 24 E2 CC D9 B4 55 E2 6A", "TTTTTT", 0 }, + /*104*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefg", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 FE 68 81 A9 65 CD 3A A2 E9 E0 B7 E1 E5", "TEX symbols_left 3, process_p 1", 0 }, + /*105*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefg", 0, 0, 14, 14, 0, "62 63 64 65 66 67 68 81 4A 9E 59 19 83 14 93 AD 5E 19", "AAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*106*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefgh", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 FE 68 69 68 36 28 3C 85 5A E9 D4 49 9A", "TEX symbols_left 3, process_p 2", 0 }, + /*107*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh", 0, 0, 14, 14, 0, "62 63 64 65 66 67 68 69 8B CD BC 1F A4 A7 9A CE F6 66", "AAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*108*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghi", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 80 5F FE DA BF FA 16 71 15 22 4D E3 F3", "TEX symbols_left 1, process_p 0", 0 }, + /*109*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghi", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 80 5F FE DA BF FA 16 71 15 22 4D E3 F3", "TTTTTTTTT", 0 }, + /*110*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdef\001g", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 00 3D FE 86 3B 2F 83 51 99 C0 A1 EC DD", "TEX symbols_left 1, process_p 0", 0 }, + /*111*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdef\001g", 0, 0, 14, 14, 0, "62 63 64 65 66 67 02 68 51 87 9F 1D E9 36 3E B2 5F 4F", "AAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*112*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefg\001", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 02 FE CF C2 FD EA DA F8 6C 56 15 9E", "TEX symbols_left 1, process_p 0", 0 }, + /*113*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefg\001", 0, 0, 14, 14, 0, "62 63 64 65 66 67 68 02 AC 5C B2 29 96 15 DB C2 87 96", "AAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*114*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefg\001h", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 02 69 7A 9B EB A4 5E DE 99 25 01 8C", "TEX symbols_left 1, process_p 1", 0 }, + /*115*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefg\001h", 0, 0, 14, 14, 0, "62 EF 60 52 73 8D 00 3E DC 69 2C DB 8D 1B C4 DF 8C 9A", "ATTTTTTTT; BWIPP same as FAST_MODE", 0 }, + /*116*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefgh\001", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 02 81 EB 84 25 32 6E 1B 5A FB 1D 25 4A", "TEX symbols_left 1, process_p 1, backtracks", 0 }, + /*117*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh\001", 0, 0, 14, 14, 0, "62 EF 60 52 73 8D 83 42 A7 27 45 DE 64 B7 93 23 AF 04", "ATTTTTTTT; BWIPP same as FAST_MODE", 1 }, + /*118*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "abcdefgh\001", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 02 81 FB 93 93 FD 1E 3B BA 1D 16 4D 59 41 EC B9", "TEX symbols_left 1, process_p 1, backtracks", 0 }, + /*119*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefgh\001", 0, 0, 14, 14, 0, "62 EF 60 52 73 8D 83 42 A7 27 45 DE 64 B7 93 23 AF 04", "ATTTTTTTT; BWIPP same as FAST_MODE", 1 }, + /*120*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefgh\001i", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 02 6A 31 35 48 9B 93 6E 15 BB 02 9D F4", "TEX symbols_left 3, process_p 2, backtracks", 0 }, + /*121*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh\001i", 0, 0, 8, 32, 0, "62 63 64 65 66 67 68 69 02 6A D2 78 3E D1 EC CE 72 33 20 0E F2", "AAAAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*122*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "abcdefgh\001i", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 02 6A 81 93 DE D7 EC 9B 7D 72 9C 68 B8 6E CF 31", "TEX symbols_left 3, process_p 2, backtracks", 0 }, + /*123*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefgh\001i", 0, 0, 16, 16, 0, "62 63 64 65 66 67 68 69 02 6A 81 93 45 9D 38 FC 6B CA 1C 9B DF 3F C8 30", "AAAAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*124*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghi\001", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 80 5F FE 02 81 4D AB 30 86 CD D1 9D F3 15 F5 B1", "Switches to ASC for last char", 0 }, + /*125*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghi\001", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 80 5F FE 02 81 4D AB 30 86 CD D1 9D F3 15 F5 B1", "TTTTTTTTTA", 0 }, + /*126*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefgh\001i\001", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 02 6A 02 81 32 55 EC 2E A7 AE 69 41 A6 1F 09 8F", "TEX symbols_left 1, process_p 1, backtracks 2", 0 }, + /*127*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgh\001i\001", 0, 0, 8, 32, 0, "62 EF 60 52 73 8D 83 42 89 82 80 A6 CC 72 8E 8C C5 75 D3 0D C2", "ATTTTTTTTTT; BWIPP same as FAST_MODE", 1 }, + /*128*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefJg", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 0E 25 FE 01 75 0D 9C 9C BE 40 88 BF 09", "TEX symbols_left 1, process_p 0", 0 }, + /*129*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefJg", 0, 0, 14, 14, 0, "62 63 64 65 66 67 4B 68 8F EA 93 94 D3 12 8F FF 2A FD", "AAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*130*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefgJ", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 5B FE 6E 92 FE 83 42 F1 0B 0E 43 24", "TEX symbols_left 1, process_p 0", 0 }, + /*131*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgJ", 0, 0, 14, 14, 0, "62 63 64 65 66 67 68 4B 92 0D 83 DC 75 6C 05 F8 B1 A9", "AAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*132*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefgJh", 0, 0, 14, 14, 1, "EF 59 E9 6D 24 7D 5B 69 DB CB E8 CD C6 D7 FE 7D 57 36", "TEX symbols_left 1, process_p 1", 0 }, + /*133*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefgJh", 0, 0, 14, 14, 0, "62 EF 60 52 73 8D 0E 26 B4 8E 41 DB 38 C1 1D D9 4F 90", "ATTTTTTTT; BWIPP same as FAST_MODE", 0 }, + /*134*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghJ", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 4B 81 15 8A 35 57 7F 33 B3 48 01 E0 BD", "TEX symbols_left 1, process_p 1, backtracks", 0 }, + /*135*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghJ", 0, 0, 14, 14, 0, "62 EF 60 52 73 8D 83 9B 9F 08 C5 04 B1 AF BD 32 C5 7D", "ATTTTTTTT; BWIPP same as FAST_MODE", 1 }, + /*136*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "abcdefghJ", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 4B 81 FB 93 5B D4 D2 8B EE 85 F2 3E 3F 8E E5 04", "TEX symbols_left 1, process_p 1, backtracks", 0 }, + /*137*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefghJ", 0, 0, 14, 14, 0, "62 EF 60 52 73 8D 83 9B 9F 08 C5 04 B1 AF BD 32 C5 7D", "ATTTTTTTT; BWIPP same as FAST_MODE", 1 }, + /*138*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghJi", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 FE 68 69 4B 6A CF 3B 58 FE 82 46 FC 08 1E 58 03", "TEX symbols_left 3, process_p 2, backtracks", 0 }, + /*139*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghJi", 0, 0, 8, 32, 0, "62 63 64 65 66 67 68 69 4B 6A 2C 76 2E B4 FD E6 9B 80 3C CB 05", "AAAAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*140*/ { UNICODE_MODE | FAST_MODE, 0, -1, DM_SQUARE, -1, "abcdefghJi", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 FE 68 69 4B 6A 81 93 16 FE 20 2B 29 EA 78 1B DE A1 C6 8C", "TEX symbols_left 3, process_p 2, backtracks", 0 }, + /*141*/ { UNICODE_MODE, 0, -1, DM_SQUARE, -1, "abcdefghJi", 0, 0, 16, 16, 0, "62 63 64 65 66 67 68 69 4B 6A 81 93 8D B4 F4 4C 3F 52 F8 E8 B9 F0 C1 8D", "AAAAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*142*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghiJ", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 80 5F FE 4B 81 B3 A5 20 E3 DC F9 74 40 09 30 46", "Switches to ASC for last char", 0 }, + /*143*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghiJ", 0, 0, 8, 32, 1, "EF 59 E9 6D 24 80 5F FE 4B 81 B3 A5 20 E3 DC F9 74 40 09 30 46", "TTTTTTTTTA", 0 }, + /*144*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghijkÊ", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 80 5F 93 82 BB DB FE 3E C8 EC 73 58 A7 42 46 10 49 25 99", "TEX symbols_left 1, process_p 0", 0 }, + /*145*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghijkÊ", 0, 0, 16, 16, 0, "EF 59 E9 6D 24 80 5F FE 6B 6C EB 4B 38 32 3E 60 A3 93 26 A6 E7 35 73 96", "TTTTTTTTTAAA; BWIPP same as FAST_MODE", 0 }, + /*146*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghijkª", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 80 5F 93 82 BB B2 FE 57 D7 E5 7D 3C 87 4B 13 3B F7 90 CB", "TEX symbols_left 1, process_p 0", 0 }, + /*147*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghijkª", 0, 0, 16, 16, 0, "EF 59 E9 6D 24 80 5F FE 6B 6C EB 2B 9B A1 52 3E FC 3A 60 03 11 72 39 70", "TTTTTTTTTAAA; BWIPP same as FAST_MODE", 0 }, + /*148*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "abcdefghijkê", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 80 5F FE 6B 6C EB 6B 59 43 1A B1 96 F4 FF C5 B5 08 AE 2F", "TEX symbols_left 3, process_p 2, backtracks", 0 }, + /*149*/ { UNICODE_MODE, 0, -1, -1, -1, "abcdefghijkê", 0, 0, 16, 16, 1, "EF 59 E9 6D 24 80 5F FE 6B 6C EB 6B 59 43 1A B1 96 F4 FF C5 B5 08 AE 2F", "TEX symbols_left 3, process_p 2, backtracks", 0 }, + /*150*/ { GS1_MODE | FAST_MODE, 0, -1, -1, -1, "[10]abcdefgh[10]abC", 0, 0, 12, 26, 1, "E8 8C EF 59 E9 6D 24 80 4A A9 8D FE 62 63 44 81 88 DC 73 33 70 A1 83 EA 50 CB 4E 17 90 DB", "TEX symbols left 3, process_p 1, backtracks", 0 }, + /*151*/ { GS1_MODE, 0, -1, -1, -1, "[10]abcdefgh[10]abC", 0, 0, 12, 26, 0, "E8 8C 62 63 64 65 66 67 68 69 E8 8C 62 63 44 81 43 79 B0 35 F6 1E AB 24 19 85 40 E7 B2 49", "AAAAAAAAAAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*152*/ { GS1_MODE | FAST_MODE, 0, -1, -1, GS1_GS_SEPARATOR, "[10]abcdefgh[10]abC", 0, 0, 12, 26, 1, "E8 8C EF 59 E9 6D 24 80 49 B6 0D FE 62 63 44 81 72 8C DC 6B 93 0B 8A 6F 8A 52 C3 DD 67 03", "TEX symbols left 3, process_p 1, backtracks", 0 }, + /*153*/ { GS1_MODE, 0, -1, -1, GS1_GS_SEPARATOR, "[10]abcdefgh[10]abC", 0, 0, 12, 26, 0, "E8 8C 62 63 64 65 66 67 68 69 1E 8C 62 63 44 81 1F 9A E0 BD 3C 59 8F 99 A0 DC A0 78 88 2C", "AAAAAAAAAAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*154*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015*>\015*>", 0, 0, 12, 12, 1, "EE 00 2B 00 2B 83 3B 0A CE 32 36 65", "X12 symbols_left 0, process_p 0", 0 }, + /*155*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>", 0, 0, 12, 12, 1, "EE 00 2B 00 2B 83 3B 0A CE 32 36 65", "X12 symbols_left 0, process_p 0", 0 }, + /*156*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015*>\015*>\015", 0, 0, 14, 14, 1, "EE 00 2B 00 2B FE 0E 81 C0 6C BF 37 F6 D6 48 71 E2 38", "Switches to ASC for last char", 0 }, + /*157*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015", 0, 0, 14, 14, 0, "0E 2B 3F 0E 2B 3F 0E 81 33 CC F8 AA 23 B8 F3 40 BC DB", "AAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*158*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015*>\015*>\015*", 0, 0, 14, 14, 1, "EE 00 2B 00 2B FE 0E 2B BD DB 7C 8F 14 46 F1 9F 94 BC", "Switches to ASC for last 2 chars", 0 }, + /*159*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*", 0, 0, 14, 14, 0, "0E 2B 3F 0E 2B 3F 0E 2B 4E 7B 3B 12 C1 28 4A AE CA 5F", "AAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*160*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>", 0, 0, 14, 14, 1, "EE 00 2B 00 2B 00 2B FE BF 81 70 74 1C 65 10 0C 06 38", "X12 symbols_left 1, process_p 0, ASC unlatch at end", 0 }, + /*161*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>", 0, 0, 14, 14, 1, "EE 00 2B 00 2B 00 2B FE BF 81 70 74 1C 65 10 0C 06 38", "X12 symbols_left 1, process_p 0, ASC unlatch at end", 0 }, + /*162*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015", 0, 0, 14, 14, 1, "EE 00 2B 00 2B 00 2B 0E 1C DB D8 26 3E EC CF 9C C3 4A", "X12 symbols_left 1, process_p 1, ASC no latch at end", 0 }, + /*163*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015", 0, 0, 14, 14, 0, "0E EE 06 91 06 91 06 91 71 69 39 1E 01 32 D5 57 81 8E", "AXXXXXXXXX; BWIPP same as FAST_MODE", 0 }, + /*164*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015*", 0, 0, 8, 32, 1, "EE 00 2B 00 2B 00 2B FE 0E 2B 65 37 5F 2F F3 96 BE 9A 03 55 68", "X12 symbols_left 3, process_p 2, ASC last 2 chars", 0 }, + /*165*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015*", 0, 0, 8, 32, 0, "0E 2B EE 0C 82 0C 82 0C 82 FE E7 2D 83 16 AA 07 19 34 F4 F8 7B", "AAXXXXXXXXX; BWIPP same as FAST_MODE", 0 }, + /*166*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015*>", 0, 0, 8, 32, 1, "EE 00 2B 00 2B 00 2B 00 2B FE 6E 95 3A 10 58 4E 96 06 79 09 94", "X12 symbols_left 1, process_p 0, ASC unlatch at end", 0 }, + /*167*/ { UNICODE_MODE, 0, -1, -1, -1, "\015*>\015*>\015*>\015*>", 0, 0, 8, 32, 1, "EE 00 2B 00 2B 00 2B 00 2B FE 6E 95 3A 10 58 4E 96 06 79 09 94", "X12 symbols_left 1, process_p 0, ASC unlatch at end", 0 }, + /*168*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@A1^B2?C", 0, 0, 14, 14, 1, "F0 00 1C 5E 0B 2F C3 81 2D 71 45 13 9B FF A1 B0 0B E2", "EDIFACT symbols_left 1, process_p 0", 0 }, + /*169*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C", 0, 0, 14, 14, 1, "F0 00 1C 5E 0B 2F C3 81 2D 71 45 13 9B FF A1 B0 0B E2", "EDIFACT symbols_left 1, process_p 0", 0 }, + /*170*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@A1^B2?C3", 0, 0, 14, 14, 1, "F0 00 1C 5E 0B 2F C3 34 81 E8 6C 9E CE 12 CB F5 58 3F", "EDIFACT symbols_left 1, process_p 1", 0 }, + /*171*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3", 0, 0, 14, 14, 1, "F0 00 1C 5E 0B 2F C3 34 81 E8 6C 9E CE 12 CB F5 58 3F", "EEEEEEEEA", 0 }, + /*172*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@A1^B2?C3+", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B7 C0 33 C6 81 E1 63 6E 5E B4 27 30 C9", "EDIFACT symbols_left 3, process_p 2", 0 }, + /*173*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+", 0, 0, 8, 32, 0, "41 F0 07 17 82 CB F0 F3 2C 81 38 6D 00 EB 77 36 F8 D8 99 B4 1C", "AEEEEEEEEA; BWIPP same as FAST_MODE", 1 }, + /*174*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@A1^B2?C3+D", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B1 1F 4D E1 79 04 2B BC 05 6C 38 73 39", "EDIFACT symbols_left 3, process_p 3", 0 }, + /*175*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B1 1F 4D E1 79 04 2B BC 05 6C 38 73 39", "EEEEEEEEEEE", 0 }, + /*176*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B1 34 F4 EC B3 DC 03 A3 1F B5 86 C3 F7", "EDIFACT symbols_left 0, process_p 0", 0 }, + /*177*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4", 0, 0, 8, 32, 1, "F0 00 1C 5E 0B 2F C3 CE B1 34 F4 EC B3 DC 03 A3 1F B5 86 C3 F7", "EDIFACT symbols_left 0, process_p 0", 0 }, + /*178*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4=", 0, 0, 16, 16, 1, "F0 00 1C 5E 0B 2F C3 CE B1 34 3E 81 42 96 43 6E 92 0D A9 B1 65 3C CF 9B", "EDIFACT symbols_left 2, process_p 1", 0 }, + /*179*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4=", 0, 0, 16, 16, 0, "F0 00 1C 5E 0B 2F C3 CE B1 34 3E 81 42 96 43 6E 92 0D A9 B1 65 3C CF 9B", "EEEEEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /*180*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4=E", 0, 0, 16, 16, 1, "F0 00 1C 5E 0B 2F C3 CE B1 34 3E 46 AD 8C F2 D8 5D AF F3 65 08 1F E3 A5", "EDIFACT symbols_left 2, process_p 2", 0 }, + /*181*/ { UNICODE_MODE, 0, -1, -1, -1, "@A1^B2?C3+D4=E", 0, 0, 16, 16, 0, "41 F0 07 17 82 CB F0 F3 AC 4D 3D 46 16 18 75 8F 52 46 7B 18 F6 68 F1 43", "AEEEEEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /*182*/ { DATA_MODE | FAST_MODE, 0, -1, -1, -1, "\377\376", 0, 0, 12, 12, 1, "EB 80 EB 7F 81 6F A8 0F 21 6F 5F 88", "FN4 A7F FN4 A7E, 1 pad", 0 }, + /*183*/ { DATA_MODE, 0, -1, -1, -1, "\377\376", 0, 0, 12, 12, 1, "EB 80 EB 7F 81 6F A8 0F 21 6F 5F 88", "FN4 A7F FN4 A7E, 1 pad", 0 }, + /*184*/ { DATA_MODE | FAST_MODE, 0, -1, -1, -1, "\377\376\375", 0, 0, 12, 12, 1, "E7 2C C0 55 E9 67 45 8A D2 7E A9 23", "BAS BFF BFE BFD, no padding", 0 }, + /*185*/ { DATA_MODE, 0, -1, -1, -1, "\377\376\375", 0, 0, 12, 12, 1, "E7 2C C0 55 E9 67 45 8A D2 7E A9 23", "BAS BFF BFE BFD, no padding", 0 }, + /*186*/ { DATA_MODE | FAST_MODE, 3, -1, -1, -1, "\101\102\103\104\300\105\310", 0, 3, 16, 16, 0, "F1 04 42 43 E7 87 5B F1 03 1D 36 81 2C E3 87 24 2D FD 69 9C 87 FA 8A 73", "ECI 4 ASC A41 A42 BAS B43 B44 BC0 B45 BC8; BWIPP different encodation (uses only B256, same no. of codewords)", 0 }, + /*187*/ { DATA_MODE, 3, -1, -1, -1, "\101\102\103\104\300\105\310", 0, 3, 16, 16, 0, "F1 04 42 43 44 45 EB 41 46 EB 49 81 6E 28 91 70 A5 CC E6 32 B6 3F 15 1C", "ECI 4 ASC A41 A42 BAS B43 B44 BC0 B45 BC8; BWIPP different encodation (uses only B256, same no. of codewords)", 0 }, + /*188*/ { UNICODE_MODE | FAST_MODE, 26, -1, -1, -1, "ABCDÀEÈ", 0, 26, 12, 26, 1, "F1 1B E7 60 2D C4 5B F1 06 58 B3 C7 21 81 57 ED 3D C0 12 2E 6C 80 58 CC 2C 05 0D 31 FC 2D", "ECI 27 BAS B41 B42 B43 B44 BC3 B80 B45 BC3 B88", 0 }, + /*189*/ { UNICODE_MODE, 26, -1, -1, -1, "ABCDÀEÈ", 0, 26, 12, 26, 0, "F1 1B 42 43 44 45 E7 B2 06 58 B3 C7 21 81 57 ED A8 34 CC 27 DA F6 B0 4D B7 FC AF 96 56 57", "AAAABBBBB; BWIPP same as FAST_MODE", 0 }, + /*190*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "β", ZINT_WARN_USES_ECI, 9, 12, 12, 1, "Warning F1 0A EB 63 81 41 56 DA C0 3D 2D CC", "ECI 10 FN4 A62", 0 }, + /*191*/ { UNICODE_MODE, 0, -1, -1, -1, "β", ZINT_WARN_USES_ECI, 9, 12, 12, 1, "Warning F1 0A EB 63 81 41 56 DA C0 3D 2D CC", "ECI 10 FN4 A62", 0 }, + /*192*/ { UNICODE_MODE | FAST_MODE, 127, -1, -1, -1, "A", 0, 127, 12, 12, 1, "F1 80 01 42 81 14 A2 86 07 F5 27 30", "ECI 128 A41", 0 }, + /*193*/ { UNICODE_MODE, 127, -1, -1, -1, "A", 0, 127, 12, 12, 1, "F1 80 01 42 81 14 A2 86 07 F5 27 30", "ECI 128 A41", 0 }, + /*194*/ { UNICODE_MODE | FAST_MODE, 16382, -1, -1, -1, "A", 0, 16382, 12, 12, 1, "F1 BF FE 42 81 29 57 AA A0 92 B2 45", "ECI 16383 A41", 0 }, + /*195*/ { UNICODE_MODE, 16382, -1, -1, -1, "A", 0, 16382, 12, 12, 1, "F1 BF FE 42 81 29 57 AA A0 92 B2 45", "ECI 16383 A41", 0 }, + /*196*/ { UNICODE_MODE | FAST_MODE, 810899, -1, -1, -1, "A", 0, 810899, 12, 12, 1, "F1 CC 51 05 42 BB A5 A7 8A C6 6E 0F", "ECI 810900 A41", 0 }, + /*197*/ { UNICODE_MODE, 810899, -1, -1, -1, "A", 0, 810899, 12, 12, 1, "F1 CC 51 05 42 BB A5 A7 8A C6 6E 0F", "ECI 810900 A41", 0 }, + /*198*/ { UNICODE_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, "[)>\\R05\\GA\\R\\E", 0, 0, 10, 10, 1, "EC 42 81 5D 17 49 F6 B6", "Macro05 A41", 0 }, + /*199*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R05\\GA\\R\\E", 0, 0, 10, 10, 1, "EC 42 81 5D 17 49 F6 B6", "Macro05 A41", 0 }, + /*200*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJKLM*", 0, 0, 16, 16, 1, "EE 59 E9 6D 24 80 5F 93 9A FE 4E 2B 09 FF 50 A2 83 BE 32 E1 2F 17 1E F3", "C40 == X12, p_r_6_2_1 true", 0 }, + /*201*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJKLM*", 0, 0, 16, 16, 0, "42 F0 08 31 05 18 72 09 28 B3 0D 2B 63 64 96 E4 6C CE D3 47 9A 5F E8 70", "AEEEEEEEEEEEEA; BWIPP same as FAST_MODE", 0 }, + /*202*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\015\015\015\015\015\015\015\015\015a\015\015\015\015\015\015\015", 0, 0, 12, 26, 1, "EE 00 01 00 01 00 01 FE 62 EE 00 01 00 01 FE 0E B5 9A 73 85 83 20 23 2C E0 EC EC BF 71 E0", "a not X12 encodable", 0 }, + /*203*/ { UNICODE_MODE, 0, -1, -1, -1, "\015\015\015\015\015\015\015\015\015a\015\015\015\015\015\015\015", 0, 0, 12, 26, 0, "EE 00 01 00 01 00 01 FE 62 0E 0E 0E 0E 0E 0E 0E F3 21 61 11 C7 BA 48 DE 65 86 FE 7E A2 F5", "XXXXXXXXXAAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*204*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, ".........a.......", 0, 0, 18, 18, 0, "(32) F0 BA EB AE BA EB AE B9 F0 62 2F 2F 2F 2F 2F 2F 2F 81 78 BE 1F 90 B8 89 73 66 DC BD", "a not EDIFACT encodable; BWIPP different encodation (switches to ASCII one dot before)", 0 }, + /*205*/ { UNICODE_MODE, 0, -1, -1, -1, ".........a.......", 0, 0, 18, 18, 0, "(32) 2F 2F F0 BA EB AE BA EB 9F 62 F0 BA EB AE BA EB 9F 81 F4 71 C0 AF 4F 8C 04 D9 F3 E3", "AAEEEEEEEAEEEEEEE; BWIPP different encodation", 0 }, + /*206*/ { GS1_MODE | FAST_MODE, 0, -1, -1, -1, "[90]........[91]....", 0, 0, 12, 26, 1, "E8 DC 2F 2F 2F 2F 2F 2F 2F 2F E8 DD 2F 2F 2F 2F C6 CC 13 68 0D 9D A9 A5 B8 D5 5A F3 7B 18", "Can't use GS1 EDIFACT if contains FNC1/GS", 0 }, + /*207*/ { GS1_MODE, 0, -1, -1, -1, "[90]........[91]....", 0, 0, 12, 26, 0, "E8 DC 2F F0 BA EB AE BA EB 9F E8 DD 2F 2F 2F 2F FE B0 C3 BC 8E AA AC CF 01 84 72 DF 59 6A", "AAAEEEEEEEAAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*208*/ { GS1_MODE | FAST_MODE, 0, -1, -1, -1, "[90]........", 0, 0, 8, 32, 1, "E8 DC F0 BA EB AE BA EB AE 81 B1 C0 AB DA A5 92 AF E2 05 DE 56", "Can use GS1 EDIFACT if no FNC1/GS", 0 }, + /*209*/ { GS1_MODE, 0, -1, -1, -1, "[90]........", 0, 0, 8, 32, 1, "E8 DC F0 BA EB AE BA EB AE 81 B1 C0 AB DA A5 92 AF E2 05 DE 56", "Can use GS1 EDIFACT if no FNC1/GS", 0 }, + /*210*/ { GS1_MODE | FAST_MODE, 0, -1, -1, -1, "[90]ABCDEFGH[91]ABCD", 0, 0, 12, 26, 1, "E8 DC E6 59 E9 6D 24 80 4A AA CE 59 E9 FE 45 81 6A 05 49 36 67 C8 00 DE 35 29 C5 9A 17 EA", "GS1 C40 ok", 0 }, + /*211*/ { GS1_MODE, 0, -1, -1, -1, "[90]ABCDEFGH[91]ABCD", 0, 0, 12, 26, 0, "E8 DC 42 E6 60 52 73 8D 83 84 52 17 60 52 FE 81 25 A6 B1 A9 6D 2E 30 9E A7 F7 F8 99 55 11", "AAACCCCCCCCCCCCCC; BWIPP same as FAST_MODE", 0 }, + /*212*/ { GS1_MODE | FAST_MODE, 0, -1, -1, -1, "[90]ABCD", 0, 0, 14, 14, 1, "E8 DC 42 43 44 45 81 38 98 32 8C 23 4D 87 5A 95 04 A7", "Final ASC unlatch", 0 }, + /*213*/ { GS1_MODE, 0, -1, -1, -1, "[90]ABCD", 0, 0, 14, 14, 1, "E8 DC 42 43 44 45 81 38 98 32 8C 23 4D 87 5A 95 04 A7", "AAAAAA", 0 }, + /*214*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, ">*\015>*\015>......", 0, 0, 12, 26, 0, "EE 0C A9 0C A9 FE 3F 2F 2F 2F 2F 2F 2F 81 57 ED 0F 29 C7 9D 5D 64 61 94 14 CD A8 DF 65 8D", "X12 then ASC; BWIPP switches to ASCII earlier", 1 }, + /*215*/ { UNICODE_MODE, 0, -1, -1, -1, ">*\015>*\015>......", 0, 0, 12, 26, 0, "3F 2B 0E 3F 2B 0E F0 FA EB AE BA EB 9F 81 57 ED E8 73 07 E0 2D 09 CD 94 36 26 E4 EB 34 6E", "AAAAAAEEEEEEE; BWIPP different encodation", 0 }, + /*216*/ { UNICODE_MODE | FAST_MODE, 0, 4, -1, -1, "ABCDEFGH", 0, 0, 16, 16, 1, "E6 59 E9 6D 24 FE 48 49 81 65 FB 93 F7 A4 EA B0 37 00 4F 4C 8A 99 0B 69", "", 0 }, + /*217*/ { UNICODE_MODE, 0, 4, -1, -1, "ABCDEFGH", 0, 0, 16, 16, 0, "F0 04 20 C4 14 61 C8 7C 81 65 FB 93 D7 12 24 0A 2D B8 CF C8 33 D8 87 D1", "EEEEEEEE; BWIPP same as FAST_MODE", 0 }, + /*218*/ { UNICODE_MODE | FAST_MODE, 0, 26, -1, -1, "@@@@@@@@@_", 0, 0, 8, 32, 0, "F0 00 00 00 00 00 1F 41 41 60 63 50 E0 FE 8B 46 16 38 FE 58 AD", "BWIPP switches to ASCII later", 0 }, + /*219*/ { UNICODE_MODE, 0, 26, -1, -1, "@@@@@@@@@_", 0, 0, 8, 32, 0, "41 F0 00 00 00 00 00 00 60 81 39 60 6A 49 C1 4A CD 3A 69 51 E0", "AEEEEEEEEA; BWIPP different encodation", 1 }, + /*220*/ { UNICODE_MODE | FAST_MODE, 0, 4, -1, -1, "@@@@@@@@@_", 0, 0, 16, 16, 0, "F0 00 00 00 00 00 1F 41 41 60 81 93 F9 B0 1A A1 B9 6C D3 01 38 CD 51 75", "BWIPP switches to ASCII later", 0 }, + /*221*/ { UNICODE_MODE, 0, 4, -1, -1, "@@@@@@@@@_", 0, 0, 16, 16, 0, "41 41 F0 00 00 00 00 00 1F 60 81 93 F3 2C 45 BF 89 58 D4 46 51 57 01 F3", "AAEEEEEEEA; BWIPP different encodation", 0 }, + /*222*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", 0, 0, 26, 26, 1, "(72) F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "", 0 }, + /*223*/ { UNICODE_MODE, 0, -1, -1, -1, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", 0, 0, 26, 26, 1, "(72) F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00", "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE", 0 }, + /*224*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "ABCDEFGHIJK", 0, 0, 8, 32, 1, "E6 59 E9 6D 24 80 5F FE 4B 4C D8 69 88 60 B9 33 B9 31 E6 BF CA", "", 0 }, + /*225*/ { UNICODE_MODE, 0, -1, -1, -1, "ABCDEFGHIJK", 0, 0, 8, 32, 0, "F0 04 20 C4 14 61 C8 24 A2 DF B6 77 90 C2 39 AA 9B 61 7E F1 E3", "EEEEEEEEEEE; BWIPP same as FAST_MODE", 0 }, + /*226*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\001AAAAA", 0, 0, 14, 14, 1, "02 42 42 42 42 42 81 38 80 00 99 9E F5 8F 04 71 FB 4E", "", 0 }, + /*227*/ { UNICODE_MODE, 0, -1, -1, -1, "\001AAAAA", 0, 0, 14, 14, 0, "02 42 42 42 42 42 81 38 80 00 99 9E F5 8F 04 71 FB 4E", "AAAAAA; BWIPP same as FAST_MODE", 0 }, + /*228*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "\001AAAAAA", 0, 0, 14, 14, 1, "02 E6 59 BF 59 BF FE 81 EC 06 F3 00 0B 1F AA CB FC EB", "", 0 }, + /*229*/ { UNICODE_MODE, 0, -1, -1, -1, "\001AAAAAA", 0, 0, 14, 14, 0, "02 42 F0 04 10 41 42 81 9C E9 2B 19 D3 07 3C 11 0E 63", "AAEEEEA; BWIPP same as FAST_MODE", 0 }, + /*230*/ { DATA_MODE | FAST_MODE, 0, -1, -1, -1, "\200\076\076\076\076\076\076\076", 0, 0, 8, 32, 0, "E7 2D 41 EE 0C D3 0C D3 FE 3F 81 93 1A AE 50 D6 E0 FB 18 EA 2E", "BAS X12; BWIPP different encodation", 0 }, + /*231*/ { DATA_MODE, 0, -1, -1, -1, "\200\076\076\076\076\076\076\076", 0, 0, 14, 14, 0, "EB 01 3F EE 0C D3 0C D3 C3 98 B8 7F 21 0C 23 45 A9 27", "AAXXXXXX; BWIPP different encodation", 2 }, + /*232*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, ".....12", 0, 0, 14, 14, 1, "2F 2F 2F 2F 2F 8E 81 38 18 5E 9A 70 18 19 D0 35 7E 82", "ASC", 0 }, + /*233*/ { UNICODE_MODE, 0, -1, -1, -1, ".....12", 0, 0, 14, 14, 0, "2F 2F 2F 2F 2F 8E 81 38 18 5E 9A 70 18 19 D0 35 7E 82", "AAAAAAA; BWIPP same as FAST_MODE", 0 }, + /*234*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "aaaaaa", 0, 0, 12, 12, 1, "EF 59 BF 59 BF 1B 98 38 0A E1 70 F9", "ASC", 0 }, + /*235*/ { UNICODE_MODE, 0, -1, -1, -1, "aaaaaa", 0, 0, 12, 12, 1, "EF 59 BF 59 BF 1B 98 38 0A E1 70 F9", "TTTTTT", 0 }, + /*236*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "AAAAAAAAAAAAAA12a", 0, 0, 12, 26, 1, "E6 59 BF 59 BF 59 BF 59 BF 59 B6 25 D2 FE 81 ED 63 5A 30 1D C5 77 70 66 93 2B 6A 40 23 22", "", 0 }, + /*237*/ { UNICODE_MODE, 0, -1, -1, -1, "AAAAAAAAAAAAAA12a", 0, 0, 12, 26, 0, "E6 59 BF 59 BF 59 BF 59 BF FE 42 42 8E 62 81 ED 19 C5 3F C8 AC F1 E9 F5 68 75 AA 6C 14 72", "CCCCCCCCCCCCAAAAA; BWIPP same as FAST_MODE", 0 }, + /*238*/ { UNICODE_MODE | FAST_MODE, 0, -1, -1, -1, "1234ééé12", 0, 0, 8, 32, 1, "8E A4 E7 59 D5 6B EB 6A 8E 81 22 4D 35 A9 CA 58 B3 1B 33 B7 DD", "", 0 }, + /*239*/ { UNICODE_MODE, 0, -1, -1, -1, "1234ééé12", 0, 0, 14, 14, 1, "8E A4 E7 5A D5 6B 01 8E 1C 5C 58 A7 11 8D DD A8 D6 B9", "", 1 }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -724,52 +944,6 @@ static void test_input(int index, int generate, int debug) { length = testUtilSetSymbol(symbol, BARCODE_DATAMATRIX, data[i].input_mode, data[i].eci, -1 /*option_1*/, data[i].option_2, data[i].option_3, data[i].output_options, data[i].data, -1, debug); - // Check minimize only? (TODO: remove in the not-too-distant future) - if (debug & ZINT_DEBUG_TEST_MINIMIZE) { // -d 512 - unsigned char binary[2][2200]; - int inputlen; - int binlen; - int variant; - int binlens[2] = {0}; - - if (data[i].ret != 0) { - ZBarcode_Delete(symbol); - continue; - } - - variant = 0; - inputlen = length; - binlen = 0; - ret = dm200encode_variant(symbol, (unsigned char *) data[i].data, binary[0], &inputlen, &binlen, variant); - assert_equal(ret, data[i].ret, "i:%d dm200encode_variant(%d) ret %d != %d (%s)\n", variant, i, ret, data[i].ret, symbol->errtxt); - - binlens[variant] = binlen; - - variant = 1; - inputlen = length; - binlen = 0; - ret = dm200encode_variant(symbol, (unsigned char *) data[i].data, binary[1], &inputlen, &binlen, variant); - assert_equal(ret, data[i].ret, "i:%d dm200encode_variant(%d) ret %d != %d (%s)\n", variant, i, ret, data[i].ret, symbol->errtxt); - - binlens[variant] = binlen; - - assert_equal(binlens[0], binlens[1] + data[i].expected_diff, "i:%d binlens[0] %d != %d binlens[1] (%d) + expected_diff (%d)\n", - i, binlens[0], binlens[1] + data[i].expected_diff, binlens[1], data[i].expected_diff); - - if (debug & ZINT_DEBUG_TEST_PRINT) { - if (data[i].expected_diff == 0) { - if (memcmp(binary[0], binary[1], binlen) != 0) { - printf("i:%d binaries differ\n", i); - } - } else { - printf("i:%d diff %d\n", i, data[i].expected_diff); - } - } - - ZBarcode_Delete(symbol); - continue; - } - 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); @@ -814,6 +988,54 @@ static void test_input(int index, int generate, int debug) { i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped); } } + + if (ret < ZINT_ERROR) { + if (i && (data[i].input_mode & 0x07) == (data[i - 1].input_mode & 0x07) && !(data[i].input_mode & FAST_MODE) && (data[i - 1].input_mode & FAST_MODE) + && data[i].eci == data[i - 1].eci && data[i].option_2 == data[i - 1].option_2 + && data[i].option_3 == data[i - 1].option_3 && data[i].output_options == data[i - 1].output_options + && strcmp(data[i].data, data[i - 1].data) == 0) { + unsigned char binary[2][2200]; + int inputlen; + int binlen; + int binlens[2] = {0}; + unsigned char reduced[1000]; + unsigned char *text; + + assert_equal(data[i].expected_rows * data[i].expected_width <= data[i - 1].expected_rows * data[i - 1].expected_width, 1, + "i:%d data[i].expected_rows * data[i].expected_width %d > data[i - 1].expected_rows * data[i - 1].expected_width %d\n", i, + data[i].expected_rows * data[i].expected_width, data[i - 1].expected_rows * data[i - 1].expected_width); + + if ((data[i].input_mode & 0x07) == GS1_MODE) { + ret = gs1_verify(symbol, (unsigned char *) data[i].data, length, reduced); + assert_zero(ret, "i:%d gs1_verify() ret %d != 0 (%s)\n", i, ret, symbol->errtxt); + length = (int) ustrlen(reduced); + text = reduced; + } else { + text = (unsigned char *) data[i].data; + } + inputlen = length; + binlen = 0; + symbol->input_mode = data[i - 1].input_mode; + ret = dm_encode(symbol, text, binary[0], &inputlen, &binlen); + assert_zero(ret, "i:%d dm_encode() FAST_MODE ret %d != 0 (%s)\n", i, ret, symbol->errtxt); + + binlens[0] = binlen; + + inputlen = length; + binlen = 0; + symbol->input_mode = data[i].input_mode; + ret = dm_encode(symbol, text, binary[1], &inputlen, &binlen); + assert_zero(ret, "i:%d dm_encode() minimal ret %d != 0 (%s)\n", i, ret, symbol->errtxt); + + binlens[1] = binlen; + + assert_equal(binlens[0], binlens[1] + data[i].expected_diff, "i:%d binlens[0] %d != %d binlens[1] (%d) + expected_diff (%d)\n", + i, binlens[0], binlens[1] + data[i].expected_diff, binlens[1], data[i].expected_diff); + if (data[i].expected_diff >= 0) { + assert_equal(binlens[1] <= binlens[0], 1, "i:%d binlens[1] %d > binlens[0] %d\n", i, binlens[1], binlens[0]); + } + } + } } ZBarcode_Delete(symbol); @@ -838,13 +1060,13 @@ static void test_encode(int index, int generate, int debug) { int expected_width; int bwipp_cmp; char *comment; - int expected_diff; // Check minimize only (TODO: remove in the not-too-distant future) + int expected_diff; // Difference between default minimal encodation and ISO encodation (FAST_MODE) char *expected; }; // Verified manually against ISO/IEC 16022:2006, ISO/IEC 21471:2020, GS1 General Specifications 21.0.1 (GGS), ANSI/HIBC LIC 2.6-2016 (HIBC/LIC) and // ANSI/HIBC PAS 1.3-2010 (HIBC/PAS), with noted exceptions struct item data[] = { - /* 0*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "1234abcd", 0, 14, 14, 1, "", 0, + /* 0*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "1234abcd", 0, 14, 14, 1, "", 0, "10101010101010" "11001010001111" "11000101100100" @@ -860,7 +1082,23 @@ static void test_encode(int index, int generate, int debug) { "10011111000100" "11111111111111" }, - /* 1*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "A1B2C3D4E5F6G7H8I9J0K1L2", 0, 18, 18, 1, "16022:2006 Figure 1", 0, + /* 1*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "1234abcd", 0, 14, 14, 1, "", 0, + "10101010101010" + "11001010001111" + "11000101100100" + "11001001100001" + "11011001110000" + "10100101011001" + "10101110011000" + "10011101100101" + "10100001001000" + "10101000001111" + "11101100000010" + "11010010100101" + "10011111000100" + "11111111111111" + }, + /* 2*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "A1B2C3D4E5F6G7H8I9J0K1L2", 0, 18, 18, 1, "16022:2006 Figure 1", 0, "101010101010101010" "101000101010001111" "101100000111000010" @@ -880,7 +1118,27 @@ static void test_encode(int index, int generate, int debug) { "100011000000100100" "111111111111111111" }, - /* 2*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "123456", 0, 10, 10, 1, "16022:2006 Figure O.2", 0, + /* 3*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "A1B2C3D4E5F6G7H8I9J0K1L2", 0, 18, 18, 1, "16022:2006 Figure 1", 0, + "101010101010101010" + "101000101010001111" + "101100000111000010" + "100000101110100111" + "100100000100011100" + "101011111010101111" + "100110011111110110" + "110011101111111101" + "111111111101111100" + "101110110100101101" + "100010110101001110" + "101101111001100001" + "110001101010011110" + "110110100000100011" + "101101001101011010" + "100010011001011011" + "100011000000100100" + "111111111111111111" + }, + /* 4*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "123456", 0, 10, 10, 1, "16022:2006 Figure O.2", 0, "1010101010" "1100101101" "1100000100" @@ -892,7 +1150,19 @@ static void test_encode(int index, int generate, int debug) { "1001110100" "1111111111" }, - /* 3*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "30Q324343430794\\R06\\G+/ACMRN123456/V2009121908334\\R\\E", 0, 20, 20, 1, "HIBC/PAS 1.3-2010 Section 2.2 Patient Id Macro, same", 0, + /* 47*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, DM_SQUARE, "/ACMRN123456/V200912190833", 0, 20, 20, 0, "HIBC/PAS Section 2.2 Patient Id **NOT SAME** (see FAST_MODE); BWIPP same as FAST_MODE", 0, + "10101010101010101010" + "11000000010011001111" + "11010001101010110110" + "11101100111001000001" + "10001010101010111010" + "10100001110011010001" + "10011110100100111110" + "11110000100001110011" + "11111100011101010100" + "11001011000010111101" + "11001010110111011000" + "11000001100110010111" + "11110010111001001100" + "10011101100110011111" + "11111010100111110110" + "11011101010001001011" + "11011101110001110010" + "11110001110101111101" + "11100110100110001010" + "11111111111111111111" + }, + /* 48*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, "[)>\\R06\\G+/ACMRN123456/V2009121908334\\R\\E", 0, 20, 20, 1, "HIBC/PAS 1.3-2010 Section 2.2 Patient Id Macro, same", 0, "10101010101010101010" "10000000001110001111" "11010101001010011100" @@ -1364,7 +2084,29 @@ static void test_encode(int index, int generate, int debug) { "11100110001010111010" "11111111111111111111" }, - /* 25*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/EO523201", 0, 14, 14, 1, "HIBC/PAS Section 2.2 Purchase Order, same", 0, + /* 49*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R06\\G+/ACMRN123456/V2009121908334\\R\\E", 0, 20, 20, 0, "HIBC/PAS 1.3-2010 Section 2.2 Patient Id Macro **NOT SAME** (see FAST_MODE); BWIPP same as FAST_MODE", 0, + "10101010101010101010" + "11111011001110001111" + "11100100001010011100" + "10000000011100111101" + "11000111101011011100" + "11110100000101011011" + "10101111101010010000" + "10010010001010101111" + "11110010010110111010" + "11010010011010110101" + "10010001110101110010" + "11101101100101000111" + "11101010010100101100" + "11000110100010000111" + "11001111001101111110" + "11010111100010100101" + "11011001111000110010" + "11011001110001011101" + "11011111001010100010" + "11111111111111111111" + }, + /* 50*/ { BARCODE_HIBC_DM, FAST_MODE, -1, -1, -1, -1, "/EO523201", 0, 14, 14, 1, "HIBC/PAS Section 2.2 Purchase Order, same", 0, "10101010101010" "10011001010101" "11101000011010" @@ -1380,7 +2122,23 @@ static void test_encode(int index, int generate, int debug) { "10010010000100" "11111111111111" }, - /* 26*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, DM_SQUARE, "/EU720060FF0/O523201", 0, 18, 18, 1, "HIBC/PAS Section 2.2 2nd Purchase Order, same", 0, + /* 51*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/EO523201", 0, 14, 14, 1, "HIBC/PAS Section 2.2 Purchase Order, same", 0, + "10101010101010" + "10011001010101" + "11101000011010" + "10001100011101" + "11101100101100" + "10100001101111" + "10010001010110" + "10000001011001" + "11100000010100" + "11011010100101" + "10111110101110" + "11110000101101" + "10010010000100" + "11111111111111" + }, + /* 52*/ { BARCODE_HIBC_DM, FAST_MODE, -1, -1, -1, DM_SQUARE, "/EU720060FF0/O523201", 0, 18, 18, 1, "HIBC/PAS Section 2.2 2nd Purchase Order, same", 0, "101010101010101010" "100110010100100001" "111011110110010110" @@ -1400,7 +2158,27 @@ static void test_encode(int index, int generate, int debug) { "111000010011001010" "111111111111111111" }, - /* 27*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/EU720060FF0/O523201/Z34H159/M9842431340", 0, 22, 22, 1, "HIBC/PAS Section 2.2 3rd Purchase Order (left), same", 0, + /* 53*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, DM_SQUARE, "/EU720060FF0/O523201", 0, 18, 18, 1, "HIBC/PAS Section 2.2 2nd Purchase Order, same", 0, + "101010101010101010" + "100110010100100001" + "111011110110010110" + "100000101110011001" + "111001001010000100" + "100000000000011101" + "100101100000101110" + "111000000111111011" + "110110111000101010" + "101001000111000111" + "100011110101010110" + "111111001101010011" + "100000000001101000" + "110100100011011111" + "111000100110101110" + "111010100101000011" + "111000010011001010" + "111111111111111111" + }, + /* 54*/ { BARCODE_HIBC_DM, FAST_MODE, -1, -1, -1, -1, "/EU720060FF0/O523201/Z34H159/M9842431340", 0, 22, 22, 1, "HIBC/PAS Section 2.2 3rd Purchase Order (left), same", 0, "1010101010101010101010" "1001100101001000000011" "1110111101100001111010" @@ -1424,7 +2202,31 @@ static void test_encode(int index, int generate, int debug) { "1010110000010001001000" "1111111111111111111111" }, - /* 28*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R06\\G+/EU720060FF0/O523201/Z34H159/M9842431340V\\R\\E", 0, 22, 22, 1, "HIBC/PAS Section 2.2 3rd Purchase Order (right), same", 0, + /* 55*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/EU720060FF0/O523201/Z34H159/M9842431340", 0, 22, 22, 1, "HIBC/PAS Section 2.2 3rd Purchase Order (left), same", 0, + "1010101010101010101010" + "1001100101001000000011" + "1110111101100001111010" + "1000001011101100111111" + "1110010010010000111100" + "1000000000011100000111" + "1001011010011000001110" + "1110000010001001101001" + "1101100110001010100100" + "1010010011011101000101" + "1000100011010000001110" + "1111010100101000010111" + "1000001001011011101110" + "1111110111111101100011" + "1001010110011010000000" + "1101010100110100010011" + "1001010011000110000000" + "1111001010100101110111" + "1100110010110011010000" + "1100001011100001000111" + "1010110000010001001000" + "1111111111111111111111" + }, + /* 56*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, "[)>\\R06\\G+/EU720060FF0/O523201/Z34H159/M9842431340V\\R\\E", 0, 22, 22, 1, "HIBC/PAS Section 2.2 3rd Purchase Order (right), same", 0, "1010101010101010101010" "1000000000111010011101" "1101011100101001011100" @@ -1448,7 +2250,31 @@ static void test_encode(int index, int generate, int debug) { "1001110110011101101000" "1111111111111111111111" }, - /* 29*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/E+/KN12345", 0, 16, 16, 1, "HIBC/PAS Section 2.2 Asset Tag **NOT SAME** check digit 'A' in figure is for '/KN12345', but actual data is as given here, when check digit is 'J'", 0, + /* 57*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R06\\G+/EU720060FF0/O523201/Z34H159/M9842431340V\\R\\E", 0, 22, 22, 1, "HIBC/PAS Section 2.2 3rd Purchase Order (right), same", 0, + "1010101010101010101010" + "1000000000111010011101" + "1101011100101001011100" + "1100010000000001101001" + "1111110110000111100000" + "1100100000110011001101" + "1001011001000010000110" + "1000100101110111110111" + "1100001001110111111100" + "1011111001001010001101" + "1000011000010100101010" + "1111001101110100101101" + "1110001101101100001100" + "1001010101111010110011" + "1000110111011100101010" + "1111110011011111010101" + "1101000011100111101110" + "1011000010010100110111" + "1001110101111101000000" + "1110101001011011000111" + "1001110110011101101000" + "1111111111111111111111" + }, + /* 58*/ { BARCODE_HIBC_DM, FAST_MODE, -1, -1, -1, -1, "/E+/KN12345", 0, 16, 16, 1, "HIBC/PAS Section 2.2 Asset Tag **NOT SAME** check digit 'A' in figure is for '/KN12345', but actual data is as given here, when check digit is 'J'", 0, "1010101010101010" "1001101010001111" "1110001000101100" @@ -1466,7 +2292,25 @@ static void test_encode(int index, int generate, int debug) { "1001000000000010" "1111111111111111" }, - /* 30*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/LAH123/NC903", 0, 16, 16, 1, "HIBC/PAS Section 2.2 Surgical Instrument, same", 0, + /* 59*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/E+/KN12345", 0, 16, 16, 0, "HIBC/PAS Section 2.2 Asset Tag **NOT SAME** see above; BWIPP same as FAST_MODE", 0, + "1010101010101010" + "1100011011001011" + "1101100111000110" + "1110111101000011" + "1010100000010010" + "1011001001000111" + "1001100110111110" + "1100001111011001" + "1011101101000110" + "1001011010011111" + "1111001001000000" + "1101100000100011" + "1100110101110000" + "1100011111111101" + "1001111001100010" + "1111111111111111" + }, + /* 60*/ { BARCODE_HIBC_DM, FAST_MODE, -1, -1, -1, -1, "/LAH123/NC903", 0, 16, 16, 1, "HIBC/PAS Section 2.2 Surgical Instrument, same", 0, "1010101010101010" "1001010001010001" "1110010100000100" @@ -1484,7 +2328,25 @@ static void test_encode(int index, int generate, int debug) { "1100000101010010" "1111111111111111" }, - /* 31*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, 7, -1, "[)>\\R06\\G18VD89536\\G1P8902A\\GS3122A02965\\R\\E", 0, 22, 22, 1, "ANSI MH10.8.17-2017 Figure 4 Macro06 **NOT SAME** 253-state randomising of padding in figure seems incorrect", 0, + /* 61*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, -1, "/LAH123/NC903", 0, 16, 16, 0, "HIBC/PAS Section 2.2 Surgical Instrument **NOT SAME** (see FAST_MODE); BWIPP same as FAST_MODE", 0, + "1010101010101010" + "1111000001001111" + "1110010001010110" + "1000001101100111" + "1111000100100100" + "1000001111111001" + "1011111000101100" + "1010000000111101" + "1001111100000100" + "1001101000011111" + "1111010001010110" + "1000001001111101" + "1111101010000010" + "1101010100000101" + "1110011111101010" + "1111111111111111" + }, + /* 62*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, 7, -1, "[)>\\R06\\G18VD89536\\G1P8902A\\GS3122A02965\\R\\E", 0, 22, 22, 1, "ANSI MH10.8.17-2017 Figure 4 Macro06 **NOT SAME** 253-state randomising of padding in figure seems incorrect", 0, "1010101010101010101010" "1101110000111001011011" "1010111010001010001110" @@ -1508,7 +2370,31 @@ static void test_encode(int index, int generate, int debug) { "1000001010010010110100" "1111111111111111111111" }, - /* 32*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R06\\G25S0614141MH80312\\R\\E", 0, 16, 16, 1, "ANSI MH10.8.17-2017 Table B.1 B7", 0, + /* 63*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, 7, -1, "[)>\\R06\\G18VD89536\\G1P8902A\\GS3122A02965\\R\\E", 0, 22, 22, 1, "ANSI MH10.8.17-2017 Figure 4 Macro06 **NOT SAME** 253-state randomising of padding in figure seems incorrect", 0, + "1010101010101010101010" + "1101110000111001011011" + "1010111010001010001110" + "1100011100101001000111" + "1110011000100010001100" + "1111011100011001000101" + "1011101101000101111010" + "1100101100010101010111" + "1110101001001000001100" + "1000010001111000110101" + "1110111001110000001000" + "1010100011101000011011" + "1100010101011110111010" + "1011011000011100011111" + "1011001001000101100110" + "1000000111001100000001" + "1011110001100011000010" + "1100110100000110100111" + "1100011111110000001110" + "1100110010010010001101" + "1000001010010010110100" + "1111111111111111111111" + }, + /* 64*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, "[)>\\R06\\G25S0614141MH80312\\R\\E", 0, 16, 16, 1, "ANSI MH10.8.17-2017 Table B.1 B7", 0, "1010101010101010" "1101000010101111" "1011100001011100" @@ -1526,7 +2412,25 @@ static void test_encode(int index, int generate, int debug) { "1010101010001010" "1111111111111111" }, - /* 33*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R05\\G80040614141MH80312\\R\\E", 0, 16, 16, 1, "ANSI MH10.8.17-2017 Table B.1 B8", 0, + /* 65*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R06\\G25S0614141MH80312\\R\\E", 0, 16, 16, 1, "ANSI MH10.8.17-2017 Table B.1 B7", 0, + "1010101010101010" + "1101000010101111" + "1011100001011100" + "1011010001010101" + "1110000110111010" + "1101010011011111" + "1000010001111100" + "1101100111110101" + "1100101101001100" + "1010100000001111" + "1001100010010100" + "1001000000000101" + "1011110011000010" + "1110101111010101" + "1010101010001010" + "1111111111111111" + }, + /* 66*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE | FAST_MODE, -1, -1, -1, -1, "[)>\\R05\\G80040614141MH80312\\R\\E", 0, 16, 16, 1, "ANSI MH10.8.17-2017 Table B.1 B8", 0, "1010101010101010" "1111100010001111" "1010100001100100" @@ -1544,7 +2448,25 @@ static void test_encode(int index, int generate, int debug) { "1010000010101010" "1111111111111111" }, - /* 34*/ { BARCODE_DATAMATRIX, DATA_MODE, 3, -1, -1, -1, "\101\300", 0, 12, 12, 1, "AÀ", 0, + /* 67*/ { BARCODE_DATAMATRIX, DATA_MODE | ESCAPE_MODE, -1, -1, -1, -1, "[)>\\R05\\G80040614141MH80312\\R\\E", 0, 16, 16, 1, "ANSI MH10.8.17-2017 Table B.1 B8", 0, + "1010101010101010" + "1111100010001111" + "1010100001100100" + "1010010001011001" + "1110000110000110" + "1001010011101111" + "1000010010001100" + "1101100111110101" + "1100101000101100" + "1010100001010011" + "1001001100111100" + "1001110010011101" + "1001011000010100" + "1100110000010101" + "1010000010101010" + "1111111111111111" + }, + /* 68*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, 3, -1, -1, -1, "\101\300", 0, 12, 12, 1, "AÀ", 0, "101010101010" "100010101111" "100001011110" @@ -1558,7 +2480,21 @@ static void test_encode(int index, int generate, int debug) { "100011011010" "111111111111" }, - /* 35*/ { BARCODE_DATAMATRIX, UNICODE_MODE, 26, -1, -1, -1, "AÀ", 0, 14, 14, 1, "AÀ", 0, + /* 69*/ { BARCODE_DATAMATRIX, DATA_MODE, 3, -1, -1, -1, "\101\300", 0, 12, 12, 1, "AÀ", 0, + "101010101010" + "100010101111" + "100001011110" + "110000010001" + "101100110000" + "110010100111" + "101011011100" + "110100111101" + "101100110100" + "101011100101" + "100011011010" + "111111111111" + }, + /* 70*/ { BARCODE_DATAMATRIX, UNICODE_MODE | FAST_MODE, 26, -1, -1, -1, "AÀ", 0, 14, 14, 1, "AÀ", 0, "10101010101010" "10001010100001" "10110101100100" @@ -1574,7 +2510,23 @@ static void test_encode(int index, int generate, int debug) { "11000110001100" "11111111111111" }, - /* 36*/ { BARCODE_DATAMATRIX, UNICODE_MODE, -1, -1, -1, DM_SQUARE, "abcdefgh+", 0, 16, 16, 1, "TEX last_shift 2, symbols_left 1, process_p 1", 0, + /* 71*/ { BARCODE_DATAMATRIX, UNICODE_MODE, 26, -1, -1, -1, "AÀ", 0, 14, 14, 1, "AÀ", 0, + "10101010101010" + "10001010100001" + "10110101100100" + "10110001000101" + "10111000100010" + "11101011110011" + "10011100001100" + "10001100101111" + "10110110111110" + "10000111010001" + "10000001111000" + "11110100110001" + "11000110001100" + "11111111111111" + }, + /* 72*/ { BARCODE_DATAMATRIX, UNICODE_MODE | FAST_MODE, -1, -1, -1, DM_SQUARE, "abcdefgh+", 0, 16, 16, 1, "TEX last_shift 2, symbols_left 1, process_p 1", 0, "1010101010101010" "1010011011101001" "1011001010010010" @@ -1592,7 +2544,23 @@ static void test_encode(int index, int generate, int debug) { "1101110101001010" "1111111111111111" }, - /* 37*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200", 0, 8, 32, 1, "7 BASE256s, 1 pad", 0, + /* 73*/ { BARCODE_DATAMATRIX, UNICODE_MODE, -1, -1, -1, DM_SQUARE, "abcdefgh+", 0, 14, 14, 0, "ATTTTTTTT; BWIPP same as FAST_MODE", 1, + "10101010101010" + "11100001010101" + "11010101001000" + "11111100011011" + "10100110000010" + "10001000100111" + "10101100101000" + "10001000110011" + "11101101100100" + "10101101000011" + "10110100100010" + "11101010101001" + "10111011000100" + "11111111111111" + }, + /* 74*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200", 0, 8, 32, 1, "7 BASE256s, 1 pad", 0, "10101010101010101010101010101010" "10000101000011011000110100100001" "11100111110101001011101110100010" @@ -1602,7 +2570,17 @@ static void test_encode(int index, int generate, int debug) { "11010000111100001010011101100100" "11111111111111111111111111111111" }, - /* 38*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200", 0, 8, 32, 1, "8 BASE256s, no padding", 0, + /* 75*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200", 0, 8, 32, 1, "7 BASE256s, 1 pad", 0, + "10101010101010101010101010101010" + "10000101000011011000110100100001" + "11100111110101001011101110100010" + "10111011010100111110010110001011" + "11001000110001101000001111000010" + "11000010000001111000100101001011" + "11010000111100001010011101100100" + "11111111111111111111111111111111" + }, + /* 76*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200", 0, 8, 32, 1, "8 BASE256s, no padding", 0, "10101010101010101010101010101010" "10000101000011011111001101000001" "11010111110101001001011001100010" @@ -1612,7 +2590,17 @@ static void test_encode(int index, int generate, int debug) { "11010000110010001001010001111000" "11111111111111111111111111111111" }, - /* 39*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, DM_SQUARE, "\200\200\200\200\200\200\200\200\200\200", 0, 16, 16, 1, "8 BASE256s, square, no padding", 0, + /* 77*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200", 0, 8, 32, 1, "8 BASE256s, no padding", 0, + "10101010101010101010101010101010" + "10000101000011011111001101000001" + "11010111110101001001011001100010" + "11001011010111111010001100100011" + "11001000110000101011101100011010" + "11000010000001111000010010110011" + "11010000110010001001010001111000" + "11111111111111111111111111111111" + }, + /* 78*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, DM_SQUARE, "\200\200\200\200\200\200\200\200\200\200", 0, 16, 16, 1, "8 BASE256s, square, no padding", 0, "1010101010101010" "1000010100001101" "1101011111101110" @@ -1630,7 +2618,25 @@ static void test_encode(int index, int generate, int debug) { "1111000011111010" "1111111111111111" }, - /* 40*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200", 0, 16, 16, 1, "9 BASE256s, 1 pad", 0, + /* 79*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, DM_SQUARE, "\200\200\200\200\200\200\200\200\200\200", 0, 16, 16, 1, "8 BASE256s, square, no padding", 0, + "1010101010101010" + "1000010100001101" + "1101011111101110" + "1100101101000101" + "1000100000110000" + "1100011100010111" + "1001010100101100" + "1110111010010111" + "1000111000010110" + "1110001101001001" + "1000110011010000" + "1011110101001101" + "1000000010101100" + "1001001000100101" + "1111000011111010" + "1111111111111111" + }, + /* 80*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200", 0, 16, 16, 1, "9 BASE256s, 1 pad", 0, "1010101010101010" "1000010101001101" "1110011111000010" @@ -1648,7 +2654,25 @@ static void test_encode(int index, int generate, int debug) { "1100000011011010" "1111111111111111" }, - /* 41*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 22, 22, 1, "22 BASE256s, 6 pads", 0, + /* 81*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200", 0, 16, 16, 1, "9 BASE256s, 1 pad", 0, + "1010101010101010" + "1000010101001101" + "1110011111000010" + "1101101101010101" + "1000100000001010" + "1100011001101111" + "1001010111100100" + "1110111001100111" + "1000111101000010" + "1110001101001101" + "1000011111001000" + "1011001101010111" + "1010101000000000" + "1011001001011101" + "1100000011011010" + "1111111111111111" + }, + /* 82*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 22, 22, 1, "22 BASE256s, 6 pads", 0, "1010101010101010101010" "1010010100011100010101" "1000011110111110001100" @@ -1672,7 +2696,31 @@ static void test_encode(int index, int generate, int debug) { "1111101000110111010100" "1111111111111111111111" }, - /* 42*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, DM_DMRE, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 8, 64, 1, "22 BASE256s, no padding", 0, + /* 83*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 22, 22, 1, "22 BASE256s, 6 pads", 0, + "1010101010101010101010" + "1010010100011100010101" + "1000011110111110001100" + "1010101100010111000101" + "1000100000010100110110" + "1100011100101000100101" + "1001010100111101110100" + "1110111000010101110111" + "1000111010101000101100" + "1110000111111001100111" + "1000000111110100001010" + "1011110011101111101001" + "1111000101101110010000" + "1100011000111101111001" + "1111001010100110101110" + "1111000100111010000001" + "1110000100011110101100" + "1100010001111011110101" + "1000101001101111011100" + "1111110010000111001001" + "1111101000110111010100" + "1111111111111111111111" + }, + /* 84*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, DM_DMRE, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 8, 64, 1, "22 BASE256s, no padding", 0, "1010101010101010101010101010101010101010101010101010101010101010" "1000010101100011101010101011101111110100100110011100010011010111" "1101011110001010110000001110001010001011010111001010101101100000" @@ -1682,7 +2730,17 @@ static void test_encode(int index, int generate, int debug) { "1101000011001010111101101101110010111100111101001010010011001000" "1111111111111111111111111111111111111111111111111111111111111111" }, - /* 43*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 1, "249 BASE256s + 6 ASCII (3 double-digits)", 0, + /* 85*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, DM_DMRE, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 8, 64, 1, "22 BASE256s, no padding", 0, + "1010101010101010101010101010101010101010101010101010101010101010" + "1000010101100011101010101011101111110100100110011100010011010111" + "1101011110001010110000001110001010001011010111001010101101100000" + "1100101000110001110100000001100110010100111101111110000010011111" + "1000100101001000110110101110011011110110111010101110010111001100" + "1100001101011011111101111000110110110101110110111111011010011111" + "1101000011001010111101101101110010111100111101001010010011001000" + "1111111111111111111111111111111111111111111111111111111111111111" + }, + /* 86*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 1, "249 BASE256s + 6 ASCII (3 double-digits)", 0, "1010101010101010101010101010101010101010101010101010101010101010" "1000010100011101100000010111100110100010110111011011111010000001" "1100011110111110100110111101111010101101000010001101001011001100" @@ -1748,7 +2806,73 @@ static void test_encode(int index, int generate, int debug) { "1000001101010100110010010110101010000000001010101100100011101010" "1111111111111111111111111111111111111111111111111111111111111111" }, - /* 44*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 0, "249 BASE256s + 8 ASCII (Sh A80 + 3 double-digits); BWIPP uses 2nd B256 length byte instead of ASCII shift (same no. of codewords)", 0, + /* 87*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 1, "249 BASE256s + 6 ASCII (3 double-digits)", 0, + "1010101010101010101010101010101010101010101010101010101010101010" + "1000010100011101100000010111100110100010110111011011111010000001" + "1100011110111110100110111101111010101101000010001101001011001100" + "1101101100010111110011110010101111111101101111111000111010011111" + "1000100000010100101110100100010011101111110111101111000010011100" + "1100011100101001111000111100010110100000001000111000010111011111" + "1001010100111000110001000111000010000110010001101001010100110110" + "1110111000001001100110011110010110100111101011111101110000100001" + "1000111010111010101111110111010011110010010000101011111100100100" + "1110000111101011110100011110010111101001010010011010011100101111" + "1000000110110110101100000110101010111110101110001001100111001010" + "1011110011010011100100010101110110010111100011011011000101010001" + "1111000000110100100110001000001010110000101101001000110010011100" + "1100010111100011111010011010011110001011111110011001011110110101" + "1111011001000110110011110110010010011101001110101110100000100000" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1110001011011001101110110011001111000100100101111110101111000101" + "1110110010110010111000100100011010010000000010101111111101011000" + "1101000010101101110111100001111110100100111100111100010010010011" + "1000100110010100110000111011001011101101110101001001100110110100" + "1111100101011001100001011010011111100110001111111010101010010111" + "1000001111111110110101011001100011101101000010101100111010001110" + "1111000000111101101111010011010111000001100001111110000100000001" + "1111010010101010100000011000001010001110111110101110000001111010" + "1011001001000111100000011010011110111101001101011110111011000001" + "1000010001100010101101001011010011100111000010101001111100101110" + "1111011010100001111100001110110111001001101010111111110010101101" + "1110100001010010100001011000100010001010100100001101110101001100" + "1111111110101101111011010111110111101000001011011110100000000011" + "1001110010110010111011001000101011011110110101101001001010101100" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1101000101000011110110000010110111101010011000011011010101000001" + "1101111101111010110111110101100011001010001010101100011011100010" + "1011011101111111111111010000101111011110000101011000011000100011" + "1011011110000100101000101100100011100101110101001110000101001100" + "1000101100001001110001110111011111000100111010111111011110001001" + "1010100101101000110000011111110011001100101111101000111000101100" + "1100001101001011101001110000100110000100011001011100010001000011" + "1100000011000000110100100100111011000111110110001101011110011110" + "1001100111111111101100110100011110111000010011111000001000111111" + "1010100111101010101001000101100011100100011101001000011100011010" + "1100100101001111101001111111011111100110000101111001111100010011" + "1111100101100000100001110001101011001111010110101000001110010100" + "1110111011000011110010010010111111001001010110011011010111010011" + "1011110001011110101100100110011010111110100001001010011101010110" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1110111000110011111011100100010111000011100101011011101100010011" + "1110110010010110100100001110111010010110110001101111010100110000" + "1001001101100001111011100010000110011101011001111010001001111001" + "1010011111000110111100001110010010011010011010101000100111101000" + "1011111111010001100011010010011111110100000001111000101111110011" + "1011011011010000111100000011000010100000011010001100111100001100" + "1010100010001111100111010000110110101100110010011011101100010101" + "1010001000011110101101010000111011011001111110001100011011110010" + "1100100011011111101101110100101111011111010101011000011100100101" + "1110001110100110101011000111000011111100100000001001111000001110" + "1111011111010111111111110100001110110110001101011111010010010111" + "1111110000011000100110001110001010111110000000001010111101111100" + "1010101010110001100001110010110111111100001000011001001011101101" + "1000001101010100110010010110101010000000001010101100100011101010" + "1111111111111111111111111111111111111111111111111111111111111111" + }, + /* 88*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 0, "249 BASE256s + 8 ASCII (Sh A80 + 3 double-digits); BWIPP uses 2nd B256 length byte instead of ASCII shift (same no. of codewords)", 0, "1010101010101010101010101010101010101010101010101010101010101010" "1000010100011101100000010111100110100010110111011011111010000001" "1100011110111110100110111101111010101101000010001101001011001100" @@ -1814,7 +2938,73 @@ static void test_encode(int index, int generate, int debug) { "1000001101010100110100010100101010001100001000101100101001101010" "1111111111111111111111111111111111111111111111111111111111111111" }, - /* 45*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 1, "10 ASCII + 251 BASE256s + 6 ASCII", 0, + /* 89*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 0, "249 BASE256s + 8 ASCII (Sh A80 + 3 double-digits); BWIPP uses 2nd B256 length byte instead of ASCII shift (same no. of codewords)", 0, + "1010101010101010101010101010101010101010101010101010101010101010" + "1000010100011101100000010111100110100010110111011011111010000001" + "1100011110111110100110111101111010101101000010001101001011001100" + "1101101100010111110011110010101111111101101111111000111010011111" + "1000100000010100101110100100010011101111110111101111000010011100" + "1100011100101001111000111100010110100000001000111000010111011111" + "1001010100111000110001000111000010000110010001101001010100110110" + "1110111000001001100110011110010110100111101011111101110000100001" + "1000111010111010101111110111010011110010010000101011111100100100" + "1110000111101011110100011110010111101001010010011010011100101111" + "1000000110110110101100000110101010111110101110001001100111001010" + "1011110011010011100100010101110110010111100011011011000101010001" + "1111000000110100100110001000001010110000101101001000110010011100" + "1100010111100011111010011010011110001011111110011001011110100101" + "1111011001000110110011110110010010011101001110101110100000111100" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1110001011011001101110110011001111000100100101111110101110001101" + "1110110010110010111000100100011010010000000010101111111100110100" + "1101000010101101110111100001111110100100111100111100010000000001" + "1000100110010100110000111011001011101101110101001001100000001100" + "1111100101011001100001011010011111100110001111111010101001000111" + "1000001111111110110101011001100011101101000010101100111101110110" + "1111000000111101101111010011010111000001100001111110000111011001" + "1111010010101010100000011000001010001110111110101111011000110110" + "1011001001000111100000011010011110111101001101011100111100001001" + "1000010001100010101101001011010011100111000010101110100100111110" + "1111011010100001111100001110110111001001101011111100111010000111" + "1110100001010010100001011000100010001010110101101010010100110100" + "1111111110101101111011010111110111101000101010111010111100010011" + "1001110010110010111011001000101011011100011101101100100011101100" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1101000101000011110110000010110111101000011000111110111010011001" + "1101111101111010110111110101100011001000101011101100100111110010" + "1011011101111111111111010000101111010010000110111110001111100111" + "1011011110000100101000101100100011101101110010101111000100001000" + "1000101100001001110001110111011111100100111110111000100100000101" + "1010100101101000110000011111111010100100001011101001001011010010" + "1100001101001011101001110000101111100100000011111111101010100011" + "1100000011000000110100100100100011000101101010101101011011101110" + "1001100111111111101100110100000110111010110011011010001010001111" + "1010100111101010101001000101001011101010101011101100000011001110" + "1100100101001111101001111111011111101011101001011001101101011011" + "1111100101100000100001110001101011011101110000001010101100110100" + "1110111011000011110010010010111111011111110111111110001001101011" + "1011110001011110101100100110011010001101000111001110011110001110" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1110111000110011111011100100010111111011010010011101000000001011" + "1110110010010110100100001110100011101000100110101001000110101000" + "1001001101100001111011100010111111111010011111011010100111110001" + "1010011111000110111100001110111011011000000101101101011000001000" + "1011111111010001100011010011011111001000000100011011100011101111" + "1011011011010000111100001000111010101111011101101101010111001000" + "1010100010001111100111010001110110110101011001011101010011101001" + "1010001000011110101101011010000011001010110101101000110111100000" + "1100100011011111101101011101110110001000001011111000100101111101" + "1110001110100110101001100110100010111111000101001110100100110110" + "1111011111010111111110100001101111100010101100111101010001000111" + "1111110000011000101010110101101010000111111000001011100010000000" + "1010101010110001101001110010010111001010001001011001111101101001" + "1000001101010100110100010100101010001100001000101100101001101010" + "1111111111111111111111111111111111111111111111111111111111111111" + }, + /* 90*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 1, "10 ASCII + 251 BASE256s + 6 ASCII", 0, "1010101010101010101010101010101010101010101010101010101010101010" "1010011010011101100000010111100110100010110111011011111010000001" "1011001010111110100110111101111010101101000010001101001011001100" @@ -1880,7 +3070,73 @@ static void test_encode(int index, int generate, int debug) { "1001010101010100111010010100101010000010001011001100101011101010" "1111111111111111111111111111111111111111111111111111111111111111" }, - /* 46*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 88, 88, 1, "10 ASCII + 252 BASE256s + 10 ASCII + 253 BASE256 + 6 ASCII", 0, + /* 91*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 64, 64, 0, "10 ASCII + 251 BASE256s + 6 ASCII; BWIPP same as FAST_MODE", 0, + "1010101010101010101010101010101010101010101010101010101010101010" + "1010011010011101100000010111100110100010110111011011111010000001" + "1011001010111110100110111101111010101101000010001101001011001100" + "1001100000010111110011110010101111111101101111111000111010011111" + "1010100000010100101110100100010011101111110111101111000010011100" + "1000001101101001111000111100010110100000001000111000010111011111" + "1100010100111000110001000111000010000110010001101001010100110100" + "1111100000001001100110011110010110100111101011111101110000100001" + "1111001010111010101111110111010011110010010000101011111100100110" + "1011110111101011110100011110010111101001010010011010011100101111" + "1001000110110110101100000110101010111110101110001001100111001010" + "1011110011010011100100010101110110010111100011011011000101010111" + "1111000000110100100110001000001010110000101101001000110010011110" + "1000010111100011111010011010011110001011111110011001011110111111" + "1111011001000110110011110110010010011101001110101110100000101000" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1110001011011001101110110011001111000100100101111110101110010001" + "1110110010110010111000100100011010010000000010101111111101110100" + "1101000010101101110111100001111110100100111100111100010000001011" + "1000100110010100110000111011001011101101110101001001100001111100" + "1111100101011001100001011010011111100110001111111010101010010111" + "1000001111111110110101011001100011101101000010101100100110110110" + "1111000000111101101111010011010111000001100001111111011001100001" + "1111010010101010100000011000001010001110111110101111100111000110" + "1011001001000111100000011010011110111101001101011101110100010101" + "1000010001100010101101001011010011100111000010101001100011110110" + "1111011010100001111100001110110111001001101010011111110101111001" + "1110100001010010100001011000100010001010110101001000001100001010" + "1111111110101101111011010111110111101000000011111111001100100011" + "1001110010110010111011001000101011011101000101001001011010011100" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1101000101000011110110000010110111101001011000111110101110110001" + "1101111101111010110111110101100011001110101001101010001110111010" + "1011011101111111111111010000101111011010000100111111100001111011" + "1011011110000100101000101100100011100111110100001100110100001000" + "1000101100001001110001110111011111000100111110011110101001001111" + "1010100101101000110000011111110010001100111010001101000111010100" + "1100001101001011101001110000100111000100110011111101010011101011" + "1100000011000000110100100100101011000110110111101100011111110110" + "1001100111111111101100110100101110111011011111111100010000101111" + "1010100111101010101001000101100011100010010110001111010101010010" + "1100100101001111101001111100011111101100010000011110000010110011" + "1111100101100000100001111100101011101011100110101111011011101000" + "1110111011000011110010010100111111100101101111011011100100011001" + "1011110001011110101100011110010010010011000111001110100010001100" + "1111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010" + "1110111000110011111011101100011111111010011111011110010000101011" + "1110110010010110100100100110000010111011000010101000101111011000" + "1001001101100001111000000010001111011000111000011100010111001001" + "1010011111000110111001001100000011111100100101101100011100001100" + "1011111111010001100111010011000111001011010111011010110000101111" + "1011011011010000100000001101010011100111111100101100011001000000" + "1010100010001111101111010101101110101110101001111000101111100001" + "1010001000011010101101000001010011111100111010101101001111010110" + "1100100011010011101101010000000111111100010100111011001010101101" + "1110001110101100101011010010011011001011000010101000001101000110" + "1111011111100101111110100111011110010111100010111111101000101111" + "1111110010100000100101001001110010011011001100001001000000000000" + "1011101011110001111111111011010110010010000001011001000101111001" + "1001010101010100111110010100001010001100001000001100100011101010" + "1111111111111111111111111111111111111111111111111111111111111111" + }, + /* 92*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066", 0, 88, 88, 1, "10 ASCII + 252 BASE256s + 10 ASCII + 253 BASE256 + 6 ASCII", 0, "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" "1010011010011100000001110111100010001011011111001111101000000110011111111000100110101111" "1011001010111110011010111101111010110100001010010100101100110010101011111110101001100000" @@ -1970,7 +3226,97 @@ static void test_encode(int index, int generate, int debug) { "1101010100110101110000110100001000100000101010010010101110100111001111100010001001001100" "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" }, - /* 47*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 88, 88, 1, "10 ASCII + 252 BASE256s + 10 ASCII + 304 BASE256, no padding", 0, + /* 93*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200" "\061\062\063\064\065\066", 0, 88, 88, 0, "10 ASCII + 252 BASE256s + 10 ASCII + 253 BASE256 + 6 ASCII; BWIPP same as FAST_MODE", 0, + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1010011010011100000001110111100010001011011111001111101000000110011111111000100110101111" + "1011001010111110011010111101111010110100001010010100101100110010101011111110101001100000" + "1001100000010111001111110010101111110110111111100011101001100100011100101011100101001111" + "1010100000010100111010100100010110111111011011111100001001111100101011000101111000110100" + "1000001110101001100011111100010010000000100110100001011101011010111111000101011110001111" + "1100010100111001000100100111000000011001000011100101010011011101001001110001001001110000" + "1111100000001000011001111110010010011110101111110111000000010000011111100000101111100001" + "1111001010111010111110110111010111001001000010101111110010010001101101110001010010011110" + "1011110111101011010001111110010110100101001110001001101011010100011111101100001000111101" + "1001000110110110110000100110101011111010111010000110011111101100001001111011110110101100" + "1011110011010010010001110101110001011110001111001101110110100100011101111010010101001111" + "1111000000110100011000101000001011000010110011000011011001100110001011000110010000100110" + "1000010111100011101001111010011000101111111110000010000000111010011010011110000010000111" + "1111011001000111001110110110010001110100111010111010000011110011101001000010011000110100" + "1110001011011000111011110011001100010010010111110010010110001111011011001010101101010101" + "1110110010110011100010100100011001000000001010111110110100111001101010111110011110101100" + "1101000010101101011111100001111010010011110110010110101011010001111010011100001111100001" + "1000100110010101000010111011001110110111010011000110000101010100001010101111100111010110" + "1111100101011000000101111010011110011000110111110001010110010000111110111110001110011111" + "1000001111111111010100111001100110110100001010110011111111100111001100010101010111010110" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1111000000111100111101110011010100000111101110010000001111101101011100011101100011000001" + "1111010010101010000000111000001000111011110011111100101011100100001110001110101000001110" + "1011001001000110000001111010011011110011001110110010010011011000011100001000010010001001" + "1000010001100010110100101011010110011100001010000100011011111010101110101111000000100110" + "1111011010100001110001101110110100111110000111110110111111111101111010010011011001010011" + "1110100001010010000100111000100000101010010011101000000110011001001001110010111010110110" + "1111111110101101101101110111110110000101101111111110001001011001111111010011001100010011" + "1001110010110011101100101000101101110000010010011101100000111011001000000110110001111100" + "1101000101000011011001100010110100111011100111010101001000101100111100010010110001110001" + "1101111101111011011110110101100100111010011011011011101100110111001111111000100001000110" + "1011011101111111111101110000100110000001001110100111111111011001011010100101011101111011" + "1011011110000100100010101100101010011110010010100101100001110111001001010000001001010000" + "1000101100001001000111110110100000110110111110100101000000111101011011111010000000011111" + "1010100101101001000000111111111011010000110011101100111010001001001000101111010001000110" + "1100001101001010100111110110101000000101011110111001001000101110011100011000010011111011" + "1100000011000001010010100100101000011010001011011110110011100010001011000011001011100110" + "1001100111111110110011101101111010111010111110111001011001010010011110111101100111110111" + "1010100111101010100100100111010110000100010010100000101001010011101001100110011100001110" + "1100100101001110100101111101011101111100000111001111111001111111111010110101000110001011" + "1111100101100000000110111100010011111110100011011001010011111101101101111000011111100100" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1110111011000011000011100110100001000011101111100100110001010001111011011111000010100101" + "1011110001011110110010111000010110101100000010111111100001100010101000011111110101110110" + "1110111000110011010011100100101011010111101111001001110010100000111101001100111000110011" + "1110110010010110010110111110000100011110100010011011010001110101101111111011101100111000" + "1001001101100111110101100101000110000101011110111011100000011101111111000001011001000001" + "1010011111000111111000101110000110010111100010010011100110111111101000111101011000100000" + "1011111111001001110101111101001010101000010111011000011100110001011110010000001100000111" + "1011011011010000010000110011001111000011100010000000001101010100101111011010110100011100" + "1010100011101100011011101011110011110011100110001111000000000010011010011111100010100011" + "1010001000011010111010110110001011000000110011011100011101110111001011000110101000011000" + "1100100001100110110001100001110101111011110111010001010100101011011001000101010100111101" + "1110001111000110110100101110001001101101101011011100101011110011101001110001111010100110" + "1111010000110111100101110001101010000100000110011111110010101110011011111000101000001111" + "1111110011000001111100101110001011010010001011101011010001010000101100100110101101100100" + "1010001100000001101001110011111010100010101111010000011111000110011001000011011001011101" + "1000010111011010100000100111100011110101100011110010101111111011101100110101101011101110" + "1011010111001100001111100100010111111100001111000001011110000001011010101011110111100101" + "1110110110110001011010111001011010001000011011010011001111100101101010100011100001101010" + "1111110001100101100011101101110100111110001110001101001000011100011001010111101000010111" + "1010001001101110110100110011000100001001000010110010100011100101001010001111111111000100" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1000001000101010111111100010100100011110100110100110100110110100111010111010001101101011" + "1011111001101000001110100010111101010000011011111010110111111100001101000100110000101100" + "1111101000010101010011110011100100001101011111000000000111011011011000011001000101011101" + "1000111101011010101100110110101011111111111011001011010000000010001000001001001010001010" + "1011010110000010111111100101011010000011010110110111101001111100011001101011111100011111" + "1000010000110101101110110100000110110001000011101110000010100100001111011011000001000110" + "1111101100100000100111101110011111010110001111010111011001110001011111000110010111011101" + "1000101000110000000100100101001000010010111011100000100000111100101101000101010100110110" + "1000011101010100111111101011010111101010010110001010110110110111011011010111010000100011" + "1001110101110101001010101010100110011000000010000010000111100001101000100011101001101110" + "1110111110100110010111110110101110110000101111011100101011111111111111100111011000110101" + "1010110001101110011000100101010010100011100010100001011111000000001101011100101000010000" + "1110010001000010100001100001100000001111000111101100100110110001111100010110011010011101" + "1000100010000000110110110010010100000101101010100010011100010110101101001111101111011110" + "1100010110111111001001110000010101001011011110011011011001001010111001110100101000010001" + "1100111101111100100110111110101111110010011010010111010111100000001101010001011010000100" + "1010101101010111011011110011110111000010110111111000000000010001111101011110011110110111" + "1110001001100111001100101110010110100011001011110001111110111001001000111011100111010010" + "1001111110110111000111110000110000011001010111000100001111101000111110011101010110101001" + "1101010100110101110000110100101000010000100010110010111110101011001111100010000101001100" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + }, + /* 94*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 88, 88, 1, "10 ASCII + 252 BASE256s + 10 ASCII + 304 BASE256, no padding", 0, "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" "1010011010011100000001110111100010001011011111001111101000000110011111111000100110101111" "1011001010111110011010111101111010110100001010010100101100110010101011111110101001100000" @@ -2060,7 +3406,97 @@ static void test_encode(int index, int generate, int debug) { "1101010100110101100000110110001000001000101011110010001110100101001111000010001111001100" "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" }, - /* 48*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@_", 0, 8, 32, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 2 chars, not last 3 like Zint", 0, + /* 95*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200", 0, 88, 88, 0, "10 ASCII + 252 BASE256s + 10 ASCII + 304 BASE256, no padding; BWIPP same as FAST_MODE", 0, + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1010011010011100000001110111100010001011011111001111101000000110011111111000100110101111" + "1011001010111110011010111101111010110100001010010100101100110010101011111110101001100000" + "1001100000010111001111110010101111110110111111100011101001100100011100101011100101001111" + "1010100000010100111010100100010110111111011011111100001001111100101011000101111000110100" + "1000001110101001100011111100010010000000100110100001011101011010111111000101011110001111" + "1100010100111001000100100111000000011001000011100101010011011101001001110001001001110000" + "1111100000001000011001111110010010011110101111110111000000010000011111100000101111100001" + "1111001010111010111110110111010111001001000010101111110010010001101101110001010010011110" + "1011110111101011010001111110010110100101001110001001101011010100011111101100001000111101" + "1001000110110110110000100110101011111010111010000110011111101100001001111011110110101100" + "1011110011010010010001110101110001011110001111001101110110100100011101111010010101001111" + "1111000000110100011000101000001011000010110011000011011001100110001011000110010000100110" + "1000010111100011101001111010011000101111111110000010000000111010011010011110000010010111" + "1111011001000111001110110110010001110100111010111010000011110011101001000010011000111000" + "1110001011011000111011110011001100010010010111110010010110001111011011001010101100001001" + "1110110010110011100010100100011001000000001010111110110100111001101010111110011110110100" + "1101000010101101011111100001111010010011110110010110101011010001111010011100001101000001" + "1000100110010101000010111011001110110111010011000110000101010100001010101111100000111110" + "1111100101011000000101111010011110011000110111110001010110010000111110111110011111011111" + "1000001111111111010100111001100110110100001010110011111111100111001100010101011001101110" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1111000000111100111101110011010100000111101110010000001111101101011100011100100111001001" + "1111010010101010000000111000001000111011110011111100101011100100001110001110110001011010" + "1011001001000110000001111010011011110011001110110010010011011000011100001110110011011101" + "1000010001100010110100101011010110011100001010000100011011111010101110101000100000010010" + "1111011010100001110001101110110100111110000111110110111111111101111010000110011001010101" + "1110100001010010000100111000100000101010010011101000000110011001001001111000110110000110" + "1111111110101101101101110111110110000101101111111110001001011001111111000011000101000011" + "1001110010110011101100101000101101110000010010011101100000111011001000111101101111110100" + "1101000101000011011001100010110100111011100111010101001000101100111000110010111101101001" + "1101111101111011011110110101100100111010011011011011101100110111001000010011010110100110" + "1011011101111111111101110000100110000001001110100111111111011000111101011111011011100111" + "1011011110000100100010101100101010011110010010100101100001110111001111110010011001100000" + "1000101100001001000111110110100000110110111110100101000000111111111111011011010001000001" + "1010100101101001000000111111111011010000110011101100111010001011101010000101011001000000" + "1100001101001010100111110110101000000101011110111001001000101010011010110000101000011011" + "1100000011000001010010100100101000011010001011011110110011100000001100011101001011000110" + "1001100111111110110011101101111010111010111110111001011001010001111010111100111001011111" + "1010100111101010100100100111010110000100010010100000101001011011101000011110001000100010" + "1100100101001110100101111101011101111100000111001111111001111100111011001111100101101011" + "1111100101100000000110111100010011111110100011011001010011011010101011011101100101000100" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1110111011000011000011100110100001000011101111100100110001001110111011000101100100101001" + "1011110001011110110010111000010110101100000010111111100011010101001000011101000001001100" + "1110111000110011010011100100101011010111101111001001110010001000011100011011111100101011" + "1110110010010110010110111110000100011110100010011011010100001010101100001100110111011000" + "1001001101100111110101100101000110000101011110111011101101100001011000010101000100110001" + "1010011111000111001000101110000110010111100010010011001010110100101011101110100010001100" + "1011111111001001100101111101001010101000010111011000001010010111111011001001011001110011" + "1011011011010000101000110011001111000011100010000010011000010011001011110111101010111000" + "1010100011101100011011101011110011110011100110001110000000010101111111100110000111110111" + "1010001000011010111010110110001011000000110011010000110110010100001000000110110101110100" + "1100100001100110110001100001110101111011110111011100111010111010111000100100101101101101" + "1110001111000110110100101110001001101101101011111101001111011000101110010100111110001110" + "1111010000110111100101110001101010000100000110001100110010011101011100011001110011110111" + "1111110011000001111100101110001011010010000011100101111011111001101111000000000110110100" + "1010001100000001101001110011111010100010101110001010001101011101011110101110000111110101" + "1000010111011010100000100111100011110101110010111100010100101001101001101100110101011010" + "1011010111001100001111100100010111111100110111001001110001010110111011011100101001000011" + "1110110110110001011010111001011010001010111010001101010011011110101001110001110011001110" + "1111110001100101100011101101110100111100100111110110011111101011111100000111000101000111" + "1010001001101110110100110011000100000010101010010010101001001010001010010010001100101100" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "1000001000101010111111100010100100011000111110011100001010010001111010100101010111111011" + "1011111001101000001110100010111101100100001011110000010100011001001111010101101111011000" + "1111101000010101010011110011100100111000111111001000010110000000111011001000110001001001" + "1000111101011010101100110110101001000010100011011101011111010110101010110110001000110110" + "1011010110000010111111100101011000101001000111000111101111010101011010001110000110101011" + "1000010000110101101110110100001110111100100011110110111011010010001000010010011000100010" + "1111101100100000100111101110011001101101111111001011101111011000011000011001110011001101" + "1000101000110000000100100101010111000110110011010110001101011001101001011011100011100110" + "1000011101010100111111101011111011101000000111111000011010100110111101111101100100011011" + "1001110101110101001010101000000010001001010010001110001111101110001010011010101010000110" + "1110111110100110010111110100110000000001000110000111110001011110011111010001000111101101" + "1010110001101110011000101011011100011000100010001100100000100001001010111111100001100100" + "1110010001000010100001101000001100110011011110111110100000000001111001011000010101011111" + "1000100010000000110100101001000000011110011010011000100011100011001110101101101100000000" + "1100010110111111001011111101011001100011011110110011111100000011111001000010011011111001" + "1100111101111100101100101010001111110100001011111011100000011010001010101101100101111100" + "1010101101010111010011111000100010110100000110011000100111100010011110100001100010100111" + "1110001001100111011110111111101111111100101011100001101110101011101100110010011110110110" + "1001111110110111100111101001110101011001100110100100001110000010111000000101110010110001" + "1101010100110101100000110110101000111000100011010010011110101001001111000010000011001100" + "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + }, + /* 96*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "@@@@@@@@@_", 0, 8, 32, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 2 chars, not last 3 like Zint", 0, "10101010101010101010101010101010" "10000000001001111001101100001101" "10000000000001001001110011001100" @@ -2070,7 +3506,17 @@ static void test_encode(int index, int generate, int debug) { "11000000000000001001000001011010" "11111111111111111111111111111111" }, - /* 49*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@_", 0, 16, 16, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 3 chars, not last 4 like Zint", 0, + /* 97*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@_", 0, 8, 32, 0, "EDI **NOT SAME** (see FAST_MODE); BWIPP uses different encodation", 0, + "10101010101010101010101010101010" + "11100000000000011000100100101001" + "11100000000000001010011101001000" + "10000000000011111010010010100101" + "10000000000100101101001011011110" + "11000000001000111010111110011001" + "10000000000001001010010000010000" + "11111111111111111111111111111111" + }, + /* 98*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "@@@@@@@@@@_", 0, 16, 16, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 3 chars, not last 4 like Zint", 0, "1010101010101010" "1000000001000001" "1000000000111110" @@ -2088,7 +3534,17 @@ static void test_encode(int index, int generate, int debug) { "1010100000010010" "1111111111111111" }, - /* 50*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@@_", 0, 16, 16, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 4 chars, not last 1 like Zint", 1, + /* 99*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@_", 0, 8, 32, 0, "AAEEEEEEEEA; BWIPP uses different encodation, see above", 1, + "10101010101010101010101010101010" + "10100000000000111000110101111001" + "10000000000001001000100100011000" + "10010000000011011010001100000101" + "10000000001111001001110110011110" + "11000110001010011011101010011011" + "10000110001100001001010000001110" + "11111111111111111111111111111111" + }, + /*100*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "@@@@@@@@@@@_", 0, 16, 16, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 4 chars, not last 1 like Zint", 0, "1010101010101010" "1000000001000001" "1000000000001100" @@ -2105,8 +3561,26 @@ static void test_encode(int index, int generate, int debug) { "1011000110111101" "1000100000100010" "1111111111111111" + }, + /*101*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@@_", 0, 16, 16, 0, "AAAEEEEEEEEA; BWIPP uses different encodation, see above", 0, + "1010101010101010" + "1010011101000001" + "1000000000101000" + "1001000100101111" + "1000000000000100" + "1100001001010011" + "1000010000001000" + "1000000000100001" + "1000001011010100" + "1000000001111001" + "1000000110011000" + "1000011111101101" + "1001011010100110" + "1011001101111101" + "1011000011010010" + "1111111111111111" }, - /* 51*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@@@_", 0, 16, 16, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 5 chars, not last 2 like Zint", 0, + /*102*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "@@@@@@@@@@@@_", 0, 16, 16, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 5 chars, not last 2 like Zint", 0, "1010101010101010" "1000000000100001" "1000000000111000" @@ -2124,7 +3598,25 @@ static void test_encode(int index, int generate, int debug) { "1011100000010010" "1111111111111111" }, - /* 52*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@@@@_", 0, 12, 26, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 2 chars, not last 3 like Zint", 0, + /*103*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@@@_", 0, 16, 16, 0, "EEEEEEEEEEEEA; BWIPP uses different encodation, see above", 1, + "1010101010101010" + "1000000001100001" + "1000000000110100" + "1000000100001011" + "1000000000001100" + "1000001001101111" + "1000010001000110" + "1000000001101001" + "1000001111100100" + "1000001011000101" + "1000001001010000" + "1000011111011001" + "1010111001010110" + "1001100010001101" + "1000000000100010" + "1111111111111111" + }, + /*104*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, -1, -1, "@@@@@@@@@@@@@_", 0, 12, 26, 0, "EDI; BWIPP uses different encodation, switching to ASC for last 2 chars, not last 3 like Zint", 0, "10101010101010101010101010" "10000000001001100100101011" "10000000000010000000111000" @@ -2138,7 +3630,25 @@ static void test_encode(int index, int generate, int debug) { "10000001000001101011010000" "11111111111111111111111111" }, - /* 53*/ { BARCODE_DATAMATRIX, -1, 26, -1, -1, -1, "abcdefghi1234FGHIJKLMNabc@@@@@@@@@é", 0, 24, 24, 0, "Mix of modes TEX ASC C40 ASC EDI BAS; BWIPP uses different encodation", 0, + /*105*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, "@@@@@@@@@@@@@_", 0, 16, 16, 0, "AEEEEEEEEEEEEA; BWIPP uses different encodation, see above", 1, + "1010101010101010" + "1110000001000001" + "1110000001000000" + "1000000011000111" + "1000000100011100" + "1100000000000011" + "1000000011100000" + "1000000011101001" + "1000001011000000" + "1000001110101001" + "1000101111000000" + "1000110100011011" + "1011100010001000" + "1000000000000101" + "1001100000111010" + "1111111111111111" + }, + /*106*/ { BARCODE_DATAMATRIX, FAST_MODE, 26, -1, -1, -1, "abcdefghi1234FGHIJKLMNabc@@@@@@@@@é", 0, 24, 24, 0, "Mix of modes TEX ASC C40 ASC EDI BAS; BWIPP uses different encodation", 0, "101010101010101010101010" "100111011110011101000101" "101111001100101101101000" @@ -2164,7 +3674,33 @@ static void test_encode(int index, int generate, int debug) { "111101010110111111111010" "111111111111111111111111" }, - /* 54*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^;<>@[]_`~!||()?{}'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^;<>@[]_`~!||()?{}'\001\002\003\004\005\006...............\015\015\015\015\015\015\015\015abcdefghijklmnopqrstuvwxyz\015\015\015\015\015\015\015\015...............\001\002\003\004\005\006ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^...............", 0, 132, 132, 0, "Mixed modes (except B256); BWIPP different encodation", 4, + /*107*/ { BARCODE_DATAMATRIX, -1, 26, -1, -1, -1, "abcdefghi1234FGHIJKLMNabc@@@@@@@@@é", 0, 24, 24, 0, "TTTTTTTTTAAAACCCCCCCCCAAAAAEEEEEEEAA; BWIPP uses different encodation", 0, + "101010101010101010101010" + "100111011110011100000101" + "101111001100101100111100" + "101110110110001001111011" + "100100110000101000010110" + "111011010011000000000111" + "101010011000100011100110" + "100111101000000010101001" + "100111010000000001110100" + "101110101000001010001111" + "101111100000000100010110" + "111111100000101111100001" + "100111000010010000000000" + "101001100010111000100101" + "110101101110101010101000" + "100010000111101110100001" + "111000111000111001101000" + "101001101100011000001011" + "100011000001001010000000" + "100111010111001001111001" + "101100001001101010011110" + "111101111010101100000101" + "111011010111011111010010" + "111111111111111111111111" + }, + /*108*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^;<>@[]_`~!||()?{}'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^;<>@[]_`~!||()?{}'\001\002\003\004\005\006...............\015\015\015\015\015\015\015\015abcdefghijklmnopqrstuvwxyz\015\015\015\015\015\015\015\015...............\001\002\003\004\005\006ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^...............", 0, 132, 132, 0, "Mixed modes (except B256); BWIPP different encodation", 0, "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" "101001101001010011000111100011111001011001011010011010010111111101110111100110110110000111110000111000011100111110111010111110010101" "101100101010110110010011000010100000111010101111010100001111001010100011010100110101000010101011010001111011001010111111011000100110" @@ -2298,6 +3834,128 @@ static void test_encode(int index, int generate, int debug) { "110101010100010111111010100000000000110011101101010011010100111010111011101111011111110010101110001010101110001010111111010011111110" "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" }, + /*109*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^;<>@[]_`~!||()?{}'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^;<>@[]_`~!||()?{}'\001\002\003\004\005\006...............\015\015\015\015\015\015\015\015abcdefghijklmnopqrstuvwxyz\015\015\015\015\015\015\015\015...............\001\002\003\004\005\006ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^...............", 0, 120, 120, 0, "Mixed modes (except B256); BWIPP uses different encodation", 13, + "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "101001101001010011011001100011111001011110010010011011010111111101001110101111111010000001101101101110110111111011101011" + "101100101010110110001101000010100000111010101111010101000000110001110101001100101001111100111000101011100101101011001100" + "100110010000100111011110100001010100101111101101000101100101111110010011101101111011110110111011011111100100110111001001" + "101010011110000110101010001010010010000011011101000011110000101111000000101100001110011000111110001011110000100011011000" + "100001101000001110111101000000101011010110010111110010001111101101100000001001011101110101000000000111011110101001101111" + "110000101111011110001110000001101111000011000110001001101000101010101100101010101111010111101100101010110011111101011010" + "111101011101000110011000111101011100101110101110101100110101110111101111010000111111011101101100111110100000011111111111" + "111100100111111111101010110000000110111011001100111101110110100011011000111110101100111001110100010010011110110100000100" + "110110011010110000111000010000000010111111101101111001011111101111111001101001111100010001110101011110110111000101010111" + "101111110100111101101110011100110111001010000000100000111110111011010000101000101000100111011100000011110111101000010000" + "101011101110100100011000101100100010010110100000000110010001111011101101011011111011011010010010010111101101100001011001" + "101011000011010111001111110110000100101011010011110111111010100010100100111110101110001011011010100010111100000110111110" + "110110000001101101011001110100001000100110110011010110011101110111010110000110111110111001001100000111111011010100100101" + "100010110001001100001011011111001110100011011001101110011100111001101111101000101111110011011111010011100101000010101010" + "101110110111001001011010011111011111111111010111111000110111111001001001110101011001111010011010000111011001001011111101" + "111101111011011010001011011101101101010011111101101011001110111110101101110111101011111000001001000010111000101100010010" + "111111101001100101111001111001110100100111111100111001100101100010111011011101111011100001010110011110100001011101000011" + "101101101101010111001101010000110000111010110000101001111110110011001110111001101011111101001011011010001110001100000110" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "101101111111010111111111100001011110010111111110111101101001110111011100010001111000110101101111100110100000000010011011" + "101100010101001011101101111110100100100010110011010011110100100001011000100111001110011011010111111010000100011010011110" + "111111000101011100111001011000101110101110100001011110011001100000011011011001011101110010111011100111001100001001101101" + "111101101010101001101101111011011111111010011100011000010100100100001110001011101111001011001011100011010111011001100000" + "110101100101000001111011111000101100011110110111001101101101101001101110111101111110101111011000001111110110000110111111" + "100100011111111100101101101001111110100011101000001110110110101100001111101110101100111011010100011011011000000111010000" + "111011100100101011111011111110100110010111000111101011110111111101010001101001111101110010010111001110010000011010110101" + "100110001100010011101011010111110110101010010100011011010100111101111011001000101000001010111100001011111100011001110110" + "111001010100101010011001010110101100000110001000011010011111110111011110101010011000110111010101100111111001101011111011" + "111011000100101011101100000000111111100011100111000011110010101110011000111111001010001011100111010011110001101101011000" + "100111111010011010011111111001111010011111101111111001110101100100010110000011011010011010001101111111100110111100110001" + "101110111010011110101001000101101010001010011111010010110000101001110011101101001100010001111011010011000111010111110010" + "101111000001011000111010000001010110100111011001111000111011110111011101111101111011101000011111111110011010110010100101" + "110010010000001011001001010001001111101010011101110010101110100011101101110110101000000000101011011010011001110111010010" + "110000011111101001111011100101100001000110011011101101101111101010111010100111011101100101011111001111101011111011110011" + "111110111100101000001110110011111011111011001011100010001110111101001110111001101100101001011000011011101101010010011110" + "101001001000111001011111110010011110101110111000100101010001110100011110011001011111010110110110101111111100111111000001" + "101001100111010010001101101011011010010010110101000101111010110001011100111111101001011100110101111011010111000000010010" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "100111101101010000111110101110110101101110010110110111011001100000011110000010111101011101001110101110110010001001011111" + "100100011100011111001010110011110000101010111010001111011110100100011111110101001100111110110111100011110100101110011100" + "100001010111101011011101110111011010011111011101000110110001111000111010010100011101001010010110101111111010101000110101" + "110010111000101011001000010110111010001011100110000011100110101100111101010010101010101001100010110011011101101001100100" + "110000101101010010011000000100100001101110100110110111110111111110000110000001011010101101111011110110110100101011111101" + "111101111100001011001001000010010001001011111011010111100100111101000101100111101101111101001101011011101010011000100010" + "101001110110110011011010001011011110100110011011000011101111100101011100011000011110101010001011001110111010011100100011" + "101100101110001101101011001110111000111011000001000111110010101111101001100011101100001001100111011011100111011010001110" + "111011001010011101111111011101010110100111010110010001110111110110111101010110111110111011011111100111101000111000010111" + "110010100100010101001110001001110011010011011011011110110010110110111010110101101011100100111101000010011011110011010110" + "101010111010100111111000000111011101110111111110101100111011100110111001111010111010010100001011001110010010110000111111" + "101011101000111100101100100101100001001011010111000010110010110001111011111001101100100001011111101011110000100001000010" + "110111110110011100111100100010110111000111111011101101101011111100010010000001111100000001001001010110100111111100111101" + "100010011100101101001111110101111010001011001000100010001110110111101101011001001111000111110111110011110111011000101000" + "100010011110001111011101010100101110111111000000100101101101101011100001011111111010000011011000111110010001111000000111" + "101111111100101101101010110001101011101011001101000100100000110010100100011010101000100011100010100010111110111000110010" + "100000111011001001111110000001111011001111101110110111011011111011101111111101011100010010101101000111100101011110011101" + "111100111000101100001101101100000000101011011010011011010000101101011110011100001010110101010110101011101001101100100010" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "100110001001100101011100011111010111011111111100101100100001100100101111110110011000011011010001111111010110110010010001" + "110101010001001100001001111101011000101011100111011011001110110001110011101100101101011110110110011011011100000100000100" + "100101101111100011111101100101111001101111100101001001101101111110101111001000011111111011100110101110000010001010110101" + "101110100111011011101001110011010000001011111100100111011110100111001100101111101101100100101100010010111011010101100110" + "110111001110001011111001110001101101010110000000110111111011110110000010111001011001111000000000100111100010111100010011" + "111001101111011111101100100010100101111011011011110011011110100010001011011101101000101111111111010011100100001010000100" + "101001100010010001111011101111010111100111000110111011011111111011010111011101111001000110011001111111011110111011110011" + "111111011000011101001010111001101111010010010000100011001100100111100011001100101010100101110110000011100100001001000100" + "100001010000101110111110111001100101111111011011010110101001100110000010111011111111100000010111100111110001011110100111" + "110011111101000010101000111111110001011010101111010100100100111111000100100101101010000000100101101010100111111010110010" + "111101110011101001011101000101100110111110101101111011101111100011001011011001011100100001111101011111010011100000110011" + "101110011000101001001111110011111011110011110011001010010100100101001010111000001000010111000010111010110011000000111110" + "101001100000000101111110011110101100010111111001100001011001111101100110100011011000101011000110010111100011101110001101" + "101111001101000011101101011001101111100011011110100010010010110110100110100000101110101101010001011011000101000110100010" + "101111101101111001011111001101101011111111011000010000111011100100011000110100111010111111111000110110000010111001001001" + "101101011011111100001100001100010001101010110100011100111010110100011111101001001111100011001000101010111001000111011010" + "111111110101011001111111101110111011111111100111101010011001110110111000110100011100010111010111101111111110110110000111" + "101011100110111110101100111100001001111010101110100101010110101110110111111000101101101011000110100010000010011010010100" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "111011011111101010111000100000001111001111010101011110011101110110000110110110111101001111011001100111110101100111101011" + "100010010110011010001101110011001110001010011100011010011000111101111011000011101000111001111111011011000010001101110010" + "110110010011011110111101111011111111100111110110111001100111100101010110111100011100000011001101010111001100001000001001" + "111111000011000001101100110100110100100011001100101001100100101111111101101000001101001000101110001010011111111101110100" + "110101111011100101111011111100001000100111001010100110100111110101110000111010011011011010110110011110000001011000000011" + "101011001111001001001010111000100111110010100000100111110010111110010001110101101111011110011100100011011001001111000110" + "111010001001000010111110111101101101001110111010011001011011101010011100000001111010000101111010011110101100100011001101" + "110001011101110010101000011110011010101011010100011010110000101000001011100000001010000111101101001010101110010111001100" + "111011011110101001011101011001011111011111000001101111101011100010101011100001111001011010011100011111000011110010010111" + "100111001010101001001101111010000100000011000001000100001100100101111011101110101001101110110001011010101111000001100010" + "110110110101000101111110010000010000001111100110010101100111101001001101101001111000100011011101101110111000110011010011" + "100100110001000011001100011111000100011010000111000100011010110011111100011100101000100101111010110010100111001010111000" + "101011011001111001111001101000101100111110011000110111011011110101001001000010111110000111100101010111101111111010010111" + "101010111011111101001010100110110100110010010110111000110000110110010000100010101001000101001101101010011110000000101000" + "100100100101011011111101010011110110100111100010101100100101110110110010011100111100100000011110000110111000000011101001" + "100010100110110011101100110111010000000011110111010011101110111001100000010111001110101011000100000010101111001001100010" + "101011011111101001011110100010010001011110100101000011001001101001010100111110111000000110011010100111110000000100000001" + "101110010110010100101110000011000100111010000100010100001110111111011010111101001001001111100010001011010011101100010000" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" + "111110010011111100111000011001000111110110000000000001110101111001001011110101011111111110100100010111010000100001010011" + "101111000001101010101111010100011101111011011011111001111110111011101101010010101100000011100100110011011000010110101010" + "100101111011101011111111011100010011110111000111011100101011110100011100110110011110011100011101100110110100011100100111" + "101011000010101101101100110010011110011010010010100101111110111001101101000111101100110011100101001011000010110011110010" + "111010001011011111111111110001001001111111011000100010100001101111100111101011011000101110110100100110101010001110101101" + "110001000010000101001010001011011111011010001011000010100100110110111000000100101011010010110000100010000000010111110000" + "111011101000001111011111000111101110111110100000110110111011111001110010101111111010001011001100111111001100011011110001" + "100101010100000111001100110101101101110011000111111101001110100100000011011100001100011000100111111010001001111100111010" + "110100001100100110111100010011011100010111011010110000011111111000010011100111111101011001010000010111001011110101010111" + "100100010100111100101111111110001111110010101010100000101100110000101001000001101000100101101011110010001000010111101100" + "101111110110111101111101001010101011111110100011101000010001111011111101010101011100100101111010111110001100001010001001" + "111001011110111110001001011111110000011011101010011000010100111010101000001010101110001001101101000010100011011010011010" + "111010011101001011111111100000111000010111011100111100101001101100111100001110011010100100111101101111011110101000010001" + "110011110000101101001101111010001110110010000001111001111100110101011111011100101101011011000011010010001011010000000010" + "111001101010101011011011011000000000110111011110100100111011110111110111101000011110100011010010100111110011000110100001" + "110000010101100111101111011011001101110010001010011010000000111001011110011110001111010000010000101010010111110110100000" + "111011111110101110111010100011001101100111110010011001001011111110111101011101011010010111111011000110110100001011011011" + "100101110101110001001111111010101000000010110011011101000010101010011100100101101101011100100110001010000010100000111110" + "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" + }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -2322,52 +3980,6 @@ static void test_encode(int index, int generate, int debug) { length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, data[i].eci, -1 /*option_1*/, data[i].option_2, data[i].option_3, data[i].output_options, data[i].data, -1, debug); - // Check minimize only? (TODO: remove in the not-too-distant future) - if (debug & ZINT_DEBUG_TEST_MINIMIZE) { // -d 512 - unsigned char binary[2][2200]; - int inputlen; - int binlen; - int variant; - int binlens[2] = {0}; - - if (data[i].ret != 0) { - ZBarcode_Delete(symbol); - continue; - } - - variant = 0; - inputlen = length; - binlen = 0; - ret = dm200encode_variant(symbol, (unsigned char *) data[i].data, binary[0], &inputlen, &binlen, variant); - assert_zero(ret, "i:%d dm200encode_variant(%d) ret %d != 0 (%s)\n", variant, i, ret, symbol->errtxt); - - binlens[variant] = binlen; - - variant = 1; - inputlen = length; - binlen = 0; - ret = dm200encode_variant(symbol, (unsigned char *) data[i].data, binary[1], &inputlen, &binlen, variant); - assert_equal(ret, data[i].ret, "i:%d dm200encode_variant(%d) ret %d != %d (%s)\n", variant, i, ret, data[i].ret, symbol->errtxt); - - binlens[variant] = binlen; - - assert_equal(binlens[0], binlens[1] + data[i].expected_diff, "i:%d binlens[0] %d != %d binlens[1] (%d) + expected_diff (%d)\n", - i, binlens[0], binlens[1] + data[i].expected_diff, binlens[1], data[i].expected_diff); - - if (debug & ZINT_DEBUG_TEST_PRINT) { - if (data[i].expected_diff == 0) { - if (memcmp(binary[0], binary[1], binlen) != 0) { - printf("i:%d binaries differ\n", i); - } - } else { - printf("i:%d diff %d\n", i, data[i].expected_diff); - } - } - - ZBarcode_Delete(symbol); - continue; - } - 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); @@ -2414,6 +4026,1131 @@ static void test_encode(int index, int generate, int debug) { assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n", i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped); } + + if (i && (data[i].input_mode & 0x07) == (data[i - 1].input_mode & 0x07) && !(data[i].input_mode & FAST_MODE) && (data[i - 1].input_mode & FAST_MODE) + && data[i].eci == data[i - 1].eci && data[i].option_2 == data[i - 1].option_2 + && data[i].option_3 == data[i - 1].option_3 && data[i].output_options == data[i - 1].output_options + && strcmp(data[i].data, data[i - 1].data) == 0) { + unsigned char binary[2][2200]; + int inputlen; + int binlen; + int binlens[2] = {0}; + + assert_equal(data[i].expected_rows * data[i].expected_width <= data[i - 1].expected_rows * data[i - 1].expected_width, 1, + "i:%d data[i].expected_rows * data[i].expected_width %d > data[i - 1].expected_rows * data[i - 1].expected_width %d\n", i, + data[i].expected_rows * data[i].expected_width, data[i - 1].expected_rows * data[i - 1].expected_width); + + inputlen = length; + binlen = 0; + symbol->input_mode = data[i - 1].input_mode; + ret = dm_encode(symbol, (unsigned char *) data[i].data, binary[0], &inputlen, &binlen); + assert_zero(ret, "i:%d dm_encode() FAST_MODE ret %d != 0 (%s)\n", i, ret, symbol->errtxt); + + binlens[0] = binlen; + + inputlen = length; + binlen = 0; + symbol->input_mode = data[i].input_mode; + ret = dm_encode(symbol, (unsigned char *) data[i].data, binary[1], &inputlen, &binlen); + assert_zero(ret, "i:%d dm_encode() minimal ret %d != 0 (%s)\n", i, ret, symbol->errtxt); + + binlens[1] = binlen; + + assert_equal(binlens[1] <= binlens[0], 1, "i:%d binlens[1] %d > binlens[0] %d\n", i, binlens[1], binlens[0]); + assert_equal(binlens[0], binlens[1] + data[i].expected_diff, "i:%d binlens[0] %d != %d binlens[1] (%d) + expected_diff (%d)\n", + i, binlens[0], binlens[1] + data[i].expected_diff, binlens[1], data[i].expected_diff); + } + } + } + + ZBarcode_Delete(symbol); + } + + testFinish(); +} + +static void test_minimalenc(int index, int debug) { + + struct item { + int symbology; + int input_mode; + int output_options; + int option_2; + char *data; + int length; + int ret; + + int expected_diff; // Difference between default minimal encodation and ISO encodation (FAST_MODE) + char *comment; + }; + // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) + struct item data[] = { + /* 0*/ { BARCODE_DATAMATRIX, -1, -1, -1, "A", -1, 0, 0, "ASC" }, + /* 1*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AA", -1, 0, 0, "ASC" }, + /* 2*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAA", -1, 0, 0, "ASC" }, + /* 3*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAA", -1, 0, 0, "ASC" }, + /* 4*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAA", -1, 0, 0, "ASC" }, + /* 5*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAA", -1, 0, 0, "" }, + /* 6*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAA", -1, 0, 0, "" }, + /* 7*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAA", -1, 0, 1, "C40; EEEEEEEE" }, + /* 8*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAA", -1, 0, 0, "" }, + /* 9*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAA", -1, 0, 0, "" }, + /* 10*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAA", -1, 0, 0, "" }, + /* 11*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAA", -1, 0, 0, "" }, + /* 12*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 13*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 14*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 15*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 16*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 17*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001A", -1, 0, 0, "ASC" }, + /* 18*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AA", -1, 0, 0, "ASC" }, + /* 19*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAA", -1, 0, 0, "ASC" }, + /* 20*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAA", -1, 0, 0, "ASC" }, + /* 21*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAA", -1, 0, 0, "ASC" }, + /* 22*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAA", -1, 0, 0, "" }, + /* 23*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAAA", -1, 0, 0, "" }, + /* 24*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAAAA", -1, 0, 0, "" }, + /* 25*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAAAAA", -1, 0, 2, "C40; ACCCCCCCCC" }, + /* 26*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAAAAAA", -1, 0, 0, "" }, + /* 27*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAAAAAAA", -1, 0, 0, "" }, + /* 28*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAAAAAAAA", -1, 0, 2, "C40; ACCCCCCCCCCCC" }, + /* 29*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001AAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 30*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001A", -1, 0, 0, "" }, + /* 31*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AA", -1, 0, 0, "" }, + /* 32*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAA", -1, 0, 0, "" }, + /* 33*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAA", -1, 0, 0, "" }, + /* 34*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAA", -1, 0, 0, "" }, + /* 35*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAA", -1, 0, 0, "" }, + /* 36*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAAA", -1, 0, 0, "" }, + /* 37*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAAAA", -1, 0, 1, "C40; AAEEEEEEEE" }, + /* 38*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAAAAA", -1, 0, 0, "" }, + /* 39*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAAAAAA", -1, 0, 0, "" }, + /* 40*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAAAAAAA", -1, 0, 0, "" }, + /* 41*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAAAAAAAA", -1, 0, 0, "" }, + /* 42*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001AAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 43*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001A", -1, 0, 0, "" }, + /* 44*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AA", -1, 0, 0, "" }, + /* 45*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAA", -1, 0, 0, "" }, + /* 46*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAA", -1, 0, 0, "" }, + /* 47*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAA", -1, 0, 0, "" }, + /* 48*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAA", -1, 0, 0, "" }, + /* 49*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAAA", -1, 0, 0, "" }, + /* 50*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAAAA", -1, 0, 0, "" }, + /* 51*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAAAAA", -1, 0, 2, "C40; AAACCCCCCCCC" }, + /* 52*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAAAAAA", -1, 0, 0, "" }, + /* 53*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAAAAAAA", -1, 0, 0, "" }, + /* 54*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAAAAAAAA", -1, 0, 2, "C40; AAACCCCCCCCCCCC" }, + /* 55*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001AAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 56*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001A", -1, 0, 0, "" }, + /* 57*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AA", -1, 0, 0, "" }, + /* 58*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAA", -1, 0, 0, "" }, + /* 59*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAA", -1, 0, 0, "" }, + /* 60*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAA", -1, 0, 0, "" }, + /* 61*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAA", -1, 0, 0, "" }, + /* 62*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAAA", -1, 0, 0, "" }, + /* 63*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAAAA", -1, 0, 1, "C40; AAAAEEEEEEEE" }, + /* 64*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAAAAA", -1, 0, 0, "" }, + /* 65*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAAAAAA", -1, 0, 0, "" }, + /* 66*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAAAAAAA", -1, 0, 0, "" }, + /* 67*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAAAAAAAA", -1, 0, 1, "C40; AAAACCCCCCCCCCCC" }, + /* 68*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001AAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 69*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001A", -1, 0, 0, "" }, + /* 70*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AA", -1, 0, 0, "" }, + /* 71*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAA", -1, 0, 0, "" }, + /* 72*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAA", -1, 0, 0, "" }, + /* 73*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAA", -1, 0, 0, "" }, + /* 74*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAA", -1, 0, 0, "" }, + /* 75*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAAA", -1, 0, 0, "" }, + /* 76*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAAAA", -1, 0, 0, "" }, + /* 77*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAAAAA", -1, 0, 2, "C40; AAAAACCCCCCCCC" }, + /* 78*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAAAAAA", -1, 0, 0, "" }, + /* 79*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAAAAAAA", -1, 0, 0, "" }, + /* 80*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAAAAAAAA", -1, 0, 1, "C40; AAAAACCCCCCCCCCCC" }, + /* 81*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001AAAAAAAAAAAAA", -1, 0, 0, "" }, + /* 82*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200A", -1, 0, 0, "" }, + /* 83*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AA", -1, 0, 0, "" }, + /* 84*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAA", -1, 0, 0, "" }, + /* 85*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAA", -1, 0, 0, "" }, + /* 86*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAA", -1, 0, 0, "" }, + /* 87*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAA", -1, 0, 0, "" }, + /* 88*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAAA", -1, 0, 0, "" }, + /* 89*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAAAA", -1, 0, 1, "" }, + /* 90*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAAAAA", -1, 0, 0, "" }, + /* 91*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAAAAAA", -1, 0, 2, "" }, + /* 92*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAAAAAAA", -1, 0, 0, "" }, + /* 93*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAAAAAAAA", -1, 0, 0, "" }, + /* 94*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200AAAAAAAAAAAAA", -1, 0, 2, "" }, + /* 95*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200A", -1, 0, 0, "" }, + /* 96*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AA", -1, 0, 0, "" }, + /* 97*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAA", -1, 0, 0, "" }, + /* 98*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAA", -1, 0, 0, "" }, + /* 99*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAA", -1, 0, 0, "" }, + /*100*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAA", -1, 0, 0, "" }, + /*101*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAAA", -1, 0, 0, "" }, + /*102*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAAAA", -1, 0, 1, "" }, + /*103*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAAAAA", -1, 0, 0, "" }, + /*104*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAAAAAA", -1, 0, 0, "" }, + /*105*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAAAAAAA", -1, 0, 0, "" }, + /*106*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAAAAAAAA", -1, 0, 0, "" }, + /*107*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200AAAAAAAAAAAAA", -1, 0, 0, "" }, + /*108*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200A", -1, 0, 0, "ASC last 1" }, + /*109*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AA", -1, 0, 0, "ASC 2" }, + /*110*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAA", -1, 0, 0, "ASC 3" }, + /*111*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAA", -1, 0, 0, "ASC 4" }, + /*112*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAA", -1, 0, 0, "ASC 5" }, + /*113*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAA", -1, 0, 0, "C40 6" }, + /*114*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAA", -1, 0, 0, "C40" }, + /*115*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAA", -1, 0, 0, "C40" }, + /*116*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAA", -1, 0, 0, "C40" }, + /*117*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAA", -1, 0, 0, "C40 except last ASC" }, + /*118*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAA", -1, 0, 0, "C40 except last 2 ASC" }, + /*119*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAA", -1, 0, 0, "C40 except last ASC" }, + /*120*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAAA", -1, 0, 0, "C40 except last 2 ASC" }, + /*121*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9", -1, 0, 0, "" }, + /*122*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99", -1, 0, 0, "" }, + /*123*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999", -1, 0, 0, "" }, + /*124*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999", -1, 0, 0, "" }, + /*125*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999", -1, 0, 0, "" }, + /*126*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999999", -1, 0, 0, "" }, + /*127*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999999", -1, 0, 0, "" }, + /*128*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999999", -1, 0, 0, "" }, + /*129*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999999999", -1, 0, 0, "" }, + /*130*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999999999", -1, 0, 0, "" }, + /*131*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999999999", -1, 0, 0, "" }, + /*132*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999999999999", -1, 0, 0, "" }, + /*133*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999999999999", -1, 0, 0, "" }, + /*134*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999999999999", -1, 0, 0, "" }, + /*135*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999999999999999", -1, 0, 0, "" }, + /*136*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999999999999999", -1, 0, 0, "" }, + /*137*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999999999999999", -1, 0, 0, "" }, + /*138*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999999999999999999", -1, 0, 0, "" }, + /*139*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999999999999999999", -1, 0, 0, "" }, + /*140*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999999999999999999", -1, 0, 0, "" }, + /*141*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999999999999999999999", -1, 0, 0, "" }, + /*142*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999999999999999999999", -1, 0, 0, "" }, + /*143*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999999999999999999999", -1, 0, 0, "" }, + /*144*/ { BARCODE_DATAMATRIX, -1, -1, -1, "999999999999999999999999", -1, 0, 0, "" }, + /*145*/ { BARCODE_DATAMATRIX, -1, -1, -1, "9999999999999999999999999", -1, 0, 0, "" }, + /*146*/ { BARCODE_DATAMATRIX, -1, -1, -1, "99999999999999999999999999", -1, 0, 0, "" }, + /*147*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019", -1, 0, 0, "" }, + /*148*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199", -1, 0, 0, "" }, + /*149*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999", -1, 0, 0, "" }, + /*150*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999", -1, 0, 0, "" }, + /*151*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999", -1, 0, 0, "" }, + /*152*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999999", -1, 0, 0, "" }, + /*153*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999999", -1, 0, 0, "" }, + /*154*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999999", -1, 0, 0, "" }, + /*155*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999999999", -1, 0, 0, "" }, + /*156*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999999999", -1, 0, 0, "" }, + /*157*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999999999", -1, 0, 0, "" }, + /*158*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999999999999", -1, 0, 0, "" }, + /*159*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999999999999", -1, 0, 0, "" }, + /*160*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999999999999", -1, 0, 0, "" }, + /*161*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999999999999999", -1, 0, 0, "" }, + /*162*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999999999999999", -1, 0, 0, "" }, + /*163*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999999999999999", -1, 0, 0, "" }, + /*164*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999999999999999999", -1, 0, 0, "" }, + /*165*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999999999999999999", -1, 0, 0, "" }, + /*166*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999999999999999999", -1, 0, 0, "" }, + /*167*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999999999999999999999", -1, 0, 0, "" }, + /*168*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999999999999999999999", -1, 0, 0, "" }, + /*169*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999999999999999999999", -1, 0, 0, "" }, + /*170*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001999999999999999999999999", -1, 0, 0, "" }, + /*171*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\0019999999999999999999999999", -1, 0, 0, "" }, + /*172*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\00199999999999999999999999999", -1, 0, 0, "" }, + /*173*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019", -1, 0, 0, "" }, + /*174*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199", -1, 0, 0, "" }, + /*175*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999", -1, 0, 0, "" }, + /*176*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999", -1, 0, 0, "" }, + /*177*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999", -1, 0, 0, "" }, + /*178*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999999", -1, 0, 0, "" }, + /*179*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999999", -1, 0, 0, "" }, + /*180*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999999", -1, 0, 0, "" }, + /*181*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999999999", -1, 0, 0, "" }, + /*182*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999999999", -1, 0, 0, "" }, + /*183*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999999999", -1, 0, 0, "" }, + /*184*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999999999999", -1, 0, 0, "" }, + /*185*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999999999999", -1, 0, 0, "" }, + /*186*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999999999999", -1, 0, 0, "" }, + /*187*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999999999999999", -1, 0, 0, "" }, + /*188*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999999999999999", -1, 0, 0, "" }, + /*189*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999999999999999", -1, 0, 0, "" }, + /*190*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999999999999999999", -1, 0, 0, "" }, + /*191*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999999999999999999", -1, 0, 0, "" }, + /*192*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999999999999999999", -1, 0, 0, "" }, + /*193*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999999999999999999999", -1, 0, 0, "" }, + /*194*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999999999999999999999", -1, 0, 0, "" }, + /*195*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999999999999999999999", -1, 0, 0, "" }, + /*196*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001999999999999999999999999", -1, 0, 0, "" }, + /*197*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\0019999999999999999999999999", -1, 0, 0, "" }, + /*198*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\00199999999999999999999999999", -1, 0, 0, "" }, + /*199*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019", -1, 0, 0, "" }, + /*200*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199", -1, 0, 0, "" }, + /*201*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999", -1, 0, 0, "" }, + /*202*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999", -1, 0, 0, "" }, + /*203*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999", -1, 0, 0, "" }, + /*204*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999999", -1, 0, 0, "" }, + /*205*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999999", -1, 0, 0, "" }, + /*206*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999999", -1, 0, 0, "" }, + /*207*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999999999", -1, 0, 0, "" }, + /*208*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999999999", -1, 0, 0, "" }, + /*209*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999999999", -1, 0, 0, "" }, + /*210*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999999999999", -1, 0, 0, "" }, + /*211*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999999999999", -1, 0, 0, "" }, + /*212*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999999999999", -1, 0, 0, "" }, + /*213*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999999999999999", -1, 0, 0, "" }, + /*214*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999999999999999", -1, 0, 0, "" }, + /*215*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999999999999999", -1, 0, 0, "" }, + /*216*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999999999999999999", -1, 0, 0, "" }, + /*217*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999999999999999999", -1, 0, 0, "" }, + /*218*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999999999999999999", -1, 0, 0, "" }, + /*219*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999999999999999999999", -1, 0, 0, "" }, + /*220*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999999999999999999999", -1, 0, 0, "" }, + /*221*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999999999999999999999", -1, 0, 0, "" }, + /*222*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001999999999999999999999999", -1, 0, 0, "" }, + /*223*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\0019999999999999999999999999", -1, 0, 0, "" }, + /*224*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\00199999999999999999999999999", -1, 0, 0, "" }, + /*225*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019", -1, 0, 0, "" }, + /*226*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199", -1, 0, 0, "" }, + /*227*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999", -1, 0, 0, "" }, + /*228*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999", -1, 0, 0, "" }, + /*229*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999", -1, 0, 0, "" }, + /*230*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999999", -1, 0, 0, "" }, + /*231*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999999", -1, 0, 0, "" }, + /*232*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999999", -1, 0, 0, "" }, + /*233*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999999999", -1, 0, 0, "" }, + /*234*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999999999", -1, 0, 0, "" }, + /*235*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999999999", -1, 0, 0, "" }, + /*236*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999999999999", -1, 0, 0, "" }, + /*237*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999999999999", -1, 0, 0, "" }, + /*238*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999999999999", -1, 0, 0, "" }, + /*239*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999999999999999", -1, 0, 0, "" }, + /*240*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999999999999999", -1, 0, 0, "" }, + /*241*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999999999999999", -1, 0, 0, "" }, + /*242*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999999999999999999", -1, 0, 0, "" }, + /*243*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999999999999999999", -1, 0, 0, "" }, + /*244*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999999999999999999", -1, 0, 0, "" }, + /*245*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999999999999999999999", -1, 0, 0, "" }, + /*246*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999999999999999999999", -1, 0, 0, "" }, + /*247*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999999999999999999999", -1, 0, 0, "" }, + /*248*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001999999999999999999999999", -1, 0, 0, "" }, + /*249*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\0019999999999999999999999999", -1, 0, 0, "" }, + /*250*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\00199999999999999999999999999", -1, 0, 0, "" }, + /*251*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019", -1, 0, 0, "" }, + /*252*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199", -1, 0, 0, "" }, + /*253*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999", -1, 0, 0, "" }, + /*254*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999", -1, 0, 0, "" }, + /*255*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999", -1, 0, 0, "" }, + /*256*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999999", -1, 0, 0, "" }, + /*257*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999999", -1, 0, 0, "" }, + /*258*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999999", -1, 0, 0, "" }, + /*259*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999999999", -1, 0, 0, "" }, + /*260*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999999999", -1, 0, 0, "" }, + /*261*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999999999", -1, 0, 0, "" }, + /*262*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999999999999", -1, 0, 0, "" }, + /*263*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999999999999", -1, 0, 0, "" }, + /*264*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999999999999", -1, 0, 0, "" }, + /*265*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999999999999999", -1, 0, 0, "" }, + /*266*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999999999999999", -1, 0, 0, "" }, + /*267*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999999999999999", -1, 0, 0, "" }, + /*268*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999999999999999999", -1, 0, 0, "" }, + /*269*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999999999999999999", -1, 0, 0, "" }, + /*270*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999999999999999999", -1, 0, 0, "" }, + /*271*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999999999999999999999", -1, 0, 0, "" }, + /*272*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999999999999999999999", -1, 0, 0, "" }, + /*273*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999999999999999999999", -1, 0, 0, "" }, + /*274*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001999999999999999999999999", -1, 0, 0, "" }, + /*275*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\0019999999999999999999999999", -1, 0, 0, "" }, + /*276*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\00199999999999999999999999999", -1, 0, 0, "" }, + /*277*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009", -1, 0, 0, "" }, + /*278*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099", -1, 0, 0, "" }, + /*279*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999", -1, 0, 0, "" }, + /*280*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999", -1, 0, 0, "" }, + /*281*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099999", -1, 0, 0, "" }, + /*282*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999999", -1, 0, 0, "" }, + /*283*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999999", -1, 0, 0, "" }, + /*284*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099999999", -1, 0, 0, "" }, + /*285*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999999999", -1, 0, 0, "" }, + /*286*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999999999", -1, 0, 0, "" }, + /*287*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099999999999", -1, 0, 0, "" }, + /*288*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999999999999", -1, 0, 0, "" }, + /*289*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999999999999", -1, 0, 0, "" }, + /*290*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099999999999999", -1, 0, 0, "" }, + /*291*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999999999999999", -1, 0, 0, "" }, + /*292*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999999999999999", -1, 0, 0, "" }, + /*293*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099999999999999999", -1, 0, 0, "" }, + /*294*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999999999999999999", -1, 0, 0, "" }, + /*295*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999999999999999999", -1, 0, 0, "" }, + /*296*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099999999999999999999", -1, 0, 0, "" }, + /*297*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999999999999999999999", -1, 0, 0, "" }, + /*298*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999999999999999999999", -1, 0, 0, "" }, + /*299*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\20099999999999999999999999", -1, 0, 0, "" }, + /*300*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200999999999999999999999999", -1, 0, 0, "" }, + /*301*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\2009999999999999999999999999", -1, 0, 0, "" }, + /*302*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009", -1, 0, 0, "" }, + /*303*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099", -1, 0, 1, "BAS FN4 ASC; AAAA" }, + /*304*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999", -1, 0, 0, "" }, + /*305*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999", -1, 0, 0, "" }, + /*306*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099999", -1, 0, 0, "" }, + /*307*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999999", -1, 0, 0, "" }, + /*308*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999999", -1, 0, 0, "" }, + /*309*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099999999", -1, 0, 0, "" }, + /*310*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999999999", -1, 0, 0, "" }, + /*311*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999999999", -1, 0, 0, "" }, + /*312*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099999999999", -1, 0, 0, "" }, + /*313*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999999999999", -1, 0, 0, "" }, + /*314*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999999999999", -1, 0, 0, "" }, + /*315*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099999999999999", -1, 0, 0, "" }, + /*316*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999999999999999", -1, 0, 0, "" }, + /*317*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999999999999999", -1, 0, 0, "" }, + /*318*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099999999999999999", -1, 0, 0, "" }, + /*319*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999999999999999999", -1, 0, 0, "" }, + /*320*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999999999999999999", -1, 0, 0, "" }, + /*321*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099999999999999999999", -1, 0, 0, "" }, + /*322*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999999999999999999999", -1, 0, 0, "" }, + /*323*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999999999999999999999", -1, 0, 0, "" }, + /*324*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\20099999999999999999999999", -1, 0, 0, "" }, + /*325*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200999999999999999999999999", -1, 0, 0, "" }, + /*326*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\2009999999999999999999999999", -1, 0, 0, "" }, + /*327*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009", -1, 0, 0, "ASC last 1" }, + /*328*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099", -1, 0, 1, "BBBAA" }, + /*329*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999", -1, 0, 0, "" }, + /*330*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999", -1, 0, 0, "" }, + /*331*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999", -1, 0, 0, "" }, + /*332*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999", -1, 0, 0, "" }, + /*333*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999", -1, 0, 0, "" }, + /*334*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999", -1, 0, 0, "" }, + /*335*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999", -1, 0, 0, "" }, + /*336*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999", -1, 0, 0, "" }, + /*337*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999", -1, 0, 0, "" }, + /*338*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999", -1, 0, 0, "" }, + /*339*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999", -1, 0, 0, "" }, + /*340*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999999", -1, 0, 0, "" }, + /*341*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999999", -1, 0, 0, "" }, + /*342*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999999", -1, 0, 0, "" }, + /*343*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999999999", -1, 0, 0, "" }, + /*344*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999999999", -1, 0, 0, "" }, + /*345*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999999999", -1, 0, 0, "" }, + /*346*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999999999999", -1, 0, 0, "" }, + /*347*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999999999999", -1, 0, 0, "" }, + /*348*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999999999999", -1, 0, 0, "" }, + /*349*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999999999999999", -1, 0, 0, "" }, + /*350*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999999999999999", -1, 0, 0, "" }, + /*351*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999999999999999", -1, 0, 0, "" }, + /*352*/ { BARCODE_DATAMATRIX, -1, -1, -1, "a", -1, 0, 0, "ASC" }, + /*353*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aa", -1, 0, 0, "ASC" }, + /*354*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaa", -1, 0, 0, "ASC" }, + /*355*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaa", -1, 0, 0, "ASC" }, + /*356*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaa", -1, 0, 0, "ASC" }, + /*357*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaa", -1, 0, 0, "" }, + /*358*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaaa", -1, 0, 0, "" }, + /*359*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaaaa", -1, 0, 0, "ASC" }, + /*360*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaaaaa", -1, 0, 0, "TEX" }, + /*361*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaaaaaa", -1, 0, 0, "" }, + /*362*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaaaaaaa", -1, 0, 0, "" }, + /*363*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaaaaaaaa", -1, 0, 0, "" }, + /*364*/ { BARCODE_DATAMATRIX, -1, -1, -1, "aaaaaaaaaaaaa", -1, 0, 0, "" }, + /*365*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001a", -1, 0, 0, "ASC" }, + /*366*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aa", -1, 0, 0, "ASC" }, + /*367*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaa", -1, 0, 0, "ASC" }, + /*368*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaa", -1, 0, 0, "ASC" }, + /*369*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaa", -1, 0, 0, "ASC" }, + /*370*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaa", -1, 0, 0, "" }, + /*371*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaaa", -1, 0, 0, "" }, + /*372*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaaaa", -1, 0, 0, "" }, + /*373*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaaaaa", -1, 0, 2, "TEX; ATTTTTTTTT" }, + /*374*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaaaaaa", -1, 0, 0, "" }, + /*375*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaaaaaaa", -1, 0, 0, "" }, + /*376*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaaaaaaaa", -1, 0, 2, "TEX; ATTTTTTTTTTTT" }, + /*377*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001aaaaaaaaaaaaa", -1, 0, 0, "" }, + /*378*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001a", -1, 0, 0, "" }, + /*379*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aa", -1, 0, 0, "" }, + /*380*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaa", -1, 0, 0, "" }, + /*381*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaa", -1, 0, 0, "" }, + /*382*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaa", -1, 0, 0, "" }, + /*383*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaa", -1, 0, 0, "" }, + /*384*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaaa", -1, 0, 0, "" }, + /*385*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaaaa", -1, 0, 0, "" }, + /*386*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaaaaa", -1, 0, 0, "" }, + /*387*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaaaaaa", -1, 0, 0, "" }, + /*388*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaaaaaaa", -1, 0, 0, "" }, + /*389*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaaaaaaaa", -1, 0, 0, "" }, + /*390*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001aaaaaaaaaaaaa", -1, 0, 0, "" }, + /*391*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200a", -1, 0, 0, "ASC last 1" }, + /*392*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aa", -1, 0, 0, "ASC 2" }, + /*393*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaa", -1, 0, 0, "ASC 3" }, + /*394*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaa", -1, 0, 0, "ASC 4" }, + /*395*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaa", -1, 0, 0, "ASC 5" }, + /*396*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaa", -1, 0, 0, "TEX 6" }, + /*397*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa", -1, 0, 0, "TEX" }, + /*398*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaa", -1, 0, 0, "TEX" }, + /*399*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaa", -1, 0, 0, "TEX" }, + /*400*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaa", -1, 0, 0, "TEX except last ASC" }, + /*401*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaa", -1, 0, 0, "TEX except last 2 ASC" }, + /*402*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaa", -1, 0, 0, "TEX" }, + /*403*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaa", -1, 0, 0, "TEX except last ASC" }, + /*404*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">", -1, 0, 0, "" }, + /*405*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>", -1, 0, 0, "" }, + /*406*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>", -1, 0, 0, "" }, + /*407*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>", -1, 0, 0, "" }, + /*408*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>", -1, 0, 0, "" }, + /*409*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>", -1, 0, 0, "" }, + /*410*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>", -1, 0, 0, "" }, + /*411*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>", -1, 0, 0, "" }, + /*412*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>", -1, 0, 0, "" }, + /*413*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>", -1, 0, 0, "" }, + /*414*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>", -1, 0, 0, "" }, + /*415*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>", -1, 0, 0, "" }, + /*416*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>", -1, 0, 0, "" }, + /*417*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>>>>", -1, 0, 0, "" }, + /*418*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>", -1, 0, 0, "" }, + /*419*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>", -1, 0, 0, "" }, + /*420*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>", -1, 0, 0, "" }, + /*421*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>", -1, 0, 0, "" }, + /*422*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>", -1, 0, 0, "" }, + /*423*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>", -1, 0, 0, "" }, + /*424*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>>", -1, 0, 0, "" }, + /*425*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>>>", -1, 0, 0, "" }, + /*426*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>>>>", -1, 0, 0, "" }, + /*427*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>>>>>", -1, 0, 0, "" }, + /*428*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>>>>>>", -1, 0, 1, "X12; AAAXXXXXXXXX" }, + /*429*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>>>>>>>", -1, 0, 0, "" }, + /*430*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001>>>>>>>>>>>>>", -1, 0, 0, "" }, + /*431*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>", -1, 0, 0, "" }, + /*432*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>", -1, 0, 0, "" }, + /*433*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>", -1, 0, 0, "" }, + /*434*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>", -1, 0, 0, "" }, + /*435*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>", -1, 0, 0, "" }, + /*436*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>", -1, 0, 0, "" }, + /*437*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>>", -1, 0, 0, "" }, + /*438*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>>>", -1, 0, 0, "" }, + /*439*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>>>>", -1, 0, 0, "" }, + /*440*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>>>>>", -1, 0, 0, "" }, + /*441*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>>>>>>", -1, 0, 0, "" }, + /*442*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>>>>>>>", -1, 0, 0, "" }, + /*443*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001>>>>>>>>>>>>>", -1, 0, 0, "" }, + /*444*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>", -1, 0, 0, "" }, + /*445*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>", -1, 0, 0, "" }, + /*446*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>", -1, 0, 0, "" }, + /*447*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>", -1, 0, 0, "" }, + /*448*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>", -1, 0, 0, "" }, + /*449*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>", -1, 0, 0, "" }, + /*450*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>>", -1, 0, 0, "" }, + /*451*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>>>", -1, 0, 0, "" }, + /*452*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>>>>", -1, 0, 0, "" }, + /*453*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>>>>>", -1, 0, 0, "" }, + /*454*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>>>>>>", -1, 0, 1, "X12; AAAAAXXXXXXXXX" }, + /*455*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>>>>>>>", -1, 0, 0, "" }, + /*456*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001>>>>>>>>>>>>>", -1, 0, 0, "" }, + /*457*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>", -1, 0, 0, "" }, + /*458*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>", -1, 0, 0, "" }, + /*459*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>", -1, 0, 0, "" }, + /*460*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>", -1, 0, 0, "" }, + /*461*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>", -1, 0, 0, "" }, + /*462*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>", -1, 0, 0, "" }, + /*463*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>>", -1, 0, 0, "" }, + /*464*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>>>", -1, 0, 0, "" }, + /*465*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>>>>", -1, 0, 0, "" }, + /*466*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>>>>>", -1, 0, 0, "" }, + /*467*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>>>>>>", -1, 0, 0, "" }, + /*468*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>>>>>>>", -1, 0, 0, "" }, + /*469*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001>>>>>>>>>>>>>", -1, 0, 0, "" }, + /*470*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>", -1, 0, 0, "" }, + /*471*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>", -1, 0, 0, "" }, + /*472*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>", -1, 0, 0, "" }, + /*473*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>", -1, 0, 0, "" }, + /*474*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>", -1, 0, 0, "" }, + /*475*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>", -1, 0, 0, "" }, + /*476*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>>", -1, 0, 0, "" }, + /*477*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>>>", -1, 0, 0, "" }, + /*478*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>>>>", -1, 0, 0, "" }, + /*479*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>>>>>", -1, 0, 0, "" }, + /*480*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>>>>>>", -1, 0, 0, "" }, + /*481*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>>>>>>>", -1, 0, 0, "" }, + /*482*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001>>>>>>>>>>>>>", -1, 0, 0, "" }, + /*483*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>", -1, 0, 0, "" }, + /*484*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>", -1, 0, 0, "" }, + /*485*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>", -1, 0, 1, "BAS ASC; AAAA" }, + /*486*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>", -1, 0, 1, "BAS ASC; AAAAA" }, + /*487*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>", -1, 0, 1, "BAS ASC; AAEEEE" }, + /*488*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>", -1, 0, 0, "BAS X12; AAEEEEA" }, + /*489*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>>", -1, 0, 2, "BAS X12; AAXXXXXX" }, + /*490*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>>>", -1, 0, 1, "BAS EDI; AEEEEEEEE" }, + /*491*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>>>>", -1, 0, 0, "" }, + /*492*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>>>>>", -1, 0, 2, "BAS X12; AAXXXXXXXXX" }, + /*493*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>>>>>>", -1, 0, 1, "BAS X12;2; AEEEEEEEEEEE" }, + /*494*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>>>>>>>", -1, 0, 0, "" }, + /*495*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200>>>>>>>>>>>>>", -1, 0, 2, "BAS; AAXXXXXXXXXXXX" }, + /*496*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>", -1, 0, 0, "" }, + /*497*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>", -1, 0, 0, "" }, + /*498*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>", -1, 0, 0, "" }, + /*499*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>", -1, 0, 0, "" }, + /*500*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>", -1, 0, 0, "" }, + /*501*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>", -1, 0, 0, "" }, + /*502*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>>", -1, 0, 0, "" }, + /*503*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>>>", -1, 0, 0, "" }, + /*504*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>>>>", -1, 0, 0, "" }, + /*505*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>>>>>", -1, 0, 0, "" }, + /*506*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>>>>>>", -1, 0, 0, "" }, + /*507*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>>>>>>>", -1, 0, 0, "" }, + /*508*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200>>>>>>>>>>>>>", -1, 0, 0, "" }, + /*509*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>", -1, 0, 0, "ASC last 1" }, + /*510*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>", -1, 0, 0, "ASC 2" }, + /*511*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>", -1, 0, 0, "ASC 3" }, + /*512*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>", -1, 0, 0, "ASC 4" }, + /*513*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>", -1, 0, 0, "ASC 5" }, + /*514*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>", -1, 0, 0, "X12 6" }, + /*515*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>", -1, 0, 0, "X12 except last 2 ASC" }, + /*516*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>", -1, 0, 0, "X12" }, + /*517*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>", -1, 0, 0, "X12" }, + /*518*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>", -1, 0, 0, "X12 except last 2 ASC" }, + /*519*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>", -1, 0, 0, "X12 except last 3 ASC" }, + /*520*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>", -1, 0, 0, "X12" }, + /*521*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>", -1, 0, 0, "X12 except last ASC" }, + /*522*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".", -1, 0, 0, "" }, + /*523*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..", -1, 0, 0, "" }, + /*524*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...", -1, 0, 0, "" }, + /*525*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....", -1, 0, 0, "" }, + /*526*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....", -1, 0, 0, "" }, + /*527*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......", -1, 0, 0, "" }, + /*528*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......", -1, 0, 0, "" }, + /*529*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........", -1, 0, 0, "" }, + /*530*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........", -1, 0, 0, "" }, + /*531*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........", -1, 0, 1, "EDI; AAEEEEEEEE" }, + /*532*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........", -1, 0, 0, "" }, + /*533*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............", -1, 0, 0, "" }, + /*534*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............", -1, 0, 0, "" }, + /*535*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001.", -1, 0, 0, "" }, + /*536*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001..", -1, 0, 0, "" }, + /*537*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001...", -1, 0, 0, "" }, + /*538*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001....", -1, 0, 0, "" }, + /*539*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001.....", -1, 0, 0, "" }, + /*540*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001......", -1, 0, 0, "" }, + /*541*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001.......", -1, 0, 0, "" }, + /*542*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001........", -1, 0, 0, "" }, + /*543*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001.........", -1, 0, 0, "" }, + /*544*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001..........", -1, 0, 0, "" }, + /*545*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001...........", -1, 0, 0, "" }, + /*546*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001............", -1, 0, 0, "" }, + /*547*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001.............", -1, 0, 0, "" }, + /*548*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001.", -1, 0, 0, "" }, + /*549*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001..", -1, 0, 0, "" }, + /*550*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001...", -1, 0, 0, "" }, + /*551*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001....", -1, 0, 0, "" }, + /*552*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001.....", -1, 0, 0, "" }, + /*553*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001......", -1, 0, 0, "" }, + /*554*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001.......", -1, 0, 0, "" }, + /*555*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001........", -1, 0, 0, "" }, + /*556*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001.........", -1, 0, 0, "" }, + /*557*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001..........", -1, 0, 1, "EDI; AAAAEEEEEEEE" }, + /*558*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001...........", -1, 0, 0, "" }, + /*559*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001............", -1, 0, 0, "" }, + /*560*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001.............", -1, 0, 0, "" }, + /*561*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001.", -1, 0, 0, "" }, + /*562*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001..", -1, 0, 0, "" }, + /*563*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001...", -1, 0, 0, "" }, + /*564*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001....", -1, 0, 0, "" }, + /*565*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001.....", -1, 0, 0, "" }, + /*566*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001......", -1, 0, 0, "" }, + /*567*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001.......", -1, 0, 0, "" }, + /*568*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001........", -1, 0, 0, "" }, + /*569*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001.........", -1, 0, 0, "" }, + /*570*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001..........", -1, 0, 0, "" }, + /*571*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001...........", -1, 0, 0, "" }, + /*572*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001............", -1, 0, 0, "" }, + /*573*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001.............", -1, 0, 1, "EDI; AAAAEEEEEEEEEEEE" }, + /*574*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001.", -1, 0, 0, "" }, + /*575*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001..", -1, 0, 0, "" }, + /*576*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001...", -1, 0, 0, "" }, + /*577*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001....", -1, 0, 0, "" }, + /*578*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001.....", -1, 0, 0, "" }, + /*579*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001......", -1, 0, 0, "" }, + /*580*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001.......", -1, 0, 0, "" }, + /*581*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001........", -1, 0, 0, "" }, + /*582*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001.........", -1, 0, 0, "" }, + /*583*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001..........", -1, 0, 0, "" }, + /*584*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001...........", -1, 0, 0, "" }, + /*585*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001............", -1, 0, 0, "" }, + /*586*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001.............", -1, 0, 0, "" }, + /*587*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001.", -1, 0, 0, "" }, + /*588*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001..", -1, 0, 0, "" }, + /*589*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001...", -1, 0, 0, "" }, + /*590*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001....", -1, 0, 0, "" }, + /*591*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001.....", -1, 0, 0, "" }, + /*592*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001......", -1, 0, 0, "" }, + /*593*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001.......", -1, 0, 0, "" }, + /*594*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001........", -1, 0, 0, "" }, + /*595*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001.........", -1, 0, 0, "" }, + /*596*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001..........", -1, 0, 1, "" }, + /*597*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001...........", -1, 0, 0, "" }, + /*598*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001............", -1, 0, 0, "" }, + /*599*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\001\001\001\001\001.............", -1, 0, 0, "" }, + /*600*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200.", -1, 0, 0, "" }, + /*601*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200..", -1, 0, 0, "" }, + /*602*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200...", -1, 0, 1, "" }, + /*603*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200....", -1, 0, 1, "" }, + /*604*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200.....", -1, 0, 1, "" }, + /*605*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200......", -1, 0, 1, "" }, + /*606*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200.......", -1, 0, 1, "" }, + /*607*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200........", -1, 0, 1, "" }, + /*608*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200.........", -1, 0, 1, "" }, + /*609*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200..........", -1, 0, 1, "" }, + /*610*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200...........", -1, 0, 1, "" }, + /*611*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200............", -1, 0, 2, "" }, + /*612*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200.............", -1, 0, 1, "" }, + /*613*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200.", -1, 0, 0, "" }, + /*614*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200..", -1, 0, 0, "" }, + /*615*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200...", -1, 0, 0, "" }, + /*616*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200....", -1, 0, 0, "" }, + /*617*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200.....", -1, 0, 0, "" }, + /*618*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200......", -1, 0, 0, "" }, + /*619*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200.......", -1, 0, 0, "" }, + /*620*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200........", -1, 0, 0, "" }, + /*621*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200.........", -1, 0, 0, "" }, + /*622*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200..........", -1, 0, 0, "" }, + /*623*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200...........", -1, 0, 0, "" }, + /*624*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200............", -1, 0, 0, "" }, + /*625*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200.............", -1, 0, 0, "" }, + /*626*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.", -1, 0, 0, "ASC last 1" }, + /*627*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200..", -1, 0, 0, "ASC 2" }, + /*628*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200...", -1, 0, 0, "ASC 3" }, + /*629*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200....", -1, 0, 0, "ASC 4" }, + /*630*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.....", -1, 0, 0, "ASC 5" }, + /*631*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200......", -1, 0, 0, "ASC 6" }, + /*632*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.......", -1, 0, 0, "ASC 7" }, + /*633*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200........", -1, 0, 0, "EDI 8" }, + /*634*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.........", -1, 0, 0, "EDI" }, + /*635*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200..........", -1, 0, 1, "BBBAAEEEEEEEE" }, + /*636*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200...........", -1, 0, 0, "EDI" }, + /*637*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200............", -1, 0, 0, "EDI" }, + /*638*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.............", -1, 0, 0, "EDI except last ASC" }, + /*639*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200A\200\200\200", -1, 0, 0, "BAS" }, + /*640*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AA\200\200\200", -1, 0, 0, "BAS" }, + /*641*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAA\200\200\200", -1, 0, 0, "BAS" }, + /*642*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAA\200\200\200", -1, 0, 0, "BAS" }, + /*643*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAA\200\200\200", -1, 0, 0, "BAS" }, + /*644*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAA\200\200\200", -1, 0, 0, "BAS" }, + /*645*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAA\200\200\200", -1, 0, 0, "BAS 7 As, no switch as C40 & X12 cancel each other out" }, + /*646*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAA\200\200\200", -1, 0, 0, "BAS 8 As, no switch as C40 & X12 cancel each other out" }, + /*647*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAA\200\200\200", -1, 0, 0, "BAS 9 As, no switch as C40 & X12 cancel each other out" }, + /*648*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 10 As, no switch as C40 & X12 cancel each other out" }, + /*649*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 11 As, no switch as C40 & X12 cancel each other out" }, + /*650*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 12 As, no switch as C40 & X12 cancel each other out" }, + /*651*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 13 As, no switch as C40 & X12 cancel each other out" }, + /*652*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009\200\200\200", -1, 0, 0, "BAS" }, + /*653*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099\200\200\200", -1, 0, 0, "BAS" }, + /*654*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999\200\200\200", -1, 0, 0, "BAS" }, + /*655*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999\200\200\200", -1, 0, 0, "ASC 4" }, + /*656*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999\200\200\200", -1, 0, 0, "ASC 4" }, + /*657*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999\200\200\200", -1, 0, 0, "ASC 6" }, + /*658*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999\200\200\200", -1, 0, 0, "ASC 6" }, + /*659*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999\200\200\200", -1, 0, 0, "ASC 8" }, + /*660*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999\200\200\200", -1, 0, 0, "ASC 8" }, + /*661*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999\200\200\200", -1, 0, 0, "ASC 10" }, + /*662*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999\200\200\200", -1, 0, 0, "ASC 10" }, + /*663*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999\200\200\200", -1, 0, 0, "ASC 12" }, + /*664*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999\200\200\200", -1, 0, 0, "ASC 12" }, + /*665*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200a\200\200\200", -1, 0, 0, "BAS" }, + /*666*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aa\200\200\200", -1, 0, 0, "BAS" }, + /*667*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaa\200\200\200", -1, 0, 0, "BAS" }, + /*668*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaa\200\200\200", -1, 0, 0, "BAS" }, + /*669*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaa\200\200\200", -1, 0, 0, "BAS" }, + /*670*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaa\200\200\200", -1, 0, 0, "BAS" }, + /*671*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200\200", -1, 0, 0, "7 a's, was worse before dm_text_sp_cnt()" }, + /*672*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200", -1, 0, 0, "7 a's end 2 extended, was worse before dm_text_sp_cnt()" }, + /*673*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200", -1, 0, 0, "7 a's end 1 extended, was worse before dm_text_sp_cnt()" }, + /*674*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa", -1, 0, 0, "7 a's end 0 extended, switches to TEX but same codeword count" }, + /*675*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200\200aaaaaaa\200\200", -1, 0, 0, "7 a's, was worse before dm_text_sp_cnt()" }, + /*676*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200\200\200aaaaaaa\200\200", -1, 0, 0, "7 a's, was worse before dm_text_sp_cnt()" }, + /*677*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200\200\200", -1, 0, 0, "7 a's end 4 extended, was worse before dm_text_sp_cnt()" }, + /*678*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200\200\200\200", -1, 0, 0, "7 a's end 5 extended, was worse before dm_text_sp_cnt()" }, + /*679*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaa\200\200", -1, 0, 0, "8 a's end 2 extended, was worse before dm_text_sp_cnt()" }, + /*680*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaa\200\200\200", -1, 0, 0, "8 a's, was worse before dm_text_sp_cnt()" }, + /*681*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaa\200\200\200", -1, 0, 0, "9 a's, was worse before dm_text_sp_cnt()" }, + /*682*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaa\200\200\200", -1, 0, 0, "10 a's, was worse before dm_text_sp_cnt()" }, + /*683*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaa\200\200\200", -1, 0, 0, "11 a's, was worse before dm_text_sp_cnt()" }, + /*684*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaa\200\200\200", -1, 0, 0, "12 a's, switches to TEX but same codeword count" }, + /*685*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaa\200\200\200", -1, 0, 0, "13 a's, switches to TEX but same codeword count" }, + /*686*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "14 a's, switches to TEX but same codeword count" }, + /*687*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "15 a's, switches to TEX, better" }, + /*688*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "16 a's, switches to TEX, better" }, + /*689*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "17 a's, switches to TEX, better" }, + /*690*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "18 a's, switches to TEX, better" }, + /*691*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "19 a's, switches to TEX, better" }, + /*692*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "20 a's, switches to TEX, better" }, + /*693*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "21 a's, switches to TEX, better" }, + /*694*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200Aaaaaaa\200\200\200", -1, 0, 0, "" }, + /*695*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaAaaa\200\200\200", -1, 0, 0, "" }, + /*696*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaA\200\200\200", -1, 0, 0, "" }, + /*697*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200Aaaaaaaa\200\200\200", -1, 0, 0, "" }, + /*698*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaAaaa\200\200\200", -1, 0, 0, "" }, + /*699*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaAa\200\200\200", -1, 0, 0, "" }, + /*700*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaA\200\200\200", -1, 0, 0, "Was worse before dm_text_sp_cnt()" }, + /*701*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaAa\200\200\200", -1, 0, 0, "Was worse before dm_text_sp_cnt()" }, + /*702*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>\200\200\200", -1, 0, 0, "BAS" }, + /*703*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>\200\200\200", -1, 0, 0, "BAS" }, + /*704*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>\200\200\200", -1, 0, 0, "BAS" }, + /*705*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*706*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*707*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*708*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*709*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*710*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*711*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*712*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*713*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, + /*714*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 12" }, + /*715*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 12" }, + /*716*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>\200\200\200", -1, 0, 1, "X12 12" }, + /*717*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 15" }, + /*718*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 15" }, + /*719*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 1, "X12 15" }, + /*720*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 18" }, + /*721*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 18" }, + /*722*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 1, "X12 18" }, + /*723*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 21" }, + /*724*/ { BARCODE_DATAMATRIX, -1, -1, -1, "Aa", -1, 0, 0, "" }, + /*725*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAa", -1, 0, 0, "" }, + /*726*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAa", -1, 0, 0, "" }, + /*727*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAa", -1, 0, 0, "" }, + /*728*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAa", -1, 0, 0, "" }, + /*729*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAa", -1, 0, 0, "" }, + /*730*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAa", -1, 0, 0, "" }, + /*731*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAa", -1, 0, 1, "" }, + /*732*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAa", -1, 0, 0, "" }, + /*733*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAa", -1, 0, 0, "" }, + /*734*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAa", -1, 0, 1, "" }, + /*735*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAa", -1, 0, 0, "" }, + /*736*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAa", -1, 0, 0, "" }, + /*737*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAa", -1, 0, 1, "" }, + /*738*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAAa", -1, 0, 0, "" }, + /*739*/ { BARCODE_DATAMATRIX, -1, -1, -1, "A12", -1, 0, 0, "" }, + /*740*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AA12", -1, 0, 0, "" }, + /*741*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAA12", -1, 0, 0, "" }, + /*742*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAA12", -1, 0, 0, "" }, + /*743*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAA12", -1, 0, 0, "" }, + /*744*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAA12", -1, 0, 0, "" }, + /*745*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAA12", -1, 0, 0, "" }, + /*746*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAA12", -1, 0, 0, "" }, + /*747*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAA12", -1, 0, 0, "" }, + /*748*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAA12", -1, 0, 0, "" }, + /*749*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAA12", -1, 0, 0, "" }, + /*750*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAA12", -1, 0, 0, "" }, + /*751*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAA12", -1, 0, 0, "" }, + /*752*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAA12", -1, 0, 0, "" }, + /*753*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAA12", -1, 0, 0, "" }, + /*754*/ { BARCODE_DATAMATRIX, -1, -1, -1, "A12a", -1, 0, 0, "" }, + /*755*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AA12a", -1, 0, 0, "" }, + /*756*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAA12a", -1, 0, 0, "" }, + /*757*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAA12a", -1, 0, 0, "" }, + /*758*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAA12a", -1, 0, 0, "" }, + /*759*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAA12a", -1, 0, 0, "" }, + /*760*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAA12a", -1, 0, 0, "" }, + /*761*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAA12a", -1, 0, 0, "" }, + /*762*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAA12a", -1, 0, 0, "" }, + /*763*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAA12a", -1, 0, 0, "" }, + /*764*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAA12a", -1, 0, 0, "" }, + /*765*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAA12a", -1, 0, 0, "" }, + /*766*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAA12a", -1, 0, 0, "" }, + /*767*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAA12a", -1, 0, 0, "" }, + /*768*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAA12a", -1, 0, 0, "" }, + /*769*/ { BARCODE_DATAMATRIX, -1, -1, -1, "A1212", -1, 0, 0, "" }, + /*770*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AA1212", -1, 0, 0, "" }, + /*771*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAA1212", -1, 0, 0, "" }, + /*772*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAA1212", -1, 0, 0, "" }, + /*773*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAA1212", -1, 0, 0, "" }, + /*774*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAA1212", -1, 0, 0, "" }, + /*775*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAA1212", -1, 0, 0, "" }, + /*776*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAA1212", -1, 0, 0, "" }, + /*777*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAA1212", -1, 0, 0, "" }, + /*778*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAA1212", -1, 0, 0, "" }, + /*779*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAA1212", -1, 0, 0, "" }, + /*780*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAA1212", -1, 0, 0, "" }, + /*781*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAA1212", -1, 0, 0, "" }, + /*782*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAA1212", -1, 0, 0, "" }, + /*783*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAA1212", -1, 0, 0, "" }, + /*784*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".a", -1, 0, 0, "" }, + /*785*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..a", -1, 0, 0, "" }, + /*786*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...a", -1, 0, 0, "" }, + /*787*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....a", -1, 0, 0, "" }, + /*788*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....a", -1, 0, 0, "" }, + /*789*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......a", -1, 0, 0, "" }, + /*790*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......a", -1, 0, 0, "" }, + /*791*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........a", -1, 0, 1, "" }, + /*792*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........a", -1, 0, 1, "" }, + /*793*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........a", -1, 0, 1, "" }, + /*794*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........a", -1, 0, 0, "" }, + /*795*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............a", -1, 0, 1, "" }, + /*796*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............a", -1, 0, 1, "" }, + /*797*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..............a", -1, 0, 0, "" }, + /*798*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...............a", -1, 0, 0, "" }, + /*799*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".12", -1, 0, 0, "" }, + /*800*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..12", -1, 0, 0, "" }, + /*801*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...12", -1, 0, 0, "" }, + /*802*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....12", -1, 0, 0, "" }, + /*803*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....12", -1, 0, 0, "" }, + /*804*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......12", -1, 0, 0, "" }, + /*805*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......12", -1, 0, 0, "" }, + /*806*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........12", -1, 0, 1, "" }, + /*807*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........12", -1, 0, 1, "" }, + /*808*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........12", -1, 0, 0, "" }, + /*809*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........12", -1, 0, 0, "" }, + /*810*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............12", -1, 0, 1, "" }, + /*811*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............12", -1, 0, 1, "" }, + /*812*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..............12", -1, 0, 0, "" }, + /*813*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...............12", -1, 0, 0, "" }, + /*814*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".\200", -1, 0, 0, "" }, + /*815*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..\200", -1, 0, 0, "" }, + /*816*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...\200", -1, 0, 1, "" }, + /*817*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....\200", -1, 0, 1, "" }, + /*818*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....\200", -1, 0, 1, "" }, + /*819*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......\200", -1, 0, 1, "" }, + /*820*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......\200", -1, 0, 1, "" }, + /*821*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........\200", -1, 0, 1, "" }, + /*822*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........\200", -1, 0, 0, "" }, + /*823*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........\200", -1, 0, 1, "" }, + /*824*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........\200", -1, 0, 0, "" }, + /*825*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............\200", -1, 0, 0, "" }, + /*826*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............\200", -1, 0, 0, "" }, + /*827*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..............\200", -1, 0, 1, "" }, + /*828*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...............\200", -1, 0, 0, "" }, + /*829*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".aa", -1, 0, 0, "" }, + /*830*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..aa", -1, 0, 0, "" }, + /*831*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...aa", -1, 0, 0, "" }, + /*832*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....aa", -1, 0, 0, "" }, + /*833*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....aa", -1, 0, 0, "" }, + /*834*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......aa", -1, 0, 0, "" }, + /*835*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......aa", -1, 0, 0, "" }, + /*836*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........aa", -1, 0, 0, "" }, + /*837*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........aa", -1, 0, 1, "" }, + /*838*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........aa", -1, 0, 0, "" }, + /*839*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........aa", -1, 0, 0, "" }, + /*840*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............aa", -1, 0, 1, "" }, + /*841*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............aa", -1, 0, 0, "" }, + /*842*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..............aa", -1, 0, 0, "" }, + /*843*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...............aa", -1, 0, 0, "" }, + /*844*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".12a", -1, 0, 0, "" }, + /*845*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..12a", -1, 0, 0, "" }, + /*846*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...12a", -1, 0, 0, "" }, + /*847*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....12a", -1, 0, 0, "" }, + /*848*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....12a", -1, 0, 0, "" }, + /*849*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......12a", -1, 0, 0, "" }, + /*850*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......12a", -1, 0, 0, "" }, + /*851*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........12a", -1, 0, 0, "" }, + /*852*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........12a", -1, 0, 1, "" }, + /*853*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........12a", -1, 0, 1, "" }, + /*854*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........12a", -1, 0, 0, "" }, + /*855*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............12a", -1, 0, 1, "" }, + /*856*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............12a", -1, 0, 0, "" }, + /*857*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..............12a", -1, 0, 0, "" }, + /*858*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...............12a", -1, 0, 0, "" }, + /*859*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".a12", -1, 0, 0, "" }, + /*860*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..a12", -1, 0, 0, "" }, + /*861*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...a12", -1, 0, 0, "" }, + /*862*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....a12", -1, 0, 0, "" }, + /*863*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....a12", -1, 0, 0, "" }, + /*864*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......a12", -1, 0, 0, "" }, + /*865*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......a12", -1, 0, 0, "" }, + /*866*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........a12", -1, 0, 0, "" }, + /*867*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........a12", -1, 0, 1, "" }, + /*868*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........a12", -1, 0, 0, "" }, + /*869*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........a12", -1, 0, 0, "" }, + /*870*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............a12", -1, 0, 1, "" }, + /*871*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............a12", -1, 0, 0, "" }, + /*872*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..............a12", -1, 0, 0, "" }, + /*873*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...............a12", -1, 0, 0, "" }, + /*874*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".1212", -1, 0, 0, "" }, + /*875*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..1212", -1, 0, 0, "" }, + /*876*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...1212", -1, 0, 0, "" }, + /*877*/ { BARCODE_DATAMATRIX, -1, -1, -1, "....1212", -1, 0, 0, "" }, + /*878*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".....1212", -1, 0, 0, "" }, + /*879*/ { BARCODE_DATAMATRIX, -1, -1, -1, "......1212", -1, 0, 0, "" }, + /*880*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".......1212", -1, 0, 0, "" }, + /*881*/ { BARCODE_DATAMATRIX, -1, -1, -1, "........1212", -1, 0, 0, "" }, + /*882*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".........1212", -1, 0, 1, "" }, + /*883*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..........1212", -1, 0, 1, "" }, + /*884*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...........1212", -1, 0, 0, "" }, + /*885*/ { BARCODE_DATAMATRIX, -1, -1, -1, "............1212", -1, 0, 1, "" }, + /*886*/ { BARCODE_DATAMATRIX, -1, -1, -1, ".............1212", -1, 0, 0, "" }, + /*887*/ { BARCODE_DATAMATRIX, -1, -1, -1, "..............1212", -1, 0, 0, "" }, + /*888*/ { BARCODE_DATAMATRIX, -1, -1, -1, "...............1212", -1, 0, 0, "" }, + /*889*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">a", -1, 0, 0, "" }, + /*890*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>a", -1, 0, 0, "" }, + /*891*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>a", -1, 0, 0, "" }, + /*892*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>a", -1, 0, 0, "" }, + /*893*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>a", -1, 0, 0, "" }, + /*894*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>a", -1, 0, 0, "" }, + /*895*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>a", -1, 0, 0, "" }, + /*896*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>a", -1, 0, 1, "" }, + /*897*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>a", -1, 0, 1, "" }, + /*898*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>a", -1, 0, 1, "" }, + /*899*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>a", -1, 0, 1, "" }, + /*900*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>a", -1, 0, 2, "" }, + /*901*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>a", -1, 0, 0, "" }, + /*902*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>a", -1, 0, 0, "" }, + /*903*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>a", -1, 0, 1, "" }, + /*904*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">12", -1, 0, 0, "" }, + /*905*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>12", -1, 0, 0, "" }, + /*906*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>12", -1, 0, 0, "" }, + /*907*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>12", -1, 0, 0, "" }, + /*908*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>12", -1, 0, 0, "" }, + /*909*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>12", -1, 0, 0, "" }, + /*910*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>12", -1, 0, 0, "" }, + /*911*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>12", -1, 0, 0, "" }, + /*912*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>12", -1, 0, 0, "" }, + /*913*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>12", -1, 0, 0, "" }, + /*914*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>12", -1, 0, 0, "" }, + /*915*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>12", -1, 0, 0, "" }, + /*916*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>12", -1, 0, 0, "" }, + /*917*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>12", -1, 0, 0, "" }, + /*918*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>12", -1, 0, 0, "" }, + /*919*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">\200", -1, 0, 0, "" }, + /*920*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>\200", -1, 0, 0, "" }, + /*921*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>\200", -1, 0, 1, "" }, + /*922*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>\200", -1, 0, 1, "" }, + /*923*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>\200", -1, 0, 1, "" }, + /*924*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>\200", -1, 0, 1, "" }, + /*925*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>\200", -1, 0, 1, "" }, + /*926*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>\200", -1, 0, 1, "" }, + /*927*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>\200", -1, 0, 1, "" }, + /*928*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>\200", -1, 0, 2, "" }, + /*929*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>\200", -1, 0, 2, "" }, + /*930*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>\200", -1, 0, 2, "" }, + /*931*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>\200", -1, 0, 0, "" }, + /*932*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>\200", -1, 0, 0, "" }, + /*933*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>\200", -1, 0, 1, "" }, + /*934*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">aa", -1, 0, 0, "" }, + /*935*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>aa", -1, 0, 0, "" }, + /*936*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>aa", -1, 0, 0, "" }, + /*937*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>aa", -1, 0, 0, "" }, + /*938*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>aa", -1, 0, 0, "" }, + /*939*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>aa", -1, 0, 0, "" }, + /*940*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>aa", -1, 0, 0, "" }, + /*941*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>aa", -1, 0, 0, "" }, + /*942*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>aa", -1, 0, 1, "" }, + /*943*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>aa", -1, 0, 1, "" }, + /*944*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>aa", -1, 0, 1, "" }, + /*945*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>aa", -1, 0, 2, "" }, + /*946*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>aa", -1, 0, 0, "" }, + /*947*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>aa", -1, 0, 0, "XXXXXXXXXXXXAAAA" }, + /*948*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>aa", -1, 0, 0, "EEEEEEEEEEEEEEEAA" }, + /*949*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">12a", -1, 0, 0, "" }, + /*950*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>12a", -1, 0, 0, "" }, + /*951*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>12a", -1, 0, 0, "" }, + /*952*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>12a", -1, 0, 0, "" }, + /*953*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>12a", -1, 0, 0, "" }, + /*954*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>12a", -1, 0, 0, "" }, + /*955*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>12a", -1, 0, 0, "" }, + /*956*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>12a", -1, 0, 0, "" }, + /*957*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>12a", -1, 0, 1, "" }, + /*958*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>12a", -1, 0, 1, "" }, + /*959*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>12a", -1, 0, 0, "" }, + /*960*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>12a", -1, 0, 0, "" }, + /*961*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>12a", -1, 0, 0, "" }, + /*962*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>12a", -1, 0, 0, "" }, + /*963*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>12a", -1, 0, 0, "" }, + /*964*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">a12", -1, 0, 0, "" }, + /*965*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>a12", -1, 0, 0, "" }, + /*966*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>a12", -1, 0, 0, "" }, + /*967*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>a12", -1, 0, 0, "" }, + /*968*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>a12", -1, 0, 0, "" }, + /*969*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>a12", -1, 0, 0, "" }, + /*970*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>a12", -1, 0, 0, "" }, + /*971*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>a12", -1, 0, 0, "" }, + /*972*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>a12", -1, 0, 1, "" }, + /*973*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>a12", -1, 0, 1, "" }, + /*974*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>a12", -1, 0, 1, "" }, + /*975*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>a12", -1, 0, 2, "" }, + /*976*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>a12", -1, 0, 0, "" }, + /*977*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>a12", -1, 0, 0, "" }, + /*978*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>a12", -1, 0, 1, "" }, + /*979*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">1212", -1, 0, 0, "" }, + /*980*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>1212", -1, 0, 0, "" }, + /*981*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>1212", -1, 0, 0, "" }, + /*982*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>1212", -1, 0, 0, "" }, + /*983*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>1212", -1, 0, 0, "" }, + /*984*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>1212", -1, 0, 0, "" }, + /*985*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>1212", -1, 0, 0, "" }, + /*986*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>1212", -1, 0, 0, "" }, + /*987*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>1212", -1, 0, 0, "" }, + /*988*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>1212", -1, 0, 0, "" }, + /*989*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>1212", -1, 0, 0, "" }, + /*990*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>1212", -1, 0, 0, "EEEEEEEEEEEEAAAA" }, + /*991*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>1212", -1, 0, 0, "XXXXXXXXXXXXAAAAA" }, + /*992*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>1212", -1, 0, 0, "XXXXXXXXXXXXAAAAAA" }, + /*993*/ { BARCODE_DATAMATRIX, -1, -1, -1, ">>>>>>>>>>>>>>>1212", -1, 0, 0, "" }, + /*994*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200|||||||||||||", -1, 0, 0, "Variant 1 last 3 ASC" }, + /*995*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAA|||||||||||AAAAAAAAAAAAAAA", -1, 0, 1, "" }, + /*996*/ { BARCODE_DATAMATRIX, -1, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM" "NOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJK" "LMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFG" "HIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567" "890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcde" "fghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO", -1, 0, 10, "960 chars, text/numeric" }, + /*997*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\000\004\a\b\t\n\v\f\r\033\035\036\201\\", 14, 0, 1, "From test_library escape_char_process 0, variant 1 later switch to B256 and changes to ASC for last 2 chars" }, + /*998*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAA*+*0**AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, 0, 2, "" }, + /*999*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, 0, 0, "" }, + /*1000*/ { BARCODE_DATAMATRIX, -1, -1, -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\034\035\036\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177", 128, 0, 0, "" }, + /*1001*/ { BARCODE_DATAMATRIX, GS1_MODE, -1, -1, "\200\200\200[\200\200[\200\200", -1, 0, 1, "Can't have extended ASCII in GS1 mode so these will never happen" }, + /*1002*/ { BARCODE_DATAMATRIX, GS1_MODE, GS1_GS_SEPARATOR, -1, "\200\200\200[\200\200[\200\200", -1, 0, 0, "" }, + /*1003*/ { BARCODE_DATAMATRIX, GS1_MODE, -1, -1, "\200\200\200\200[\200\200\200[\200\200", -1, 0, 1, "Stays in ASC after 1st FNC1" }, + /*1004*/ { BARCODE_DATAMATRIX, GS1_MODE, GS1_GS_SEPARATOR, -1, "\200\200\200\200[\200\200\200[\200\200", -1, 0, 0, "" }, + /*1005*/ { BARCODE_DATAMATRIX, -1, -1, -1, "https://example.com/01/09506000134369", -1, 0, 0, "" }, + /*1006*/ { BARCODE_DATAMATRIX, -1, -1, -1, "abcdefghi1234FGHIJKLMNabc@@@@@@@@@é", -1, 0, 0, "" }, + /*1007*/ { BARCODE_DATAMATRIX, -1, -1, -1, "ABCDEF", -1, 0, 0, "" }, + /*1008*/ { BARCODE_DATAMATRIX, -1, -1, -1, "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", -1, 0, 0, "" }, + /*1009*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200@A1^B2?C", -1, 0, 0, "" }, + /*1010*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^\200\200\200", -1, 0, 0, "" }, + /*1011*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@\200\200\200", -1, 0, 0, "" }, + /*1012*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@D\200\200\200", -1, 0, 0, "" }, + /*1013*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@D4\200\200\200", -1, 0, 0, "" }, + /*1014*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@D4@\200\200\200", -1, 0, 0, "" }, + /*1015*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200@A1^B2?C\200\200\200", -1, 0, 0, "" }, + /*1016*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@@@@@@@@@_", -1, 0, 1, "" }, + }; + int data_size = ARRAY_SIZE(data); + int i, length, ret; + struct zint_symbol *symbol; + + unsigned char binary[2][2200]; + int inputlen; + int binlen; + int binlens[2] = {0}; + + testStart("test_minimalenc"); + + 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, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, data[i].output_options, data[i].data, data[i].length, debug); + + inputlen = length; + binlen = 0; + symbol->input_mode |= FAST_MODE; + ret = dm_encode(symbol, (unsigned char *) data[i].data, binary[0], &inputlen, &binlen); + assert_equal(ret, data[i].ret, "i:%d dm_encode() FAST_MODE ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); + + binlens[0] = binlen; + + inputlen = length; + binlen = 0; + symbol->input_mode &= ~FAST_MODE; + ret = dm_encode(symbol, (unsigned char *) data[i].data, binary[1], &inputlen, &binlen); + assert_equal(ret, data[i].ret, "i:%d dm_encode() minimal ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); + + binlens[1] = binlen; + + fflush(stdout); + assert_equal(binlens[0], binlens[1] + data[i].expected_diff, "i:%d binlens[0] %d != %d binlens[1] (%d) + expected_diff (%d)\n", + i, binlens[0], binlens[1] + data[i].expected_diff, binlens[1], data[i].expected_diff); + + if (debug & ZINT_DEBUG_TEST_PRINT) { + if (data[i].expected_diff == 0) { + if (memcmp(binary[0], binary[1], binlen) != 0) { + printf("i:%d binaries differ\n", i); + } + } else { + printf("i:%d diff %d%s\n", i, data[i].expected_diff, data[i].expected_diff < 0 ? " ***worse***" : ""); } } @@ -2425,8 +5162,12 @@ static void test_encode(int index, int generate, int debug) { #include +#if 1 #define TEST_PERF_ITER_MILLES 5 #define TEST_PERF_ITERATIONS (TEST_PERF_ITER_MILLES * 1000) +#else +#define TEST_PERF_ITERATIONS 100 /* For valgrind */ +#endif #define TEST_PERF_TIME(arg) (((arg) * 1000.0) / CLOCKS_PER_SEC) // Not a real test, just performance indicator @@ -2436,6 +5177,7 @@ static void test_perf(int index, int debug) { int symbology; int input_mode; int option_2; + int option_3; char *data; int ret; @@ -2444,7 +5186,7 @@ static void test_perf(int index, int debug) { char *comment; }; struct item data[] = { - /* 0*/ { BARCODE_DATAMATRIX, -1, -1, + /* 0*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM" "NOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJK" "LMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFG" @@ -2452,7 +5194,15 @@ static void test_perf(int index, int debug) { "890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcde" "fghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO", 0, 96, 96, "960 chars, text/numeric" }, - /* 1*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, + /* 1*/ { BARCODE_DATAMATRIX, -1, -1, -1, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM" + "NOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJK" + "LMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFG" + "HIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567" + "890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcde" + "fghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO", + 0, 96, 96, "960 chars, text/numeric" }, + /* 2*/ { BARCODE_DATAMATRIX, DATA_MODE | FAST_MODE, -1, -1, "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" @@ -2478,7 +5228,34 @@ static void test_perf(int index, int debug) { "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240", 0, 120, 120, "960 chars, byte" }, - /* 2*/ { BARCODE_DATAMATRIX, -1, -1, "https://example.com/01/09506000134369", 0, 22, 22, "37 chars, text/numeric" }, + /* 3*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, -1, + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240" + "\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240\240", + 0, 120, 120, "960 chars, byte" }, + /* 4*/ { BARCODE_DATAMATRIX, FAST_MODE, -1, -1, "https://example.com/01/09506000134369", 0, 22, 22, "37 chars, text/numeric" }, + /* 5*/ { BARCODE_DATAMATRIX, -1, -1, -1, "https://example.com/01/09506000134369", 0, 22, 22, "37 chars, text/numeric" }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -2510,7 +5287,7 @@ static void test_perf(int index, int debug) { diff_create += clock() - start; assert_nonnull(symbol, "Symbol not created\n"); - length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug); + length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, data[i].option_3, -1 /*output_options*/, data[i].data, -1, debug); start = clock(); ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length); @@ -2556,256 +5333,6 @@ static void test_perf(int index, int debug) { } } -// Not a real test, just minimization indicator (TODO: remove in the not-too-distant future) -static void test_minimize(int index, int debug) { - - struct item { - int symbology; - int input_mode; - int output_options; - int option_2; - char *data; - int length; - int ret; - - int expected_diff; - char *comment; - }; - // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) - struct item data[] = { - /* 0*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200A", -1, 0, 0, "ASC last 1" }, - /* 1*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AA", -1, 0, 0, "ASC 2" }, - /* 2*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAA", -1, 0, 0, "ASC 3" }, - /* 3*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAA", -1, 0, 0, "ASC 4" }, - /* 4*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAA", -1, 0, 0, "ASC 5" }, - /* 5*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAA", -1, 0, 1, "C40 6" }, - /* 6*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAA", -1, 0, 0, "C40" }, - /* 7*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAA", -1, 0, 1, "C40" }, - /* 8*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAA", -1, 0, 2, "C40" }, - /* 9*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAA", -1, 0, 1, "C40 except last ASC" }, - /* 10*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAA", -1, 0, 1, "C40 except last 2 ASC" }, - /* 11*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAA", -1, 0, 2, "C40 except last ASC" }, - /* 12*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAAA", -1, 0, 2, "C40 except last 2 ASC" }, - /* 13*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009", -1, 0, 0, "ASC last 1" }, - /* 14*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099", -1, 0, -1, "Worse, switches too early to ASC (EOD), for last 3" }, - /* 15*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999", -1, 0, 0, "" }, - /* 16*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999", -1, 0, 0, "" }, - /* 17*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999", -1, 0, 0, "" }, - /* 18*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999", -1, 0, 0, "" }, - /* 19*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999", -1, 0, 0, "" }, - /* 20*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999", -1, 0, 0, "" }, - /* 21*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999", -1, 0, 0, "" }, - /* 22*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999", -1, 0, 0, "" }, - /* 23*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999", -1, 0, 0, "" }, - /* 24*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999", -1, 0, 0, "" }, - /* 25*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999", -1, 0, 0, "" }, - /* 26*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200a", -1, 0, 0, "ASC last 1" }, - /* 27*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aa", -1, 0, 0, "ASC 2" }, - /* 28*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaa", -1, 0, 0, "ASC 3" }, - /* 29*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaa", -1, 0, 0, "ASC 4" }, - /* 30*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaa", -1, 0, 0, "ASC 5" }, - /* 31*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaa", -1, 0, 1, "TEX 6" }, - /* 32*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa", -1, 0, 0, "TEX" }, - /* 33*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaa", -1, 0, 1, "TEX" }, - /* 34*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaa", -1, 0, 2, "TEX" }, - /* 35*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaa", -1, 0, 1, "TEX except last ASC" }, - /* 36*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaa", -1, 0, 1, "TEX except last 2 ASC" }, - /* 37*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaa", -1, 0, 2, "TEX" }, - /* 38*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaa", -1, 0, 2, "TEX except last ASC" }, - /* 39*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>", -1, 0, 0, "ASC last 1" }, - /* 40*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>", -1, 0, 0, "ASC 2" }, - /* 41*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>", -1, 0, 0, "ASC 3" }, - /* 42*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>", -1, 0, 0, "ASC 4" }, - /* 43*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>", -1, 0, 0, "ASC 5" }, - /* 44*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>", -1, 0, 1, "X12 6" }, - /* 45*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>", -1, 0, 0, "X12 except last 2 ASC" }, - /* 46*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>", -1, 0, 1, "X12" }, - /* 47*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>", -1, 0, 2, "X12" }, - /* 48*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>", -1, 0, 1, "X12 except last 2 ASC" }, - /* 49*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>", -1, 0, 1, "X12 except last 3 ASC" }, - /* 50*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>", -1, 0, 2, "X12" }, - /* 51*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>", -1, 0, 2, "X12 except last ASC" }, - /* 52*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.", -1, 0, 0, "ASC last 1" }, - /* 53*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200..", -1, 0, 0, "ASC 2" }, - /* 54*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200...", -1, 0, 0, "ASC 3" }, - /* 55*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200....", -1, 0, 0, "ASC 4" }, - /* 56*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.....", -1, 0, 0, "ASC 5" }, - /* 57*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200......", -1, 0, 0, "ASC 6" }, - /* 58*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.......", -1, 0, 0, "ASC 7" }, - /* 59*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200........", -1, 0, 1, "EDI 8" }, - /* 60*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.........", -1, 0, 0, "EDI" }, - /* 61*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200..........", -1, 0, 0, "EDI" }, - /* 62*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200...........", -1, 0, 1, "EDI" }, - /* 63*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200............", -1, 0, 2, "EDI" }, - /* 64*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200.............", -1, 0, 2, "EDI except last ASC" }, - /* 65*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200A\200\200\200", -1, 0, 0, "BAS" }, - /* 66*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AA\200\200\200", -1, 0, 0, "BAS" }, - /* 67*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAA\200\200\200", -1, 0, 0, "BAS" }, - /* 68*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAA\200\200\200", -1, 0, 0, "BAS" }, - /* 69*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAA\200\200\200", -1, 0, 0, "BAS" }, - /* 70*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAA\200\200\200", -1, 0, 0, "BAS" }, - /* 71*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAA\200\200\200", -1, 0, 0, "BAS 7 As, no switch as C40 & X12 cancel each other out" }, - /* 72*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAA\200\200\200", -1, 0, 0, "BAS 8 As, no switch as C40 & X12 cancel each other out" }, - /* 73*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAA\200\200\200", -1, 0, 0, "BAS 9 As, no switch as C40 & X12 cancel each other out" }, - /* 74*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 10 As, no switch as C40 & X12 cancel each other out" }, - /* 75*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 11 As, no switch as C40 & X12 cancel each other out" }, - /* 76*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 12 As, no switch as C40 & X12 cancel each other out" }, - /* 77*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200AAAAAAAAAAAAA\200\200\200", -1, 0, 0, "BAS 13 As, no switch as C40 & X12 cancel each other out" }, - /* 78*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009\200\200\200", -1, 0, 0, "BAS" }, - /* 79*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099\200\200\200", -1, 0, 0, "BAS" }, - /* 80*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999\200\200\200", -1, 0, 0, "BAS" }, - /* 81*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999\200\200\200", -1, 0, 0, "ASC 4" }, - /* 82*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999\200\200\200", -1, 0, 0, "ASC 4" }, - /* 83*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999\200\200\200", -1, 0, 0, "ASC 6" }, - /* 84*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999\200\200\200", -1, 0, 0, "ASC 6" }, - /* 85*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999\200\200\200", -1, 0, 0, "ASC 8" }, - /* 86*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999\200\200\200", -1, 0, 0, "ASC 8" }, - /* 87*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999\200\200\200", -1, 0, 0, "ASC 10" }, - /* 88*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\20099999999999\200\200\200", -1, 0, 0, "ASC 10" }, - /* 89*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200999999999999\200\200\200", -1, 0, 0, "ASC 12" }, - /* 90*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\2009999999999999\200\200\200", -1, 0, 0, "ASC 12" }, - /* 91*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200a\200\200\200", -1, 0, 0, "BAS" }, - /* 92*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aa\200\200\200", -1, 0, 0, "BAS" }, - /* 93*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaa\200\200\200", -1, 0, 0, "BAS" }, - /* 94*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaa\200\200\200", -1, 0, 0, "BAS" }, - /* 95*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaa\200\200\200", -1, 0, 0, "BAS" }, - /* 96*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaa\200\200\200", -1, 0, 0, "BAS" }, - /* 97*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200\200", -1, 0, 0, "7 a's, was worse before dm_text_sp_cnt()" }, - /* 98*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200", -1, 0, 0, "7 a's end 2 extended, was worse before dm_text_sp_cnt()" }, - /* 99*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200", -1, 0, 0, "7 a's end 1 extended, was worse before dm_text_sp_cnt()" }, - /*100*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa", -1, 0, 0, "7 a's end 0 extended, switches to TEX but same codeword count" }, - /*101*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200\200aaaaaaa\200\200", -1, 0, 0, "7 a's, was worse before dm_text_sp_cnt()" }, - /*102*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200\200\200aaaaaaa\200\200", -1, 0, 0, "7 a's, was worse before dm_text_sp_cnt()" }, - /*103*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200\200\200", -1, 0, 0, "7 a's end 4 extended, was worse before dm_text_sp_cnt()" }, - /*104*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaa\200\200\200\200\200", -1, 0, 0, "7 a's end 5 extended, was worse before dm_text_sp_cnt()" }, - /*105*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaa\200\200", -1, 0, 0, "8 a's end 2 extended, was worse before dm_text_sp_cnt()" }, - /*106*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaa\200\200\200", -1, 0, 0, "8 a's, was worse before dm_text_sp_cnt()" }, - /*107*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaa\200\200\200", -1, 0, 0, "9 a's, was worse before dm_text_sp_cnt()" }, - /*108*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaa\200\200\200", -1, 0, 0, "10 a's, was worse before dm_text_sp_cnt()" }, - /*109*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaa\200\200\200", -1, 0, 0, "11 a's, was worse before dm_text_sp_cnt()" }, - /*110*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaa\200\200\200", -1, 0, 0, "12 a's, switches to TEX but same codeword count" }, - /*111*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaa\200\200\200", -1, 0, 0, "13 a's, switches to TEX but same codeword count" }, - /*112*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaa\200\200\200", -1, 0, 0, "14 a's, switches to TEX but same codeword count" }, - /*113*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaa\200\200\200", -1, 0, 1, "15 a's, switches to TEX, better" }, - /*114*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaa\200\200\200", -1, 0, 1, "16 a's, switches to TEX, better" }, - /*115*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 1, "17 a's, switches to TEX, better" }, - /*116*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 2, "18 a's, switches to TEX, better" }, - /*117*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 2, "19 a's, switches to TEX, better" }, - /*118*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 2, "20 a's, switches to TEX, better" }, - /*119*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaaaaaaaaaaaaaaa\200\200\200", -1, 0, 3, "21 a's, switches to TEX, better" }, - /*120*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200Aaaaaaa\200\200\200", -1, 0, 0, "" }, - /*121*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaAaaa\200\200\200", -1, 0, 0, "" }, - /*122*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaA\200\200\200", -1, 0, 0, "" }, - /*123*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200Aaaaaaaa\200\200\200", -1, 0, 0, "" }, - /*124*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaAaaa\200\200\200", -1, 0, 0, "" }, - /*125*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaAa\200\200\200", -1, 0, 0, "" }, - /*126*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaA\200\200\200", -1, 0, 0, "Was worse before dm_text_sp_cnt()" }, - /*127*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200aaaaaaaAa\200\200\200", -1, 0, 0, "Was worse before dm_text_sp_cnt()" }, - /*128*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>\200\200\200", -1, 0, 0, "BAS" }, - /*129*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>\200\200\200", -1, 0, 0, "BAS" }, - /*130*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>\200\200\200", -1, 0, 0, "BAS" }, - /*131*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*132*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*133*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*134*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*135*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*136*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*137*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*138*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*139*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>\200\200\200", -1, 0, 0, "BAS" }, - /*140*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 12" }, - /*141*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 12" }, - /*142*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>\200\200\200", -1, 0, 0, "X12 12" }, - /*143*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 1, "X12 15" }, - /*144*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 1, "X12 15" }, - /*145*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 1, "X12 15" }, - /*146*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 2, "X12 18" }, - /*147*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 2, "X12 18" }, - /*148*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 2, "X12 18" }, - /*149*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200>>>>>>>>>>>>>>>>>>>>>>\200\200\200", -1, 0, 3, "X12 21" }, - /*150*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200|||||||||||||", -1, 0, 0, "Variant 1 last 3 ASC" }, - /*151*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAA|||||||||||AAAAAAAAAAAAAAA", -1, 0, 0, "" }, - /*152*/ { BARCODE_DATAMATRIX, -1, -1, -1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM" "NOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJK" "LMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFG" "HIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567" "890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcde" "fghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO", -1, 0, 0, "960 chars, text/numeric" }, - /*153*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\000\004\a\b\t\n\v\f\r\033\035\036\201\\", 14, 0, 0, "From test_library escape_char_process 0, variant 1 later switch to B256 and changes to ASC for last 2 chars" }, - /*154*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAA*+*0**AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, 0, 0, "" }, - /*155*/ { BARCODE_DATAMATRIX, -1, -1, -1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, 0, 0, "" }, - /*156*/ { BARCODE_DATAMATRIX, -1, -1, -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\034\035\036\037 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177", 128, 0, 0, "" }, - /*157*/ { BARCODE_DATAMATRIX, GS1_MODE, -1, -1, "\200\200\200[\200\200[\200\200", -1, 0, 0, "Can't have extended ASCII in GS1 mode so these will never happen" }, - /*158*/ { BARCODE_DATAMATRIX, GS1_MODE, GS1_GS_SEPARATOR, -1, "\200\200\200[\200\200[\200\200", -1, 0, 0, "" }, - /*159*/ { BARCODE_DATAMATRIX, GS1_MODE, -1, -1, "\200\200\200\200[\200\200\200[\200\200", -1, 0, -1, "Stays in ASC after 1st FNC1" }, - /*160*/ { BARCODE_DATAMATRIX, GS1_MODE, GS1_GS_SEPARATOR, -1, "\200\200\200\200[\200\200\200[\200\200", -1, 0, 0, "" }, - /*161*/ { BARCODE_DATAMATRIX, -1, -1, -1, "https://example.com/01/09506000134369", -1, 0, 0, "" }, - /*162*/ { BARCODE_DATAMATRIX, -1, -1, -1, "abcdefghi1234FGHIJKLMNabc@@@@@@@@@é", -1, 0, 0, "" }, - /*163*/ { BARCODE_DATAMATRIX, -1, -1, -1, "ABCDEF", -1, 0, 0, "" }, - /*164*/ { BARCODE_DATAMATRIX, -1, -1, -1, "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", -1, 0, 0, "" }, - /*165*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200@A1^B2?C", -1, 0, 1, "" }, - /*166*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^\200\200\200", -1, 0, 0, "" }, - /*167*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@\200\200\200", -1, 0, 0, "" }, - /*168*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@D\200\200\200", -1, 0, 0, "" }, - /*169*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@D4\200\200\200", -1, 0, 1, "" }, - /*170*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@A1^@B2^@C3^@D4@\200\200\200", -1, 0, 0, "" }, - /*171*/ { BARCODE_DATAMATRIX, -1, -1, -1, "\200\200\200@A1^B2?C\200\200\200", -1, 0, 0, "" }, - /*172*/ { BARCODE_DATAMATRIX, -1, -1, -1, "@@@@@@@@@_", -1, 0, 0, "" }, - }; - int data_size = ARRAY_SIZE(data); - int i, length, ret; - struct zint_symbol *symbol; - - unsigned char binary[2][2200]; - int inputlen; - int binlen; - int variant; - int binlens[2] = {0}; - - if (!(debug & ZINT_DEBUG_TEST_MINIMIZE)) { // -d 512 - return; - } - - testStart("test_minimize"); - - 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, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, data[i].output_options, data[i].data, data[i].length, debug); - - variant = 0; - inputlen = length; - binlen = 0; - ret = dm200encode_variant(symbol, (unsigned char *) data[i].data, binary[0], &inputlen, &binlen, variant); - assert_equal(ret, data[i].ret, "i:%d dm200encode_variant(%d) ret %d != %d (%s)\n", variant, i, ret, data[i].ret, symbol->errtxt); - - binlens[variant] = binlen; - - variant = 1; - inputlen = length; - binlen = 0; - ret = dm200encode_variant(symbol, (unsigned char *) data[i].data, binary[1], &inputlen, &binlen, variant); - assert_equal(ret, data[i].ret, "i:%d dm200encode_variant(%d) ret %d != %d (%s)\n", variant, i, ret, data[i].ret, symbol->errtxt); - - binlens[variant] = binlen; - - assert_equal(binlens[0], binlens[1] + data[i].expected_diff, "i:%d binlens[0] %d != %d binlens[1] (%d) + expected_diff (%d)\n", - i, binlens[0], binlens[1] + data[i].expected_diff, binlens[1], data[i].expected_diff); - - if (debug & ZINT_DEBUG_TEST_PRINT) { - if (data[i].expected_diff == 0) { - if (memcmp(binary[0], binary[1], binlen) != 0) { - printf("i:%d binaries differ\n", i); - } - } else { - printf("i:%d diff %d%s\n", i, data[i].expected_diff, data[i].expected_diff < 0 ? " ***worse***" : ""); - } - } - - ZBarcode_Delete(symbol); - } -} - int main(int argc, char *argv[]) { testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ @@ -2815,8 +5342,8 @@ int main(int argc, char *argv[]) { { "test_reader_init", test_reader_init, 1, 1, 1 }, { "test_input", test_input, 1, 1, 1 }, { "test_encode", test_encode, 1, 1, 1 }, + { "test_minimalenc", test_minimalenc, 1, 0, 1 }, { "test_perf", test_perf, 1, 0, 1 }, - { "test_minimize", test_minimize, 1, 0, 1 }, }; testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); diff --git a/backend/tests/test_dmatrix_variant.h b/backend/tests/test_dmatrix_variant.h deleted file mode 100644 index 68012f6f..00000000 --- a/backend/tests/test_dmatrix_variant.h +++ /dev/null @@ -1,969 +0,0 @@ -/* - libzint - the open source barcode library - Copyright (C) 2021 Robin Stuart - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the project nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - */ -/* vim: set ts=4 sw=4 et : */ - -/* Used by test_matrix.c test_minimize() (TODO: remove in the not-too-distant future) */ - -#ifndef Z_DMATRIX_VARIANT_H -#define Z_DMATRIX_VARIANT_H - -#include "../dmatrix.h" - -static int dm_isc40(const unsigned char input) { - if (input <= '9') { - return input >= '0' || input == ' '; - } - return input >= 'A' && input <= 'Z'; -} - -/* Is basic (non-shifted) TEXT? */ -static int dm_istext(const unsigned char input) { - if (input <= '9') { - return input >= '0' || input == ' '; - } - return input >= 'a' && input <= 'z'; -} - -/* Is basic (non-shifted) C40/TEXT? */ -static int dm_isc40text(const int current_mode, const unsigned char input) { - return current_mode == DM_C40 ? dm_isc40(input) : dm_istext(input); -} - -/* Return true (1) if a character is valid in X12 set */ -static int dm_isX12(const unsigned char input) { - return dm_isc40(input) || input == 13 || input == '*' || input == '>'; -} - -/* Return true (1) if a character is valid in EDIFACT set */ -static int dm_isedifact(const unsigned char input, const int gs1) { - return (input >= ' ' && input <= '^') && (!gs1 || input != '['); /* Can't encode GS1 FNC1/GS in EDIFACT */ -} - -static int dm_p_r_6_2_1(const unsigned char source[], const int length, const int sp) { - /* Annex P section (r)(6)(ii)(I) - "If one of the three X12 terminator/separator characters first - occurs in the yet to be processed data before a non-X12 character..." - */ - int i; - - for (i = sp; i < length && dm_isX12(source[i]); i++) { - if (source[i] == 13 || source[i] == '*' || source[i] == '>') { - return 1; - } - } - - return 0; -} - -/* Count number of TEXT characters around `sp` between `position` and `length` - - helper to avoid exiting from Base 256 too early if have series of TEXT characters */ -static int dm_text_sp_cnt(const unsigned char source[], const int position, const int length, const int sp) { - int i; - int cnt = 0; - - /* Count from `sp` forward */ - for (i = sp; i < length && dm_istext(source[i]); i++, cnt++); - /* Count backwards from `sp` */ - for (i = sp - 1; i >= position && dm_istext(source[i]); i--, cnt++); - - return cnt; -} - -#define DM_MULT 12 - -#define DM_MULT_1_DIV_2 6 -#define DM_MULT_2_DIV_3 8 -#define DM_MULT_3_DIV_4 9 -#define DM_MULT_1 12 -#define DM_MULT_5_DIV_4 15 -#define DM_MULT_4_DIV_3 16 -#define DM_MULT_2 24 -#define DM_MULT_9_DIV_4 27 -#define DM_MULT_8_DIV_3 32 -#define DM_MULT_3 26 -#define DM_MULT_13_DIV_4 39 -#define DM_MULT_10_DIV_3 40 -#define DM_MULT_4 48 -#define DM_MULT_17_DIV_4 51 -#define DM_MULT_13_DIV_3 52 - -#define DM_MULT_MINUS_1 11 -#define DM_MULT_CEIL(n) ((((n) + DM_MULT_MINUS_1) / DM_MULT) * DM_MULT) - -static int dm_look_ahead_test_variant(const unsigned char source[], const int length, const int position, - const int current_mode, const int mode_arg, const int gs1, const int debug_print, const int variant) { - int ascii_count, c40_count, text_count, x12_count, edf_count, b256_count; - int ascii_rnded, c40_rnded, text_rnded, x12_rnded, edf_rnded, b256_rnded; - int cnt_1; - int sp; - - int ascii_init_test, loop_test, edf_eod_test, x12_eod_test; - - /* step (j) */ - if (variant == 1) { - ascii_init_test = (current_mode == DM_ASCII || current_mode == DM_BASE256); - } else { - ascii_init_test = (current_mode == DM_ASCII); - } - if (ascii_init_test) { - ascii_count = 0; - c40_count = DM_MULT_1; - text_count = DM_MULT_1; - x12_count = DM_MULT_1; - edf_count = DM_MULT_1; - if (variant == 1) { - b256_count = DM_MULT_2; - } else { - b256_count = DM_MULT_5_DIV_4; // 1.25 - } - } else { - ascii_count = DM_MULT_1; - c40_count = DM_MULT_2; - text_count = DM_MULT_2; - x12_count = DM_MULT_2; - edf_count = DM_MULT_2; - if (variant == 1) { - b256_count = DM_MULT_3; - } else { - b256_count = DM_MULT_9_DIV_4; // 2.25 - } - } - - switch (current_mode) { - case DM_C40: c40_count = 0; - break; - case DM_TEXT: text_count = 0; - break; - case DM_X12: x12_count = 0; - break; - case DM_EDIFACT: edf_count = 0; - break; - case DM_BASE256: - if (variant == 1) { - b256_count = mode_arg == 249 ? DM_MULT_1 : 0; - } else { - b256_count = 0; - } - break; - } - - for (sp = position; sp < length; sp++) { - unsigned char c = source[sp]; - int is_extended = c & 0x80; - - /* ascii ... step (l) */ - if ((c >= '0') && (c <= '9')) { - ascii_count += DM_MULT_1_DIV_2; // (l)(1) - } else { - if (is_extended) { - ascii_count = DM_MULT_CEIL(ascii_count) + DM_MULT_2; // (l)(2) - } else { - ascii_count = DM_MULT_CEIL(ascii_count) + DM_MULT_1; // (l)(3) - } - } - - /* c40 ... step (m) */ - if (dm_isc40(c)) { - c40_count += DM_MULT_2_DIV_3; // (m)(1) - } else { - if (is_extended) { - c40_count += DM_MULT_8_DIV_3; // (m)(2) - } else { - c40_count += DM_MULT_4_DIV_3; // (m)(3) - } - } - - /* text ... step (n) */ - if (dm_istext(c)) { - text_count += DM_MULT_2_DIV_3; // (n)(1) - } else { - if (is_extended) { - text_count += DM_MULT_8_DIV_3; // (n)(2) - } else { - text_count += DM_MULT_4_DIV_3; // (n)(3) - } - } - - /* x12 ... step (o) */ - if (dm_isX12(c)) { - x12_count += DM_MULT_2_DIV_3; // (o)(1) - } else { - if (is_extended) { - x12_count += DM_MULT_13_DIV_3; // (o)(2) - } else { - x12_count += DM_MULT_10_DIV_3; // (o)(3) - } - } - - /* edifact ... step (p) */ - if (dm_isedifact(c, gs1)) { - edf_count += DM_MULT_3_DIV_4; // (p)(1) - } else { - if (is_extended) { - edf_count += DM_MULT_17_DIV_4; // (p)(2) - } else { - edf_count += DM_MULT_13_DIV_4; // (p)(3) - } - } - - /* base 256 ... step (q) */ - if ((gs1 == 1) && (c == '[')) { - /* FNC1 separator */ - b256_count += DM_MULT_4; // (q)(1) - } else { - b256_count += DM_MULT_1; // (q)(2) - } - - if (variant == 1) { - loop_test = sp >= position + 3; - } else { - loop_test = sp >= position + 4; - } - if (loop_test) { - int ascii_loop_test; - - /* At least 5 data characters processed ... step (r) */ - /* NOTE: different than spec, where it's at least 4. Following previous behaviour here (and BWIPP) */ - - if (debug_print) { - printf("\n(m:%d, p:%d, sp:%d, a:%d): ascii_count %d, b256_count %d, edf_count %d, text_count %d" - ", x12_count %d, c40_count %d ", - current_mode, position, sp, mode_arg, ascii_count, b256_count, edf_count, text_count, - x12_count, c40_count); - } - - cnt_1 = ascii_count + DM_MULT_1; - if (variant == 1) { - ascii_loop_test = (cnt_1 < b256_count && cnt_1 <= edf_count && cnt_1 <= text_count && cnt_1 <= x12_count && cnt_1 <= c40_count); - } else { - ascii_loop_test = (cnt_1 <= b256_count && cnt_1 <= edf_count && cnt_1 <= text_count && cnt_1 <= x12_count && cnt_1 <= c40_count); - } - if (ascii_loop_test) { - if (debug_print) printf("ASC->"); - return DM_ASCII; /* step (r)(1) */ - } - - cnt_1 = b256_count + DM_MULT_1; - if (cnt_1 <= ascii_count || (cnt_1 < edf_count && cnt_1 < text_count && cnt_1 < x12_count - && cnt_1 < c40_count)) { - if (debug_print) printf("BAS->"); - return DM_BASE256; /* step (r)(2) */ - } - cnt_1 = edf_count + DM_MULT_1; - if (cnt_1 < ascii_count && cnt_1 < b256_count && cnt_1 < text_count && cnt_1 < x12_count - && cnt_1 < c40_count) { - if (debug_print) printf("EDI->"); - return DM_EDIFACT; /* step (r)(3) */ - } - cnt_1 = text_count + DM_MULT_1; - if (cnt_1 < ascii_count && cnt_1 < b256_count && cnt_1 < edf_count && cnt_1 < x12_count - && cnt_1 < c40_count) { - if (variant == 1) { - if (current_mode == DM_BASE256 && position + 6 < length) { - int text_sp_cnt = dm_text_sp_cnt(source, position, length, sp); - if (debug_print) printf("text_sp_cnt %d\n", text_sp_cnt); - if (text_sp_cnt >= 12) { - if (debug_print) printf("TEX->"); - return DM_TEXT; /* step (r)(4) */ - } - } else { - if (debug_print) printf("TEX->"); - return DM_TEXT; /* step (r)(4) */ - } - } else { - if (debug_print) printf("TEX->"); - return DM_TEXT; /* step (r)(4) */ - } - } - cnt_1 = x12_count + DM_MULT_1; - if (cnt_1 < ascii_count && cnt_1 < b256_count && cnt_1 < edf_count && cnt_1 < text_count - && cnt_1 < c40_count) { - if (debug_print) printf("X12->"); - return DM_X12; /* step (r)(5) */ - } - cnt_1 = c40_count + DM_MULT_1; - if (cnt_1 < ascii_count && cnt_1 < b256_count && cnt_1 < edf_count && cnt_1 < text_count) { - if (c40_count < x12_count) { - if (debug_print) printf("C40->"); - return DM_C40; /* step (r)(6)(i) */ - } - if (c40_count == x12_count) { - if (dm_p_r_6_2_1(source, length, sp) == 1) { - if (debug_print) printf("X12->"); - return DM_X12; /* step (r)(6)(ii)(I) */ - } - if (debug_print) printf("C40->"); - return DM_C40; /* step (r)(6)(ii)(II) */ - } - } - } - } - - /* At the end of data ... step (k) */ - /* step (k)(1) */ - ascii_rnded = DM_MULT_CEIL(ascii_count); - b256_rnded = DM_MULT_CEIL(b256_count); - edf_rnded = DM_MULT_CEIL(edf_count); - text_rnded = DM_MULT_CEIL(text_count); - x12_rnded = DM_MULT_CEIL(x12_count); - c40_rnded = DM_MULT_CEIL(c40_count); - if (debug_print) { - printf("\nEOD(m:%d, p:%d, a:%d): ascii_rnded %d, b256_rnded %d, edf_rnded %d, text_rnded %d, x12_rnded %d (%d)" - ", c40_rnded %d (%d) ", - current_mode, position, mode_arg, ascii_rnded, b256_rnded, edf_rnded, text_rnded, x12_rnded, x12_count, - c40_rnded, c40_count); - } - - if (ascii_rnded <= b256_rnded && ascii_rnded <= edf_rnded && ascii_rnded <= text_rnded && ascii_rnded <= x12_rnded - && ascii_rnded <= c40_rnded) { - if (debug_print) printf("ASC->"); - return DM_ASCII; /* step (k)(2) */ - } - if (b256_rnded < ascii_rnded && b256_rnded < edf_rnded && b256_rnded < text_rnded && b256_rnded < x12_rnded - && b256_rnded < c40_rnded) { - if (debug_print) printf("BAS->"); - return DM_BASE256; /* step (k)(3) */ - } - if (variant == 1) { - edf_eod_test = (edf_rnded < ascii_rnded && edf_rnded < b256_rnded && edf_rnded < text_rnded && edf_rnded <= x12_rnded && edf_rnded < c40_rnded); - } else { - edf_eod_test = (edf_rnded < ascii_rnded && edf_rnded < b256_rnded && edf_rnded < text_rnded && edf_rnded < x12_rnded && edf_rnded < c40_rnded); - } - if (edf_eod_test) { - if (debug_print) printf("EDI->"); - return DM_EDIFACT; /* step (k)(4) */ - } - if (text_rnded < ascii_rnded && text_rnded < b256_rnded && text_rnded < edf_rnded && text_rnded < x12_rnded - && text_rnded < c40_rnded) { - if (debug_print) printf("TEX->"); - return DM_TEXT; /* step (k)(5) */ - } - if (variant == 1) { - x12_eod_test = (x12_rnded < ascii_rnded && x12_rnded < b256_rnded && x12_rnded <= edf_rnded && x12_rnded < text_rnded && x12_rnded < c40_rnded); - } else { - x12_eod_test = (x12_rnded < ascii_rnded && x12_rnded < b256_rnded && x12_rnded < edf_rnded && x12_rnded < text_rnded && x12_rnded < c40_rnded); - } - if (x12_eod_test) { - if (debug_print) printf("X12->"); - return DM_X12; /* step (k)(6) */ - } - /* Note the algorithm is particularly sub-optimal here, returning C40 even if X12/EDIFACT (much) better, due to - the < comparisons of rounded X12/EDIFACT values to each other above - comparisons would need to be <= or - unrounded (cf. very similar Code One algorithm). Not changed to maintain compatibility with spec and BWIPP */ - if (debug_print) printf("C40->"); - return DM_C40; /* step (k)(7) */ -} - -/* Copy C40/TEXT/X12 triplets from buffer to target. Returns elements left in buffer (< 3) */ -static int dm_ctx_buffer_xfer(int process_buffer[8], int process_p, unsigned char target[], int *p_tp, - const int debug_print) { - int i, process_e; - int tp = *p_tp; - - process_e = (process_p / 3) * 3; - - for (i = 0; i < process_e; i += 3) { - int iv = (1600 * process_buffer[i]) + (40 * process_buffer[i + 1]) + (process_buffer[i + 2]) + 1; - target[tp++] = (unsigned char) (iv >> 8); - target[tp++] = (unsigned char) (iv & 0xFF); - if (debug_print) { - printf("[%d %d %d (%d %d)] ", process_buffer[i], process_buffer[i + 1], process_buffer[i + 2], - target[tp - 2], target[tp - 1]); - } - } - - process_p -= process_e; - - if (process_p) { - memmove(process_buffer, process_buffer + process_e, sizeof(int) * process_p); - } - - *p_tp = tp; - - return process_p; -} - -/* Copy EDIFACT quadruplets from buffer to target. Returns elements left in buffer (< 4) */ -static int dm_edi_buffer_xfer(int process_buffer[8], int process_p, unsigned char target[], int *p_tp, - const int empty, const int debug_print) { - int i, process_e; - int tp = *p_tp; - - process_e = (process_p / 4) * 4; - - for (i = 0; i < process_e; i += 4) { - target[tp++] = (unsigned char) (process_buffer[i] << 2 | (process_buffer[i + 1] & 0x30) >> 4); - target[tp++] = (unsigned char) ((process_buffer[i + 1] & 0x0f) << 4 | (process_buffer[i + 2] & 0x3c) >> 2); - target[tp++] = (unsigned char) ((process_buffer[i + 2] & 0x03) << 6 | process_buffer[i + 3]); - if (debug_print) { - printf("[%d %d %d %d (%d %d %d)] ", process_buffer[i], process_buffer[i + 1], process_buffer[i + 2], - process_buffer[i + 3], target[tp - 3], target[tp - 2], target[tp - 1]); - } - } - - process_p -= process_e; - - if (process_p) { - memmove(process_buffer, process_buffer + process_e, sizeof(int) * process_p); - if (empty) { - if (process_p == 3) { - target[tp++] = (unsigned char) (process_buffer[i] << 2 | (process_buffer[i + 1] & 0x30) >> 4); - target[tp++] = (unsigned char) ((process_buffer[i + 1] & 0x0f) << 4 - | (process_buffer[i + 2] & 0x3c) >> 2); - target[tp++] = (unsigned char) ((process_buffer[i + 2] & 0x03) << 6); - if (debug_print) { - printf("[%d %d %d (%d %d %d)] ", process_buffer[i], process_buffer[i + 1], process_buffer[i + 2], - target[tp - 3], target[tp - 2], target[tp - 1]); - } - } else if (process_p == 2) { - target[tp++] = (unsigned char) (process_buffer[i] << 2 | (process_buffer[i + 1] & 0x30) >> 4); - target[tp++] = (unsigned char) ((process_buffer[i + 1] & 0x0f) << 4); - if (debug_print) { - printf("[%d %d (%d %d)] ", process_buffer[i], process_buffer[i + 1], target[tp - 2], - target[tp - 1]); - } - } else { - target[tp++] = (unsigned char) (process_buffer[i] << 2); - if (debug_print) printf("[%d (%d)] ", process_buffer[i], target[tp - 1]); - } - process_p = 0; - } - } - - *p_tp = tp; - - return process_p; -} - -STATIC_UNLESS_ZINT_TEST int dm_get_symbolsize(struct zint_symbol *symbol, const int minimum); -STATIC_UNLESS_ZINT_TEST int dm_codewords_remaining(struct zint_symbol *symbol, const int tp, const int process_p); -STATIC_UNLESS_ZINT_TEST int dm_c40text_cnt(const int current_mode, const int gs1, unsigned char input); -STATIC_UNLESS_ZINT_TEST int dm_update_b256_field_length(unsigned char target[], int tp, int b256_start); -STATIC_UNLESS_ZINT_TEST int dm_switch_mode(const int next_mode, unsigned char target[], int tp, int *b256_start, - const int debug_print); - -/* Version of dm200encode() to check variant look ahead parameters */ -static int dm200encode_variant(struct zint_symbol *symbol, const unsigned char source[], unsigned char target[], - int *p_length, int *p_binlen, const int variant) { - - int sp; - int tp, i, gs1; - int current_mode, next_mode; - int not_first = 0; - int inputlen = *p_length; - int process_buffer[8]; /* holds remaining data to finalised */ - int process_p = 0; /* number of characters left to finalise */ - int b256_start = 0; - int symbols_left; - const int debug_print = symbol->debug & ZINT_DEBUG_PRINT; - - sp = 0; - tp = 0; - - 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) { - if (symbol->output_options & GS1_GS_SEPARATOR) { - gs1 = 2; - } else { - gs1 = 1; - } - } else { - gs1 = 0; - } - - if (gs1) { - target[tp++] = 232; - if (debug_print) printf("FN1 "); - } /* FNC1 */ - - if (symbol->output_options & READER_INIT) { - if (gs1) { - strcpy(symbol->errtxt, "521: Cannot encode in GS1 mode and Reader Initialisation at the same time"); - return ZINT_ERROR_INVALID_OPTION; - } - 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; /* Reader Programming */ - if (debug_print) printf("RP "); - } - - if (symbol->eci > 0) { - /* Encode ECI numbers according to Table 6 */ - target[tp++] = 241; /* ECI Character */ - if (symbol->eci <= 126) { - target[tp++] = (unsigned char) (symbol->eci + 1); - } else if (symbol->eci <= 16382) { - target[tp++] = (unsigned char) ((symbol->eci - 127) / 254 + 128); - target[tp++] = (unsigned char) ((symbol->eci - 127) % 254 + 1); - } else { - target[tp++] = (unsigned char) ((symbol->eci - 16383) / 64516 + 192); - target[tp++] = (unsigned char) (((symbol->eci - 16383) / 254) % 254 + 1); - target[tp++] = (unsigned char) ((symbol->eci - 16383) % 254 + 1); - } - if (debug_print) printf("ECI %d ", symbol->eci + 1); - } - - /* Check for Macro05/Macro06 */ - /* "[)>[RS]05[GS]...[RS][EOT]" -> CW 236 */ - /* "[)>[RS]06[GS]...[RS][EOT]" -> CW 237 */ - if (tp == 0 && sp == 0 && inputlen >= 9 - && source[0] == '[' && source[1] == ')' && source[2] == '>' - && source[3] == '\x1e' && source[4] == '0' - && (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; - if (debug_print) printf("Macro05 "); - } else { - target[tp++] = 237; - if (debug_print) printf("Macro06 "); - } - /* Remove macro characters from input string */ - sp = 7; - inputlen -= 2; - *p_length -= 2; - } - - /* step (a) */ - current_mode = DM_ASCII; - next_mode = DM_ASCII; - - while (sp < inputlen) { - - current_mode = next_mode; - - /* step (b) - ASCII encodation */ - if (current_mode == DM_ASCII) { - next_mode = DM_ASCII; - - if (is_twodigits(source, inputlen, sp)) { - target[tp++] = (unsigned char) ((10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130); - if (debug_print) printf("N%02d ", target[tp - 1] - 130); - sp += 2; - } else { - next_mode = dm_look_ahead_test_variant(source, inputlen, sp, current_mode, 0, gs1, debug_print, variant); - - if (next_mode != DM_ASCII) { - tp = dm_switch_mode(next_mode, target, tp, &b256_start, debug_print); - not_first = 0; - } else { - if (source[sp] & 0x80) { - target[tp++] = 235; /* FNC4 */ - target[tp++] = (source[sp] - 128) + 1; - if (debug_print) printf("FN4 A%02X ", target[tp - 1] - 1); - } else { - if (gs1 && (source[sp] == '[')) { - if (gs1 == 2) { - target[tp++] = 29 + 1; /* GS */ - if (debug_print) printf("GS "); - } else { - target[tp++] = 232; /* FNC1 */ - if (debug_print) printf("FN1 "); - } - } else { - target[tp++] = source[sp] + 1; - if (debug_print) printf("A%02X ", target[tp - 1] - 1); - } - } - sp++; - } - } - - /* step (c)/(d) C40/TEXT encodation */ - } else if (current_mode == DM_C40 || current_mode == DM_TEXT) { - - next_mode = current_mode; - if (process_p == 0 && not_first) { - next_mode = dm_look_ahead_test_variant(source, inputlen, sp, current_mode, process_p, gs1, debug_print, variant); - } - - if (next_mode != current_mode) { - target[tp++] = 254; /* Unlatch */ - next_mode = DM_ASCII; - if (debug_print) printf("ASC "); - } else { - int shift_set, value; - const char *ct_shift, *ct_value; - - if (current_mode == DM_C40) { - ct_shift = dm_c40_shift; - ct_value = dm_c40_value; - } else { - ct_shift = dm_text_shift; - ct_value = dm_text_value; - } - - if (source[sp] & 0x80) { - process_buffer[process_p++] = 1; - process_buffer[process_p++] = 30; /* Upper Shift */ - shift_set = ct_shift[source[sp] - 128]; - value = ct_value[source[sp] - 128]; - } else { - if (gs1 && (source[sp] == '[')) { - if (gs1 == 2) { - shift_set = ct_shift[29]; - value = ct_value[29]; /* GS */ - } else { - shift_set = 2; - value = 27; /* FNC1 */ - } - } else { - shift_set = ct_shift[source[sp]]; - value = ct_value[source[sp]]; - } - } - - if (shift_set != 0) { - process_buffer[process_p++] = shift_set - 1; - } - process_buffer[process_p++] = value; - - if (process_p >= 3) { - process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); - } - sp++; - not_first = 1; - } - - /* step (e) X12 encodation */ - } else if (current_mode == DM_X12) { - - if (!dm_isX12(source[sp])) { - next_mode = DM_ASCII; - } else { - next_mode = DM_X12; - if (process_p == 0 && not_first) { - next_mode = dm_look_ahead_test_variant(source, inputlen, sp, current_mode, process_p, gs1, debug_print, variant); - } - } - - if (next_mode != DM_X12) { - process_p = 0; /* Throw away buffer if any */ - target[tp++] = 254; /* Unlatch */ - next_mode = DM_ASCII; - if (debug_print) printf("ASC "); - } else { - static const char x12_nonalphanum_chars[] = "\015*> "; - int value = 0; - - if ((source[sp] >= '0') && (source[sp] <= '9')) { - value = (source[sp] - '0') + 4; - } else if ((source[sp] >= 'A') && (source[sp] <= 'Z')) { - value = (source[sp] - 'A') + 14; - } else { - value = posn(x12_nonalphanum_chars, source[sp]); - } - - process_buffer[process_p++] = value; - - if (process_p >= 3) { - process_p = dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); - } - sp++; - not_first = 1; - } - - /* step (f) EDIFACT encodation */ - } else if (current_mode == DM_EDIFACT) { - - if (!dm_isedifact(source[sp], gs1)) { - next_mode = DM_ASCII; - } else { - next_mode = DM_EDIFACT; - if (process_p == 3) { - /* Note different then spec Step (f)(1), which suggests checking when 0, but this seems to work - better in many cases as the switch to ASCII is "free" */ - next_mode = dm_look_ahead_test_variant(source, inputlen, sp, current_mode, process_p, gs1, debug_print, variant); - } - } - - if (next_mode != DM_EDIFACT) { - process_buffer[process_p++] = 31; - process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 1 /*empty*/, debug_print); - next_mode = DM_ASCII; - if (debug_print) printf("ASC "); - } else { - int value = source[sp]; - - if (value >= 64) { // '@' - value -= 64; - } - - process_buffer[process_p++] = value; - sp++; - not_first = 1; - - if (process_p >= 4) { - process_p = dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 0 /*empty*/, debug_print); - } - } - - /* step (g) Base 256 encodation */ - } else if (current_mode == DM_BASE256) { - - if (gs1 == 1 && source[sp] == '[') { - next_mode = DM_ASCII; - } else { - next_mode = DM_BASE256; - if (not_first) { - next_mode = dm_look_ahead_test_variant(source, inputlen, sp, current_mode, tp - (b256_start + 1), gs1, - debug_print, variant); - } - } - - if (next_mode != DM_BASE256) { - tp = dm_update_b256_field_length(target, tp, b256_start); - /* B.2.1 255-state randomising algorithm */ - for (i = b256_start; i < tp; i++) { - const int prn = ((149 * (i + 1)) % 255) + 1; - target[i] = (unsigned char) ((target[i] + prn) & 0xFF); - } - if (variant == 1) { - tp = dm_switch_mode(next_mode, target, tp, &b256_start, debug_print); - not_first = 0; - } else { - next_mode = DM_ASCII; - if (debug_print) printf("ASC "); - } - } else { - if (gs1 == 2 && source[sp] == '[') { - target[tp++] = 29; /* GS */ - } else { - target[tp++] = source[sp]; - } - sp++; - not_first = 1; - if (debug_print) printf("B%02X ", target[tp - 1]); - } - } - - if (tp > 1558) { - strcpy(symbol->errtxt, "520: Data too long to fit in symbol"); - return ZINT_ERROR_TOO_LONG; - } - - } /* while */ - - symbols_left = dm_codewords_remaining(symbol, tp, process_p); - - if (debug_print) printf("\nsymbols_left %d, process_p %d ", symbols_left, process_p); - - if (current_mode == DM_C40 || current_mode == DM_TEXT) { - /* NOTE: changed to follow spec exactly here, only using Shift 1 padded triplets when 2 symbol chars remain. - This matches the behaviour of BWIPP but not tec-it, nor figures 4.15.1-1 and 4.15-1-2 in GS1 General - Specifications 21.0.1. - */ - if (debug_print) printf("%s ", current_mode == DM_C40 ? "C40" : "TEX"); - if (process_p == 0) { - if (symbols_left > 0) { - target[tp++] = 254; // Unlatch - if (debug_print) printf("ASC "); - } - } else { - if (process_p == 2 && symbols_left == 2) { - /* 5.2.5.2 (b) */ - process_buffer[process_p++] = 0; // Shift 1 - (void) dm_ctx_buffer_xfer(process_buffer, process_p, target, &tp, debug_print); - - } else if (process_p == 1 && symbols_left <= 2 && dm_isc40text(current_mode, source[inputlen - 1])) { - /* 5.2.5.2 (c)/(d) */ - if (symbols_left > 1) { - /* 5.2.5.2 (c) */ - target[tp++] = 254; // Unlatch and encode remaining data in ascii. - if (debug_print) printf("ASC "); - } - target[tp++] = source[inputlen - 1] + 1; - if (debug_print) printf("A%02X ", target[tp - 1] - 1); - - } else { - int cnt, total_cnt = 0; - /* Backtrack to last complete triplet (same technique as BWIPP) */ - while (sp > 0 && process_p % 3) { - sp--; - cnt = dm_c40text_cnt(current_mode, gs1, source[sp]); - total_cnt += cnt; - process_p -= cnt; - } - tp -= (total_cnt / 3) * 2; - - target[tp++] = 254; // Unlatch - if (debug_print) printf("ASC "); - for (; sp < inputlen; sp++) { - if (is_twodigits(source, inputlen, sp)) { - target[tp++] = (unsigned char) ((10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130); - if (debug_print) printf("N%02d ", target[tp - 1] - 130); - sp++; - } else if (source[sp] & 0x80) { - target[tp++] = 235; /* FNC4 */ - target[tp++] = (source[sp] - 128) + 1; - if (debug_print) printf("FN4 A%02X ", target[tp - 1] - 1); - } else if (gs1 && source[sp] == '[') { - if (gs1 == 2) { - target[tp++] = 29 + 1; /* GS */ - if (debug_print) printf("GS "); - } else { - target[tp++] = 232; /* FNC1 */ - if (debug_print) printf("FN1 "); - } - } else { - target[tp++] = source[sp] + 1; - if (debug_print) printf("A%02X ", target[tp - 1] - 1); - } - } - } - } - - } else if (current_mode == DM_X12) { - if (debug_print) printf("X12 "); - if ((symbols_left == 1) && (process_p == 1)) { - // Unlatch not required! - target[tp++] = source[inputlen - 1] + 1; - if (debug_print) printf("A%02X ", target[tp - 1] - 1); - } else { - if (symbols_left > 0) { - target[tp++] = (254); // Unlatch. - if (debug_print) printf("ASC "); - } - - if (process_p == 1) { - target[tp++] = source[inputlen - 1] + 1; - if (debug_print) printf("A%02X ", target[tp - 1] - 1); - } else if (process_p == 2) { - target[tp++] = source[inputlen - 2] + 1; - target[tp++] = source[inputlen - 1] + 1; - if (debug_print) printf("A%02X A%02X ", target[tp - 2] - 1, target[tp - 1] - 1); - } - } - - } else if (current_mode == DM_EDIFACT) { - if (debug_print) printf("EDI "); - if (symbols_left <= 2 && process_p <= symbols_left) { // Unlatch not required! - if (process_p == 1) { - target[tp++] = source[inputlen - 1] + 1; - if (debug_print) printf("A%02X ", target[tp - 1] - 1); - } else if (process_p == 2) { - target[tp++] = source[inputlen - 2] + 1; - target[tp++] = source[inputlen - 1] + 1; - if (debug_print) printf("A%02X A%02X ", target[tp - 2] - 1, target[tp - 1] - 1); - } - } else { - // Append edifact unlatch value (31) and empty buffer - if (process_p <= 3) { - process_buffer[process_p++] = 31; - } - (void) dm_edi_buffer_xfer(process_buffer, process_p, target, &tp, 1 /*empty*/, debug_print); - } - - } else if (current_mode == DM_BASE256) { - if (symbols_left > 0) { - tp = dm_update_b256_field_length(target, tp, b256_start); - } - /* B.2.1 255-state randomising algorithm */ - for (i = b256_start; i < tp; i++) { - int prn = ((149 * (i + 1)) % 255) + 1; - target[i] = (unsigned char) ((target[i] + prn) & 0xFF); - } - } - - if (debug_print) { - printf("\nData (%d): ", tp); - for (i = 0; i < tp; i++) - printf("%d ", target[i]); - - printf("\n"); - } - - *p_binlen = tp; - - return 0; -} - -#endif /* Z_DMATRIX_VARIANT_H */ diff --git a/backend/tests/test_library.c b/backend/tests/test_library.c index a54bcad4..ec512e97 100644 --- a/backend/tests/test_library.c +++ b/backend/tests/test_library.c @@ -346,7 +346,7 @@ static void test_escape_char_process(int index, int generate, int debug) { char *comment; }; struct item data[] = { - /* 0*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, "\\0\\E\\a\\b\\t\\n\\v\\f\\r\\e\\G\\R\\x81\\\\", 0, 26, "01 05 08 09 0A 0B 0C 0D 0E E7 72 1F B6 4D 45 5D 41 91 6B 29 2A E8 33 B4 2F 7A D2 AB C4 B1", 0, "" }, + /* 0*/ { BARCODE_DATAMATRIX, DATA_MODE, -1, "\\0\\E\\a\\b\\t\\n\\v\\f\\r\\e\\G\\R\\x81\\\\", 0, 26, "01 05 08 09 0A 0B 0C 0D 0E 1C 1E 1F EB 02 5D 81 21 0D 92 2E 3D FD B6 9A 37 2A CD 61 FB 95", 0, "" }, /* 1*/ { BARCODE_CODABLOCKF, DATA_MODE, -1, "\\0\\E\\a\\b\\t\\n\\v\\f\\r\\e\\G\\R\\x81\\\\", 0, 101, "(45) 67 62 43 40 44 47 48 29 6A 67 62 0B 49 4A 4B 4C 18 6A 67 62 0C 4D 5B 5D 5E 62 6A 67", 0, "" }, /* 2*/ { BARCODE_CODE16K, DATA_MODE, -1, "\\0\\E\\a\\b\\t\\n\\v\\f\\r\\e\\G\\R\\x81\\\\", 0, 70, "(20) 14 64 68 71 72 73 74 75 76 77 91 93 94 101 65 60 103 103 45 61", 0, "" }, /* 3*/ { BARCODE_DOTCODE, DATA_MODE, -1, "\\0\\E\\a\\b\\t\\n\\v\\f\\r\\e\\G\\R\\x81\\\\", 0, 28, "65 40 44 47 48 49 4A 4B 4C 4D 5B 5D 5E 6E 41 3C", 0, "" }, diff --git a/backend/tests/test_qr.c b/backend/tests/test_qr.c index 4ad00de0..a53a43c6 100644 --- a/backend/tests/test_qr.c +++ b/backend/tests/test_qr.c @@ -1807,32 +1807,32 @@ static void test_microqr_input(int index, int generate, int debug) { /* 12*/ { UNICODE_MODE, -1, "‾", 0, "85 F8 00 EC 11 EC 11 EC 00", "B1 (Shift JIS) (same bytes as ~ ASCII above, so ambiguous)" }, /* 13*/ { UNICODE_MODE, -1, "点", 0, "CB 67 C0 00 EC 11 EC 11 00", "K1 (Shift JIS)" }, /* 14*/ { DATA_MODE, -1, "\223\137", 0, "8A 4D 7C 00 EC 11 EC 11 00", "B2 (Shift JIS)" }, - /* 15*/ { DATA_MODE, 200, "\223\137", 0, "CB 67 C0 00 EC 11 EC 11 00", "K1 (Shift JIS) (full multibyte)" }, + /* 15*/ { DATA_MODE, ZINT_FULL_MULTIBYTE, "\223\137", 0, "CB 67 C0 00 EC 11 EC 11 00", "K1 (Shift JIS) (full multibyte)" }, /* 16*/ { DATA_MODE, -1, "点", 0, "8F 9E 0A E4 00 EC 11 EC 00", "B3 (UTF-8)" }, /* 17*/ { UNICODE_MODE, -1, "茗", 0, "CE AA 80 00 EC 11 EC 11 00", "K1 (Shift JIS)" }, /* 18*/ { DATA_MODE, -1, "\344\252", 0, "8B 92 A8 00 EC 11 EC 11 00", "B2 (Shift JIS)" }, - /* 19*/ { DATA_MODE, 200, "\344\252", 0, "CE AA 80 00 EC 11 EC 11 00", "K1 (Shift JIS) (full multibyte)" }, + /* 19*/ { DATA_MODE, ZINT_FULL_MULTIBYTE, "\344\252", 0, "CE AA 80 00 EC 11 EC 11 00", "K1 (Shift JIS) (full multibyte)" }, /* 20*/ { DATA_MODE, -1, "茗", 0, "8F A2 32 5C 00 EC 11 EC 00", "B3 (UTF-8)" }, /* 21*/ { UNICODE_MODE, -1, "¥点", 0, "8D 72 4D 7C 00 EC 11 EC 00", "B3 (Shift JIS) (optimized from B1 K1)" }, /* 22*/ { DATA_MODE, -1, "\134\223\137", 0, "8D 72 4D 7C 00 EC 11 EC 00", "B3 (Shift JIS) (optimized from B1 K1)" }, /* 23*/ { DATA_MODE, -1, "¥点", 0, "97 0A 97 9E 0A E4 00 EC 00", "B5 (UTF-8)" }, /* 24*/ { UNICODE_MODE, -1, "点茗", 0, "D3 67 F5 54 00 EC 11 EC 00", "K2 (Shift JIS)" }, /* 25*/ { DATA_MODE, -1, "\223\137\344\252", 0, "92 4D 7F 92 A8 00 EC 11 00", "B4 (Shift JIS)" }, - /* 26*/ { DATA_MODE, 200, "\223\137\344\252", 0, "D3 67 F5 54 00 EC 11 EC 00", "K2 (Shift JIS) (full multibyte)" }, + /* 26*/ { DATA_MODE, ZINT_FULL_MULTIBYTE, "\223\137\344\252", 0, "D3 67 F5 54 00 EC 11 EC 00", "K2 (Shift JIS) (full multibyte)" }, /* 27*/ { DATA_MODE, -1, "点茗", 0, "9B 9E 0A E7 A2 32 5C 00 00", "B6 (UTF-8)" }, - /* 28*/ { DATA_MODE, 200, "点茗", 0, "9B 9E 0A E7 A2 32 5C 00 00", "B6 (UTF-8)" }, + /* 28*/ { DATA_MODE, ZINT_FULL_MULTIBYTE, "点茗", 0, "9B 9E 0A E7 A2 32 5C 00 00", "B6 (UTF-8)" }, /* 29*/ { UNICODE_MODE, -1, "点茗・", 0, "D3 67 F5 55 0D 28 00 EC 00", "K2 B1 (Shift JIS)" }, /* 30*/ { DATA_MODE, -1, "\223\137\344\252\245", 0, "96 4D 7F 92 AA 94 00 EC 00", "B5 (Shift JIS)" }, - /* 31*/ { DATA_MODE, 200, "\223\137\344\252\245", 0, "D3 67 F5 55 0D 28 00 EC 00", "K2 B1 (Shift JIS) (full multibyte)" }, + /* 31*/ { DATA_MODE, ZINT_FULL_MULTIBYTE, "\223\137\344\252\245", 0, "D3 67 F5 55 0D 28 00 EC 00", "K2 B1 (Shift JIS) (full multibyte)" }, /* 32*/ { DATA_MODE, -1, "点茗・", 0, "A7 9E 0A E7 A2 32 5F BE F6 94 00", "B9 (UTF-8)" }, /* 33*/ { UNICODE_MODE, -1, "¥点茗・", 0, "99 72 4D 7F 92 AA 94 00 00", "B6 (Shift JIS) (optimized from B1 K2 B1)" }, /* 34*/ { DATA_MODE, -1, "\134\223\137\344\252\245", 0, "99 72 4D 7F 92 AA 94 00 00", "B6 (Shift JIS) (optimized from B1 K2 B1)" }, /* 35*/ { DATA_MODE, -1, "¥点茗・", 0, "4B C2 A5 E7 82 B9 E8 8C 97 EF BD A5 00 00", "B11 (UTF-8)" }, /* 36*/ { DATA_MODE, -1, "ÁȁȁȁȂ¢", 0, "4C C3 81 C8 81 C8 81 C8 81 C8 82 C2 A2 00", "B12 (UTF-8)" }, /* 37*/ { DATA_MODE, -1, "ÁȁȁȁȁȂ¢", 0, "4E C3 81 C8 81 C8 81 C8 81 C8 81 C8 82 C2 A2 00", "B14 (UTF-8)" }, - /* 38*/ { DATA_MODE, 200, "ÁȁȁȁȁȂ¢", 0, "41 C3 6C 08 80 44 02 20 11 00 88 0A 12 0D 10 00", "B1 K6 B1 (UTF-8) (full multibyte)" }, + /* 38*/ { DATA_MODE, ZINT_FULL_MULTIBYTE, "ÁȁȁȁȁȂ¢", 0, "41 C3 6C 08 80 44 02 20 11 00 88 0A 12 0D 10 00", "B1 K6 B1 (UTF-8) (full multibyte)" }, /* 39*/ { UNICODE_MODE, -1, "áA", 0, "8B 85 04 00 EC 11 EC 11 00", "B2 (ISO 8859-1)" }, - /* 40*/ { UNICODE_MODE, 200, "áA", 0, "CE 00 40 00 EC 11 EC 11 00", "K1 (ISO 8859-1) (full multibyte)" }, + /* 40*/ { UNICODE_MODE, ZINT_FULL_MULTIBYTE, "áA", 0, "CE 00 40 00 EC 11 EC 11 00", "K1 (ISO 8859-1) (full multibyte)" }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -1857,8 +1857,9 @@ static void test_microqr_input(int index, int generate, int debug) { assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); if (generate) { - printf(" /*%3d*/ { %s, %d, \"%s\", %s, \"%s\", \"%s\" },\n", - i, testUtilInputModeName(data[i].input_mode), data[i].option_3, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), + printf(" /*%3d*/ { %s, %s, \"%s\", %s, \"%s\", \"%s\" },\n", + i, testUtilInputModeName(data[i].input_mode), testUtilOption3Name(data[i].option_3), + 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); diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c index c6c9a60f..a4d81f50 100644 --- a/backend/tests/testcommon.c +++ b/backend/tests/testcommon.c @@ -388,6 +388,7 @@ const char *testUtilInputModeName(int input_mode) { { "GS1PARENS_MODE", GS1PARENS_MODE, 0x0010 }, { "GS1NOCHECK_MODE", GS1NOCHECK_MODE, 0x0020 }, { "HEIGHTPERROW_MODE", HEIGHTPERROW_MODE, 0x0040 }, + { "FAST_MODE", FAST_MODE, 0x0080 }, }; static const int data_size = ARRAY_SIZE(data); int set, i; @@ -433,7 +434,7 @@ const char *testUtilOption3Name(int option_3) { static char buffer[64]; const char *name = NULL; - unsigned int high_byte = option_3 == -1 ? 0 : (option_3 >> 8) & 0xFF; + const unsigned int high_byte = option_3 == -1 ? 0 : (option_3 >> 8) & 0xFF; switch (option_3 & 0xFF) { case DM_SQUARE: @@ -2758,8 +2759,8 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int added_dmre = 1; } } - if (option_3 != DM_SQUARE && symbol->width != symbol->height) { - if (option_3 == DM_DMRE && !added_dmre) { + if ((option_3 & 0x7F) != DM_SQUARE && symbol->width != symbol->height) { + if ((option_3 & 0x7F) == DM_DMRE && !added_dmre) { sprintf(bwipp_opts_buf + strlen(bwipp_opts_buf), "%sdmre", strlen(bwipp_opts_buf) ? " " : ""); //added_dmre = 1; } diff --git a/backend/tests/testcommon.h b/backend/tests/testcommon.h index bc54c514..aafb5ee8 100644 --- a/backend/tests/testcommon.h +++ b/backend/tests/testcommon.h @@ -41,8 +41,7 @@ #define ZINT_DEBUG_TEST_KEEP_OUTFILE 64 #define ZINT_DEBUG_TEST_BWIPP 128 #define ZINT_DEBUG_TEST_PERFORMANCE 256 -#define ZINT_DEBUG_TEST_MINIMIZE 512 -#define ZINT_DEBUG_TEST_ZXINGCPP 1024 +#define ZINT_DEBUG_TEST_ZXINGCPP 512 #ifdef _MSC_VER #define testutil_popen(command, mode) _popen(command, mode) diff --git a/backend/tests/tools/run_zxingcpp_tests.sh b/backend/tests/tools/run_zxingcpp_tests.sh index 8351d52e..baa34054 100755 --- a/backend/tests/tools/run_zxingcpp_tests.sh +++ b/backend/tests/tools/run_zxingcpp_tests.sh @@ -5,7 +5,7 @@ set -e function run_zxingcpp_test() { echo -e "\n$1 -f $2" - backend/tests/$1 -f "$2" -d $(expr 1024 + 16 + 32) || exit 1 + backend/tests/$1 -f "$2" -d $(expr 512 + 16 + 32) || exit 1 } run_zxingcpp_test "test_2of5" "encode" diff --git a/backend/zint.h b/backend/zint.h index da8f9d3c..5fbde5ca 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -274,24 +274,25 @@ extern "C" { #define COMPLIANT_HEIGHT 0x2000 /* Warn if height not compliant and use standard height (if any) as default */ /* Input data types (`symbol->input_mode`) */ -#define DATA_MODE 0 /* Binary */ -#define UNICODE_MODE 1 /* UTF-8 */ -#define GS1_MODE 2 /* GS1 */ +#define DATA_MODE 0 /* Binary */ +#define UNICODE_MODE 1 /* UTF-8 */ +#define GS1_MODE 2 /* GS1 */ /* The following may be OR-ed with above */ #define ESCAPE_MODE 0x0008 /* Process escape sequences */ #define GS1PARENS_MODE 0x0010 /* Process parentheses as GS1 AI delimiters (instead of square brackets) */ #define GS1NOCHECK_MODE 0x0020 /* Do not check validity of GS1 data (except that printable ASCII only) */ #define HEIGHTPERROW_MODE 0x0040 /* Interpret `height` as per-row rather than as overall height */ +#define FAST_MODE 0x0080 /* Use faster if less optimal encodation for symbologies that support it */ /* Data Matrix specific options (`symbol->option_3`) */ -#define DM_SQUARE 100 /* Only consider square versions on automatic symbol size selection */ -#define DM_DMRE 101 /* Consider DMRE versions on automatic symbol size selection */ +#define DM_SQUARE 100 /* Only consider square versions on automatic symbol size selection */ +#define DM_DMRE 101 /* Consider DMRE versions on automatic symbol size selection */ /* QR, Han Xin, Grid Matrix specific options (`symbol->option_3`) */ -#define ZINT_FULL_MULTIBYTE 200 /* Enable Kanji/Hanzi compression for Latin-1 & binary data */ +#define ZINT_FULL_MULTIBYTE 200 /* Enable Kanji/Hanzi compression for Latin-1 & binary data */ /* Ultracode specific option (`symbol->option_3`) */ -#define ULTRA_COMPRESSION 128 /* Enable Ultracode compression (experimental) */ +#define ULTRA_COMPRESSION 128 /* Enable Ultracode compression (experimental) */ /* Warning and error conditions (API return values) */ #define ZINT_WARN_INVALID_OPTION 2 /* Invalid option given but overridden by Zint */ diff --git a/backend_qt/backend_qt.pro b/backend_qt/backend_qt.pro index 792fd13b..109b4eff 100644 --- a/backend_qt/backend_qt.pro +++ b/backend_qt/backend_qt.pro @@ -34,6 +34,7 @@ HEADERS += ../backend/aztec.h \ ../backend/common.h \ ../backend/composite.h \ ../backend/dmatrix.h \ + ../backend/dmatrix_trace.h \ ../backend/eci.h \ ../backend/eci_sb.h \ ../backend/emf.h \ diff --git a/backend_qt/backend_vc8.pro b/backend_qt/backend_vc8.pro index 9a4cb6c4..4f98e76f 100644 --- a/backend_qt/backend_vc8.pro +++ b/backend_qt/backend_vc8.pro @@ -26,6 +26,7 @@ HEADERS += ../backend/aztec.h \ ../backend/common.h \ ../backend/composite.h \ ../backend/dmatrix.h \ + ../backend/dmatrix_trace.h \ ../backend/eci.h \ ../backend/emf.h \ ../backend/font.h \ diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp index 4bd59943..827a6690 100644 --- a/backend_qt/qzint.cpp +++ b/backend_qt/qzint.cpp @@ -857,6 +857,7 @@ namespace Zint { } arg_bool(cmd, "--compliantheight", hasCompliantHeight() && compliantHeight()); + arg_data(cmd, longOptOnly ? "--data=" : "-d ", text(), win); if (m_symbol == BARCODE_DATAMATRIX || m_symbol == BARCODE_HIBC_DM) { @@ -875,6 +876,7 @@ namespace Zint { } arg_bool(cmd, "--esc", inputMode() & ESCAPE_MODE); + arg_bool(cmd, "--fast", inputMode() & FAST_MODE); if (fgColor() != Qt::black) { arg_color(cmd, "--fg=", fgColor()); diff --git a/backend_tcl/zint.c b/backend_tcl/zint.c index 9ce6dd03..ccfcfac7 100644 --- a/backend_tcl/zint.c +++ b/backend_tcl/zint.c @@ -137,6 +137,8 @@ 2021-11-19 GL - Added -heightperrow option - Added DBAR_EXPSTK, CODE16K, CODE49 -rows +2021-12-17 GL +- Added -fast option */ #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) @@ -468,6 +470,7 @@ static const char help_message[] = "zint tcl(stub,obj) dll\n" /* cli option --ecinos not supported */ " -eci number: ECI to use\n" /* cli option --esc not supported */ + " -fast bool: use fast encodation (Data Matrix)\n" " -fg color: set foreground color as 6 or 8 hex rrggbbaa\n" /* replaces cli options --binary and --gs1 */ " -format binary|unicode|gs1: input data format. Default:unicode\n" @@ -726,7 +729,7 @@ static int Encode(Tcl_Interp *interp, int objc, static const char *optionList[] = { "-addongap", "-barcode", "-bg", "-bind", "-bold", "-border", "-box", "-cols", "-compliantheight", "-dmre", "-dotsize", "-dotty", - "-eci", "-fg", "-format", "-fullmultibyte", + "-eci", "-fast", "-fg", "-format", "-fullmultibyte", "-gs1nocheck", "-gs1parens", "-gssep", "-guarddescent", "-height", "-heightperrow", "-init", "-mask", "-mode", "-nobackground", "-noquietzones", "-notext", "-primary", "-quietzones", @@ -737,7 +740,7 @@ static int Encode(Tcl_Interp *interp, int objc, enum iOption { iAddonGap, iBarcode, iBG, iBind, iBold, iBorder, iBox, iCols, iCompliantHeight, iDMRE, iDotSize, iDotty, - iECI, iFG, iFormat, iFullMultiByte, + iECI, iFast, iFG, iFormat, iFullMultiByte, iGS1NoCheck, iGS1Parens, iGSSep, iGuardDescent, iHeight, iHeightPerRow, iInit, iMask, iMode, iNoBackground, iNoQuietZones, iNoText, iPrimary, iQuietZones, @@ -766,6 +769,7 @@ static int Encode(Tcl_Interp *interp, int objc, case iCompliantHeight: case iDMRE: case iDotty: + case iFast: case iGS1NoCheck: case iGS1Parens: case iGSSep: @@ -899,6 +903,13 @@ static int Encode(Tcl_Interp *interp, int objc, my_symbol->output_options &= ~BARCODE_DOTTY_MODE; } break; + case iFast: + if (intValue) { + my_symbol->input_mode |= FAST_MODE; + } else { + my_symbol->input_mode &= ~FAST_MODE; + } + break; case iGS1NoCheck: if (intValue) { my_symbol->input_mode |= GS1NOCHECK_MODE; diff --git a/docs/manual.txt b/docs/manual.txt index 88f1f4bb..10d52343 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -1175,7 +1175,7 @@ structapp | Structured | Mark a symbol as part of a | count 0 warn_level | integer | Affects error/warning value | WARN_DEFAULT | | returned by Zint API. | text | unsigned | Human Readable Text, which | "" (empty) - | character | usually consists of in- | + | character | usually consists of in- | (output only) | string | put data plus one more | | | check digit. Uses UTF-8 | | | formatting, with a | @@ -2500,6 +2500,9 @@ DMRE symbol sizes may be activated in automatic size mode using the option 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 +For a near-optimal but slower encoding, the --compressenc option (API +option_3 |= DM_COMPRESSION) may be used. + 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 @@ -3132,9 +3135,9 @@ Value | EC Level | Amount of symbol holding error correction data ----------------------------------------------------------------- Zint does not currently implement data compression by default, but this can -be initiated through the API by setting +be initiated using the `--compressenc` option or through the API by setting -symbol->option_3 = ULTRA_COMPRESSION; +symbol->option_3 |= ULTRA_COMPRESSION; WARNING: Ultracode data compression is experimental and should not be used in a production environment. diff --git a/frontend/main.c b/frontend/main.c index daf20ec6..8ac75041 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -137,6 +137,7 @@ static void usage(void) { " -e, --ecinos Display table of ECI character encodings\n" " --eci=NUMBER Set the ECI (Extended Channel Interpretation) code\n" " --esc Process escape characters in input data\n" + " --fast Use faster encodation (Data Matrix)\n" " --fg=COLOUR Specify a foreground colour (in hex RGB/RGBA)\n" " --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n" " --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\n" @@ -863,7 +864,7 @@ int main(int argc, char **argv) { enum options { OPT_ADDONGAP = 128, OPT_BATCH, OPT_BINARY, OPT_BG, OPT_BIND, OPT_BOLD, OPT_BORDER, OPT_BOX, OPT_CMYK, OPT_COLS, OPT_COMPLIANTHEIGHT, OPT_DIRECT, OPT_DMRE, OPT_DOTSIZE, OPT_DOTTY, OPT_DUMP, - OPT_ECI, OPT_ESC, OPT_FG, OPT_FILETYPE, OPT_FONTSIZE, OPT_FULLMULTIBYTE, + OPT_ECI, OPT_ESC, OPT_FAST, OPT_FG, OPT_FILETYPE, OPT_FONTSIZE, OPT_FULLMULTIBYTE, OPT_GS1, OPT_GS1NOCHECK, OPT_GS1PARENS, OPT_GSSEP, OPT_GUARDDESCENT, OPT_HEIGHT, OPT_HEIGHTPERROW, OPT_INIT, OPT_MIRROR, OPT_MASK, OPT_MODE, OPT_NOBACKGROUND, OPT_NOQUIETZONES, OPT_NOTEXT, OPT_PRIMARY, OPT_QUIETZONES, @@ -894,6 +895,7 @@ int main(int argc, char **argv) { {"eci", 1, NULL, OPT_ECI}, {"ecinos", 0, NULL, 'e'}, {"esc", 0, NULL, OPT_ESC}, + {"fast", 0, NULL, OPT_FAST}, {"fg", 1, 0, OPT_FG}, {"filetype", 1, NULL, OPT_FILETYPE}, {"fontsize", 1, NULL, OPT_FONTSIZE}, @@ -1045,6 +1047,9 @@ int main(int argc, char **argv) { case OPT_ESC: my_symbol->input_mode |= ESCAPE_MODE; break; + case OPT_FAST: + my_symbol->input_mode |= FAST_MODE; + break; case OPT_FG: strncpy(my_symbol->fgcolour, optarg, 9); break; diff --git a/frontend/tests/test_args.c b/frontend/tests/test_args.c index 0cd669b9..61c9de8e 100644 --- a/frontend/tests/test_args.c +++ b/frontend/tests/test_args.c @@ -185,6 +185,9 @@ static void arg_input_mode(char *cmd, int input_mode) { if (input_mode & ESCAPE_MODE) { sprintf(cmd + (int) strlen(cmd), "%s--esc", strlen(cmd) ? " " : ""); } + if (input_mode & FAST_MODE) { + sprintf(cmd + (int) strlen(cmd), "%s--fast", strlen(cmd) ? " " : ""); + } if (input_mode & GS1PARENS_MODE) { sprintf(cmd + (int) strlen(cmd), "%s--gs1parens", strlen(cmd) ? " " : ""); } @@ -286,26 +289,28 @@ static void test_dump_args(int index, int debug) { /* 17*/ { BARCODE_PDF417, "123", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, 0, 0, -1, "FF 54 7A BC 3D 4F 1D 5C 0F E8 A4\nFF 54 7A 90 2F D3 1F AB 8F E8 A4\nFF 54 6A F8 3A BF 15 3C 0F E8 A4\nFF 54 57 9E 24 E7 1A F7 CF E8 A4\nFF 54 7A E7 3D 0D 9D 73 0F E8 A4\nFF 54 7D 70 B9 CB DF 5E CF E8 A4" }, /* 18*/ { BARCODE_DATAMATRIX, "ABC", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA 8\nB3 4\n8F 0\nB2 C\nA6 0\nBA C\nD6 0\nEB 4\nE2 8\nFF C" }, /* 19*/ { BARCODE_DATAMATRIX, "ABC", NULL, NULL, NULL, -1, READER_INIT, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A\nAC 7\n8A 4\nA0 3\nC2 2\nB5 1\n82 2\nBA 7\n8C C\nA0 5\n86 A\nFF F" }, - /* 20*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJK", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA AA AA AA\nA6 ED A9 D1\nB2 FE 92 7E\n98 E7 C3 FF\nE8 D0 90 CC\nC7 EB 8D 63\nC5 48 D3 C4\nFF FF FF FF" }, - /* 21*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJK", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 1, -1, "AA AA\nA6 FF\nB2 C0\n99 19\nA8 BA\n84 EF\nC0 9C\nE9 47\nE5 90\nB3 49\n91 36\nB3 7D\nD4 56\nF7 DD\nC5 62\nFF FF" }, - /* 22*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA AA A8\nA6 94 A4\nB2 AD 98\n99 09 3C\nA9 E1 00\n86 80 F4\nC2 F5 68\nF5 D5 1C\nF2 68 70\nDA 7A 1C\nB7 FA 30\nA8 E0 F4\n91 74 D8\nD6 1D 74\nD2 31 08\nF1 E9 74\nC2 BF A8\nA6 8B 6C\n83 3D D8\nF9 ED CC\nAB 5A 58\nFF FF FC" }, - /* 23*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", NULL, NULL, NULL, -1, -1, 0, -1, 1, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA AA AA AA AA AA AA AA\nA6 D9 C8 0F 82 EB 81 97\nB2 BA A7 C8 F5 64 BD 2E\n99 2F EF 29 84 07 9F C7\nA8 84 99 C2 F2 1A 9F 44\n86 D5 D9 8B EF 41 BB 7F\n85 44 BF 28 F7 80 99 76\nFF FF FF FF FF FF FF FF" }, - /* 24*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", NULL, NULL, NULL, -1, -1, 0, -1, 1, -1, 0, -1, -1, NULL, -1, -1, 1, -1, "AA AA A8\nA6 94 A4\nB2 AD 98\n99 09 3C\nA9 E1 00\n86 80 F4\nC2 F5 68\nF5 D5 1C\nF2 68 70\nDA 7A 1C\nB7 FA 30\nA8 E0 F4\n91 74 D8\nD6 1D 74\nD2 31 08\nF1 E9 74\nC2 BF A8\nA6 8B 6C\n83 3D D8\nF9 ED CC\nAB 5A 58\nFF FF FC" }, - /* 25*/ { BARCODE_DATAMATRIX, "[91]12[92]34", NULL, NULL, NULL, GS1_MODE, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nFA 9C\nBC 00\nD7 84\nED E0\nA4 E4\nA7 40\n9D 3C\nBF 50\nFA 24\nB1 68\nE5 04\n92 70\nFF FC" }, - /* 26*/ { BARCODE_DATAMATRIX, "[91]12[92]34", NULL, NULL, NULL, GS1_MODE, GS1_GS_SEPARATOR, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nF9 DC\nBF 20\nD6 C4\nED 10\nA0 0C\nA7 C0\n96 5C\nBA 70\nBB A4\nE2 18\nDD 14\n9C 40\nFF FC" }, - /* 27*/ { BARCODE_DATAMATRIX, "[9\\x31]12[92]34", NULL, NULL, NULL, GS1_MODE | ESCAPE_MODE, GS1_GS_SEPARATOR, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nF9 DC\nBF 20\nD6 C4\nED 10\nA0 0C\nA7 C0\n96 5C\nBA 70\nBB A4\nE2 18\nDD 14\n9C 40\nFF FC" }, - /* 28*/ { BARCODE_DATAMATRIX, "(9\\x31)12(92)34", NULL, NULL, NULL, GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, GS1_GS_SEPARATOR, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nF9 DC\nBF 20\nD6 C4\nED 10\nA0 0C\nA7 C0\n96 5C\nBA 70\nBB A4\nE2 18\nDD 14\n9C 40\nFF FC" }, - /* 29*/ { BARCODE_EANX_CC, "[91]12", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, "12345678+12", -1, -1, 0, -1, "DB BC D3 9C 44 E9 D2 2C 19 E7 A2 D8 A0 00 00 00\nDB 31 1C 9C C7 29 92 47 D9 E9 40 C8 A0 00 00 00\nDA 3B EB 10 AF 09 9A 18 9D 7D 82 E8 A0 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n20 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n14 68 D1 A6 49 BD 55 C9 D4 22 48 B9 40 59 94 98" }, - /* 30*/ { BARCODE_EANX_CC, "[91]12", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, 2, "12345678+12", -1, -1, 0, -1, "D3 A3 E9 DB F5 C9 DB 43 D9 CB 98 D2 20 00 00 00\nD3 25 0F 11 E4 49 D3 51 F1 AC FC D6 20 00 00 00\nD1 33 48 19 39 E9 93 18 49 D8 98 D7 20 00 00 00\nD1 A6 FC DA 1C 49 9B C5 05 E2 84 D7 A0 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n20 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n14 68 D1 A6 49 BD 55 C9 D4 22 48 B9 40 59 94 98" }, - /* 31*/ { BARCODE_QRCODE, "点", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 AA 08\nBA B2 E8\nBA 0A E8\nBA FA E8\n82 E2 08\nFE AB F8\n00 80 00\nD3 3B B0\n60 95 68\n7A B3 A0\n1D 0F 98\nAA D7 30\n00 E6 A8\nFE DA D0\n82 42 20\nBA 0E 38\nBA C7 18\nBA 17 68\n82 B9 40\nFE C5 28" }, - /* 32*/ { BARCODE_QRCODE, "点", NULL, NULL, NULL, -1, -1, 0, -1, 0, 26, 0, -1, -1, NULL, -1, 1, 0, -1, "FE 5B F8\n82 72 08\nBA DA E8\nBA 52 E8\nBA 2A E8\n82 0A 08\nFE AB F8\n00 D8 00\nEF F6 20\nB5 C2 28\n36 28 88\nFD 42 10\n62 2A C8\n00 95 70\nFE B7 38\n82 FD D8\nBA 97 00\nBA 43 60\nBA C8 C8\n82 C3 68\nFE EA F8" }, - /* 33*/ { BARCODE_QRCODE, "\223\137", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 0A 08\nBA A2 E8\nBA 0A E8\nBA 5A E8\n82 72 08\nFE AB F8\n00 A0 00\nEF AE 20\n75 B5 20\n82 F7 58\nF4 9D C8\n5E 17 28\n00 C2 20\nFE 88 80\n82 82 38\nBA EA A8\nBA 55 50\nBA D7 68\n82 BD D0\nFE B7 78" }, - /* 34*/ { BARCODE_QRCODE, "\223\137", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 AA 08\nBA B2 E8\nBA 0A E8\nBA FA E8\n82 E2 08\nFE AB F8\n00 80 00\nD3 3B B0\n60 95 68\n7A B3 A0\n1D 0F 98\nAA D7 30\n00 E6 A8\nFE DA D0\n82 42 20\nBA 0E 38\nBA C7 18\nBA 17 68\n82 B9 40\nFE C5 28" }, - /* 35*/ { BARCODE_QRCODE, "\\x93\\x5F", NULL, NULL, NULL, DATA_MODE | ESCAPE_MODE, -1, 0, -1, 0, -1, 1, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 AA 08\nBA B2 E8\nBA 0A E8\nBA FA E8\n82 E2 08\nFE AB F8\n00 80 00\nD3 3B B0\n60 95 68\n7A B3 A0\n1D 0F 98\nAA D7 30\n00 E6 A8\nFE DA D0\n82 42 20\nBA 0E 38\nBA C7 18\nBA 17 68\n82 B9 40\nFE C5 28" }, - /* 36*/ { BARCODE_QRCODE, "点", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, 2, -1, NULL, -1, 1, 0, -1, "FE 4B F8\n82 92 08\nBA 42 E8\nBA 92 E8\nBA 3A E8\n82 EA 08\nFE AB F8\n00 38 00\nFB CD 50\nA5 89 18\n0B 74 B8\nFC 81 A0\n92 34 B8\n00 DE 48\nFE AB 10\n82 5E 50\nBA C9 20\nBA C9 20\nBA F4 E0\n82 81 A0\nFE B4 E8" }, - /* 37*/ { BARCODE_HANXIN, "é", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, -1, -1, NULL, -1, -1, 0, -1, "FE 8A FE\n80 28 02\nBE E8 FA\nA0 94 0A\nAE 3E EA\nAE D2 EA\nAE 74 EA\n00 AA 00\n15 B4 AA\n0B 48 74\nA2 4A A4\nB5 56 2C\nA8 5A A8\n9F 18 50\nAA 07 50\n00 A6 00\nFE 20 EA\n02 C2 EA\nFA C4 EA\n0A 42 0A\nEA 52 FA\nEA 24 02\nEA AA FE" }, - /* 38*/ { BARCODE_HANXIN, "é", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, 3, -1, NULL, -1, -1, 0, -1, "FE 16 FE\n80 E2 02\nBE C2 FA\nA0 A0 0A\nAE F6 EA\nAE 98 EA\nAE BA EA\n00 E0 00\n15 83 AA\n44 7E AE\n92 9C 78\n25 BF 08\n47 4B 8C\n0D F9 74\nAB E7 50\n00 3A 00\nFE C2 EA\n02 22 EA\nFA DA EA\n0A 22 0A\nEA B2 FA\nEA 9A 02\nEA E8 FE" }, - /* 39*/ { BARCODE_HANXIN, "é", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, 4, -1, NULL, -1, -1, 0, -1, "FE 8A FE\n80 28 02\nBE E8 FA\nA0 94 0A\nAE 3E EA\nAE D2 EA\nAE 74 EA\n00 AA 00\n15 B4 AA\n0B 48 74\nA2 4A A4\nB5 56 2C\nA8 5A A8\n9F 18 50\nAA 07 50\n00 A6 00\nFE 20 EA\n02 C2 EA\nFA C4 EA\n0A 42 0A\nEA 52 FA\nEA 24 02\nEA AA FE" }, + /* 20*/ { BARCODE_DATAMATRIX, "ABCDEFGH", NULL, NULL, NULL, FAST_MODE, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nA6 8C\nB2 F0\n98 B4\nB9 A8\nB8 CC\nF0 78\nA0 3C\n99 70\n85 1C\nDA B0\nE5 94\nA7 50\nFF FC" }, + /* 21*/ { BARCODE_DATAMATRIX, "ABCDEFGH", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\n80 04\n82 60\nC5 24\n98 A8\nA3 9C\nCB B8\nAF DC\n86 58\nF6 44\nAC 18\n90 54\nCF 30\nFF FC" }, + /* 22*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJK", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA AA AA AA\n80 09 F9 BD\n82 4A E2 58\nC5 CD C9 A5\nD8 5C A5 FC\nE0 35 88 69\nCC FC B3 E6\nFF FF FF FF" }, + /* 23*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJK", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 1, -1, "AA AA\n80 25\n82 24\nC5 5D\n98 90\nA4 C7\nC8 A6\nB9 E9\n8E 02\nDE 91\nCD 6C\nA0 BB\n85 80\n98 2D\nE4 CA\nFF FF" }, + /* 24*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA AA A8\nBA 5A 44\n8B 4D 28\nBF 77 64\n97 85 50\nBA D8 AC\nCD ED B8\nD4 B5 2C\nD1 A8 00\n81 FB 2C\nE4 75 78\n96 E8 2C\nF3 75 78\nEE 1D 04\nCA BA 98\nB1 8F B4\nA0 4F 00\nE4 A7 74\nF1 D3 90\nEF E1 BC\n91 10 38\nFF FF FC" }, + /* 25*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", NULL, NULL, NULL, -1, -1, 0, -1, 1, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA AA AA AA AA AA AA AA\nBA 03 BA 7D E5 31 B0 0D\n8B 6A 93 B6 E0 0A B8 3C\nBF 1D EA A7 EB ED A1 FB\n96 66 86 B6 C9 AE 92 40\nBF 65 E7 95 BC B7 FA E3\nCC 7C 90 CC D1 24 AB 5A\nFF FF FF FF FF FF FF FF" }, + /* 26*/ { BARCODE_DATAMATRIX, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF", NULL, NULL, NULL, -1, -1, 0, -1, 1, -1, 0, -1, -1, NULL, -1, -1, 1, -1, "AA AA A8\nBA 5A 44\n8B 4D 28\nBF 77 64\n97 85 50\nBA D8 AC\nCD ED B8\nD4 B5 2C\nD1 A8 00\n81 FB 2C\nE4 75 78\n96 E8 2C\nF3 75 78\nEE 1D 04\nCA BA 98\nB1 8F B4\nA0 4F 00\nE4 A7 74\nF1 D3 90\nEF E1 BC\n91 10 38\nFF FF FC" }, + /* 27*/ { BARCODE_DATAMATRIX, "[91]12[92]34", NULL, NULL, NULL, GS1_MODE, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nFA 9C\nBC 00\nD7 84\nED E0\nA4 E4\nA7 40\n9D 3C\nBF 50\nFA 24\nB1 68\nE5 04\n92 70\nFF FC" }, + /* 28*/ { BARCODE_DATAMATRIX, "[91]12[92]34", NULL, NULL, NULL, GS1_MODE, GS1_GS_SEPARATOR, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nF9 DC\nBF 20\nD6 C4\nED 10\nA0 0C\nA7 C0\n96 5C\nBA 70\nBB A4\nE2 18\nDD 14\n9C 40\nFF FC" }, + /* 29*/ { BARCODE_DATAMATRIX, "[9\\x31]12[92]34", NULL, NULL, NULL, GS1_MODE | ESCAPE_MODE, GS1_GS_SEPARATOR, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nF9 DC\nBF 20\nD6 C4\nED 10\nA0 0C\nA7 C0\n96 5C\nBA 70\nBB A4\nE2 18\nDD 14\n9C 40\nFF FC" }, + /* 30*/ { BARCODE_DATAMATRIX, "(9\\x31)12(92)34", NULL, NULL, NULL, GS1_MODE | ESCAPE_MODE | GS1PARENS_MODE, GS1_GS_SEPARATOR, 0, -1, 0, -1, 0, -1, -1, NULL, -1, -1, 0, -1, "AA A8\nF9 DC\nBF 20\nD6 C4\nED 10\nA0 0C\nA7 C0\n96 5C\nBA 70\nBB A4\nE2 18\nDD 14\n9C 40\nFF FC" }, + /* 31*/ { BARCODE_EANX_CC, "[91]12", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, "12345678+12", -1, -1, 0, -1, "DB BC D3 9C 44 E9 D2 2C 19 E7 A2 D8 A0 00 00 00\nDB 31 1C 9C C7 29 92 47 D9 E9 40 C8 A0 00 00 00\nDA 3B EB 10 AF 09 9A 18 9D 7D 82 E8 A0 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n20 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n14 68 D1 A6 49 BD 55 C9 D4 22 48 B9 40 59 94 98" }, + /* 32*/ { BARCODE_EANX_CC, "[91]12", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, 2, "12345678+12", -1, -1, 0, -1, "D3 A3 E9 DB F5 C9 DB 43 D9 CB 98 D2 20 00 00 00\nD3 25 0F 11 E4 49 D3 51 F1 AC FC D6 20 00 00 00\nD1 33 48 19 39 E9 93 18 49 D8 98 D7 20 00 00 00\nD1 A6 FC DA 1C 49 9B C5 05 E2 84 D7 A0 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n20 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00\n10 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00\n14 68 D1 A6 49 BD 55 C9 D4 22 48 B9 40 59 94 98" }, + /* 33*/ { BARCODE_QRCODE, "点", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 AA 08\nBA B2 E8\nBA 0A E8\nBA FA E8\n82 E2 08\nFE AB F8\n00 80 00\nD3 3B B0\n60 95 68\n7A B3 A0\n1D 0F 98\nAA D7 30\n00 E6 A8\nFE DA D0\n82 42 20\nBA 0E 38\nBA C7 18\nBA 17 68\n82 B9 40\nFE C5 28" }, + /* 34*/ { BARCODE_QRCODE, "点", NULL, NULL, NULL, -1, -1, 0, -1, 0, 26, 0, -1, -1, NULL, -1, 1, 0, -1, "FE 5B F8\n82 72 08\nBA DA E8\nBA 52 E8\nBA 2A E8\n82 0A 08\nFE AB F8\n00 D8 00\nEF F6 20\nB5 C2 28\n36 28 88\nFD 42 10\n62 2A C8\n00 95 70\nFE B7 38\n82 FD D8\nBA 97 00\nBA 43 60\nBA C8 C8\n82 C3 68\nFE EA F8" }, + /* 35*/ { BARCODE_QRCODE, "\223\137", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 0, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 0A 08\nBA A2 E8\nBA 0A E8\nBA 5A E8\n82 72 08\nFE AB F8\n00 A0 00\nEF AE 20\n75 B5 20\n82 F7 58\nF4 9D C8\n5E 17 28\n00 C2 20\nFE 88 80\n82 82 38\nBA EA A8\nBA 55 50\nBA D7 68\n82 BD D0\nFE B7 78" }, + /* 36*/ { BARCODE_QRCODE, "\223\137", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 AA 08\nBA B2 E8\nBA 0A E8\nBA FA E8\n82 E2 08\nFE AB F8\n00 80 00\nD3 3B B0\n60 95 68\n7A B3 A0\n1D 0F 98\nAA D7 30\n00 E6 A8\nFE DA D0\n82 42 20\nBA 0E 38\nBA C7 18\nBA 17 68\n82 B9 40\nFE C5 28" }, + /* 37*/ { BARCODE_QRCODE, "\\x93\\x5F", NULL, NULL, NULL, DATA_MODE | ESCAPE_MODE, -1, 0, -1, 0, -1, 1, -1, -1, NULL, -1, 1, 0, -1, "FE 2B F8\n82 AA 08\nBA B2 E8\nBA 0A E8\nBA FA E8\n82 E2 08\nFE AB F8\n00 80 00\nD3 3B B0\n60 95 68\n7A B3 A0\n1D 0F 98\nAA D7 30\n00 E6 A8\nFE DA D0\n82 42 20\nBA 0E 38\nBA C7 18\nBA 17 68\n82 B9 40\nFE C5 28" }, + /* 38*/ { BARCODE_QRCODE, "点", NULL, NULL, NULL, -1, -1, 0, -1, 0, -1, 0, 2, -1, NULL, -1, 1, 0, -1, "FE 4B F8\n82 92 08\nBA 42 E8\nBA 92 E8\nBA 3A E8\n82 EA 08\nFE AB F8\n00 38 00\nFB CD 50\nA5 89 18\n0B 74 B8\nFC 81 A0\n92 34 B8\n00 DE 48\nFE AB 10\n82 5E 50\nBA C9 20\nBA C9 20\nBA F4 E0\n82 81 A0\nFE B4 E8" }, + /* 39*/ { BARCODE_HANXIN, "é", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, -1, -1, NULL, -1, -1, 0, -1, "FE 8A FE\n80 28 02\nBE E8 FA\nA0 94 0A\nAE 3E EA\nAE D2 EA\nAE 74 EA\n00 AA 00\n15 B4 AA\n0B 48 74\nA2 4A A4\nB5 56 2C\nA8 5A A8\n9F 18 50\nAA 07 50\n00 A6 00\nFE 20 EA\n02 C2 EA\nFA C4 EA\n0A 42 0A\nEA 52 FA\nEA 24 02\nEA AA FE" }, + /* 40*/ { BARCODE_HANXIN, "é", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, 3, -1, NULL, -1, -1, 0, -1, "FE 16 FE\n80 E2 02\nBE C2 FA\nA0 A0 0A\nAE F6 EA\nAE 98 EA\nAE BA EA\n00 E0 00\n15 83 AA\n44 7E AE\n92 9C 78\n25 BF 08\n47 4B 8C\n0D F9 74\nAB E7 50\n00 3A 00\nFE C2 EA\n02 22 EA\nFA DA EA\n0A 22 0A\nEA B2 FA\nEA 9A 02\nEA E8 FE" }, + /* 41*/ { BARCODE_HANXIN, "é", NULL, NULL, NULL, DATA_MODE, -1, 0, -1, 0, -1, 1, 4, -1, NULL, -1, -1, 0, -1, "FE 8A FE\n80 28 02\nBE E8 FA\nA0 94 0A\nAE 3E EA\nAE D2 EA\nAE 74 EA\n00 AA 00\n15 B4 AA\n0B 48 74\nA2 4A A4\nB5 56 2C\nA8 5A A8\n9F 18 50\nAA 07 50\n00 A6 00\nFE 20 EA\n02 C2 EA\nFA C4 EA\n0A 42 0A\nEA 52 FA\nEA 24 02\nEA AA FE" }, }; int data_size = ARRAY_SIZE(data); int i; diff --git a/frontend_qt/grpDM.ui b/frontend_qt/grpDM.ui index 61eddbc5..9a137966 100644 --- a/frontend_qt/grpDM.ui +++ b/frontend_qt/grpDM.ui @@ -50,242 +50,242 @@ - 10 x 10 + 10 x 10 (Zint 1) - 12 x 12 + 12 x 12 (Zint 2) - 14 x 14 + 14 x 14 (Zint 3) - 16 x 16 + 16 x 16 (Zint 4) - 18 x 18 + 18 x 18 (Zint 5) - 20 x 20 + 20 x 20 (Zint 6) - 22 x 22 + 22 x 22 (Zint 7) - 24 x 24 + 24 x 24 (Zint 8) - 26 x 26 + 26 x 26 (Zint 9) - 32 x 32 + 32 x 32 (Zint 10) - 36 x 36 + 36 x 36 (Zint 11) - 40 x 40 + 40 x 40 (Zint 12) - 44 x 44 + 44 x 44 (Zint 13) - 48 x 48 + 48 x 48 (Zint 14) - 52 x 52 + 52 x 52 (Zint 15) - 64 x 64 + 64 x 64 (Zint 16) - 72 x 72 + 72 x 72 (Zint 17) - 80 x 80 + 80 x 80 (Zint 18) - 88 x 88 + 88 x 88 (Zint 19) - 96 x 96 + 96 x 96 (Zint 20) - 104 x 104 + 104 x 104 (Zint 21) - 120 x 120 + 120 x 120 (Zint 22) - 132 x 132 + 132 x 132 (Zint 23) - 144 x 144 + 144 x 144 (Zint 24) - 8 x 18 + 8 x 18 (Zint 25) - 8 x 32 + 8 x 32 (Zint 26) - 12 x 26 + 12 x 26 (Zint 27) - 12 x 36 + 12 x 36 (Zint 28) - 16 x 36 + 16 x 36 (Zint 29) - 16 x 48 + 16 x 48 (Zint 30) - 8 x 48 (DMRE) + 8 x 48 (DMRE) (Zint 31) - 8 x 64 (DMRE) + 8 x 64 (DMRE) (Zint 32) - 8 x 80 (DMRE) + 8 x 80 (DMRE) (Zint 33) - 8 x 96 (DMRE) + 8 x 96 (DMRE) (Zint 34) - 8 x 120 (DMRE) + 8 x 120 (DMRE) (Zint 35) - 8 x 144 (DMRE) + 8 x 144 (DMRE) (Zint 36) - 12 x 64 (DMRE) + 12 x 64 (DMRE) (Zint 37) - 12 x 88 (DMRE) + 12 x 88 (DMRE) (Zint 38) - 16 x 64 (DMRE) + 16 x 64 (DMRE) (Zint 39) - 20 x 36 (DMRE) + 20 x 36 (DMRE) (Zint 40) - 20 x 44 (DMRE) + 20 x 44 (DMRE) (Zint 41) - 20 x 64 (DMRE) + 20 x 64 (DMRE) (Zint 42) - 22 x 48 (DMRE) + 22 x 48 (DMRE) (Zint 43) - 24 x 48 (DMRE) + 24 x 48 (DMRE) (Zint 44) - 24 x 64 (DMRE) + 24 x 64 (DMRE) (Zint 45) - 26 x 40 (DMRE) + 26 x 40 (DMRE) (Zint 46) - 26 x 48 (DMRE) + 26 x 48 (DMRE) (Zint 47) - 26 x 64 (DMRE) + 26 x 64 (DMRE) (Zint 48) @@ -407,6 +407,20 @@ instead of the preferred FNC1 + + + + &Fast encoding + + + Use a faster but less optimal algorithm +for encoding the data + + + false + + + diff --git a/frontend_qt/mainwindow.cpp b/frontend_qt/mainwindow.cpp index b3861b58..28761e33 100644 --- a/frontend_qt/mainwindow.cpp +++ b/frontend_qt/mainwindow.cpp @@ -1233,6 +1233,7 @@ void MainWindow::change_options() connect(get_widget(QSL("chkDMRectangle")), SIGNAL(toggled( bool )), SLOT(update_preview())); connect(get_widget(QSL("chkDMRE")), SIGNAL(toggled( bool )), SLOT(update_preview())); connect(get_widget(QSL("chkDMGSSep")), SIGNAL(toggled( bool )), SLOT(update_preview())); + connect(get_widget(QSL("chkDMFast")), SIGNAL(toggled( bool )), SLOT(update_preview())); connect(get_widget(QSL("cmbDMStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(get_widget(QSL("cmbDMStructAppCount")), SIGNAL(currentIndexChanged( int )), SLOT(structapp_ui_set())); connect(get_widget(QSL("cmbDMStructAppIndex")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); @@ -2024,6 +2025,10 @@ void MainWindow::update_preview() m_bc.bc.setOption3(0); } + if (get_chk_val(QSL("chkDMFast"))) { + m_bc.bc.setInputMode(FAST_MODE | m_bc.bc.inputMode()); + } + if ((item_val = get_cmb_index(QSL("cmbDMStructAppCount"))) != 0) { QString id; int id1 = get_spn_val(QSL("spnDMStructAppID")); @@ -2884,6 +2889,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) settings.setValue(QSL("studio/bc/datamatrix/chk_suppress_rect"), get_chk_val(QSL("chkDMRectangle"))); settings.setValue(QSL("studio/bc/datamatrix/chk_allow_dmre"), get_chk_val(QSL("chkDMRE"))); settings.setValue(QSL("studio/bc/datamatrix/chk_gs_sep"), get_chk_val(QSL("chkDMGSSep"))); + settings.setValue(QSL("studio/bc/datamatrix/chk_fast"), get_chk_val(QSL("chkDMFast"))); settings.setValue(QSL("studio/bc/datamatrix/structapp_count"), get_cmb_index(QSL("cmbDMStructAppCount"))); settings.setValue(QSL("studio/bc/datamatrix/structapp_index"), get_cmb_index(QSL("cmbDMStructAppIndex"))); settings.setValue(QSL("studio/bc/datamatrix/structapp_id"), get_spn_val(QSL("spnDMStructAppID"))); @@ -3259,6 +3265,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_suppress_rect"), QSL("chkDMRectangle")); set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_allow_dmre"), QSL("chkDMRE")); set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_gs_sep"), QSL("chkDMGSSep")); + set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_fast"), QSL("chkDMFast")); set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/structapp_count"), QSL("cmbDMStructAppCount")); set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/structapp_index"), QSL("cmbDMStructAppIndex")); set_spn_from_setting(settings, QSL("studio/bc/datamatrix/structapp_id"), QSL("spnDMStructAppID"), 1); diff --git a/win32/libzint.vcxproj b/win32/libzint.vcxproj index 1fc6d7c0..440b4f0a 100644 --- a/win32/libzint.vcxproj +++ b/win32/libzint.vcxproj @@ -183,6 +183,7 @@ + diff --git a/win32/vs2008/libzint.vcproj b/win32/vs2008/libzint.vcproj index 24e865b0..15886067 100644 --- a/win32/vs2008/libzint.vcproj +++ b/win32/vs2008/libzint.vcproj @@ -509,6 +509,10 @@ RelativePath="..\backend\dmatrix.h" > + + diff --git a/win32/vs2015/libzint.vcxproj b/win32/vs2015/libzint.vcxproj index 39e9f387..33dd91f9 100644 --- a/win32/vs2015/libzint.vcxproj +++ b/win32/vs2015/libzint.vcxproj @@ -364,6 +364,7 @@ + diff --git a/win32/vs2015/vsx/libzintMD.vcxproj b/win32/vs2015/vsx/libzintMD.vcxproj index 7b641abc..1f78981d 100644 --- a/win32/vs2015/vsx/libzintMD.vcxproj +++ b/win32/vs2015/vsx/libzintMD.vcxproj @@ -130,6 +130,7 @@ + diff --git a/win32/vs2019/libzint.vcxproj b/win32/vs2019/libzint.vcxproj index 8682d477..5daec566 100644 --- a/win32/vs2019/libzint.vcxproj +++ b/win32/vs2019/libzint.vcxproj @@ -183,6 +183,7 @@ +