mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
composite: fix buffer overflow for large linear, small composite (500 -> 1000)
composite: clear errtxt when bumping from CC-A -> CC-B -> CC-C composite: CC-C adjustment 53 -> 52 (same as BWIPP) with proper explanation composite: remove unneeded > 11805 length check CODEONE: remove unneeded extended ASCII check in C40 count GS1_128/CODE16K: remove unneeded initial GS1 mode '[' check PDF417: remove unneeded second option_2 > 30 check Document some "Not reached" lines (code coverage) Update bwipp_dump.ps GUI: window/tab height +5 so 2 full lines for composite edit box (Ubuntu) manual: dash -> hyphen, PDF417 "check digit" -> "error correction", DMRE ref tests: further test cases for CODEONE/CODE16K/common/composite/DATAMATRIX/ DOTCODE/gs1/MAXICODE/PDF417/postal/QRCODE
This commit is contained in:
parent
f0bfb8d920
commit
b015e38da0
@ -305,7 +305,7 @@ INTERNAL int c39(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||||||
width = (C + 2) * (3 * N + 6) * X + (C + 1) * I = (C + 2) * 9 + C + 1) * X = (10 * C + 19) */
|
width = (C + 2) * (3 * N + 6) * X + (C + 1) * I = (C + 2) * 9 + C + 1) * X = (10 * C + 19) */
|
||||||
height = (float) ((10.0 * (symbol->option_2 == 1 ? length + 1 : length) + 19.0) * 0.15);
|
height = (float) ((10.0 * (symbol->option_2 == 1 ? length + 1 : length) + 19.0) * 0.15);
|
||||||
/* Using 50 as default as none recommended */
|
/* Using 50 as default as none recommended */
|
||||||
error_number = set_height(symbol, height , height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
|
error_number = set_height(symbol, height, height > 50.0f ? height : 50.0f, 0.0f, 0 /*no_errtxt*/);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
height = 50.0f;
|
height = 50.0f;
|
||||||
|
@ -451,10 +451,6 @@ static int c40text_cnt(const int current_mode, const int gs1, unsigned char inpu
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
if (input & 0x80) {
|
|
||||||
cnt += 2;
|
|
||||||
input = input - 128;
|
|
||||||
}
|
|
||||||
if ((current_mode == C1_C40 && c40_shift[input]) || (current_mode == C1_TEXT && text_shift[input])) {
|
if ((current_mode == C1_C40 && c40_shift[input]) || (current_mode == C1_TEXT && text_shift[input])) {
|
||||||
cnt += 1;
|
cnt += 1;
|
||||||
}
|
}
|
||||||
@ -814,7 +810,7 @@ static int c1_encode(struct zint_symbol *symbol, unsigned char source[], unsigne
|
|||||||
if (cte_p >= 1) {
|
if (cte_p >= 1) {
|
||||||
int cws_remaining = codewords_remaining(symbol, tp);
|
int cws_remaining = codewords_remaining(symbol, tp);
|
||||||
|
|
||||||
/* Note doing strict interpretation of spec here (same as BWIPP), unlike in Data Matrix case */
|
/* Note doing strict interpretation of spec here (same as BWIPP), as now also done in Data Matrix case */
|
||||||
if (cws_remaining == 1 && cte_p == 1 && isc40text(current_mode, source[sp - 1])) {
|
if (cws_remaining == 1 && cte_p == 1 && isc40text(current_mode, source[sp - 1])) {
|
||||||
/* 2.2.2.2 "...except when a single symbol character is left at the end before the first
|
/* 2.2.2.2 "...except when a single symbol character is left at the end before the first
|
||||||
error correction character. This single character is encoded in the ASCII code set." */
|
error correction character. This single character is encoded in the ASCII code set." */
|
||||||
|
@ -753,9 +753,6 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
indexchaine = 0;
|
indexchaine = 0;
|
||||||
|
|
||||||
mode = parunmodd(reduced[indexchaine]);
|
mode = parunmodd(reduced[indexchaine]);
|
||||||
if (reduced[indexchaine] == '[') {
|
|
||||||
mode = ABORC;
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
list[1][indexliste] = mode;
|
list[1][indexliste] = mode;
|
||||||
@ -776,15 +773,16 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
dxsmooth(list, &indexliste);
|
dxsmooth(list, &indexliste);
|
||||||
|
|
||||||
/* Put set data into set[] */
|
/* Put set data into set[] */
|
||||||
|
/* Note as control chars not permitted in GS1, no reason to ever be in Set A, but cases left in anyway */
|
||||||
read = 0;
|
read = 0;
|
||||||
for (i = 0; i < indexliste; i++) {
|
for (i = 0; i < indexliste; i++) {
|
||||||
for (j = 0; j < list[0][i]; j++) {
|
for (j = 0; j < list[0][i]; j++) {
|
||||||
switch (list[1][i]) {
|
switch (list[1][i]) {
|
||||||
case SHIFTA: set[read] = 'a';
|
case SHIFTA: set[read] = 'a'; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case LATCHA: set[read] = 'A';
|
case LATCHA: set[read] = 'A'; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case SHIFTB: set[read] = 'b';
|
case SHIFTB: set[read] = 'b'; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case LATCHB: set[read] = 'B';
|
case LATCHB: set[read] = 'B';
|
||||||
break;
|
break;
|
||||||
@ -841,12 +839,12 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Now we can calculate how long the barcode is going to be - and stop it from
|
/* Now we can calculate how long the barcode is going to be - and stop it from
|
||||||
being too long */
|
being too long */
|
||||||
last_set = set[0];
|
last_set = set[0];
|
||||||
glyph_count = 0.0f;
|
glyph_count = 0.0f;
|
||||||
for (i = 0; i < reduced_length; i++) {
|
for (i = 0; i < reduced_length; i++) {
|
||||||
if ((set[i] == 'a') || (set[i] == 'b')) {
|
if ((set[i] == 'a') || (set[i] == 'b')) {
|
||||||
glyph_count = glyph_count + 1.0f;
|
glyph_count = glyph_count + 1.0f; /* Not reached */
|
||||||
}
|
}
|
||||||
if (((set[i] == 'A') || (set[i] == 'B')) || (set[i] == 'C')) {
|
if (((set[i] == 'A') || (set[i] == 'B')) || (set[i] == 'C')) {
|
||||||
if (set[i] != last_set) {
|
if (set[i] != last_set) {
|
||||||
@ -869,7 +867,7 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
/* So now we know what start character to use - we can get on with it! */
|
/* So now we know what start character to use - we can get on with it! */
|
||||||
switch (set[0]) {
|
switch (set[0]) {
|
||||||
case 'A': /* Start A */
|
case 'A': /* Start A */
|
||||||
strcat(dest, C128Table[103]);
|
strcat(dest, C128Table[103]); /* Not reached */
|
||||||
values[0] = 103;
|
values[0] = 103;
|
||||||
break;
|
break;
|
||||||
case 'B': /* Start B */
|
case 'B': /* Start B */
|
||||||
@ -893,7 +891,7 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
|
|
||||||
if ((read != 0) && (set[read] != set[read - 1])) { /* Latch different code set */
|
if ((read != 0) && (set[read] != set[read - 1])) { /* Latch different code set */
|
||||||
switch (set[read]) {
|
switch (set[read]) {
|
||||||
case 'A': strcat(dest, C128Table[101]);
|
case 'A': strcat(dest, C128Table[101]); /* Not reached */
|
||||||
values[bar_characters] = 101;
|
values[bar_characters] = 101;
|
||||||
bar_characters++;
|
bar_characters++;
|
||||||
break;
|
break;
|
||||||
@ -910,7 +908,7 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
|
|
||||||
if ((set[read] == 'a') || (set[read] == 'b')) {
|
if ((set[read] == 'a') || (set[read] == 'b')) {
|
||||||
/* Insert shift character */
|
/* Insert shift character */
|
||||||
strcat(dest, C128Table[98]);
|
strcat(dest, C128Table[98]); /* Not reached */
|
||||||
values[bar_characters] = 98;
|
values[bar_characters] = 98;
|
||||||
bar_characters++;
|
bar_characters++;
|
||||||
}
|
}
|
||||||
@ -919,7 +917,7 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
switch (set[read]) { /* Encode data characters */
|
switch (set[read]) { /* Encode data characters */
|
||||||
case 'A':
|
case 'A':
|
||||||
case 'a':
|
case 'a':
|
||||||
c128_set_a(reduced[read], dest, values, &bar_characters);
|
c128_set_a(reduced[read], dest, values, &bar_characters); /* Not reached */
|
||||||
read++;
|
read++;
|
||||||
break;
|
break;
|
||||||
case 'B':
|
case 'B':
|
||||||
@ -950,7 +948,7 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
case 2:
|
case 2:
|
||||||
/* CC-A or CC-B 2D component */
|
/* CC-A or CC-B 2D component */
|
||||||
switch (set[reduced_length - 1]) {
|
switch (set[reduced_length - 1]) {
|
||||||
case 'A': linkage_flag = 100;
|
case 'A': linkage_flag = 100; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case 'B': linkage_flag = 99;
|
case 'B': linkage_flag = 99;
|
||||||
break;
|
break;
|
||||||
@ -961,7 +959,7 @@ INTERNAL int ean_128_cc(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
case 3:
|
case 3:
|
||||||
/* CC-C 2D component */
|
/* CC-C 2D component */
|
||||||
switch (set[reduced_length - 1]) {
|
switch (set[reduced_length - 1]) {
|
||||||
case 'A': linkage_flag = 99;
|
case 'A': linkage_flag = 99; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case 'B': linkage_flag = 101;
|
case 'B': linkage_flag = 101;
|
||||||
break;
|
break;
|
||||||
|
@ -152,9 +152,6 @@ INTERNAL int code16k(struct zint_symbol *symbol, unsigned char source[], int len
|
|||||||
indexchaine = 0;
|
indexchaine = 0;
|
||||||
|
|
||||||
mode = parunmodd(source[indexchaine]);
|
mode = parunmodd(source[indexchaine]);
|
||||||
if ((gs1) && (source[indexchaine] == '[')) {
|
|
||||||
mode = ABORC;
|
|
||||||
} /* FNC1 */
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
list[1][indexliste] = mode;
|
list[1][indexliste] = mode;
|
||||||
|
@ -294,7 +294,7 @@ static void cc_a(struct zint_symbol *symbol, const char source[], const int cc_w
|
|||||||
symbol->width = bp;
|
symbol->width = bp;
|
||||||
|
|
||||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||||
printf("CC-A Columns: %d, Rows: %d\n", cc_width, symbol->rows);
|
printf("CC-A Columns: %d, Rows: %d, Variant: %d, CodeWords: %d\n", cc_width, symbol->rows, variant, cwCnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,9 +413,9 @@ static void cc_b(struct zint_symbol *symbol, const char source[], const int cc_w
|
|||||||
i = longueur - mclength; /* amount of padding required */
|
i = longueur - mclength; /* amount of padding required */
|
||||||
offset = MicroVariants[variant + 102]; /* coefficient offset */
|
offset = MicroVariants[variant + 102]; /* coefficient offset */
|
||||||
|
|
||||||
/* We add the padding */
|
/* Binary input padded to target length so no padding should be necessary */
|
||||||
while (i > 0) {
|
while (i > 0) {
|
||||||
chainemc[mclength] = 900;
|
chainemc[mclength] = 900; /* Not reached */
|
||||||
mclength++;
|
mclength++;
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
@ -517,7 +517,8 @@ static void cc_b(struct zint_symbol *symbol, const char source[], const int cc_w
|
|||||||
symbol->width = bp;
|
symbol->width = bp;
|
||||||
|
|
||||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||||
printf("CC-B Columns: %d, Rows: %d\n", cc_width, symbol->rows);
|
printf("CC-B Columns: %d, Rows: %d, Variant: %d, CodeWords: %d\n",
|
||||||
|
cc_width, symbol->rows, variant + 1, mclength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,6 +559,12 @@ static void cc_c(struct zint_symbol *symbol, const char source[], const int cc_w
|
|||||||
|
|
||||||
chainemc[0] = mclength;
|
chainemc[0] = mclength;
|
||||||
|
|
||||||
|
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||||
|
printf("CC-C Codewords (%d):", mclength);
|
||||||
|
for (i = 0; i < mclength; i++) printf(" %d", chainemc[i]);
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
k = 1;
|
k = 1;
|
||||||
for (i = 1; i <= (ecc_level + 1); i++) {
|
for (i = 1; i <= (ecc_level + 1); i++) {
|
||||||
k *= 2;
|
k *= 2;
|
||||||
@ -565,23 +572,23 @@ static void cc_c(struct zint_symbol *symbol, const char source[], const int cc_w
|
|||||||
|
|
||||||
/* 796 - we now take care of the Reed Solomon codes */
|
/* 796 - we now take care of the Reed Solomon codes */
|
||||||
switch (ecc_level) {
|
switch (ecc_level) {
|
||||||
case 1: offset = 2;
|
case 1: offset = 2; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case 2: offset = 6;
|
case 2: offset = 6; /* Min ECC currently used is 2 */
|
||||||
break;
|
break;
|
||||||
case 3: offset = 14;
|
case 3: offset = 14;
|
||||||
break;
|
break;
|
||||||
case 4: offset = 30;
|
case 4: offset = 30;
|
||||||
break;
|
break;
|
||||||
case 5: offset = 62;
|
case 5: offset = 62; /* Max ECC currently used is 5 */
|
||||||
break;
|
break;
|
||||||
case 6: offset = 126;
|
case 6: offset = 126; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case 7: offset = 254;
|
case 7: offset = 254; /* Not reached */
|
||||||
break;
|
break;
|
||||||
case 8: offset = 510;
|
case 8: offset = 510; /* Not reached */
|
||||||
break;
|
break;
|
||||||
default: offset = 0;
|
default: offset = 0; /* Not reached */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,7 +663,8 @@ static void cc_c(struct zint_symbol *symbol, const char source[], const int cc_w
|
|||||||
symbol->width = bp;
|
symbol->width = bp;
|
||||||
|
|
||||||
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
if (symbol->debug & ZINT_DEBUG_PRINT) {
|
||||||
printf("CC-C Columns: %d, Rows: %d\n", cc_width, symbol->rows);
|
printf("CC-C Columns: %d, Rows: %d, CodeWords: %d, ECC Level: %d\n",
|
||||||
|
cc_width, symbol->rows, mclength, ecc_level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -786,7 +794,7 @@ static int calc_padding_ccb(const int binary_length, const int cc_width) {
|
|||||||
return target_bitsize;
|
return target_bitsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int calc_padding_ccc(const int binary_length, int *cc_width, const int lin_width, int *ecc) {
|
static int calc_padding_ccc(const int binary_length, int *cc_width, const int linear_width, int *ecc) {
|
||||||
int target_bitsize = 0;
|
int target_bitsize = 0;
|
||||||
int byte_length, codewords_used, ecc_level, ecc_codewords, rows;
|
int byte_length, codewords_used, ecc_level, ecc_codewords, rows;
|
||||||
int codewords_total, target_codewords, target_bytesize;
|
int codewords_total, target_codewords, target_bytesize;
|
||||||
@ -820,7 +828,8 @@ static int calc_padding_ccc(const int binary_length, int *cc_width, const int li
|
|||||||
codewords_used += ecc_codewords;
|
codewords_used += ecc_codewords;
|
||||||
codewords_used += 3;
|
codewords_used += 3;
|
||||||
|
|
||||||
*(cc_width) = (lin_width - 53) / 17; // -53 = (6 left quiet zone + 10 right quiet zone - (17 * 3 + 18))
|
/* -52 = 7 left shift (section 12.3 f) + 10 right quiet zone - 17 start + 2x17 row indicators + 18 stop */
|
||||||
|
*(cc_width) = (linear_width - 52) / 17;
|
||||||
if (*(cc_width) > 30) {
|
if (*(cc_width) > 30) {
|
||||||
*(cc_width) = 30;
|
*(cc_width) = 30;
|
||||||
}
|
}
|
||||||
@ -831,8 +840,8 @@ static int calc_padding_ccc(const int binary_length, int *cc_width, const int li
|
|||||||
rows = (int) ceil((double) codewords_used / *(cc_width));
|
rows = (int) ceil((double) codewords_used / *(cc_width));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rows > 30) {
|
if (rows > 30) { /* Should never happen given `codewords_used` check above (865 / 30 ~ 28.83) */
|
||||||
return 0;
|
return 0; /* Not reached */
|
||||||
}
|
}
|
||||||
if (rows < 3) {
|
if (rows < 3) {
|
||||||
rows = 3;
|
rows = 3;
|
||||||
@ -853,7 +862,7 @@ static int calc_padding_ccc(const int binary_length, int *cc_width, const int li
|
|||||||
|
|
||||||
/* Handles all data encodation from section 5 of ISO/IEC 24723 */
|
/* Handles all data encodation from section 5 of ISO/IEC 24723 */
|
||||||
static int cc_binary_string(struct zint_symbol *symbol, const unsigned char source[], const int source_len,
|
static int cc_binary_string(struct zint_symbol *symbol, const unsigned char source[], const int source_len,
|
||||||
char binary_string[], const int cc_mode, int *cc_width, int *ecc, const int lin_width) {
|
char binary_string[], const int cc_mode, int *cc_width, int *ecc, const int linear_width) {
|
||||||
int encoding_method, read_posn, alpha_pad;
|
int encoding_method, read_posn, alpha_pad;
|
||||||
int i, j, ai_crop, ai_crop_posn, fnc1_latch;
|
int i, j, ai_crop, ai_crop_posn, fnc1_latch;
|
||||||
int ai90_mode, remainder;
|
int ai90_mode, remainder;
|
||||||
@ -1169,7 +1178,7 @@ static int cc_binary_string(struct zint_symbol *symbol, const unsigned char sour
|
|||||||
target_bitsize = calc_padding_ccb(bp, *(cc_width));
|
target_bitsize = calc_padding_ccb(bp, *(cc_width));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
target_bitsize = calc_padding_ccc(bp, cc_width, lin_width, ecc);
|
target_bitsize = calc_padding_ccc(bp, cc_width, linear_width, ecc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1198,11 +1207,6 @@ static int cc_binary_string(struct zint_symbol *symbol, const unsigned char sour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bp > 11805) { /* (2361 * 5) */
|
|
||||||
strcpy(symbol->errtxt, "443: Input too long");
|
|
||||||
return ZINT_ERROR_TOO_LONG;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (cc_mode) {
|
switch (cc_mode) {
|
||||||
case 1:
|
case 1:
|
||||||
target_bitsize = calc_padding_cca(bp, *(cc_width));
|
target_bitsize = calc_padding_cca(bp, *(cc_width));
|
||||||
@ -1211,7 +1215,7 @@ static int cc_binary_string(struct zint_symbol *symbol, const unsigned char sour
|
|||||||
target_bitsize = calc_padding_ccb(bp, *(cc_width));
|
target_bitsize = calc_padding_ccb(bp, *(cc_width));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
target_bitsize = calc_padding_ccc(bp, cc_width, lin_width, ecc);
|
target_bitsize = calc_padding_ccc(bp, cc_width, linear_width, ecc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1271,7 +1275,8 @@ static const char in_linear_comp[] = " in linear component";
|
|||||||
INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int length) {
|
INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||||
int error_number, warn_number = 0, cc_mode, cc_width = 0, ecc_level = 0;
|
int error_number, warn_number = 0, cc_mode, cc_width = 0, ecc_level = 0;
|
||||||
int j, i, k;
|
int j, i, k;
|
||||||
unsigned int bs = 13 * length + 500 + 1; /* Allow for 8 bits + 5-bit latch per char + 500 bits overhead/padding */
|
/* Allow for 8 bits + 5-bit latch per char + 1000 bits overhead/padding */
|
||||||
|
unsigned int bs = 13 * length + 1000 + 1;
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
char binary_string[bs];
|
char binary_string[bs];
|
||||||
#else
|
#else
|
||||||
@ -1282,6 +1287,8 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
|
|||||||
int top_shift, bottom_shift;
|
int top_shift, bottom_shift;
|
||||||
int linear_width = 0;
|
int linear_width = 0;
|
||||||
|
|
||||||
|
if (symbol->debug & ZINT_DEBUG_PRINT) printf("Reduced length: %d\n", length);
|
||||||
|
|
||||||
/* Perform sanity checks on input options first */
|
/* Perform sanity checks on input options first */
|
||||||
error_number = 0;
|
error_number = 0;
|
||||||
pri_len = (int) strlen(symbol->primary);
|
pri_len = (int) strlen(symbol->primary);
|
||||||
@ -1383,6 +1390,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
|
|||||||
if (cc_mode == 1) {
|
if (cc_mode == 1) {
|
||||||
i = cc_binary_string(symbol, source, length, binary_string, cc_mode, &cc_width, &ecc_level, linear_width);
|
i = cc_binary_string(symbol, source, length, binary_string, cc_mode, &cc_width, &ecc_level, linear_width);
|
||||||
if (i == ZINT_ERROR_TOO_LONG) {
|
if (i == ZINT_ERROR_TOO_LONG) {
|
||||||
|
symbol->errtxt[0] = '\0'; /* Unset error text */
|
||||||
cc_mode = 2;
|
cc_mode = 2;
|
||||||
} else if (i != 0) {
|
} else if (i != 0) {
|
||||||
return i;
|
return i;
|
||||||
@ -1396,6 +1404,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
|
|||||||
if (symbol->symbology != BARCODE_GS1_128_CC) {
|
if (symbol->symbology != BARCODE_GS1_128_CC) {
|
||||||
return ZINT_ERROR_TOO_LONG;
|
return ZINT_ERROR_TOO_LONG;
|
||||||
}
|
}
|
||||||
|
symbol->errtxt[0] = '\0'; /* Unset error text */
|
||||||
cc_mode = 3;
|
cc_mode = 3;
|
||||||
} else if (i != 0) {
|
} else if (i != 0) {
|
||||||
return i;
|
return i;
|
||||||
@ -1506,7 +1515,7 @@ INTERNAL int composite(struct zint_symbol *symbol, unsigned char source[], int l
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BARCODE_GS1_128_CC: if (cc_mode == 3) {
|
case BARCODE_GS1_128_CC: if (cc_mode == 3) {
|
||||||
bottom_shift = 7;
|
bottom_shift = 7; /* ISO/IEC 24723:2010 12.3 f) */
|
||||||
} else {
|
} else {
|
||||||
/* ISO/IEC 24723:2010 12.3 g) "GS1-128 components linked to the right quiet zone of the CC-A or CC-B:
|
/* ISO/IEC 24723:2010 12.3 g) "GS1-128 components linked to the right quiet zone of the CC-A or CC-B:
|
||||||
the CC-A or CC-B component is aligned with the last space module of one of the rightmost symbol
|
the CC-A or CC-B component is aligned with the last space module of one of the rightmost symbol
|
||||||
|
@ -1434,8 +1434,8 @@ INTERNAL int dotcode(struct zint_symbol *symbol, unsigned char source[], int len
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((height < 5) || (width < 5)) {
|
if ((height < 5) || (width < 5)) {
|
||||||
if (height < 5 && width < 5) {
|
if (height < 5 && width < 5) { /* Won't happen as if width < 5, min height is 19 */
|
||||||
sprintf(symbol->errtxt, "527: Symbol size %dx%d (WxH) is too small", width, height);
|
sprintf(symbol->errtxt, "527: Symbol size %dx%d (WxH) is too small", width, height); /* Not reached */
|
||||||
} else {
|
} else {
|
||||||
sprintf(symbol->errtxt, "529: Symbol %s %d is too small",
|
sprintf(symbol->errtxt, "529: Symbol %s %d is too small",
|
||||||
width < 5 ? "width" : "height", width < 5 ? width : height);
|
width < 5 ? "width" : "height", width < 5 ? width : height);
|
||||||
|
@ -362,8 +362,8 @@ INTERNAL int code32(struct zint_symbol *symbol, unsigned char source[], int leng
|
|||||||
risultante[6] = '\0';
|
risultante[6] = '\0';
|
||||||
/* Plot the barcode using Code 39 */
|
/* Plot the barcode using Code 39 */
|
||||||
error_number = c39(symbol, (unsigned char*) risultante, (int) strlen(risultante));
|
error_number = c39(symbol, (unsigned char*) risultante, (int) strlen(risultante));
|
||||||
if (error_number != 0) {
|
if (error_number != 0) { /* Should never happen */
|
||||||
return error_number;
|
return error_number; /* Not reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef COMPLIANT_HEIGHTS
|
#ifdef COMPLIANT_HEIGHTS
|
||||||
|
@ -552,7 +552,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
|||||||
break;
|
break;
|
||||||
case NUM: printf("Number\n");
|
case NUM: printf("Number\n");
|
||||||
break;
|
break;
|
||||||
default: printf("ERROR\n");
|
default: printf("ERROR\n"); /* Should never happen */ /* Not reached */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -610,7 +610,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
|||||||
assert(mclength > 0); /* Suppress clang-analyzer-core.uninitialized.Assign warning */
|
assert(mclength > 0); /* Suppress clang-analyzer-core.uninitialized.Assign warning */
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
printf("\nCompressed data stream:\n");
|
printf("\nCompressed data stream (%d):\n", mclength);
|
||||||
for (i = 0; i < mclength; i++) {
|
for (i = 0; i < mclength; i++) {
|
||||||
printf("%d ", chainemc[i]);
|
printf("%d ", chainemc[i]);
|
||||||
}
|
}
|
||||||
@ -642,9 +642,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
|||||||
return ZINT_ERROR_TOO_LONG;
|
return ZINT_ERROR_TOO_LONG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (symbol->option_2 > 30) {
|
if (symbol->option_2 < 1) {
|
||||||
symbol->option_2 = 30;
|
|
||||||
} else if (symbol->option_2 < 1) {
|
|
||||||
symbol->option_2 = (int) (0.5 + sqrt((longueur + k) / 3.0));
|
symbol->option_2 = (int) (0.5 + sqrt((longueur + k) / 3.0));
|
||||||
}
|
}
|
||||||
if (((longueur + k) / symbol->option_2) > 90) {
|
if (((longueur + k) / symbol->option_2) > 90) {
|
||||||
@ -717,7 +715,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
printf("Complete CW string:\n");
|
printf("Complete CW string (%d):\n", mclength);
|
||||||
for (i = 0; i < mclength; i++) {
|
for (i = 0; i < mclength; i++) {
|
||||||
printf("%d ", chainemc[i]);
|
printf("%d ", chainemc[i]);
|
||||||
}
|
}
|
||||||
@ -732,6 +730,8 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int
|
|||||||
symbol->rows = mclength / symbol->option_2;
|
symbol->rows = mclength / symbol->option_2;
|
||||||
assert(symbol->rows > 0); /* Suppress clang-analyzer-core.DivideZero warning */
|
assert(symbol->rows > 0); /* Suppress clang-analyzer-core.DivideZero warning */
|
||||||
|
|
||||||
|
if (debug) printf("\nSymbol size:\n%d columns x %d rows\n", symbol->option_2, symbol->rows);
|
||||||
|
|
||||||
/* 818 - The CW string is finished */
|
/* 818 - The CW string is finished */
|
||||||
c1 = (symbol->rows - 1) / 3;
|
c1 = (symbol->rows - 1) / 3;
|
||||||
c2 = symbol->option_1 * 3 + (symbol->rows - 1) % 3;
|
c2 = symbol->option_1 * 3 + (symbol->rows - 1) % 3;
|
||||||
@ -801,19 +801,17 @@ INTERNAL int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int l
|
|||||||
strcpy(symbol->errtxt, "460: Security value out of range");
|
strcpy(symbol->errtxt, "460: Security value out of range");
|
||||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||||
return ZINT_ERROR_INVALID_OPTION;
|
return ZINT_ERROR_INVALID_OPTION;
|
||||||
} else {
|
|
||||||
symbol->option_1 = -1;
|
|
||||||
error_number = ZINT_WARN_INVALID_OPTION;
|
|
||||||
}
|
}
|
||||||
|
symbol->option_1 = -1;
|
||||||
|
error_number = ZINT_WARN_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
if ((symbol->option_2 < 0) || (symbol->option_2 > 30)) {
|
if ((symbol->option_2 < 0) || (symbol->option_2 > 30)) {
|
||||||
strcpy(symbol->errtxt, "461: Number of columns out of range");
|
strcpy(symbol->errtxt, "461: Number of columns out of range");
|
||||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||||
return ZINT_ERROR_INVALID_OPTION;
|
return ZINT_ERROR_INVALID_OPTION;
|
||||||
} else {
|
|
||||||
symbol->option_2 = 0;
|
|
||||||
error_number = ZINT_WARN_INVALID_OPTION;
|
|
||||||
}
|
}
|
||||||
|
symbol->option_2 = 0;
|
||||||
|
error_number = ZINT_WARN_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 349 */
|
/* 349 */
|
||||||
@ -877,7 +875,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
|||||||
break;
|
break;
|
||||||
case NUM: printf("NUMBER\n");
|
case NUM: printf("NUMBER\n");
|
||||||
break;
|
break;
|
||||||
default: printf("*ERROR*\n");
|
default: printf("*ERROR*\n"); /* Should never happen */ /* Not reached */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -944,14 +942,13 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
|||||||
strcpy(symbol->errtxt, "468: Specified width out of range");
|
strcpy(symbol->errtxt, "468: Specified width out of range");
|
||||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||||
return ZINT_ERROR_INVALID_OPTION;
|
return ZINT_ERROR_INVALID_OPTION;
|
||||||
} else {
|
|
||||||
symbol->option_2 = 0;
|
|
||||||
error_number = ZINT_WARN_INVALID_OPTION;
|
|
||||||
}
|
}
|
||||||
|
symbol->option_2 = 0;
|
||||||
|
error_number = ZINT_WARN_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
printf("\nEncoded Data Stream:\n");
|
printf("\nEncoded Data Stream (%d):\n", mclength);
|
||||||
for (i = 0; i < mclength; i++) {
|
for (i = 0; i < mclength; i++) {
|
||||||
printf("%3d ", chainemc[i]);
|
printf("%3d ", chainemc[i]);
|
||||||
}
|
}
|
||||||
@ -967,10 +964,9 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
|||||||
strcpy(symbol->errtxt, "469: Specified symbol size too small for data");
|
strcpy(symbol->errtxt, "469: Specified symbol size too small for data");
|
||||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||||
return ZINT_ERROR_INVALID_OPTION;
|
return ZINT_ERROR_INVALID_OPTION;
|
||||||
} else {
|
|
||||||
symbol->option_2 = 0;
|
|
||||||
error_number = ZINT_WARN_INVALID_OPTION;
|
|
||||||
}
|
}
|
||||||
|
symbol->option_2 = 0;
|
||||||
|
error_number = ZINT_WARN_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((symbol->option_2 == 2) && (mclength > 37)) {
|
if ((symbol->option_2 == 2) && (mclength > 37)) {
|
||||||
@ -978,10 +974,9 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
|||||||
strcpy(symbol->errtxt, "470: Specified symbol size too small for data");
|
strcpy(symbol->errtxt, "470: Specified symbol size too small for data");
|
||||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||||
return ZINT_ERROR_INVALID_OPTION;
|
return ZINT_ERROR_INVALID_OPTION;
|
||||||
} else {
|
|
||||||
symbol->option_2 = 0;
|
|
||||||
error_number = ZINT_WARN_INVALID_OPTION;
|
|
||||||
}
|
}
|
||||||
|
symbol->option_2 = 0;
|
||||||
|
error_number = ZINT_WARN_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((symbol->option_2 == 3) && (mclength > 82)) {
|
if ((symbol->option_2 == 3) && (mclength > 82)) {
|
||||||
@ -989,10 +984,9 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
|||||||
strcpy(symbol->errtxt, "471: Specified symbol size too small for data");
|
strcpy(symbol->errtxt, "471: Specified symbol size too small for data");
|
||||||
if (symbol->warn_level == WARN_FAIL_ALL) {
|
if (symbol->warn_level == WARN_FAIL_ALL) {
|
||||||
return ZINT_ERROR_INVALID_OPTION;
|
return ZINT_ERROR_INVALID_OPTION;
|
||||||
} else {
|
|
||||||
symbol->option_2 = 0;
|
|
||||||
error_number = ZINT_WARN_INVALID_OPTION;
|
|
||||||
}
|
}
|
||||||
|
symbol->option_2 = 0;
|
||||||
|
error_number = ZINT_WARN_INVALID_OPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (symbol->option_2 == 1) {
|
if (symbol->option_2 == 1) {
|
||||||
@ -1098,7 +1092,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
|||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
printf("\nChoose symbol size:\n");
|
printf("\nChoose symbol size:\n");
|
||||||
printf("%d columns x %d rows\n", symbol->option_2, symbol->rows);
|
printf("%d columns x %d rows, variant %d\n", symbol->option_2, symbol->rows, variant + 1);
|
||||||
printf("%d data codewords (including %d pads), %d ecc codewords\n", longueur, i, k);
|
printf("%d data codewords (including %d pads), %d ecc codewords\n", longueur, i, k);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@ -1135,7 +1129,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
printf("Encoded Data Stream with ECC:\n");
|
printf("Encoded Data Stream with ECC (%d):\n", mclength);
|
||||||
for (i = 0; i < mclength; i++) {
|
for (i = 0; i < mclength; i++) {
|
||||||
printf("%3d ", chainemc[i]);
|
printf("%3d ", chainemc[i]);
|
||||||
}
|
}
|
||||||
|
@ -701,6 +701,8 @@ INTERNAL int japan_post(struct zint_symbol *symbol, unsigned char source[], int
|
|||||||
}
|
}
|
||||||
strcat(pattern, JapanTable[posn(KASUTSET, check_char)]);
|
strcat(pattern, JapanTable[posn(KASUTSET, check_char)]);
|
||||||
|
|
||||||
|
if (symbol->debug & ZINT_DEBUG_PRINT) printf("Check: %d, char: %c\n", check, check_char);
|
||||||
|
|
||||||
strcat(pattern, "31"); /* Stop */
|
strcat(pattern, "31"); /* Stop */
|
||||||
|
|
||||||
/* Resolve pattern to 4-state symbols */
|
/* Resolve pattern to 4-state symbols */
|
||||||
|
@ -2700,8 +2700,8 @@ INTERNAL int upnqr(struct zint_symbol *symbol, unsigned char source[], int lengt
|
|||||||
mode[i] = 'B';
|
mode[i] = 'B';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GS1_MODE:
|
case GS1_MODE: /* Should never happen as checked before being called */
|
||||||
strcpy(symbol->errtxt, "571: UPNQR does not support GS-1 encoding");
|
strcpy(symbol->errtxt, "571: UPNQR does not support GS-1 encoding"); /* Not reached */
|
||||||
return ZINT_ERROR_INVALID_OPTION;
|
return ZINT_ERROR_INVALID_OPTION;
|
||||||
break;
|
break;
|
||||||
case UNICODE_MODE:
|
case UNICODE_MODE:
|
||||||
|
@ -1706,7 +1706,97 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"1011110100111010100000"
|
"1011110100111010100000"
|
||||||
"0001111010001000110010"
|
"0001111010001000110010"
|
||||||
},
|
},
|
||||||
/* 57*/ { -1, -1, -1, "123456789012345", -1, 0, 16, 18, 1, "5 DECIMAL triplets, ASCII switch before padding (2)",
|
/* 57*/ { -1, -1, -1, "\015*>\015*>\015*>ABC", -1, 0, 16, 18, 1, "3 EDI triplets + 3 alphas (EDI)",
|
||||||
|
"111011000000100000"
|
||||||
|
"111010000010110000"
|
||||||
|
"001010000000100101"
|
||||||
|
"101110000010111001"
|
||||||
|
"111010111100100000"
|
||||||
|
"000010000000100000"
|
||||||
|
"111111111111111111"
|
||||||
|
"000000000000000000"
|
||||||
|
"011111111111111110"
|
||||||
|
"010000000000000010"
|
||||||
|
"011111111111111110"
|
||||||
|
"100111111111100110"
|
||||||
|
"111001010000100011"
|
||||||
|
"011001101110101101"
|
||||||
|
"010011011100100111"
|
||||||
|
"000001001101111001"
|
||||||
|
},
|
||||||
|
/* 58*/ { -1, -1, -1, "\015*>\015*>\015*>1234567", -1, 0, 22, 22, 1, "3 EDI triplets + 7 digits ending (EDI)",
|
||||||
|
"1110110000001000000010"
|
||||||
|
"1110100000101100001011"
|
||||||
|
"0000100010001000110011"
|
||||||
|
"0000101011000010000011"
|
||||||
|
"0111101111001110001000"
|
||||||
|
"0011101111100000010001"
|
||||||
|
"1000101000100010000000"
|
||||||
|
"0000100000000000100000"
|
||||||
|
"1111111111111111111111"
|
||||||
|
"0000000000000000000000"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0001000100010001100101"
|
||||||
|
"1011111111111010100100"
|
||||||
|
"1000111100110000100110"
|
||||||
|
"0010100010010111101000"
|
||||||
|
"0101100111000110101001"
|
||||||
|
"0110011101010010101010"
|
||||||
|
"0101111011000100110001"
|
||||||
|
},
|
||||||
|
/* 59*/ { -1, -1, -1, "\015*>\015*>\015*>12345678", -1, 0, 22, 22, 1, "3 EDI triplets + 8 digits ending -> DECIMAL",
|
||||||
|
"1110110000001000000010"
|
||||||
|
"1110100000101100001011"
|
||||||
|
"0000100010111110001010"
|
||||||
|
"0000101011111111100100"
|
||||||
|
"1011101101100010001000"
|
||||||
|
"1010100000000100010001"
|
||||||
|
"1000101000100010001110"
|
||||||
|
"0000100000000000100000"
|
||||||
|
"1111111111111111111111"
|
||||||
|
"0000000000000000000000"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0001000100010001101101"
|
||||||
|
"1101011110111101100011"
|
||||||
|
"1100101101000111100010"
|
||||||
|
"1000010100101111100101"
|
||||||
|
"0110001001101100100110"
|
||||||
|
"1101100100110011101111"
|
||||||
|
"1001110001001011110010"
|
||||||
|
},
|
||||||
|
/* 60*/ { -1, -1, -1, "\015*>\015*>\015*>123456789012\015*>", -1, 0, 22, 22, 1, "3 EDI triplets + 12 DECIMAL not ending -> DECIMAL",
|
||||||
|
"1110110000001000000010"
|
||||||
|
"1110100000101100001011"
|
||||||
|
"0000100010111110001010"
|
||||||
|
"0000101011111111100100"
|
||||||
|
"1011101101110110000000"
|
||||||
|
"1010100000110011101110"
|
||||||
|
"0010100011100010001010"
|
||||||
|
"0000100000000000100000"
|
||||||
|
"1111111111111111111111"
|
||||||
|
"0000000000000000000000"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"1011111100010001100011"
|
||||||
|
"0111101001010000100101"
|
||||||
|
"0010110110010110101010"
|
||||||
|
"1100111001111011100010"
|
||||||
|
"1000011000100100101001"
|
||||||
|
"1110010110011011100001"
|
||||||
|
"1100100100000011111100"
|
||||||
|
},
|
||||||
|
/* 61*/ { -1, -1, -1, "123456789012345", -1, 0, 16, 18, 1, "5 DECIMAL triplets, ASCII switch before padding (2)",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101111"
|
"100010110101101111"
|
||||||
@ -1724,7 +1814,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"100010110110101011"
|
"100010110110101011"
|
||||||
"111111011010110001"
|
"111111011010110001"
|
||||||
},
|
},
|
||||||
/* 58*/ { -1, -1, -1, "1234567890123456", -1, 0, 16, 18, 1, "5 DECIMAL triplets + singlet, switch to ASCII before padding (2)",
|
/* 62*/ { -1, -1, -1, "1234567890123456", -1, 0, 16, 18, 1, "5 DECIMAL triplets + singlet, switch to ASCII before padding (2)",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101111"
|
"100010110101101111"
|
||||||
@ -1742,7 +1832,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"000101110010100011"
|
"000101110010100011"
|
||||||
"010101000001110111"
|
"010101000001110111"
|
||||||
},
|
},
|
||||||
/* 59*/ { -1, -1, -1, "12345678901234567", -1, 0, 16, 18, 1, "5 DECIMAL triplets + doublet, switch before ASCII encoding of final char, padding (1)",
|
/* 63*/ { -1, -1, -1, "12345678901234567", -1, 0, 16, 18, 1, "5 DECIMAL triplets + doublet, switch before ASCII encoding of final char, padding (1)",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101111"
|
"100010110101101111"
|
||||||
@ -1760,7 +1850,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"011100000111101100"
|
"011100000111101100"
|
||||||
"100010110100110100"
|
"100010110100110100"
|
||||||
},
|
},
|
||||||
/* 60*/ { -1, -1, -1, "123456789012345678", -1, 0, 16, 18, 1, "6 DECIMAL triplets, switch to ASCII, padding (1)",
|
/* 64*/ { -1, -1, -1, "123456789012345678", -1, 0, 16, 18, 1, "6 DECIMAL triplets, switch to ASCII, padding (1)",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101010"
|
"100010110101101010"
|
||||||
@ -1778,7 +1868,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"101110000010100101"
|
"101110000010100101"
|
||||||
"011010011110111101"
|
"011010011110111101"
|
||||||
},
|
},
|
||||||
/* 61*/ { -1, -1, -1, "1234567890123456789", -1, 0, 16, 18, 1, "6 DECIMAL triplets + singlet, switch before ASCII encoding of singlet, no padding",
|
/* 65*/ { -1, -1, -1, "1234567890123456789", -1, 0, 16, 18, 1, "6 DECIMAL triplets + singlet, switch before ASCII encoding of singlet, no padding",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101010"
|
"100010110101101010"
|
||||||
@ -1796,7 +1886,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"011001101011100100"
|
"011001101011100100"
|
||||||
"101110111011110000"
|
"101110111011110000"
|
||||||
},
|
},
|
||||||
/* 62*/ { -1, -1, -1, "12345678901234567890", -1, 0, 16, 18, 1, "6 DECIMAL triplets + doublet, switch before ASCII 2-digit encoding of doublet, no padding",
|
/* 66*/ { -1, -1, -1, "12345678901234567890", -1, 0, 16, 18, 1, "6 DECIMAL triplets + doublet, switch before ASCII 2-digit encoding of doublet, no padding",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101010"
|
"100010110101101010"
|
||||||
@ -1814,7 +1904,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"111110100110101101"
|
"111110100110101101"
|
||||||
"001000111011111111"
|
"001000111011111111"
|
||||||
},
|
},
|
||||||
/* 63*/ { -1, -1, -1, "123456789012345678901", -1, 0, 16, 18, 1, "7 DECIMAL triplets, fills to final codeword, no padding",
|
/* 67*/ { -1, -1, -1, "123456789012345678901", -1, 0, 16, 18, 1, "7 DECIMAL triplets, fills to final codeword, no padding",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101010"
|
"100010110101101010"
|
||||||
@ -1832,7 +1922,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"111000110101100101"
|
"111000110101100101"
|
||||||
"110001100000110100"
|
"110001100000110100"
|
||||||
},
|
},
|
||||||
/* 64*/ { -1, -1, -1, "1234567890123456789012", -1, 0, 16, 18, 1, "7 DECIMAL triplets + singlet, fills to final codeword, no padding",
|
/* 68*/ { -1, -1, -1, "1234567890123456789012", -1, 0, 16, 18, 1, "7 DECIMAL triplets + singlet, fills to final codeword, no padding",
|
||||||
"111111111111001100"
|
"111111111111001100"
|
||||||
"000110000110010101"
|
"000110000110010101"
|
||||||
"100010110101101010"
|
"100010110101101010"
|
||||||
@ -1850,7 +1940,61 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"100111000001100000"
|
"100111000001100000"
|
||||||
"101000001010111101"
|
"101000001010111101"
|
||||||
},
|
},
|
||||||
/* 65*/ { -1, -1, 10, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", -1, 0, 16, 49, 1, "T-48 90",
|
/* 69*/ { -1, -1, -1, "123456789012345678901234567890123678901AB", -1, 0, 28, 32, 1, "DECIMAL + 4 bits ASCII switch",
|
||||||
|
"11111111111100110010001101110110"
|
||||||
|
"00011000011001010100000101101010"
|
||||||
|
"10101011101000101111100111100001"
|
||||||
|
"01111000011110100000111011101111"
|
||||||
|
"00101001110001111101000100101000"
|
||||||
|
"10101011101011111100100011100001"
|
||||||
|
"10001010001000100010001000101000"
|
||||||
|
"00011000010001000100010001100001"
|
||||||
|
"10001010001000100010001000101000"
|
||||||
|
"00011000010001000100010001100001"
|
||||||
|
"00001000000000000000000000100000"
|
||||||
|
"11111111111111111111111111111111"
|
||||||
|
"00000000000000000000000000100000"
|
||||||
|
"11111111111111111111111111111111"
|
||||||
|
"00000000000000000000000000000000"
|
||||||
|
"01111111111111111111111111111110"
|
||||||
|
"01000000000000000000000000000010"
|
||||||
|
"01111111111111111111111111111110"
|
||||||
|
"10001010001000100010001000101000"
|
||||||
|
"00011000010001000100010001100001"
|
||||||
|
"10001010000110111001100000101011"
|
||||||
|
"00011000011011000011101111101001"
|
||||||
|
"11111001011001010000010011100010"
|
||||||
|
"10111001000000011101101001100000"
|
||||||
|
"10111010100111101101110011101010"
|
||||||
|
"10011010100110001011101000100101"
|
||||||
|
"11011010001110110010110100101110"
|
||||||
|
"01011111010001011011010000110111"
|
||||||
|
},
|
||||||
|
/* 70*/ { -1, -1, -1, "123456789012345678901234567890123678901234A", -1, 0, 22, 22, 0, "DECIMAL + single ASCII in last 8 bits; BWIPP different encodation TODO: investigate",
|
||||||
|
"1111111111110011001000"
|
||||||
|
"0001100001100101010000"
|
||||||
|
"1101100110101011101000"
|
||||||
|
"0101101010011100011110"
|
||||||
|
"1011101110011100010010"
|
||||||
|
"1000100011101111111010"
|
||||||
|
"0111100001111001000001"
|
||||||
|
"0000100000000000100000"
|
||||||
|
"1111111111111111111111"
|
||||||
|
"0000000000000000000000"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"1110100010110010101000"
|
||||||
|
"0110010011100000100000"
|
||||||
|
"0100100111101100101110"
|
||||||
|
"1010101110111110101001"
|
||||||
|
"1001001001100100101101"
|
||||||
|
"1111110100001111101111"
|
||||||
|
"0100010100010000111100"
|
||||||
|
},
|
||||||
|
/* 71*/ { -1, -1, 10, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", -1, 0, 16, 49, 1, "T-48 90",
|
||||||
"1111111111001100100011011011010101110100010111110"
|
"1111111111001100100011011011010101110100010111110"
|
||||||
"0001000110010101000001010101001110001111010000011"
|
"0001000110010101000001010101001110001111010000011"
|
||||||
"0111000100011001010100000010110100111000111101000"
|
"0111000100011001010100000010110100111000111101000"
|
||||||
@ -1868,10 +2012,10 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"1000000000000000000000001000000000000000000000001"
|
"1000000000000000000000001000000000000000000000001"
|
||||||
"1011111111111111111111111111111111111111111111101"
|
"1011111111111111111111111111111111111111111111101"
|
||||||
},
|
},
|
||||||
/* 66*/ { -1, -1, 10, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", -1, ZINT_ERROR_TOO_LONG, 0, 0, 1, "T-48 89",
|
/* 72*/ { -1, -1, 10, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", -1, ZINT_ERROR_TOO_LONG, 0, 0, 1, "T-48 89",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
/* 67*/ { -1, -1, -1, "A123456789012345678901A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + ASCII",
|
/* 73*/ { -1, -1, -1, "A123456789012345678901A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + ASCII",
|
||||||
"0100111111111111001100"
|
"0100111111111111001100"
|
||||||
"0010100001000110010101"
|
"0010100001000110010101"
|
||||||
"1000101101011010101110"
|
"1000101101011010101110"
|
||||||
@ -1895,7 +2039,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"1010001010001011101101"
|
"1010001010001011101101"
|
||||||
"1101101001100001110101"
|
"1101101001100001110101"
|
||||||
},
|
},
|
||||||
/* 68*/ { -1, -1, -1, "A1234567890123456789012A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + singlet + ASCII",
|
/* 74*/ { -1, -1, -1, "A1234567890123456789012A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + singlet + ASCII",
|
||||||
"0100111111111111001100"
|
"0100111111111111001100"
|
||||||
"0010100001000110010101"
|
"0010100001000110010101"
|
||||||
"1000101101011010101110"
|
"1000101101011010101110"
|
||||||
@ -1919,7 +2063,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"0101101010001000100111"
|
"0101101010001000100111"
|
||||||
"1110011111011111110100"
|
"1110011111011111110100"
|
||||||
},
|
},
|
||||||
/* 69*/ { -1, -1, -1, "A12345678901234567890123A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + doublet + ASCII",
|
/* 75*/ { -1, -1, -1, "A12345678901234567890123A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + doublet + ASCII",
|
||||||
"0100111111111111001100"
|
"0100111111111111001100"
|
||||||
"0010100001000110010101"
|
"0010100001000110010101"
|
||||||
"1000101101011010101110"
|
"1000101101011010101110"
|
||||||
@ -1943,7 +2087,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"0001111010010111100010"
|
"0001111010010111100010"
|
||||||
"0001001001000000110100"
|
"0001001001000000110100"
|
||||||
},
|
},
|
||||||
/* 70*/ { -1, -1, -1, "ABCDEFGHI123456789012A", -1, 0, 22, 22, 1, "3 C40 triplets + 4 DECIMAL triplets + ASCII 0 padding",
|
/* 76*/ { -1, -1, -1, "ABCDEFGHI123456789012A", -1, 0, 22, 22, 1, "3 C40 triplets + 4 DECIMAL triplets + ASCII 0 padding",
|
||||||
"1110110101111001100010"
|
"1110110101111001100010"
|
||||||
"0110101001100111010100"
|
"0110101001100111010100"
|
||||||
"1000100101111110001010"
|
"1000100101111110001010"
|
||||||
@ -1967,7 +2111,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"0011001101000011100011"
|
"0011001101000011100011"
|
||||||
"0100110101010110111011"
|
"0100110101010110111011"
|
||||||
},
|
},
|
||||||
/* 71*/ { -1, -1, -1, "ABCDEFGHI12345678", -1, 0, 22, 22, 1, "3 C40 triplets + ASCII 2-digits end-of-data",
|
/* 77*/ { -1, -1, -1, "ABCDEFGHI12345678", -1, 0, 22, 22, 1, "3 C40 triplets + ASCII 2-digits end-of-data",
|
||||||
"1110110101111001100010"
|
"1110110101111001100010"
|
||||||
"0110101001100111010100"
|
"0110101001100111010100"
|
||||||
"1000100101111110001010"
|
"1000100101111110001010"
|
||||||
@ -1991,7 +2135,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"1010111111111110101011"
|
"1010111111111110101011"
|
||||||
"1101101100101010110101"
|
"1101101100101010110101"
|
||||||
},
|
},
|
||||||
/* 72*/ { -1, -1, -1, "ABCDEFGH123456789012345678901A", -1, 0, 22, 22, 1, "2 C40 triplets + doublet + ASCII 2-digits ASCII 0 padding",
|
/* 78*/ { -1, -1, -1, "ABCDEFGH123456789012345678901A", -1, 0, 22, 22, 1, "2 C40 triplets + doublet + ASCII 2-digits ASCII 0 padding",
|
||||||
"1110110101111001100010"
|
"1110110101111001100010"
|
||||||
"0110101001100111010100"
|
"0110101001100111010100"
|
||||||
"1000100100111110011010"
|
"1000100100111110011010"
|
||||||
@ -2015,7 +2159,31 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"0010110111111111101111"
|
"0010110111111111101111"
|
||||||
"1010010000100000110111"
|
"1010010000100000110111"
|
||||||
},
|
},
|
||||||
/* 73*/ { -1, -1, -1, "\200\200", -1, 0, 16, 18, 1, "BYTE",
|
/* 79*/ { -1, -1, -1, "\101\102\103\104\105\106\107\110\111\112\113\200", -1, 0, 22, 22, 1, "3 C40 triplets + doublet + extended ASCII - note extended ASCII not encodable in C40 mode",
|
||||||
|
"1110110101111001100010"
|
||||||
|
"0110101001100111010100"
|
||||||
|
"1000100101100110001011"
|
||||||
|
"0000101111001100101011"
|
||||||
|
"1000101111100010001000"
|
||||||
|
"0001101111000100010001"
|
||||||
|
"1000101000100010000001"
|
||||||
|
"0000100000000000100000"
|
||||||
|
"1111111111111111111111"
|
||||||
|
"0000000000000000000000"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0100000000000000000010"
|
||||||
|
"0111111111111111111110"
|
||||||
|
"0001000100010001101001"
|
||||||
|
"1001001101110100100010"
|
||||||
|
"1111100010000001101100"
|
||||||
|
"0000001011000000100010"
|
||||||
|
"0010111110100000100000"
|
||||||
|
"1010000101100100100110"
|
||||||
|
"0101111100110010110010"
|
||||||
|
},
|
||||||
|
/* 80*/ { -1, -1, -1, "\200\200", -1, 0, 16, 18, 1, "BYTE",
|
||||||
"111011000010001000"
|
"111011000010001000"
|
||||||
"011110001000000000"
|
"011110001000000000"
|
||||||
"100010100010001000"
|
"100010100010001000"
|
||||||
@ -2033,7 +2201,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"010011001011100111"
|
"010011001011100111"
|
||||||
"110100011101110111"
|
"110100011101110111"
|
||||||
},
|
},
|
||||||
/* 74*/ { -1, -1, -1, "\200\200\200\200\200\200\200\200", -1, 0, 16, 18, 1, "BYTE (no padding, byte count 0)",
|
/* 81*/ { -1, -1, -1, "\200\200\200\200\200\200\200\200", -1, 0, 16, 18, 1, "BYTE (no padding, byte count 0)",
|
||||||
"111011000010001000"
|
"111011000010001000"
|
||||||
"011110000000000000"
|
"011110000000000000"
|
||||||
"100010100010001000"
|
"100010100010001000"
|
||||||
@ -2051,7 +2219,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"111101011011100111"
|
"111101011011100111"
|
||||||
"101110100100111000"
|
"101110100100111000"
|
||||||
},
|
},
|
||||||
/* 75*/ { -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\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "249 BYTEs + 13 DECIMAL",
|
/* 82*/ { -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\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "249 BYTEs + 13 DECIMAL",
|
||||||
"1110111111100010001000100011100010001000100010001110001000100010001000111000"
|
"1110111111100010001000100011100010001000100010001110001000100010001000111000"
|
||||||
"0111101001000000000000000010000000000000000000001000000000000000000000100000"
|
"0111101001000000000000000010000000000000000000001000000000000000000000100000"
|
||||||
"1000101000100010001000100010100010001000100010001010001000100010001000101000"
|
"1000101000100010001000100010100010001000100010001010001000100010001000101000"
|
||||||
@ -2123,7 +2291,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"0000101101010101000011010110011110110100100111111011100001010010000111100100"
|
"0000101101010101000011010110011110110100100111111011100001010010000111100100"
|
||||||
"1101111110001011101100010011101010100111101110111101101000010100111000111001"
|
"1101111110001011101100010011101010100111101110111101101000010100111000111001"
|
||||||
},
|
},
|
||||||
/* 76*/ { -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\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "250 BYTEs + 13 DECIMAL",
|
/* 83*/ { -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\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "250 BYTEs + 13 DECIMAL",
|
||||||
"1110111111000010001000100011100010001000100010001110001000100010001000111000"
|
"1110111111000010001000100011100010001000100010001110001000100010001000111000"
|
||||||
"0111101010000000000000000010000000000000000000001000000000000000000000100000"
|
"0111101010000000000000000010000000000000000000001000000000000000000000100000"
|
||||||
"1000101000100010001000100010100010001000100010001010001000100010001000101000"
|
"1000101000100010001000100010100010001000100010001010001000100010001000101000"
|
||||||
@ -2195,7 +2363,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"1111101101101101100101000110010011000011110001101001001011010001000001100100"
|
"1111101101101101100101000110010011000011110001101001001011010001000001100100"
|
||||||
"1110110001110110001100000011110011001110000101001111000111011001010011111110"
|
"1110110001110110001100000011110011001110000101001111000111011001010011111110"
|
||||||
},
|
},
|
||||||
/* 77*/ { -1, -1, -1, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\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\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 501 BYTEs + 13 DECIMAL",
|
/* 84*/ { -1, -1, -1, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\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\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 501 BYTEs + 13 DECIMAL",
|
||||||
"11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
|
"11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
|
||||||
"00010010011001010100000101110010011100011111011110101100010000000000010000000000000000000010000000"
|
"00010010011001010100000101110010011100011111011110101100010000000000010000000000000000000010000000"
|
||||||
"10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
|
"10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
|
||||||
@ -2301,7 +2469,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"11001110100000010100001001010010000101101110100110101100011011001110010101111001100100110010001101"
|
"11001110100000010100001001010010000101101110100110101100011011001110010101111001100100110010001101"
|
||||||
"01110011001111110111010101111010111001011100001111011101001011010000011011001100100000101011000101"
|
"01110011001111110111010101111010111001011100001111011101001011010000011011001100100000101011000101"
|
||||||
},
|
},
|
||||||
/* 78*/ { -1, -1, -1, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\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\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\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\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 251 BYTEs + 21 DECIMAL + 252 BYTEs 13 DECIMAL",
|
/* 85*/ { -1, -1, -1, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\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\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\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\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 251 BYTEs + 21 DECIMAL + 252 BYTEs 13 DECIMAL",
|
||||||
"11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
|
"11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
|
||||||
"00010010011001010100000101110010011100011111011110101000010000000000010000000000000000000010000000"
|
"00010010011001010100000101110010011100011111011110101000010000000000010000000000000000000010000000"
|
||||||
"10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
|
"10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
|
||||||
@ -2407,7 +2575,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"01101010000000111001110100110111110011111001000110101010111111101011110001100001110101000110111101"
|
"01101010000000111001110100110111110011111001000110101010111111101011110001100001110101000110111101"
|
||||||
"01111111101011000101001010011010111100011101111011110000111111000110111010011101101111001111011011"
|
"01111111101011000101001010011010111100011101111011110000111111000110111010011101101111001111011011"
|
||||||
},
|
},
|
||||||
/* 79*/ { -1, 3, -1, "\351", -1, 0, 16, 18, 1, "é in ISO 8859-1",
|
/* 86*/ { -1, 3, -1, "\351", -1, 0, 16, 18, 1, "é in ISO 8859-1",
|
||||||
"100011010101011000"
|
"100011010101011000"
|
||||||
"000110110111010010"
|
"000110110111010010"
|
||||||
"100010100011100110"
|
"100010100011100110"
|
||||||
@ -2425,7 +2593,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"001010011001100100"
|
"001010011001100100"
|
||||||
"101100110110110101"
|
"101100110110110101"
|
||||||
},
|
},
|
||||||
/* 80*/ { -1, 899, -1, "\134\134\351\142\154\134\141\150\134", -1, 0, 28, 32, 1, "<bksh>ébl<bksh>ah<bksh>",
|
/* 87*/ { -1, 899, -1, "\134\134\351\142\154\134\141\150\134", -1, 0, 28, 32, 1, "<bksh>ébl<bksh>ah<bksh>",
|
||||||
"10001101010101100010001110110101"
|
"10001101010101100010001110110101"
|
||||||
"00011011011101001010100101101101"
|
"00011011011101001010100101101101"
|
||||||
"01011001010101111001100110100110"
|
"01011001010101111001100110100110"
|
||||||
@ -2455,7 +2623,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"11011011010100010100111000101011"
|
"11011011010100010100111000101011"
|
||||||
"11011110101110100011111110110011"
|
"11011110101110100011111110110011"
|
||||||
},
|
},
|
||||||
/* 81*/ { GS1_MODE, -1, -1, "[90]12[91]1234567890123A", -1, 0, 22, 22, 1, "Step B4",
|
/* 88*/ { GS1_MODE, -1, -1, "[90]12[91]1234567890123A", -1, 0, 22, 22, 1, "Step B4",
|
||||||
"1110111101100011101110"
|
"1110111101100011101110"
|
||||||
"1000101100111011000100"
|
"1000101100111011000100"
|
||||||
"0000101011111001110001"
|
"0000101011111001110001"
|
||||||
@ -2479,7 +2647,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"0100001001100001101110"
|
"0100001001100001101110"
|
||||||
"1110110100001101111001"
|
"1110110100001101111001"
|
||||||
},
|
},
|
||||||
/* 82*/ { GS1_MODE, -1, -1, "[90]12[91]12345", -1, 0, 16, 18, 1, "Step B5",
|
/* 89*/ { GS1_MODE, -1, -1, "[90]12[91]12345", -1, 0, 16, 18, 1, "Step B5",
|
||||||
"111011110110001110"
|
"111011110110001110"
|
||||||
"100010110011101100"
|
"100010110011101100"
|
||||||
"111010000010111101"
|
"111010000010111101"
|
||||||
@ -2497,6 +2665,54 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"011100010001100101"
|
"011100010001100101"
|
||||||
"101000101000110110"
|
"101000101000110110"
|
||||||
},
|
},
|
||||||
|
/* 90*/ { GS1_MODE, -1, -1, "[10]AB[90]ABCDEFGHIJKLMNOP[91]ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 28, 32, 1, "Step P",
|
||||||
|
"11101110000100010011101101111110"
|
||||||
|
"10001011000010001110001100100110"
|
||||||
|
"01011011100110001010000101101001"
|
||||||
|
"10011010011101010000001111100011"
|
||||||
|
"10011010101101101110000101100001"
|
||||||
|
"10101001100101010101000010100111"
|
||||||
|
"01101001010111100010001100101001"
|
||||||
|
"00001000100011110101101000101010"
|
||||||
|
"00001010100011110001111101101011"
|
||||||
|
"00111011011110000010010011100100"
|
||||||
|
"00001000000000000000000000100000"
|
||||||
|
"11111111111111111111111111111111"
|
||||||
|
"00000000000000000000000000100000"
|
||||||
|
"11111111111111111111111111111111"
|
||||||
|
"00000000000000000000000000000000"
|
||||||
|
"01111111111111111111111111111110"
|
||||||
|
"01000000000000000000000000000010"
|
||||||
|
"01111111111111111111111111111110"
|
||||||
|
"11101011101111010110001000101000"
|
||||||
|
"01101011111111101100010001100001"
|
||||||
|
"10001010000010110100001000100011"
|
||||||
|
"00011000011100110001011011100011"
|
||||||
|
"11001011010100110100000101100011"
|
||||||
|
"10111000010010101001100000100100"
|
||||||
|
"01101001000001010101110001100011"
|
||||||
|
"00011011010110111001110010100100"
|
||||||
|
"01111000010000110101101110100100"
|
||||||
|
"00011110111111111110101011110110"
|
||||||
|
},
|
||||||
|
/* 91*/ { GS1_MODE, -1, -1, "[11]121212", -1, 0, 16, 18, 1, "Start FNC1 and Decimal",
|
||||||
|
"111011000100000101"
|
||||||
|
"110010110011011111"
|
||||||
|
"110010001110001000"
|
||||||
|
"100110001100010001"
|
||||||
|
"100010100001011101"
|
||||||
|
"000010000000100000"
|
||||||
|
"111111111111111111"
|
||||||
|
"000000000000000000"
|
||||||
|
"011111111111111110"
|
||||||
|
"010000000000000010"
|
||||||
|
"011111111111111110"
|
||||||
|
"000100010100101010"
|
||||||
|
"101010101001100101"
|
||||||
|
"110011110100100111"
|
||||||
|
"000111100011101101"
|
||||||
|
"100101110101111101"
|
||||||
|
},
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
|
@ -416,6 +416,9 @@ static void test_ean128_input(int index, int generate, int debug) {
|
|||||||
/* 20*/ { GS1_MODE, "[90]1A[90]1", 0, 134, "(12) 104 102 25 16 17 33 102 25 99 1 65 106", "StartB FNC1 9 0 1 A FNC1 9 CodeC 01" },
|
/* 20*/ { GS1_MODE, "[90]1A[90]1", 0, 134, "(12) 104 102 25 16 17 33 102 25 99 1 65 106", "StartB FNC1 9 0 1 A FNC1 9 CodeC 01" },
|
||||||
/* 21*/ { GS1_MODE, "[90]12A[90]123", 0, 145, "(13) 105 102 90 12 100 33 102 25 99 1 23 25 106", "StartC FNC1 90 12 CodeB A FNC1 9 CodeC 01 23" },
|
/* 21*/ { GS1_MODE, "[90]12A[90]123", 0, 145, "(13) 105 102 90 12 100 33 102 25 99 1 23 25 106", "StartC FNC1 90 12 CodeB A FNC1 9 CodeC 01 23" },
|
||||||
/* 22*/ { GS1_MODE, "[90]123[90]A234[90]123", 0, 244, "(22) 105 102 90 12 100 19 99 102 90 100 33 18 99 34 102 100 25 99 1 23 37 106", "StartC FNC1 90 12 CodeB 3 CodeC FNC1 90 CodeB A 2 CodeC 34 FNC1 CodeB 9 CodeC 01 23" },
|
/* 22*/ { GS1_MODE, "[90]123[90]A234[90]123", 0, 244, "(22) 105 102 90 12 100 19 99 102 90 100 33 18 99 34 102 100 25 99 1 23 37 106", "StartC FNC1 90 12 CodeB 3 CodeC FNC1 90 CodeB A 2 CodeC 34 FNC1 CodeB 9 CodeC 01 23" },
|
||||||
|
/* 23*/ { GS1_MODE, "[90]12345A12345A", 0, 178, "(16) 105 102 90 12 34 100 21 33 17 99 23 45 100 33 59 106", "StartC FNC1 90 12 34 CodeB 5 A 1 CodeC 23 45 CodeB A [" },
|
||||||
|
/* 24*/ { GS1_MODE, "[01]12345678901231[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234", 0, 684, "(62) 105 102 1 12 34 56 78 90 12 31 90 12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 102 91", "Max length" },
|
||||||
|
/* 25*/ { GS1_MODE, "[01]12345678901231[90]123456789012345678901234567890[91]12345678901234567890123456789012345678901234567890123456789012345", ZINT_ERROR_TOO_LONG, 0, "Error 344: Input too long (60 symbol character maximum)", "" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -746,28 +749,31 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
/* 35*/ { BARCODE_GS1_128, GS1_MODE, "[90]ABCDEfGHI", 0, 1, 167, 0, "Shift A; BWIPP different encodation, same codeword count",
|
/* 35*/ { BARCODE_GS1_128, GS1_MODE, "[90]ABCDEfGHI", 0, 1, 167, 0, "Shift A; BWIPP different encodation, same codeword count",
|
||||||
"11010010000111101011101110010110010011101100101000110001000101100010001000110101100010001000110100010110000100110100010001100010100011000100010110010011101100011101011"
|
"11010010000111101011101110010110010011101100101000110001000101100010001000110101100010001000110100010110000100110100010001100010100011000100010110010011101100011101011"
|
||||||
},
|
},
|
||||||
/* 36*/ { BARCODE_EAN14, GS1_MODE, "4070071967072", 0, 1, 134, 1, "Verified manually against tec-it",
|
/* 36*/ { BARCODE_GS1_128, GS1_MODE, "[01]12345678901231[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234", 0, 1, 684, 1, "Max length",
|
||||||
|
"110100111001111010111011001101100101100111001000101100011100010110110000101001101111011010110011100110110001101101111011010110011100100010110001110001011011000010100110111101101011001110010001011000111000101101100001010011011110110101100111001000101100011100010110110000101001101111011011110101110111101101101011001110010001011000111000101101100001010011011110110101100111001000101100011100010110110000101001101111011010110011100100010110001110001011011000010100110111101101011001110010001011000111000101101100001010011011110110101100111001000101100011100010110110000101001101111011010110011100100010110001110001011011000010100110111101101011001110010001011000100011110101100011101011"
|
||||||
|
},
|
||||||
|
/* 37*/ { BARCODE_EAN14, GS1_MODE, "4070071967072", 0, 1, 134, 1, "Verified manually against tec-it",
|
||||||
"11010011100111101011101100110110011000101000101100001001001100010011001011100100001011001001100010011001001110110111001001100011101011"
|
"11010011100111101011101100110110011000101000101100001001001100010011001011100100001011001001100010011001001110110111001001100011101011"
|
||||||
},
|
},
|
||||||
/* 37*/ { BARCODE_NVE18, GS1_MODE, "40700000071967072", 0, 1, 156, 1, "Verified manually against tec-it",
|
/* 38*/ { BARCODE_NVE18, GS1_MODE, "40700000071967072", 0, 1, 156, 1, "Verified manually against tec-it",
|
||||||
"110100111001111010111011011001100110001010001011000010011011001100110110011001001100010011001011100100001011001001100010011001001110110111011101100011101011"
|
"110100111001111010111011011001100110001010001011000010011011001100110110011001001100010011001011100100001011001001100010011001001110110111011101100011101011"
|
||||||
},
|
},
|
||||||
/* 38*/ { BARCODE_HIBC_128, UNICODE_MODE, "83278F8G9H0J2G", 0, 1, 211, 1, "ANSI/HIBC 2.6 - 2016 Section 4.1, not same, uses different encoding (eg begins StartA instead of StartB)",
|
/* 39*/ { BARCODE_HIBC_128, UNICODE_MODE, "83278F8G9H0J2G", 0, 1, 211, 1, "ANSI/HIBC 2.6 - 2016 Section 4.1, not same, uses different encoding (eg begins StartA instead of StartB)",
|
||||||
"1101001000011000100100111010011001011101111011000110110110000101001011110111010001100010111010011001101000100011100101100110001010001001110110010110111000110011100101101000100010001001100111101010001100011101011"
|
"1101001000011000100100111010011001011101111011000110110110000101001011110111010001100010111010011001101000100011100101100110001010001001110110010110111000110011100101101000100010001001100111101010001100011101011"
|
||||||
},
|
},
|
||||||
/* 39*/ { BARCODE_HIBC_128, UNICODE_MODE, "A123BJC5D6E71", 0, 1, 200, 1, "ANSI/HIBC 2.6 - 2016 Figure 1, same",
|
/* 40*/ { BARCODE_HIBC_128, UNICODE_MODE, "A123BJC5D6E71", 0, 1, 200, 1, "ANSI/HIBC 2.6 - 2016 Figure 1, same",
|
||||||
"11010010000110001001001010001100010011100110110011100101100101110010001011000101101110001000100011011011100100101100010001100111010010001101000111011011101001110011011010001000110001101101100011101011"
|
"11010010000110001001001010001100010011100110110011100101100101110010001011000101101110001000100011011011100100101100010001100111010010001101000111011011101001110011011010001000110001101101100011101011"
|
||||||
},
|
},
|
||||||
/* 40*/ { BARCODE_HIBC_128, UNICODE_MODE, "$$52001510X3G", 0, 1, 178, 1, "ANSI/HIBC 2.6 - 2016 Figure 5, same",
|
/* 41*/ { BARCODE_HIBC_128, UNICODE_MODE, "$$52001510X3G", 0, 1, 178, 1, "ANSI/HIBC 2.6 - 2016 Figure 5, same",
|
||||||
"1101001000011000100100100100011001001000110010111011110110111000101101100110010111001100110010001001011110111011100010110110010111001101000100010110001000100011110101100011101011"
|
"1101001000011000100100100100011001001000110010111011110110111000101101100110010111001100110010001001011110111011100010110110010111001101000100010110001000100011110101100011101011"
|
||||||
},
|
},
|
||||||
/* 41*/ { BARCODE_DPD, UNICODE_MODE, "%000393206219912345678101040", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustrations 2, 7, 8, same; NOTE: correct HRT given by Illustration 7 only",
|
/* 42*/ { BARCODE_DPD, UNICODE_MODE, "%000393206219912345678101040", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustrations 2, 7, 8, same; NOTE: correct HRT given by Illustration 7 only",
|
||||||
"1101001000010001001100100111011001011101111011011001100110100010001100011011010011001000110111001001011101111010110011100100010110001110001011011000010100110010001001100100010011000101000101011110001100011101011"
|
"1101001000010001001100100111011001011101111011011001100110100010001100011011010011001000110111001001011101111010110011100100010110001110001011011000010100110010001001100100010011000101000101011110001100011101011"
|
||||||
},
|
},
|
||||||
/* 42*/ { BARCODE_DPD, UNICODE_MODE, "%007110601782532948375101276", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustration 6 **NOT SAME** HRT incorrect, also uses CodeA and inefficient encoding; verified against tec-it",
|
/* 43*/ { BARCODE_DPD, UNICODE_MODE, "%007110601782532948375101276", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustration 6 **NOT SAME** HRT incorrect, also uses CodeA and inefficient encoding; verified against tec-it",
|
||||||
"1101001000010001001100100111011001011101111010011000100110001001001001100100011001101100110000101001110010110011000110110100010111101011110010011000010010110010001001011001110011001010000100010111101100011101011"
|
"1101001000010001001100100111011001011101111010011000100110001001001001100100011001101100110000101001110010110011000110110100010111101011110010011000010010110010001001011001110011001010000100010111101100011101011"
|
||||||
},
|
},
|
||||||
/* 43*/ { BARCODE_DPD, UNICODE_MODE, "0123456789012345678901234567", 0, 1, 189, 1, "DPDAPPD 4.0.2 - Illustration 9, same (allowing for literal HRT)",
|
/* 44*/ { BARCODE_DPD, UNICODE_MODE, "0123456789012345678901234567", 0, 1, 189, 1, "DPDAPPD 4.0.2 - Illustration 9, same (allowing for literal HRT)",
|
||||||
"110100111001100110110011101101110101110110001000010110011011011110110011011001110110111010111011000100001011001101101111011001101100111011011101011101100010000101100101011110001100011101011"
|
"110100111001100110110011101101110101110110001000010110011011011110110011011001110110111010111011000100001011001101101111011001101100111011011101011101100010000101100101011110001100011101011"
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -166,20 +166,22 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
/* 2*/ { UNICODE_MODE, "12", -1, 0, 2, 70, "(10) 2 12 103 103 103 103 103 103 98 27", "ModeC 12 Pad (6)" },
|
/* 2*/ { UNICODE_MODE, "12", -1, 0, 2, 70, "(10) 2 12 103 103 103 103 103 103 98 27", "ModeC 12 Pad (6)" },
|
||||||
/* 3*/ { GS1_MODE, "[90]A", -1, 0, 2, 70, "(10) 3 25 16 33 103 103 103 103 83 20", "ModeBFNC1 9 0 A Pad (4)" },
|
/* 3*/ { GS1_MODE, "[90]A", -1, 0, 2, 70, "(10) 3 25 16 33 103 103 103 103 83 20", "ModeBFNC1 9 0 A Pad (4)" },
|
||||||
/* 4*/ { GS1_MODE, "[90]12", -1, 0, 2, 70, "(10) 4 90 12 103 103 103 103 103 79 62", "ModeCFNC1 90 12 Pad (5)" },
|
/* 4*/ { GS1_MODE, "[90]12", -1, 0, 2, 70, "(10) 4 90 12 103 103 103 103 103 79 62", "ModeCFNC1 90 12 Pad (5)" },
|
||||||
/* 5*/ { GS1_MODE | GS1PARENS_MODE, "(90)12", -1, 0, 2, 70, "(10) 4 90 12 103 103 103 103 103 79 62", "ModeCFNC1 90 12 Pad (5)" },
|
/* 5*/ { GS1_MODE, "[90]12[20]12", -1, 0, 2, 70, "(10) 4 90 12 102 20 12 103 103 9 72", "ModeCFNC1 90 12 FNC1 20 12 Pad (2)" },
|
||||||
/* 6*/ { UNICODE_MODE, "a0123456789", -1, 0, 2, 70, "(10) 5 65 1 23 45 67 89 103 27 86", "ModeC1SB a 01 23 45 67 89 Pad" },
|
/* 6*/ { GS1_MODE, "[90]123[20]12", -1, 0, 2, 70, "(15) 4 90 12 100 19 99 102 20 12 103 103 103 103 88 22", "ModeCFNC1 90 CodeB 3 CodeC FNC1 20 12 Pad (4)" },
|
||||||
/* 7*/ { UNICODE_MODE, "ab0123456789", -1, 0, 2, 70, "(10) 6 65 66 1 23 45 67 89 19 42", "ModeC2SB a b 01 23 45 67 89" },
|
/* 7*/ { GS1_MODE | GS1PARENS_MODE, "(90)12", -1, 0, 2, 70, "(10) 4 90 12 103 103 103 103 103 79 62", "ModeCFNC1 90 12 Pad (5)" },
|
||||||
/* 8*/ { UNICODE_MODE, "1234\037a", -1, 0, 2, 70, "(10) 2 12 34 101 95 98 65 103 67 53", "ModeC 12 34 CodeA US 1SB a Pad" },
|
/* 8*/ { UNICODE_MODE, "a0123456789", -1, 0, 2, 70, "(10) 5 65 1 23 45 67 89 103 27 86", "ModeC1SB a 01 23 45 67 89 Pad" },
|
||||||
/* 9*/ { UNICODE_MODE, "\000\037ß", 4, 0, 2, 70, "(10) 0 64 95 101 63 103 103 103 75 11", "ModeA NUL US FNC4 ß Pad (3)" },
|
/* 9*/ { UNICODE_MODE, "ab0123456789", -1, 0, 2, 70, "(10) 6 65 66 1 23 45 67 89 19 42", "ModeC2SB a b 01 23 45 67 89" },
|
||||||
/* 10*/ { UNICODE_MODE, "\000\037é", 4, 0, 2, 70, "(10) 0 64 95 101 98 73 103 103 75 6", "ModeA NUL US FNC4 1SB é Pad (2)" },
|
/* 10*/ { UNICODE_MODE, "1234\037a", -1, 0, 2, 70, "(10) 2 12 34 101 95 98 65 103 67 53", "ModeC 12 34 CodeA US 1SB a Pad" },
|
||||||
/* 11*/ { UNICODE_MODE, "\000\037éa", 5, 0, 2, 70, "(10) 0 64 95 100 100 73 65 103 99 69", "ModeA NUL US CodeB FNC4 é a Pad" },
|
/* 11*/ { UNICODE_MODE, "\000\037ß", 4, 0, 2, 70, "(10) 0 64 95 101 63 103 103 103 75 11", "ModeA NUL US FNC4 ß Pad (3)" },
|
||||||
/* 12*/ { UNICODE_MODE, "abß", -1, 0, 2, 70, "(10) 1 65 66 100 63 103 103 103 66 56", "ModeB a b FNC4 ß Pad (3)" },
|
/* 12*/ { UNICODE_MODE, "\000\037é", 4, 0, 2, 70, "(10) 0 64 95 101 98 73 103 103 75 6", "ModeA NUL US FNC4 1SB é Pad (2)" },
|
||||||
/* 13*/ { DATA_MODE, "\141\142\237", -1, 0, 2, 70, "(10) 1 65 66 100 98 95 103 103 6 71", "ModeB a b FNC4 1SA APC Pad (2)" },
|
/* 13*/ { UNICODE_MODE, "\000\037éa", 5, 0, 2, 70, "(10) 0 64 95 100 100 73 65 103 99 69", "ModeA NUL US CodeB FNC4 é a Pad" },
|
||||||
/* 14*/ { DATA_MODE, "\141\142\237\037", -1, 0, 2, 70, "(10) 1 65 66 101 101 95 95 103 72 93", "ModeB a b CodeA FNC4 APC US Pad" },
|
/* 14*/ { UNICODE_MODE, "abß", -1, 0, 2, 70, "(10) 1 65 66 100 63 103 103 103 66 56", "ModeB a b FNC4 ß Pad (3)" },
|
||||||
/* 15*/ { UNICODE_MODE, "ééé", -1, 0, 2, 70, "(10) 1 100 73 100 73 100 73 103 105 106", "ModeB FNC4 é FNC4 é FNC4 é Pad" },
|
/* 15*/ { DATA_MODE, "\141\142\237", -1, 0, 2, 70, "(10) 1 65 66 100 98 95 103 103 6 71", "ModeB a b FNC4 1SA APC Pad (2)" },
|
||||||
/* 16*/ { UNICODE_MODE, "aééééb", -1, 0, 3, 70, "(15) 8 65 100 73 100 73 100 73 100 73 66 103 103 39 83", "ModeB a FNC4 é (4) b Pad (2)" },
|
/* 16*/ { DATA_MODE, "\141\142\237\037", -1, 0, 2, 70, "(10) 1 65 66 101 101 95 95 103 72 93", "ModeB a b CodeA FNC4 APC US Pad" },
|
||||||
/* 17*/ { UNICODE_MODE, "aéééééb", -1, 0, 3, 70, "(15) 8 65 100 73 100 73 100 73 100 73 100 73 66 74 106", "ModeB a FNC4 é (5) b" },
|
/* 17*/ { UNICODE_MODE, "ééé", -1, 0, 2, 70, "(10) 1 100 73 100 73 100 73 103 105 106", "ModeB FNC4 é FNC4 é FNC4 é Pad" },
|
||||||
/* 18*/ { UNICODE_MODE, "aééééébcdeé", -1, 0, 4, 70, "(20) 15 65 100 73 100 73 100 73 100 73 100 73 66 67 68 69 100 73 14 69", "ModeB a FNC4 é (5) b c d e FNC4 é" },
|
/* 18*/ { UNICODE_MODE, "aééééb", -1, 0, 3, 70, "(15) 8 65 100 73 100 73 100 73 100 73 66 103 103 39 83", "ModeB a FNC4 é (4) b Pad (2)" },
|
||||||
|
/* 19*/ { UNICODE_MODE, "aéééééb", -1, 0, 3, 70, "(15) 8 65 100 73 100 73 100 73 100 73 100 73 66 74 106", "ModeB a FNC4 é (5) b" },
|
||||||
|
/* 20*/ { UNICODE_MODE, "aééééébcdeé", -1, 0, 4, 70, "(20) 15 65 100 73 100 73 100 73 100 73 100 73 66 67 68 69 100 73 14 69", "ModeB a FNC4 é (5) b c d e FNC4 é" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
|
@ -82,6 +82,66 @@ static void test_utf8_to_unicode(int index, int debug) {
|
|||||||
testFinish();
|
testFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_set_height(int index, int debug) {
|
||||||
|
|
||||||
|
struct item {
|
||||||
|
int rows;
|
||||||
|
int row_height[20];
|
||||||
|
float height;
|
||||||
|
|
||||||
|
float min_row_height;
|
||||||
|
float default_height;
|
||||||
|
float max_height;
|
||||||
|
int no_errtxt;
|
||||||
|
|
||||||
|
int ret;
|
||||||
|
float expected_height;
|
||||||
|
char *expected_errtxt;
|
||||||
|
char *comment;
|
||||||
|
};
|
||||||
|
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||||
|
struct item data[] = {
|
||||||
|
/* 0*/ { 0, { 0 }, 0, 0, 0, 0, 0, 0, 0.5, "", "" },
|
||||||
|
/* 1*/ { 2, { 1, 1 }, 2, 0, 0, 0, 0, 0, 2, "", "zero_count == 0, fixed height only" },
|
||||||
|
/* 2*/ { 2, { 1, 1 }, 2, 0, 0, 1, 1, ZINT_WARN_NONCOMPLIANT, 2, "", "zero_count == 0, height < max height" },
|
||||||
|
/* 3*/ { 2, { 1, 1 }, 2, 0, 0, 1, 0, ZINT_WARN_NONCOMPLIANT, 2, "248: Height not compliant with standards", "zero_count == 0, height < max height" },
|
||||||
|
/* 4*/ { 2, { 2, 0 }, 2, 0, 0, 0, 0, 0, 2.5, "", "zero_count != 0, height 2" },
|
||||||
|
/* 5*/ { 2, { 2, 0 }, 2, 1, 0, 0, 1, ZINT_WARN_NONCOMPLIANT, 2.5, "", "zero_count != 0, row_height < min_row_height" },
|
||||||
|
/* 6*/ { 2, { 2, 0 }, 2, 1, 0, 0, 0, ZINT_WARN_NONCOMPLIANT, 2.5, "247: Height not compliant with standards", "zero_count != 0, row_height < min_row_height" },
|
||||||
|
/* 7*/ { 2, { 2, 0 }, 0, 0, 20, 0, 0, 0, 22, "", "zero_count != 0, default_height 20" },
|
||||||
|
/* 8*/ { 2, { 2, 0 }, 20, 0, 20, 0, 0, 0, 20, "", "zero_count != 0, height 20" },
|
||||||
|
/* 9*/ { 2, { 2, 0 }, 0, 2, 0, 0, 0, 0, 4, "", "zero_count != 0, min_row_height 2" },
|
||||||
|
};
|
||||||
|
int data_size = ARRAY_SIZE(data);
|
||||||
|
int i, ret;
|
||||||
|
|
||||||
|
struct zint_symbol symbol;
|
||||||
|
|
||||||
|
testStart("set_height");
|
||||||
|
|
||||||
|
symbol.debug = debug;
|
||||||
|
|
||||||
|
for (i = 0; i < data_size; i++) {
|
||||||
|
int j;
|
||||||
|
|
||||||
|
if (index != -1 && i != index) continue;
|
||||||
|
|
||||||
|
memset(&symbol, 0, sizeof(symbol));
|
||||||
|
symbol.rows = data[i].rows;
|
||||||
|
for (j = 0; j < ARRAY_SIZE(data[i].row_height); j++) {
|
||||||
|
symbol.row_height[j] = data[i].row_height[j];
|
||||||
|
}
|
||||||
|
symbol.height = data[i].height;
|
||||||
|
|
||||||
|
ret = set_height(&symbol, data[i].min_row_height, data[i].default_height, data[i].max_height, data[i].no_errtxt);
|
||||||
|
assert_equal(ret, data[i].ret, "i:%d ret %d != %d\n", i, ret, data[i].ret);
|
||||||
|
assert_equal(symbol.height, data[i].expected_height, "i:%d symbol.height %g != %g\n", i, symbol.height, data[i].expected_height);
|
||||||
|
assert_zero(strcmp(symbol.errtxt, data[i].expected_errtxt), "i:%d errtxt %s != %s\n", i, symbol.errtxt, data[i].expected_errtxt);
|
||||||
|
}
|
||||||
|
|
||||||
|
testFinish();
|
||||||
|
}
|
||||||
|
|
||||||
static void test_is_valid_utf8(int index) {
|
static void test_is_valid_utf8(int index) {
|
||||||
|
|
||||||
struct item {
|
struct item {
|
||||||
@ -158,8 +218,9 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
|
testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */
|
||||||
{ "test_utf8_to_unicode", test_utf8_to_unicode, 1, 0, 1 },
|
{ "test_utf8_to_unicode", test_utf8_to_unicode, 1, 0, 1 },
|
||||||
{ "test_debug_test_codeword_dump_int", test_debug_test_codeword_dump_int, 1, 0, 1 },
|
{ "test_set_height", test_set_height, 1, 0, 1 },
|
||||||
{ "test_is_valid_utf8", test_is_valid_utf8, 1, 0, 0 },
|
{ "test_is_valid_utf8", test_is_valid_utf8, 1, 0, 0 },
|
||||||
|
{ "test_debug_test_codeword_dump_int", test_debug_test_codeword_dump_int, 1, 0, 1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
|
testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -540,6 +540,7 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
int eci;
|
int eci;
|
||||||
int option_2;
|
int option_2;
|
||||||
int option_3;
|
int option_3;
|
||||||
|
int output_options;
|
||||||
char *data;
|
char *data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -551,98 +552,105 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
char *comment;
|
char *comment;
|
||||||
};
|
};
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { UNICODE_MODE, 0, -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*/ { 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" },
|
||||||
/* 1*/ { UNICODE_MODE, 0, 5, -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", "" },
|
/* 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", "" },
|
||||||
/* 2*/ { UNICODE_MODE, 0, -1, -1, "0466010592130100000k*AGUATY8", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 E6 19 5C 07 B7 82 5F D4 3D 65 B5 97 30 00 FC 2C 4C 30 52", "" },
|
/* 2*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY8", 0, 0, 18, 18, 1, "(32) 86 C4 83 87 DE 8F 83 82 82 E6 19 5C 07 B7 82 5F D4 3D 65 B5 97 30 00 FC 2C 4C 30 52", "" },
|
||||||
/* 3*/ { UNICODE_MODE, 0, -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", "" },
|
/* 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", "" },
|
||||||
/* 4*/ { UNICODE_MODE, 0, 5, -1, "0466010592130100000k*AGUATY80U", ZINT_ERROR_TOO_LONG, -1, 0, 0, 0, "Error 522: Input too long for selected symbol size", "" },
|
/* 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", "" },
|
||||||
/* 5*/ { UNICODE_MODE, 0, 6, -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", "" },
|
/* 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", "" },
|
||||||
/* 6*/ { UNICODE_MODE, 0, -1, -1, "0466010592130100000k*AGUATY80UA", 0, 0, 20, 20, 0, "(40) 86 C4 83 87 DE 8F 83 82 82 E6 19 5C 07 B7 82 5F D4 3D 1E 5F FE 81 BB 90 01 2A 31 9F", "BWIPP different encodation" },
|
/* 6*/ { UNICODE_MODE, 0, -1, -1, -1, "0466010592130100000k*AGUATY80UA", 0, 0, 20, 20, 0, "(40) 86 C4 83 87 DE 8F 83 82 82 E6 19 5C 07 B7 82 5F D4 3D 1E 5F FE 81 BB 90 01 2A 31 9F", "BWIPP different encodation" },
|
||||||
/* 7*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 8*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 9*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 10*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 11*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 12*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 13*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 14*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 15*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 16*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 17*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 18*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 19*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 20*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 21*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 22*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 23*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 24*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 25*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 26*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 27*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 28*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 29*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 30*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 31*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 32*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 33*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 34*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 35*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 36*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 37*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 38*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 39*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 40*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 41*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 42*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 43*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 44*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 45*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 46*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 47*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 48*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 49*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 50*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 51*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 52*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 53*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 54*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 55*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 56*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 57*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 58*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 59*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 60*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 61*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 62*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 63*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 64*/ { UNICODE_MODE, 0, -1, DM_SQUARE, "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" },
|
/* 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" },
|
||||||
/* 65*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 66*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 67*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 68*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 69*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 70*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 71*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 72*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 73*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 74*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 75*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 76*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 77*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 78*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 79*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 80*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 81*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 82*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 83*/ { DATA_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 84*/ { DATA_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 85*/ { DATA_MODE, 3, -1, -1, "\101\102\103\104\300\105\310", 0, 3, 16, 16, 1, "F1 04 E7 5E 2D C4 5B F1 03 1D 36 81 64 0E C0 77 9A 18 52 B2 F9 F0 04 39", "ECI 4 BAS B41 B42 B43 B44 BC0 B45 BC8" },
|
/* 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" },
|
||||||
/* 86*/ { UNICODE_MODE, 26, -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" },
|
/* 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" },
|
||||||
/* 87*/ { UNICODE_MODE, 0, -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" },
|
/* 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" },
|
||||||
/* 88*/ { UNICODE_MODE, 127, -1, -1, "A", 0, 127, 12, 12, 1, "F1 80 01 42 81 14 A2 86 07 F5 27 30", "ECI 128 A41" },
|
/* 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" },
|
||||||
/* 89*/ { UNICODE_MODE, 16382, -1, -1, "A", 0, 16382, 12, 12, 1, "F1 BF FE 42 81 29 57 AA A0 92 B2 45", "ECI 16383 A41" },
|
/* 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" },
|
||||||
/* 90*/ { UNICODE_MODE, 810899, -1, -1, "A", 0, 810899, 12, 12, 1, "F1 CC 51 05 42 BB A5 A7 8A C6 6E 0F", "ECI 810900 A41" },
|
/* 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" },
|
||||||
/* 91*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, -1, "[)>\\R05\\GA\\R\\E", 0, 0, 10, 10, 1, "EC 42 81 5D 17 49 F6 B6", "Macro05 A41" },
|
/* 91*/ { DATA_MODE, 3, -1, -1, -1, "\101\102\103\104\300\105\310", 0, 3, 16, 16, 1, "F1 04 E7 5E 2D C4 5B F1 03 1D 36 81 64 0E C0 77 9A 18 52 B2 F9 F0 04 39", "ECI 4 BAS B41 B42 B43 B44 BC0 B45 BC8" },
|
||||||
|
/* 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" },
|
||||||
|
/* 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" },
|
||||||
|
/* 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" },
|
||||||
|
/* 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" },
|
||||||
|
/* 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" },
|
||||||
|
/* 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" },
|
||||||
|
/* 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" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -665,15 +673,15 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
|
|
||||||
symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
symbol->debug = ZINT_DEBUG_TEST; // Needed to get codeword dump in errtxt
|
||||||
|
|
||||||
length = testUtilSetSymbol(symbol, BARCODE_DATAMATRIX, data[i].input_mode, data[i].eci, -1 /*option_1*/, data[i].option_2, data[i].option_3, -1 /*output_options*/, data[i].data, -1, 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);
|
||||||
|
|
||||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||||
|
|
||||||
if (generate) {
|
if (generate) {
|
||||||
printf(" /*%3d*/ { %s, %d, %d, %s, \"%s\", %s, %d, %d, %d, %d, \"%s\", \"%s\" },\n",
|
printf(" /*%3d*/ { %s, %d, %d, %s, %s, \"%s\", %s, %d, %d, %d, %d, \"%s\", \"%s\" },\n",
|
||||||
i, testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_2, testUtilOption3Name(data[i].option_3),
|
i, testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_2, testUtilOption3Name(data[i].option_3),
|
||||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
testUtilOutputOptionsName(data[i].output_options), testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||||
testUtilErrorName(data[i].ret), ret < ZINT_ERROR ? symbol->eci : -1, symbol->rows, symbol->width, data[i].bwipp_cmp, symbol->errtxt, data[i].comment);
|
testUtilErrorName(data[i].ret), ret < ZINT_ERROR ? symbol->eci : -1, symbol->rows, symbol->width, data[i].bwipp_cmp, symbol->errtxt, data[i].comment);
|
||||||
} else {
|
} else {
|
||||||
if (ret < ZINT_ERROR) {
|
if (ret < ZINT_ERROR) {
|
||||||
@ -689,7 +697,7 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
|
if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
|
||||||
} else {
|
} else {
|
||||||
char modules_dump[8192];
|
char modules_dump[8192];
|
||||||
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump != -1\n", i);
|
assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
|
||||||
ret = testUtilBwipp(i, symbol, -1, data[i].option_2, data[i].option_3, data[i].data, length, NULL, bwipp_buf, sizeof(bwipp_buf));
|
ret = testUtilBwipp(i, symbol, -1, data[i].option_2, data[i].option_3, data[i].data, length, NULL, bwipp_buf, sizeof(bwipp_buf));
|
||||||
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ static void test_large(int index, int debug) {
|
|||||||
/* 1*/ { 200, '0', 2941, ZINT_ERROR_INVALID_OPTION },
|
/* 1*/ { 200, '0', 2941, ZINT_ERROR_INVALID_OPTION },
|
||||||
/* 2*/ { 200, '9', 200, 0 }, // Changes a number of mask scores re pre-Rev. 4 version, but best score still the same (7)
|
/* 2*/ { 200, '9', 200, 0 }, // Changes a number of mask scores re pre-Rev. 4 version, but best score still the same (7)
|
||||||
/* 3*/ { 201, '0', 2940, ZINT_ERROR_INVALID_OPTION },
|
/* 3*/ { 201, '0', 2940, ZINT_ERROR_INVALID_OPTION },
|
||||||
/* 4*/ { 30, '\001', 71, 0 }, // Codeword length 72, ECC length 39, for ND + 1 == 112
|
/* 4*/ { 201, '0', 2974, ZINT_ERROR_INVALID_OPTION }, // Height > 200 also
|
||||||
|
/* 5*/ { 30, '\001', 71, 0 }, // Codeword length 72, ECC length 39, for ND + 1 == 112
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -81,6 +82,7 @@ static void test_options(int index, int debug) {
|
|||||||
int input_mode;
|
int input_mode;
|
||||||
int output_options;
|
int output_options;
|
||||||
int option_2;
|
int option_2;
|
||||||
|
int option_3;
|
||||||
char *data;
|
char *data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -89,16 +91,17 @@ static void test_options(int index, int debug) {
|
|||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { -1, -1, -1, "1", 0, 9, 14 },
|
/* 0*/ { -1, -1, -1, -1, "1", 0, 9, 14 },
|
||||||
/* 1*/ { -1, -1, -1, "1234567890", 0, 12, 19 },
|
/* 1*/ { -1, -1, -1, -1, "1234567890", 0, 12, 19 },
|
||||||
/* 2*/ { -1, -1, 19, "1234567890", 0, 12, 19 },
|
/* 2*/ { -1, -1, 19, -1, "1234567890", 0, 12, 19 },
|
||||||
/* 3*/ { -1, -1, 12, "1234567890", 0, 19, 12 },
|
/* 3*/ { -1, -1, 12, -1, "1234567890", 0, 19, 12 },
|
||||||
/* 4*/ { -1, -1, 5, "1234567890", 0, 44, 5 },
|
/* 4*/ { -1, -1, 5, -1, "1234567890", 0, 44, 5 },
|
||||||
/* 5*/ { -1, -1, 4, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 }, // Cols < 5
|
/* 5*/ { -1, -1, 4, -1, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 }, // Cols < 5
|
||||||
/* 6*/ { -1, -1, 200, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 }, // Not enough data - height 3 too small
|
/* 6*/ { -1, -1, 200, -1, "1234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 }, // Not enough data - height 3 too small
|
||||||
/* 7*/ { -1, -1, 200, "1234567890123456789012345678901234567890", 0, 5, 200 }, // Cols 200 max
|
/* 7*/ { -1, -1, 200, -1, "1234567890123456789012345678901234567890", 0, 5, 200 }, // Cols 200 max
|
||||||
/* 8*/ { -1, -1, 200, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 7, 200 },
|
/* 8*/ { -1, -1, 200, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, 7, 200 },
|
||||||
/* 9*/ { -1, -1, 201, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 },
|
/* 9*/ { -1, -1, 201, -1, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", ZINT_ERROR_INVALID_OPTION, -1, -1 },
|
||||||
|
/* 10*/ { -1, -1, -1, 10 << 8, "1", 0, 9, 14 }, // Mask > 8 + 1 ignored
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -113,7 +116,7 @@ static void test_options(int index, int debug) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
length = testUtilSetSymbol(symbol, BARCODE_DOTCODE, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug);
|
length = testUtilSetSymbol(symbol, BARCODE_DOTCODE, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, data[i].option_3, data[i].output_options, data[i].data, -1, debug);
|
||||||
|
|
||||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||||
@ -148,36 +151,37 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
/* 4*/ { UNICODE_MODE, 899, "A", -1, 0, "6C 28 07 44 66 21", "" },
|
/* 4*/ { UNICODE_MODE, 899, "A", -1, 0, "6C 28 07 44 66 21", "" },
|
||||||
/* 5*/ { UNICODE_MODE, 12769, "A", -1, 0, "6C 28 70 49 66 21", "" },
|
/* 5*/ { UNICODE_MODE, 12769, "A", -1, 0, "6C 28 70 49 66 21", "" },
|
||||||
/* 6*/ { UNICODE_MODE, 811799, "A", -1, 0, "6C 67 40 50 66 21", "" },
|
/* 6*/ { UNICODE_MODE, 811799, "A", -1, 0, "6C 67 40 50 66 21", "" },
|
||||||
/* 7*/ { UNICODE_MODE, -1, "\000", 1, 0, "65 40", "LatchA (0x65) NUL" },
|
/* 7*/ { UNICODE_MODE, 811800, "A", -1, ZINT_ERROR_INVALID_OPTION, "", "" },
|
||||||
/* 8*/ { UNICODE_MODE, -1, "\010", -1, 0, "65 48", "LatchA (0x65) BS" },
|
/* 8*/ { UNICODE_MODE, -1, "\000", 1, 0, "65 40", "LatchA (0x65) NUL" },
|
||||||
/* 9*/ { UNICODE_MODE, -1, "\011", -1, 0, "65 49", "Lead special; LatchA (0x65) HT" },
|
/* 9*/ { UNICODE_MODE, -1, "\010", -1, 0, "65 48", "LatchA (0x65) BS" },
|
||||||
/* 10*/ { UNICODE_MODE, -1, "\034", -1, 0, "65 5C", "Lead special; LatchA (0x65) FS" },
|
/* 10*/ { UNICODE_MODE, -1, "\011", -1, 0, "65 49", "Lead special; LatchA (0x65) HT" },
|
||||||
/* 11*/ { UNICODE_MODE, -1, "\035", -1, 0, "65 5D", "Lead special; LatchA (0x65) GS" },
|
/* 11*/ { UNICODE_MODE, -1, "\034", -1, 0, "65 5C", "Lead special; LatchA (0x65) FS" },
|
||||||
/* 12*/ { UNICODE_MODE, -1, "\036", -1, 0, "65 5E", "Lead special; LatchA (0x65) RS" },
|
/* 12*/ { UNICODE_MODE, -1, "\035", -1, 0, "65 5D", "Lead special; LatchA (0x65) GS" },
|
||||||
/* 13*/ { UNICODE_MODE, -1, "\037", -1, 0, "65 5F", "LatchA (0x65) US" },
|
/* 13*/ { UNICODE_MODE, -1, "\036", -1, 0, "65 5E", "Lead special; LatchA (0x65) RS" },
|
||||||
/* 14*/ { UNICODE_MODE, -1, "\177", -1, 0, "66 5F", "ShiftB (0x66) DEL" },
|
/* 14*/ { UNICODE_MODE, -1, "\037", -1, 0, "65 5F", "LatchA (0x65) US" },
|
||||||
/* 15*/ { UNICODE_MODE, -1, "[)>\03605\035A\036\004", -1, 0, "6A 61 21", "[)>RS 05 GS A RS EOT; LatchB (0x6A) Macro97 (0x61) A" },
|
/* 15*/ { UNICODE_MODE, -1, "\177", -1, 0, "66 5F", "ShiftB (0x66) DEL" },
|
||||||
/* 16*/ { UNICODE_MODE, -1, "[)>\03606\035\011\034\035\036\036\004", -1, 0, "6A 62 61 62 63 64", "[)>RS 06 GS HT FS GS RS RS EOT; LatchB (0x6A) Macro98 (0x62) HT FS GS RS" },
|
/* 16*/ { UNICODE_MODE, -1, "[)>\03605\035A\036\004", -1, 0, "6A 61 21", "[)>RS 05 GS A RS EOT; LatchB (0x6A) Macro97 (0x61) A" },
|
||||||
/* 17*/ { UNICODE_MODE, -1, "[)>\03612\03512345\036\004", -1, 0, "6A 63 11 67 17 2D", "[)>RS 12 GS A RS EOT; LatchB (0x6A) Macro99 (0x63) 1 2xShiftC (0x67) 23 45" },
|
/* 17*/ { UNICODE_MODE, -1, "[)>\03606\035\011\034\035\036\036\004", -1, 0, "6A 62 61 62 63 64", "[)>RS 06 GS HT FS GS RS RS EOT; LatchB (0x6A) Macro98 (0x62) HT FS GS RS" },
|
||||||
/* 18*/ { UNICODE_MODE, -1, "[)>\03601Blah\004", -1, 0, "6A 64 10 11 22 4C 41 48", "[)>RS 01 Blah EOT; LatchB (0x6A) Macro100 (0x64) 0 1 B l a h" },
|
/* 18*/ { UNICODE_MODE, -1, "[)>\03612\03512345\036\004", -1, 0, "6A 63 11 67 17 2D", "[)>RS 12 GS A RS EOT; LatchB (0x6A) Macro99 (0x63) 1 2xShiftC (0x67) 23 45" },
|
||||||
/* 19*/ { UNICODE_MODE, -1, "[)>\03605\035A\004", -1, 0, "6A 64 10 15 63 21", "[)>RS 05 GS A EOT; LatchB (0x6A) Macro100 (0x64) 0 5 HT A" },
|
/* 19*/ { UNICODE_MODE, -1, "[)>\03601Blah\004", -1, 0, "6A 64 10 11 22 4C 41 48", "[)>RS 01 Blah EOT; LatchB (0x6A) Macro100 (0x64) 0 1 B l a h" },
|
||||||
/* 20*/ { UNICODE_MODE, -1, "[)>\03606A\004", -1, 0, "6A 64 10 16 21", "[)>RS 06 A EOT; LatchB (0x6A) Macro100 (0x64) 0 6 A" },
|
/* 20*/ { UNICODE_MODE, -1, "[)>\03605\035A\004", -1, 0, "6A 64 10 15 63 21", "[)>RS 05 GS A EOT; LatchB (0x6A) Macro100 (0x64) 0 5 HT A" },
|
||||||
/* 21*/ { UNICODE_MODE, -1, "[)>\036991\036\004", -1, 0, "6A 64 19 19 11 64", "[)>RS 99 1 RS EOT; LatchB (0x6A) Macro100 (0x64) 9 9 1 RS" },
|
/* 21*/ { UNICODE_MODE, -1, "[)>\03606A\004", -1, 0, "6A 64 10 16 21", "[)>RS 06 A EOT; LatchB (0x6A) Macro100 (0x64) 0 6 A" },
|
||||||
/* 22*/ { UNICODE_MODE, -1, "1712345610", -1, 0, "6B 64 0C 22 38", "FNC1 (0x6B) 17..10 12 34 56" },
|
/* 22*/ { UNICODE_MODE, -1, "[)>\036991\036\004", -1, 0, "6A 64 19 19 11 64", "[)>RS 99 1 RS EOT; LatchB (0x6A) Macro100 (0x64) 9 9 1 RS" },
|
||||||
/* 23*/ { GS1_MODE, -1, "[17]123456[10]123", -1, ZINT_WARN_NONCOMPLIANT, "64 0C 22 38 0C 66 13", "17..10 12 34 56 12 ShiftB (0x66) 3" },
|
/* 23*/ { UNICODE_MODE, -1, "1712345610", -1, 0, "6B 64 0C 22 38", "FNC1 (0x6B) 17..10 12 34 56" },
|
||||||
/* 24*/ { GS1_MODE, -1, "[90]ABC[90]abc[90]123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
/* 24*/ { GS1_MODE, -1, "[17]123456[10]123", -1, ZINT_WARN_NONCOMPLIANT, "64 0C 22 38 0C 66 13", "17..10 12 34 56 12 ShiftB (0x66) 3" },
|
||||||
/* 25*/ { GS1_MODE | GS1PARENS_MODE, -1, "(90)ABC(90)abc(90)123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
/* 25*/ { GS1_MODE, -1, "[90]ABC[90]abc[90]123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
||||||
/* 26*/ { UNICODE_MODE, -1, "99aA[{00\000", 9, 0, "6B 63 6A 41 21 3B 5B 10 10 65 40", "FNC1 (0x6B) 99 LatchB (0x6A) a A [ { 0 0 ShiftA (0x65) NUL" },
|
/* 26*/ { GS1_MODE | GS1PARENS_MODE, -1, "(90)ABC(90)abc(90)123", -1, 0, "5A 6A 21 22 23 6B 19 10 41 42 43 6B 19 67 01 17", "90 LatchB (0x6A) A B C FNC1 (0x6B) 9 0 a b c FNC1 (0x6B) 9 2xShitfC (0x67) 01 23" },
|
||||||
/* 27*/ { UNICODE_MODE, -1, "\015\012", -1, 0, "66 60", "ShiftB (0x66) CR/LF" },
|
/* 27*/ { UNICODE_MODE, -1, "99aA[{00\000", 9, 0, "6B 63 6A 41 21 3B 5B 10 10 65 40", "FNC1 (0x6B) 99 LatchB (0x6A) a A [ { 0 0 ShiftA (0x65) NUL" },
|
||||||
/* 28*/ { UNICODE_MODE, -1, "A\015\012", -1, 0, "67 21 60", "2xShiftB (0x67) A CR/LF" },
|
/* 28*/ { UNICODE_MODE, -1, "\015\012", -1, 0, "66 60", "ShiftB (0x66) CR/LF" },
|
||||||
/* 29*/ { UNICODE_MODE, -1, "\015\015\012", -1, 0, "65 4D 4D 4A", "LatchA (0x65) CR CR LF" },
|
/* 29*/ { UNICODE_MODE, -1, "A\015\012", -1, 0, "67 21 60", "2xShiftB (0x67) A CR/LF" },
|
||||||
/* 30*/ { UNICODE_MODE, -1, "ABCDE12345678", -1, 0, "6A 21 22 23 24 25 69 0C 22 38 4E", "LatchB (0x6A) A B C D 4xShiftC 12 34 56 78" },
|
/* 30*/ { UNICODE_MODE, -1, "\015\015\012", -1, 0, "65 4D 4D 4A", "LatchA (0x65) CR CR LF" },
|
||||||
/* 31*/ { UNICODE_MODE, -1, "\000ABCD1234567890", 15, 0, "65 40 21 22 23 24 6A 0C 22 38 4E 5A", "LatchA (0x65) NULL A B C D LatchC (0x6A) 12 34 56 78 90" },
|
/* 31*/ { UNICODE_MODE, -1, "ABCDE12345678", -1, 0, "6A 21 22 23 24 25 69 0C 22 38 4E", "LatchB (0x6A) A B C D 4xShiftC 12 34 56 78" },
|
||||||
/* 32*/ { DATA_MODE, -1, "\141\142\143\144\145\200\201\202\203\204\377", -1, 0, "6A 41 42 43 44 45 70 31 5A 35 21 5A 5F 02 31", "LatchB (0x6A) a b c d e BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x84 0xFF" },
|
/* 32*/ { UNICODE_MODE, -1, "\000ABCD1234567890", 15, 0, "65 40 21 22 23 24 6A 0C 22 38 4E 5A", "LatchA (0x65) NULL A B C D LatchC (0x6A) 12 34 56 78 90" },
|
||||||
/* 33*/ { DATA_MODE, -1, "\200\061\062\240\063\064\201\202\065\066", -1, 0, "6E 40 0C 6F 00 22 70 03 10 42 6E 15 16", "UpperShiftA (0x6E) NUL 12 UpperShiftB (0x6F) SP 34 BinaryLatch (0x70) 0x81 0x82 TermB (0x6E) 5 6" },
|
/* 33*/ { DATA_MODE, -1, "\141\142\143\144\145\200\201\202\203\204\377", -1, 0, "6A 41 42 43 44 45 70 31 5A 35 21 5A 5F 02 31", "LatchB (0x6A) a b c d e BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x84 0xFF" },
|
||||||
/* 34*/ { DATA_MODE, -1, "\200\201\202\203\061\062\063\064", -1, 0, "70 13 56 0A 59 2C 67 0C 22", "BinaryLatch (0x70) 0x80 0x81 0x82 0x83 Intr2xShiftC (0x67) 12 3" },
|
/* 34*/ { DATA_MODE, -1, "\200\061\062\240\063\064\201\202\065\066", -1, 0, "6E 40 0C 6F 00 22 70 03 10 42 6E 15 16", "UpperShiftA (0x6E) NUL 12 UpperShiftB (0x6F) SP 34 BinaryLatch (0x70) 0x81 0x82 TermB (0x6E) 5 6" },
|
||||||
/* 35*/ { DATA_MODE, -1, "\001\200\201\202\203\204\200\201\202\203\204", -1, 0, "65 41 70 31 5A 35 21 5A 5F 31 5A 35 21 5A 5F", "LatchA (0x65) SOH BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x80 0x81 0x82 0x83" },
|
/* 35*/ { DATA_MODE, -1, "\200\201\202\203\061\062\063\064", -1, 0, "70 13 56 0A 59 2C 67 0C 22", "BinaryLatch (0x70) 0x80 0x81 0x82 0x83 Intr2xShiftC (0x67) 12 3" },
|
||||||
/* 36*/ { UNICODE_MODE, -1, "\001abc\011\015\012\036", -1, 0, "65 41 65 41 42 43 61 60 64", "LatchA (0x65) SOH 6xShiftB (0x65) a b c HT CR/LF RS" },
|
/* 36*/ { DATA_MODE, -1, "\001\200\201\202\203\204\200\201\202\203\204", -1, 0, "65 41 70 31 5A 35 21 5A 5F 31 5A 35 21 5A 5F", "LatchA (0x65) SOH BinaryLatch (0x70) 0x80 0x81 0x82 0x83 0x80 0x81 0x82 0x83" },
|
||||||
|
/* 37*/ { UNICODE_MODE, -1, "\001abc\011\015\012\036", -1, 0, "65 41 65 41 42 43 61 60 64", "LatchA (0x65) SOH 6xShiftB (0x65) a b c HT CR/LF RS" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -728,6 +732,178 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
"00010001010001010000000101000100010001010000010000010100010100000100010101010001000101000000010100010001010100010000010100000101000100010100000101010000000101000001010100010100010001000101000001010001"
|
"00010001010001010000000101000100010001010000010000010100010100000100010101010001000101000000010100010001010100010000010100000101000100010100000101010000000101000001010100010100010001000101000001010001"
|
||||||
"10100010001010101000000010001000001010001010001000001010100010000000101010001010000010101010000000101000100010100010100000100010100010001010100000001010101000001010000000001000101000101010000010101010"
|
"10100010001010101000000010001000001010001010001000001010100010000000101010001010000010101010000000101000100010100010100000100010100010001010100000001010101000001010000000001000101000101010000010101010"
|
||||||
},
|
},
|
||||||
|
/* 34*/ { UNICODE_MODE, 19, -1, "4", -1, 0, 6, 19, 1, "Mask 1 selected",
|
||||||
|
"1010100000101000101"
|
||||||
|
"0100000000010001010"
|
||||||
|
"0010101010000000000"
|
||||||
|
"0000010100000100000"
|
||||||
|
"1000100010001010001"
|
||||||
|
"0001010101010101010"
|
||||||
|
},
|
||||||
|
/* 35*/ { UNICODE_MODE, 19, 3 << 8, "4", -1, 0, 6, 19, 0, "Mask 2 specified, unlit right edge mask; BWIPP automatically primes mask",
|
||||||
|
"1010101010000000100"
|
||||||
|
"0000000101000100010"
|
||||||
|
"1010100000001010100"
|
||||||
|
"0000010101010000000"
|
||||||
|
"1000001010100010100"
|
||||||
|
"0101000100010001010"
|
||||||
|
},
|
||||||
|
/* 36*/ { UNICODE_MODE, 19, 7 << 8, "4", -1, 0, 6, 19, 1, "Mask 2' specified",
|
||||||
|
"1010101010000000101"
|
||||||
|
"0000000101000100010"
|
||||||
|
"1010100000001010100"
|
||||||
|
"0000010101010000000"
|
||||||
|
"1000001010100010101"
|
||||||
|
"0101000100010001010"
|
||||||
|
},
|
||||||
|
/* 37*/ { GS1_MODE, -1, -1, "[10]12[20]12", -1, 0, 12, 17, 1, "Code Set C with FNC1",
|
||||||
|
"10100000001000001"
|
||||||
|
"00010100010101010"
|
||||||
|
"10001000100000001"
|
||||||
|
"01010100000101000"
|
||||||
|
"10000010000010001"
|
||||||
|
"01010001010100010"
|
||||||
|
"00001010100000001"
|
||||||
|
"00000101010001010"
|
||||||
|
"10101000001010001"
|
||||||
|
"01010101000101010"
|
||||||
|
"10000010100000101"
|
||||||
|
"01000100010101010"
|
||||||
|
},
|
||||||
|
/* 38*/ { UNICODE_MODE, -1, -1, "1234\011\034\035\036", -1, 0, 14, 21, 1, "Code Set B HT FS GS RS",
|
||||||
|
"100010001000001010101"
|
||||||
|
"010001000001000001000"
|
||||||
|
"100010100010101010001"
|
||||||
|
"010100000000010100010"
|
||||||
|
"101000100010001000000"
|
||||||
|
"010000010000000001000"
|
||||||
|
"100000101010100000000"
|
||||||
|
"000101010101010000000"
|
||||||
|
"001000001010101010101"
|
||||||
|
"000000000100010001010"
|
||||||
|
"101010000000000000101"
|
||||||
|
"000101010101000101010"
|
||||||
|
"001010101000101010001"
|
||||||
|
"010101010001000101000"
|
||||||
|
},
|
||||||
|
/* 39*/ { UNICODE_MODE, 17, -1, "abcd\015\012", -1, 0, 14, 17, 1, "Code Set B CRLF",
|
||||||
|
"00001000001000101"
|
||||||
|
"01000101010001000"
|
||||||
|
"10100000100010101"
|
||||||
|
"01000001010000010"
|
||||||
|
"00100010101000101"
|
||||||
|
"01010000010101000"
|
||||||
|
"10101010000010001"
|
||||||
|
"01000001000100010"
|
||||||
|
"00001010101010101"
|
||||||
|
"00000100010100010"
|
||||||
|
"00101010000000000"
|
||||||
|
"00010100010000000"
|
||||||
|
"10100000001010000"
|
||||||
|
"01010001000101000"
|
||||||
|
},
|
||||||
|
/* 40*/ { DATA_MODE, -1, -1, "\101\102\103\104\105\106\107\200\101\102\240\101", -1, 0, 18, 27, 1, "Code Set B Upper Shift A Upper Shift B",
|
||||||
|
"101010100000101000101000001"
|
||||||
|
"010100010101000100010101000"
|
||||||
|
"000010001010100000101010101"
|
||||||
|
"010100010100000001010101000"
|
||||||
|
"001010000010001010101000101"
|
||||||
|
"000001000001010101000000010"
|
||||||
|
"101000101010100000001000001"
|
||||||
|
"000101000001010101010100010"
|
||||||
|
"001010101000101010100010101"
|
||||||
|
"000101010001000100010001010"
|
||||||
|
"000000001000100000000000001"
|
||||||
|
"010000000000010100000100010"
|
||||||
|
"101010101010101010101010101"
|
||||||
|
"000101010001000100010101010"
|
||||||
|
"100000000000100000000010101"
|
||||||
|
"000000010100010000000100010"
|
||||||
|
"100010101000000010001000001"
|
||||||
|
"010001000100000101000001010"
|
||||||
|
},
|
||||||
|
/* 41*/ { UNICODE_MODE, -1, -1, "ABCDEF\001G1234H", -1, 0, 16, 25, 1, "Code Set A 4x Shift C",
|
||||||
|
"0010101010100000100000101"
|
||||||
|
"0000000100010101000001000"
|
||||||
|
"1000100000101000100000101"
|
||||||
|
"0101000001010100000101010"
|
||||||
|
"0000000000101010001010000"
|
||||||
|
"0100000000010101010100000"
|
||||||
|
"0010101010000000101010101"
|
||||||
|
"0100010101000000010100000"
|
||||||
|
"1010001000100010001000101"
|
||||||
|
"0101010001010000000001010"
|
||||||
|
"0000001010100010001010101"
|
||||||
|
"0001000000000001010001000"
|
||||||
|
"0010100000101010100000000"
|
||||||
|
"0101010100000100010100010"
|
||||||
|
"1010101010001000101000000"
|
||||||
|
"0000010100010101000101010"
|
||||||
|
},
|
||||||
|
/* 42*/ { UNICODE_MODE, -1, -1, "ABCDEF\001ab\011\034\035\036\001A", -1, 0, 19, 28, 1, "Code Set A 6x Shift B HT FS GS RS",
|
||||||
|
"1000001010100010101010101010"
|
||||||
|
"0101000000010100010101010001"
|
||||||
|
"0010001010100000101000001010"
|
||||||
|
"0001000101000001010001010000"
|
||||||
|
"1000001010100000101010001000"
|
||||||
|
"0100010101010001000000010001"
|
||||||
|
"0000001010100010100010000010"
|
||||||
|
"0000010100000001010100010101"
|
||||||
|
"0000001010001010101000001010"
|
||||||
|
"0100010101010101000001010000"
|
||||||
|
"0010000000101000101000000010"
|
||||||
|
"0101000101000101000101000001"
|
||||||
|
"1000100000001010101000001000"
|
||||||
|
"0101000001010000010001010100"
|
||||||
|
"1010000000100010001010100010"
|
||||||
|
"0101010100000001000100010001"
|
||||||
|
"1010000010100000100000101000"
|
||||||
|
"0001010000010100000100010101"
|
||||||
|
"1010100010000000101010101010"
|
||||||
|
},
|
||||||
|
/* 43*/ { UNICODE_MODE, -1, -1, "ABCDEF\001abcdefgA", -1, 0, 19, 28, 1, "Code Set A Latch B",
|
||||||
|
"1010001010100010101010101010"
|
||||||
|
"0100010101010000000100010001"
|
||||||
|
"1010000010100000100010101000"
|
||||||
|
"0001010001000001010100000001"
|
||||||
|
"0010001010100000000010101010"
|
||||||
|
"0101000000010100010101000001"
|
||||||
|
"0000101010100000001000001010"
|
||||||
|
"0000010101010000000100010101"
|
||||||
|
"0000101010100000101000001010"
|
||||||
|
"0001010100010001010000000101"
|
||||||
|
"1010000010100010100000001010"
|
||||||
|
"0101000101000000010001010001"
|
||||||
|
"1000100000001010101000001000"
|
||||||
|
"0101000001010000010100010001"
|
||||||
|
"1010000000100010001010100010"
|
||||||
|
"0101010100000001000100010001"
|
||||||
|
"1010000010100000100000101000"
|
||||||
|
"0001010000010100000100010101"
|
||||||
|
"1010100010000000101010101010"
|
||||||
|
},
|
||||||
|
/* 44*/ { DATA_MODE, -1, -1, "\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\200", -1, 0, 20, 29, 1, "Binary Latch C",
|
||||||
|
"10101010000010100010101010001"
|
||||||
|
"01010001000101010001000000010"
|
||||||
|
"00001010101000101010001000001"
|
||||||
|
"00010100000001000101010100000"
|
||||||
|
"00100000101000100000000000101"
|
||||||
|
"00000001010101010100000101000"
|
||||||
|
"10101000001010000010101000100"
|
||||||
|
"01010100010000000101000000010"
|
||||||
|
"10101000101000001010100010100"
|
||||||
|
"00010101000101010001000101010"
|
||||||
|
"10000010101000100010101010001"
|
||||||
|
"01000001010100000001010001010"
|
||||||
|
"00001010101010101000000010001"
|
||||||
|
"00010100000000010000010101010"
|
||||||
|
"00101000100010001000101000001"
|
||||||
|
"00000100000101010101000000000"
|
||||||
|
"10000000000000001000000010101"
|
||||||
|
"01010001010001010000010101000"
|
||||||
|
"10000010100010000010001000101"
|
||||||
|
"01000100000100010001010101010"
|
||||||
|
},
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -47,36 +47,38 @@ static void test_large(int index, int debug) {
|
|||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { -1, -1, "1", 138, "", 0, 33, 30 }, // Mode 4 (138 agrees with ISO/IEC 16023:2000)
|
/* 0*/ { -1, -1, "1", 138, "", 0, 33, 30 }, // Mode 4 (138 agrees with ISO/IEC 16023:2000)
|
||||||
/* 1*/ { -1, -1, "1", 139, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 1*/ { -1, -1, "1", 139, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 2*/ { -1, -1, "A", 93, "", 0, 33, 30 },
|
/* 2*/ { -1, -1, "1", 145, "", ZINT_ERROR_TOO_LONG, -1, -1 }, // Absolute max
|
||||||
/* 3*/ { -1, -1, "A", 94, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 3*/ { -1, -1, "A", 93, "", 0, 33, 30 },
|
||||||
/* 4*/ { -1, -1, "\001", 90, "", 0, 33, 30 },
|
/* 4*/ { -1, -1, "A", 94, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 5*/ { -1, -1, "\001", 91, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 5*/ { -1, -1, "\001", 90, "", 0, 33, 30 },
|
||||||
/* 6*/ { -1, -1, "\200", 90, "", 0, 33, 30 },
|
/* 6*/ { -1, -1, "\001", 91, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 7*/ { -1, -1, "\200", 91, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 7*/ { -1, -1, "\200", 90, "", 0, 33, 30 },
|
||||||
/* 8*/ { 2, -1, "1", 126, "123456789123123", 0, 33, 30 },
|
/* 8*/ { -1, -1, "\200", 91, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 9*/ { 2, -1, "1", 127, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 9*/ { 2, -1, "1", 126, "123456789123123", 0, 33, 30 },
|
||||||
/* 10*/ { 2, -1, "A", 84, "123456789123123", 0, 33, 30 },
|
/* 10*/ { 2, -1, "1", 127, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 11*/ { 2, -1, "A", 85, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 11*/ { 2, -1, "A", 84, "123456789123123", 0, 33, 30 },
|
||||||
/* 12*/ { 2, 96, "1", 109, "123456789123123", 0, 33, 30 },
|
/* 12*/ { 2, -1, "A", 85, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 13*/ { 2, 96, "1", 110, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 13*/ { 2, 96, "1", 109, "123456789123123", 0, 33, 30 },
|
||||||
/* 14*/ { 3, -1, "1", 126, "ABCDEF123123", 0, 33, 30 },
|
/* 14*/ { 2, 96, "1", 110, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 15*/ { 3, -1, "1", 127, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 15*/ { 2, 96, "1", 136, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 }, // Absolute max with SCM vv
|
||||||
/* 16*/ { 3, -1, "A", 84, "ABCDEF123123", 0, 33, 30 },
|
/* 16*/ { 3, -1, "1", 126, "ABCDEF123123", 0, 33, 30 },
|
||||||
/* 17*/ { 3, -1, "A", 85, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 17*/ { 3, -1, "1", 127, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 18*/ { 3, 96, "1", 109, "ABCDEF123123", 0, 33, 30 },
|
/* 18*/ { 3, -1, "A", 84, "ABCDEF123123", 0, 33, 30 },
|
||||||
/* 19*/ { 3, 96, "1", 110, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 19*/ { 3, -1, "A", 85, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 20*/ { 0, -1, "1", 126, "123456789123123", 0, 33, 30 }, // Mode 2
|
/* 20*/ { 3, 96, "1", 109, "ABCDEF123123", 0, 33, 30 },
|
||||||
/* 21*/ { 0, -1, "1", 127, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 21*/ { 3, 96, "1", 110, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 22*/ { 0, -1, "1", 126, "ABCDEF123123", 0, 33, 30 }, // Mode 3
|
/* 22*/ { 0, -1, "1", 126, "123456789123123", 0, 33, 30 }, // Mode 2
|
||||||
/* 23*/ { 0, -1, "1", 127, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 23*/ { 0, -1, "1", 127, "123456789123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 24*/ { 5, -1, "1", 113, "", 0, 33, 30 }, // Extra EEC
|
/* 24*/ { 0, -1, "1", 126, "ABCDEF123123", 0, 33, 30 }, // Mode 3
|
||||||
/* 25*/ { 5, -1, "1", 114, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 25*/ { 0, -1, "1", 127, "ABCDEF123123", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 26*/ { 5, -1, "A", 77, "", 0, 33, 30 },
|
/* 26*/ { 5, -1, "1", 113, "", 0, 33, 30 }, // Extra EEC
|
||||||
/* 27*/ { 5, -1, "A", 78, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 27*/ { 5, -1, "1", 114, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 28*/ { 6, -1, "1", 138, "", 0, 33, 30 },
|
/* 28*/ { 5, -1, "A", 77, "", 0, 33, 30 },
|
||||||
/* 29*/ { 6, -1, "1", 139, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 29*/ { 5, -1, "A", 78, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
/* 30*/ { 6, -1, "A", 93, "", 0, 33, 30 },
|
/* 30*/ { 6, -1, "1", 138, "", 0, 33, 30 },
|
||||||
/* 31*/ { 6, -1, "A", 94, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 31*/ { 6, -1, "1", 139, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
|
/* 32*/ { 6, -1, "A", 93, "", 0, 33, 30 },
|
||||||
|
/* 33*/ { 6, -1, "A", 94, "", ZINT_ERROR_TOO_LONG, -1, -1 },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -133,43 +135,46 @@ static void test_input(int index, int generate, int debug) {
|
|||||||
/* 1*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
/* 1*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
||||||
/* 2*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "A123456", ZINT_ERROR_INVALID_DATA, 0, "Error 555: Non-numeric postcode in Primary Message", "" },
|
/* 2*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "A123456", ZINT_ERROR_INVALID_DATA, 0, "Error 555: Non-numeric postcode in Primary Message", "" },
|
||||||
/* 3*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
/* 3*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||||
/* 4*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
/* 4*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1 123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||||
/* 5*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
/* 5*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
||||||
/* 6*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
/* 6*/ { UNICODE_MODE, -1, 2, -1, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
||||||
/* 7*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
/* 7*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1123456", 0, 30, "(144) 12 00 00 00 00 10 30 1E 20 1C 1A 3D 1C 0D 1B 15 3C 17 3C 08 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||||
/* 8*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
/* 8*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "9-digit postcode" },
|
||||||
/* 9*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "0-digit postcode" },
|
/* 9*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1234567890123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "10-digit postcode" },
|
||||||
/* 10*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "12345678123456", 0, 30, "(144) 22 13 21 31 0B 00 32 1E 20 1C 04 14 07 30 10 07 08 28 1D 09 01 21 21 21 21 21 21 21", "8-digit postcode" },
|
/* 10*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "123456", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "0-digit postcode" },
|
||||||
/* 11*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
/* 11*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "12345678123456", 0, 30, "(144) 22 13 21 31 0B 00 32 1E 20 1C 04 14 07 30 10 07 08 28 1D 09 01 21 21 21 21 21 21 21", "8-digit postcode" },
|
||||||
/* 12*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
/* 12*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 551: Invalid length for Primary Message", "" },
|
||||||
/* 13*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "1123456", 0, 30, "(144) 03 08 08 08 08 18 3C 1E 20 1C 13 37 07 2C 26 2D 18 29 3F 2C 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
/* 13*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
||||||
/* 14*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
/* 14*/ { UNICODE_MODE, -1, 3, -1, "A", -1, "1123456", 0, 30, "(144) 03 08 08 08 08 18 3C 1E 20 1C 13 37 07 2C 26 2D 18 29 3F 2C 01 21 21 21 21 21 21 21", "1-digit postcode" },
|
||||||
/* 15*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDEF123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "6-alphanumeric postcode" },
|
/* 15*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "A123456", 0, 30, "(144) 03 08 08 08 08 18 30 1E 20 1C 22 35 1C 0F 02 1A 26 04 10 31 01 21 21 21 21 21 21 21", "1-alphanumeric postcode" },
|
||||||
/* 16*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDEFG123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "7-alphanumeric postcode truncated" },
|
/* 16*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDEF123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "6-alphanumeric postcode" },
|
||||||
/* 17*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDE123456", 0, 30, "(144) 03 18 01 31 20 10 30 1E 20 1C 0F 38 38 1A 39 10 2F 37 22 12 01 21 21 21 21 21 21 21", "5-alphanumeric postcode" },
|
/* 17*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDEFG123456", 0, 30, "(144) 23 11 01 31 20 10 30 1E 20 1C 3C 1D 22 03 19 15 0F 20 0F 2A 01 21 21 21 21 21 21 21", "7-alphanumeric postcode truncated" },
|
||||||
/* 18*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AAAAAA 840001", 0, 30, "(144) 13 10 10 10 10 10 00 12 07 00 17 36 2E 38 04 29 16 0D 27 16 01 21 21 21 21 21 21 21", "6-alphanumeric postcode with padding" },
|
/* 18*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "ABCDE123456", 0, 30, "(144) 03 18 01 31 20 10 30 1E 20 1C 0F 38 38 1A 39 10 2F 37 22 12 01 21 21 21 21 21 21 21", "5-alphanumeric postcode" },
|
||||||
/* 19*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AAAAA A840001", 0, 30, "(144) 03 18 10 10 10 10 00 12 07 00 19 07 29 31 26 01 23 2C 2E 07 01 21 21 21 21 21 21 21", "7-alphanumeric with embedded padding truncated" },
|
/* 19*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AAAAAA 840001", 0, 30, "(144) 13 10 10 10 10 10 00 12 07 00 17 36 2E 38 04 29 16 0D 27 16 01 21 21 21 21 21 21 21", "6-alphanumeric postcode with padding" },
|
||||||
/* 20*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AA\015AAA840001", ZINT_ERROR_INVALID_DATA, 0, "Error 556: Invalid character in postcode in Primary Message", "Alphanumeric postcode with CR" },
|
/* 20*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AAAAA A840001", 0, 30, "(144) 03 18 10 10 10 10 00 12 07 00 19 07 29 31 26 01 23 2C 2E 07 01 21 21 21 21 21 21 21", "7-alphanumeric with embedded padding truncated" },
|
||||||
/* 21*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "A#%-/A840001", 0, 30, "(144) 13 30 1B 1B 39 18 00 12 07 00 3F 1E 25 07 2A 1E 14 3C 28 2D 01 21 21 21 21 21 21 21", "Alphanumeric postcode with non-control Code A chars" },
|
/* 21*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "AA\015AAA840001", ZINT_ERROR_INVALID_DATA, 0, "Error 556: Invalid character in postcode in Primary Message", "Alphanumeric postcode with CR" },
|
||||||
/* 22*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1A23456", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric country code" },
|
/* 22*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "A#%-/A840001", 0, 30, "(144) 13 30 1B 1B 39 18 00 12 07 00 3F 1E 25 07 2A 1E 14 3C 28 2D 01 21 21 21 21 21 21 21", "Alphanumeric postcode with non-control Code A chars" },
|
||||||
/* 23*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "12345678912345A", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric service class" },
|
/* 23*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "1A23456", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric country code" },
|
||||||
/* 24*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "Auto-determine mode 2" },
|
/* 24*/ { UNICODE_MODE, -1, -1, -1, "A", -1, "12345678912345A", ZINT_ERROR_INVALID_DATA, 0, "Error 552: Non-numeric country code or service class in Primary Message", "Non-numeric service class" },
|
||||||
/* 25*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 554: Primary Message empty", "Auto-determine mode 2/3 requires primary message" },
|
/* 25*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "123456789123456", 0, 30, "(144) 12 05 0D 2F 35 11 32 1E 20 1C 0D 1D 3B 12 22 3F 30 14 23 1A 01 21 21 21 21 21 21 21", "Auto-determine mode 2" },
|
||||||
/* 26*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "A23456123456", 0, 30, "(144) 23 1D 0D 3D 2C 1C 30 1E 20 1C 24 35 30 31 2A 0D 17 14 16 3D 01 21 21 21 21 21 21 21", "Auto-determine mode 3" },
|
/* 26*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "", ZINT_ERROR_INVALID_DATA, 0, "Error 554: Primary Message empty", "Auto-determine mode 2/3 requires primary message" },
|
||||||
/* 27*/ { UNICODE_MODE, -1, -1, 100, "A", -1, "123456123456", 0, 30, "(144) 02 10 22 07 00 20 31 1E 20 1C 0E 29 13 1B 0D 26 36 25 3B 22 3B 2A 29 3B 28 1E 30 31", "SCM prefix version" },
|
/* 27*/ { UNICODE_MODE, -1, 0, -1, "A", -1, "A23456123456", 0, 30, "(144) 23 1D 0D 3D 2C 1C 30 1E 20 1C 24 35 30 31 2A 0D 17 14 16 3D 01 21 21 21 21 21 21 21", "Auto-determine mode 3" },
|
||||||
/* 28*/ { UNICODE_MODE, -1, -1, 101, "A", -1, "123456123456", ZINT_ERROR_INVALID_OPTION, 0, "Error 557: Invalid SCM prefix version", "SCM prefix version" },
|
/* 28*/ { UNICODE_MODE, -1, -1, 100, "A", -1, "123456123456", 0, 30, "(144) 02 10 22 07 00 20 31 1E 20 1C 0E 29 13 1B 0D 26 36 25 3B 22 3B 2A 29 3B 28 1E 30 31", "SCM prefix version" },
|
||||||
/* 29*/ { UNICODE_MODE, 3, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 03 01 21 21 21 21 21 21 2F 14 23 21 05 24 27 00 24 0C 21 21 21 21 21 21 21 21", "" },
|
/* 29*/ { UNICODE_MODE, -1, -1, 101, "A", -1, "123456123456", ZINT_ERROR_INVALID_OPTION, 0, "Error 557: Invalid SCM prefix version", "SCM prefix version" },
|
||||||
/* 30*/ { UNICODE_MODE, 31, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 1F 01 21 21 21 21 21 21 00 2F 0E 09 39 3B 24 1A 21 05 21 21 21 21 21 21 21 21", "ECI 0x1F" },
|
/* 30*/ { UNICODE_MODE, 3, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 03 01 21 21 21 21 21 21 2F 14 23 21 05 24 27 00 24 0C 21 21 21 21 21 21 21 21", "" },
|
||||||
/* 31*/ { UNICODE_MODE, 32, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 20 20 01 21 21 21 21 21 3D 15 0F 30 0D 22 24 35 22 06 21 21 21 21 21 21 21 21", "ECI 0x20" },
|
/* 31*/ { UNICODE_MODE, 31, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 1F 01 21 21 21 21 21 21 00 2F 0E 09 39 3B 24 1A 21 05 21 21 21 21 21 21 21 21", "ECI 0x1F" },
|
||||||
/* 32*/ { UNICODE_MODE, 1023, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 2F 3F 01 21 21 21 21 21 2E 27 23 1D 35 19 21 04 3A 26 21 21 21 21 21 21 21 21", "ECI 0x3FF" },
|
/* 32*/ { UNICODE_MODE, 32, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 20 20 01 21 21 21 21 21 3D 15 0F 30 0D 22 24 35 22 06 21 21 21 21 21 21 21 21", "ECI 0x20" },
|
||||||
/* 33*/ { UNICODE_MODE, 1024, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 30 10 00 01 21 21 21 21 11 2F 15 10 1D 29 06 35 14 2B 21 21 21 21 21 21 21 21", "ECI 0x400" },
|
/* 33*/ { UNICODE_MODE, 1023, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 2F 3F 01 21 21 21 21 21 2E 27 23 1D 35 19 21 04 3A 26 21 21 21 21 21 21 21 21", "ECI 0x3FF" },
|
||||||
/* 34*/ { UNICODE_MODE, 32767, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 37 3F 3F 01 21 21 21 21 3E 15 12 01 07 30 39 27 04 2B 21 21 21 21 21 21 21 21", "ECI 0x7FFF" },
|
/* 34*/ { UNICODE_MODE, 1024, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 30 10 00 01 21 21 21 21 11 2F 15 10 1D 29 06 35 14 2B 21 21 21 21 21 21 21 21", "ECI 0x400" },
|
||||||
/* 35*/ { UNICODE_MODE, 32768, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 08 00 00 01 21 21 21 10 30 3A 04 26 23 0E 21 3D 0F 21 21 21 21 21 21 21 21", "ECI 0x8000" },
|
/* 35*/ { UNICODE_MODE, 32767, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 37 3F 3F 01 21 21 21 21 3E 15 12 01 07 30 39 27 04 2B 21 21 21 21 21 21 21 21", "ECI 0x7FFF" },
|
||||||
/* 36*/ { UNICODE_MODE, 65535, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 0F 3F 3F 01 21 21 21 1C 0E 1D 39 3B 0D 38 25 00 30 21 21 21 21 21 21 21 21", "ECI 0xFFFF" },
|
/* 36*/ { UNICODE_MODE, 32768, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 08 00 00 01 21 21 21 10 30 3A 04 26 23 0E 21 3D 0F 21 21 21 21 21 21 21 21", "ECI 0x8000" },
|
||||||
/* 37*/ { UNICODE_MODE, 65536, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 10 00 00 01 21 21 21 2B 1F 24 06 38 2E 17 1B 10 2F 21 21 21 21 21 21 21 21", "ECI 0x10000" },
|
/* 37*/ { UNICODE_MODE, 65535, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 0F 3F 3F 01 21 21 21 1C 0E 1D 39 3B 0D 38 25 00 30 21 21 21 21 21 21 21 21", "ECI 0xFFFF" },
|
||||||
/* 38*/ { UNICODE_MODE, 131071, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 1F 3F 3F 01 21 21 21 0F 05 09 04 2F 3A 17 09 36 31 21 21 21 21 21 21 21 21", "ECI 0x1FFFF" },
|
/* 38*/ { UNICODE_MODE, 65536, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 10 00 00 01 21 21 21 2B 1F 24 06 38 2E 17 1B 10 2F 21 21 21 21 21 21 21 21", "ECI 0x10000" },
|
||||||
/* 39*/ { UNICODE_MODE, 999999, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 3B 34 08 3F 01 21 21 21 26 3B 2B 23 08 17 32 05 26 35 21 21 21 21 21 21 21 21", "Max ECI" },
|
/* 39*/ { UNICODE_MODE, 131071, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 38 1F 3F 3F 01 21 21 21 0F 05 09 04 2F 3A 17 09 36 31 21 21 21 21 21 21 21 21", "ECI 0x1FFFF" },
|
||||||
/* 40*/ { UNICODE_MODE, -1, 1, -1, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 550: Invalid MaxiCode Mode", "" },
|
/* 40*/ { UNICODE_MODE, 999999, -1, -1, "A", -1, "", 0, 30, "(144) 04 1B 3B 34 08 3F 01 21 21 21 26 3B 2B 23 08 17 32 05 26 35 21 21 21 21 21 21 21 21", "Max ECI" },
|
||||||
|
/* 41*/ { UNICODE_MODE, -1, 1, -1, "A", -1, "", ZINT_ERROR_INVALID_OPTION, 0, "Error 550: Invalid MaxiCode Mode", "" },
|
||||||
|
/* 42*/ { UNICODE_MODE, -1, -1, -1, "\015", -1, "", 0, 30, "(144) 04 00 21 21 21 21 21 21 21 21 37 32 10 01 24 1B 10 11 38 0C 21 21 21 21 21 21 21 21", "" },
|
||||||
|
/* 43*/ { UNICODE_MODE, -1, -1, -1, "\001\034\001\035\001\036\001a:b", -1, "", 0, 30, "(144) 04 3E 3E 01 20 01 21 01 22 01 27 0B 35 01 08 0D 16 02 17 1A 3F 01 33 02 21 21 21 21", "" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -167,6 +167,8 @@ static void test_japanpost(int index, int debug) {
|
|||||||
/* 0*/ { "123", 0, 0, 8, 3, 133, "Check 3" },
|
/* 0*/ { "123", 0, 0, 8, 3, 133, "Check 3" },
|
||||||
/* 1*/ { "123456-AB", 0, 0, 8, 3, 133, "Check 10" },
|
/* 1*/ { "123456-AB", 0, 0, 8, 3, 133, "Check 10" },
|
||||||
/* 2*/ { "123456", 0, 0, 8, 3, 133, "Check 11" },
|
/* 2*/ { "123456", 0, 0, 8, 3, 133, "Check 11" },
|
||||||
|
/* 3*/ { "999980-KZ", 0, 0, 8, 3, 133, "Check 18" },
|
||||||
|
/* 4*/ { "987654-TU", 0, 0, 8, 3, 133, "Check 0" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -205,50 +207,57 @@ static void test_input(int index, int debug) {
|
|||||||
|
|
||||||
struct item {
|
struct item {
|
||||||
int symbology;
|
int symbology;
|
||||||
|
int option_2;
|
||||||
|
float height;
|
||||||
char *data;
|
char *data;
|
||||||
int ret;
|
int ret;
|
||||||
int expected_rows;
|
int expected_rows;
|
||||||
int expected_width;
|
int expected_width;
|
||||||
|
float expected_height;
|
||||||
};
|
};
|
||||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||||
struct item data[] = {
|
struct item data[] = {
|
||||||
/* 0*/ { BARCODE_FLAT, "1234567890", 0, 1, 90 },
|
/* 0*/ { BARCODE_FLAT, -1, 0, "1234567890", 0, 1, 90, 50 },
|
||||||
/* 1*/ { BARCODE_FLAT, "A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 1*/ { BARCODE_FLAT, -1, 0, "A", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 2*/ { BARCODE_POSTNET, "12345", 0, 2, 63 },
|
/* 2*/ { BARCODE_POSTNET, -1, 0, "12345", 0, 2, 63, 12 },
|
||||||
/* 3*/ { BARCODE_POSTNET, "123457689", 0, 2, 103 },
|
/* 3*/ { BARCODE_POSTNET, -1, 0, "123457689", 0, 2, 103, 12 },
|
||||||
/* 4*/ { BARCODE_POSTNET, "12345768901", 0, 2, 123 },
|
/* 4*/ { BARCODE_POSTNET, -1, 0, "12345768901", 0, 2, 123, 12 },
|
||||||
/* 5*/ { BARCODE_POSTNET, "0", ZINT_WARN_NONCOMPLIANT, 2, 23 },
|
/* 5*/ { BARCODE_POSTNET, -1, 0, "0", ZINT_WARN_NONCOMPLIANT, 2, 23, 12 },
|
||||||
/* 6*/ { BARCODE_POSTNET, "1234", ZINT_WARN_NONCOMPLIANT, 2, 53 },
|
/* 6*/ { BARCODE_POSTNET, -1, 0, "1234", ZINT_WARN_NONCOMPLIANT, 2, 53, 12 },
|
||||||
/* 7*/ { BARCODE_POSTNET, "123456", ZINT_WARN_NONCOMPLIANT, 2, 73 },
|
/* 7*/ { BARCODE_POSTNET, -1, 0, "123456", ZINT_WARN_NONCOMPLIANT, 2, 73, 12 },
|
||||||
/* 8*/ { BARCODE_POSTNET, "123456789012", ZINT_WARN_NONCOMPLIANT, 2, 133 },
|
/* 8*/ { BARCODE_POSTNET, -1, 0, "123456789012", ZINT_WARN_NONCOMPLIANT, 2, 133, 12 },
|
||||||
/* 9*/ { BARCODE_POSTNET, "1234A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 9*/ { BARCODE_POSTNET, -1, 0, "1234A", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 10*/ { BARCODE_FIM, "a", 0, 1, 17 },
|
/* 10*/ { BARCODE_POSTNET, -1, 0.9, "12345", 0, 2, 63, 1 },
|
||||||
/* 11*/ { BARCODE_FIM, "b", 0, 1, 17 },
|
/* 11*/ { BARCODE_FIM, -1, 0, "a", 0, 1, 17, 50 },
|
||||||
/* 12*/ { BARCODE_FIM, "c", 0, 1, 17 },
|
/* 12*/ { BARCODE_FIM, -1, 0, "b", 0, 1, 17, 50 },
|
||||||
/* 13*/ { BARCODE_FIM, "d", 0, 1, 17 },
|
/* 13*/ { BARCODE_FIM, -1, 0, "c", 0, 1, 17, 50 },
|
||||||
/* 14*/ { BARCODE_FIM, "ad", ZINT_ERROR_TOO_LONG, -1, -1 },
|
/* 14*/ { BARCODE_FIM, -1, 0, "d", 0, 1, 17, 50 },
|
||||||
/* 15*/ { BARCODE_FIM, "e", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 15*/ { BARCODE_FIM, -1, 0, "ad", ZINT_ERROR_TOO_LONG, -1, -1, -1 },
|
||||||
/* 16*/ { BARCODE_RM4SCC, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 3, 299 },
|
/* 16*/ { BARCODE_FIM, -1, 0, "e", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 17*/ { BARCODE_RM4SCC, "a", 0, 3, 19 }, // Converts to upper
|
/* 17*/ { BARCODE_RM4SCC, -1, 0, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 3, 299, 8 },
|
||||||
/* 18*/ { BARCODE_RM4SCC, ",", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 18*/ { BARCODE_RM4SCC, -1, 0, "a", 0, 3, 19, 8 }, // Converts to upper
|
||||||
/* 19*/ { BARCODE_JAPANPOST, "1234567890-ABCDEFGH", 0, 3, 133 },
|
/* 19*/ { BARCODE_RM4SCC, -1, 0, ",", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 20*/ { BARCODE_JAPANPOST, "a", 0, 3, 133 }, // Converts to upper
|
/* 20*/ { BARCODE_JAPANPOST, -1, 0, "1234567890-ABCDEFGH", 0, 3, 133, 8 },
|
||||||
/* 21*/ { BARCODE_JAPANPOST, ",", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 21*/ { BARCODE_JAPANPOST, -1, 0, "a", 0, 3, 133, 8 }, // Converts to upper
|
||||||
/* 22*/ { BARCODE_KOREAPOST, "123456", 0, 1, 167 },
|
/* 22*/ { BARCODE_JAPANPOST, -1, 0, ",", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 23*/ { BARCODE_KOREAPOST, "A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 23*/ { BARCODE_KOREAPOST, -1, 0, "123456", 0, 1, 167, 50 },
|
||||||
/* 24*/ { BARCODE_PLANET, "12345678901", 0, 2, 123 },
|
/* 24*/ { BARCODE_KOREAPOST, -1, 0, "A", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 25*/ { BARCODE_PLANET, "1234567890123", 0, 2, 143 },
|
/* 25*/ { BARCODE_PLANET, -1, 0, "12345678901", 0, 2, 123, 12 },
|
||||||
/* 26*/ { BARCODE_PLANET, "0", ZINT_WARN_NONCOMPLIANT, 2, 23 },
|
/* 26*/ { BARCODE_PLANET, -1, 0, "1234567890123", 0, 2, 143, 12 },
|
||||||
/* 27*/ { BARCODE_PLANET, "1234567890", ZINT_WARN_NONCOMPLIANT, 2, 113 },
|
/* 27*/ { BARCODE_PLANET, -1, 0, "0", ZINT_WARN_NONCOMPLIANT, 2, 23, 12 },
|
||||||
/* 28*/ { BARCODE_PLANET, "123456789012", ZINT_WARN_NONCOMPLIANT, 2, 133 },
|
/* 28*/ { BARCODE_PLANET, -1, 0, "1234567890", ZINT_WARN_NONCOMPLIANT, 2, 113, 12 },
|
||||||
/* 29*/ { BARCODE_PLANET, "12345678901234", ZINT_WARN_NONCOMPLIANT, 2, 153 },
|
/* 29*/ { BARCODE_PLANET, -1, 0, "123456789012", ZINT_WARN_NONCOMPLIANT, 2, 133, 12 },
|
||||||
/* 30*/ { BARCODE_PLANET, "1234567890A", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 30*/ { BARCODE_PLANET, -1, 0, "12345678901234", ZINT_WARN_NONCOMPLIANT, 2, 153, 12 },
|
||||||
/* 31*/ { BARCODE_KIX, "0123456789ABCDEFGH", 0, 3, 143 },
|
/* 31*/ { BARCODE_PLANET, -1, 0, "1234567890A", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 32*/ { BARCODE_KIX, "a", 0, 3, 7 }, // Converts to upper
|
/* 32*/ { BARCODE_KIX, -1, 0, "0123456789ABCDEFGH", 0, 3, 143, 8 },
|
||||||
/* 33*/ { BARCODE_KIX, ",", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 33*/ { BARCODE_KIX, -1, 0, "a", 0, 3, 7, 8 }, // Converts to upper
|
||||||
/* 34*/ { BARCODE_DAFT, "DAFT", 0, 3, 7 },
|
/* 34*/ { BARCODE_KIX, -1, 0, ",", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
/* 35*/ { BARCODE_DAFT, "a", 0, 3, 1 }, // Converts to upper
|
/* 35*/ { BARCODE_DAFT, -1, 0, "DAFT", 0, 3, 7, 8 },
|
||||||
/* 36*/ { BARCODE_DAFT, "B", ZINT_ERROR_INVALID_DATA, -1, -1 },
|
/* 36*/ { BARCODE_DAFT, -1, 0, "a", 0, 3, 1, 8 }, // Converts to upper
|
||||||
|
/* 37*/ { BARCODE_DAFT, -1, 0, "B", ZINT_ERROR_INVALID_DATA, -1, -1, -1 },
|
||||||
|
/* 38*/ { BARCODE_DAFT, -1, 1.9, "DAFT", 0, 3, 7, 2 },
|
||||||
|
/* 39*/ { BARCODE_DAFT, 500, 0.9, "DAFT", 0, 3, 7, 2 }, // 50% ratio
|
||||||
|
/* 40*/ { BARCODE_DAFT, 500, 0.4, "DAFT", 0, 3, 7, 8 }, // 50% ratio
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -263,7 +272,10 @@ static void test_input(int index, int debug) {
|
|||||||
symbol = ZBarcode_Create();
|
symbol = ZBarcode_Create();
|
||||||
assert_nonnull(symbol, "Symbol not created\n");
|
assert_nonnull(symbol, "Symbol not created\n");
|
||||||
|
|
||||||
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||||
|
if (data[i].height) {
|
||||||
|
symbol->height = data[i].height;
|
||||||
|
}
|
||||||
|
|
||||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||||
@ -271,6 +283,7 @@ static void test_input(int index, int debug) {
|
|||||||
if (ret < ZINT_ERROR) {
|
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->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
|
||||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
|
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
|
||||||
|
assert_equal(symbol->height, data[i].expected_height, "i:%d symbol->height %g != %g\n", i, symbol->height, data[i].expected_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZBarcode_Delete(symbol);
|
ZBarcode_Delete(symbol);
|
||||||
@ -334,39 +347,42 @@ static void test_encode(int index, int generate, int debug) {
|
|||||||
/* 9*/ { BARCODE_KOREAPOST, "010230", 0, 1, 167, "Verified manually against tec-it",
|
/* 9*/ { BARCODE_KOREAPOST, "010230", 0, 1, 167, "Verified manually against tec-it",
|
||||||
"10001000100000000000100010000000000010001000100000001000000010001000100010001000100000000000100000000001000100010001000100010001000000000001000000010001000000010001000"
|
"10001000100000000000100010000000000010001000100000001000000010001000100010001000100000000000100000000001000100010001000100010001000000000001000000010001000000010001000"
|
||||||
},
|
},
|
||||||
/* 10*/ { BARCODE_PLANET, "4012345235636", 0, 2, 143, "USPS Publication 197 (2004) Exhibit 4; verified manually against tec-it",
|
/* 10*/ { BARCODE_KOREAPOST, "923457", 0, 1, 168, "Verified manually against tec-it",
|
||||||
|
"000010001000100000001000100000001000000010001000000010001000000010001000100000000000100010001000000010000000100010001000100010000000100000001000100010001000000000001000"
|
||||||
|
},
|
||||||
|
/* 11*/ { BARCODE_PLANET, "4012345235636", 0, 2, 143, "USPS Publication 197 (2004) Exhibit 4; verified manually against tec-it",
|
||||||
"10100010100000001010101010100000101000100010100000101000101000100010001010100010001010000010100010001010000010101010000010100000101010000010101"
|
"10100010100000001010101010100000101000100010100000101000101000100010001010100010001010000010100010001010000010101010000010100000101010000010101"
|
||||||
"10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
"10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
||||||
},
|
},
|
||||||
/* 11*/ { BARCODE_PLANET, "40123452356", 0, 2, 123, "Verified manually against tec-it",
|
/* 12*/ { BARCODE_PLANET, "40123452356", 0, 2, 123, "Verified manually against tec-it",
|
||||||
"101000101000000010101010101000001010001000101000001010001010001000100010101000100010100000101000100010100000101010001000101"
|
"101000101000000010101010101000001010001000101000001010001010001000100010101000100010100000101000100010100000101010001000101"
|
||||||
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
||||||
},
|
},
|
||||||
/* 12*/ { BARCODE_PLANET, "5020140235635", 0, 2, 143, "USPS Publication 197 (2004) Exhibit 6; verified manually against tec-it",
|
/* 13*/ { BARCODE_PLANET, "5020140235635", 0, 2, 143, "USPS Publication 197 (2004) Exhibit 6; verified manually against tec-it",
|
||||||
"10100010001000001010101010001000000010101010101000001000101000000010101010100010001010000010100010001010000010101010000010100010001010001010001"
|
"10100010001000001010101010001000000010101010101000001000101000000010101010100010001010000010100010001010000010101010000010100010001010001010001"
|
||||||
"10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
"10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
||||||
},
|
},
|
||||||
/* 13*/ { BARCODE_KIX, "2500GG30250", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 1",
|
/* 14*/ { BARCODE_KIX, "2500GG30250", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 1",
|
||||||
"000010100000101000001010000010100010100000101000000010100000101000001010000010100000101"
|
"000010100000101000001010000010100010100000101000000010100000101000001010000010100000101"
|
||||||
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
||||||
"001010001010000000001010000010101000100010001000100000100000101000101000101000000000101"
|
"001010001010000000001010000010101000100010001000100000100000101000101000101000000000101"
|
||||||
},
|
},
|
||||||
/* 14*/ { BARCODE_KIX, "2130VA80430", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 2",
|
/* 15*/ { BARCODE_KIX, "2130VA80430", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 2",
|
||||||
"000010100000101000001010000010101010000000100010001000100000101000001010000010100000101"
|
"000010100000101000001010000010101010000000100010001000100000101000001010000010100000101"
|
||||||
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
||||||
"001010000010001010000010000010100010001010001000001010000000101010001000100000100000101"
|
"001010000010001010000010000010100010001010001000001010000000101010001000100000100000101"
|
||||||
},
|
},
|
||||||
/* 15*/ { BARCODE_KIX, "1231GF156X2", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 3",
|
/* 16*/ { BARCODE_KIX, "1231GF156X2", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 3",
|
||||||
"000010100000101000001010000010100010100000101000000010100000101000100010101000000000101"
|
"000010100000101000001010000010100010100000101000000010100000101000100010101000000000101"
|
||||||
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
||||||
"001000100010100010000010001000101000100010000010001000101010000000001010100000100010100"
|
"001000100010100010000010001000101000100010000010001000101010000000001010100000100010100"
|
||||||
},
|
},
|
||||||
/* 16*/ { BARCODE_KIX, "1231FZ13Xhs", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 4",
|
/* 17*/ { BARCODE_KIX, "1231FZ13Xhs", 0, 3, 87, "PostNL Handleiding KIX code Section 2.1 Example 4",
|
||||||
"000010100000101000001010000010100010100010100000000010100000101010100000001010001000100"
|
"000010100000101000001010000010100010100010100000000010100000101010100000001010001000100"
|
||||||
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
|
||||||
"001000100010100010000010001000101000001010100000001000101000001010000010101000001000100"
|
"001000100010100010000010001000101000001010100000001000101000001010000010101000001000100"
|
||||||
},
|
},
|
||||||
/* 17*/ { BARCODE_DAFT, "DAFTTFADFATDTATFT", 0, 3, 33, "Verified manually against tec-it",
|
/* 18*/ { BARCODE_DAFT, "DAFTTFADFATDTATFT", 0, 3, 33, "Verified manually against tec-it",
|
||||||
"001010000010100010100000001000100"
|
"001010000010100010100000001000100"
|
||||||
"101010101010101010101010101010101"
|
"101010101010101010101010101010101"
|
||||||
"100010000010001010000010000000100"
|
"100010000010001010000010000000100"
|
||||||
|
@ -269,6 +269,7 @@ static void test_qr_input(int index, int generate, int debug) {
|
|||||||
/*123*/ { UNICODE_MODE, 170, -1, "?", 0, 170, "78 0A A4 01 3F 00 EC 11 EC", "ECI-170 B1 (ASCII invariant)" },
|
/*123*/ { UNICODE_MODE, 170, -1, "?", 0, 170, "78 0A A4 01 3F 00 EC 11 EC", "ECI-170 B1 (ASCII invariant)" },
|
||||||
/*124*/ { DATA_MODE, 899, -1, "\200", 0, 899, "78 38 34 01 80 00 EC 11 EC", "ECI-899 B1 (8-bit binary)" },
|
/*124*/ { DATA_MODE, 899, -1, "\200", 0, 899, "78 38 34 01 80 00 EC 11 EC", "ECI-899 B1 (8-bit binary)" },
|
||||||
/*125*/ { UNICODE_MODE, 900, -1, "é", 0, 900, "78 38 44 02 C3 A9 00 EC 11", "ECI-900 B2 (no conversion)" },
|
/*125*/ { UNICODE_MODE, 900, -1, "é", 0, 900, "78 38 44 02 C3 A9 00 EC 11", "ECI-900 B2 (no conversion)" },
|
||||||
|
/*126*/ { UNICODE_MODE, 16384, -1, "é", 0, 16384, "7C 04 00 04 02 C3 A9 00 EC", "ECI-16384 B2 (no conversion)" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -333,6 +334,7 @@ static void test_qr_gs1(int index, int generate, int debug) {
|
|||||||
/* 9*/ { GS1_MODE, "[91]%%%[20]12", 0, "52 06 99 6D A9 B5 36 A6 B0 00 21 00 EC", "A10(13)" },
|
/* 9*/ { GS1_MODE, "[91]%%%[20]12", 0, "52 06 99 6D A9 B5 36 A6 B0 00 21 00 EC", "A10(13)" },
|
||||||
/* 10*/ { GS1_MODE, "[91]A%%%%1234567890123AA%", 0, "52 05 99 63 D1 B5 36 A6 D4 98 40 D1 ED C8 C5 40 C3 20 21 CC DA 80", "A7(11) N13 A3(4)" },
|
/* 10*/ { GS1_MODE, "[91]A%%%%1234567890123AA%", 0, "52 05 99 63 D1 B5 36 A6 D4 98 40 D1 ED C8 C5 40 C3 20 21 CC DA 80", "A7(11) N13 A3(4)" },
|
||||||
/* 11*/ { GS1_MODE, "[91]%23%%6789%%%34567%%%%234%%%%%", 0, "(34) 52 17 19 6D A8 17 76 A6 D4 22 A5 C7 6A 6D 4D A8 22 C7 39 61 DA 9B 53 6A 6B 01 17 B5", "A31(46)" },
|
/* 11*/ { GS1_MODE, "[91]%23%%6789%%%34567%%%%234%%%%%", 0, "(34) 52 17 19 6D A8 17 76 A6 D4 22 A5 C7 6A 6D 4D A8 22 C7 39 61 DA 9B 53 6A 6B 01 17 B5", "A31(46)" },
|
||||||
|
/* 12*/ { GS1_MODE, "[91]ABCDEFGHI[92]ABCDEF", 0, "52 0A 19 63 9A 8A 54 2A E1 6A 06 5C E6 A2 95 0A", "A20(23)" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -1450,6 +1452,7 @@ static void test_microqr_options(int index, int debug) {
|
|||||||
/* 46*/ { "ABCDEFGHIJABCDEFGH", 2, 4, 0, 0, 17, -1 }, // 18 alphanumerics, ECC 2, version 4
|
/* 46*/ { "ABCDEFGHIJABCDEFGH", 2, 4, 0, 0, 17, -1 }, // 18 alphanumerics, ECC 2, version 4
|
||||||
/* 47*/ { "ABCDEFGHIJABCDEFGH", 3, 4, ZINT_ERROR_TOO_LONG, -1, 0, -1 },
|
/* 47*/ { "ABCDEFGHIJABCDEFGH", 3, 4, ZINT_ERROR_TOO_LONG, -1, 0, -1 },
|
||||||
/* 48*/ { "ABCDEFGHIJABC", 3, 4, 0, 0, 17, -1 }, // 13 alphanumerics, ECC 3 (Q), version 4
|
/* 48*/ { "ABCDEFGHIJABC", 3, 4, 0, 0, 17, -1 }, // 13 alphanumerics, ECC 3 (Q), version 4
|
||||||
|
/* 49*/ { "123456789012345678901234567890123456", -1, -1, ZINT_ERROR_TOO_LONG, -1, 0, -1 }, // 35 absolute max
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -2139,6 +2142,8 @@ static void test_upnqr_input(int index, int generate, int debug) {
|
|||||||
/* 0*/ { UNICODE_MODE, "ĄŔ", 0, "(415) 70 44 00 02 A1 C0 00 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC", "ECI-4 B2 (ISO 8859-2)" },
|
/* 0*/ { UNICODE_MODE, "ĄŔ", 0, "(415) 70 44 00 02 A1 C0 00 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC", "ECI-4 B2 (ISO 8859-2)" },
|
||||||
/* 1*/ { UNICODE_MODE, "é", 0, "(415) 70 44 00 01 E9 00 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11", "ECI-4 B1 (ISO 8859-2)" },
|
/* 1*/ { UNICODE_MODE, "é", 0, "(415) 70 44 00 01 E9 00 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11", "ECI-4 B1 (ISO 8859-2)" },
|
||||||
/* 2*/ { UNICODE_MODE, "β", ZINT_ERROR_INVALID_DATA, "Error 572: Invalid character in input data for ECI 4", "β not in ISO 8859-2" },
|
/* 2*/ { UNICODE_MODE, "β", ZINT_ERROR_INVALID_DATA, "Error 572: Invalid character in input data for ECI 4", "β not in ISO 8859-2" },
|
||||||
|
/* 3*/ { DATA_MODE, "\300\241", 0, "(415) 70 44 00 02 C0 A1 00 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC 11 EC", "ŔĄ" },
|
||||||
|
/* 4*/ { GS1_MODE, "[20]12", ZINT_ERROR_INVALID_OPTION, "Error 220: Selected symbology does not support GS1 mode", "" },
|
||||||
};
|
};
|
||||||
int data_size = ARRAY_SIZE(data);
|
int data_size = ARRAY_SIZE(data);
|
||||||
int i, length, ret;
|
int i, length, ret;
|
||||||
@ -2161,7 +2166,9 @@ static void test_upnqr_input(int index, int generate, int debug) {
|
|||||||
|
|
||||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d\n", i, ret, data[i].ret);
|
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d\n", i, ret, data[i].ret);
|
||||||
assert_equal(symbol->eci, 4, "i:%d ZBarcode_Encode symbol->eci %d != 4\n", i, symbol->eci);
|
if (ret < ZINT_ERROR) {
|
||||||
|
assert_equal(symbol->eci, 4, "i:%d ZBarcode_Encode symbol->eci %d != 4\n", i, symbol->eci);
|
||||||
|
}
|
||||||
|
|
||||||
if (generate) {
|
if (generate) {
|
||||||
printf(" /*%3d*/ { %s, \"%s\", %s, \"%s\", \"%s\" },\n",
|
printf(" /*%3d*/ { %s, \"%s\", %s, \"%s\", \"%s\" },\n",
|
||||||
|
@ -2428,8 +2428,10 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
|
|||||||
} else {
|
} else {
|
||||||
bwipp_row_height[r] = symbol->row_height[r] ? symbol->row_height[r] : linear_row_height;
|
bwipp_row_height[r] = symbol->row_height[r] ? symbol->row_height[r] : linear_row_height;
|
||||||
}
|
}
|
||||||
/*fprintf(stderr, "bwipp_row_height[%d] %d, symbol->row_height[%d] %d\n",
|
if ((symbol->debug & ZINT_DEBUG_TEST_PRINT) && !(symbol->debug & ZINT_DEBUG_TEST_LESS_NOISY)) {
|
||||||
r, bwipp_row_height[r], r, symbol->row_height[r]);*/
|
fprintf(stderr, "bwipp_row_height[%d] %d, symbol->row_height[%d] %g\n",
|
||||||
|
r, bwipp_row_height[r], r, symbol->row_height[r]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((symbol->input_mode & 0x07) == UNICODE_MODE && ZBarcode_Cap(symbology, ZINT_CAP_ECI)
|
if ((symbol->input_mode & 0x07) == UNICODE_MODE && ZBarcode_Cap(symbology, ZINT_CAP_ECI)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- ../../../../postscriptbarcode/build/monolithic/barcode.ps 2021-03-22 15:06:47.498155878 +0000
|
--- /home/mburke/code/bwipp/postscriptbarcode/build/monolithic/barcode.ps 2021-08-05 14:58:19.638816396 +0100
|
||||||
+++ ../tools/bwipp_dump.ps 2021-03-27 03:44:50.998203506 +0000
|
+++ backend/tests/tools/bwipp_dump.ps 2021-08-05 14:59:04.030459474 +0100
|
||||||
@@ -26198,34 +26198,80 @@
|
@@ -26289,34 +26289,80 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26284,7 +26330,7 @@
|
@@ -26375,7 +26421,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -109,7 +109,7 @@
|
|||||||
|
|
||||||
% Get the result of encoding with ean8 and gs1-cc
|
% Get the result of encoding with ean8 and gs1-cc
|
||||||
options (lintype) (ean8) put
|
options (lintype) (ean8) put
|
||||||
@@ -26292,29 +26338,75 @@
|
@@ -26383,29 +26429,75 @@
|
||||||
options (dontdraw) true put
|
options (dontdraw) true put
|
||||||
|
|
||||||
% Plot the linear part
|
% Plot the linear part
|
||||||
@ -205,7 +205,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26373,34 +26465,80 @@
|
@@ -26464,34 +26556,80 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -305,7 +305,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26474,34 +26612,80 @@
|
@@ -26565,34 +26703,80 @@
|
||||||
/opt options
|
/opt options
|
||||||
>> def
|
>> def
|
||||||
|
|
||||||
@ -405,7 +405,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26560,7 +26744,7 @@
|
@@ -26651,7 +26835,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -414,7 +414,7 @@
|
|||||||
|
|
||||||
options (lintype) (databaromni) put
|
options (lintype) (databaromni) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -26571,7 +26755,7 @@
|
@@ -26662,7 +26846,7 @@
|
||||||
linear options //databaromni exec
|
linear options //databaromni exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -423,7 +423,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -26602,20 +26786,66 @@
|
@@ -26693,20 +26877,66 @@
|
||||||
sep 0 [0 0 0] putinterval
|
sep 0 [0 0 0] putinterval
|
||||||
sep sep length 4 sub [0 0 0 0] putinterval
|
sep sep length 4 sub [0 0 0 0] putinterval
|
||||||
18 sepfinder 64 sepfinder
|
18 sepfinder 64 sepfinder
|
||||||
@ -502,7 +502,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26673,7 +26903,7 @@
|
@@ -26764,7 +26994,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -511,7 +511,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarstacked) put
|
options (lintype) (databarstacked) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -26684,7 +26914,7 @@
|
@@ -26775,7 +27005,7 @@
|
||||||
linear options //databarstacked exec
|
linear options //databarstacked exec
|
||||||
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
||||||
dup (pixy) get /linheight exch def
|
dup (pixy) get /linheight exch def
|
||||||
@ -520,7 +520,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -26712,20 +26942,52 @@
|
@@ -26803,20 +27033,52 @@
|
||||||
sep 0 [ 0 0 0 0 ] putinterval
|
sep 0 [ 0 0 0 0 ] putinterval
|
||||||
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
||||||
18 sepfinder
|
18 sepfinder
|
||||||
@ -585,7 +585,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -26783,7 +27045,7 @@
|
@@ -26874,7 +27136,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -594,7 +594,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarstackedomni) put
|
options (lintype) (databarstackedomni) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -26794,7 +27056,7 @@
|
@@ -26885,7 +27147,7 @@
|
||||||
linear options //databarstackedomni exec
|
linear options //databarstackedomni exec
|
||||||
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
||||||
dup (pixy) get /linheight exch def
|
dup (pixy) get /linheight exch def
|
||||||
@ -603,7 +603,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -26822,20 +27084,52 @@
|
@@ -26913,20 +27175,52 @@
|
||||||
sep 0 [ 0 0 0 0 ] putinterval
|
sep 0 [ 0 0 0 0 ] putinterval
|
||||||
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
sep sep length 4 sub [ 0 0 0 0 ] putinterval
|
||||||
18 sepfinder
|
18 sepfinder
|
||||||
@ -668,7 +668,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -27008,7 +27302,7 @@
|
@@ -27099,7 +27393,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -677,7 +677,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarlimited) put
|
options (lintype) (databarlimited) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -27019,7 +27313,7 @@
|
@@ -27110,7 +27404,7 @@
|
||||||
linear options //databarlimited exec
|
linear options //databarlimited exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -686,7 +686,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
mark
|
mark
|
||||||
@@ -27027,22 +27321,68 @@
|
@@ -27118,22 +27412,68 @@
|
||||||
counttomark 1 sub array astore /sep exch def pop pop
|
counttomark 1 sub array astore /sep exch def pop pop
|
||||||
sep 0 [0 0 0] putinterval
|
sep 0 [0 0 0] putinterval
|
||||||
sep sep length 9 sub [0 0 0 0 0 0 0 0 0] putinterval % 4 + 5 right guard spaces
|
sep sep length 9 sub [0 0 0 0 0 0 0 0 0] putinterval % 4 + 5 right guard spaces
|
||||||
@ -769,7 +769,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -27101,7 +27441,7 @@
|
@@ -27192,7 +27532,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -778,7 +778,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarexpanded) put
|
options (lintype) (databarexpanded) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -27112,7 +27452,7 @@
|
@@ -27203,7 +27543,7 @@
|
||||||
linear options //databarexpanded exec
|
linear options //databarexpanded exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -787,7 +787,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -27141,20 +27481,60 @@
|
@@ -27232,20 +27572,60 @@
|
||||||
18 98 bot length 13 sub {} for
|
18 98 bot length 13 sub {} for
|
||||||
69 98 bot length 13 sub {} for
|
69 98 bot length 13 sub {} for
|
||||||
] {sepfinder} forall
|
] {sepfinder} forall
|
||||||
@ -860,7 +860,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -27212,7 +27592,7 @@
|
@@ -27303,7 +27683,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -869,7 +869,7 @@
|
|||||||
|
|
||||||
options (lintype) (databarexpandedstacked) put
|
options (lintype) (databarexpandedstacked) put
|
||||||
options (linkage) true put
|
options (linkage) true put
|
||||||
@@ -27223,7 +27603,7 @@
|
@@ -27314,7 +27694,7 @@
|
||||||
linear options //databarexpandedstacked exec
|
linear options //databarexpandedstacked exec
|
||||||
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
dup (pixs) get 0 2 index (pixx) get getinterval /bot exch def
|
||||||
dup (pixy) get /linheight exch def
|
dup (pixy) get /linheight exch def
|
||||||
@ -878,7 +878,7 @@
|
|||||||
|
|
||||||
% Plot the separator
|
% Plot the separator
|
||||||
/sepfinder {
|
/sepfinder {
|
||||||
@@ -27249,21 +27629,49 @@
|
@@ -27340,21 +27720,49 @@
|
||||||
19 98 bot length 13 sub {} for
|
19 98 bot length 13 sub {} for
|
||||||
70 98 bot length 13 sub {} for
|
70 98 bot length 13 sub {} for
|
||||||
] {sepfinder} forall
|
] {sepfinder} forall
|
||||||
@ -941,7 +941,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -27322,7 +27730,7 @@
|
@@ -27413,7 +27821,7 @@
|
||||||
pop
|
pop
|
||||||
} ifelse
|
} ifelse
|
||||||
|
|
||||||
@ -950,7 +950,7 @@
|
|||||||
|
|
||||||
options (inkspread) (0) put
|
options (inkspread) (0) put
|
||||||
options (dontdraw) true put
|
options (dontdraw) true put
|
||||||
@@ -27349,35 +27757,87 @@
|
@@ -27440,35 +27848,87 @@
|
||||||
linear << options {} forall >> //gs1-128 exec
|
linear << options {} forall >> //gs1-128 exec
|
||||||
dup (sbs) get /linsbs exch def
|
dup (sbs) get /linsbs exch def
|
||||||
dup (bhs) get 0 get 72 mul /linheight exch def
|
dup (bhs) get 0 get 72 mul /linheight exch def
|
||||||
@ -1052,7 +1052,7 @@
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28810,3 +29270,189 @@
|
@@ -28901,3 +29361,189 @@
|
||||||
% --END ENCODER hibcazteccode--
|
% --END ENCODER hibcazteccode--
|
||||||
|
|
||||||
% --END TEMPLATE--
|
% --END TEMPLATE--
|
||||||
|
Binary file not shown.
@ -397,7 +397,7 @@ This specifies a symbol height of 100 times the X-dimension of the symbol.
|
|||||||
4.5 Adjusting whitespace
|
4.5 Adjusting whitespace
|
||||||
------------------------
|
------------------------
|
||||||
The amount of horizontal whitespace to the left and right of the generated
|
The amount of horizontal whitespace to the left and right of the generated
|
||||||
barcode can be altered using the –w or --whitesp switch. For example:
|
barcode can be altered using the -w or --whitesp switch. For example:
|
||||||
|
|
||||||
zint -w 10 -d "This Text"
|
zint -w 10 -d "This Text"
|
||||||
|
|
||||||
@ -702,15 +702,15 @@ zint -b 58 --binary -d "UTF-8 data"
|
|||||||
---------------------
|
---------------------
|
||||||
Data can be batch processed by reading from a text file and producing a
|
Data can be batch processed by reading from a text file and producing a
|
||||||
separate barcode image for each line of text in that file. To do this use the
|
separate barcode image for each line of text in that file. To do this use the
|
||||||
--batch switch. To select the input file from which to read data use the –i
|
--batch switch. To select the input file from which to read data use the -i
|
||||||
option. Zint will automatically detect the end of a line of text (in either
|
option. Zint will automatically detect the end of a line of text (in either
|
||||||
Unix or Windows formatted text files) and produce a symbol each time it finds
|
Unix or Windows formatted text files) and produce a symbol each time it finds
|
||||||
this. Input files should end with a line feed character – if this is not present
|
this. Input files should end with a line feed character - if this is not present
|
||||||
then Zint will not encode the last line of text, and will warn you that there
|
then Zint will not encode the last line of text, and will warn you that there
|
||||||
is a problem.
|
is a problem.
|
||||||
|
|
||||||
By default Zint will output numbered filenames starting with 00001.png,
|
By default Zint will output numbered filenames starting with 00001.png,
|
||||||
00002.png etc. To change this behaviour use the –o option in combination with
|
00002.png etc. To change this behaviour use the -o option in combination with
|
||||||
--batch using special characters in the output file name as shown in the table
|
--batch using special characters in the output file name as shown in the table
|
||||||
below:
|
below:
|
||||||
|
|
||||||
@ -861,7 +861,7 @@ int main()
|
|||||||
When compiling this code it will need to be linked with the libzint library
|
When compiling this code it will need to be linked with the libzint library
|
||||||
using the -lzint option:
|
using the -lzint option:
|
||||||
|
|
||||||
gcc -o simple simple.c –lzint
|
gcc -o simple simple.c -lzint
|
||||||
|
|
||||||
5.2 Encoding and Saving to File
|
5.2 Encoding and Saving to File
|
||||||
-------------------------------
|
-------------------------------
|
||||||
@ -2015,11 +2015,11 @@ standard maximum symbol size of 925 codewords which (at error correction level
|
|||||||
0) allows a maximum data size of 1850 text characters, or 2710 digits. The
|
0) allows a maximum data size of 1850 text characters, or 2710 digits. The
|
||||||
width of the generated PDF417 symbol can be specified at the command line using
|
width of the generated PDF417 symbol can be specified at the command line using
|
||||||
the --cols switch followed by a number between 1 and 30, and the amount of
|
the --cols switch followed by a number between 1 and 30, and the amount of
|
||||||
check digit information can be specified by using the --secure switch
|
error correction information can be specified by using the --secure switch
|
||||||
followed by a number between 0 and 8 where the number of codewords used for
|
followed by a number between 0 and 8 where the number of codewords used for
|
||||||
check information is determined by 2^(value + 1). If using the API these values
|
error correction is determined by 2^(value + 1). If using the API these values
|
||||||
are assigned to option_2 and option_1 respectively. The default level of check
|
are assigned to option_2 and option_1 respectively. The default level of error
|
||||||
information is determined by the amount of data being encoded. This symbology
|
correction is determined by the amount of data being encoded. This symbology
|
||||||
uses Latin-1 character encoding by default but also supports the ECI encoding
|
uses Latin-1 character encoding by default but also supports the ECI encoding
|
||||||
mechanism. A separate symbology ID can be used to encode Health Industry
|
mechanism. A separate symbology ID can be used to encode Health Industry
|
||||||
Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check
|
Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check
|
||||||
@ -3072,7 +3072,7 @@ international standards:
|
|||||||
> ISO/IEC 16022:2006 Information technology - Automatic identification and data
|
> ISO/IEC 16022:2006 Information technology - Automatic identification and data
|
||||||
capture techniques - Data Matrix ECC200 bar code symbology specification
|
capture techniques - Data Matrix ECC200 bar code symbology specification
|
||||||
> ISO/IEC 16023:2000 Information technology - International symbology
|
> ISO/IEC 16023:2000 Information technology - International symbology
|
||||||
specification – MaxiCode
|
specification - MaxiCode
|
||||||
> ISO/IEC 16388:2007 Information technology - Automatic identification and data
|
> ISO/IEC 16388:2007 Information technology - Automatic identification and data
|
||||||
capture techniques - Code 39 bar code symbology specification
|
capture techniques - Code 39 bar code symbology specification
|
||||||
> ISO/IEC 18004:2015 Information technology - Automatic identification and data
|
> ISO/IEC 18004:2015 Information technology - Automatic identification and data
|
||||||
@ -3093,6 +3093,9 @@ international standards:
|
|||||||
(rMQR) bar code symbology specification
|
(rMQR) bar code symbology specification
|
||||||
> ISO/IEC 16390:2007 Information technology - Automatic identification and data
|
> ISO/IEC 16390:2007 Information technology - Automatic identification and data
|
||||||
capture techniques - Interleaved 2 of 5 bar code symbology specification
|
capture techniques - Interleaved 2 of 5 bar code symbology specification
|
||||||
|
> ISO/IEC 21471:2020 Information technology - Automatic identification and data
|
||||||
|
capture techniques - Extended rectangular data matrix (DMRE) bar code
|
||||||
|
symbology specification
|
||||||
> Uniform Symbology Specification Code One (AIM Inc., 1994)
|
> Uniform Symbology Specification Code One (AIM Inc., 1994)
|
||||||
> ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel Code
|
> ANSI/AIM BC12-1998 - Uniform Symbology Specification Channel Code
|
||||||
> ANSI/AIM BC6-2000 - Uniform Symbology Specification Code 49
|
> ANSI/AIM BC6-2000 - Uniform Symbology Specification Code 49
|
||||||
@ -3100,19 +3103,19 @@ international standards:
|
|||||||
> ANSI/HIBC 2.6-2016 - The Health Industry Bar Code (HIBC) Supplier Labeling
|
> ANSI/HIBC 2.6-2016 - The Health Industry Bar Code (HIBC) Supplier Labeling
|
||||||
Standard
|
Standard
|
||||||
> AIM ISS-X-24 - Uniform Symbology Specification Codablock-F
|
> AIM ISS-X-24 - Uniform Symbology Specification Codablock-F
|
||||||
> AIMD013 (v 1.34a) – Information technology – Automatic identification and data
|
> AIM TSC1705001 (v 4.0 Draft 0.15) - Information technology - Automatic
|
||||||
capture techniques – Bar code symbology specification – DotCode (Revised
|
identification and data capture techniques - Bar code symbology
|
||||||
19th Feb 2009)
|
specification - DotCode (Revised 28th May 2019)
|
||||||
> AIMD014 (v 1.63) - Information technology, Automatic identification and data
|
> AIMD014 (v 1.63) - Information technology, Automatic identification and data
|
||||||
capture techniques - Bar code symbology specification - Grid Matrix
|
capture techniques - Bar code symbology specification - Grid Matrix
|
||||||
(Released 9th Dec 2008)
|
(Released 9th Dec 2008)
|
||||||
> AIMD/TSC15032-43 (v 0.99c) - International Technical Specification –
|
> AIMD/TSC15032-43 (v 0.99c) - International Technical Specification -
|
||||||
Ultracode Symbology (Draft) (Released 4th Nov 2015)
|
Ultracode Symbology (Draft) (Released 4th Nov 2015)
|
||||||
> GS1 General Specifications Release 21.0.1 (Jan 2021)
|
> GS1 General Specifications Release 21.0.1 (Jan 2021)
|
||||||
> AIM ITS/04-001 International Technical Standard – Extended Channel
|
> AIM ITS/04-001 International Technical Standard - Extended Channel
|
||||||
Interpretations Part 1: Identification Schemes and Protocol (Released 24th
|
Interpretations Part 1: Identification Schemes and Protocol (Released 24th
|
||||||
May 2004)
|
May 2004)
|
||||||
> AIM ITS/04-023 International Technical Standard – Extended Channel
|
> AIM ITS/04-023 International Technical Standard - Extended Channel
|
||||||
Interpretations Part 3: Register (Released 15th July 2004)
|
Interpretations Part 3: Register (Released 15th July 2004)
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>480</height>
|
<height>485</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -109,13 +109,13 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>320</height>
|
<height>325</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>320</height>
|
<height>325</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
|
@ -128,7 +128,8 @@ To build lpng use
|
|||||||
-DPNG_STATIC=ON -DPNG_SHARED=OFF -B build
|
-DPNG_STATIC=ON -DPNG_SHARED=OFF -B build
|
||||||
|
|
||||||
Recent versions of Qt no longer supply a specific component for Visual Studio
|
Recent versions of Qt no longer supply a specific component for Visual Studio
|
||||||
2015, but you can use "MSVC 2017 32-bit" instead as it's compatible.
|
2015 32-bit, but you can use "MSVC 2017 32-bit" or "MSVC 2019 32-bit" instead as
|
||||||
|
they're compatible.
|
||||||
|
|
||||||
For information on building a standalone version of Zint Studio using Visual
|
For information on building a standalone version of Zint Studio using Visual
|
||||||
Studio 2015, see "frontend_qt\howto_build_qzint_using_msvs2015.txt"
|
Studio 2015, see "frontend_qt\howto_build_qzint_using_msvs2015.txt"
|
||||||
|
Loading…
Reference in New Issue
Block a user