From eb6e5daa2dd57f567dcb07042dc189171048fcf4 Mon Sep 17 00:00:00 2001 From: gitlost Date: Sun, 26 Sep 2021 23:55:16 +0100 Subject: [PATCH] raster.c: need ceilf(large_bar_height * si) to avoid zero height rows; also improve non-half-int interpolation performance raster/vector.c: use new stripf() func in "common.c" to workaround gcc 32-bit float calculation variations gs1.c: allow dummy AI "[]" if GS1NOCHECK_MODE and has data (#204); also add note re TPX AI 235 and terminating FNC1 Remove trailing whitespace in various files --- ChangeLog | 5 + backend/Makefile.mingw | 2 +- backend/bmp.h | 4 +- backend/code128.c | 10 +- backend/code128.h | 4 +- backend/common.c | 29 +- backend/common.h | 10 +- backend/emf.h | 4 +- backend/gs1.c | 19 +- backend/pdf417.c | 6 +- backend/raster.c | 23 +- backend/sjis.c | 5 +- backend/tests/test_gs1.c | 1929 ++++++++++++++++++----------------- backend/tests/test_raster.c | 156 ++- backend/tests/test_vector.c | 12 +- backend/tif_lzw.h | 24 +- backend/ultra.c | 10 +- backend/vector.c | 84 +- 18 files changed, 1255 insertions(+), 1081 deletions(-) diff --git a/ChangeLog b/ChangeLog index 894c0d3e..c61055d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,8 @@ Changes - CLI: allow both e.g. '-height' and '--height' (getopt_long_only()) - UPC/EAN: add guard_descent - Add output_options BARCODE_QUIET_ZONES and BARCODE_NO_QUIET_ZONES +- Allow dummy AI "[]" if GS1NOCHECK_MODE and has data (#204) +- raster.c: improve non-half-integer interpolation performance Bugs ---- @@ -31,8 +33,11 @@ Bugs - Suppress some pedantic warnings, props codemonkey82 (#204) - gs1.c: Allow 0-length AI data if GS1NOCHECK_MODE, props codemonkey82 (#204) - raster.c: Need ceilf(symbol->height * si) to avoid heap-buffer-overflow; + also ceilf(large_bar_height * si); also avoid distributive multiplication with floats to lessen chances of platform variation (#204 ARM-Cortex crash) +- raster/vector.c: use new stripf() func to workaround gcc 32-bit + float variations - raster.c: Don't allow for text if scale < 1.0 diff --git a/backend/Makefile.mingw b/backend/Makefile.mingw index 20efbbde..bc208464 100644 --- a/backend/Makefile.mingw +++ b/backend/Makefile.mingw @@ -52,7 +52,7 @@ all: $(DLL) $(STATLIB) %.o:%.c @echo Compiling $< ... $(CC) $(CFLAGS) $(DEFINES) $(ZINT_VERSION) -c -o $@ $< - + $(DLL):$(DLL_OBJ) @echo Linking $@... o2dll.sh -o $@ $(DLL_OBJ) $(LIBS) diff --git a/backend/bmp.h b/backend/bmp.h index cb71d56c..9f8260e3 100644 --- a/backend/bmp.h +++ b/backend/bmp.h @@ -1,7 +1,7 @@ /* bmp.h - header structure for Windows bitmap files libzint - the open source barcode library - Copyright (C) 2009-2017 Robin Stuart + Copyright (C) 2009-2021 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -65,7 +65,7 @@ extern "C" { uint32_t colours; uint32_t important_colours; } bitmap_info_header_t; - + typedef struct color_ref { uint8_t blue; uint8_t green; diff --git a/backend/code128.c b/backend/code128.c index 3e97d0d6..6fc0274f 100644 --- a/backend/code128.c +++ b/backend/code128.c @@ -1127,7 +1127,7 @@ INTERNAL int ean_14(struct zint_symbol *symbol, unsigned char source[], int leng } /* DPD (Deutsher Paket Dienst) Code */ -/* Specification at ftp://dpd.at/Datenspezifikationen/EN/gbs_V4.0.2_hauptdokument.pdf +/* Specification at ftp://dpd.at/Datenspezifikationen/EN/gbs_V4.0.2_hauptdokument.pdf * or https://docplayer.net/33728877-Dpd-parcel-label-specification.html */ INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int length) { int error_number = 0; @@ -1135,26 +1135,26 @@ INTERNAL int dpd_parcel(struct zint_symbol *symbol, unsigned char source[], int unsigned char identifier; const int mod = 36; int cd; // Check digit - + if (length != 28) { strcpy(symbol->errtxt, "349: DPD input wrong length (28 characters required)"); return ZINT_ERROR_TOO_LONG; } identifier = source[0]; - + to_upper(source + 1); error_number = is_sane(KRSET, source + 1, length - 1); if (error_number == ZINT_ERROR_INVALID_DATA) { strcpy(symbol->errtxt, "300: Invalid character in DPD data (alphanumerics only)"); return error_number; } - + if ((identifier < 32) || (identifier > 127)) { strcpy(symbol->errtxt, "301: Invalid DPD identifier (first character), ASCII values 32 to 127 only"); return ZINT_ERROR_INVALID_DATA; } - + error_number = code_128(symbol, source, length); /* Only returns errors, not warnings */ if (error_number < ZINT_ERROR) { diff --git a/backend/code128.h b/backend/code128.h index 7f3a73bc..3d553e53 100644 --- a/backend/code128.h +++ b/backend/code128.h @@ -1,6 +1,6 @@ /* libzint - the open source barcode library - Copyright (C) 2020 Robin Stuart + Copyright (C) 2020 - 2021 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -46,7 +46,7 @@ extern "C" { #define LATCHC 95 #define AORB 96 #define ABORC 97 - + #define KRSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" INTERNAL int parunmodd(const unsigned char llyth); diff --git a/backend/common.c b/backend/common.c index 5bfb00e6..5cc9cdf0 100644 --- a/backend/common.c +++ b/backend/common.c @@ -129,6 +129,18 @@ INTERNAL void lookup(const char set_string[], const char *table[], const char da } } +/* Returns the position of data in set_string */ +INTERNAL int posn(const char set_string[], const char data) { + int i, n = (int) strlen(set_string); + + for (i = 0; i < n; i++) { + if (data == set_string[i]) { + return i; + } + } + return -1; +} + /* Convert an integer value to a string representing its binary equivalent */ INTERNAL void bin_append(const int arg, const int length, char *binary) { int bin_posn = (int) strlen(binary); @@ -155,18 +167,6 @@ INTERNAL int bin_append_posn(const int arg, const int length, char *binary, cons return bin_posn + length; } -/* Returns the position of data in set_string */ -INTERNAL int posn(const char set_string[], const char data) { - int i, n = (int) strlen(set_string); - - for (i = 0; i < n; i++) { - if (data == set_string[i]) { - return i; - } - } - return -1; -} - #ifndef COMMON_INLINE /* Return true (1) if a module is dark/black, otherwise false (0) */ INTERNAL int module_is_set(const struct zint_symbol *symbol, const int y_coord, const int x_coord) { @@ -435,6 +435,11 @@ INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height, return error_number; } +/* Removes excess precision from floats - see https://stackoverflow.com/q/503436/664741 */ +INTERNAL float stripf(const float arg) { + return *((volatile const float *) &arg); +} + /* Returns red component if any of ultra colour indexing "0CBMRYGKW" */ INTERNAL int colour_to_red(const int colour) { int return_val = 0; diff --git a/backend/common.h b/backend/common.h index 98d16817..4fbbddee 100644 --- a/backend/common.h +++ b/backend/common.h @@ -114,11 +114,14 @@ extern "C" { INTERNAL int to_int(const unsigned char source[], const int length); INTERNAL void to_upper(unsigned char source[]); INTERNAL int chr_cnt(const unsigned char string[], const int length, const unsigned char c); + INTERNAL int is_sane(const char test_string[], const unsigned char source[], const int length); INTERNAL void lookup(const char set_string[], const char *table[], const char data, char dest[]); + INTERNAL int posn(const char set_string[], const char data); + INTERNAL void bin_append(const int arg, const int length, char *binary); INTERNAL int bin_append_posn(const int arg, const int length, char *binary, const int bin_posn); - INTERNAL int posn(const char set_string[], const char data); + #ifndef COMMON_INLINE INTERNAL int module_is_set(const struct zint_symbol *symbol, const int y_coord, const int x_coord); INTERNAL void set_module(struct zint_symbol *symbol, const int y_coord, const int x_coord); @@ -128,17 +131,22 @@ extern "C" { #endif INTERNAL void unset_module(struct zint_symbol *symbol, const int y_coord, const int x_coord); INTERNAL void expand(struct zint_symbol *symbol, const char data[]); + INTERNAL int is_stackable(const int symbology); INTERNAL int is_extendable(const int symbology); INTERNAL int is_composite(const int symbology); INTERNAL int istwodigits(const unsigned char source[], const int length, const int position); + INTERNAL unsigned int decode_utf8(unsigned int *state, unsigned int *codep, const unsigned char byte); INTERNAL int is_valid_utf8(const unsigned char source[], const int length); INTERNAL int utf8_to_unicode(struct zint_symbol *symbol, const unsigned char source[], unsigned int vals[], int *length, const int disallow_4byte); + INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height, const float default_height, const float max_height, const int set_errtxt); + INTERNAL float stripf(const float arg); + INTERNAL int colour_to_red(const int colour); INTERNAL int colour_to_green(const int colour); INTERNAL int colour_to_blue(const int colour); diff --git a/backend/emf.h b/backend/emf.h index cef437a5..a10aa629 100644 --- a/backend/emf.h +++ b/backend/emf.h @@ -1,7 +1,7 @@ /* emf.h - header structure for Microsoft EMF libzint - the open source barcode library - Copyright (C) 2016-2017 Robin Stuart + Copyright (C) 2016-2021 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -215,7 +215,7 @@ extern "C" { uint32_t size; color_ref_t color; } emr_settextcolor_t; - + typedef struct emr_exttextoutw { uint32_t type; uint32_t size; diff --git a/backend/gs1.c b/backend/gs1.c index 9b31fd78..17a18738 100644 --- a/backend/gs1.c +++ b/backend/gs1.c @@ -1184,6 +1184,7 @@ INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[] unsigned char reduced[]) { int i, j, last_ai, ai_latch; int bracket_level, max_bracket_level, ai_length, max_ai_length, min_ai_length; + int ai_no_data; int ai_count; int error_value = 0; char obracket = symbol->input_mode & GS1PARENS_MODE ? '(' : '['; @@ -1231,6 +1232,7 @@ INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[] min_ai_length = 5; j = 0; ai_latch = 0; + ai_no_data = 0; for (i = 0; i < src_len; i++) { ai_length += j; if (((j == 1) && (source[i] != cbracket)) && ((source[i] < '0') || (source[i] > '9'))) { @@ -1247,6 +1249,9 @@ INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[] } j = 0; ai_length = 0; + if (i + 1 == src_len || source[i + 1] == obracket) { /* Check if no data */ + ai_no_data = 1; + } } if (bracket_level > max_bracket_level) { max_bracket_level = bracket_level; @@ -1276,9 +1281,13 @@ INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[] } if (min_ai_length <= 1) { - /* AI is too short */ - strcpy(symbol->errtxt, "256: Invalid AI in input data (AI too short)"); - return ZINT_ERROR_INVALID_DATA; + /* Allow too short AI if GS1NOCHECK_MODE and AI is zero-length and all AIs have some data + - permits dummy "[]" workaround for ticket #204 data with no valid AI */ + if (!(symbol->input_mode & GS1NOCHECK_MODE) || min_ai_length == 1 || ai_no_data) { + /* AI is too short */ + strcpy(symbol->errtxt, "256: Invalid AI in input data (AI too short)"); + return ZINT_ERROR_INVALID_DATA; + } } if (ai_latch == 1) { @@ -1360,7 +1369,9 @@ INTERNAL int gs1_verify(struct zint_symbol *symbol, const unsigned char source[] if ( ((last_ai >= 0) && (last_ai <= 4)) || ((last_ai >= 11) && (last_ai <= 20)) - || (last_ai == 23) /* legacy support */ + /* NOTE: as noted by Terry Burton the following complies with ISO/IEC 24724:2011 Table D.1, + but clashes with TPX AI [235], introduced May 2019; awaiting feedback from GS1 */ + || (last_ai == 23) /* legacy support */ /* TODO: probably remove */ || ((last_ai >= 31) && (last_ai <= 36)) || (last_ai == 41) ) { diff --git a/backend/pdf417.c b/backend/pdf417.c index 5bea1954..4902dc25 100644 --- a/backend/pdf417.c +++ b/backend/pdf417.c @@ -715,7 +715,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int for (i = k - 1; i >= 0; i--) { chainemc[mclength++] = mccorrection[i] ? 929 - mccorrection[i] : 0; } - + if (debug) { printf("Complete CW string (%d):\n", mclength); for (i = 0; i < mclength; i++) { @@ -785,7 +785,7 @@ static int pdf417(struct zint_symbol *symbol, unsigned char chaine[], const int } } symbol->width = bp; - + /* ISO/IEC 15438:2015 Section 5.8.2 3X minimum row height */ error_number = set_height(symbol, 3.0f, 0.0f, 0.0f, 0 /*no_errtxt*/); @@ -1217,7 +1217,7 @@ INTERNAL int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], in } } symbol->width = bp; - + /* ISO/IEC 24728:2006 Section 5.8.2 2X minimum row height */ if (error_number) { (void) set_height(symbol, 2.0f, 0.0f, 0.0f, 1 /*no_errtxt*/); diff --git a/backend/raster.c b/backend/raster.c index d4820621..2b0c03b1 100644 --- a/backend/raster.c +++ b/backend/raster.c @@ -267,6 +267,7 @@ static void draw_bar(unsigned char *pixelbuf, const int xpos, const int xlen, co const int image_width, const int image_height, const char fill) { int y; const int ye = ypos + ylen > image_height ? image_height : ypos + ylen; /* Defensive, should never happen */ + assert(ypos + ylen <= image_height); // Trigger assert if happens for (y = ypos; y < ye; y++) { memset(pixelbuf + ((size_t) image_width * y) + xpos, fill, xlen); @@ -962,7 +963,7 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl for (r = 0; r < symbol->rows; r++) { int yposn_si = yposn * si; float row_height = symbol->row_height[r] ? symbol->row_height[r] : large_bar_height; - int row_height_si = row_height * si; + int row_height_si = (int) ceilf(row_height * si); i = 0; @@ -1264,9 +1265,10 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl image_width, image_height, si); if (!half_int_scaling) { + size_t prev_image_row; unsigned char *scaled_pixelbuf; - int scale_width = (int) (image_width * scaler); - int scale_height = (int) (image_height * scaler); + int scale_width = (int) stripf(image_width * scaler); + int scale_height = (int) stripf(image_height * scaler); /* Apply scale options by creating another pixel buffer */ if (!(scaled_pixelbuf = (unsigned char *) malloc((size_t) scale_width * scale_height))) { @@ -1276,12 +1278,19 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl } memset(scaled_pixelbuf, DEFAULT_PAPER, (size_t) scale_width * scale_height); + /* Interpolate */ for (r = 0; r < scale_height; r++) { - int scaled_row = r * scale_width; - int image_row = ((int) (r / scaler)) * image_width; - for (i = 0; i < scale_width; i++) { - *(scaled_pixelbuf + scaled_row + i) = *(pixelbuf + image_row + (int) (i / scaler)); + size_t scaled_row = r * scale_width; + size_t image_row = (size_t) stripf(r / scaler) * image_width; + if (image_row && (image_row == prev_image_row + || memcmp(pixelbuf + image_row, pixelbuf + prev_image_row, image_width) == 0)) { + memcpy(scaled_pixelbuf + scaled_row, scaled_pixelbuf + scaled_row - scale_width, scale_width); + } else { + for (i = 0; i < scale_width; i++) { + *(scaled_pixelbuf + scaled_row + i) = *(pixelbuf + image_row + (int) stripf(i / scaler)); + } } + prev_image_row = image_row; } error_number = save_raster_image_to_file(symbol, scale_height, scale_width, scaled_pixelbuf, rotate_angle, diff --git a/backend/sjis.c b/backend/sjis.c index e18eea0a..77d3761b 100644 --- a/backend/sjis.c +++ b/backend/sjis.c @@ -88,7 +88,7 @@ static int jisx0201_wctomb(unsigned int *r, const unsigned int wc) { */ /* ZINT: Table converted from JIS X 0208 to Shift JIS values using tools/cnv_sjis.php: - * + * while ($line = fgets(STDIN)) { echo preg_replace_callback('/0x([0-9a-f]{4})/', function ($matches) { $dec = hexdec($matches[1]); @@ -972,7 +972,8 @@ typedef struct { static const Summary16 jisx0208_uni2indx_page00[16] = { /* 0x0000 */ { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, - { 0, 0x0000 }, { 6843, 0x1000 }, { 0, 0x0000 }, { 0, 0x0000 }, /* ZINT: Patched reverse solidus (backslash) mapping U+005C to 0x815F */ + /* ZINT: Patched reverse solidus (backslash) mapping U+005C to 0x815F */ + { 0, 0x0000 }, { 6843, 0x1000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x118c }, { 5, 0x0053 }, { 9, 0x0000 }, { 9, 0x0080 }, { 10, 0x0000 }, { 10, 0x0080 }, }; diff --git a/backend/tests/test_gs1.c b/backend/tests/test_gs1.c index 90b035ce..2fb55885 100644 --- a/backend/tests/test_gs1.c +++ b/backend/tests/test_gs1.c @@ -358,862 +358,862 @@ static void test_gs1_verify(int index, int debug) { /* 0*/ { "", ZINT_ERROR_INVALID_DATA, "" }, /* 1*/ { "[", ZINT_ERROR_INVALID_DATA, "" }, /* 2*/ { "[]12", ZINT_ERROR_INVALID_DATA, "" }, - /* 3*/ { "[12345]12", ZINT_ERROR_INVALID_DATA, "" }, - /* 4*/ { "[9999]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 5*/ { "[[01]]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 6*/ { "[1A]12", ZINT_ERROR_INVALID_DATA, "" }, - /* 7*/ { "[10]", ZINT_ERROR_INVALID_DATA, "" }, - /* 8*/ { "[90]\n", ZINT_ERROR_INVALID_DATA, "" }, - /* 9*/ { "[90]\x7F", ZINT_ERROR_INVALID_DATA, "" }, - /* 10*/ { "[90]\x80", ZINT_ERROR_INVALID_DATA, "" }, - /* 11*/ { "[00]123456789012345678", ZINT_WARN_NONCOMPLIANT, "00123456789012345678" }, - /* 12*/ { "[00]123456789012345675", 0, "00123456789012345675" }, - /* 13*/ { "[00]12345678901234567", ZINT_ERROR_INVALID_DATA, "" }, - /* 14*/ { "[00]1234567890123456789", ZINT_ERROR_INVALID_DATA, "" }, - /* 15*/ { "[00]376104250021234569", 0, "00376104250021234569" }, - /* 16*/ { "[00]376104250021234568", ZINT_WARN_NONCOMPLIANT, "00376104250021234568" }, - /* 17*/ { "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, "0112345678901234" }, - /* 18*/ { "[01]12345678901231", 0, "0112345678901231" }, - /* 19*/ { "[01]123456789012345", ZINT_ERROR_INVALID_DATA, "" }, - /* 20*/ { "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "0212345678901234" }, - /* 21*/ { "[02]12345678901231", 0, "0212345678901231" }, - /* 22*/ { "[02]1234567890123", ZINT_ERROR_INVALID_DATA, "" }, - /* 23*/ { "[03]12345678901234", ZINT_ERROR_INVALID_DATA, "" }, - /* 24*/ { "[04]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 25*/ { "[05]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 26*/ { "[06]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 27*/ { "[07]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 28*/ { "[08]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 29*/ { "[09]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 30*/ { "[10]ABCD123456", 0, "10ABCD123456" }, - /* 31*/ { "[10]123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /* 32*/ { "[100]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 33*/ { "[1000]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 34*/ { "[11]990102", 0, "11990102" }, - /* 35*/ { "[11]9901023", ZINT_ERROR_INVALID_DATA, "" }, - /* 36*/ { "[110]990102", ZINT_ERROR_INVALID_DATA, "" }, - /* 37*/ { "[1100]990102", ZINT_ERROR_INVALID_DATA, "" }, - /* 38*/ { "[12]000100", 0, "12000100" }, - /* 39*/ { "[12]00010", ZINT_ERROR_INVALID_DATA, "" }, - /* 40*/ { "[120]000100", ZINT_ERROR_INVALID_DATA, "" }, - /* 41*/ { "[1200]000100", ZINT_ERROR_INVALID_DATA, "" }, - /* 42*/ { "[13]991301", ZINT_WARN_NONCOMPLIANT, "13991301" }, - /* 43*/ { "[13]991201", 0, "13991201" }, - /* 44*/ { "[13]9913011", ZINT_ERROR_INVALID_DATA, "" }, - /* 45*/ { "[130]991301", ZINT_ERROR_INVALID_DATA, "" }, - /* 46*/ { "[1300]991301", ZINT_ERROR_INVALID_DATA, "" }, - /* 47*/ { "[14]991201", ZINT_ERROR_INVALID_DATA, "" }, - /* 48*/ { "[140]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 49*/ { "[1400]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 50*/ { "[15]021231", 0, "15021231" }, - /* 51*/ { "[15]02123", ZINT_ERROR_INVALID_DATA, "" }, - /* 52*/ { "[150]021231", ZINT_ERROR_INVALID_DATA, "" }, - /* 53*/ { "[1500]021231", ZINT_ERROR_INVALID_DATA, "" }, - /* 54*/ { "[16]000000", ZINT_WARN_NONCOMPLIANT, "16000000" }, - /* 55*/ { "[16]000100", 0, "16000100" }, - /* 56*/ { "[16]00000", ZINT_ERROR_INVALID_DATA, "" }, - /* 57*/ { "[160]000000", ZINT_ERROR_INVALID_DATA, "" }, - /* 58*/ { "[1600]000000", ZINT_ERROR_INVALID_DATA, "" }, - /* 59*/ { "[17]010200", 0, "17010200" }, - /* 60*/ { "[17]0102000", ZINT_ERROR_INVALID_DATA, "" }, - /* 61*/ { "[170]010200", ZINT_ERROR_INVALID_DATA, "" }, - /* 62*/ { "[1700]010200", ZINT_ERROR_INVALID_DATA, "" }, - /* 63*/ { "[18]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 64*/ { "[180]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 65*/ { "[1800]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 66*/ { "[19]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 67*/ { "[190]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 68*/ { "[1900]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 69*/ { "[20]12", 0, "2012" }, - /* 70*/ { "[20]1", ZINT_ERROR_INVALID_DATA, "" }, - /* 71*/ { "[200]12", ZINT_ERROR_INVALID_DATA, "" }, - /* 72*/ { "[2000]12", ZINT_ERROR_INVALID_DATA, "" }, - /* 73*/ { "[21]A12345678", 0, "21A12345678" }, - /* 74*/ { "[21]123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /* 75*/ { "[210]A12345678", ZINT_ERROR_INVALID_DATA, "" }, - /* 76*/ { "[2100]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 77*/ { "[22]abcdefghijklmnopqrst", 0, "22abcdefghijklmnopqrst" }, - /* 78*/ { "[22]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /* 79*/ { "[220]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 80*/ { "[2200]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 81*/ { "[23]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 82*/ { "[230]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 83*/ { "[2300]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 84*/ { "[235]1abcdefghijklmnopqrstuvwxyz0", 0, "2351abcdefghijklmnopqrstuvwxyz0" }, - /* 85*/ { "[235]1abcdefghijklmnopqrstuvwxyz01", ZINT_ERROR_INVALID_DATA, "" }, - /* 86*/ { "[24]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 87*/ { "[240]abcdefghijklmnopqrstuvwxyz1234", 0, "240abcdefghijklmnopqrstuvwxyz1234" }, - /* 88*/ { "[240]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, - /* 89*/ { "[2400]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 90*/ { "[241]abcdefghijklmnopqrstuvwxyz1234", 0, "241abcdefghijklmnopqrstuvwxyz1234" }, - /* 91*/ { "[241]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, - /* 92*/ { "[2410]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 93*/ { "[242]12345", 0, "24212345" }, - /* 94*/ { "[242]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /* 95*/ { "[2420]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 96*/ { "[243]abcdefghijklmnopqrst", 0, "243abcdefghijklmnopqrst" }, - /* 97*/ { "[243]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /* 98*/ { "[2430]1234", ZINT_ERROR_INVALID_DATA, "" }, - /* 99*/ { "[244]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*100*/ { "[2440]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*101*/ { "[249]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*102*/ { "[2490]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*103*/ { "[25]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*104*/ { "[250]abcdefghijklmnopqrstuvwxyz1234", 0, "250abcdefghijklmnopqrstuvwxyz1234" }, - /*105*/ { "[250]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, - /*106*/ { "[2500]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*107*/ { "[251]abcdefghijklmnopqrstuvwxyz1234", 0, "251abcdefghijklmnopqrstuvwxyz1234" }, - /*108*/ { "[251]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, - /*109*/ { "[2510]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*110*/ { "[252]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*111*/ { "[2520]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*112*/ { "[253]131313131313", ZINT_ERROR_INVALID_DATA, "" }, - /*113*/ { "[253]1313131313134", ZINT_WARN_NONCOMPLIANT, "2531313131313134" }, - /*114*/ { "[253]1313131313130", 0, "2531313131313130" }, - /*115*/ { "[253]131313131313412345678901234567", ZINT_WARN_NONCOMPLIANT, "253131313131313412345678901234567" }, - /*116*/ { "[253]131313131313012345678901234567", 0, "253131313131313012345678901234567" }, - /*117*/ { "[253]1313131313134123456789012345678", ZINT_ERROR_INVALID_DATA, "" }, - /*118*/ { "[2530]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*119*/ { "[254]abcdefghijklmnopqrst", 0, "254abcdefghijklmnopqrst" }, - /*120*/ { "[254]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*121*/ { "[2540]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*122*/ { "[255]131313131313", ZINT_ERROR_INVALID_DATA, "" }, - /*123*/ { "[255]1313131313134", ZINT_WARN_NONCOMPLIANT, "2551313131313134" }, - /*124*/ { "[255]1313131313130", 0, "2551313131313130" }, - /*125*/ { "[255]1313131313134123456789012", ZINT_WARN_NONCOMPLIANT, "2551313131313134123456789012" }, - /*126*/ { "[255]1313131313130123456789012", 0, "2551313131313130123456789012" }, - /*127*/ { "[255]13131313131341234567890123", ZINT_ERROR_INVALID_DATA, "" }, - /*128*/ { "[2550]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*129*/ { "[256]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*130*/ { "[2560]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*131*/ { "[259]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*132*/ { "[2590]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*133*/ { "[26]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*134*/ { "[260]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*135*/ { "[2600]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*136*/ { "[27]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*137*/ { "[270]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*138*/ { "[2700]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*139*/ { "[28]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*140*/ { "[280]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*141*/ { "[2800]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*142*/ { "[29]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*143*/ { "[290]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*144*/ { "[2900]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*145*/ { "[30]12345678", 0, "3012345678" }, - /*146*/ { "[30]123456789", ZINT_ERROR_INVALID_DATA, "" }, - /*147*/ { "[300]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*148*/ { "[3000]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*149*/ { "[31]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*150*/ { "[310]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*151*/ { "[3100]123456", 0, "3100123456" }, - /*152*/ { "[3100]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*153*/ { "[3101]123456", 0, "3101123456" }, - /*154*/ { "[3101]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*155*/ { "[3105]123456", 0, "3105123456" }, - /*156*/ { "[3105]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*157*/ { "[3106]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*158*/ { "[3109]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*159*/ { "[3110]123456", 0, "3110123456" }, - /*160*/ { "[3110]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*161*/ { "[3115]123456", 0, "3115123456" }, - /*162*/ { "[3115]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*163*/ { "[3116]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*164*/ { "[3119]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*165*/ { "[3120]123456", 0, "3120123456" }, - /*166*/ { "[3120]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*167*/ { "[3125]123456", 0, "3125123456" }, - /*168*/ { "[3125]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*169*/ { "[3126]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*170*/ { "[3129]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*171*/ { "[3130]123456", 0, "3130123456" }, - /*172*/ { "[3130]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*173*/ { "[3135]123456", 0, "3135123456" }, - /*174*/ { "[3135]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*175*/ { "[3136]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*176*/ { "[3139]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*177*/ { "[3140]123456", 0, "3140123456" }, - /*178*/ { "[3140]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*179*/ { "[3145]123456", 0, "3145123456" }, - /*180*/ { "[3145]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*181*/ { "[3146]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*182*/ { "[3149]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*183*/ { "[3150]123456", 0, "3150123456" }, - /*184*/ { "[3150]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*185*/ { "[3155]123456", 0, "3155123456" }, - /*186*/ { "[3155]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*187*/ { "[3156]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*188*/ { "[3159]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*189*/ { "[3160]123456", 0, "3160123456" }, - /*190*/ { "[3160]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*191*/ { "[3165]123456", 0, "3165123456" }, - /*192*/ { "[3165]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*193*/ { "[3166]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*194*/ { "[3169]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*195*/ { "[3170]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*196*/ { "[3179]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*197*/ { "[3180]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*198*/ { "[3189]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*199*/ { "[3190]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*200*/ { "[3199]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*201*/ { "[32]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*202*/ { "[320]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*203*/ { "[3200]123456", 0, "3200123456" }, - /*204*/ { "[3200]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*205*/ { "[3205]123456", 0, "3205123456" }, - /*206*/ { "[3205]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*207*/ { "[3206]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*208*/ { "[3209]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*209*/ { "[3210]123456", 0, "3210123456" }, - /*210*/ { "[3210]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*211*/ { "[3215]123456", 0, "3215123456" }, - /*212*/ { "[3215]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*213*/ { "[3216]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*214*/ { "[3219]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*215*/ { "[3220]123456", 0, "3220123456" }, - /*216*/ { "[3220]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*217*/ { "[3225]123456", 0, "3225123456" }, - /*218*/ { "[3225]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*219*/ { "[3229]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*220*/ { "[3230]123456", 0, "3230123456" }, - /*221*/ { "[3230]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*222*/ { "[3235]123456", 0, "3235123456" }, - /*223*/ { "[3235]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*224*/ { "[3239]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*225*/ { "[3240]123456", 0, "3240123456" }, - /*226*/ { "[3240]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*227*/ { "[3245]123456", 0, "3245123456" }, - /*228*/ { "[3245]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*229*/ { "[3249]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*230*/ { "[3250]123456", 0, "3250123456" }, - /*231*/ { "[3250]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*232*/ { "[3255]123456", 0, "3255123456" }, - /*233*/ { "[3255]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*234*/ { "[3259]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*235*/ { "[3260]123456", 0, "3260123456" }, - /*236*/ { "[3260]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*237*/ { "[3265]123456", 0, "3265123456" }, - /*238*/ { "[3265]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*239*/ { "[3269]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*240*/ { "[3270]123456", 0, "3270123456" }, - /*241*/ { "[3270]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*242*/ { "[3275]123456", 0, "3275123456" }, - /*243*/ { "[3275]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*244*/ { "[3279]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*245*/ { "[3280]123456", 0, "3280123456" }, - /*246*/ { "[3280]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*247*/ { "[3285]123456", 0, "3285123456" }, - /*248*/ { "[3285]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*249*/ { "[3289]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*250*/ { "[3290]123456", 0, "3290123456" }, - /*251*/ { "[3290]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*252*/ { "[3295]123456", 0, "3295123456" }, - /*253*/ { "[3295]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*254*/ { "[3296]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*255*/ { "[3299]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*256*/ { "[33]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*257*/ { "[330]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*258*/ { "[3300]123456", 0, "3300123456" }, - /*259*/ { "[3300]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*260*/ { "[3305]123456", 0, "3305123456" }, - /*261*/ { "[3305]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*262*/ { "[3306]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*263*/ { "[3309]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*264*/ { "[3310]123456", 0, "3310123456" }, - /*265*/ { "[3310]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*266*/ { "[3319]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*267*/ { "[3320]123456", 0, "3320123456" }, - /*268*/ { "[3320]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*269*/ { "[3329]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*270*/ { "[3330]123456", 0, "3330123456" }, - /*271*/ { "[3330]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*272*/ { "[3339]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*273*/ { "[3340]123456", 0, "3340123456" }, - /*274*/ { "[3340]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*275*/ { "[3349]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*276*/ { "[3350]123456", 0, "3350123456" }, - /*277*/ { "[3350]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*278*/ { "[3359]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*279*/ { "[3360]123456", 0, "3360123456" }, - /*280*/ { "[3360]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*281*/ { "[3369]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*282*/ { "[3370]123456", 0, "3370123456" }, - /*283*/ { "[3370]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*284*/ { "[3375]123456", 0, "3375123456" }, - /*285*/ { "[3375]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*286*/ { "[3376]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*287*/ { "[3379]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*288*/ { "[3380]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*289*/ { "[3390]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*290*/ { "[3399]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*291*/ { "[34]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*292*/ { "[340]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*293*/ { "[3400]123456", 0, "3400123456" }, - /*294*/ { "[3400]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*295*/ { "[3405]123456", 0, "3405123456" }, - /*296*/ { "[3405]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*297*/ { "[3406]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*298*/ { "[3409]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*299*/ { "[3410]123456", 0, "3410123456" }, - /*300*/ { "[3410]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*301*/ { "[3419]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*302*/ { "[3420]123456", 0, "3420123456" }, - /*303*/ { "[3420]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*304*/ { "[3429]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*305*/ { "[3430]123456", 0, "3430123456" }, - /*306*/ { "[3430]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*307*/ { "[3439]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*308*/ { "[3440]123456", 0, "3440123456" }, - /*309*/ { "[3440]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*310*/ { "[3449]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*311*/ { "[3450]123456", 0, "3450123456" }, - /*312*/ { "[3450]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*313*/ { "[3459]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*314*/ { "[3460]123456", 0, "3460123456" }, - /*315*/ { "[3460]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*316*/ { "[3469]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*317*/ { "[3470]123456", 0, "3470123456" }, - /*318*/ { "[3470]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*319*/ { "[3479]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*320*/ { "[3480]123456", 0, "3480123456" }, - /*321*/ { "[3480]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*322*/ { "[3489]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*323*/ { "[3490]123456", 0, "3490123456" }, - /*324*/ { "[3490]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*325*/ { "[3495]123456", 0, "3495123456" }, - /*326*/ { "[3495]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*327*/ { "[3496]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*328*/ { "[3499]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*329*/ { "[35]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*330*/ { "[350]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*331*/ { "[3500]123456", 0, "3500123456" }, - /*332*/ { "[3500]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*333*/ { "[3505]123456", 0, "3505123456" }, - /*334*/ { "[3505]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*335*/ { "[3506]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*336*/ { "[3509]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*337*/ { "[3510]123456", 0, "3510123456", }, - /*338*/ { "[3510]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*339*/ { "[3519]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*340*/ { "[3520]123456", 0, "3520123456", }, - /*341*/ { "[3520]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*342*/ { "[3529]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*343*/ { "[3530]123456", 0, "3530123456", }, - /*344*/ { "[3530]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*345*/ { "[3539]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*346*/ { "[3540]123456", 0, "3540123456", }, - /*347*/ { "[3540]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*348*/ { "[3549]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*349*/ { "[3550]123456", 0, "3550123456", }, - /*350*/ { "[3550]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*351*/ { "[3559]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*352*/ { "[3560]123456", 0, "3560123456", }, - /*353*/ { "[3560]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*354*/ { "[3569]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*355*/ { "[3570]123456", 0, "3570123456", }, - /*356*/ { "[3570]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*357*/ { "[3575]123456", 0, "3575123456" }, - /*358*/ { "[3376]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*359*/ { "[3579]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*360*/ { "[3580]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*361*/ { "[3590]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*362*/ { "[3599]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*363*/ { "[36]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*364*/ { "[360]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*365*/ { "[3600]123456", 0, "3600123456" }, - /*366*/ { "[3600]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*367*/ { "[3605]123456", 0, "3605123456" }, - /*368*/ { "[3605]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*369*/ { "[3606]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*370*/ { "[3609]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*371*/ { "[3610]123456", 0, "3610123456" }, - /*372*/ { "[3610]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*373*/ { "[3619]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*374*/ { "[3620]123456", 0, "3620123456", }, - /*375*/ { "[3620]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*376*/ { "[3629]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*377*/ { "[3630]123456", 0, "3630123456", }, - /*378*/ { "[3630]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*379*/ { "[3639]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*380*/ { "[3640]123456", 0, "3640123456", }, - /*381*/ { "[3640]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*382*/ { "[3649]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*383*/ { "[3650]123456", 0, "3650123456", }, - /*384*/ { "[3650]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*385*/ { "[3659]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*386*/ { "[3660]123456", 0, "3660123456", }, - /*387*/ { "[3660]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*388*/ { "[3669]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*389*/ { "[3670]123456", 0, "3670123456", }, - /*390*/ { "[3670]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*391*/ { "[3679]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*392*/ { "[3680]123456", 0, "3680123456", }, - /*393*/ { "[3680]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*394*/ { "[3689]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*395*/ { "[3690]123456", 0, "3690123456" }, - /*396*/ { "[3690]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*397*/ { "[3695]123456", 0, "3695123456" }, - /*398*/ { "[3695]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*399*/ { "[3696]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*400*/ { "[3699]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*401*/ { "[37]12345678", 0, "3712345678" }, - /*402*/ { "[37]123456789", ZINT_ERROR_INVALID_DATA, "" }, - /*403*/ { "[370]12345678", ZINT_ERROR_INVALID_DATA, "" }, - /*404*/ { "[3700]12345678", ZINT_ERROR_INVALID_DATA, "" }, - /*405*/ { "[38]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*406*/ { "[380]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*407*/ { "[3800]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*408*/ { "[39]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*409*/ { "[390]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*410*/ { "[3900]123456789012345", 0, "3900123456789012345" }, - /*411*/ { "[3900]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*412*/ { "[3900]12345678901234", 0, "390012345678901234" }, - /*413*/ { "[3901]123456789012345", 0, "3901123456789012345" }, - /*414*/ { "[3901]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*415*/ { "[3905]123456789012345", 0, "3905123456789012345" }, - /*416*/ { "[3909]123456789012345", 0, "3909123456789012345" }, - /*417*/ { "[3909]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*418*/ { "[3910]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3910123123456789012345" }, - /*419*/ { "[3910]997123456789012345", 0, "3910997123456789012345" }, - /*420*/ { "[3910]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*421*/ { "[3910]123", ZINT_ERROR_INVALID_DATA, "" }, - /*422*/ { "[3915]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3915123123456789012345" }, - /*423*/ { "[3915]997123456789012345", 0, "3915997123456789012345" }, - /*424*/ { "[3915]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*425*/ { "[3919]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3919123123456789012345" }, - /*426*/ { "[3919]997123456789012345", 0, "3919997123456789012345" }, - /*427*/ { "[3919]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*428*/ { "[3920]123456789012345", 0, "3920123456789012345" }, - /*429*/ { "[3920]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*430*/ { "[3925]123456789012345", 0, "3925123456789012345" }, - /*431*/ { "[3925]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*432*/ { "[3929]123456789012345", 0, "3929123456789012345" }, - /*433*/ { "[3929]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*434*/ { "[3930]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3930123123456789012345" }, - /*435*/ { "[3930]997123456789012345", 0, "3930997123456789012345" }, - /*436*/ { "[3930]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*437*/ { "[3930]123", ZINT_ERROR_INVALID_DATA, "" }, - /*438*/ { "[3935]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3935123123456789012345" }, - /*439*/ { "[3935]997123456789012345", 0, "3935997123456789012345" }, - /*440*/ { "[3935]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*441*/ { "[3939]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3939123123456789012345" }, - /*442*/ { "[3939]997123456789012345", 0, "3939997123456789012345" }, - /*443*/ { "[3939]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*444*/ { "[3940]1234", 0, "39401234" }, - /*445*/ { "[3940]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*446*/ { "[3940]123", ZINT_ERROR_INVALID_DATA, "" }, - /*447*/ { "[3941]1234", 0, "39411234" }, - /*448*/ { "[3941]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*449*/ { "[3941]123", ZINT_ERROR_INVALID_DATA, "" }, - /*450*/ { "[3942]1234", 0, "39421234" }, - /*451*/ { "[3942]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*452*/ { "[3943]1234", 0, "39431234" }, - /*453*/ { "[3943]123", ZINT_ERROR_INVALID_DATA, "" }, - /*454*/ { "[3944]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*455*/ { "[3945]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*456*/ { "[3949]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*457*/ { "[3950]123456", 0, "3950123456" }, - /*458*/ { "[3950]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*459*/ { "[3950]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*460*/ { "[3951]123456", 0, "3951123456" }, - /*461*/ { "[3951]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*462*/ { "[3952]123456", 0, "3952123456" }, - /*463*/ { "[3952]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*464*/ { "[3953]123456", 0, "3953123456" }, - /*465*/ { "[3953]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*466*/ { "[3954]123456", 0, "3954123456" }, - /*467*/ { "[3954]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*468*/ { "[3955]123456", 0, "3955123456" }, - /*469*/ { "[3955]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*470*/ { "[3956]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*471*/ { "[3959]123456", ZINT_ERROR_INVALID_DATA, "" }, - /*472*/ { "[3960]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*473*/ { "[3970]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*474*/ { "[3980]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*475*/ { "[3999]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*476*/ { "[40]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*477*/ { "[400]123456789012345678901234567890", 0, "400123456789012345678901234567890" }, - /*478*/ { "[400]1234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*479*/ { "[4000]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*480*/ { "[401]1234abcdefghijklmnopqrstuvwxyz", 0, "4011234abcdefghijklmnopqrstuvwxyz" }, - /*481*/ { "[401]1234abcdefghijklmnopqrstuvwxyz1", ZINT_ERROR_INVALID_DATA, "" }, - /*482*/ { "[4010]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*483*/ { "[402]13131313131313132", ZINT_WARN_NONCOMPLIANT, "40213131313131313132" }, - /*484*/ { "[402]13131313131313130", 0, "40213131313131313130" }, - /*485*/ { "[402]1313131313131313", ZINT_ERROR_INVALID_DATA, "" }, - /*486*/ { "[4020]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*487*/ { "[403]abcdefghijklmnopqrstuvwxyz1234", 0, "403abcdefghijklmnopqrstuvwxyz1234" }, - /*488*/ { "[403]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, - /*489*/ { "[4030]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*490*/ { "[404]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*491*/ { "[4040]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*492*/ { "[409]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*493*/ { "[4090]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*494*/ { "[41]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*495*/ { "[410]3898765432108", 0, "4103898765432108" }, - /*496*/ { "[410]12345678901234", ZINT_ERROR_INVALID_DATA, "" }, - /*497*/ { "[4100]12345678901234", ZINT_ERROR_INVALID_DATA, "" }, - /*498*/ { "[411]1313131313134", ZINT_WARN_NONCOMPLIANT, "4111313131313134" }, - /*499*/ { "[411]1313131313130", 0, "4111313131313130" }, - /*500*/ { "[411]13131313131", ZINT_ERROR_INVALID_DATA, "" }, - /*501*/ { "[4110]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, - /*502*/ { "[412]1313131313130", 0, "4121313131313130" }, - /*503*/ { "[412]13131313131", ZINT_ERROR_INVALID_DATA, "" }, - /*504*/ { "[4120]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, - /*505*/ { "[413]1313131313130", 0, "4131313131313130" }, - /*506*/ { "[413]13131313131", ZINT_ERROR_INVALID_DATA, "" }, - /*507*/ { "[4130]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, - /*508*/ { "[414]1313131313130", 0, "4141313131313130" }, - /*509*/ { "[414]13131313131", ZINT_ERROR_INVALID_DATA, "" }, - /*510*/ { "[4140]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, - /*511*/ { "[415]1313131313130", 0, "4151313131313130" }, - /*512*/ { "[415]13131313131", ZINT_ERROR_INVALID_DATA, "" }, - /*513*/ { "[4150]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, - /*514*/ { "[416]1313131313130", 0, "4161313131313130" }, - /*515*/ { "[416]13131313131", ZINT_ERROR_INVALID_DATA, "" }, - /*516*/ { "[4160]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, - /*517*/ { "[417]1313131313130", 0, "4171313131313130" }, - /*518*/ { "[417]13131313131", ZINT_ERROR_INVALID_DATA, "" }, - /*519*/ { "[4170]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, - /*520*/ { "[418]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*521*/ { "[4180]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*522*/ { "[419]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*523*/ { "[4190]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*524*/ { "[42]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*525*/ { "[420]abcdefghijklmnopqrst", 0, "420abcdefghijklmnopqrst" }, - /*526*/ { "[420]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*527*/ { "[4200]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*528*/ { "[421]123abcdefghi", ZINT_WARN_NONCOMPLIANT, "421123abcdefghi" }, - /*529*/ { "[421]434abcdefghi", 0, "421434abcdefghi" }, - /*530*/ { "[421]123abcdefghij", ZINT_ERROR_INVALID_DATA, "" }, - /*531*/ { "[421]1231", ZINT_WARN_NONCOMPLIANT, "4211231" }, - /*532*/ { "[421]4341", 0, "4214341" }, - /*533*/ { "[421]123", ZINT_ERROR_INVALID_DATA, "" }, - /*534*/ { "[4210]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*535*/ { "[422]123", ZINT_WARN_NONCOMPLIANT, "422123" }, - /*536*/ { "[422]004", 0, "422004" }, - /*537*/ { "[422]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*538*/ { "[422]12", ZINT_ERROR_INVALID_DATA, "" }, - /*539*/ { "[4220]123", ZINT_ERROR_INVALID_DATA, "" }, - /*540*/ { "[423]123123123123123", ZINT_WARN_NONCOMPLIANT, "423123123123123123" }, - /*541*/ { "[423]470004012887123", ZINT_WARN_NONCOMPLIANT, "423470004012887123" }, - /*542*/ { "[423]470004012887438", 0, "423470004012887438" }, - /*543*/ { "[423]1231231231231231", ZINT_ERROR_INVALID_DATA, "4231231231231231231" }, - /*544*/ { "[423]12312312312312", ZINT_WARN_NONCOMPLIANT, "42312312312312312" }, - /*545*/ { "[423]1231231231231", ZINT_WARN_NONCOMPLIANT, "4231231231231231" }, - /*546*/ { "[423]12312312312", ZINT_WARN_NONCOMPLIANT, "42312312312312" }, - /*547*/ { "[423]1231231231", ZINT_WARN_NONCOMPLIANT, "4231231231231" }, - /*548*/ { "[423]123", ZINT_WARN_NONCOMPLIANT, "423123" }, - /*549*/ { "[423]004", 0, "423004" }, - /*550*/ { "[423]12", ZINT_ERROR_INVALID_DATA, "" }, - /*551*/ { "[4230]123123123123123", ZINT_ERROR_INVALID_DATA, "" }, - /*552*/ { "[424]123", ZINT_WARN_NONCOMPLIANT, "424123" }, - /*553*/ { "[424]004", 0, "424004" }, - /*554*/ { "[424]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*555*/ { "[424]12", ZINT_ERROR_INVALID_DATA, "" }, - /*556*/ { "[4240]123", ZINT_ERROR_INVALID_DATA, "" }, - /*557*/ { "[425]123123123123123", ZINT_WARN_NONCOMPLIANT, "425123123123123123" }, - /*558*/ { "[425]010500276634894", 0, "425010500276634894" }, - /*559*/ { "[425]010500276123894", ZINT_WARN_NONCOMPLIANT, "425010500276123894" }, - /*560*/ { "[425]1231231231231231", ZINT_ERROR_INVALID_DATA, "" }, - /*561*/ { "[425]12", ZINT_ERROR_INVALID_DATA, "" }, - /*562*/ { "[4250]123123123123123", ZINT_ERROR_INVALID_DATA, "" }, - /*563*/ { "[426]123", ZINT_WARN_NONCOMPLIANT, "426123" }, - /*564*/ { "[426]426", 0, "426426" }, - /*565*/ { "[426]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*566*/ { "[426]12", ZINT_ERROR_INVALID_DATA, "" }, - /*567*/ { "[4260]123", ZINT_ERROR_INVALID_DATA, "" }, - /*568*/ { "[427]abc", 0, "427abc" }, - /*569*/ { "[427]abcd", ZINT_ERROR_INVALID_DATA, "" }, - /*570*/ { "[4270]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*571*/ { "[428]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*572*/ { "[4280]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*573*/ { "[429]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*574*/ { "[4290]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*575*/ { "[43]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*576*/ { "[430]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*577*/ { "[4300]1", 0, "43001" }, - /*578*/ { "[4300]12345678901234567890123456789012345", 0, "430012345678901234567890123456789012345" }, - /*579*/ { "[4300]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*580*/ { "[4301]1", 0, "43011" }, - /*581*/ { "[4301]12345678901234567890123456789012345", 0, "430112345678901234567890123456789012345" }, - /*582*/ { "[4301]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*583*/ { "[4302]1", 0, "43021" }, - /*584*/ { "[4302]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43021234567890123456789012345678901234567890123456789012345678901234567890" }, - /*585*/ { "[4302]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*586*/ { "[4303]1", 0, "43031" }, - /*587*/ { "[4303]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43031234567890123456789012345678901234567890123456789012345678901234567890" }, - /*588*/ { "[4303]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*589*/ { "[4304]1", 0, "43041" }, - /*590*/ { "[4304]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43041234567890123456789012345678901234567890123456789012345678901234567890" }, - /*591*/ { "[4304]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*592*/ { "[4305]1", 0, "43051" }, - /*593*/ { "[4305]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43051234567890123456789012345678901234567890123456789012345678901234567890" }, - /*594*/ { "[4305]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*595*/ { "[4306]1", 0, "43061" }, - /*596*/ { "[4306]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43061234567890123456789012345678901234567890123456789012345678901234567890" }, - /*597*/ { "[4306]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*598*/ { "[4307]FR", 0, "4307FR" }, - /*599*/ { "[4307]F", ZINT_ERROR_INVALID_DATA, "" }, - /*600*/ { "[4307]FRR", ZINT_ERROR_INVALID_DATA, "" }, - /*601*/ { "[4308]1", 0, "43081" }, - /*602*/ { "[4308]123456789012345678901234567890", 0, "4308123456789012345678901234567890" }, - /*603*/ { "[4308]1234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*604*/ { "[4309]1", ZINT_ERROR_INVALID_DATA, "" }, - /*605*/ { "[431]1", ZINT_ERROR_INVALID_DATA, "" }, - /*606*/ { "[4310]1", 0, "43101" }, - /*607*/ { "[4310]12345678901234567890123456789012345", 0, "431012345678901234567890123456789012345" }, - /*608*/ { "[4310]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*609*/ { "[4311]1", 0, "43111" }, - /*610*/ { "[4311]12345678901234567890123456789012345", 0, "431112345678901234567890123456789012345" }, - /*611*/ { "[4311]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*612*/ { "[4312]1", 0, "43121" }, - /*613*/ { "[4312]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43121234567890123456789012345678901234567890123456789012345678901234567890" }, - /*614*/ { "[4312]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*615*/ { "[4313]1", 0, "43131" }, - /*616*/ { "[4313]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43131234567890123456789012345678901234567890123456789012345678901234567890" }, - /*617*/ { "[4313]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*618*/ { "[4314]1", 0, "43141" }, - /*619*/ { "[4314]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43141234567890123456789012345678901234567890123456789012345678901234567890" }, - /*620*/ { "[4314]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*621*/ { "[4315]1", 0, "43151" }, - /*622*/ { "[4315]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43151234567890123456789012345678901234567890123456789012345678901234567890" }, - /*623*/ { "[4315]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*624*/ { "[4316]1", 0, "43161" }, - /*625*/ { "[4316]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43161234567890123456789012345678901234567890123456789012345678901234567890" }, - /*626*/ { "[4316]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*627*/ { "[4317]FR", 0, "4317FR" }, - /*628*/ { "[4317]F", ZINT_ERROR_INVALID_DATA, "" }, - /*629*/ { "[4317]FRF", ZINT_ERROR_INVALID_DATA, "" }, - /*630*/ { "[4318]1", 0, "43181" }, - /*631*/ { "[4318]12345678901234567890", 0, "431812345678901234567890" }, - /*632*/ { "[4318]123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*633*/ { "[4319]1", 0, "43191" }, - /*634*/ { "[4319]123456789012345678901234567890", 0, "4319123456789012345678901234567890" }, - /*635*/ { "[4319]1234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*636*/ { "[432]1", ZINT_ERROR_INVALID_DATA, "" }, - /*637*/ { "[4320]1", 0, "43201" }, - /*638*/ { "[4320]12345678901234567890123456789012345", 0, "432012345678901234567890123456789012345" }, - /*639*/ { "[4320]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, - /*640*/ { "[4321]1", 0, "43211" }, - /*641*/ { "[4321]10", ZINT_ERROR_INVALID_DATA, "" }, - /*642*/ { "[4322]1", 0, "43221" }, - /*643*/ { "[4322]10", ZINT_ERROR_INVALID_DATA, "" }, - /*644*/ { "[4323]1", 0, "43231" }, - /*645*/ { "[4323]10", ZINT_ERROR_INVALID_DATA, "" }, - /*646*/ { "[4324]1212120000", 0, "43241212120000" }, - /*647*/ { "[4324]121212000", ZINT_ERROR_INVALID_DATA, "" }, - /*648*/ { "[4324]12121200000", ZINT_ERROR_INVALID_DATA, "" }, - /*649*/ { "[4325]1212120000", 0, "43251212120000" }, - /*650*/ { "[4325]121212000", ZINT_ERROR_INVALID_DATA, "" }, - /*651*/ { "[4325]12121200000", ZINT_ERROR_INVALID_DATA, "" }, - /*652*/ { "[4326]121212", 0, "4326121212" }, - /*653*/ { "[4326]12121", ZINT_ERROR_INVALID_DATA, "" }, - /*654*/ { "[4326]1212120", ZINT_ERROR_INVALID_DATA, "" }, - /*655*/ { "[4327]121212", ZINT_ERROR_INVALID_DATA, "" }, - /*656*/ { "[4328]121212", ZINT_ERROR_INVALID_DATA, "" }, - /*657*/ { "[4329]121212", ZINT_ERROR_INVALID_DATA, "" }, - /*658*/ { "[433]121212", ZINT_ERROR_INVALID_DATA, "" }, - /*659*/ { "[4330]121212", ZINT_ERROR_INVALID_DATA, "" }, - /*660*/ { "[44]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*661*/ { "[440]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*662*/ { "[4400]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*663*/ { "[49]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*664*/ { "[490]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*665*/ { "[4900]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*666*/ { "[499]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*667*/ { "[4990]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*668*/ { "[50]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*669*/ { "[500]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*670*/ { "[5000]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*671*/ { "[51]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*672*/ { "[510]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*673*/ { "[5100]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*674*/ { "[59]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*675*/ { "[590]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*676*/ { "[5900]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*677*/ { "[60]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*678*/ { "[600]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*679*/ { "[6000]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*680*/ { "[61]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*681*/ { "[610]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*682*/ { "[6100]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*683*/ { "[69]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*684*/ { "[690]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*685*/ { "[6900]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*686*/ { "[70]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*687*/ { "[700]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*688*/ { "[7000]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*689*/ { "[7001]1234567890123", 0, "70011234567890123" }, - /*690*/ { "[7001]123456789012", ZINT_ERROR_INVALID_DATA, "" }, - /*691*/ { "[7002]abcdefghijklmnopqrstuvwxyz1234", 0, "7002abcdefghijklmnopqrstuvwxyz1234" }, - /*692*/ { "[7002]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, - /*693*/ { "[7003]1212121212", 0, "70031212121212" }, - /*694*/ { "[7003]121212121", ZINT_ERROR_INVALID_DATA, "" }, - /*695*/ { "[7004]1234", 0, "70041234" }, - /*696*/ { "[7004]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*697*/ { "[7005]abcdefghijkl", 0, "7005abcdefghijkl" }, - /*698*/ { "[7005]abcdefghijklm", ZINT_ERROR_INVALID_DATA, "" }, - /*699*/ { "[7006]200132", ZINT_WARN_NONCOMPLIANT, "7006200132" }, - /*700*/ { "[7006]200100", ZINT_WARN_NONCOMPLIANT, "7006200100" }, - /*701*/ { "[7006]200120", 0, "7006200120" }, - /*702*/ { "[7006]2001320", ZINT_ERROR_INVALID_DATA, "" }, - /*703*/ { "[7007]010101121212", 0, "7007010101121212" }, - /*704*/ { "[7007]01010112121", ZINT_ERROR_INVALID_DATA, "" }, - /*705*/ { "[7007]A1010112121", ZINT_ERROR_INVALID_DATA, "" }, - /*706*/ { "[7007]121212", 0, "7007121212" }, - /*707*/ { "[7007]12121", ZINT_ERROR_INVALID_DATA, "" }, - /*708*/ { "[7007]1212121", ZINT_ERROR_INVALID_DATA, "" }, - /*709*/ { "[7008]abc", 0, "7008abc" }, - /*710*/ { "[7008]abcd", ZINT_ERROR_INVALID_DATA, "" }, - /*711*/ { "[7009]abcdefghij", 0, "7009abcdefghij" }, - /*712*/ { "[7009]abcdefghijk", ZINT_ERROR_INVALID_DATA, "" }, - /*713*/ { "[7010]01", 0, "701001" }, - /*714*/ { "[7010]1", 0, "70101" }, - /*715*/ { "[7010]012", ZINT_ERROR_INVALID_DATA, "" }, - /*716*/ { "[7011]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*717*/ { "[7012]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*718*/ { "[7019]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*719*/ { "[7020]abcdefghijklmnopqrst", 0, "7020abcdefghijklmnopqrst" }, - /*720*/ { "[7020]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*721*/ { "[7021]abcdefghijklmnopqrst", 0, "7021abcdefghijklmnopqrst" }, - /*722*/ { "[7021]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*723*/ { "[7022]abcdefghijklmnopqrst", 0, "7022abcdefghijklmnopqrst" }, - /*724*/ { "[7022]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*725*/ { "[7023]1234abcdefghijklmnopqrstuvwxyz", 0, "70231234abcdefghijklmnopqrstuvwxyz" }, - /*726*/ { "[7023]1234abcdefghijklmnopqrstuvwxyza", ZINT_ERROR_INVALID_DATA, "" }, - /*727*/ { "[7024]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*728*/ { "[7025]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*729*/ { "[7029]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*730*/ { "[7030]123abcdefghijklmnopqrstuvwxyza", ZINT_WARN_NONCOMPLIANT, "7030123abcdefghijklmnopqrstuvwxyza" }, - /*731*/ { "[7030]004abcdefghijklmnopqrstuvwxyza", 0, "7030004abcdefghijklmnopqrstuvwxyza" }, - /*732*/ { "[7030]123abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*733*/ { "[7031]123abcdefghijklmnopqrstuvwxyza", ZINT_WARN_NONCOMPLIANT, "7031123abcdefghijklmnopqrstuvwxyza" }, - /*734*/ { "[7031]004abcdefghijklmnopqrstuvwxyza", 0, "7031004abcdefghijklmnopqrstuvwxyza" }, - /*735*/ { "[7031]123abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*736*/ { "[7032]004abcdefghijklmnopqrstuvwxyza", 0, "7032004abcdefghijklmnopqrstuvwxyza" }, - /*737*/ { "[7032]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*738*/ { "[7033]004abcdefghijklmnopqrstuvwxyza", 0, "7033004abcdefghijklmnopqrstuvwxyza" }, - /*739*/ { "[7033]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*740*/ { "[7034]004abcdefghijklmnopqrstuvwxyza", 0, "7034004abcdefghijklmnopqrstuvwxyza" }, - /*741*/ { "[7034]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*742*/ { "[7035]004abcdefghijklmnopqrstuvwxyza", 0, "7035004abcdefghijklmnopqrstuvwxyza" }, - /*743*/ { "[7035]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*744*/ { "[7036]004abcdefghijklmnopqrstuvwxyza", 0, "7036004abcdefghijklmnopqrstuvwxyza" }, - /*745*/ { "[7036]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*746*/ { "[7037]004abcdefghijklmnopqrstuvwxyza", 0, "7037004abcdefghijklmnopqrstuvwxyza" }, - /*747*/ { "[7037]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*748*/ { "[7038]004abcdefghijklmnopqrstuvwxyza", 0, "7038004abcdefghijklmnopqrstuvwxyza" }, - /*749*/ { "[7038]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*750*/ { "[7039]004abcdefghijklmnopqrstuvwxyza", 0, "7039004abcdefghijklmnopqrstuvwxyza" }, - /*751*/ { "[7039]123abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, - /*752*/ { "[7040]1abc", 0, "70401abc" }, - /*753*/ { "[7040]1ab", ZINT_ERROR_INVALID_DATA, "" }, - /*754*/ { "[7040]1abcd", ZINT_ERROR_INVALID_DATA, "" }, - /*755*/ { "[7041]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*756*/ { "[7042]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*757*/ { "[7050]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*758*/ { "[7090]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*759*/ { "[7099]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*760*/ { "[71]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*761*/ { "[710]abcdefghijklmnopqrst", 0, "710abcdefghijklmnopqrst" }, - /*762*/ { "[710]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*763*/ { "[7100]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*764*/ { "[711]abcdefghijklmnopqrst", 0, "711abcdefghijklmnopqrst" }, - /*765*/ { "[711]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*766*/ { "[712]abcdefghijklmnopqrst", 0, "712abcdefghijklmnopqrst" }, - /*767*/ { "[712]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*768*/ { "[713]abcdefghijklmnopqrst", 0, "713abcdefghijklmnopqrst" }, - /*769*/ { "[713]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*770*/ { "[714]abcdefghijklmnopqrst", 0, "714abcdefghijklmnopqrst" }, - /*771*/ { "[714]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*772*/ { "[715]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*773*/ { "[716]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*774*/ { "[719]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*775*/ { "[72]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*776*/ { "[720]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*777*/ { "[7200]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*778*/ { "[721]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*779*/ { "[7210]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*780*/ { "[7220]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*781*/ { "[7230]EMabcdefghijklmnopqrstuvwxyzab", 0, "7230EMabcdefghijklmnopqrstuvwxyzab" }, - /*782*/ { "[7230]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*783*/ { "[7230]EM", ZINT_ERROR_INVALID_DATA, "" }, - /*784*/ { "[7231]EMabcdefghijklmnopqrstuvwxyzab", 0, "7231EMabcdefghijklmnopqrstuvwxyzab" }, - /*785*/ { "[7231]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*786*/ { "[7232]EMabcdefghijklmnopqrstuvwxyzab", 0, "7232EMabcdefghijklmnopqrstuvwxyzab" }, - /*787*/ { "[7232]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*788*/ { "[7233]EMabcdefghijklmnopqrstuvwxyzab", 0, "7233EMabcdefghijklmnopqrstuvwxyzab" }, - /*789*/ { "[7233]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*790*/ { "[7234]EMabcdefghijklmnopqrstuvwxyzab", 0, "7234EMabcdefghijklmnopqrstuvwxyzab" }, - /*791*/ { "[7234]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*792*/ { "[7235]EMabcdefghijklmnopqrstuvwxyzab", 0, "7235EMabcdefghijklmnopqrstuvwxyzab" }, - /*793*/ { "[7235]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*794*/ { "[7236]EMabcdefghijklmnopqrstuvwxyzab", 0, "7236EMabcdefghijklmnopqrstuvwxyzab" }, - /*795*/ { "[7236]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*796*/ { "[7237]EMabcdefghijklmnopqrstuvwxyzab", 0, "7237EMabcdefghijklmnopqrstuvwxyzab" }, - /*797*/ { "[7237]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*798*/ { "[7238]EMabcdefghijklmnopqrstuvwxyzab", 0, "7238EMabcdefghijklmnopqrstuvwxyzab" }, - /*799*/ { "[7238]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*800*/ { "[7239]EMabcdefghijklmnopqrstuvwxyzab", 0, "7239EMabcdefghijklmnopqrstuvwxyzab" }, - /*801*/ { "[7239]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, - /*802*/ { "[7239]E", ZINT_ERROR_INVALID_DATA, "" }, - /*803*/ { "[7240]abcdefghijklmnopqrst", 0, "7240abcdefghijklmnopqrst" }, - /*804*/ { "[7240]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*805*/ { "[7241]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*806*/ { "[7249]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*807*/ { "[7250]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*808*/ { "[7299]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*809*/ { "[73]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*810*/ { "[7300]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*811*/ { "[74]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*812*/ { "[7400]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*813*/ { "[79]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*814*/ { "[7900]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*815*/ { "[7999]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*816*/ { "[80]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*817*/ { "[800]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*818*/ { "[8000]1234", ZINT_ERROR_INVALID_DATA, "" }, - /*819*/ { "[8001]12345678901234", ZINT_WARN_NONCOMPLIANT, "800112345678901234" }, - /*820*/ { "[8001]12345678901204", 0, "800112345678901204" }, - /*821*/ { "[8001]1234123456789012345", ZINT_ERROR_INVALID_DATA, "" }, - /*822*/ { "[8002]abcdefghijklmnopqrst", 0, "8002abcdefghijklmnopqrst" }, - /*823*/ { "[8002]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, - /*824*/ { "[8003]01234567890123abcdefghijklmnop", ZINT_WARN_NONCOMPLIANT, "800301234567890123abcdefghijklmnop" }, - /*825*/ { "[8003]01234567890128abcdefghijklmnop", 0, "800301234567890128abcdefghijklmnop" }, - /*826*/ { "[8003]01234567890128abcdefghijklmnopq", ZINT_ERROR_INVALID_DATA, "" }, - /*827*/ { "[8004]abcdefghijklmnopqrstuvwxyz1234", ZINT_WARN_NONCOMPLIANT, "8004abcdefghijklmnopqrstuvwxyz1234" }, - /*828*/ { "[8004]12cdefghijklmnopqrstuvwxyz1234", 0, "800412cdefghijklmnopqrstuvwxyz1234" }, - /*829*/ { "[8004]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, - /*830*/ { "[8005]123456", 0, "8005123456" }, - /*831*/ { "[8005]12345", ZINT_ERROR_INVALID_DATA, "" }, - /*832*/ { "[8005]1234567", ZINT_ERROR_INVALID_DATA, "" }, - /*833*/ { "[8006]123456789012341212", ZINT_WARN_NONCOMPLIANT, "8006123456789012341212" }, - /*834*/ { "[8006]123456789012311212", 0, "8006123456789012311212" }, - /*835*/ { "[8006]12345678901234121", ZINT_ERROR_INVALID_DATA, "" }, - /*836*/ { "[8006]1234567890123412123", ZINT_ERROR_INVALID_DATA, "" }, - /*837*/ { "[8007]abcdefghijklmnopqrstuvwxyz12345678", ZINT_WARN_NONCOMPLIANT, "8007abcdefghijklmnopqrstuvwxyz12345678" }, - /*838*/ { "[8007]AD95EFGHIJKLMNOPQRSTUVWXYZ12345678", 0, "8007AD95EFGHIJKLMNOPQRSTUVWXYZ12345678" }, - /*839*/ { "[8007]AD95EFGHIJKLMNOPQRSTUVWXYZ123456789", ZINT_ERROR_INVALID_DATA, "" }, - /*840*/ { "[8008]123456121212", ZINT_WARN_NONCOMPLIANT, "8008123456121212" }, - /*841*/ { "[8008]121256121212", ZINT_WARN_NONCOMPLIANT, "8008121256121212" }, - /*842*/ { "[8008]121231121212", 0, "8008121231121212" }, - /*843*/ { "[8008]1234561212", ZINT_WARN_NONCOMPLIANT, "80081234561212" }, - /*844*/ { "[8008]1212311212", 0, "80081212311212" }, - /*845*/ { "[8008]12345612", ZINT_WARN_NONCOMPLIANT, "800812345612" }, - /*846*/ { "[8008]12010112", 0, "800812010112" }, - /*847*/ { "[8008]1234561", ZINT_ERROR_INVALID_DATA, "" }, - /*848*/ { "[8008]123456121", ZINT_ERROR_INVALID_DATA, "" }, - /*849*/ { "[8008]12345612121", ZINT_ERROR_INVALID_DATA, "" }, - /*850*/ { "[8008]1234561212123", ZINT_ERROR_INVALID_DATA, "" }, - /*851*/ { "[8009]12345678901234567890123456789012345678901234567890", 0, "800912345678901234567890123456789012345678901234567890" }, - /*852*/ { "[8009]123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, - /*853*/ { "[8010]1234abcdefghijklmnopqrstuvwxyz1", ZINT_ERROR_INVALID_DATA, "" }, - /*854*/ { "[8011]123456789012", 0, "8011123456789012" }, - /*855*/ { "[8011]1234567890123", ZINT_ERROR_INVALID_DATA, "" }, - /*856*/ { "[8012]abcdefghijklmnopqrst", 0, "8012abcdefghijklmnopqrst" }, - /*857*/ { "[8012]abcdefghijklmnopqrstuv", ZINT_ERROR_INVALID_DATA, "" }, - /*858*/ { "[8013]1234abcdefghijklmnopqrsQP", 0, "80131234abcdefghijklmnopqrsQP" }, + /* 3*/ { "[1]12", ZINT_ERROR_INVALID_DATA, "" }, + /* 4*/ { "[12345]12", ZINT_ERROR_INVALID_DATA, "" }, + /* 5*/ { "[9999]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 6*/ { "[[01]]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 7*/ { "[1A]12", ZINT_ERROR_INVALID_DATA, "" }, + /* 8*/ { "[10]", ZINT_ERROR_INVALID_DATA, "" }, + /* 9*/ { "[90]\n", ZINT_ERROR_INVALID_DATA, "" }, + /* 10*/ { "[90]\x7F", ZINT_ERROR_INVALID_DATA, "" }, + /* 11*/ { "[90]\x80", ZINT_ERROR_INVALID_DATA, "" }, + /* 12*/ { "[00]123456789012345678", ZINT_WARN_NONCOMPLIANT, "00123456789012345678" }, + /* 13*/ { "[00]123456789012345675", 0, "00123456789012345675" }, + /* 14*/ { "[00]12345678901234567", ZINT_ERROR_INVALID_DATA, "" }, + /* 15*/ { "[00]1234567890123456789", ZINT_ERROR_INVALID_DATA, "" }, + /* 16*/ { "[00]376104250021234569", 0, "00376104250021234569" }, + /* 17*/ { "[00]376104250021234568", ZINT_WARN_NONCOMPLIANT, "00376104250021234568" }, + /* 18*/ { "[01]12345678901234", ZINT_WARN_NONCOMPLIANT, "0112345678901234" }, + /* 19*/ { "[01]12345678901231", 0, "0112345678901231" }, + /* 20*/ { "[01]123456789012345", ZINT_ERROR_INVALID_DATA, "" }, + /* 21*/ { "[02]12345678901234", ZINT_WARN_NONCOMPLIANT, "0212345678901234" }, + /* 22*/ { "[02]12345678901231", 0, "0212345678901231" }, + /* 23*/ { "[02]1234567890123", ZINT_ERROR_INVALID_DATA, "" }, + /* 24*/ { "[03]12345678901234", ZINT_ERROR_INVALID_DATA, "" }, + /* 25*/ { "[04]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 26*/ { "[05]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 27*/ { "[06]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 28*/ { "[07]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 29*/ { "[08]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 30*/ { "[09]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 31*/ { "[10]ABCD123456", 0, "10ABCD123456" }, + /* 32*/ { "[10]123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /* 33*/ { "[100]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 34*/ { "[1000]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 35*/ { "[11]990102", 0, "11990102" }, + /* 36*/ { "[11]9901023", ZINT_ERROR_INVALID_DATA, "" }, + /* 37*/ { "[110]990102", ZINT_ERROR_INVALID_DATA, "" }, + /* 38*/ { "[1100]990102", ZINT_ERROR_INVALID_DATA, "" }, + /* 39*/ { "[12]000100", 0, "12000100" }, + /* 40*/ { "[12]00010", ZINT_ERROR_INVALID_DATA, "" }, + /* 41*/ { "[120]000100", ZINT_ERROR_INVALID_DATA, "" }, + /* 42*/ { "[1200]000100", ZINT_ERROR_INVALID_DATA, "" }, + /* 43*/ { "[13]991301", ZINT_WARN_NONCOMPLIANT, "13991301" }, + /* 44*/ { "[13]991201", 0, "13991201" }, + /* 45*/ { "[13]9913011", ZINT_ERROR_INVALID_DATA, "" }, + /* 46*/ { "[130]991301", ZINT_ERROR_INVALID_DATA, "" }, + /* 47*/ { "[1300]991301", ZINT_ERROR_INVALID_DATA, "" }, + /* 48*/ { "[14]991201", ZINT_ERROR_INVALID_DATA, "" }, + /* 49*/ { "[140]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 50*/ { "[1400]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 51*/ { "[15]021231", 0, "15021231" }, + /* 52*/ { "[15]02123", ZINT_ERROR_INVALID_DATA, "" }, + /* 53*/ { "[150]021231", ZINT_ERROR_INVALID_DATA, "" }, + /* 54*/ { "[1500]021231", ZINT_ERROR_INVALID_DATA, "" }, + /* 55*/ { "[16]000000", ZINT_WARN_NONCOMPLIANT, "16000000" }, + /* 56*/ { "[16]000100", 0, "16000100" }, + /* 57*/ { "[16]00000", ZINT_ERROR_INVALID_DATA, "" }, + /* 58*/ { "[160]000000", ZINT_ERROR_INVALID_DATA, "" }, + /* 59*/ { "[1600]000000", ZINT_ERROR_INVALID_DATA, "" }, + /* 60*/ { "[17]010200", 0, "17010200" }, + /* 61*/ { "[17]0102000", ZINT_ERROR_INVALID_DATA, "" }, + /* 62*/ { "[170]010200", ZINT_ERROR_INVALID_DATA, "" }, + /* 63*/ { "[1700]010200", ZINT_ERROR_INVALID_DATA, "" }, + /* 64*/ { "[18]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 65*/ { "[180]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 66*/ { "[1800]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 67*/ { "[19]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 68*/ { "[190]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 69*/ { "[1900]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 70*/ { "[20]12", 0, "2012" }, + /* 71*/ { "[20]1", ZINT_ERROR_INVALID_DATA, "" }, + /* 72*/ { "[200]12", ZINT_ERROR_INVALID_DATA, "" }, + /* 73*/ { "[2000]12", ZINT_ERROR_INVALID_DATA, "" }, + /* 74*/ { "[21]A12345678", 0, "21A12345678" }, + /* 75*/ { "[21]123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /* 76*/ { "[210]A12345678", ZINT_ERROR_INVALID_DATA, "" }, + /* 77*/ { "[2100]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 78*/ { "[22]abcdefghijklmnopqrst", 0, "22abcdefghijklmnopqrst" }, + /* 79*/ { "[22]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /* 80*/ { "[220]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 81*/ { "[2200]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 82*/ { "[23]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 83*/ { "[230]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 84*/ { "[2300]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 85*/ { "[235]1abcdefghijklmnopqrstuvwxyz0", 0, "2351abcdefghijklmnopqrstuvwxyz0" }, + /* 86*/ { "[235]1abcdefghijklmnopqrstuvwxyz01", ZINT_ERROR_INVALID_DATA, "" }, + /* 87*/ { "[24]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 88*/ { "[240]abcdefghijklmnopqrstuvwxyz1234", 0, "240abcdefghijklmnopqrstuvwxyz1234" }, + /* 89*/ { "[240]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, + /* 90*/ { "[2400]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 91*/ { "[241]abcdefghijklmnopqrstuvwxyz1234", 0, "241abcdefghijklmnopqrstuvwxyz1234" }, + /* 92*/ { "[241]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, + /* 93*/ { "[2410]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 94*/ { "[242]12345", 0, "24212345" }, + /* 95*/ { "[242]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /* 96*/ { "[2420]1234", ZINT_ERROR_INVALID_DATA, "" }, + /* 97*/ { "[243]abcdefghijklmnopqrst", 0, "243abcdefghijklmnopqrst" }, + /* 98*/ { "[243]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /* 99*/ { "[2430]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*100*/ { "[244]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*101*/ { "[2440]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*102*/ { "[249]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*103*/ { "[2490]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*104*/ { "[25]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*105*/ { "[250]abcdefghijklmnopqrstuvwxyz1234", 0, "250abcdefghijklmnopqrstuvwxyz1234" }, + /*106*/ { "[250]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, + /*107*/ { "[2500]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*108*/ { "[251]abcdefghijklmnopqrstuvwxyz1234", 0, "251abcdefghijklmnopqrstuvwxyz1234" }, + /*109*/ { "[251]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, + /*110*/ { "[2510]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*111*/ { "[252]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*112*/ { "[2520]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*113*/ { "[253]131313131313", ZINT_ERROR_INVALID_DATA, "" }, + /*114*/ { "[253]1313131313134", ZINT_WARN_NONCOMPLIANT, "2531313131313134" }, + /*115*/ { "[253]1313131313130", 0, "2531313131313130" }, + /*116*/ { "[253]131313131313412345678901234567", ZINT_WARN_NONCOMPLIANT, "253131313131313412345678901234567" }, + /*117*/ { "[253]131313131313012345678901234567", 0, "253131313131313012345678901234567" }, + /*118*/ { "[253]1313131313134123456789012345678", ZINT_ERROR_INVALID_DATA, "" }, + /*119*/ { "[2530]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*120*/ { "[254]abcdefghijklmnopqrst", 0, "254abcdefghijklmnopqrst" }, + /*121*/ { "[254]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*122*/ { "[2540]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*123*/ { "[255]131313131313", ZINT_ERROR_INVALID_DATA, "" }, + /*124*/ { "[255]1313131313134", ZINT_WARN_NONCOMPLIANT, "2551313131313134" }, + /*125*/ { "[255]1313131313130", 0, "2551313131313130" }, + /*126*/ { "[255]1313131313134123456789012", ZINT_WARN_NONCOMPLIANT, "2551313131313134123456789012" }, + /*127*/ { "[255]1313131313130123456789012", 0, "2551313131313130123456789012" }, + /*128*/ { "[255]13131313131341234567890123", ZINT_ERROR_INVALID_DATA, "" }, + /*129*/ { "[2550]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*130*/ { "[256]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*131*/ { "[2560]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*132*/ { "[259]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*133*/ { "[2590]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*134*/ { "[26]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*135*/ { "[260]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*136*/ { "[2600]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*137*/ { "[27]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*138*/ { "[270]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*139*/ { "[2700]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*140*/ { "[28]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*141*/ { "[280]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*142*/ { "[2800]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*143*/ { "[29]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*144*/ { "[290]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*145*/ { "[2900]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*146*/ { "[30]12345678", 0, "3012345678" }, + /*147*/ { "[30]123456789", ZINT_ERROR_INVALID_DATA, "" }, + /*148*/ { "[300]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*149*/ { "[3000]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*150*/ { "[31]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*151*/ { "[310]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*152*/ { "[3100]123456", 0, "3100123456" }, + /*153*/ { "[3100]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*154*/ { "[3101]123456", 0, "3101123456" }, + /*155*/ { "[3101]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*156*/ { "[3105]123456", 0, "3105123456" }, + /*157*/ { "[3105]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*158*/ { "[3106]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*159*/ { "[3109]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*160*/ { "[3110]123456", 0, "3110123456" }, + /*161*/ { "[3110]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*162*/ { "[3115]123456", 0, "3115123456" }, + /*163*/ { "[3115]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*164*/ { "[3116]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*165*/ { "[3119]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*166*/ { "[3120]123456", 0, "3120123456" }, + /*167*/ { "[3120]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*168*/ { "[3125]123456", 0, "3125123456" }, + /*169*/ { "[3125]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*170*/ { "[3126]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*171*/ { "[3129]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*172*/ { "[3130]123456", 0, "3130123456" }, + /*173*/ { "[3130]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*174*/ { "[3135]123456", 0, "3135123456" }, + /*175*/ { "[3135]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*176*/ { "[3136]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*177*/ { "[3139]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*178*/ { "[3140]123456", 0, "3140123456" }, + /*179*/ { "[3140]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*180*/ { "[3145]123456", 0, "3145123456" }, + /*181*/ { "[3145]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*182*/ { "[3146]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*183*/ { "[3149]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*184*/ { "[3150]123456", 0, "3150123456" }, + /*185*/ { "[3150]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*186*/ { "[3155]123456", 0, "3155123456" }, + /*187*/ { "[3155]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*188*/ { "[3156]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*189*/ { "[3159]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*190*/ { "[3160]123456", 0, "3160123456" }, + /*191*/ { "[3160]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*192*/ { "[3165]123456", 0, "3165123456" }, + /*193*/ { "[3165]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*194*/ { "[3166]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*195*/ { "[3169]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*196*/ { "[3170]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*197*/ { "[3179]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*198*/ { "[3180]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*199*/ { "[3189]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*200*/ { "[3190]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*201*/ { "[3199]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*202*/ { "[32]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*203*/ { "[320]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*204*/ { "[3200]123456", 0, "3200123456" }, + /*205*/ { "[3200]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*206*/ { "[3205]123456", 0, "3205123456" }, + /*207*/ { "[3205]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*208*/ { "[3206]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*209*/ { "[3209]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*210*/ { "[3210]123456", 0, "3210123456" }, + /*211*/ { "[3210]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*212*/ { "[3215]123456", 0, "3215123456" }, + /*213*/ { "[3215]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*214*/ { "[3216]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*215*/ { "[3219]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*216*/ { "[3220]123456", 0, "3220123456" }, + /*217*/ { "[3220]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*218*/ { "[3225]123456", 0, "3225123456" }, + /*219*/ { "[3225]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*220*/ { "[3229]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*221*/ { "[3230]123456", 0, "3230123456" }, + /*222*/ { "[3230]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*223*/ { "[3235]123456", 0, "3235123456" }, + /*224*/ { "[3235]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*225*/ { "[3239]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*226*/ { "[3240]123456", 0, "3240123456" }, + /*227*/ { "[3240]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*228*/ { "[3245]123456", 0, "3245123456" }, + /*229*/ { "[3245]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*230*/ { "[3249]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*231*/ { "[3250]123456", 0, "3250123456" }, + /*232*/ { "[3250]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*233*/ { "[3255]123456", 0, "3255123456" }, + /*234*/ { "[3255]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*235*/ { "[3259]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*236*/ { "[3260]123456", 0, "3260123456" }, + /*237*/ { "[3260]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*238*/ { "[3265]123456", 0, "3265123456" }, + /*239*/ { "[3265]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*240*/ { "[3269]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*241*/ { "[3270]123456", 0, "3270123456" }, + /*242*/ { "[3270]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*243*/ { "[3275]123456", 0, "3275123456" }, + /*244*/ { "[3275]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*245*/ { "[3279]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*246*/ { "[3280]123456", 0, "3280123456" }, + /*247*/ { "[3280]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*248*/ { "[3285]123456", 0, "3285123456" }, + /*249*/ { "[3285]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*250*/ { "[3289]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*251*/ { "[3290]123456", 0, "3290123456" }, + /*252*/ { "[3290]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*253*/ { "[3295]123456", 0, "3295123456" }, + /*254*/ { "[3295]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*255*/ { "[3296]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*256*/ { "[3299]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*257*/ { "[33]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*258*/ { "[330]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*259*/ { "[3300]123456", 0, "3300123456" }, + /*260*/ { "[3300]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*261*/ { "[3305]123456", 0, "3305123456" }, + /*262*/ { "[3305]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*263*/ { "[3306]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*264*/ { "[3309]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*265*/ { "[3310]123456", 0, "3310123456" }, + /*266*/ { "[3310]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*267*/ { "[3319]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*268*/ { "[3320]123456", 0, "3320123456" }, + /*269*/ { "[3320]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*270*/ { "[3329]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*271*/ { "[3330]123456", 0, "3330123456" }, + /*272*/ { "[3330]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*273*/ { "[3339]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*274*/ { "[3340]123456", 0, "3340123456" }, + /*275*/ { "[3340]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*276*/ { "[3349]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*277*/ { "[3350]123456", 0, "3350123456" }, + /*278*/ { "[3350]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*279*/ { "[3359]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*280*/ { "[3360]123456", 0, "3360123456" }, + /*281*/ { "[3360]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*282*/ { "[3369]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*283*/ { "[3370]123456", 0, "3370123456" }, + /*284*/ { "[3370]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*285*/ { "[3375]123456", 0, "3375123456" }, + /*286*/ { "[3375]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*287*/ { "[3376]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*288*/ { "[3379]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*289*/ { "[3380]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*290*/ { "[3390]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*291*/ { "[3399]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*292*/ { "[34]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*293*/ { "[340]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*294*/ { "[3400]123456", 0, "3400123456" }, + /*295*/ { "[3400]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*296*/ { "[3405]123456", 0, "3405123456" }, + /*297*/ { "[3405]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*298*/ { "[3406]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*299*/ { "[3409]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*300*/ { "[3410]123456", 0, "3410123456" }, + /*301*/ { "[3410]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*302*/ { "[3419]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*303*/ { "[3420]123456", 0, "3420123456" }, + /*304*/ { "[3420]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*305*/ { "[3429]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*306*/ { "[3430]123456", 0, "3430123456" }, + /*307*/ { "[3430]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*308*/ { "[3439]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*309*/ { "[3440]123456", 0, "3440123456" }, + /*310*/ { "[3440]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*311*/ { "[3449]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*312*/ { "[3450]123456", 0, "3450123456" }, + /*313*/ { "[3450]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*314*/ { "[3459]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*315*/ { "[3460]123456", 0, "3460123456" }, + /*316*/ { "[3460]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*317*/ { "[3469]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*318*/ { "[3470]123456", 0, "3470123456" }, + /*319*/ { "[3470]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*320*/ { "[3479]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*321*/ { "[3480]123456", 0, "3480123456" }, + /*322*/ { "[3480]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*323*/ { "[3489]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*324*/ { "[3490]123456", 0, "3490123456" }, + /*325*/ { "[3490]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*326*/ { "[3495]123456", 0, "3495123456" }, + /*327*/ { "[3495]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*328*/ { "[3496]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*329*/ { "[3499]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*330*/ { "[35]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*331*/ { "[350]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*332*/ { "[3500]123456", 0, "3500123456" }, + /*333*/ { "[3500]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*334*/ { "[3505]123456", 0, "3505123456" }, + /*335*/ { "[3505]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*336*/ { "[3506]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*337*/ { "[3509]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*338*/ { "[3510]123456", 0, "3510123456", }, + /*339*/ { "[3510]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*340*/ { "[3519]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*341*/ { "[3520]123456", 0, "3520123456", }, + /*342*/ { "[3520]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*343*/ { "[3529]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*344*/ { "[3530]123456", 0, "3530123456", }, + /*345*/ { "[3530]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*346*/ { "[3539]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*347*/ { "[3540]123456", 0, "3540123456", }, + /*348*/ { "[3540]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*349*/ { "[3549]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*350*/ { "[3550]123456", 0, "3550123456", }, + /*351*/ { "[3550]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*352*/ { "[3559]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*353*/ { "[3560]123456", 0, "3560123456", }, + /*354*/ { "[3560]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*355*/ { "[3569]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*356*/ { "[3570]123456", 0, "3570123456", }, + /*357*/ { "[3570]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*358*/ { "[3575]123456", 0, "3575123456" }, + /*359*/ { "[3376]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*360*/ { "[3579]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*361*/ { "[3580]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*362*/ { "[3590]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*363*/ { "[3599]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*364*/ { "[36]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*365*/ { "[360]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*366*/ { "[3600]123456", 0, "3600123456" }, + /*367*/ { "[3600]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*368*/ { "[3605]123456", 0, "3605123456" }, + /*369*/ { "[3605]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*370*/ { "[3606]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*371*/ { "[3609]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*372*/ { "[3610]123456", 0, "3610123456" }, + /*373*/ { "[3610]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*374*/ { "[3619]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*375*/ { "[3620]123456", 0, "3620123456", }, + /*376*/ { "[3620]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*377*/ { "[3629]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*378*/ { "[3630]123456", 0, "3630123456", }, + /*379*/ { "[3630]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*380*/ { "[3639]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*381*/ { "[3640]123456", 0, "3640123456", }, + /*382*/ { "[3640]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*383*/ { "[3649]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*384*/ { "[3650]123456", 0, "3650123456", }, + /*385*/ { "[3650]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*386*/ { "[3659]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*387*/ { "[3660]123456", 0, "3660123456", }, + /*388*/ { "[3660]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*389*/ { "[3669]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*390*/ { "[3670]123456", 0, "3670123456", }, + /*391*/ { "[3670]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*392*/ { "[3679]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*393*/ { "[3680]123456", 0, "3680123456", }, + /*394*/ { "[3680]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*395*/ { "[3689]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*396*/ { "[3690]123456", 0, "3690123456" }, + /*397*/ { "[3690]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*398*/ { "[3695]123456", 0, "3695123456" }, + /*399*/ { "[3695]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*400*/ { "[3696]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*401*/ { "[3699]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*402*/ { "[37]12345678", 0, "3712345678" }, + /*403*/ { "[37]123456789", ZINT_ERROR_INVALID_DATA, "" }, + /*404*/ { "[370]12345678", ZINT_ERROR_INVALID_DATA, "" }, + /*405*/ { "[3700]12345678", ZINT_ERROR_INVALID_DATA, "" }, + /*406*/ { "[38]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*407*/ { "[380]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*408*/ { "[3800]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*409*/ { "[39]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*410*/ { "[390]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*411*/ { "[3900]123456789012345", 0, "3900123456789012345" }, + /*412*/ { "[3900]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*413*/ { "[3900]12345678901234", 0, "390012345678901234" }, + /*414*/ { "[3901]123456789012345", 0, "3901123456789012345" }, + /*415*/ { "[3901]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*416*/ { "[3905]123456789012345", 0, "3905123456789012345" }, + /*417*/ { "[3909]123456789012345", 0, "3909123456789012345" }, + /*418*/ { "[3909]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*419*/ { "[3910]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3910123123456789012345" }, + /*420*/ { "[3910]997123456789012345", 0, "3910997123456789012345" }, + /*421*/ { "[3910]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*422*/ { "[3910]123", ZINT_ERROR_INVALID_DATA, "" }, + /*423*/ { "[3915]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3915123123456789012345" }, + /*424*/ { "[3915]997123456789012345", 0, "3915997123456789012345" }, + /*425*/ { "[3915]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*426*/ { "[3919]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3919123123456789012345" }, + /*427*/ { "[3919]997123456789012345", 0, "3919997123456789012345" }, + /*428*/ { "[3919]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*429*/ { "[3920]123456789012345", 0, "3920123456789012345" }, + /*430*/ { "[3920]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*431*/ { "[3925]123456789012345", 0, "3925123456789012345" }, + /*432*/ { "[3925]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*433*/ { "[3929]123456789012345", 0, "3929123456789012345" }, + /*434*/ { "[3929]1234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*435*/ { "[3930]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3930123123456789012345" }, + /*436*/ { "[3930]997123456789012345", 0, "3930997123456789012345" }, + /*437*/ { "[3930]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*438*/ { "[3930]123", ZINT_ERROR_INVALID_DATA, "" }, + /*439*/ { "[3935]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3935123123456789012345" }, + /*440*/ { "[3935]997123456789012345", 0, "3935997123456789012345" }, + /*441*/ { "[3935]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*442*/ { "[3939]123123456789012345", ZINT_WARN_NONCOMPLIANT, "3939123123456789012345" }, + /*443*/ { "[3939]997123456789012345", 0, "3939997123456789012345" }, + /*444*/ { "[3939]1231234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*445*/ { "[3940]1234", 0, "39401234" }, + /*446*/ { "[3940]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*447*/ { "[3940]123", ZINT_ERROR_INVALID_DATA, "" }, + /*448*/ { "[3941]1234", 0, "39411234" }, + /*449*/ { "[3941]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*450*/ { "[3941]123", ZINT_ERROR_INVALID_DATA, "" }, + /*451*/ { "[3942]1234", 0, "39421234" }, + /*452*/ { "[3942]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*453*/ { "[3943]1234", 0, "39431234" }, + /*454*/ { "[3943]123", ZINT_ERROR_INVALID_DATA, "" }, + /*455*/ { "[3944]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*456*/ { "[3945]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*457*/ { "[3949]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*458*/ { "[3950]123456", 0, "3950123456" }, + /*459*/ { "[3950]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*460*/ { "[3950]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*461*/ { "[3951]123456", 0, "3951123456" }, + /*462*/ { "[3951]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*463*/ { "[3952]123456", 0, "3952123456" }, + /*464*/ { "[3952]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*465*/ { "[3953]123456", 0, "3953123456" }, + /*466*/ { "[3953]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*467*/ { "[3954]123456", 0, "3954123456" }, + /*468*/ { "[3954]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*469*/ { "[3955]123456", 0, "3955123456" }, + /*470*/ { "[3955]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*471*/ { "[3956]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*472*/ { "[3959]123456", ZINT_ERROR_INVALID_DATA, "" }, + /*473*/ { "[3960]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*474*/ { "[3970]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*475*/ { "[3980]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*476*/ { "[3999]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*477*/ { "[40]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*478*/ { "[400]123456789012345678901234567890", 0, "400123456789012345678901234567890" }, + /*479*/ { "[400]1234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*480*/ { "[4000]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*481*/ { "[401]1234abcdefghijklmnopqrstuvwxyz", 0, "4011234abcdefghijklmnopqrstuvwxyz" }, + /*482*/ { "[401]1234abcdefghijklmnopqrstuvwxyz1", ZINT_ERROR_INVALID_DATA, "" }, + /*483*/ { "[4010]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*484*/ { "[402]13131313131313132", ZINT_WARN_NONCOMPLIANT, "40213131313131313132" }, + /*485*/ { "[402]13131313131313130", 0, "40213131313131313130" }, + /*486*/ { "[402]1313131313131313", ZINT_ERROR_INVALID_DATA, "" }, + /*487*/ { "[4020]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*488*/ { "[403]abcdefghijklmnopqrstuvwxyz1234", 0, "403abcdefghijklmnopqrstuvwxyz1234" }, + /*489*/ { "[403]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, + /*490*/ { "[4030]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*491*/ { "[404]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*492*/ { "[4040]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*493*/ { "[409]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*494*/ { "[4090]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*495*/ { "[41]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*496*/ { "[410]3898765432108", 0, "4103898765432108" }, + /*497*/ { "[410]12345678901234", ZINT_ERROR_INVALID_DATA, "" }, + /*498*/ { "[4100]12345678901234", ZINT_ERROR_INVALID_DATA, "" }, + /*499*/ { "[411]1313131313134", ZINT_WARN_NONCOMPLIANT, "4111313131313134" }, + /*500*/ { "[411]1313131313130", 0, "4111313131313130" }, + /*501*/ { "[411]13131313131", ZINT_ERROR_INVALID_DATA, "" }, + /*502*/ { "[4110]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, + /*503*/ { "[412]1313131313130", 0, "4121313131313130" }, + /*504*/ { "[412]13131313131", ZINT_ERROR_INVALID_DATA, "" }, + /*505*/ { "[4120]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, + /*506*/ { "[413]1313131313130", 0, "4131313131313130" }, + /*507*/ { "[413]13131313131", ZINT_ERROR_INVALID_DATA, "" }, + /*508*/ { "[4130]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, + /*509*/ { "[414]1313131313130", 0, "4141313131313130" }, + /*510*/ { "[414]13131313131", ZINT_ERROR_INVALID_DATA, "" }, + /*511*/ { "[4140]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, + /*512*/ { "[415]1313131313130", 0, "4151313131313130" }, + /*513*/ { "[415]13131313131", ZINT_ERROR_INVALID_DATA, "" }, + /*514*/ { "[4150]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, + /*515*/ { "[416]1313131313130", 0, "4161313131313130" }, + /*516*/ { "[416]13131313131", ZINT_ERROR_INVALID_DATA, "" }, + /*517*/ { "[4160]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, + /*518*/ { "[417]1313131313130", 0, "4171313131313130" }, + /*519*/ { "[417]13131313131", ZINT_ERROR_INVALID_DATA, "" }, + /*520*/ { "[4170]1313131313134", ZINT_ERROR_INVALID_DATA, "" }, + /*521*/ { "[418]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*522*/ { "[4180]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*523*/ { "[419]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*524*/ { "[4190]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*525*/ { "[42]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*526*/ { "[420]abcdefghijklmnopqrst", 0, "420abcdefghijklmnopqrst" }, + /*527*/ { "[420]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*528*/ { "[4200]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*529*/ { "[421]123abcdefghi", ZINT_WARN_NONCOMPLIANT, "421123abcdefghi" }, + /*530*/ { "[421]434abcdefghi", 0, "421434abcdefghi" }, + /*531*/ { "[421]123abcdefghij", ZINT_ERROR_INVALID_DATA, "" }, + /*532*/ { "[421]1231", ZINT_WARN_NONCOMPLIANT, "4211231" }, + /*533*/ { "[421]4341", 0, "4214341" }, + /*534*/ { "[421]123", ZINT_ERROR_INVALID_DATA, "" }, + /*535*/ { "[4210]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*536*/ { "[422]123", ZINT_WARN_NONCOMPLIANT, "422123" }, + /*537*/ { "[422]004", 0, "422004" }, + /*538*/ { "[422]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*539*/ { "[422]12", ZINT_ERROR_INVALID_DATA, "" }, + /*540*/ { "[4220]123", ZINT_ERROR_INVALID_DATA, "" }, + /*541*/ { "[423]123123123123123", ZINT_WARN_NONCOMPLIANT, "423123123123123123" }, + /*542*/ { "[423]470004012887123", ZINT_WARN_NONCOMPLIANT, "423470004012887123" }, + /*543*/ { "[423]470004012887438", 0, "423470004012887438" }, + /*544*/ { "[423]1231231231231231", ZINT_ERROR_INVALID_DATA, "4231231231231231231" }, + /*545*/ { "[423]12312312312312", ZINT_WARN_NONCOMPLIANT, "42312312312312312" }, + /*546*/ { "[423]1231231231231", ZINT_WARN_NONCOMPLIANT, "4231231231231231" }, + /*547*/ { "[423]12312312312", ZINT_WARN_NONCOMPLIANT, "42312312312312" }, + /*548*/ { "[423]1231231231", ZINT_WARN_NONCOMPLIANT, "4231231231231" }, + /*549*/ { "[423]123", ZINT_WARN_NONCOMPLIANT, "423123" }, + /*550*/ { "[423]004", 0, "423004" }, + /*551*/ { "[423]12", ZINT_ERROR_INVALID_DATA, "" }, + /*552*/ { "[4230]123123123123123", ZINT_ERROR_INVALID_DATA, "" }, + /*553*/ { "[424]123", ZINT_WARN_NONCOMPLIANT, "424123" }, + /*554*/ { "[424]004", 0, "424004" }, + /*555*/ { "[424]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*556*/ { "[424]12", ZINT_ERROR_INVALID_DATA, "" }, + /*557*/ { "[4240]123", ZINT_ERROR_INVALID_DATA, "" }, + /*558*/ { "[425]123123123123123", ZINT_WARN_NONCOMPLIANT, "425123123123123123" }, + /*559*/ { "[425]010500276634894", 0, "425010500276634894" }, + /*560*/ { "[425]010500276123894", ZINT_WARN_NONCOMPLIANT, "425010500276123894" }, + /*561*/ { "[425]1231231231231231", ZINT_ERROR_INVALID_DATA, "" }, + /*562*/ { "[425]12", ZINT_ERROR_INVALID_DATA, "" }, + /*563*/ { "[4250]123123123123123", ZINT_ERROR_INVALID_DATA, "" }, + /*564*/ { "[426]123", ZINT_WARN_NONCOMPLIANT, "426123" }, + /*565*/ { "[426]426", 0, "426426" }, + /*566*/ { "[426]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*567*/ { "[426]12", ZINT_ERROR_INVALID_DATA, "" }, + /*568*/ { "[4260]123", ZINT_ERROR_INVALID_DATA, "" }, + /*569*/ { "[427]abc", 0, "427abc" }, + /*570*/ { "[427]abcd", ZINT_ERROR_INVALID_DATA, "" }, + /*571*/ { "[4270]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*572*/ { "[428]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*573*/ { "[4280]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*574*/ { "[429]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*575*/ { "[4290]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*576*/ { "[43]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*577*/ { "[430]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*578*/ { "[4300]1", 0, "43001" }, + /*579*/ { "[4300]12345678901234567890123456789012345", 0, "430012345678901234567890123456789012345" }, + /*580*/ { "[4300]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*581*/ { "[4301]1", 0, "43011" }, + /*582*/ { "[4301]12345678901234567890123456789012345", 0, "430112345678901234567890123456789012345" }, + /*583*/ { "[4301]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*584*/ { "[4302]1", 0, "43021" }, + /*585*/ { "[4302]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43021234567890123456789012345678901234567890123456789012345678901234567890" }, + /*586*/ { "[4302]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*587*/ { "[4303]1", 0, "43031" }, + /*588*/ { "[4303]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43031234567890123456789012345678901234567890123456789012345678901234567890" }, + /*589*/ { "[4303]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*590*/ { "[4304]1", 0, "43041" }, + /*591*/ { "[4304]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43041234567890123456789012345678901234567890123456789012345678901234567890" }, + /*592*/ { "[4304]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*593*/ { "[4305]1", 0, "43051" }, + /*594*/ { "[4305]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43051234567890123456789012345678901234567890123456789012345678901234567890" }, + /*595*/ { "[4305]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*596*/ { "[4306]1", 0, "43061" }, + /*597*/ { "[4306]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43061234567890123456789012345678901234567890123456789012345678901234567890" }, + /*598*/ { "[4306]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*599*/ { "[4307]FR", 0, "4307FR" }, + /*600*/ { "[4307]F", ZINT_ERROR_INVALID_DATA, "" }, + /*601*/ { "[4307]FRR", ZINT_ERROR_INVALID_DATA, "" }, + /*602*/ { "[4308]1", 0, "43081" }, + /*603*/ { "[4308]123456789012345678901234567890", 0, "4308123456789012345678901234567890" }, + /*604*/ { "[4308]1234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*605*/ { "[4309]1", ZINT_ERROR_INVALID_DATA, "" }, + /*606*/ { "[431]1", ZINT_ERROR_INVALID_DATA, "" }, + /*607*/ { "[4310]1", 0, "43101" }, + /*608*/ { "[4310]12345678901234567890123456789012345", 0, "431012345678901234567890123456789012345" }, + /*609*/ { "[4310]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*610*/ { "[4311]1", 0, "43111" }, + /*611*/ { "[4311]12345678901234567890123456789012345", 0, "431112345678901234567890123456789012345" }, + /*612*/ { "[4311]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*613*/ { "[4312]1", 0, "43121" }, + /*614*/ { "[4312]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43121234567890123456789012345678901234567890123456789012345678901234567890" }, + /*615*/ { "[4312]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*616*/ { "[4313]1", 0, "43131" }, + /*617*/ { "[4313]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43131234567890123456789012345678901234567890123456789012345678901234567890" }, + /*618*/ { "[4313]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*619*/ { "[4314]1", 0, "43141" }, + /*620*/ { "[4314]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43141234567890123456789012345678901234567890123456789012345678901234567890" }, + /*621*/ { "[4314]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*622*/ { "[4315]1", 0, "43151" }, + /*623*/ { "[4315]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43151234567890123456789012345678901234567890123456789012345678901234567890" }, + /*624*/ { "[4315]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*625*/ { "[4316]1", 0, "43161" }, + /*626*/ { "[4316]1234567890123456789012345678901234567890123456789012345678901234567890", 0, "43161234567890123456789012345678901234567890123456789012345678901234567890" }, + /*627*/ { "[4316]12345678901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*628*/ { "[4317]FR", 0, "4317FR" }, + /*629*/ { "[4317]F", ZINT_ERROR_INVALID_DATA, "" }, + /*630*/ { "[4317]FRF", ZINT_ERROR_INVALID_DATA, "" }, + /*631*/ { "[4318]1", 0, "43181" }, + /*632*/ { "[4318]12345678901234567890", 0, "431812345678901234567890" }, + /*633*/ { "[4318]123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*634*/ { "[4319]1", 0, "43191" }, + /*635*/ { "[4319]123456789012345678901234567890", 0, "4319123456789012345678901234567890" }, + /*636*/ { "[4319]1234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*637*/ { "[432]1", ZINT_ERROR_INVALID_DATA, "" }, + /*638*/ { "[4320]1", 0, "43201" }, + /*639*/ { "[4320]12345678901234567890123456789012345", 0, "432012345678901234567890123456789012345" }, + /*640*/ { "[4320]123456789012345678901234567890123456", ZINT_ERROR_INVALID_DATA, "" }, + /*641*/ { "[4321]1", 0, "43211" }, + /*642*/ { "[4321]10", ZINT_ERROR_INVALID_DATA, "" }, + /*643*/ { "[4322]1", 0, "43221" }, + /*644*/ { "[4322]10", ZINT_ERROR_INVALID_DATA, "" }, + /*645*/ { "[4323]1", 0, "43231" }, + /*646*/ { "[4323]10", ZINT_ERROR_INVALID_DATA, "" }, + /*647*/ { "[4324]1212120000", 0, "43241212120000" }, + /*648*/ { "[4324]121212000", ZINT_ERROR_INVALID_DATA, "" }, + /*649*/ { "[4324]12121200000", ZINT_ERROR_INVALID_DATA, "" }, + /*650*/ { "[4325]1212120000", 0, "43251212120000" }, + /*651*/ { "[4325]121212000", ZINT_ERROR_INVALID_DATA, "" }, + /*652*/ { "[4325]12121200000", ZINT_ERROR_INVALID_DATA, "" }, + /*653*/ { "[4326]121212", 0, "4326121212" }, + /*654*/ { "[4326]12121", ZINT_ERROR_INVALID_DATA, "" }, + /*655*/ { "[4326]1212120", ZINT_ERROR_INVALID_DATA, "" }, + /*656*/ { "[4327]121212", ZINT_ERROR_INVALID_DATA, "" }, + /*657*/ { "[4328]121212", ZINT_ERROR_INVALID_DATA, "" }, + /*658*/ { "[4329]121212", ZINT_ERROR_INVALID_DATA, "" }, + /*659*/ { "[433]121212", ZINT_ERROR_INVALID_DATA, "" }, + /*660*/ { "[4330]121212", ZINT_ERROR_INVALID_DATA, "" }, + /*661*/ { "[44]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*662*/ { "[440]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*663*/ { "[4400]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*664*/ { "[49]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*665*/ { "[490]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*666*/ { "[4900]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*667*/ { "[499]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*668*/ { "[4990]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*669*/ { "[50]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*670*/ { "[500]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*671*/ { "[5000]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*672*/ { "[51]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*673*/ { "[510]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*674*/ { "[5100]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*675*/ { "[59]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*676*/ { "[590]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*677*/ { "[5900]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*678*/ { "[60]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*679*/ { "[600]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*680*/ { "[6000]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*681*/ { "[61]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*682*/ { "[610]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*683*/ { "[6100]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*684*/ { "[69]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*685*/ { "[690]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*686*/ { "[6900]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*687*/ { "[70]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*688*/ { "[700]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*689*/ { "[7000]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*690*/ { "[7001]1234567890123", 0, "70011234567890123" }, + /*691*/ { "[7001]123456789012", ZINT_ERROR_INVALID_DATA, "" }, + /*692*/ { "[7002]abcdefghijklmnopqrstuvwxyz1234", 0, "7002abcdefghijklmnopqrstuvwxyz1234" }, + /*693*/ { "[7002]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, + /*694*/ { "[7003]1212121212", 0, "70031212121212" }, + /*695*/ { "[7003]121212121", ZINT_ERROR_INVALID_DATA, "" }, + /*696*/ { "[7004]1234", 0, "70041234" }, + /*697*/ { "[7004]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*698*/ { "[7005]abcdefghijkl", 0, "7005abcdefghijkl" }, + /*699*/ { "[7005]abcdefghijklm", ZINT_ERROR_INVALID_DATA, "" }, + /*700*/ { "[7006]200132", ZINT_WARN_NONCOMPLIANT, "7006200132" }, + /*701*/ { "[7006]200100", ZINT_WARN_NONCOMPLIANT, "7006200100" }, + /*702*/ { "[7006]200120", 0, "7006200120" }, + /*703*/ { "[7006]2001320", ZINT_ERROR_INVALID_DATA, "" }, + /*704*/ { "[7007]010101121212", 0, "7007010101121212" }, + /*705*/ { "[7007]01010112121", ZINT_ERROR_INVALID_DATA, "" }, + /*706*/ { "[7007]A1010112121", ZINT_ERROR_INVALID_DATA, "" }, + /*707*/ { "[7007]121212", 0, "7007121212" }, + /*708*/ { "[7007]12121", ZINT_ERROR_INVALID_DATA, "" }, + /*709*/ { "[7007]1212121", ZINT_ERROR_INVALID_DATA, "" }, + /*710*/ { "[7008]abc", 0, "7008abc" }, + /*711*/ { "[7008]abcd", ZINT_ERROR_INVALID_DATA, "" }, + /*712*/ { "[7009]abcdefghij", 0, "7009abcdefghij" }, + /*713*/ { "[7009]abcdefghijk", ZINT_ERROR_INVALID_DATA, "" }, + /*714*/ { "[7010]01", 0, "701001" }, + /*715*/ { "[7010]1", 0, "70101" }, + /*716*/ { "[7010]012", ZINT_ERROR_INVALID_DATA, "" }, + /*717*/ { "[7011]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*718*/ { "[7012]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*719*/ { "[7019]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*720*/ { "[7020]abcdefghijklmnopqrst", 0, "7020abcdefghijklmnopqrst" }, + /*721*/ { "[7020]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*722*/ { "[7021]abcdefghijklmnopqrst", 0, "7021abcdefghijklmnopqrst" }, + /*723*/ { "[7021]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*724*/ { "[7022]abcdefghijklmnopqrst", 0, "7022abcdefghijklmnopqrst" }, + /*725*/ { "[7022]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*726*/ { "[7023]1234abcdefghijklmnopqrstuvwxyz", 0, "70231234abcdefghijklmnopqrstuvwxyz" }, + /*727*/ { "[7023]1234abcdefghijklmnopqrstuvwxyza", ZINT_ERROR_INVALID_DATA, "" }, + /*728*/ { "[7024]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*729*/ { "[7025]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*730*/ { "[7029]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*731*/ { "[7030]123abcdefghijklmnopqrstuvwxyza", ZINT_WARN_NONCOMPLIANT, "7030123abcdefghijklmnopqrstuvwxyza" }, + /*732*/ { "[7030]004abcdefghijklmnopqrstuvwxyza", 0, "7030004abcdefghijklmnopqrstuvwxyza" }, + /*733*/ { "[7030]123abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*734*/ { "[7031]123abcdefghijklmnopqrstuvwxyza", ZINT_WARN_NONCOMPLIANT, "7031123abcdefghijklmnopqrstuvwxyza" }, + /*735*/ { "[7031]004abcdefghijklmnopqrstuvwxyza", 0, "7031004abcdefghijklmnopqrstuvwxyza" }, + /*736*/ { "[7031]123abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*737*/ { "[7032]004abcdefghijklmnopqrstuvwxyza", 0, "7032004abcdefghijklmnopqrstuvwxyza" }, + /*738*/ { "[7032]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*739*/ { "[7033]004abcdefghijklmnopqrstuvwxyza", 0, "7033004abcdefghijklmnopqrstuvwxyza" }, + /*740*/ { "[7033]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*741*/ { "[7034]004abcdefghijklmnopqrstuvwxyza", 0, "7034004abcdefghijklmnopqrstuvwxyza" }, + /*742*/ { "[7034]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*743*/ { "[7035]004abcdefghijklmnopqrstuvwxyza", 0, "7035004abcdefghijklmnopqrstuvwxyza" }, + /*744*/ { "[7035]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*745*/ { "[7036]004abcdefghijklmnopqrstuvwxyza", 0, "7036004abcdefghijklmnopqrstuvwxyza" }, + /*746*/ { "[7036]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*747*/ { "[7037]004abcdefghijklmnopqrstuvwxyza", 0, "7037004abcdefghijklmnopqrstuvwxyza" }, + /*748*/ { "[7037]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*749*/ { "[7038]004abcdefghijklmnopqrstuvwxyza", 0, "7038004abcdefghijklmnopqrstuvwxyza" }, + /*750*/ { "[7038]004abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*751*/ { "[7039]004abcdefghijklmnopqrstuvwxyza", 0, "7039004abcdefghijklmnopqrstuvwxyza" }, + /*752*/ { "[7039]123abcdefghijklmnopqrstuvwxyzab", ZINT_ERROR_INVALID_DATA, "" }, + /*753*/ { "[7040]1abc", 0, "70401abc" }, + /*754*/ { "[7040]1ab", ZINT_ERROR_INVALID_DATA, "" }, + /*755*/ { "[7040]1abcd", ZINT_ERROR_INVALID_DATA, "" }, + /*756*/ { "[7041]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*757*/ { "[7042]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*758*/ { "[7050]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*759*/ { "[7090]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*760*/ { "[7099]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*761*/ { "[71]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*762*/ { "[710]abcdefghijklmnopqrst", 0, "710abcdefghijklmnopqrst" }, + /*763*/ { "[710]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*764*/ { "[7100]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*765*/ { "[711]abcdefghijklmnopqrst", 0, "711abcdefghijklmnopqrst" }, + /*766*/ { "[711]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*767*/ { "[712]abcdefghijklmnopqrst", 0, "712abcdefghijklmnopqrst" }, + /*768*/ { "[712]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*769*/ { "[713]abcdefghijklmnopqrst", 0, "713abcdefghijklmnopqrst" }, + /*770*/ { "[713]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*771*/ { "[714]abcdefghijklmnopqrst", 0, "714abcdefghijklmnopqrst" }, + /*772*/ { "[714]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*773*/ { "[715]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*774*/ { "[716]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*775*/ { "[719]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*776*/ { "[72]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*777*/ { "[720]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*778*/ { "[7200]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*779*/ { "[721]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*780*/ { "[7210]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*781*/ { "[7220]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*782*/ { "[7230]EMabcdefghijklmnopqrstuvwxyzab", 0, "7230EMabcdefghijklmnopqrstuvwxyzab" }, + /*783*/ { "[7230]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*784*/ { "[7230]EM", ZINT_ERROR_INVALID_DATA, "" }, + /*785*/ { "[7231]EMabcdefghijklmnopqrstuvwxyzab", 0, "7231EMabcdefghijklmnopqrstuvwxyzab" }, + /*786*/ { "[7231]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*787*/ { "[7232]EMabcdefghijklmnopqrstuvwxyzab", 0, "7232EMabcdefghijklmnopqrstuvwxyzab" }, + /*788*/ { "[7232]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*789*/ { "[7233]EMabcdefghijklmnopqrstuvwxyzab", 0, "7233EMabcdefghijklmnopqrstuvwxyzab" }, + /*790*/ { "[7233]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*791*/ { "[7234]EMabcdefghijklmnopqrstuvwxyzab", 0, "7234EMabcdefghijklmnopqrstuvwxyzab" }, + /*792*/ { "[7234]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*793*/ { "[7235]EMabcdefghijklmnopqrstuvwxyzab", 0, "7235EMabcdefghijklmnopqrstuvwxyzab" }, + /*794*/ { "[7235]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*795*/ { "[7236]EMabcdefghijklmnopqrstuvwxyzab", 0, "7236EMabcdefghijklmnopqrstuvwxyzab" }, + /*796*/ { "[7236]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*797*/ { "[7237]EMabcdefghijklmnopqrstuvwxyzab", 0, "7237EMabcdefghijklmnopqrstuvwxyzab" }, + /*798*/ { "[7237]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*799*/ { "[7238]EMabcdefghijklmnopqrstuvwxyzab", 0, "7238EMabcdefghijklmnopqrstuvwxyzab" }, + /*800*/ { "[7238]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*801*/ { "[7239]EMabcdefghijklmnopqrstuvwxyzab", 0, "7239EMabcdefghijklmnopqrstuvwxyzab" }, + /*802*/ { "[7239]EMabcdefghijklmnopqrstuvwxyzabc", ZINT_ERROR_INVALID_DATA, "" }, + /*803*/ { "[7239]E", ZINT_ERROR_INVALID_DATA, "" }, + /*804*/ { "[7240]abcdefghijklmnopqrst", 0, "7240abcdefghijklmnopqrst" }, + /*805*/ { "[7240]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*806*/ { "[7241]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*807*/ { "[7249]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*808*/ { "[7250]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*809*/ { "[7299]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*810*/ { "[73]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*811*/ { "[7300]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*812*/ { "[74]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*813*/ { "[7400]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*814*/ { "[79]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*815*/ { "[7900]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*816*/ { "[7999]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*817*/ { "[80]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*818*/ { "[800]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*819*/ { "[8000]1234", ZINT_ERROR_INVALID_DATA, "" }, + /*820*/ { "[8001]12345678901234", ZINT_WARN_NONCOMPLIANT, "800112345678901234" }, + /*821*/ { "[8001]12345678901204", 0, "800112345678901204" }, + /*822*/ { "[8001]1234123456789012345", ZINT_ERROR_INVALID_DATA, "" }, + /*823*/ { "[8002]abcdefghijklmnopqrst", 0, "8002abcdefghijklmnopqrst" }, + /*824*/ { "[8002]abcdefghijklmnopqrstu", ZINT_ERROR_INVALID_DATA, "" }, + /*825*/ { "[8003]01234567890123abcdefghijklmnop", ZINT_WARN_NONCOMPLIANT, "800301234567890123abcdefghijklmnop" }, + /*826*/ { "[8003]01234567890128abcdefghijklmnop", 0, "800301234567890128abcdefghijklmnop" }, + /*827*/ { "[8003]01234567890128abcdefghijklmnopq", ZINT_ERROR_INVALID_DATA, "" }, + /*828*/ { "[8004]abcdefghijklmnopqrstuvwxyz1234", ZINT_WARN_NONCOMPLIANT, "8004abcdefghijklmnopqrstuvwxyz1234" }, + /*829*/ { "[8004]12cdefghijklmnopqrstuvwxyz1234", 0, "800412cdefghijklmnopqrstuvwxyz1234" }, + /*830*/ { "[8004]abcdefghijklmnopqrstuvwxyz12345", ZINT_ERROR_INVALID_DATA, "" }, + /*831*/ { "[8005]123456", 0, "8005123456" }, + /*832*/ { "[8005]12345", ZINT_ERROR_INVALID_DATA, "" }, + /*833*/ { "[8005]1234567", ZINT_ERROR_INVALID_DATA, "" }, + /*834*/ { "[8006]123456789012341212", ZINT_WARN_NONCOMPLIANT, "8006123456789012341212" }, + /*835*/ { "[8006]123456789012311212", 0, "8006123456789012311212" }, + /*836*/ { "[8006]12345678901234121", ZINT_ERROR_INVALID_DATA, "" }, + /*837*/ { "[8006]1234567890123412123", ZINT_ERROR_INVALID_DATA, "" }, + /*838*/ { "[8007]abcdefghijklmnopqrstuvwxyz12345678", ZINT_WARN_NONCOMPLIANT, "8007abcdefghijklmnopqrstuvwxyz12345678" }, + /*839*/ { "[8007]AD95EFGHIJKLMNOPQRSTUVWXYZ12345678", 0, "8007AD95EFGHIJKLMNOPQRSTUVWXYZ12345678" }, + /*840*/ { "[8007]AD95EFGHIJKLMNOPQRSTUVWXYZ123456789", ZINT_ERROR_INVALID_DATA, "" }, + /*841*/ { "[8008]123456121212", ZINT_WARN_NONCOMPLIANT, "8008123456121212" }, + /*842*/ { "[8008]121256121212", ZINT_WARN_NONCOMPLIANT, "8008121256121212" }, + /*843*/ { "[8008]121231121212", 0, "8008121231121212" }, + /*844*/ { "[8008]1234561212", ZINT_WARN_NONCOMPLIANT, "80081234561212" }, + /*845*/ { "[8008]1212311212", 0, "80081212311212" }, + /*846*/ { "[8008]12345612", ZINT_WARN_NONCOMPLIANT, "800812345612" }, + /*847*/ { "[8008]12010112", 0, "800812010112" }, + /*848*/ { "[8008]1234561", ZINT_ERROR_INVALID_DATA, "" }, + /*849*/ { "[8008]123456121", ZINT_ERROR_INVALID_DATA, "" }, + /*850*/ { "[8008]12345612121", ZINT_ERROR_INVALID_DATA, "" }, + /*851*/ { "[8008]1234561212123", ZINT_ERROR_INVALID_DATA, "" }, + /*852*/ { "[8009]12345678901234567890123456789012345678901234567890", 0, "800912345678901234567890123456789012345678901234567890" }, + /*853*/ { "[8009]123456789012345678901234567890123456789012345678901", ZINT_ERROR_INVALID_DATA, "" }, + /*854*/ { "[8010]1234abcdefghijklmnopqrstuvwxyz1", ZINT_ERROR_INVALID_DATA, "" }, + /*855*/ { "[8011]123456789012", 0, "8011123456789012" }, + /*856*/ { "[8011]1234567890123", ZINT_ERROR_INVALID_DATA, "" }, + /*857*/ { "[8012]abcdefghijklmnopqrst", 0, "8012abcdefghijklmnopqrst" }, + /*858*/ { "[8012]abcdefghijklmnopqrstuv", ZINT_ERROR_INVALID_DATA, "" }, /*859*/ { "[8013]1234abcdefghijklmnopqrsQP", 0, "80131234abcdefghijklmnopqrsQP" }, /*860*/ { "[8013]1234abcdefghijklmnopqrsQPv", ZINT_ERROR_INVALID_DATA, "" }, /*861*/ { "[8014]1234", ZINT_ERROR_INVALID_DATA, "" }, @@ -1336,6 +1336,7 @@ static void test_gs1_verify(int index, int debug) { /*978*/ { "[253]12345678901284[01]12345678901231[3901]12345678901234[20]12", 0, "25312345678901284[0112345678901231390112345678901234[2012" }, /*979*/ { "[01]12345678901231[0A]12345678901231[20]12", ZINT_ERROR_INVALID_DATA, "" }, /*980*/ { "[01]12345678901231[0]12345678901231[20]12", ZINT_ERROR_INVALID_DATA, "" }, + /*981*/ { "[01]12345678901231[]12345678901231[20]12", ZINT_ERROR_INVALID_DATA, "" }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -1989,99 +1990,131 @@ static void test_gs1nocheck_mode(int index, int debug) { /* 22*/ { BARCODE_GS1_128, -1, "0112345678901231", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, /* 23*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "0112345678901231", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked /* 24*/ { BARCODE_GS1_128, -1, "[01]", "", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data" }, - /* 25*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]", "", 0, "" }, // Zero-length not checked + /* 25*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]", "", 0, "" }, // Zero-length data not checked /* 26*/ { BARCODE_GS1_128, -1, "[0]123", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, - /* 27*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[0]123", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Too short still checked - /* 28*/ { BARCODE_GS1_128, -1, "[1234567890]123", "", ZINT_ERROR_INVALID_DATA, "Error 255: Invalid AI in input data (AI too long)" }, - /* 29*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[1234567890]123", "", ZINT_ERROR_INVALID_DATA, "Error 255: Invalid AI in input data (AI too long)" }, // Too long still checked - /* 30*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]12", 0, "" }, - /* 31*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]12", 0, "" }, - /* 32*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901234", "[20]12", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (01) position 14: Bad checksum '4', expected '1' in linear component" }, - /* 33*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901234", "[20]12", 0, "" }, - /* 34*/ { BARCODE_GS1_128_CC, -1, "[01]123456789012345", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (01) in linear component" }, - /* 35*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]123456789012345", "[20]12", 0, "" }, - /* 36*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]123", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (20) in 2D component" }, - /* 37*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]123", 0, "" }, - /* 38*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, - /* 39*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]1A", 0, "" }, - /* 40*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, - /* 41*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked - /* 42*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121\200", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in linear component" }, - /* 43*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121\200", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in linear component" }, - /* 44*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, - /* 45*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked - /* 46*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, - /* 47*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked - /* 48*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data in 2D component" }, - /* 49*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]", 0, "" }, // Zero-length not checked - /* 50*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", "", 0, "" }, - /* 51*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231", "", 0, "" }, - /* 52*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]1234", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, - /* 53*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "", 0, "" }, - /* 54*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]1234A", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, - /* 55*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234A", "", 0, "" }, - /* 56*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]12345A", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 6: Non-numeric character 'A'" }, - /* 57*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]12345A", "", 0, "" }, - /* 58*/ { BARCODE_DBAR_EXP, -1, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, - /* 59*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, // Nonprintable ASCII still checked - /* 60*/ { BARCODE_DBAR_EXP, -1, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, - /* 61*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, // Extended ASCII still checked - /* 62*/ { BARCODE_DBAR_EXP, -1, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, - /* 63*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked - /* 64*/ { BARCODE_DBAR_EXP, -1, "[10]", "", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data" }, - /* 65*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[10]", "", 0, "" }, // Zero-length not checked - /* 66*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, - /* 67*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, - /* 68*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11) in linear component" }, - /* 69*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", 0, "" }, - /* 70*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 3: Invalid month '34' in linear component" }, - /* 71*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", 0, "" }, - /* 72*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (30) in 2D component" }, - /* 73*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", 0, "" }, - /* 74*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (30) position 8: Non-numeric character 'A' in 2D component" }, - /* 75*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", 0, "" }, - /* 76*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, - /* 77*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked - /* 78*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, - /* 79*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked - /* 80*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, - /* 81*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked - /* 82*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[10]", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data in 2D component" }, - /* 83*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[10]", 0, "" }, // Zero-length not checked - /* 84*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", "", 0, "" }, - /* 85*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231", "", 0, "" }, - /* 86*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]1234", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, - /* 87*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "", 0, "" }, - /* 88*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]1234A", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, - /* 89*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234A", "", 0, "" }, - /* 90*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]12345A", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 6: Non-numeric character 'A'" }, - /* 91*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]12345A", "", 0, "" }, - /* 92*/ { BARCODE_DBAR_EXPSTK, -1, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, - /* 93*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, // Nonprintable ASCII still checked - /* 94*/ { BARCODE_DBAR_EXPSTK, -1, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, - /* 95*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, // Extended ASCII still checked - /* 96*/ { BARCODE_DBAR_EXPSTK, -1, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, - /* 97*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked - /* 98*/ { BARCODE_DBAR_EXPSTK, -1, "[01]", "", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data" }, - /* 99*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]", "", 0, "" }, // Zero-length not checked - /*100*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, - /*101*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, - /*102*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11) in linear component" }, - /*103*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", 0, "" }, - /*104*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 3: Invalid month '34' in linear component" }, - /*105*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", 0, "" }, - /*106*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (30) in 2D component" }, - /*107*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", 0, "" }, - /*108*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (30) position 8: Non-numeric character 'A' in 2D component" }, - /*109*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", 0, "" }, - /*110*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, - /*111*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked - /*112*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, - /*113*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked - /*114*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, - /*115*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked - /*116*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[235]", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data in 2D component" }, - /*117*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[235]", 0, "" }, // Zero-length not checked + /* 27*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[2]12", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Length 1 AI still checked + /* 28*/ { BARCODE_GS1_128, -1, "[]12", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 29*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[]12", "", 0, "" }, // Length 0 AI with data not checked + /* 30*/ { BARCODE_GS1_128, -1, "[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 31*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Length 0 AI with no data still checked + /* 32*/ { BARCODE_GS1_128, -1, "[01]12345678901231[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 33*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]12345678901231[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Length 0 AI with no data still checked + /* 34*/ { BARCODE_GS1_128, -1, "[01]12345678901231[][20]12", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 35*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[01]12345678901231[][20]12", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Length 0 AI with no data still checked + /* 36*/ { BARCODE_GS1_128, -1, "[1234567890]123", "", ZINT_ERROR_INVALID_DATA, "Error 255: Invalid AI in input data (AI too long)" }, + /* 37*/ { BARCODE_GS1_128, GS1NOCHECK_MODE, "[1234567890]123", "", ZINT_ERROR_INVALID_DATA, "Error 255: Invalid AI in input data (AI too long)" }, // Too long still checked + /* 38*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]12", 0, "" }, + /* 39*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]12", 0, "" }, + /* 40*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901234", "[20]12", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (01) position 14: Bad checksum '4', expected '1' in linear component" }, + /* 41*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901234", "[20]12", 0, "" }, + /* 42*/ { BARCODE_GS1_128_CC, -1, "[01]123456789012345", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (01) in linear component" }, + /* 43*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]123456789012345", "[20]12", 0, "" }, + /* 44*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]123", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (20) in 2D component" }, + /* 45*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]123", 0, "" }, + /* 46*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]1A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (20) position 2: Non-numeric character 'A' in 2D component" }, + /* 47*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]12345678901231", "[20]1A", 0, "" }, + /* 48*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, + /* 49*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked + /* 50*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121\200", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in linear component" }, + /* 51*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121\200", "[20]12", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in linear component" }, + /* 52*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, + /* 53*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked + /* 54*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, + /* 55*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked + /* 56*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[20]", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data in 2D component" }, + /* 57*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]", 0, "" }, // Zero-length data not checked + /* 58*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[2]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /* 59*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[2]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, // Length 1 AI still checked + /* 60*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /* 61*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[]12", 0, "" }, // Length 0 AI with data not checked + /* 62*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[]", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /* 63*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[]", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, // Length 0 AI with no data still checked + /* 64*/ { BARCODE_GS1_128_CC, -1, "[01]1234567890121", "[][20]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /* 65*/ { BARCODE_GS1_128_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[][20]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, // Length 0 AI with no data still checked + /* 66*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", "", 0, "" }, + /* 67*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231", "", 0, "" }, + /* 68*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]1234", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, + /* 69*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "", 0, "" }, + /* 70*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]1234A", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, + /* 71*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234A", "", 0, "" }, + /* 72*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231[10]123[11]12345A", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 6: Non-numeric character 'A'" }, + /* 73*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]12345A", "", 0, "" }, + /* 74*/ { BARCODE_DBAR_EXP, -1, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, + /* 75*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, // Nonprintable ASCII still checked + /* 76*/ { BARCODE_DBAR_EXP, -1, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, + /* 77*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, // Extended ASCII still checked + /* 78*/ { BARCODE_DBAR_EXP, -1, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, + /* 79*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked + /* 80*/ { BARCODE_DBAR_EXP, -1, "[10]", "", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data" }, + /* 81*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[10]", "", 0, "" }, // Zero-length data not checked + /* 82*/ { BARCODE_DBAR_EXP, -1, "[2]12", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 83*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[2]12", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Length 1 AI still checked + /* 84*/ { BARCODE_DBAR_EXP, -1, "[]12", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 85*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[]12", "", 0, "" }, // Length 0 AI with data not checked + /* 86*/ { BARCODE_DBAR_EXP, -1, "[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 87*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Length 0 AI with no data still checked + /* 88*/ { BARCODE_DBAR_EXP, -1, "[20]12[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, + /* 89*/ { BARCODE_DBAR_EXP, GS1NOCHECK_MODE, "[20]12[]", "", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short)" }, // Length 0 AI with no data still checked + /* 90*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, + /* 91*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, + /* 92*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11) in linear component" }, + /* 93*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", 0, "" }, + /* 94*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 3: Invalid month '34' in linear component" }, + /* 95*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", 0, "" }, + /* 96*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (30) in 2D component" }, + /* 97*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", 0, "" }, + /* 98*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (30) position 8: Non-numeric character 'A' in 2D component" }, + /* 99*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", 0, "" }, + /*100*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, + /*101*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked + /*102*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, + /*103*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked + /*104*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, + /*105*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked + /*106*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[10]", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data in 2D component" }, + /*107*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[10]", 0, "" }, // Zero-length data not checked + /*108*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[2]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /*109*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[2]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, // Length 1 AI still checked + /*110*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[]12", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /*111*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[]12", 0, "" }, // Length 0 AI with data not checked + /*112*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[]", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /*113*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[]", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, // Length 0 AI with no data still checked + /*114*/ { BARCODE_DBAR_EXP_CC, -1, "[01]1234567890121", "[20]12[][10]123", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, + /*115*/ { BARCODE_DBAR_EXP_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]12[][10]123", ZINT_ERROR_INVALID_DATA, "Error 256: Invalid AI in input data (AI too short) in 2D component" }, // Length 0 AI with no data still checked + /*116*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231", "", 0, "" }, + /*117*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231", "", 0, "" }, + /*118*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]1234", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, + /*119*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "", 0, "" }, + /*120*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]1234A", "", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11)" }, + /*121*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234A", "", 0, "" }, + /*122*/ { BARCODE_DBAR_EXPSTK, -1, "[01]12345678901231[10]123[11]12345A", "", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 6: Non-numeric character 'A'" }, + /*123*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]12345A", "", 0, "" }, + /*124*/ { BARCODE_DBAR_EXPSTK, -1, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, + /*125*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]1234567890121\177", "", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1" }, // Nonprintable ASCII still checked + /*126*/ { BARCODE_DBAR_EXPSTK, -1, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, + /*127*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]1234567890121\200", "", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1" }, // Extended ASCII still checked + /*128*/ { BARCODE_DBAR_EXPSTK, -1, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, + /*129*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "011234567890121", "", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI" }, // Format still checked + /*130*/ { BARCODE_DBAR_EXPSTK, -1, "[01]", "", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data" }, + /*131*/ { BARCODE_DBAR_EXPSTK, GS1NOCHECK_MODE, "[01]", "", 0, "" }, // Zero-length data not checked + /*132*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, + /*133*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345", 0, "" }, + /*134*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (11) in linear component" }, + /*135*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]1234", "[21]ABC123[22]12345", 0, "" }, + /*136*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (11) position 3: Invalid month '34' in linear component" }, + /*137*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]12345678901231[10]123[11]123456", "[21]ABC123[22]12345", 0, "" }, + /*138*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", ZINT_ERROR_INVALID_DATA, "Error 259: Invalid data length for AI (30) in 2D component" }, + /*139*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]123456789", 0, "" }, + /*140*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", ZINT_WARN_NONCOMPLIANT, "Warning 261: AI (30) position 8: Non-numeric character 'A' in 2D component" }, + /*141*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]123456789012[01]12345678901231[10]123[11]121212", "[21]ABC123[22]12345[30]1234567A", 0, "" }, + /*142*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, + /*143*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\177", ZINT_ERROR_INVALID_DATA, "Error 263: DEL characters are not supported by GS1 in 2D component" }, // Nonprintable ASCII still checked + /*144*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, + /*145*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[20]1\200", ZINT_ERROR_INVALID_DATA, "Error 250: Extended ASCII characters are not supported by GS1 in 2D component" }, // Extended ASCII still checked + /*146*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, + /*147*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "2012", ZINT_ERROR_INVALID_DATA, "Error 252: Data does not start with an AI in 2D component" }, // Format still checked + /*148*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]1234567890121", "[235]", ZINT_ERROR_INVALID_DATA, "Error 258: Empty data field in input data in 2D component" }, + /*149*/ { BARCODE_DBAR_EXPSTK_CC, GS1NOCHECK_MODE, "[01]1234567890121", "[235]", 0, "" }, // Zero-length data not checked }; int data_size = ARRAY_SIZE(data); int i, length, ret; diff --git a/backend/tests/test_raster.c b/backend/tests/test_raster.c index 706cd074..a973fca6 100644 --- a/backend/tests/test_raster.c +++ b/backend/tests/test_raster.c @@ -927,6 +927,7 @@ static void test_scale(int index, int debug) { int option_2; int border_width; int output_options; + float height; float scale; char *data; char *composite; @@ -944,32 +945,40 @@ static void test_scale(int index, int debug) { }; // s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<")) struct item data[] = { - /* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, "1", "", 0, 18, 6, 103, 206, 36, 0, 36, 170, 14 }, // With no scaling - /* 1*/ { BARCODE_PDF417, -1, -1, -1, 0.6, "1", "", 0, 18, 6, 103, 206 * 0.6, 36 * 0.6, 0 /*set_row*/, 36 * 0.6, 170 * 0.6 + 1, 14 * 0.6 }, // +1 set_col due to some scaling inversion difference - /* 2*/ { BARCODE_PDF417, -1, -1, -1, 1.2, "1", "", 0, 18, 6, 103, 206 * 1.2, 36 * 1.2, 0 /*set_row*/, 36 * 1.2, 170 * 1.2 + 1, 14 * 1.2 }, // +1 set_col due to some scaling inversion difference - /* 3*/ { BARCODE_PDF417, -1, -1, -1, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 }, - /* 4*/ { BARCODE_PDF417, -1, -1, -1, 1.0, "1", "", 0, 18, 6, 103, 206 * 1.0, 36 * 1.0, 0 /*set_row*/, 36 * 1.0, 170 * 1.0, 14 * 1.0 }, - /* 5*/ { BARCODE_PDF417, -1, -1, -1, 1.5, "1", "", 0, 18, 6, 103, 206 * 1.5, 36 * 1.5, 0 /*set_row*/, 36 * 1.5, 170 * 1.5, 14 * 1.5 }, - /* 6*/ { BARCODE_PDF417, -1, -1, -1, 2.0, "1", "", 0, 18, 6, 103, 206 * 2.0, 36 * 2.0, 0 /*set_row*/, 36 * 2.0, 170 * 2.0, 14 * 2.0 }, - /* 7*/ { BARCODE_PDF417, -1, -1, -1, 2.5, "1", "", 0, 18, 6, 103, 206 * 2.5, 36 * 2.5, 0 /*set_row*/, 36 * 2.5, 170 * 2.5, 14 * 2.5 }, - /* 8*/ { BARCODE_PDF417, -1, -1, -1, 3.0, "1", "", 0, 18, 6, 103, 206 * 3.0, 36 * 3.0, 0 /*set_row*/, 36 * 3.0, 170 * 3.0, 14 * 3.0 }, - /* 9*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, "1", "", 0, 18, 6, 103, 218, 48, 0 /*set_row*/, 48, 176, 14 }, // With no scaling - /* 10*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0.6, "1", "", 0, 18, 6, 103, 218 * 0.6, 48 * 0.6, 0 /*set_row*/, 48 * 0.6, 176 * 0.6 + 1, 14 * 0.6 }, // +1 set_col due to some scaling inversion difference - /* 11*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 1.6, "1", "", 0, 18, 6, 103, 218 * 1.6, 48 * 1.6, 0 /*set_row*/, 48 * 1.6, 176 * 1.6 + 1, 14 * 1.6 }, // +1 set_col due to some scaling inversion difference - /* 12*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 1.5, "1", "", 0, 18, 6, 103, 218 * 1.5, 48 * 1.5, 0 /*set_row*/, 48 * 1.5, 176 * 1.5, 14 * 1.5 }, - /* 13*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 2.5, "1", "", 0, 18, 6, 103, 218 * 2.5, 48 * 2.5, 0 /*set_row*/, 48 * 2.5, 176 * 2.5, 14 * 2.5 }, - /* 14*/ { BARCODE_PDF417, -1, 3, OUT_BUFFER_INTERMEDIATE, 1.3, "1", "", 0, 18, 6, 103, 206 * 1.3, 36 * 1.3, 0 /*set_row*/, 36 * 1.3, 170 * 1.3 + 1, 14 * 1.3 }, // +1 set_col due to some scaling inversion difference - /* 15*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, "123456789012", "", 0, 50, 1, 79, 158, 116, 104 /*set_row*/, 114, 20, 2 }, // With no scaling - /* 16*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 116 * 1.5, 104 * 1.5 /*set_row*/, 114 * 1.5, 20 * 1.5, 1 * 1.5 }, - /* 17*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 116 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0, 20 * 2.0, 1 * 2.0 }, - /* 18*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 3.5, "123456789012", "", 0, 50, 1, 79, 158 * 3.5, 116 * 3.5, 104 * 3.5 /*set_row*/, 114 * 3.5, 20 * 3.5, 1 * 3.5 }, - /* 19*/ { BARCODE_UPCA, -1, -1, -1, 0, "12345678904", "", 0, 50, 1, 95, 226, 116, 104 /*set_row*/, 114, 5, 2 }, // With no scaling - /* 20*/ { BARCODE_UPCA, -1, -1, -1, 2.5, "12345678904", "", 0, 50, 1, 95, 226 * 2.5, 116 * 2.5, 104 * 2.5 /*set_row*/, 114 * 2.5, 5 * 2.5, 2 * 2.5 }, - /* 21*/ { BARCODE_UPCA, -1, -1, -1, 4.5, "12345678904", "", 0, 50, 1, 95, 226 * 4.5, 116 * 4.5, 104 * 4.5 /*set_row*/, 114 * 4.5, 5 * 4.5, 2 * 4.5 }, - /* 22*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116, 104 /*set_row*/, 115, 11, 2 }, // With no scaling - /* 23*/ { BARCODE_UPCE_CC, -1, -1, -1, 2.0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 2, 116 * 2, 104 * 2 + 1 /*set_row*/, 115 * 2, 11 * 2, 2 * 2 }, // +1 set_row - /* 24*/ { BARCODE_MAXICODE, -1, -1, -1, 0, "1234567890", "", 0, 165, 33, 30, 299, 298, 3 /*set_row*/, 7, 10, 9 }, // With no scaling - /* 25*/ { BARCODE_MAXICODE, -1, -1, -1, 0.1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 165, 33, 30, 60, 65, 0 /*set_row*/, 1, 3, 1 }, + /* 0*/ { BARCODE_PDF417, -1, -1, -1, 0, 0, "1", "", 0, 18, 6, 103, 206, 36, 0, 36, 170, 14 }, // With no scaling + /* 1*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.6, "1", "", 0, 18, 6, 103, 206 * 0.6, 36 * 0.6, 0 /*set_row*/, 36 * 0.6, 170 * 0.6 + 1, 14 * 0.6 }, // +1 set_col due to some scaling inversion difference + /* 2*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.2, "1", "", 0, 18, 6, 103, 206 * 1.2, 36 * 1.2, 0 /*set_row*/, 36 * 1.2, 170 * 1.2 + 1, 14 * 1.2 }, // +1 set_col due to some scaling inversion difference + /* 3*/ { BARCODE_PDF417, -1, -1, -1, 0, 0.5, "1", "", 0, 18, 6, 103, 206 * 0.5, 36 * 0.5, 0 /*set_row*/, 36 * 0.5, 170 * 0.5, 14 * 0.5 }, + /* 4*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.0, "1", "", 0, 18, 6, 103, 206 * 1.0, 36 * 1.0, 0 /*set_row*/, 36 * 1.0, 170 * 1.0, 14 * 1.0 }, + /* 5*/ { BARCODE_PDF417, -1, -1, -1, 0, 1.5, "1", "", 0, 18, 6, 103, 206 * 1.5, 36 * 1.5, 0 /*set_row*/, 36 * 1.5, 170 * 1.5, 14 * 1.5 }, + /* 6*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.0, "1", "", 0, 18, 6, 103, 206 * 2.0, 36 * 2.0, 0 /*set_row*/, 36 * 2.0, 170 * 2.0, 14 * 2.0 }, + /* 7*/ { BARCODE_PDF417, -1, -1, -1, 0, 2.5, "1", "", 0, 18, 6, 103, 206 * 2.5, 36 * 2.5, 0 /*set_row*/, 36 * 2.5, 170 * 2.5, 14 * 2.5 }, + /* 8*/ { BARCODE_PDF417, -1, -1, -1, 0, 3.0, "1", "", 0, 18, 6, 103, 206 * 3.0, 36 * 3.0, 0 /*set_row*/, 36 * 3.0, 170 * 3.0, 14 * 3.0 }, + /* 9*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0, "1", "", 0, 18, 6, 103, 218, 48, 0 /*set_row*/, 48, 176, 14 }, // With no scaling + /* 10*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 0.6, "1", "", 0, 18, 6, 103, 218 * 0.6, 48 * 0.6, 0 /*set_row*/, 48 * 0.6, 176 * 0.6 + 1, 14 * 0.6 }, // +1 set_col due to some scaling inversion difference + /* 11*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.6, "1", "", 0, 18, 6, 103, 218 * 1.6, 48 * 1.6, 0 /*set_row*/, 48 * 1.6, 176 * 1.6 + 1, 14 * 1.6 }, // +1 set_col due to some scaling inversion difference + /* 12*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 1.5, "1", "", 0, 18, 6, 103, 218 * 1.5, 48 * 1.5, 0 /*set_row*/, 48 * 1.5, 176 * 1.5, 14 * 1.5 }, + /* 13*/ { BARCODE_PDF417, -1, 3, BARCODE_BOX, 0, 2.5, "1", "", 0, 18, 6, 103, 218 * 2.5, 48 * 2.5, 0 /*set_row*/, 48 * 2.5, 176 * 2.5, 14 * 2.5 }, + /* 14*/ { BARCODE_PDF417, -1, 3, OUT_BUFFER_INTERMEDIATE, 0, 1.3, "1", "", 0, 18, 6, 103, 206 * 1.3, 36 * 1.3, 0 /*set_row*/, 36 * 1.3, 170 * 1.3, 14 * 1.3 }, + /* 15*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 0, "123456789012", "", 0, 50, 1, 79, 158, 116, 104 /*set_row*/, 114, 20, 2 }, // With no scaling + /* 16*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 116 * 1.5, 104 * 1.5 /*set_row*/, 114 * 1.5, 20 * 1.5, 1 * 1.5 }, + /* 17*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 116 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0, 20 * 2.0, 1 * 2.0 }, + /* 18*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 3.5, "123456789012", "", 0, 50, 1, 79, 158 * 3.5, 116 * 3.5, 104 * 3.5 /*set_row*/, 114 * 3.5, 20 * 3.5, 1 * 3.5 }, + /* 19*/ { BARCODE_UPCA, -1, -1, -1, 0, 0, "12345678904", "", 0, 50, 1, 95, 226, 116, 104 /*set_row*/, 114, 5, 2 }, // With no scaling + /* 20*/ { BARCODE_UPCA, -1, -1, -1, 0, 2.5, "12345678904", "", 0, 50, 1, 95, 226 * 2.5, 116 * 2.5, 104 * 2.5 /*set_row*/, 114 * 2.5, 5 * 2.5, 2 * 2.5 }, + /* 21*/ { BARCODE_UPCA, -1, -1, -1, 0, 4.5, "12345678904", "", 0, 50, 1, 95, 226 * 4.5, 116 * 4.5, 104 * 4.5 /*set_row*/, 114 * 4.5, 5 * 4.5, 2 * 4.5 }, + /* 22*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142, 116, 104 /*set_row*/, 115, 11, 2 }, // With no scaling + /* 23*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 2.0, "1234567", "[17]010615[10]A123456\"", 0, 50, 10, 55, 142 * 2, 116 * 2, 104 * 2 + 1 /*set_row*/, 115 * 2, 11 * 2, 2 * 2 }, // +1 set_row + /* 24*/ { BARCODE_MAXICODE, -1, -1, -1, 0, 0, "1234567890", "", 0, 165, 33, 30, 299, 298, 3 /*set_row*/, 7, 10, 9 }, // With no scaling + /* 25*/ { BARCODE_MAXICODE, -1, -1, -1, 0, 0.1, "1234567890", "", ZINT_WARN_NONCOMPLIANT, 165, 33, 30, 60, 65, 0 /*set_row*/, 1, 3, 1 }, + /* 26*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0, "12345", "", 0, 12, 2, 63, 146, 30, 3 /*set_row*/, 27, 10, 2 }, // With no scaling + /* 27*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0.1, "12345", "", 0, 12, 2, 63, 146 * 0.5, 30 * 0.5 - 1, 3 * 0.5 /*set_row*/, 27 * 0.5, 10 * 0.5, 2 * 0.5 }, // -1 height due to yoffset/boffset flooring + /* 28*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0.9, "12345", "", 0, 12, 2, 63, 146 * 0.9, 30 * 0.9, 3 * 0.9 + 1 /*set_row*/, 27 * 0.9, 10 * 0.9, 2 * 0.9 + 1 }, // +1's due to interpolation + /* 29*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 2.3, "12345", "", 0, 12, 2, 63, 146 * 2.3, 30 * 2.3, 3 * 2.3 + 1 /*set_row*/, 27 * 2.3 - 1, 10 * 2.3, 2 * 2.3 + 1 }, // -1/+1's due to interpolation + /* 30*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 3.1, "12345", "", 0, 12, 2, 63, 146 * 3.1, 30 * 3.1, 3 * 3.1 + 1 /*set_row*/, 27 * 3.1, 10 * 3.1, 2 * 3.2 + 1 }, // +1's due to interpolation + /* 31*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 0, "12345", "", 0, 62, 1, 135, 310, 156, 8 /*set_row*/, 132, 20, 2 }, // With no scaling + /* 32*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2, "12345", "", 0, 61.75, 1, 135, 310 * 2, 156 * 2 - 1, 8 * 2 /*set_row*/, 132 * 2 - 1, 20 * 2, 2 * 2 }, // -1's due to height rounding + /* 33*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2.1, "12345", "", 0, 62, 1, 135, 310 * 2.1, 156 * 2.1, 8 * 2.1 /*set_row*/, 132 * 2.1, 20 * 2.1, 2 * 2.1 }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -991,6 +1000,9 @@ static void test_scale(int index, int debug) { if (data[i].border_width != -1) { symbol->border_width = data[i].border_width; } + if (data[i].height) { + symbol->height = data[i].height; + } if (data[i].scale) { symbol->scale = data[i].scale; } @@ -1023,7 +1035,7 @@ static void test_scale(int index, int debug) { assert_nonzero(symbol->bitmap_height >= data[i].expected_set_rows, "i:%d (%d) symbol->bitmap_height %d < expected_set_rows %d\n", i, data[i].symbology, symbol->bitmap_height, data[i].expected_set_rows); - assert_nonzero(data[i].expected_set_rows > data[i].expected_set_row, "i:%d (%d) expected_set_rows %d < expected_set_row %d\n", + assert_nonzero(data[i].expected_set_rows > data[i].expected_set_row, "i:%d (%d) expected_set_rows %d <= expected_set_row %d\n", i, data[i].symbology, data[i].expected_set_rows, data[i].expected_set_row); for (row = data[i].expected_set_row; row < data[i].expected_set_rows; row++) { int bits_set = 0; @@ -2196,6 +2208,95 @@ static void test_height(int index, int generate, int debug) { testFinish(); } +#include + +#define TEST_PERF_ITERATIONS 1000 + +// Not a real test, just performance indicator for scaling +static void test_perf_scale(int index, int debug) { + + struct item { + int symbology; + int input_mode; + int border_width; + int output_options; + int option_1; + int option_2; + float height; + float scale; + char *data; + int ret; + + int expected_rows; + int expected_width; + char *comment; + }; + struct item data[] = { + /* 0*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, 0, 1.3, + "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz&,:#-.$/+%*=^ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM" + "NOPQRSTUVWXYZ;<>@[]_`~!||()?{}'123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJK" + "LMNOPQRSTUVWXYZ12345678912345678912345678912345678900001234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFG" + "HIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234567" + "890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcde" + "fghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO", + 0, 40, 307, "960 chars, text/numeric" }, + /* 1*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, -1, -1, 0, 1.1, "12345", 0, 2, 63, "" }, + /* 2*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, -1, -1, 61.8, 3.1, "12345", 0, 1, 135, "" }, + }; + int data_size = ARRAY_SIZE(data); + int i, length, ret; + + clock_t start, total_encode = 0, total_buffer = 0, diff_encode, diff_buffer; + + if (!(debug & ZINT_DEBUG_TEST_PERFORMANCE)) { /* -d 256 */ + return; + } + + for (i = 0; i < data_size; i++) { + int j; + + if (index != -1 && i != index) continue; + + diff_encode = diff_buffer = 0; + + for (j = 0; j < TEST_PERF_ITERATIONS; j++) { + struct zint_symbol *symbol = ZBarcode_Create(); + assert_nonnull(symbol, "Symbol not created\n"); + + length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, data[i].output_options, data[i].data, -1, debug); + if (data[i].height) { + symbol->height = data[i].height; + } + if (data[i].scale) { + symbol->scale = data[i].scale; + } + + start = clock(); + ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length); + diff_encode += clock() - start; + assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt); + + assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, data[i].data); + assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, data[i].data); + + start = clock(); + ret = ZBarcode_Buffer(symbol, 0 /*rotate_angle*/); + diff_buffer += clock() - start; + assert_zero(ret, "i:%d ZBarcode_Buffer ret %d != 0 (%s)\n", i, ret, symbol->errtxt); + + ZBarcode_Delete(symbol); + } + + printf("%s: diff_encode %gms, diff_buffer %gms\n", data[i].comment, diff_encode * 1000.0 / CLOCKS_PER_SEC, diff_buffer * 1000.0 / CLOCKS_PER_SEC); + + total_encode += diff_encode; + total_buffer += diff_buffer; + } + if (index != -1) { + printf("totals: encode %gms, buffer %gms\n", total_encode * 1000.0 / CLOCKS_PER_SEC, total_buffer * 1000.0 / CLOCKS_PER_SEC); + } +} + int main(int argc, char *argv[]) { testFunction funcs[] = { /* name, func, has_index, has_generate, has_debug */ @@ -2212,6 +2313,7 @@ int main(int argc, char *argv[]) { { "test_quiet_zones", test_quiet_zones, 1, 0, 1 }, { "test_buffer_plot", test_buffer_plot, 1, 1, 1 }, { "test_height", test_height, 1, 1, 1 }, + { "test_perf_scale", test_perf_scale, 1, 0, 1 }, }; testRun(argc, argv, funcs, ARRAY_SIZE(funcs)); diff --git a/backend/tests/test_vector.c b/backend/tests/test_vector.c index bae4a485..eb212280 100644 --- a/backend/tests/test_vector.c +++ b/backend/tests/test_vector.c @@ -39,17 +39,17 @@ static struct zint_vector_rect *find_rect(struct zint_symbol *symbol, float x, f } for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) { //printf("x %.8g, y %.8g, width %.8g, height %.8g\n", rect->x, rect->y, rect->width, rect->height); - if (rect->x == x && rect->y == y) { + if (rect->x == stripf(x) && rect->y == stripf(y)) { if (height && width) { - if (rect->height == height && rect->width == width) { + if (rect->height == stripf(height) && rect->width == stripf(width)) { break; } } else if (height) { - if (rect->height == height) { + if (rect->height == stripf(height)) { break; } } else if (width) { - if (rect->width == width) { + if (rect->width == stripf(width)) { break; } } else { @@ -69,9 +69,9 @@ static struct zint_vector_circle *find_circle(struct zint_symbol *symbol, float } for (circle = symbol->vector->circles; circle != NULL; circle = circle->next) { //printf("x %.8g, y %.8g, diamter %.8g\n", circle->x, circle->y, circle->diameter); - if (circle->x == x && circle->y == y) { + if (circle->x == stripf(x) && circle->y == stripf(y)) { if (diameter) { - if (circle->diameter == diameter) { + if (circle->diameter == stripf(diameter)) { break; } } else { diff --git a/backend/tif_lzw.h b/backend/tif_lzw.h index d18b9b2e..61c99674 100644 --- a/backend/tif_lzw.h +++ b/backend/tif_lzw.h @@ -39,27 +39,27 @@ * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * - * Permission to use, copy, modify, distribute, and sell this software and + * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Sam Leffler and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Sam Leffler and Silicon Graphics. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF - * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ /* - * TIFF Library. + * TIFF Library. * Rev 5.0 Lempel-Ziv & Welch Compression Support * * This code is derived from the compress program whose code is @@ -176,16 +176,16 @@ static void tif_lzw_cl_hash(tif_lzw_state *sp) { /* * Encode a chunk of pixels. * - * Uses an open addressing double hashing (no chaining) on the + * Uses an open addressing double hashing (no chaining) on the * prefix code/next character combination. We do a variant of * Knuth's algorithm D (vol. 3, sec. 6.4) along with G. Knott's * relatively-prime secondary probe. Here, the modular division - * first probe is gives way to a faster exclusive-or manipulation. + * first probe is gives way to a faster exclusive-or manipulation. * Also do block compression with an adaptive reset, whereby the * code table is cleared when the compression ratio decreases, * but after the table fills. The variable-length output codes * are re-sized at this point, and a CODE_CLEAR is generated - * for the decoder. + * for the decoder. */ static int tif_lzw_encode(tif_lzw_state *sp, FILE *op_file, const unsigned char *bp, int cc) { register long fcode; diff --git a/backend/ultra.c b/backend/ultra.c index d7f29b02..3bebf3f9 100644 --- a/backend/ultra.c +++ b/backend/ultra.c @@ -117,14 +117,14 @@ static const int tiles[] = { * Dated 2001-03-09 * Corrected thanks to input from Terry Burton */ -/* +/* * NOTE: Included here is an attempt to allow code compression within Ultracode. Unfortunately * the copy of the standard this was written from was an early draft which includes self * contradictions, so this is a "best guess" implementation. Because it is not guaranteed * to be correct this compression is not applied by default. To enable compression set - * + * * symbol->option_3 = ULTRA_COMPRESSION; - * + * * Code compression should be enabled by default when it has been implemented according to * a more reliable version of the specification. */ @@ -642,7 +642,7 @@ static int ultra_generate_codewords(struct zint_symbol *symbol, const unsigned c break; } } - + if (symbol->option_3 != ULTRA_COMPRESSION && !gs1) { // Force eight-bit mode by default as other modes are poorly documented symbol_mode = EIGHTBIT_MODE; @@ -969,7 +969,7 @@ INTERNAL int ultracode(struct zint_symbol *symbol, unsigned char source[], int l locn = 0; /* Calculate error correction codewords (RSEC) */ - + ultra_gf283((short) data_cw_count, (short) qcc, data_codewords); if (symbol->debug & ZINT_DEBUG_PRINT) { diff --git a/backend/vector.c b/backend/vector.c index 7f7ba951..b89d56e0 100644 --- a/backend/vector.c +++ b/backend/vector.c @@ -228,42 +228,42 @@ static void vector_scale(struct zint_symbol *symbol, const int file_type) { // Increase size to overcome limitations in EMF file format scale *= 20; } - - symbol->vector->width *= scale; - symbol->vector->height *= scale; + + symbol->vector->width = stripf(symbol->vector->width * scale); + symbol->vector->height = stripf(symbol->vector->height * scale); rect = symbol->vector->rectangles; while (rect) { - rect->x *= scale; - rect->y *= scale; - rect->height *= scale; - rect->width *= scale; + rect->x = stripf(rect->x * scale); + rect->y = stripf(rect->y * scale); + rect->height = stripf(rect->height * scale); + rect->width = stripf(rect->width * scale); rect = rect->next; } hex = symbol->vector->hexagons; while (hex) { - hex->x *= scale; - hex->y *= scale; - hex->diameter *= scale; + hex->x = stripf(hex->x * scale); + hex->y = stripf(hex->y * scale); + hex->diameter = stripf(hex->diameter * scale); hex = hex->next; } circle = symbol->vector->circles; while (circle) { - circle->x *= scale; - circle->y *= scale; - circle->diameter *= scale; - circle->width *= scale; + circle->x = stripf(circle->x * scale); + circle->y = stripf(circle->y * scale); + circle->diameter = stripf(circle->diameter * scale); + circle->width = stripf(circle->width * scale); circle = circle->next; } string = symbol->vector->strings; while (string) { - string->x *= scale; - string->y *= scale; - string->width *= scale; - string->fsize *= scale; + string->x = stripf(string->x * scale); + string->y = stripf(string->y * scale); + string->width = stripf(string->width * scale); + string->fsize = stripf(string->fsize * scale); string = string->next; } } @@ -275,92 +275,92 @@ static void vector_rotate(struct zint_symbol *symbol, const int rotate_angle) { struct zint_vector_circle *circle; struct zint_vector_string *string; float temp; - + if (rotate_angle == 0) { // No rotation needed return; } - + rect = symbol->vector->rectangles; while (rect) { if (rotate_angle == 90) { temp = rect->x; - rect->x = symbol->vector->height - (rect->y + rect->height); + rect->x = stripf(symbol->vector->height - (rect->y + rect->height)); rect->y = temp; temp = rect->width; rect->width = rect->height; rect->height = temp; } else if (rotate_angle == 180) { - rect->x = symbol->vector->width - (rect->x + rect->width); - rect->y = symbol->vector->height - (rect->y + rect->height); + rect->x = stripf(symbol->vector->width - (rect->x + rect->width)); + rect->y = stripf(symbol->vector->height - (rect->y + rect->height)); } else if (rotate_angle == 270) { temp = rect->x; rect->x = rect->y; - rect->y = symbol->vector->width - (temp + rect->width); + rect->y = stripf(symbol->vector->width - (temp + rect->width)); temp = rect->width; rect->width = rect->height; rect->height = temp; } rect = rect->next; } - + hex = symbol->vector->hexagons; while (hex) { if (rotate_angle == 90) { temp = hex->x; - hex->x = symbol->vector->height - hex->y; + hex->x = stripf(symbol->vector->height - hex->y); hex->y = temp; hex->rotation = 90; } else if (rotate_angle == 180) { - hex->x = symbol->vector->width - hex->x; - hex->y = symbol->vector->height - hex->y; + hex->x = stripf(symbol->vector->width - hex->x); + hex->y = stripf(symbol->vector->height - hex->y); hex->rotation = 180; } else if (rotate_angle == 270) { temp = hex->x; hex->x = hex->y; - hex->y = symbol->vector->width - temp; + hex->y = stripf(symbol->vector->width - temp); hex->rotation = 270; } hex = hex->next; } - + circle = symbol->vector->circles; while (circle) { if (rotate_angle == 90) { temp = circle->x; - circle->x = symbol->vector->height - circle->y; + circle->x = stripf(symbol->vector->height - circle->y); circle->y = temp; } else if (rotate_angle == 180) { - circle->x = symbol->vector->width - circle->x; - circle->y = symbol->vector->height - circle->y; + circle->x = stripf(symbol->vector->width - circle->x); + circle->y = stripf(symbol->vector->height - circle->y); } else if (rotate_angle == 270) { temp = circle->x; circle->x = circle->y; - circle->y = symbol->vector->width - temp; + circle->y = stripf(symbol->vector->width - temp); } circle = circle->next; } - + string = symbol->vector->strings; while (string) { if (rotate_angle == 90) { temp = string->x; - string->x = symbol->vector->height - string->y; + string->x = stripf(symbol->vector->height - string->y); string->y = temp; string->rotation = 90; } else if (rotate_angle == 180) { - string->x = symbol->vector->width - string->x; - string->y = symbol->vector->height - string->y; + string->x = stripf(symbol->vector->width - string->x); + string->y = stripf(symbol->vector->height - string->y); string->rotation = 180; } else if (rotate_angle == 270) { temp = string->x; string->x = string->y; - string->y = symbol->vector->width - temp; + string->y = stripf(symbol->vector->width - temp); string->rotation = 270; } string = string->next; } - + if ((rotate_angle == 90) || (rotate_angle == 270)) { temp = symbol->vector->height; symbol->vector->height = symbol->vector->width; @@ -378,7 +378,7 @@ static void vector_reduce_rectangles(struct zint_symbol *symbol) { target = prev->next; while (target) { - if ((rect->x == target->x) && (rect->width == target->width) && ((rect->y + rect->height) == target->y) + if ((rect->x == target->x) && (rect->width == target->width) && (stripf(rect->y + rect->height) == target->y) && (rect->colour == target->colour)) { rect->height += target->height; prev->next = target->next; @@ -919,7 +919,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_ vector_reduce_rectangles(symbol); vector_scale(symbol, file_type); - + if (file_type != OUT_EMF_FILE) { /* EMF does its own rotation (with mixed results in various apps) */ vector_rotate(symbol, rotate_angle);